{-# 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.SecurityHub.Types.AwsEcsServiceDeploymentConfigurationDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
data AwsEcsServiceDeploymentConfigurationDetails = AwsEcsServiceDeploymentConfigurationDetails'
{
AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
minimumHealthyPercent :: Prelude.Maybe Prelude.Int,
AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
maximumPercent :: Prelude.Maybe Prelude.Int,
AwsEcsServiceDeploymentConfigurationDetails
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker :: Prelude.Maybe AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
}
deriving (AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
(AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool)
-> (AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool)
-> Eq AwsEcsServiceDeploymentConfigurationDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
$c/= :: AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
== :: AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
$c== :: AwsEcsServiceDeploymentConfigurationDetails
-> AwsEcsServiceDeploymentConfigurationDetails -> Bool
Prelude.Eq, ReadPrec [AwsEcsServiceDeploymentConfigurationDetails]
ReadPrec AwsEcsServiceDeploymentConfigurationDetails
Int -> ReadS AwsEcsServiceDeploymentConfigurationDetails
ReadS [AwsEcsServiceDeploymentConfigurationDetails]
(Int -> ReadS AwsEcsServiceDeploymentConfigurationDetails)
-> ReadS [AwsEcsServiceDeploymentConfigurationDetails]
-> ReadPrec AwsEcsServiceDeploymentConfigurationDetails
-> ReadPrec [AwsEcsServiceDeploymentConfigurationDetails]
-> Read AwsEcsServiceDeploymentConfigurationDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEcsServiceDeploymentConfigurationDetails]
$creadListPrec :: ReadPrec [AwsEcsServiceDeploymentConfigurationDetails]
readPrec :: ReadPrec AwsEcsServiceDeploymentConfigurationDetails
$creadPrec :: ReadPrec AwsEcsServiceDeploymentConfigurationDetails
readList :: ReadS [AwsEcsServiceDeploymentConfigurationDetails]
$creadList :: ReadS [AwsEcsServiceDeploymentConfigurationDetails]
readsPrec :: Int -> ReadS AwsEcsServiceDeploymentConfigurationDetails
$creadsPrec :: Int -> ReadS AwsEcsServiceDeploymentConfigurationDetails
Prelude.Read, Int -> AwsEcsServiceDeploymentConfigurationDetails -> ShowS
[AwsEcsServiceDeploymentConfigurationDetails] -> ShowS
AwsEcsServiceDeploymentConfigurationDetails -> String
(Int -> AwsEcsServiceDeploymentConfigurationDetails -> ShowS)
-> (AwsEcsServiceDeploymentConfigurationDetails -> String)
-> ([AwsEcsServiceDeploymentConfigurationDetails] -> ShowS)
-> Show AwsEcsServiceDeploymentConfigurationDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcsServiceDeploymentConfigurationDetails] -> ShowS
$cshowList :: [AwsEcsServiceDeploymentConfigurationDetails] -> ShowS
show :: AwsEcsServiceDeploymentConfigurationDetails -> String
$cshow :: AwsEcsServiceDeploymentConfigurationDetails -> String
showsPrec :: Int -> AwsEcsServiceDeploymentConfigurationDetails -> ShowS
$cshowsPrec :: Int -> AwsEcsServiceDeploymentConfigurationDetails -> ShowS
Prelude.Show, (forall x.
AwsEcsServiceDeploymentConfigurationDetails
-> Rep AwsEcsServiceDeploymentConfigurationDetails x)
-> (forall x.
Rep AwsEcsServiceDeploymentConfigurationDetails x
-> AwsEcsServiceDeploymentConfigurationDetails)
-> Generic AwsEcsServiceDeploymentConfigurationDetails
forall x.
Rep AwsEcsServiceDeploymentConfigurationDetails x
-> AwsEcsServiceDeploymentConfigurationDetails
forall x.
AwsEcsServiceDeploymentConfigurationDetails
-> Rep AwsEcsServiceDeploymentConfigurationDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEcsServiceDeploymentConfigurationDetails x
-> AwsEcsServiceDeploymentConfigurationDetails
$cfrom :: forall x.
AwsEcsServiceDeploymentConfigurationDetails
-> Rep AwsEcsServiceDeploymentConfigurationDetails x
Prelude.Generic)
newAwsEcsServiceDeploymentConfigurationDetails ::
AwsEcsServiceDeploymentConfigurationDetails
newAwsEcsServiceDeploymentConfigurationDetails :: AwsEcsServiceDeploymentConfigurationDetails
newAwsEcsServiceDeploymentConfigurationDetails =
AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
-> Maybe Int
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails
AwsEcsServiceDeploymentConfigurationDetails'
{ $sel:minimumHealthyPercent:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
minimumHealthyPercent =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:maximumPercent:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
maximumPercent =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentCircuitBreaker:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker =
Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
forall a. Maybe a
Prelude.Nothing
}
awsEcsServiceDeploymentConfigurationDetails_minimumHealthyPercent :: Lens.Lens' AwsEcsServiceDeploymentConfigurationDetails (Prelude.Maybe Prelude.Int)
awsEcsServiceDeploymentConfigurationDetails_minimumHealthyPercent :: (Maybe Int -> f (Maybe Int))
-> AwsEcsServiceDeploymentConfigurationDetails
-> f AwsEcsServiceDeploymentConfigurationDetails
awsEcsServiceDeploymentConfigurationDetails_minimumHealthyPercent = (AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int)
-> (AwsEcsServiceDeploymentConfigurationDetails
-> Maybe Int -> AwsEcsServiceDeploymentConfigurationDetails)
-> Lens
AwsEcsServiceDeploymentConfigurationDetails
AwsEcsServiceDeploymentConfigurationDetails
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsServiceDeploymentConfigurationDetails' {Maybe Int
minimumHealthyPercent :: Maybe Int
$sel:minimumHealthyPercent:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
minimumHealthyPercent} -> Maybe Int
minimumHealthyPercent) (\s :: AwsEcsServiceDeploymentConfigurationDetails
s@AwsEcsServiceDeploymentConfigurationDetails' {} Maybe Int
a -> AwsEcsServiceDeploymentConfigurationDetails
s {$sel:minimumHealthyPercent:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
minimumHealthyPercent = Maybe Int
a} :: AwsEcsServiceDeploymentConfigurationDetails)
awsEcsServiceDeploymentConfigurationDetails_maximumPercent :: Lens.Lens' AwsEcsServiceDeploymentConfigurationDetails (Prelude.Maybe Prelude.Int)
awsEcsServiceDeploymentConfigurationDetails_maximumPercent :: (Maybe Int -> f (Maybe Int))
-> AwsEcsServiceDeploymentConfigurationDetails
-> f AwsEcsServiceDeploymentConfigurationDetails
awsEcsServiceDeploymentConfigurationDetails_maximumPercent = (AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int)
-> (AwsEcsServiceDeploymentConfigurationDetails
-> Maybe Int -> AwsEcsServiceDeploymentConfigurationDetails)
-> Lens
AwsEcsServiceDeploymentConfigurationDetails
AwsEcsServiceDeploymentConfigurationDetails
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsServiceDeploymentConfigurationDetails' {Maybe Int
maximumPercent :: Maybe Int
$sel:maximumPercent:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
maximumPercent} -> Maybe Int
maximumPercent) (\s :: AwsEcsServiceDeploymentConfigurationDetails
s@AwsEcsServiceDeploymentConfigurationDetails' {} Maybe Int
a -> AwsEcsServiceDeploymentConfigurationDetails
s {$sel:maximumPercent:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe Int
maximumPercent = Maybe Int
a} :: AwsEcsServiceDeploymentConfigurationDetails)
awsEcsServiceDeploymentConfigurationDetails_deploymentCircuitBreaker :: Lens.Lens' AwsEcsServiceDeploymentConfigurationDetails (Prelude.Maybe AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
awsEcsServiceDeploymentConfigurationDetails_deploymentCircuitBreaker :: (Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> f (Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails))
-> AwsEcsServiceDeploymentConfigurationDetails
-> f AwsEcsServiceDeploymentConfigurationDetails
awsEcsServiceDeploymentConfigurationDetails_deploymentCircuitBreaker = (AwsEcsServiceDeploymentConfigurationDetails
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
-> (AwsEcsServiceDeploymentConfigurationDetails
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails)
-> Lens
AwsEcsServiceDeploymentConfigurationDetails
AwsEcsServiceDeploymentConfigurationDetails
(Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
(Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsServiceDeploymentConfigurationDetails' {Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker :: Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
$sel:deploymentCircuitBreaker:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker} -> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker) (\s :: AwsEcsServiceDeploymentConfigurationDetails
s@AwsEcsServiceDeploymentConfigurationDetails' {} Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
a -> AwsEcsServiceDeploymentConfigurationDetails
s {$sel:deploymentCircuitBreaker:AwsEcsServiceDeploymentConfigurationDetails' :: Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker = Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
a} :: AwsEcsServiceDeploymentConfigurationDetails)
instance
Core.FromJSON
AwsEcsServiceDeploymentConfigurationDetails
where
parseJSON :: Value -> Parser AwsEcsServiceDeploymentConfigurationDetails
parseJSON =
String
-> (Object -> Parser AwsEcsServiceDeploymentConfigurationDetails)
-> Value
-> Parser AwsEcsServiceDeploymentConfigurationDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsEcsServiceDeploymentConfigurationDetails"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails
AwsEcsServiceDeploymentConfigurationDetails'
(Maybe Int
-> Maybe Int
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MinimumHealthyPercent")
Parser
(Maybe Int
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails)
-> Parser (Maybe Int)
-> Parser
(Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaximumPercent")
Parser
(Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> AwsEcsServiceDeploymentConfigurationDetails)
-> Parser
(Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
-> Parser AwsEcsServiceDeploymentConfigurationDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
(Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeploymentCircuitBreaker")
)
instance
Prelude.Hashable
AwsEcsServiceDeploymentConfigurationDetails
instance
Prelude.NFData
AwsEcsServiceDeploymentConfigurationDetails
instance
Core.ToJSON
AwsEcsServiceDeploymentConfigurationDetails
where
toJSON :: AwsEcsServiceDeploymentConfigurationDetails -> Value
toJSON
AwsEcsServiceDeploymentConfigurationDetails' {Maybe Int
Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker :: Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
maximumPercent :: Maybe Int
minimumHealthyPercent :: Maybe Int
$sel:deploymentCircuitBreaker:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
$sel:maximumPercent:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
$sel:minimumHealthyPercent:AwsEcsServiceDeploymentConfigurationDetails' :: AwsEcsServiceDeploymentConfigurationDetails -> Maybe Int
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"MinimumHealthyPercent" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
minimumHealthyPercent,
(Text
"MaximumPercent" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maximumPercent,
(Text
"DeploymentCircuitBreaker" Text
-> AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> Pair)
-> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe
AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails
deploymentCircuitBreaker
]
)