module Stratosphere.EC2.EC2Fleet.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-ec2-ec2fleet-memorymibrequest.html>
    MemoryMiBRequestProperty {MemoryMiBRequestProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-memorymibrequest.html#cfn-ec2-ec2fleet-memorymibrequest-max>
                              MemoryMiBRequestProperty -> Maybe (Value Integer)
max :: (Prelude.Maybe (Value Prelude.Integer)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ec2fleet-memorymibrequest.html#cfn-ec2-ec2fleet-memorymibrequest-min>
                              MemoryMiBRequestProperty -> Maybe (Value Integer)
min :: (Prelude.Maybe (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 :: MemoryMiBRequestProperty
mkMemoryMiBRequestProperty :: MemoryMiBRequestProperty
mkMemoryMiBRequestProperty
  = MemoryMiBRequestProperty
      {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 MemoryMiBRequestProperty where
  toResourceProperties :: MemoryMiBRequestProperty -> ResourceProperties
toResourceProperties MemoryMiBRequestProperty {Maybe (Value Integer)
()
haddock_workaround_ :: MemoryMiBRequestProperty -> ()
max :: MemoryMiBRequestProperty -> Maybe (Value Integer)
min :: MemoryMiBRequestProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (Value Integer)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::EC2Fleet.MemoryMiBRequest",
         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 MemoryMiBRequestProperty where
  toJSON :: MemoryMiBRequestProperty -> Value
toJSON MemoryMiBRequestProperty {Maybe (Value Integer)
()
haddock_workaround_ :: MemoryMiBRequestProperty -> ()
max :: MemoryMiBRequestProperty -> Maybe (Value Integer)
min :: MemoryMiBRequestProperty -> 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" MemoryMiBRequestProperty where
  type PropertyType "Max" MemoryMiBRequestProperty = Value Prelude.Integer
  set :: PropertyType "Max" MemoryMiBRequestProperty
-> MemoryMiBRequestProperty -> MemoryMiBRequestProperty
set PropertyType "Max" MemoryMiBRequestProperty
newValue MemoryMiBRequestProperty {Maybe (Value Integer)
()
haddock_workaround_ :: MemoryMiBRequestProperty -> ()
max :: MemoryMiBRequestProperty -> Maybe (Value Integer)
min :: MemoryMiBRequestProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (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, Maybe (Value Integer)
()
haddock_workaround_ :: ()
min :: Maybe (Value Integer)
haddock_workaround_ :: ()
min :: Maybe (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)
()
haddock_workaround_ :: MemoryMiBRequestProperty -> ()
max :: MemoryMiBRequestProperty -> Maybe (Value Integer)
min :: MemoryMiBRequestProperty -> Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Maybe (Value Integer)
..}
    = MemoryMiBRequestProperty {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" MemoryMiBRequestProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
..}