{-# 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.ManagedExecution 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 ManagedExecution = ManagedExecution'
{
ManagedExecution -> Maybe Bool
active :: Prelude.Maybe Prelude.Bool
}
deriving (ManagedExecution -> ManagedExecution -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ManagedExecution -> ManagedExecution -> Bool
$c/= :: ManagedExecution -> ManagedExecution -> Bool
== :: ManagedExecution -> ManagedExecution -> Bool
$c== :: ManagedExecution -> ManagedExecution -> Bool
Prelude.Eq, ReadPrec [ManagedExecution]
ReadPrec ManagedExecution
Int -> ReadS ManagedExecution
ReadS [ManagedExecution]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ManagedExecution]
$creadListPrec :: ReadPrec [ManagedExecution]
readPrec :: ReadPrec ManagedExecution
$creadPrec :: ReadPrec ManagedExecution
readList :: ReadS [ManagedExecution]
$creadList :: ReadS [ManagedExecution]
readsPrec :: Int -> ReadS ManagedExecution
$creadsPrec :: Int -> ReadS ManagedExecution
Prelude.Read, Int -> ManagedExecution -> ShowS
[ManagedExecution] -> ShowS
ManagedExecution -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ManagedExecution] -> ShowS
$cshowList :: [ManagedExecution] -> ShowS
show :: ManagedExecution -> String
$cshow :: ManagedExecution -> String
showsPrec :: Int -> ManagedExecution -> ShowS
$cshowsPrec :: Int -> ManagedExecution -> ShowS
Prelude.Show, forall x. Rep ManagedExecution x -> ManagedExecution
forall x. ManagedExecution -> Rep ManagedExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ManagedExecution x -> ManagedExecution
$cfrom :: forall x. ManagedExecution -> Rep ManagedExecution x
Prelude.Generic)
newManagedExecution ::
ManagedExecution
newManagedExecution :: ManagedExecution
newManagedExecution =
ManagedExecution' {$sel:active:ManagedExecution' :: Maybe Bool
active = forall a. Maybe a
Prelude.Nothing}
managedExecution_active :: Lens.Lens' ManagedExecution (Prelude.Maybe Prelude.Bool)
managedExecution_active :: Lens' ManagedExecution (Maybe Bool)
managedExecution_active = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ManagedExecution' {Maybe Bool
active :: Maybe Bool
$sel:active:ManagedExecution' :: ManagedExecution -> Maybe Bool
active} -> Maybe Bool
active) (\s :: ManagedExecution
s@ManagedExecution' {} Maybe Bool
a -> ManagedExecution
s {$sel:active:ManagedExecution' :: Maybe Bool
active = Maybe Bool
a} :: ManagedExecution)
instance Data.FromXML ManagedExecution where
parseXML :: [Node] -> Either String ManagedExecution
parseXML [Node]
x =
Maybe Bool -> ManagedExecution
ManagedExecution' 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
"Active")
instance Prelude.Hashable ManagedExecution where
hashWithSalt :: Int -> ManagedExecution -> Int
hashWithSalt Int
_salt ManagedExecution' {Maybe Bool
active :: Maybe Bool
$sel:active:ManagedExecution' :: ManagedExecution -> Maybe Bool
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
active
instance Prelude.NFData ManagedExecution where
rnf :: ManagedExecution -> ()
rnf ManagedExecution' {Maybe Bool
active :: Maybe Bool
$sel:active:ManagedExecution' :: ManagedExecution -> Maybe Bool
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
active
instance Data.ToQuery ManagedExecution where
toQuery :: ManagedExecution -> QueryString
toQuery ManagedExecution' {Maybe Bool
active :: Maybe Bool
$sel:active:ManagedExecution' :: ManagedExecution -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"Active" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
active]