{-# 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.CodeDeploy.Types.DeploymentConfigInfo where
import Amazonka.CodeDeploy.Types.ComputePlatform
import Amazonka.CodeDeploy.Types.MinimumHealthyHosts
import Amazonka.CodeDeploy.Types.TrafficRoutingConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeploymentConfigInfo = DeploymentConfigInfo'
{
DeploymentConfigInfo -> Maybe Text
deploymentConfigName :: Prelude.Maybe Prelude.Text,
DeploymentConfigInfo -> Maybe ComputePlatform
computePlatform :: Prelude.Maybe ComputePlatform,
DeploymentConfigInfo -> Maybe MinimumHealthyHosts
minimumHealthyHosts :: Prelude.Maybe MinimumHealthyHosts,
DeploymentConfigInfo -> Maybe TrafficRoutingConfig
trafficRoutingConfig :: Prelude.Maybe TrafficRoutingConfig,
DeploymentConfigInfo -> Maybe Text
deploymentConfigId :: Prelude.Maybe Prelude.Text,
DeploymentConfigInfo -> Maybe POSIX
createTime :: Prelude.Maybe Core.POSIX
}
deriving (DeploymentConfigInfo -> DeploymentConfigInfo -> Bool
(DeploymentConfigInfo -> DeploymentConfigInfo -> Bool)
-> (DeploymentConfigInfo -> DeploymentConfigInfo -> Bool)
-> Eq DeploymentConfigInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentConfigInfo -> DeploymentConfigInfo -> Bool
$c/= :: DeploymentConfigInfo -> DeploymentConfigInfo -> Bool
== :: DeploymentConfigInfo -> DeploymentConfigInfo -> Bool
$c== :: DeploymentConfigInfo -> DeploymentConfigInfo -> Bool
Prelude.Eq, ReadPrec [DeploymentConfigInfo]
ReadPrec DeploymentConfigInfo
Int -> ReadS DeploymentConfigInfo
ReadS [DeploymentConfigInfo]
(Int -> ReadS DeploymentConfigInfo)
-> ReadS [DeploymentConfigInfo]
-> ReadPrec DeploymentConfigInfo
-> ReadPrec [DeploymentConfigInfo]
-> Read DeploymentConfigInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeploymentConfigInfo]
$creadListPrec :: ReadPrec [DeploymentConfigInfo]
readPrec :: ReadPrec DeploymentConfigInfo
$creadPrec :: ReadPrec DeploymentConfigInfo
readList :: ReadS [DeploymentConfigInfo]
$creadList :: ReadS [DeploymentConfigInfo]
readsPrec :: Int -> ReadS DeploymentConfigInfo
$creadsPrec :: Int -> ReadS DeploymentConfigInfo
Prelude.Read, Int -> DeploymentConfigInfo -> ShowS
[DeploymentConfigInfo] -> ShowS
DeploymentConfigInfo -> String
(Int -> DeploymentConfigInfo -> ShowS)
-> (DeploymentConfigInfo -> String)
-> ([DeploymentConfigInfo] -> ShowS)
-> Show DeploymentConfigInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentConfigInfo] -> ShowS
$cshowList :: [DeploymentConfigInfo] -> ShowS
show :: DeploymentConfigInfo -> String
$cshow :: DeploymentConfigInfo -> String
showsPrec :: Int -> DeploymentConfigInfo -> ShowS
$cshowsPrec :: Int -> DeploymentConfigInfo -> ShowS
Prelude.Show, (forall x. DeploymentConfigInfo -> Rep DeploymentConfigInfo x)
-> (forall x. Rep DeploymentConfigInfo x -> DeploymentConfigInfo)
-> Generic DeploymentConfigInfo
forall x. Rep DeploymentConfigInfo x -> DeploymentConfigInfo
forall x. DeploymentConfigInfo -> Rep DeploymentConfigInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentConfigInfo x -> DeploymentConfigInfo
$cfrom :: forall x. DeploymentConfigInfo -> Rep DeploymentConfigInfo x
Prelude.Generic)
newDeploymentConfigInfo ::
DeploymentConfigInfo
newDeploymentConfigInfo :: DeploymentConfigInfo
newDeploymentConfigInfo =
DeploymentConfigInfo' :: Maybe Text
-> Maybe ComputePlatform
-> Maybe MinimumHealthyHosts
-> Maybe TrafficRoutingConfig
-> Maybe Text
-> Maybe POSIX
-> DeploymentConfigInfo
DeploymentConfigInfo'
{ $sel:deploymentConfigName:DeploymentConfigInfo' :: Maybe Text
deploymentConfigName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:computePlatform:DeploymentConfigInfo' :: Maybe ComputePlatform
computePlatform = Maybe ComputePlatform
forall a. Maybe a
Prelude.Nothing,
$sel:minimumHealthyHosts:DeploymentConfigInfo' :: Maybe MinimumHealthyHosts
minimumHealthyHosts = Maybe MinimumHealthyHosts
forall a. Maybe a
Prelude.Nothing,
$sel:trafficRoutingConfig:DeploymentConfigInfo' :: Maybe TrafficRoutingConfig
trafficRoutingConfig = Maybe TrafficRoutingConfig
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentConfigId:DeploymentConfigInfo' :: Maybe Text
deploymentConfigId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createTime:DeploymentConfigInfo' :: Maybe POSIX
createTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
deploymentConfigInfo_deploymentConfigName :: Lens.Lens' DeploymentConfigInfo (Prelude.Maybe Prelude.Text)
deploymentConfigInfo_deploymentConfigName :: (Maybe Text -> f (Maybe Text))
-> DeploymentConfigInfo -> f DeploymentConfigInfo
deploymentConfigInfo_deploymentConfigName = (DeploymentConfigInfo -> Maybe Text)
-> (DeploymentConfigInfo -> Maybe Text -> DeploymentConfigInfo)
-> Lens
DeploymentConfigInfo DeploymentConfigInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentConfigInfo' {Maybe Text
deploymentConfigName :: Maybe Text
$sel:deploymentConfigName:DeploymentConfigInfo' :: DeploymentConfigInfo -> Maybe Text
deploymentConfigName} -> Maybe Text
deploymentConfigName) (\s :: DeploymentConfigInfo
s@DeploymentConfigInfo' {} Maybe Text
a -> DeploymentConfigInfo
s {$sel:deploymentConfigName:DeploymentConfigInfo' :: Maybe Text
deploymentConfigName = Maybe Text
a} :: DeploymentConfigInfo)
deploymentConfigInfo_computePlatform :: Lens.Lens' DeploymentConfigInfo (Prelude.Maybe ComputePlatform)
deploymentConfigInfo_computePlatform :: (Maybe ComputePlatform -> f (Maybe ComputePlatform))
-> DeploymentConfigInfo -> f DeploymentConfigInfo
deploymentConfigInfo_computePlatform = (DeploymentConfigInfo -> Maybe ComputePlatform)
-> (DeploymentConfigInfo
-> Maybe ComputePlatform -> DeploymentConfigInfo)
-> Lens
DeploymentConfigInfo
DeploymentConfigInfo
(Maybe ComputePlatform)
(Maybe ComputePlatform)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentConfigInfo' {Maybe ComputePlatform
computePlatform :: Maybe ComputePlatform
$sel:computePlatform:DeploymentConfigInfo' :: DeploymentConfigInfo -> Maybe ComputePlatform
computePlatform} -> Maybe ComputePlatform
computePlatform) (\s :: DeploymentConfigInfo
s@DeploymentConfigInfo' {} Maybe ComputePlatform
a -> DeploymentConfigInfo
s {$sel:computePlatform:DeploymentConfigInfo' :: Maybe ComputePlatform
computePlatform = Maybe ComputePlatform
a} :: DeploymentConfigInfo)
deploymentConfigInfo_minimumHealthyHosts :: Lens.Lens' DeploymentConfigInfo (Prelude.Maybe MinimumHealthyHosts)
deploymentConfigInfo_minimumHealthyHosts :: (Maybe MinimumHealthyHosts -> f (Maybe MinimumHealthyHosts))
-> DeploymentConfigInfo -> f DeploymentConfigInfo
deploymentConfigInfo_minimumHealthyHosts = (DeploymentConfigInfo -> Maybe MinimumHealthyHosts)
-> (DeploymentConfigInfo
-> Maybe MinimumHealthyHosts -> DeploymentConfigInfo)
-> Lens
DeploymentConfigInfo
DeploymentConfigInfo
(Maybe MinimumHealthyHosts)
(Maybe MinimumHealthyHosts)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentConfigInfo' {Maybe MinimumHealthyHosts
minimumHealthyHosts :: Maybe MinimumHealthyHosts
$sel:minimumHealthyHosts:DeploymentConfigInfo' :: DeploymentConfigInfo -> Maybe MinimumHealthyHosts
minimumHealthyHosts} -> Maybe MinimumHealthyHosts
minimumHealthyHosts) (\s :: DeploymentConfigInfo
s@DeploymentConfigInfo' {} Maybe MinimumHealthyHosts
a -> DeploymentConfigInfo
s {$sel:minimumHealthyHosts:DeploymentConfigInfo' :: Maybe MinimumHealthyHosts
minimumHealthyHosts = Maybe MinimumHealthyHosts
a} :: DeploymentConfigInfo)
deploymentConfigInfo_trafficRoutingConfig :: Lens.Lens' DeploymentConfigInfo (Prelude.Maybe TrafficRoutingConfig)
deploymentConfigInfo_trafficRoutingConfig :: (Maybe TrafficRoutingConfig -> f (Maybe TrafficRoutingConfig))
-> DeploymentConfigInfo -> f DeploymentConfigInfo
deploymentConfigInfo_trafficRoutingConfig = (DeploymentConfigInfo -> Maybe TrafficRoutingConfig)
-> (DeploymentConfigInfo
-> Maybe TrafficRoutingConfig -> DeploymentConfigInfo)
-> Lens
DeploymentConfigInfo
DeploymentConfigInfo
(Maybe TrafficRoutingConfig)
(Maybe TrafficRoutingConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentConfigInfo' {Maybe TrafficRoutingConfig
trafficRoutingConfig :: Maybe TrafficRoutingConfig
$sel:trafficRoutingConfig:DeploymentConfigInfo' :: DeploymentConfigInfo -> Maybe TrafficRoutingConfig
trafficRoutingConfig} -> Maybe TrafficRoutingConfig
trafficRoutingConfig) (\s :: DeploymentConfigInfo
s@DeploymentConfigInfo' {} Maybe TrafficRoutingConfig
a -> DeploymentConfigInfo
s {$sel:trafficRoutingConfig:DeploymentConfigInfo' :: Maybe TrafficRoutingConfig
trafficRoutingConfig = Maybe TrafficRoutingConfig
a} :: DeploymentConfigInfo)
deploymentConfigInfo_deploymentConfigId :: Lens.Lens' DeploymentConfigInfo (Prelude.Maybe Prelude.Text)
deploymentConfigInfo_deploymentConfigId :: (Maybe Text -> f (Maybe Text))
-> DeploymentConfigInfo -> f DeploymentConfigInfo
deploymentConfigInfo_deploymentConfigId = (DeploymentConfigInfo -> Maybe Text)
-> (DeploymentConfigInfo -> Maybe Text -> DeploymentConfigInfo)
-> Lens
DeploymentConfigInfo DeploymentConfigInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentConfigInfo' {Maybe Text
deploymentConfigId :: Maybe Text
$sel:deploymentConfigId:DeploymentConfigInfo' :: DeploymentConfigInfo -> Maybe Text
deploymentConfigId} -> Maybe Text
deploymentConfigId) (\s :: DeploymentConfigInfo
s@DeploymentConfigInfo' {} Maybe Text
a -> DeploymentConfigInfo
s {$sel:deploymentConfigId:DeploymentConfigInfo' :: Maybe Text
deploymentConfigId = Maybe Text
a} :: DeploymentConfigInfo)
deploymentConfigInfo_createTime :: Lens.Lens' DeploymentConfigInfo (Prelude.Maybe Prelude.UTCTime)
deploymentConfigInfo_createTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeploymentConfigInfo -> f DeploymentConfigInfo
deploymentConfigInfo_createTime = (DeploymentConfigInfo -> Maybe POSIX)
-> (DeploymentConfigInfo -> Maybe POSIX -> DeploymentConfigInfo)
-> Lens
DeploymentConfigInfo
DeploymentConfigInfo
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentConfigInfo' {Maybe POSIX
createTime :: Maybe POSIX
$sel:createTime:DeploymentConfigInfo' :: DeploymentConfigInfo -> Maybe POSIX
createTime} -> Maybe POSIX
createTime) (\s :: DeploymentConfigInfo
s@DeploymentConfigInfo' {} Maybe POSIX
a -> DeploymentConfigInfo
s {$sel:createTime:DeploymentConfigInfo' :: Maybe POSIX
createTime = Maybe POSIX
a} :: DeploymentConfigInfo) ((Maybe POSIX -> f (Maybe POSIX))
-> DeploymentConfigInfo -> f DeploymentConfigInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeploymentConfigInfo
-> f DeploymentConfigInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON DeploymentConfigInfo where
parseJSON :: Value -> Parser DeploymentConfigInfo
parseJSON =
String
-> (Object -> Parser DeploymentConfigInfo)
-> Value
-> Parser DeploymentConfigInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeploymentConfigInfo"
( \Object
x ->
Maybe Text
-> Maybe ComputePlatform
-> Maybe MinimumHealthyHosts
-> Maybe TrafficRoutingConfig
-> Maybe Text
-> Maybe POSIX
-> DeploymentConfigInfo
DeploymentConfigInfo'
(Maybe Text
-> Maybe ComputePlatform
-> Maybe MinimumHealthyHosts
-> Maybe TrafficRoutingConfig
-> Maybe Text
-> Maybe POSIX
-> DeploymentConfigInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe ComputePlatform
-> Maybe MinimumHealthyHosts
-> Maybe TrafficRoutingConfig
-> Maybe Text
-> Maybe POSIX
-> DeploymentConfigInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deploymentConfigName")
Parser
(Maybe ComputePlatform
-> Maybe MinimumHealthyHosts
-> Maybe TrafficRoutingConfig
-> Maybe Text
-> Maybe POSIX
-> DeploymentConfigInfo)
-> Parser (Maybe ComputePlatform)
-> Parser
(Maybe MinimumHealthyHosts
-> Maybe TrafficRoutingConfig
-> Maybe Text
-> Maybe POSIX
-> DeploymentConfigInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ComputePlatform)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"computePlatform")
Parser
(Maybe MinimumHealthyHosts
-> Maybe TrafficRoutingConfig
-> Maybe Text
-> Maybe POSIX
-> DeploymentConfigInfo)
-> Parser (Maybe MinimumHealthyHosts)
-> Parser
(Maybe TrafficRoutingConfig
-> Maybe Text -> Maybe POSIX -> DeploymentConfigInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MinimumHealthyHosts)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"minimumHealthyHosts")
Parser
(Maybe TrafficRoutingConfig
-> Maybe Text -> Maybe POSIX -> DeploymentConfigInfo)
-> Parser (Maybe TrafficRoutingConfig)
-> Parser (Maybe Text -> Maybe POSIX -> DeploymentConfigInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TrafficRoutingConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"trafficRoutingConfig")
Parser (Maybe Text -> Maybe POSIX -> DeploymentConfigInfo)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> DeploymentConfigInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deploymentConfigId")
Parser (Maybe POSIX -> DeploymentConfigInfo)
-> Parser (Maybe POSIX) -> Parser DeploymentConfigInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createTime")
)
instance Prelude.Hashable DeploymentConfigInfo
instance Prelude.NFData DeploymentConfigInfo