module Stratosphere.GameLift.GameServerGroup.InstanceDefinitionProperty (
InstanceDefinitionProperty(..), mkInstanceDefinitionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InstanceDefinitionProperty
=
InstanceDefinitionProperty {InstanceDefinitionProperty -> ()
haddock_workaround_ :: (),
InstanceDefinitionProperty -> Value Text
instanceType :: (Value Prelude.Text),
InstanceDefinitionProperty -> Maybe (Value Text)
weightedCapacity :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (InstanceDefinitionProperty -> InstanceDefinitionProperty -> Bool
(InstanceDefinitionProperty -> InstanceDefinitionProperty -> Bool)
-> (InstanceDefinitionProperty
-> InstanceDefinitionProperty -> Bool)
-> Eq InstanceDefinitionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InstanceDefinitionProperty -> InstanceDefinitionProperty -> Bool
== :: InstanceDefinitionProperty -> InstanceDefinitionProperty -> Bool
$c/= :: InstanceDefinitionProperty -> InstanceDefinitionProperty -> Bool
/= :: InstanceDefinitionProperty -> InstanceDefinitionProperty -> Bool
Prelude.Eq, Int -> InstanceDefinitionProperty -> ShowS
[InstanceDefinitionProperty] -> ShowS
InstanceDefinitionProperty -> String
(Int -> InstanceDefinitionProperty -> ShowS)
-> (InstanceDefinitionProperty -> String)
-> ([InstanceDefinitionProperty] -> ShowS)
-> Show InstanceDefinitionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InstanceDefinitionProperty -> ShowS
showsPrec :: Int -> InstanceDefinitionProperty -> ShowS
$cshow :: InstanceDefinitionProperty -> String
show :: InstanceDefinitionProperty -> String
$cshowList :: [InstanceDefinitionProperty] -> ShowS
showList :: [InstanceDefinitionProperty] -> ShowS
Prelude.Show)
mkInstanceDefinitionProperty ::
Value Prelude.Text -> InstanceDefinitionProperty
mkInstanceDefinitionProperty :: Value Text -> InstanceDefinitionProperty
mkInstanceDefinitionProperty Value Text
instanceType
= InstanceDefinitionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), instanceType :: Value Text
instanceType = Value Text
instanceType,
weightedCapacity :: Maybe (Value Text)
weightedCapacity = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InstanceDefinitionProperty where
toResourceProperties :: InstanceDefinitionProperty -> ResourceProperties
toResourceProperties InstanceDefinitionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InstanceDefinitionProperty -> ()
instanceType :: InstanceDefinitionProperty -> Value Text
weightedCapacity :: InstanceDefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceType :: Value Text
weightedCapacity :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GameLift::GameServerGroup.InstanceDefinition",
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
"InstanceType" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
instanceType]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"WeightedCapacity" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
weightedCapacity]))}
instance JSON.ToJSON InstanceDefinitionProperty where
toJSON :: InstanceDefinitionProperty -> Value
toJSON InstanceDefinitionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InstanceDefinitionProperty -> ()
instanceType :: InstanceDefinitionProperty -> Value Text
weightedCapacity :: InstanceDefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceType :: Value Text
weightedCapacity :: Maybe (Value Text)
..}
= [(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
"InstanceType" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
instanceType]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"WeightedCapacity" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
weightedCapacity])))
instance Property "InstanceType" InstanceDefinitionProperty where
type PropertyType "InstanceType" InstanceDefinitionProperty = Value Prelude.Text
set :: PropertyType "InstanceType" InstanceDefinitionProperty
-> InstanceDefinitionProperty -> InstanceDefinitionProperty
set PropertyType "InstanceType" InstanceDefinitionProperty
newValue InstanceDefinitionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InstanceDefinitionProperty -> ()
instanceType :: InstanceDefinitionProperty -> Value Text
weightedCapacity :: InstanceDefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceType :: Value Text
weightedCapacity :: Maybe (Value Text)
..}
= InstanceDefinitionProperty {instanceType :: Value Text
instanceType = PropertyType "InstanceType" InstanceDefinitionProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
weightedCapacity :: Maybe (Value Text)
haddock_workaround_ :: ()
weightedCapacity :: Maybe (Value Text)
..}
instance Property "WeightedCapacity" InstanceDefinitionProperty where
type PropertyType "WeightedCapacity" InstanceDefinitionProperty = Value Prelude.Text
set :: PropertyType "WeightedCapacity" InstanceDefinitionProperty
-> InstanceDefinitionProperty -> InstanceDefinitionProperty
set PropertyType "WeightedCapacity" InstanceDefinitionProperty
newValue InstanceDefinitionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: InstanceDefinitionProperty -> ()
instanceType :: InstanceDefinitionProperty -> Value Text
weightedCapacity :: InstanceDefinitionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
instanceType :: Value Text
weightedCapacity :: Maybe (Value Text)
..}
= InstanceDefinitionProperty
{weightedCapacity :: Maybe (Value Text)
weightedCapacity = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "WeightedCapacity" InstanceDefinitionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
instanceType :: Value Text
haddock_workaround_ :: ()
instanceType :: Value Text
..}