module Stratosphere.CodeBuild.Project.BatchRestrictionsProperty (
BatchRestrictionsProperty(..), mkBatchRestrictionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BatchRestrictionsProperty
=
BatchRestrictionsProperty {BatchRestrictionsProperty -> ()
haddock_workaround_ :: (),
BatchRestrictionsProperty -> Maybe (ValueList Text)
computeTypesAllowed :: (Prelude.Maybe (ValueList Prelude.Text)),
BatchRestrictionsProperty -> Maybe (Value Integer)
maximumBuildsAllowed :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (BatchRestrictionsProperty -> BatchRestrictionsProperty -> Bool
(BatchRestrictionsProperty -> BatchRestrictionsProperty -> Bool)
-> (BatchRestrictionsProperty -> BatchRestrictionsProperty -> Bool)
-> Eq BatchRestrictionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BatchRestrictionsProperty -> BatchRestrictionsProperty -> Bool
== :: BatchRestrictionsProperty -> BatchRestrictionsProperty -> Bool
$c/= :: BatchRestrictionsProperty -> BatchRestrictionsProperty -> Bool
/= :: BatchRestrictionsProperty -> BatchRestrictionsProperty -> Bool
Prelude.Eq, Int -> BatchRestrictionsProperty -> ShowS
[BatchRestrictionsProperty] -> ShowS
BatchRestrictionsProperty -> String
(Int -> BatchRestrictionsProperty -> ShowS)
-> (BatchRestrictionsProperty -> String)
-> ([BatchRestrictionsProperty] -> ShowS)
-> Show BatchRestrictionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BatchRestrictionsProperty -> ShowS
showsPrec :: Int -> BatchRestrictionsProperty -> ShowS
$cshow :: BatchRestrictionsProperty -> String
show :: BatchRestrictionsProperty -> String
$cshowList :: [BatchRestrictionsProperty] -> ShowS
showList :: [BatchRestrictionsProperty] -> ShowS
Prelude.Show)
mkBatchRestrictionsProperty :: BatchRestrictionsProperty
mkBatchRestrictionsProperty :: BatchRestrictionsProperty
mkBatchRestrictionsProperty
= BatchRestrictionsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), computeTypesAllowed :: Maybe (ValueList Text)
computeTypesAllowed = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
maximumBuildsAllowed :: Maybe (Value Integer)
maximumBuildsAllowed = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BatchRestrictionsProperty where
toResourceProperties :: BatchRestrictionsProperty -> ResourceProperties
toResourceProperties BatchRestrictionsProperty {Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: BatchRestrictionsProperty -> ()
computeTypesAllowed :: BatchRestrictionsProperty -> Maybe (ValueList Text)
maximumBuildsAllowed :: BatchRestrictionsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
computeTypesAllowed :: Maybe (ValueList Text)
maximumBuildsAllowed :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::CodeBuild::Project.BatchRestrictions",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ComputeTypesAllowed" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
computeTypesAllowed,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumBuildsAllowed"
(Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumBuildsAllowed])}
instance JSON.ToJSON BatchRestrictionsProperty where
toJSON :: BatchRestrictionsProperty -> Value
toJSON BatchRestrictionsProperty {Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: BatchRestrictionsProperty -> ()
computeTypesAllowed :: BatchRestrictionsProperty -> Maybe (ValueList Text)
maximumBuildsAllowed :: BatchRestrictionsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
computeTypesAllowed :: Maybe (ValueList Text)
maximumBuildsAllowed :: Maybe (Value Integer)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ComputeTypesAllowed" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
computeTypesAllowed,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaximumBuildsAllowed"
(Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
maximumBuildsAllowed]))
instance Property "ComputeTypesAllowed" BatchRestrictionsProperty where
type PropertyType "ComputeTypesAllowed" BatchRestrictionsProperty = ValueList Prelude.Text
set :: PropertyType "ComputeTypesAllowed" BatchRestrictionsProperty
-> BatchRestrictionsProperty -> BatchRestrictionsProperty
set PropertyType "ComputeTypesAllowed" BatchRestrictionsProperty
newValue BatchRestrictionsProperty {Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: BatchRestrictionsProperty -> ()
computeTypesAllowed :: BatchRestrictionsProperty -> Maybe (ValueList Text)
maximumBuildsAllowed :: BatchRestrictionsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
computeTypesAllowed :: Maybe (ValueList Text)
maximumBuildsAllowed :: Maybe (Value Integer)
..}
= BatchRestrictionsProperty
{computeTypesAllowed :: Maybe (ValueList Text)
computeTypesAllowed = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ComputeTypesAllowed" BatchRestrictionsProperty
ValueList Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
maximumBuildsAllowed :: Maybe (Value Integer)
haddock_workaround_ :: ()
maximumBuildsAllowed :: Maybe (Value Integer)
..}
instance Property "MaximumBuildsAllowed" BatchRestrictionsProperty where
type PropertyType "MaximumBuildsAllowed" BatchRestrictionsProperty = Value Prelude.Integer
set :: PropertyType "MaximumBuildsAllowed" BatchRestrictionsProperty
-> BatchRestrictionsProperty -> BatchRestrictionsProperty
set PropertyType "MaximumBuildsAllowed" BatchRestrictionsProperty
newValue BatchRestrictionsProperty {Maybe (ValueList Text)
Maybe (Value Integer)
()
haddock_workaround_ :: BatchRestrictionsProperty -> ()
computeTypesAllowed :: BatchRestrictionsProperty -> Maybe (ValueList Text)
maximumBuildsAllowed :: BatchRestrictionsProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
computeTypesAllowed :: Maybe (ValueList Text)
maximumBuildsAllowed :: Maybe (Value Integer)
..}
= BatchRestrictionsProperty
{maximumBuildsAllowed :: Maybe (Value Integer)
maximumBuildsAllowed = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaximumBuildsAllowed" BatchRestrictionsProperty
Value Integer
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
computeTypesAllowed :: Maybe (ValueList Text)
haddock_workaround_ :: ()
computeTypesAllowed :: Maybe (ValueList Text)
..}