module Stratosphere.GameLift.ContainerFleet.DeploymentConfigurationProperty (
DeploymentConfigurationProperty(..),
mkDeploymentConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DeploymentConfigurationProperty
=
DeploymentConfigurationProperty {DeploymentConfigurationProperty -> ()
haddock_workaround_ :: (),
DeploymentConfigurationProperty -> Maybe (Value Text)
impairmentStrategy :: (Prelude.Maybe (Value Prelude.Text)),
DeploymentConfigurationProperty -> Maybe (Value Integer)
minimumHealthyPercentage :: (Prelude.Maybe (Value Prelude.Integer)),
DeploymentConfigurationProperty -> Maybe (Value Text)
protectionStrategy :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (DeploymentConfigurationProperty
-> DeploymentConfigurationProperty -> Bool
(DeploymentConfigurationProperty
-> DeploymentConfigurationProperty -> Bool)
-> (DeploymentConfigurationProperty
-> DeploymentConfigurationProperty -> Bool)
-> Eq DeploymentConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeploymentConfigurationProperty
-> DeploymentConfigurationProperty -> Bool
== :: DeploymentConfigurationProperty
-> DeploymentConfigurationProperty -> Bool
$c/= :: DeploymentConfigurationProperty
-> DeploymentConfigurationProperty -> Bool
/= :: DeploymentConfigurationProperty
-> DeploymentConfigurationProperty -> Bool
Prelude.Eq, Int -> DeploymentConfigurationProperty -> ShowS
[DeploymentConfigurationProperty] -> ShowS
DeploymentConfigurationProperty -> String
(Int -> DeploymentConfigurationProperty -> ShowS)
-> (DeploymentConfigurationProperty -> String)
-> ([DeploymentConfigurationProperty] -> ShowS)
-> Show DeploymentConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeploymentConfigurationProperty -> ShowS
showsPrec :: Int -> DeploymentConfigurationProperty -> ShowS
$cshow :: DeploymentConfigurationProperty -> String
show :: DeploymentConfigurationProperty -> String
$cshowList :: [DeploymentConfigurationProperty] -> ShowS
showList :: [DeploymentConfigurationProperty] -> ShowS
Prelude.Show)
mkDeploymentConfigurationProperty ::
DeploymentConfigurationProperty
mkDeploymentConfigurationProperty :: DeploymentConfigurationProperty
mkDeploymentConfigurationProperty
= DeploymentConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), impairmentStrategy :: Maybe (Value Text)
impairmentStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
minimumHealthyPercentage :: Maybe (Value Integer)
minimumHealthyPercentage = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
protectionStrategy :: Maybe (Value Text)
protectionStrategy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DeploymentConfigurationProperty where
toResourceProperties :: DeploymentConfigurationProperty -> ResourceProperties
toResourceProperties DeploymentConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DeploymentConfigurationProperty -> ()
impairmentStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
minimumHealthyPercentage :: DeploymentConfigurationProperty -> Maybe (Value Integer)
protectionStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
impairmentStrategy :: Maybe (Value Text)
minimumHealthyPercentage :: Maybe (Value Integer)
protectionStrategy :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::GameLift::ContainerFleet.DeploymentConfiguration",
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 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
"ImpairmentStrategy" (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)
impairmentStrategy,
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
"MinimumHealthyPercentage"
(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)
minimumHealthyPercentage,
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
"ProtectionStrategy" (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)
protectionStrategy])}
instance JSON.ToJSON DeploymentConfigurationProperty where
toJSON :: DeploymentConfigurationProperty -> Value
toJSON DeploymentConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DeploymentConfigurationProperty -> ()
impairmentStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
minimumHealthyPercentage :: DeploymentConfigurationProperty -> Maybe (Value Integer)
protectionStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
impairmentStrategy :: Maybe (Value Text)
minimumHealthyPercentage :: Maybe (Value Integer)
protectionStrategy :: Maybe (Value Text)
..}
= [(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 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
"ImpairmentStrategy" (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)
impairmentStrategy,
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
"MinimumHealthyPercentage"
(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)
minimumHealthyPercentage,
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
"ProtectionStrategy" (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)
protectionStrategy]))
instance Property "ImpairmentStrategy" DeploymentConfigurationProperty where
type PropertyType "ImpairmentStrategy" DeploymentConfigurationProperty = Value Prelude.Text
set :: PropertyType "ImpairmentStrategy" DeploymentConfigurationProperty
-> DeploymentConfigurationProperty
-> DeploymentConfigurationProperty
set PropertyType "ImpairmentStrategy" DeploymentConfigurationProperty
newValue DeploymentConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DeploymentConfigurationProperty -> ()
impairmentStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
minimumHealthyPercentage :: DeploymentConfigurationProperty -> Maybe (Value Integer)
protectionStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
impairmentStrategy :: Maybe (Value Text)
minimumHealthyPercentage :: Maybe (Value Integer)
protectionStrategy :: Maybe (Value Text)
..}
= DeploymentConfigurationProperty
{impairmentStrategy :: Maybe (Value Text)
impairmentStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ImpairmentStrategy" DeploymentConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
minimumHealthyPercentage :: Maybe (Value Integer)
protectionStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
minimumHealthyPercentage :: Maybe (Value Integer)
protectionStrategy :: Maybe (Value Text)
..}
instance Property "MinimumHealthyPercentage" DeploymentConfigurationProperty where
type PropertyType "MinimumHealthyPercentage" DeploymentConfigurationProperty = Value Prelude.Integer
set :: PropertyType
"MinimumHealthyPercentage" DeploymentConfigurationProperty
-> DeploymentConfigurationProperty
-> DeploymentConfigurationProperty
set PropertyType
"MinimumHealthyPercentage" DeploymentConfigurationProperty
newValue DeploymentConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DeploymentConfigurationProperty -> ()
impairmentStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
minimumHealthyPercentage :: DeploymentConfigurationProperty -> Maybe (Value Integer)
protectionStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
impairmentStrategy :: Maybe (Value Text)
minimumHealthyPercentage :: Maybe (Value Integer)
protectionStrategy :: Maybe (Value Text)
..}
= DeploymentConfigurationProperty
{minimumHealthyPercentage :: Maybe (Value Integer)
minimumHealthyPercentage = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"MinimumHealthyPercentage" DeploymentConfigurationProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
impairmentStrategy :: Maybe (Value Text)
protectionStrategy :: Maybe (Value Text)
haddock_workaround_ :: ()
impairmentStrategy :: Maybe (Value Text)
protectionStrategy :: Maybe (Value Text)
..}
instance Property "ProtectionStrategy" DeploymentConfigurationProperty where
type PropertyType "ProtectionStrategy" DeploymentConfigurationProperty = Value Prelude.Text
set :: PropertyType "ProtectionStrategy" DeploymentConfigurationProperty
-> DeploymentConfigurationProperty
-> DeploymentConfigurationProperty
set PropertyType "ProtectionStrategy" DeploymentConfigurationProperty
newValue DeploymentConfigurationProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: DeploymentConfigurationProperty -> ()
impairmentStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
minimumHealthyPercentage :: DeploymentConfigurationProperty -> Maybe (Value Integer)
protectionStrategy :: DeploymentConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
impairmentStrategy :: Maybe (Value Text)
minimumHealthyPercentage :: Maybe (Value Integer)
protectionStrategy :: Maybe (Value Text)
..}
= DeploymentConfigurationProperty
{protectionStrategy :: Maybe (Value Text)
protectionStrategy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProtectionStrategy" DeploymentConfigurationProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
impairmentStrategy :: Maybe (Value Text)
minimumHealthyPercentage :: Maybe (Value Integer)
haddock_workaround_ :: ()
impairmentStrategy :: Maybe (Value Text)
minimumHealthyPercentage :: Maybe (Value Integer)
..}