{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.AppConfig.Types.DeploymentStrategy where
import Amazonka.AppConfig.Types.GrowthType
import Amazonka.AppConfig.Types.ReplicateTo
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data DeploymentStrategy = DeploymentStrategy'
{
DeploymentStrategy -> Maybe Natural
deploymentDurationInMinutes :: Prelude.Maybe Prelude.Natural,
DeploymentStrategy -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
DeploymentStrategy -> Maybe Natural
finalBakeTimeInMinutes :: Prelude.Maybe Prelude.Natural,
DeploymentStrategy -> Maybe Double
growthFactor :: Prelude.Maybe Prelude.Double,
DeploymentStrategy -> Maybe GrowthType
growthType :: Prelude.Maybe GrowthType,
DeploymentStrategy -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
DeploymentStrategy -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
DeploymentStrategy -> Maybe ReplicateTo
replicateTo :: Prelude.Maybe ReplicateTo
}
deriving (DeploymentStrategy -> DeploymentStrategy -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentStrategy -> DeploymentStrategy -> Bool
$c/= :: DeploymentStrategy -> DeploymentStrategy -> Bool
== :: DeploymentStrategy -> DeploymentStrategy -> Bool
$c== :: DeploymentStrategy -> DeploymentStrategy -> Bool
Prelude.Eq, ReadPrec [DeploymentStrategy]
ReadPrec DeploymentStrategy
Int -> ReadS DeploymentStrategy
ReadS [DeploymentStrategy]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeploymentStrategy]
$creadListPrec :: ReadPrec [DeploymentStrategy]
readPrec :: ReadPrec DeploymentStrategy
$creadPrec :: ReadPrec DeploymentStrategy
readList :: ReadS [DeploymentStrategy]
$creadList :: ReadS [DeploymentStrategy]
readsPrec :: Int -> ReadS DeploymentStrategy
$creadsPrec :: Int -> ReadS DeploymentStrategy
Prelude.Read, Int -> DeploymentStrategy -> ShowS
[DeploymentStrategy] -> ShowS
DeploymentStrategy -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentStrategy] -> ShowS
$cshowList :: [DeploymentStrategy] -> ShowS
show :: DeploymentStrategy -> String
$cshow :: DeploymentStrategy -> String
showsPrec :: Int -> DeploymentStrategy -> ShowS
$cshowsPrec :: Int -> DeploymentStrategy -> ShowS
Prelude.Show, forall x. Rep DeploymentStrategy x -> DeploymentStrategy
forall x. DeploymentStrategy -> Rep DeploymentStrategy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentStrategy x -> DeploymentStrategy
$cfrom :: forall x. DeploymentStrategy -> Rep DeploymentStrategy x
Prelude.Generic)
newDeploymentStrategy ::
DeploymentStrategy
newDeploymentStrategy :: DeploymentStrategy
newDeploymentStrategy =
DeploymentStrategy'
{ $sel:deploymentDurationInMinutes:DeploymentStrategy' :: Maybe Natural
deploymentDurationInMinutes =
forall a. Maybe a
Prelude.Nothing,
$sel:description:DeploymentStrategy' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:finalBakeTimeInMinutes:DeploymentStrategy' :: Maybe Natural
finalBakeTimeInMinutes = forall a. Maybe a
Prelude.Nothing,
$sel:growthFactor:DeploymentStrategy' :: Maybe Double
growthFactor = forall a. Maybe a
Prelude.Nothing,
$sel:growthType:DeploymentStrategy' :: Maybe GrowthType
growthType = forall a. Maybe a
Prelude.Nothing,
$sel:id:DeploymentStrategy' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:DeploymentStrategy' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:replicateTo:DeploymentStrategy' :: Maybe ReplicateTo
replicateTo = forall a. Maybe a
Prelude.Nothing
}
deploymentStrategy_deploymentDurationInMinutes :: Lens.Lens' DeploymentStrategy (Prelude.Maybe Prelude.Natural)
deploymentStrategy_deploymentDurationInMinutes :: Lens' DeploymentStrategy (Maybe Natural)
deploymentStrategy_deploymentDurationInMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentStrategy' {Maybe Natural
deploymentDurationInMinutes :: Maybe Natural
$sel:deploymentDurationInMinutes:DeploymentStrategy' :: DeploymentStrategy -> Maybe Natural
deploymentDurationInMinutes} -> Maybe Natural
deploymentDurationInMinutes) (\s :: DeploymentStrategy
s@DeploymentStrategy' {} Maybe Natural
a -> DeploymentStrategy
s {$sel:deploymentDurationInMinutes:DeploymentStrategy' :: Maybe Natural
deploymentDurationInMinutes = Maybe Natural
a} :: DeploymentStrategy)
deploymentStrategy_description :: Lens.Lens' DeploymentStrategy (Prelude.Maybe Prelude.Text)
deploymentStrategy_description :: Lens' DeploymentStrategy (Maybe Text)
deploymentStrategy_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentStrategy' {Maybe Text
description :: Maybe Text
$sel:description:DeploymentStrategy' :: DeploymentStrategy -> Maybe Text
description} -> Maybe Text
description) (\s :: DeploymentStrategy
s@DeploymentStrategy' {} Maybe Text
a -> DeploymentStrategy
s {$sel:description:DeploymentStrategy' :: Maybe Text
description = Maybe Text
a} :: DeploymentStrategy)
deploymentStrategy_finalBakeTimeInMinutes :: Lens.Lens' DeploymentStrategy (Prelude.Maybe Prelude.Natural)
deploymentStrategy_finalBakeTimeInMinutes :: Lens' DeploymentStrategy (Maybe Natural)
deploymentStrategy_finalBakeTimeInMinutes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentStrategy' {Maybe Natural
finalBakeTimeInMinutes :: Maybe Natural
$sel:finalBakeTimeInMinutes:DeploymentStrategy' :: DeploymentStrategy -> Maybe Natural
finalBakeTimeInMinutes} -> Maybe Natural
finalBakeTimeInMinutes) (\s :: DeploymentStrategy
s@DeploymentStrategy' {} Maybe Natural
a -> DeploymentStrategy
s {$sel:finalBakeTimeInMinutes:DeploymentStrategy' :: Maybe Natural
finalBakeTimeInMinutes = Maybe Natural
a} :: DeploymentStrategy)
deploymentStrategy_growthFactor :: Lens.Lens' DeploymentStrategy (Prelude.Maybe Prelude.Double)
deploymentStrategy_growthFactor :: Lens' DeploymentStrategy (Maybe Double)
deploymentStrategy_growthFactor = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentStrategy' {Maybe Double
growthFactor :: Maybe Double
$sel:growthFactor:DeploymentStrategy' :: DeploymentStrategy -> Maybe Double
growthFactor} -> Maybe Double
growthFactor) (\s :: DeploymentStrategy
s@DeploymentStrategy' {} Maybe Double
a -> DeploymentStrategy
s {$sel:growthFactor:DeploymentStrategy' :: Maybe Double
growthFactor = Maybe Double
a} :: DeploymentStrategy)
deploymentStrategy_growthType :: Lens.Lens' DeploymentStrategy (Prelude.Maybe GrowthType)
deploymentStrategy_growthType :: Lens' DeploymentStrategy (Maybe GrowthType)
deploymentStrategy_growthType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentStrategy' {Maybe GrowthType
growthType :: Maybe GrowthType
$sel:growthType:DeploymentStrategy' :: DeploymentStrategy -> Maybe GrowthType
growthType} -> Maybe GrowthType
growthType) (\s :: DeploymentStrategy
s@DeploymentStrategy' {} Maybe GrowthType
a -> DeploymentStrategy
s {$sel:growthType:DeploymentStrategy' :: Maybe GrowthType
growthType = Maybe GrowthType
a} :: DeploymentStrategy)
deploymentStrategy_id :: Lens.Lens' DeploymentStrategy (Prelude.Maybe Prelude.Text)
deploymentStrategy_id :: Lens' DeploymentStrategy (Maybe Text)
deploymentStrategy_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentStrategy' {Maybe Text
id :: Maybe Text
$sel:id:DeploymentStrategy' :: DeploymentStrategy -> Maybe Text
id} -> Maybe Text
id) (\s :: DeploymentStrategy
s@DeploymentStrategy' {} Maybe Text
a -> DeploymentStrategy
s {$sel:id:DeploymentStrategy' :: Maybe Text
id = Maybe Text
a} :: DeploymentStrategy)
deploymentStrategy_name :: Lens.Lens' DeploymentStrategy (Prelude.Maybe Prelude.Text)
deploymentStrategy_name :: Lens' DeploymentStrategy (Maybe Text)
deploymentStrategy_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentStrategy' {Maybe Text
name :: Maybe Text
$sel:name:DeploymentStrategy' :: DeploymentStrategy -> Maybe Text
name} -> Maybe Text
name) (\s :: DeploymentStrategy
s@DeploymentStrategy' {} Maybe Text
a -> DeploymentStrategy
s {$sel:name:DeploymentStrategy' :: Maybe Text
name = Maybe Text
a} :: DeploymentStrategy)
deploymentStrategy_replicateTo :: Lens.Lens' DeploymentStrategy (Prelude.Maybe ReplicateTo)
deploymentStrategy_replicateTo :: Lens' DeploymentStrategy (Maybe ReplicateTo)
deploymentStrategy_replicateTo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentStrategy' {Maybe ReplicateTo
replicateTo :: Maybe ReplicateTo
$sel:replicateTo:DeploymentStrategy' :: DeploymentStrategy -> Maybe ReplicateTo
replicateTo} -> Maybe ReplicateTo
replicateTo) (\s :: DeploymentStrategy
s@DeploymentStrategy' {} Maybe ReplicateTo
a -> DeploymentStrategy
s {$sel:replicateTo:DeploymentStrategy' :: Maybe ReplicateTo
replicateTo = Maybe ReplicateTo
a} :: DeploymentStrategy)
instance Data.FromJSON DeploymentStrategy where
parseJSON :: Value -> Parser DeploymentStrategy
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DeploymentStrategy"
( \Object
x ->
Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe Double
-> Maybe GrowthType
-> Maybe Text
-> Maybe Text
-> Maybe ReplicateTo
-> DeploymentStrategy
DeploymentStrategy'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DeploymentDurationInMinutes")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"FinalBakeTimeInMinutes")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GrowthFactor")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GrowthType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ReplicateTo")
)
instance Prelude.Hashable DeploymentStrategy where
hashWithSalt :: Int -> DeploymentStrategy -> Int
hashWithSalt Int
_salt DeploymentStrategy' {Maybe Double
Maybe Natural
Maybe Text
Maybe GrowthType
Maybe ReplicateTo
replicateTo :: Maybe ReplicateTo
name :: Maybe Text
id :: Maybe Text
growthType :: Maybe GrowthType
growthFactor :: Maybe Double
finalBakeTimeInMinutes :: Maybe Natural
description :: Maybe Text
deploymentDurationInMinutes :: Maybe Natural
$sel:replicateTo:DeploymentStrategy' :: DeploymentStrategy -> Maybe ReplicateTo
$sel:name:DeploymentStrategy' :: DeploymentStrategy -> Maybe Text
$sel:id:DeploymentStrategy' :: DeploymentStrategy -> Maybe Text
$sel:growthType:DeploymentStrategy' :: DeploymentStrategy -> Maybe GrowthType
$sel:growthFactor:DeploymentStrategy' :: DeploymentStrategy -> Maybe Double
$sel:finalBakeTimeInMinutes:DeploymentStrategy' :: DeploymentStrategy -> Maybe Natural
$sel:description:DeploymentStrategy' :: DeploymentStrategy -> Maybe Text
$sel:deploymentDurationInMinutes:DeploymentStrategy' :: DeploymentStrategy -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
deploymentDurationInMinutes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
finalBakeTimeInMinutes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
growthFactor
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe GrowthType
growthType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ReplicateTo
replicateTo
instance Prelude.NFData DeploymentStrategy where
rnf :: DeploymentStrategy -> ()
rnf DeploymentStrategy' {Maybe Double
Maybe Natural
Maybe Text
Maybe GrowthType
Maybe ReplicateTo
replicateTo :: Maybe ReplicateTo
name :: Maybe Text
id :: Maybe Text
growthType :: Maybe GrowthType
growthFactor :: Maybe Double
finalBakeTimeInMinutes :: Maybe Natural
description :: Maybe Text
deploymentDurationInMinutes :: Maybe Natural
$sel:replicateTo:DeploymentStrategy' :: DeploymentStrategy -> Maybe ReplicateTo
$sel:name:DeploymentStrategy' :: DeploymentStrategy -> Maybe Text
$sel:id:DeploymentStrategy' :: DeploymentStrategy -> Maybe Text
$sel:growthType:DeploymentStrategy' :: DeploymentStrategy -> Maybe GrowthType
$sel:growthFactor:DeploymentStrategy' :: DeploymentStrategy -> Maybe Double
$sel:finalBakeTimeInMinutes:DeploymentStrategy' :: DeploymentStrategy -> Maybe Natural
$sel:description:DeploymentStrategy' :: DeploymentStrategy -> Maybe Text
$sel:deploymentDurationInMinutes:DeploymentStrategy' :: DeploymentStrategy -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
deploymentDurationInMinutes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
finalBakeTimeInMinutes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
growthFactor
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe GrowthType
growthType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ReplicateTo
replicateTo