module Stratosphere.Batch.ServiceEnvironment.CapacityLimitProperty (
CapacityLimitProperty(..), mkCapacityLimitProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CapacityLimitProperty
=
CapacityLimitProperty {CapacityLimitProperty -> ()
haddock_workaround_ :: (),
CapacityLimitProperty -> Maybe (Value Text)
capacityUnit :: (Prelude.Maybe (Value Prelude.Text)),
CapacityLimitProperty -> Maybe (Value Integer)
maxCapacity :: (Prelude.Maybe (Value Prelude.Integer))}
deriving stock (CapacityLimitProperty -> CapacityLimitProperty -> Bool
(CapacityLimitProperty -> CapacityLimitProperty -> Bool)
-> (CapacityLimitProperty -> CapacityLimitProperty -> Bool)
-> Eq CapacityLimitProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CapacityLimitProperty -> CapacityLimitProperty -> Bool
== :: CapacityLimitProperty -> CapacityLimitProperty -> Bool
$c/= :: CapacityLimitProperty -> CapacityLimitProperty -> Bool
/= :: CapacityLimitProperty -> CapacityLimitProperty -> Bool
Prelude.Eq, Int -> CapacityLimitProperty -> ShowS
[CapacityLimitProperty] -> ShowS
CapacityLimitProperty -> String
(Int -> CapacityLimitProperty -> ShowS)
-> (CapacityLimitProperty -> String)
-> ([CapacityLimitProperty] -> ShowS)
-> Show CapacityLimitProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CapacityLimitProperty -> ShowS
showsPrec :: Int -> CapacityLimitProperty -> ShowS
$cshow :: CapacityLimitProperty -> String
show :: CapacityLimitProperty -> String
$cshowList :: [CapacityLimitProperty] -> ShowS
showList :: [CapacityLimitProperty] -> ShowS
Prelude.Show)
mkCapacityLimitProperty :: CapacityLimitProperty
mkCapacityLimitProperty :: CapacityLimitProperty
mkCapacityLimitProperty
= CapacityLimitProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), capacityUnit :: Maybe (Value Text)
capacityUnit = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
maxCapacity :: Maybe (Value Integer)
maxCapacity = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CapacityLimitProperty where
toResourceProperties :: CapacityLimitProperty -> ResourceProperties
toResourceProperties CapacityLimitProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CapacityLimitProperty -> ()
capacityUnit :: CapacityLimitProperty -> Maybe (Value Text)
maxCapacity :: CapacityLimitProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
capacityUnit :: Maybe (Value Text)
maxCapacity :: Maybe (Value Integer)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Batch::ServiceEnvironment.CapacityLimit",
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 -> Value 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
"CapacityUnit" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
capacityUnit,
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
"MaxCapacity" (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)
maxCapacity])}
instance JSON.ToJSON CapacityLimitProperty where
toJSON :: CapacityLimitProperty -> Value
toJSON CapacityLimitProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CapacityLimitProperty -> ()
capacityUnit :: CapacityLimitProperty -> Maybe (Value Text)
maxCapacity :: CapacityLimitProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
capacityUnit :: Maybe (Value Text)
maxCapacity :: 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 -> Value 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
"CapacityUnit" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
capacityUnit,
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
"MaxCapacity" (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)
maxCapacity]))
instance Property "CapacityUnit" CapacityLimitProperty where
type PropertyType "CapacityUnit" CapacityLimitProperty = Value Prelude.Text
set :: PropertyType "CapacityUnit" CapacityLimitProperty
-> CapacityLimitProperty -> CapacityLimitProperty
set PropertyType "CapacityUnit" CapacityLimitProperty
newValue CapacityLimitProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CapacityLimitProperty -> ()
capacityUnit :: CapacityLimitProperty -> Maybe (Value Text)
maxCapacity :: CapacityLimitProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
capacityUnit :: Maybe (Value Text)
maxCapacity :: Maybe (Value Integer)
..}
= CapacityLimitProperty {capacityUnit :: Maybe (Value Text)
capacityUnit = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CapacityUnit" CapacityLimitProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
maxCapacity :: Maybe (Value Integer)
haddock_workaround_ :: ()
maxCapacity :: Maybe (Value Integer)
..}
instance Property "MaxCapacity" CapacityLimitProperty where
type PropertyType "MaxCapacity" CapacityLimitProperty = Value Prelude.Integer
set :: PropertyType "MaxCapacity" CapacityLimitProperty
-> CapacityLimitProperty -> CapacityLimitProperty
set PropertyType "MaxCapacity" CapacityLimitProperty
newValue CapacityLimitProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: CapacityLimitProperty -> ()
capacityUnit :: CapacityLimitProperty -> Maybe (Value Text)
maxCapacity :: CapacityLimitProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
capacityUnit :: Maybe (Value Text)
maxCapacity :: Maybe (Value Integer)
..}
= CapacityLimitProperty {maxCapacity :: Maybe (Value Integer)
maxCapacity = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxCapacity" CapacityLimitProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
capacityUnit :: Maybe (Value Text)
haddock_workaround_ :: ()
capacityUnit :: Maybe (Value Text)
..}