module Stratosphere.ApiGateway.Deployment.DeploymentCanarySettingsProperty (
DeploymentCanarySettingsProperty(..),
mkDeploymentCanarySettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DeploymentCanarySettingsProperty
=
DeploymentCanarySettingsProperty {DeploymentCanarySettingsProperty -> ()
haddock_workaround_ :: (),
DeploymentCanarySettingsProperty -> Maybe (Value Double)
percentTraffic :: (Prelude.Maybe (Value Prelude.Double)),
DeploymentCanarySettingsProperty -> Maybe (Map Text (Value Text))
stageVariableOverrides :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
DeploymentCanarySettingsProperty -> Maybe (Value Bool)
useStageCache :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty -> Bool
(DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty -> Bool)
-> (DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty -> Bool)
-> Eq DeploymentCanarySettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty -> Bool
== :: DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty -> Bool
$c/= :: DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty -> Bool
/= :: DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty -> Bool
Prelude.Eq, Int -> DeploymentCanarySettingsProperty -> ShowS
[DeploymentCanarySettingsProperty] -> ShowS
DeploymentCanarySettingsProperty -> String
(Int -> DeploymentCanarySettingsProperty -> ShowS)
-> (DeploymentCanarySettingsProperty -> String)
-> ([DeploymentCanarySettingsProperty] -> ShowS)
-> Show DeploymentCanarySettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeploymentCanarySettingsProperty -> ShowS
showsPrec :: Int -> DeploymentCanarySettingsProperty -> ShowS
$cshow :: DeploymentCanarySettingsProperty -> String
show :: DeploymentCanarySettingsProperty -> String
$cshowList :: [DeploymentCanarySettingsProperty] -> ShowS
showList :: [DeploymentCanarySettingsProperty] -> ShowS
Prelude.Show)
mkDeploymentCanarySettingsProperty ::
DeploymentCanarySettingsProperty
mkDeploymentCanarySettingsProperty :: DeploymentCanarySettingsProperty
mkDeploymentCanarySettingsProperty
= DeploymentCanarySettingsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), percentTraffic :: Maybe (Value Double)
percentTraffic = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
stageVariableOverrides :: Maybe (Map Text (Value Text))
stageVariableOverrides = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing,
useStageCache :: Maybe (Value Bool)
useStageCache = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DeploymentCanarySettingsProperty where
toResourceProperties :: DeploymentCanarySettingsProperty -> ResourceProperties
toResourceProperties DeploymentCanarySettingsProperty {Maybe (Map Text (Value Text))
Maybe (Value Bool)
Maybe (Value Double)
()
haddock_workaround_ :: DeploymentCanarySettingsProperty -> ()
percentTraffic :: DeploymentCanarySettingsProperty -> Maybe (Value Double)
stageVariableOverrides :: DeploymentCanarySettingsProperty -> Maybe (Map Text (Value Text))
useStageCache :: DeploymentCanarySettingsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
percentTraffic :: Maybe (Value Double)
stageVariableOverrides :: Maybe (Map Text (Value Text))
useStageCache :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGateway::Deployment.DeploymentCanarySettings",
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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PercentTraffic" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
percentTraffic,
Key -> Map Text (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
"StageVariableOverrides"
(Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
stageVariableOverrides,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UseStageCache" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
useStageCache])}
instance JSON.ToJSON DeploymentCanarySettingsProperty where
toJSON :: DeploymentCanarySettingsProperty -> Value
toJSON DeploymentCanarySettingsProperty {Maybe (Map Text (Value Text))
Maybe (Value Bool)
Maybe (Value Double)
()
haddock_workaround_ :: DeploymentCanarySettingsProperty -> ()
percentTraffic :: DeploymentCanarySettingsProperty -> Maybe (Value Double)
stageVariableOverrides :: DeploymentCanarySettingsProperty -> Maybe (Map Text (Value Text))
useStageCache :: DeploymentCanarySettingsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
percentTraffic :: Maybe (Value Double)
stageVariableOverrides :: Maybe (Map Text (Value Text))
useStageCache :: Maybe (Value Bool)
..}
= [(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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PercentTraffic" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
percentTraffic,
Key -> Map Text (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
"StageVariableOverrides"
(Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
stageVariableOverrides,
Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"UseStageCache" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
useStageCache]))
instance Property "PercentTraffic" DeploymentCanarySettingsProperty where
type PropertyType "PercentTraffic" DeploymentCanarySettingsProperty = Value Prelude.Double
set :: PropertyType "PercentTraffic" DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty
set PropertyType "PercentTraffic" DeploymentCanarySettingsProperty
newValue DeploymentCanarySettingsProperty {Maybe (Map Text (Value Text))
Maybe (Value Bool)
Maybe (Value Double)
()
haddock_workaround_ :: DeploymentCanarySettingsProperty -> ()
percentTraffic :: DeploymentCanarySettingsProperty -> Maybe (Value Double)
stageVariableOverrides :: DeploymentCanarySettingsProperty -> Maybe (Map Text (Value Text))
useStageCache :: DeploymentCanarySettingsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
percentTraffic :: Maybe (Value Double)
stageVariableOverrides :: Maybe (Map Text (Value Text))
useStageCache :: Maybe (Value Bool)
..}
= DeploymentCanarySettingsProperty
{percentTraffic :: Maybe (Value Double)
percentTraffic = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PercentTraffic" DeploymentCanarySettingsProperty
Value Double
newValue, Maybe (Map Text (Value Text))
Maybe (Value Bool)
()
haddock_workaround_ :: ()
stageVariableOverrides :: Maybe (Map Text (Value Text))
useStageCache :: Maybe (Value Bool)
haddock_workaround_ :: ()
stageVariableOverrides :: Maybe (Map Text (Value Text))
useStageCache :: Maybe (Value Bool)
..}
instance Property "StageVariableOverrides" DeploymentCanarySettingsProperty where
type PropertyType "StageVariableOverrides" DeploymentCanarySettingsProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType
"StageVariableOverrides" DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty
set PropertyType
"StageVariableOverrides" DeploymentCanarySettingsProperty
newValue DeploymentCanarySettingsProperty {Maybe (Map Text (Value Text))
Maybe (Value Bool)
Maybe (Value Double)
()
haddock_workaround_ :: DeploymentCanarySettingsProperty -> ()
percentTraffic :: DeploymentCanarySettingsProperty -> Maybe (Value Double)
stageVariableOverrides :: DeploymentCanarySettingsProperty -> Maybe (Map Text (Value Text))
useStageCache :: DeploymentCanarySettingsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
percentTraffic :: Maybe (Value Double)
stageVariableOverrides :: Maybe (Map Text (Value Text))
useStageCache :: Maybe (Value Bool)
..}
= DeploymentCanarySettingsProperty
{stageVariableOverrides :: Maybe (Map Text (Value Text))
stageVariableOverrides = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType
"StageVariableOverrides" DeploymentCanarySettingsProperty
newValue, Maybe (Value Bool)
Maybe (Value Double)
()
haddock_workaround_ :: ()
percentTraffic :: Maybe (Value Double)
useStageCache :: Maybe (Value Bool)
haddock_workaround_ :: ()
percentTraffic :: Maybe (Value Double)
useStageCache :: Maybe (Value Bool)
..}
instance Property "UseStageCache" DeploymentCanarySettingsProperty where
type PropertyType "UseStageCache" DeploymentCanarySettingsProperty = Value Prelude.Bool
set :: PropertyType "UseStageCache" DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty
-> DeploymentCanarySettingsProperty
set PropertyType "UseStageCache" DeploymentCanarySettingsProperty
newValue DeploymentCanarySettingsProperty {Maybe (Map Text (Value Text))
Maybe (Value Bool)
Maybe (Value Double)
()
haddock_workaround_ :: DeploymentCanarySettingsProperty -> ()
percentTraffic :: DeploymentCanarySettingsProperty -> Maybe (Value Double)
stageVariableOverrides :: DeploymentCanarySettingsProperty -> Maybe (Map Text (Value Text))
useStageCache :: DeploymentCanarySettingsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
percentTraffic :: Maybe (Value Double)
stageVariableOverrides :: Maybe (Map Text (Value Text))
useStageCache :: Maybe (Value Bool)
..}
= DeploymentCanarySettingsProperty
{useStageCache :: Maybe (Value Bool)
useStageCache = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UseStageCache" DeploymentCanarySettingsProperty
Value Bool
newValue, Maybe (Map Text (Value Text))
Maybe (Value Double)
()
haddock_workaround_ :: ()
percentTraffic :: Maybe (Value Double)
stageVariableOverrides :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
percentTraffic :: Maybe (Value Double)
stageVariableOverrides :: Maybe (Map Text (Value Text))
..}