{-# 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.Config.Types.MemberAccountStatus where
import Amazonka.Config.Types.MemberAccountRuleStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MemberAccountStatus = MemberAccountStatus'
{
MemberAccountStatus -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
MemberAccountStatus -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
MemberAccountStatus -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Core.POSIX,
MemberAccountStatus -> Text
accountId :: Prelude.Text,
MemberAccountStatus -> Text
configRuleName :: Prelude.Text,
MemberAccountStatus -> MemberAccountRuleStatus
memberAccountRuleStatus :: MemberAccountRuleStatus
}
deriving (MemberAccountStatus -> MemberAccountStatus -> Bool
(MemberAccountStatus -> MemberAccountStatus -> Bool)
-> (MemberAccountStatus -> MemberAccountStatus -> Bool)
-> Eq MemberAccountStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemberAccountStatus -> MemberAccountStatus -> Bool
$c/= :: MemberAccountStatus -> MemberAccountStatus -> Bool
== :: MemberAccountStatus -> MemberAccountStatus -> Bool
$c== :: MemberAccountStatus -> MemberAccountStatus -> Bool
Prelude.Eq, ReadPrec [MemberAccountStatus]
ReadPrec MemberAccountStatus
Int -> ReadS MemberAccountStatus
ReadS [MemberAccountStatus]
(Int -> ReadS MemberAccountStatus)
-> ReadS [MemberAccountStatus]
-> ReadPrec MemberAccountStatus
-> ReadPrec [MemberAccountStatus]
-> Read MemberAccountStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MemberAccountStatus]
$creadListPrec :: ReadPrec [MemberAccountStatus]
readPrec :: ReadPrec MemberAccountStatus
$creadPrec :: ReadPrec MemberAccountStatus
readList :: ReadS [MemberAccountStatus]
$creadList :: ReadS [MemberAccountStatus]
readsPrec :: Int -> ReadS MemberAccountStatus
$creadsPrec :: Int -> ReadS MemberAccountStatus
Prelude.Read, Int -> MemberAccountStatus -> ShowS
[MemberAccountStatus] -> ShowS
MemberAccountStatus -> String
(Int -> MemberAccountStatus -> ShowS)
-> (MemberAccountStatus -> String)
-> ([MemberAccountStatus] -> ShowS)
-> Show MemberAccountStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MemberAccountStatus] -> ShowS
$cshowList :: [MemberAccountStatus] -> ShowS
show :: MemberAccountStatus -> String
$cshow :: MemberAccountStatus -> String
showsPrec :: Int -> MemberAccountStatus -> ShowS
$cshowsPrec :: Int -> MemberAccountStatus -> ShowS
Prelude.Show, (forall x. MemberAccountStatus -> Rep MemberAccountStatus x)
-> (forall x. Rep MemberAccountStatus x -> MemberAccountStatus)
-> Generic MemberAccountStatus
forall x. Rep MemberAccountStatus x -> MemberAccountStatus
forall x. MemberAccountStatus -> Rep MemberAccountStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MemberAccountStatus x -> MemberAccountStatus
$cfrom :: forall x. MemberAccountStatus -> Rep MemberAccountStatus x
Prelude.Generic)
newMemberAccountStatus ::
Prelude.Text ->
Prelude.Text ->
MemberAccountRuleStatus ->
MemberAccountStatus
newMemberAccountStatus :: Text -> Text -> MemberAccountRuleStatus -> MemberAccountStatus
newMemberAccountStatus
Text
pAccountId_
Text
pConfigRuleName_
MemberAccountRuleStatus
pMemberAccountRuleStatus_ =
MemberAccountStatus' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> Text
-> MemberAccountRuleStatus
-> MemberAccountStatus
MemberAccountStatus'
{ $sel:errorCode:MemberAccountStatus' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:MemberAccountStatus' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateTime:MemberAccountStatus' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:accountId:MemberAccountStatus' :: Text
accountId = Text
pAccountId_,
$sel:configRuleName:MemberAccountStatus' :: Text
configRuleName = Text
pConfigRuleName_,
$sel:memberAccountRuleStatus:MemberAccountStatus' :: MemberAccountRuleStatus
memberAccountRuleStatus = MemberAccountRuleStatus
pMemberAccountRuleStatus_
}
memberAccountStatus_errorCode :: Lens.Lens' MemberAccountStatus (Prelude.Maybe Prelude.Text)
memberAccountStatus_errorCode :: (Maybe Text -> f (Maybe Text))
-> MemberAccountStatus -> f MemberAccountStatus
memberAccountStatus_errorCode = (MemberAccountStatus -> Maybe Text)
-> (MemberAccountStatus -> Maybe Text -> MemberAccountStatus)
-> Lens
MemberAccountStatus MemberAccountStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberAccountStatus' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:MemberAccountStatus' :: MemberAccountStatus -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: MemberAccountStatus
s@MemberAccountStatus' {} Maybe Text
a -> MemberAccountStatus
s {$sel:errorCode:MemberAccountStatus' :: Maybe Text
errorCode = Maybe Text
a} :: MemberAccountStatus)
memberAccountStatus_errorMessage :: Lens.Lens' MemberAccountStatus (Prelude.Maybe Prelude.Text)
memberAccountStatus_errorMessage :: (Maybe Text -> f (Maybe Text))
-> MemberAccountStatus -> f MemberAccountStatus
memberAccountStatus_errorMessage = (MemberAccountStatus -> Maybe Text)
-> (MemberAccountStatus -> Maybe Text -> MemberAccountStatus)
-> Lens
MemberAccountStatus MemberAccountStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberAccountStatus' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:MemberAccountStatus' :: MemberAccountStatus -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: MemberAccountStatus
s@MemberAccountStatus' {} Maybe Text
a -> MemberAccountStatus
s {$sel:errorMessage:MemberAccountStatus' :: Maybe Text
errorMessage = Maybe Text
a} :: MemberAccountStatus)
memberAccountStatus_lastUpdateTime :: Lens.Lens' MemberAccountStatus (Prelude.Maybe Prelude.UTCTime)
memberAccountStatus_lastUpdateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MemberAccountStatus -> f MemberAccountStatus
memberAccountStatus_lastUpdateTime = (MemberAccountStatus -> Maybe POSIX)
-> (MemberAccountStatus -> Maybe POSIX -> MemberAccountStatus)
-> Lens
MemberAccountStatus MemberAccountStatus (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberAccountStatus' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:MemberAccountStatus' :: MemberAccountStatus -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: MemberAccountStatus
s@MemberAccountStatus' {} Maybe POSIX
a -> MemberAccountStatus
s {$sel:lastUpdateTime:MemberAccountStatus' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: MemberAccountStatus) ((Maybe POSIX -> f (Maybe POSIX))
-> MemberAccountStatus -> f MemberAccountStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MemberAccountStatus
-> f MemberAccountStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
memberAccountStatus_accountId :: Lens.Lens' MemberAccountStatus Prelude.Text
memberAccountStatus_accountId :: (Text -> f Text) -> MemberAccountStatus -> f MemberAccountStatus
memberAccountStatus_accountId = (MemberAccountStatus -> Text)
-> (MemberAccountStatus -> Text -> MemberAccountStatus)
-> Lens MemberAccountStatus MemberAccountStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberAccountStatus' {Text
accountId :: Text
$sel:accountId:MemberAccountStatus' :: MemberAccountStatus -> Text
accountId} -> Text
accountId) (\s :: MemberAccountStatus
s@MemberAccountStatus' {} Text
a -> MemberAccountStatus
s {$sel:accountId:MemberAccountStatus' :: Text
accountId = Text
a} :: MemberAccountStatus)
memberAccountStatus_configRuleName :: Lens.Lens' MemberAccountStatus Prelude.Text
memberAccountStatus_configRuleName :: (Text -> f Text) -> MemberAccountStatus -> f MemberAccountStatus
memberAccountStatus_configRuleName = (MemberAccountStatus -> Text)
-> (MemberAccountStatus -> Text -> MemberAccountStatus)
-> Lens MemberAccountStatus MemberAccountStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberAccountStatus' {Text
configRuleName :: Text
$sel:configRuleName:MemberAccountStatus' :: MemberAccountStatus -> Text
configRuleName} -> Text
configRuleName) (\s :: MemberAccountStatus
s@MemberAccountStatus' {} Text
a -> MemberAccountStatus
s {$sel:configRuleName:MemberAccountStatus' :: Text
configRuleName = Text
a} :: MemberAccountStatus)
memberAccountStatus_memberAccountRuleStatus :: Lens.Lens' MemberAccountStatus MemberAccountRuleStatus
memberAccountStatus_memberAccountRuleStatus :: (MemberAccountRuleStatus -> f MemberAccountRuleStatus)
-> MemberAccountStatus -> f MemberAccountStatus
memberAccountStatus_memberAccountRuleStatus = (MemberAccountStatus -> MemberAccountRuleStatus)
-> (MemberAccountStatus
-> MemberAccountRuleStatus -> MemberAccountStatus)
-> Lens
MemberAccountStatus
MemberAccountStatus
MemberAccountRuleStatus
MemberAccountRuleStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MemberAccountStatus' {MemberAccountRuleStatus
memberAccountRuleStatus :: MemberAccountRuleStatus
$sel:memberAccountRuleStatus:MemberAccountStatus' :: MemberAccountStatus -> MemberAccountRuleStatus
memberAccountRuleStatus} -> MemberAccountRuleStatus
memberAccountRuleStatus) (\s :: MemberAccountStatus
s@MemberAccountStatus' {} MemberAccountRuleStatus
a -> MemberAccountStatus
s {$sel:memberAccountRuleStatus:MemberAccountStatus' :: MemberAccountRuleStatus
memberAccountRuleStatus = MemberAccountRuleStatus
a} :: MemberAccountStatus)
instance Core.FromJSON MemberAccountStatus where
parseJSON :: Value -> Parser MemberAccountStatus
parseJSON =
String
-> (Object -> Parser MemberAccountStatus)
-> Value
-> Parser MemberAccountStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MemberAccountStatus"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> Text
-> MemberAccountRuleStatus
-> MemberAccountStatus
MemberAccountStatus'
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> Text
-> MemberAccountRuleStatus
-> MemberAccountStatus)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Text
-> Text
-> MemberAccountRuleStatus
-> MemberAccountStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorCode")
Parser
(Maybe Text
-> Maybe POSIX
-> Text
-> Text
-> MemberAccountRuleStatus
-> MemberAccountStatus)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Text -> Text -> MemberAccountRuleStatus -> MemberAccountStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorMessage")
Parser
(Maybe POSIX
-> Text -> Text -> MemberAccountRuleStatus -> MemberAccountStatus)
-> Parser (Maybe POSIX)
-> Parser
(Text -> Text -> MemberAccountRuleStatus -> MemberAccountStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdateTime")
Parser
(Text -> Text -> MemberAccountRuleStatus -> MemberAccountStatus)
-> Parser Text
-> Parser (Text -> MemberAccountRuleStatus -> MemberAccountStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"AccountId")
Parser (Text -> MemberAccountRuleStatus -> MemberAccountStatus)
-> Parser Text
-> Parser (MemberAccountRuleStatus -> MemberAccountStatus)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ConfigRuleName")
Parser (MemberAccountRuleStatus -> MemberAccountStatus)
-> Parser MemberAccountRuleStatus -> Parser MemberAccountStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser MemberAccountRuleStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MemberAccountRuleStatus")
)
instance Prelude.Hashable MemberAccountStatus
instance Prelude.NFData MemberAccountStatus