{-# 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.AccountGateResult where
import Amazonka.CloudFormation.Types.AccountGateStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AccountGateResult = AccountGateResult'
{
AccountGateResult -> Maybe AccountGateStatus
status :: Prelude.Maybe AccountGateStatus,
AccountGateResult -> Maybe Text
statusReason :: Prelude.Maybe Prelude.Text
}
deriving (AccountGateResult -> AccountGateResult -> Bool
(AccountGateResult -> AccountGateResult -> Bool)
-> (AccountGateResult -> AccountGateResult -> Bool)
-> Eq AccountGateResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccountGateResult -> AccountGateResult -> Bool
$c/= :: AccountGateResult -> AccountGateResult -> Bool
== :: AccountGateResult -> AccountGateResult -> Bool
$c== :: AccountGateResult -> AccountGateResult -> Bool
Prelude.Eq, ReadPrec [AccountGateResult]
ReadPrec AccountGateResult
Int -> ReadS AccountGateResult
ReadS [AccountGateResult]
(Int -> ReadS AccountGateResult)
-> ReadS [AccountGateResult]
-> ReadPrec AccountGateResult
-> ReadPrec [AccountGateResult]
-> Read AccountGateResult
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccountGateResult]
$creadListPrec :: ReadPrec [AccountGateResult]
readPrec :: ReadPrec AccountGateResult
$creadPrec :: ReadPrec AccountGateResult
readList :: ReadS [AccountGateResult]
$creadList :: ReadS [AccountGateResult]
readsPrec :: Int -> ReadS AccountGateResult
$creadsPrec :: Int -> ReadS AccountGateResult
Prelude.Read, Int -> AccountGateResult -> ShowS
[AccountGateResult] -> ShowS
AccountGateResult -> String
(Int -> AccountGateResult -> ShowS)
-> (AccountGateResult -> String)
-> ([AccountGateResult] -> ShowS)
-> Show AccountGateResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccountGateResult] -> ShowS
$cshowList :: [AccountGateResult] -> ShowS
show :: AccountGateResult -> String
$cshow :: AccountGateResult -> String
showsPrec :: Int -> AccountGateResult -> ShowS
$cshowsPrec :: Int -> AccountGateResult -> ShowS
Prelude.Show, (forall x. AccountGateResult -> Rep AccountGateResult x)
-> (forall x. Rep AccountGateResult x -> AccountGateResult)
-> Generic AccountGateResult
forall x. Rep AccountGateResult x -> AccountGateResult
forall x. AccountGateResult -> Rep AccountGateResult x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AccountGateResult x -> AccountGateResult
$cfrom :: forall x. AccountGateResult -> Rep AccountGateResult x
Prelude.Generic)
newAccountGateResult ::
AccountGateResult
newAccountGateResult :: AccountGateResult
newAccountGateResult =
AccountGateResult' :: Maybe AccountGateStatus -> Maybe Text -> AccountGateResult
AccountGateResult'
{ $sel:status:AccountGateResult' :: Maybe AccountGateStatus
status = Maybe AccountGateStatus
forall a. Maybe a
Prelude.Nothing,
$sel:statusReason:AccountGateResult' :: Maybe Text
statusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
accountGateResult_status :: Lens.Lens' AccountGateResult (Prelude.Maybe AccountGateStatus)
accountGateResult_status :: (Maybe AccountGateStatus -> f (Maybe AccountGateStatus))
-> AccountGateResult -> f AccountGateResult
accountGateResult_status = (AccountGateResult -> Maybe AccountGateStatus)
-> (AccountGateResult
-> Maybe AccountGateStatus -> AccountGateResult)
-> Lens
AccountGateResult
AccountGateResult
(Maybe AccountGateStatus)
(Maybe AccountGateStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountGateResult' {Maybe AccountGateStatus
status :: Maybe AccountGateStatus
$sel:status:AccountGateResult' :: AccountGateResult -> Maybe AccountGateStatus
status} -> Maybe AccountGateStatus
status) (\s :: AccountGateResult
s@AccountGateResult' {} Maybe AccountGateStatus
a -> AccountGateResult
s {$sel:status:AccountGateResult' :: Maybe AccountGateStatus
status = Maybe AccountGateStatus
a} :: AccountGateResult)
accountGateResult_statusReason :: Lens.Lens' AccountGateResult (Prelude.Maybe Prelude.Text)
accountGateResult_statusReason :: (Maybe Text -> f (Maybe Text))
-> AccountGateResult -> f AccountGateResult
accountGateResult_statusReason = (AccountGateResult -> Maybe Text)
-> (AccountGateResult -> Maybe Text -> AccountGateResult)
-> Lens
AccountGateResult AccountGateResult (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccountGateResult' {Maybe Text
statusReason :: Maybe Text
$sel:statusReason:AccountGateResult' :: AccountGateResult -> Maybe Text
statusReason} -> Maybe Text
statusReason) (\s :: AccountGateResult
s@AccountGateResult' {} Maybe Text
a -> AccountGateResult
s {$sel:statusReason:AccountGateResult' :: Maybe Text
statusReason = Maybe Text
a} :: AccountGateResult)
instance Core.FromXML AccountGateResult where
parseXML :: [Node] -> Either String AccountGateResult
parseXML [Node]
x =
Maybe AccountGateStatus -> Maybe Text -> AccountGateResult
AccountGateResult'
(Maybe AccountGateStatus -> Maybe Text -> AccountGateResult)
-> Either String (Maybe AccountGateStatus)
-> Either String (Maybe Text -> AccountGateResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe AccountGateStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
Either String (Maybe Text -> AccountGateResult)
-> Either String (Maybe Text) -> Either String AccountGateResult
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StatusReason")
instance Prelude.Hashable AccountGateResult
instance Prelude.NFData AccountGateResult