module Stratosphere.Deadline.Fleet.MemoryMiBRangeProperty (
        MemoryMiBRangeProperty(..), mkMemoryMiBRangeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MemoryMiBRangeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-deadline-fleet-memorymibrange.html>
    MemoryMiBRangeProperty {MemoryMiBRangeProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-deadline-fleet-memorymibrange.html#cfn-deadline-fleet-memorymibrange-max>
                            MemoryMiBRangeProperty -> Maybe (Value Integer)
max :: (Prelude.Maybe (Value Prelude.Integer)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-deadline-fleet-memorymibrange.html#cfn-deadline-fleet-memorymibrange-min>
                            MemoryMiBRangeProperty -> Value Integer
min :: (Value Prelude.Integer)}
  deriving stock (MemoryMiBRangeProperty -> MemoryMiBRangeProperty -> Bool
(MemoryMiBRangeProperty -> MemoryMiBRangeProperty -> Bool)
-> (MemoryMiBRangeProperty -> MemoryMiBRangeProperty -> Bool)
-> Eq MemoryMiBRangeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MemoryMiBRangeProperty -> MemoryMiBRangeProperty -> Bool
== :: MemoryMiBRangeProperty -> MemoryMiBRangeProperty -> Bool
$c/= :: MemoryMiBRangeProperty -> MemoryMiBRangeProperty -> Bool
/= :: MemoryMiBRangeProperty -> MemoryMiBRangeProperty -> Bool
Prelude.Eq, Int -> MemoryMiBRangeProperty -> ShowS
[MemoryMiBRangeProperty] -> ShowS
MemoryMiBRangeProperty -> String
(Int -> MemoryMiBRangeProperty -> ShowS)
-> (MemoryMiBRangeProperty -> String)
-> ([MemoryMiBRangeProperty] -> ShowS)
-> Show MemoryMiBRangeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MemoryMiBRangeProperty -> ShowS
showsPrec :: Int -> MemoryMiBRangeProperty -> ShowS
$cshow :: MemoryMiBRangeProperty -> String
show :: MemoryMiBRangeProperty -> String
$cshowList :: [MemoryMiBRangeProperty] -> ShowS
showList :: [MemoryMiBRangeProperty] -> ShowS
Prelude.Show)
mkMemoryMiBRangeProperty ::
  Value Prelude.Integer -> MemoryMiBRangeProperty
mkMemoryMiBRangeProperty :: Value Integer -> MemoryMiBRangeProperty
mkMemoryMiBRangeProperty Value Integer
min
  = MemoryMiBRangeProperty
      {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 MemoryMiBRangeProperty where
  toResourceProperties :: MemoryMiBRangeProperty -> ResourceProperties
toResourceProperties MemoryMiBRangeProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: MemoryMiBRangeProperty -> ()
max :: MemoryMiBRangeProperty -> Maybe (Value Integer)
min :: MemoryMiBRangeProperty -> Value Integer
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Value Integer
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Deadline::Fleet.MemoryMiBRange",
         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 MemoryMiBRangeProperty where
  toJSON :: MemoryMiBRangeProperty -> Value
toJSON MemoryMiBRangeProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: MemoryMiBRangeProperty -> ()
max :: MemoryMiBRangeProperty -> Maybe (Value Integer)
min :: MemoryMiBRangeProperty -> 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" MemoryMiBRangeProperty where
  type PropertyType "Max" MemoryMiBRangeProperty = Value Prelude.Integer
  set :: PropertyType "Max" MemoryMiBRangeProperty
-> MemoryMiBRangeProperty -> MemoryMiBRangeProperty
set PropertyType "Max" MemoryMiBRangeProperty
newValue MemoryMiBRangeProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: MemoryMiBRangeProperty -> ()
max :: MemoryMiBRangeProperty -> Maybe (Value Integer)
min :: MemoryMiBRangeProperty -> Value Integer
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Value Integer
..}
    = MemoryMiBRangeProperty {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" MemoryMiBRangeProperty
Value Integer
newValue, ()
Value Integer
haddock_workaround_ :: ()
min :: Value Integer
haddock_workaround_ :: ()
min :: Value Integer
..}
instance Property "Min" MemoryMiBRangeProperty where
  type PropertyType "Min" MemoryMiBRangeProperty = Value Prelude.Integer
  set :: PropertyType "Min" MemoryMiBRangeProperty
-> MemoryMiBRangeProperty -> MemoryMiBRangeProperty
set PropertyType "Min" MemoryMiBRangeProperty
newValue MemoryMiBRangeProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: MemoryMiBRangeProperty -> ()
max :: MemoryMiBRangeProperty -> Maybe (Value Integer)
min :: MemoryMiBRangeProperty -> Value Integer
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
min :: Value Integer
..}
    = MemoryMiBRangeProperty {min :: Value Integer
min = PropertyType "Min" MemoryMiBRangeProperty
Value Integer
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
haddock_workaround_ :: ()
max :: Maybe (Value Integer)
..}