module Stratosphere.GameLift.ContainerFleet.LocationCapacityProperty (
        LocationCapacityProperty(..), mkLocationCapacityProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LocationCapacityProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationcapacity.html>
    LocationCapacityProperty {LocationCapacityProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationcapacity.html#cfn-gamelift-containerfleet-locationcapacity-desiredec2instances>
                              LocationCapacityProperty -> Maybe (Value Integer)
desiredEC2Instances :: (Prelude.Maybe (Value Prelude.Integer)),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationcapacity.html#cfn-gamelift-containerfleet-locationcapacity-maxsize>
                              LocationCapacityProperty -> Value Integer
maxSize :: (Value Prelude.Integer),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-gamelift-containerfleet-locationcapacity.html#cfn-gamelift-containerfleet-locationcapacity-minsize>
                              LocationCapacityProperty -> Value Integer
minSize :: (Value Prelude.Integer)}
  deriving stock (LocationCapacityProperty -> LocationCapacityProperty -> Bool
(LocationCapacityProperty -> LocationCapacityProperty -> Bool)
-> (LocationCapacityProperty -> LocationCapacityProperty -> Bool)
-> Eq LocationCapacityProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LocationCapacityProperty -> LocationCapacityProperty -> Bool
== :: LocationCapacityProperty -> LocationCapacityProperty -> Bool
$c/= :: LocationCapacityProperty -> LocationCapacityProperty -> Bool
/= :: LocationCapacityProperty -> LocationCapacityProperty -> Bool
Prelude.Eq, Int -> LocationCapacityProperty -> ShowS
[LocationCapacityProperty] -> ShowS
LocationCapacityProperty -> String
(Int -> LocationCapacityProperty -> ShowS)
-> (LocationCapacityProperty -> String)
-> ([LocationCapacityProperty] -> ShowS)
-> Show LocationCapacityProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LocationCapacityProperty -> ShowS
showsPrec :: Int -> LocationCapacityProperty -> ShowS
$cshow :: LocationCapacityProperty -> String
show :: LocationCapacityProperty -> String
$cshowList :: [LocationCapacityProperty] -> ShowS
showList :: [LocationCapacityProperty] -> ShowS
Prelude.Show)
mkLocationCapacityProperty ::
  Value Prelude.Integer
  -> Value Prelude.Integer -> LocationCapacityProperty
mkLocationCapacityProperty :: Value Integer -> Value Integer -> LocationCapacityProperty
mkLocationCapacityProperty Value Integer
maxSize Value Integer
minSize
  = LocationCapacityProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), maxSize :: Value Integer
maxSize = Value Integer
maxSize, minSize :: Value Integer
minSize = Value Integer
minSize,
       desiredEC2Instances :: Maybe (Value Integer)
desiredEC2Instances = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LocationCapacityProperty where
  toResourceProperties :: LocationCapacityProperty -> ResourceProperties
toResourceProperties LocationCapacityProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: LocationCapacityProperty -> ()
desiredEC2Instances :: LocationCapacityProperty -> Maybe (Value Integer)
maxSize :: LocationCapacityProperty -> Value Integer
minSize :: LocationCapacityProperty -> Value Integer
haddock_workaround_ :: ()
desiredEC2Instances :: Maybe (Value Integer)
maxSize :: Value Integer
minSize :: Value Integer
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::GameLift::ContainerFleet.LocationCapacity",
         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
"MaxSize" 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
maxSize, Key
"MinSize" 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
minSize]
                           ([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
"DesiredEC2Instances"
                                 (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)
desiredEC2Instances]))}
instance JSON.ToJSON LocationCapacityProperty where
  toJSON :: LocationCapacityProperty -> Value
toJSON LocationCapacityProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: LocationCapacityProperty -> ()
desiredEC2Instances :: LocationCapacityProperty -> Maybe (Value Integer)
maxSize :: LocationCapacityProperty -> Value Integer
minSize :: LocationCapacityProperty -> Value Integer
haddock_workaround_ :: ()
desiredEC2Instances :: Maybe (Value Integer)
maxSize :: Value Integer
minSize :: 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
"MaxSize" 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
maxSize, Key
"MinSize" 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
minSize]
              ([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
"DesiredEC2Instances"
                    (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)
desiredEC2Instances])))
instance Property "DesiredEC2Instances" LocationCapacityProperty where
  type PropertyType "DesiredEC2Instances" LocationCapacityProperty = Value Prelude.Integer
  set :: PropertyType "DesiredEC2Instances" LocationCapacityProperty
-> LocationCapacityProperty -> LocationCapacityProperty
set PropertyType "DesiredEC2Instances" LocationCapacityProperty
newValue LocationCapacityProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: LocationCapacityProperty -> ()
desiredEC2Instances :: LocationCapacityProperty -> Maybe (Value Integer)
maxSize :: LocationCapacityProperty -> Value Integer
minSize :: LocationCapacityProperty -> Value Integer
haddock_workaround_ :: ()
desiredEC2Instances :: Maybe (Value Integer)
maxSize :: Value Integer
minSize :: Value Integer
..}
    = LocationCapacityProperty
        {desiredEC2Instances :: Maybe (Value Integer)
desiredEC2Instances = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DesiredEC2Instances" LocationCapacityProperty
Value Integer
newValue, ()
Value Integer
haddock_workaround_ :: ()
maxSize :: Value Integer
minSize :: Value Integer
haddock_workaround_ :: ()
maxSize :: Value Integer
minSize :: Value Integer
..}
instance Property "MaxSize" LocationCapacityProperty where
  type PropertyType "MaxSize" LocationCapacityProperty = Value Prelude.Integer
  set :: PropertyType "MaxSize" LocationCapacityProperty
-> LocationCapacityProperty -> LocationCapacityProperty
set PropertyType "MaxSize" LocationCapacityProperty
newValue LocationCapacityProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: LocationCapacityProperty -> ()
desiredEC2Instances :: LocationCapacityProperty -> Maybe (Value Integer)
maxSize :: LocationCapacityProperty -> Value Integer
minSize :: LocationCapacityProperty -> Value Integer
haddock_workaround_ :: ()
desiredEC2Instances :: Maybe (Value Integer)
maxSize :: Value Integer
minSize :: Value Integer
..}
    = LocationCapacityProperty {maxSize :: Value Integer
maxSize = PropertyType "MaxSize" LocationCapacityProperty
Value Integer
newValue, Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: ()
desiredEC2Instances :: Maybe (Value Integer)
minSize :: Value Integer
haddock_workaround_ :: ()
desiredEC2Instances :: Maybe (Value Integer)
minSize :: Value Integer
..}
instance Property "MinSize" LocationCapacityProperty where
  type PropertyType "MinSize" LocationCapacityProperty = Value Prelude.Integer
  set :: PropertyType "MinSize" LocationCapacityProperty
-> LocationCapacityProperty -> LocationCapacityProperty
set PropertyType "MinSize" LocationCapacityProperty
newValue LocationCapacityProperty {Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: LocationCapacityProperty -> ()
desiredEC2Instances :: LocationCapacityProperty -> Maybe (Value Integer)
maxSize :: LocationCapacityProperty -> Value Integer
minSize :: LocationCapacityProperty -> Value Integer
haddock_workaround_ :: ()
desiredEC2Instances :: Maybe (Value Integer)
maxSize :: Value Integer
minSize :: Value Integer
..}
    = LocationCapacityProperty {minSize :: Value Integer
minSize = PropertyType "MinSize" LocationCapacityProperty
Value Integer
newValue, Maybe (Value Integer)
()
Value Integer
haddock_workaround_ :: ()
desiredEC2Instances :: Maybe (Value Integer)
maxSize :: Value Integer
haddock_workaround_ :: ()
desiredEC2Instances :: Maybe (Value Integer)
maxSize :: Value Integer
..}