{-# 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.CloudFormation.Types.AutoDeployment where
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 AutoDeployment = AutoDeployment'
{
AutoDeployment -> Maybe Bool
enabled :: Prelude.Maybe Prelude.Bool,
AutoDeployment -> Maybe Bool
retainStacksOnAccountRemoval :: Prelude.Maybe Prelude.Bool
}
deriving (AutoDeployment -> AutoDeployment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoDeployment -> AutoDeployment -> Bool
$c/= :: AutoDeployment -> AutoDeployment -> Bool
== :: AutoDeployment -> AutoDeployment -> Bool
$c== :: AutoDeployment -> AutoDeployment -> Bool
Prelude.Eq, ReadPrec [AutoDeployment]
ReadPrec AutoDeployment
Int -> ReadS AutoDeployment
ReadS [AutoDeployment]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoDeployment]
$creadListPrec :: ReadPrec [AutoDeployment]
readPrec :: ReadPrec AutoDeployment
$creadPrec :: ReadPrec AutoDeployment
readList :: ReadS [AutoDeployment]
$creadList :: ReadS [AutoDeployment]
readsPrec :: Int -> ReadS AutoDeployment
$creadsPrec :: Int -> ReadS AutoDeployment
Prelude.Read, Int -> AutoDeployment -> ShowS
[AutoDeployment] -> ShowS
AutoDeployment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoDeployment] -> ShowS
$cshowList :: [AutoDeployment] -> ShowS
show :: AutoDeployment -> String
$cshow :: AutoDeployment -> String
showsPrec :: Int -> AutoDeployment -> ShowS
$cshowsPrec :: Int -> AutoDeployment -> ShowS
Prelude.Show, forall x. Rep AutoDeployment x -> AutoDeployment
forall x. AutoDeployment -> Rep AutoDeployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AutoDeployment x -> AutoDeployment
$cfrom :: forall x. AutoDeployment -> Rep AutoDeployment x
Prelude.Generic)
newAutoDeployment ::
AutoDeployment
newAutoDeployment :: AutoDeployment
newAutoDeployment =
AutoDeployment'
{ $sel:enabled:AutoDeployment' :: Maybe Bool
enabled = forall a. Maybe a
Prelude.Nothing,
$sel:retainStacksOnAccountRemoval:AutoDeployment' :: Maybe Bool
retainStacksOnAccountRemoval = forall a. Maybe a
Prelude.Nothing
}
autoDeployment_enabled :: Lens.Lens' AutoDeployment (Prelude.Maybe Prelude.Bool)
autoDeployment_enabled :: Lens' AutoDeployment (Maybe Bool)
autoDeployment_enabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoDeployment' {Maybe Bool
enabled :: Maybe Bool
$sel:enabled:AutoDeployment' :: AutoDeployment -> Maybe Bool
enabled} -> Maybe Bool
enabled) (\s :: AutoDeployment
s@AutoDeployment' {} Maybe Bool
a -> AutoDeployment
s {$sel:enabled:AutoDeployment' :: Maybe Bool
enabled = Maybe Bool
a} :: AutoDeployment)
autoDeployment_retainStacksOnAccountRemoval :: Lens.Lens' AutoDeployment (Prelude.Maybe Prelude.Bool)
autoDeployment_retainStacksOnAccountRemoval :: Lens' AutoDeployment (Maybe Bool)
autoDeployment_retainStacksOnAccountRemoval = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoDeployment' {Maybe Bool
retainStacksOnAccountRemoval :: Maybe Bool
$sel:retainStacksOnAccountRemoval:AutoDeployment' :: AutoDeployment -> Maybe Bool
retainStacksOnAccountRemoval} -> Maybe Bool
retainStacksOnAccountRemoval) (\s :: AutoDeployment
s@AutoDeployment' {} Maybe Bool
a -> AutoDeployment
s {$sel:retainStacksOnAccountRemoval:AutoDeployment' :: Maybe Bool
retainStacksOnAccountRemoval = Maybe Bool
a} :: AutoDeployment)
instance Data.FromXML AutoDeployment where
parseXML :: [Node] -> Either String AutoDeployment
parseXML [Node]
x =
Maybe Bool -> Maybe Bool -> AutoDeployment
AutoDeployment'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Enabled")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"RetainStacksOnAccountRemoval")
instance Prelude.Hashable AutoDeployment where
hashWithSalt :: Int -> AutoDeployment -> Int
hashWithSalt Int
_salt AutoDeployment' {Maybe Bool
retainStacksOnAccountRemoval :: Maybe Bool
enabled :: Maybe Bool
$sel:retainStacksOnAccountRemoval:AutoDeployment' :: AutoDeployment -> Maybe Bool
$sel:enabled:AutoDeployment' :: AutoDeployment -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
retainStacksOnAccountRemoval
instance Prelude.NFData AutoDeployment where
rnf :: AutoDeployment -> ()
rnf AutoDeployment' {Maybe Bool
retainStacksOnAccountRemoval :: Maybe Bool
enabled :: Maybe Bool
$sel:retainStacksOnAccountRemoval:AutoDeployment' :: AutoDeployment -> Maybe Bool
$sel:enabled:AutoDeployment' :: AutoDeployment -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
retainStacksOnAccountRemoval
instance Data.ToQuery AutoDeployment where
toQuery :: AutoDeployment -> QueryString
toQuery AutoDeployment' {Maybe Bool
retainStacksOnAccountRemoval :: Maybe Bool
enabled :: Maybe Bool
$sel:retainStacksOnAccountRemoval:AutoDeployment' :: AutoDeployment -> Maybe Bool
$sel:enabled:AutoDeployment' :: AutoDeployment -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Enabled" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
enabled,
ByteString
"RetainStacksOnAccountRemoval"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
retainStacksOnAccountRemoval
]