module Stratosphere.ECS.CapacityProvider.MemoryMiBRequestProperty (
        MemoryMiBRequestProperty(..), mkMemoryMiBRequestProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MemoryMiBRequestProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html>
    MemoryMiBRequestProperty {MemoryMiBRequestProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html#cfn-ecs-capacityprovider-memorymibrequest-max>
                              MemoryMiBRequestProperty -> Maybe (Value Integer)
max :: (Prelude.Maybe (Value Prelude.Integer)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-memorymibrequest.html#cfn-ecs-capacityprovider-memorymibrequest-min>
                              MemoryMiBRequestProperty -> Value Integer
min :: (Value Prelude.Integer)}
  deriving stock (MemoryMiBRequestProperty -> MemoryMiBRequestProperty -> Bool
(MemoryMiBRequestProperty -> MemoryMiBRequestProperty -> Bool)
-> (MemoryMiBRequestProperty -> MemoryMiBRequestProperty -> Bool)
-> Eq MemoryMiBRequestProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MemoryMiBRequestProperty -> MemoryMiBRequestProperty -> Bool
== :: MemoryMiBRequestProperty -> MemoryMiBRequestProperty -> Bool
$c/= :: MemoryMiBRequestProperty -> MemoryMiBRequestProperty -> Bool
/= :: MemoryMiBRequestProperty -> MemoryMiBRequestProperty -> Bool
Prelude.Eq, Int -> MemoryMiBRequestProperty -> ShowS
[MemoryMiBRequestProperty] -> ShowS
MemoryMiBRequestProperty -> String
(Int -> MemoryMiBRequestProperty -> ShowS)
-> (MemoryMiBRequestProperty -> String)
-> ([MemoryMiBRequestProperty] -> ShowS)
-> Show MemoryMiBRequestProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MemoryMiBRequestProperty -> ShowS
showsPrec :: Int -> MemoryMiBRequestProperty -> ShowS
$cshow :: MemoryMiBRequestProperty -> String
show :: MemoryMiBRequestProperty -> String
$cshowList :: [MemoryMiBRequestProperty] -> ShowS
showList :: [MemoryMiBRequestProperty] -> ShowS
Prelude.Show)
mkMemoryMiBRequestProperty ::
  Value Prelude.Integer -> MemoryMiBRequestProperty
mkMemoryMiBRequestProperty :: Value Integer -> MemoryMiBRequestProperty
mkMemoryMiBRequestProperty Value Integer
min
  = MemoryMiBRequestProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), min :: Value Integer
min = Value Integer
min, max :: Maybe (Value Integer)
max = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MemoryMiBRequestProperty where
  toResourceProperties :: MemoryMiBRequestProperty -> ResourceProperties
toResourceProperties MemoryMiBRequestProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: MemoryMiBRequestProperty -> ()
max :: MemoryMiBRequestProperty -> Maybe (Value Integer)
min :: MemoryMiBRequestProperty -> Value Integer
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Value Integer
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::CapacityProvider.MemoryMiBRequest",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Min" 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..= Value Integer
min]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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
"Max" (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)
max]))}
instance JSON.ToJSON MemoryMiBRequestProperty where
  toJSON :: MemoryMiBRequestProperty -> Value
toJSON MemoryMiBRequestProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: MemoryMiBRequestProperty -> ()
max :: MemoryMiBRequestProperty -> Maybe (Value Integer)
min :: MemoryMiBRequestProperty -> Value Integer
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Value Integer
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Min" 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..= Value Integer
min]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [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
"Max" (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)
max])))
instance Property "Max" MemoryMiBRequestProperty where
  type PropertyType "Max" MemoryMiBRequestProperty = Value Prelude.Integer
  set :: PropertyType "Max" MemoryMiBRequestProperty
-> MemoryMiBRequestProperty -> MemoryMiBRequestProperty
set PropertyType "Max" MemoryMiBRequestProperty
newValue MemoryMiBRequestProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: MemoryMiBRequestProperty -> ()
max :: MemoryMiBRequestProperty -> Maybe (Value Integer)
min :: MemoryMiBRequestProperty -> Value Integer
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Value Integer
..}
    = MemoryMiBRequestProperty {max :: Maybe (Value Integer)
max = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Max" MemoryMiBRequestProperty
Value Integer
newValue, ()
Value Integer
haddock_workaround_ :: ()
min :: Value Integer
haddock_workaround_ :: ()
min :: Value Integer
..}
instance Property "Min" MemoryMiBRequestProperty where
  type PropertyType "Min" MemoryMiBRequestProperty = Value Prelude.Integer
  set :: PropertyType "Min" MemoryMiBRequestProperty
-> MemoryMiBRequestProperty -> MemoryMiBRequestProperty
set PropertyType "Min" MemoryMiBRequestProperty
newValue MemoryMiBRequestProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: MemoryMiBRequestProperty -> ()
max :: MemoryMiBRequestProperty -> Maybe (Value Integer)
min :: MemoryMiBRequestProperty -> Value Integer
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Value Integer
..}
    = MemoryMiBRequestProperty {min :: Value Integer
min = PropertyType "Min" MemoryMiBRequestProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
..}