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