module Stratosphere.EC2.LaunchTemplate.MemoryMiBProperty (
        MemoryMiBProperty(..), mkMemoryMiBProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MemoryMiBProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-memorymib.html>
    MemoryMiBProperty {MemoryMiBProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-memorymib.html#cfn-ec2-launchtemplate-memorymib-max>
                       MemoryMiBProperty -> Maybe (Value Integer)
max :: (Prelude.Maybe (Value Prelude.Integer)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-memorymib.html#cfn-ec2-launchtemplate-memorymib-min>
                       MemoryMiBProperty -> Maybe (Value Integer)
min :: (Prelude.Maybe (Value Prelude.Integer))}
  deriving stock (MemoryMiBProperty -> MemoryMiBProperty -> Bool
(MemoryMiBProperty -> MemoryMiBProperty -> Bool)
-> (MemoryMiBProperty -> MemoryMiBProperty -> Bool)
-> Eq MemoryMiBProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MemoryMiBProperty -> MemoryMiBProperty -> Bool
== :: MemoryMiBProperty -> MemoryMiBProperty -> Bool
$c/= :: MemoryMiBProperty -> MemoryMiBProperty -> Bool
/= :: MemoryMiBProperty -> MemoryMiBProperty -> Bool
Prelude.Eq, Int -> MemoryMiBProperty -> ShowS
[MemoryMiBProperty] -> ShowS
MemoryMiBProperty -> String
(Int -> MemoryMiBProperty -> ShowS)
-> (MemoryMiBProperty -> String)
-> ([MemoryMiBProperty] -> ShowS)
-> Show MemoryMiBProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MemoryMiBProperty -> ShowS
showsPrec :: Int -> MemoryMiBProperty -> ShowS
$cshow :: MemoryMiBProperty -> String
show :: MemoryMiBProperty -> String
$cshowList :: [MemoryMiBProperty] -> ShowS
showList :: [MemoryMiBProperty] -> ShowS
Prelude.Show)
mkMemoryMiBProperty :: MemoryMiBProperty
mkMemoryMiBProperty :: MemoryMiBProperty
mkMemoryMiBProperty
  = MemoryMiBProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), max :: Maybe (Value Integer)
max = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       min :: Maybe (Value Integer)
min = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MemoryMiBProperty where
  toResourceProperties :: MemoryMiBProperty -> ResourceProperties
toResourceProperties MemoryMiBProperty {Maybe (Value Integer)
()
haddock_workaround_ :: MemoryMiBProperty -> ()
max :: MemoryMiBProperty -> Maybe (Value Integer)
min :: MemoryMiBProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::LaunchTemplate.MemoryMiB",
         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 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,
                            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
"Min" (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)
min])}
instance JSON.ToJSON MemoryMiBProperty where
  toJSON :: MemoryMiBProperty -> Value
toJSON MemoryMiBProperty {Maybe (Value Integer)
()
haddock_workaround_ :: MemoryMiBProperty -> ()
max :: MemoryMiBProperty -> Maybe (Value Integer)
min :: MemoryMiBProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: 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 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,
               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
"Min" (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)
min]))
instance Property "Max" MemoryMiBProperty where
  type PropertyType "Max" MemoryMiBProperty = Value Prelude.Integer
  set :: PropertyType "Max" MemoryMiBProperty
-> MemoryMiBProperty -> MemoryMiBProperty
set PropertyType "Max" MemoryMiBProperty
newValue MemoryMiBProperty {Maybe (Value Integer)
()
haddock_workaround_ :: MemoryMiBProperty -> ()
max :: MemoryMiBProperty -> Maybe (Value Integer)
min :: MemoryMiBProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (Value Integer)
..}
    = MemoryMiBProperty {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" MemoryMiBProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
min :: Maybe (Value Integer)
haddock_workaround_ :: ()
min :: Maybe (Value Integer)
..}
instance Property "Min" MemoryMiBProperty where
  type PropertyType "Min" MemoryMiBProperty = Value Prelude.Integer
  set :: PropertyType "Min" MemoryMiBProperty
-> MemoryMiBProperty -> MemoryMiBProperty
set PropertyType "Min" MemoryMiBProperty
newValue MemoryMiBProperty {Maybe (Value Integer)
()
haddock_workaround_ :: MemoryMiBProperty -> ()
max :: MemoryMiBProperty -> Maybe (Value Integer)
min :: MemoryMiBProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (Value Integer)
..}
    = MemoryMiBProperty {min :: Maybe (Value Integer)
min = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Min" MemoryMiBProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
..}