{-# 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.OrganizationConfigRuleStatus where
import Amazonka.Config.Types.OrganizationRuleStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OrganizationConfigRuleStatus = OrganizationConfigRuleStatus'
{
OrganizationConfigRuleStatus -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
OrganizationConfigRuleStatus -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
OrganizationConfigRuleStatus -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Core.POSIX,
OrganizationConfigRuleStatus -> Text
organizationConfigRuleName :: Prelude.Text,
OrganizationConfigRuleStatus -> OrganizationRuleStatus
organizationRuleStatus :: OrganizationRuleStatus
}
deriving (OrganizationConfigRuleStatus
-> OrganizationConfigRuleStatus -> Bool
(OrganizationConfigRuleStatus
-> OrganizationConfigRuleStatus -> Bool)
-> (OrganizationConfigRuleStatus
-> OrganizationConfigRuleStatus -> Bool)
-> Eq OrganizationConfigRuleStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationConfigRuleStatus
-> OrganizationConfigRuleStatus -> Bool
$c/= :: OrganizationConfigRuleStatus
-> OrganizationConfigRuleStatus -> Bool
== :: OrganizationConfigRuleStatus
-> OrganizationConfigRuleStatus -> Bool
$c== :: OrganizationConfigRuleStatus
-> OrganizationConfigRuleStatus -> Bool
Prelude.Eq, ReadPrec [OrganizationConfigRuleStatus]
ReadPrec OrganizationConfigRuleStatus
Int -> ReadS OrganizationConfigRuleStatus
ReadS [OrganizationConfigRuleStatus]
(Int -> ReadS OrganizationConfigRuleStatus)
-> ReadS [OrganizationConfigRuleStatus]
-> ReadPrec OrganizationConfigRuleStatus
-> ReadPrec [OrganizationConfigRuleStatus]
-> Read OrganizationConfigRuleStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrganizationConfigRuleStatus]
$creadListPrec :: ReadPrec [OrganizationConfigRuleStatus]
readPrec :: ReadPrec OrganizationConfigRuleStatus
$creadPrec :: ReadPrec OrganizationConfigRuleStatus
readList :: ReadS [OrganizationConfigRuleStatus]
$creadList :: ReadS [OrganizationConfigRuleStatus]
readsPrec :: Int -> ReadS OrganizationConfigRuleStatus
$creadsPrec :: Int -> ReadS OrganizationConfigRuleStatus
Prelude.Read, Int -> OrganizationConfigRuleStatus -> ShowS
[OrganizationConfigRuleStatus] -> ShowS
OrganizationConfigRuleStatus -> String
(Int -> OrganizationConfigRuleStatus -> ShowS)
-> (OrganizationConfigRuleStatus -> String)
-> ([OrganizationConfigRuleStatus] -> ShowS)
-> Show OrganizationConfigRuleStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationConfigRuleStatus] -> ShowS
$cshowList :: [OrganizationConfigRuleStatus] -> ShowS
show :: OrganizationConfigRuleStatus -> String
$cshow :: OrganizationConfigRuleStatus -> String
showsPrec :: Int -> OrganizationConfigRuleStatus -> ShowS
$cshowsPrec :: Int -> OrganizationConfigRuleStatus -> ShowS
Prelude.Show, (forall x.
OrganizationConfigRuleStatus -> Rep OrganizationConfigRuleStatus x)
-> (forall x.
Rep OrganizationConfigRuleStatus x -> OrganizationConfigRuleStatus)
-> Generic OrganizationConfigRuleStatus
forall x.
Rep OrganizationConfigRuleStatus x -> OrganizationConfigRuleStatus
forall x.
OrganizationConfigRuleStatus -> Rep OrganizationConfigRuleStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OrganizationConfigRuleStatus x -> OrganizationConfigRuleStatus
$cfrom :: forall x.
OrganizationConfigRuleStatus -> Rep OrganizationConfigRuleStatus x
Prelude.Generic)
newOrganizationConfigRuleStatus ::
Prelude.Text ->
OrganizationRuleStatus ->
OrganizationConfigRuleStatus
newOrganizationConfigRuleStatus :: Text -> OrganizationRuleStatus -> OrganizationConfigRuleStatus
newOrganizationConfigRuleStatus
Text
pOrganizationConfigRuleName_
OrganizationRuleStatus
pOrganizationRuleStatus_ =
OrganizationConfigRuleStatus' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> OrganizationRuleStatus
-> OrganizationConfigRuleStatus
OrganizationConfigRuleStatus'
{ $sel:errorCode:OrganizationConfigRuleStatus' :: Maybe Text
errorCode =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:OrganizationConfigRuleStatus' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateTime:OrganizationConfigRuleStatus' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:organizationConfigRuleName:OrganizationConfigRuleStatus' :: Text
organizationConfigRuleName =
Text
pOrganizationConfigRuleName_,
$sel:organizationRuleStatus:OrganizationConfigRuleStatus' :: OrganizationRuleStatus
organizationRuleStatus =
OrganizationRuleStatus
pOrganizationRuleStatus_
}
organizationConfigRuleStatus_errorCode :: Lens.Lens' OrganizationConfigRuleStatus (Prelude.Maybe Prelude.Text)
organizationConfigRuleStatus_errorCode :: (Maybe Text -> f (Maybe Text))
-> OrganizationConfigRuleStatus -> f OrganizationConfigRuleStatus
organizationConfigRuleStatus_errorCode = (OrganizationConfigRuleStatus -> Maybe Text)
-> (OrganizationConfigRuleStatus
-> Maybe Text -> OrganizationConfigRuleStatus)
-> Lens
OrganizationConfigRuleStatus
OrganizationConfigRuleStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConfigRuleStatus' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:OrganizationConfigRuleStatus' :: OrganizationConfigRuleStatus -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: OrganizationConfigRuleStatus
s@OrganizationConfigRuleStatus' {} Maybe Text
a -> OrganizationConfigRuleStatus
s {$sel:errorCode:OrganizationConfigRuleStatus' :: Maybe Text
errorCode = Maybe Text
a} :: OrganizationConfigRuleStatus)
organizationConfigRuleStatus_errorMessage :: Lens.Lens' OrganizationConfigRuleStatus (Prelude.Maybe Prelude.Text)
organizationConfigRuleStatus_errorMessage :: (Maybe Text -> f (Maybe Text))
-> OrganizationConfigRuleStatus -> f OrganizationConfigRuleStatus
organizationConfigRuleStatus_errorMessage = (OrganizationConfigRuleStatus -> Maybe Text)
-> (OrganizationConfigRuleStatus
-> Maybe Text -> OrganizationConfigRuleStatus)
-> Lens
OrganizationConfigRuleStatus
OrganizationConfigRuleStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConfigRuleStatus' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:OrganizationConfigRuleStatus' :: OrganizationConfigRuleStatus -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: OrganizationConfigRuleStatus
s@OrganizationConfigRuleStatus' {} Maybe Text
a -> OrganizationConfigRuleStatus
s {$sel:errorMessage:OrganizationConfigRuleStatus' :: Maybe Text
errorMessage = Maybe Text
a} :: OrganizationConfigRuleStatus)
organizationConfigRuleStatus_lastUpdateTime :: Lens.Lens' OrganizationConfigRuleStatus (Prelude.Maybe Prelude.UTCTime)
organizationConfigRuleStatus_lastUpdateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> OrganizationConfigRuleStatus -> f OrganizationConfigRuleStatus
organizationConfigRuleStatus_lastUpdateTime = (OrganizationConfigRuleStatus -> Maybe POSIX)
-> (OrganizationConfigRuleStatus
-> Maybe POSIX -> OrganizationConfigRuleStatus)
-> Lens
OrganizationConfigRuleStatus
OrganizationConfigRuleStatus
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConfigRuleStatus' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:OrganizationConfigRuleStatus' :: OrganizationConfigRuleStatus -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: OrganizationConfigRuleStatus
s@OrganizationConfigRuleStatus' {} Maybe POSIX
a -> OrganizationConfigRuleStatus
s {$sel:lastUpdateTime:OrganizationConfigRuleStatus' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: OrganizationConfigRuleStatus) ((Maybe POSIX -> f (Maybe POSIX))
-> OrganizationConfigRuleStatus -> f OrganizationConfigRuleStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> OrganizationConfigRuleStatus
-> f OrganizationConfigRuleStatus
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
organizationConfigRuleStatus_organizationConfigRuleName :: Lens.Lens' OrganizationConfigRuleStatus Prelude.Text
organizationConfigRuleStatus_organizationConfigRuleName :: (Text -> f Text)
-> OrganizationConfigRuleStatus -> f OrganizationConfigRuleStatus
organizationConfigRuleStatus_organizationConfigRuleName = (OrganizationConfigRuleStatus -> Text)
-> (OrganizationConfigRuleStatus
-> Text -> OrganizationConfigRuleStatus)
-> Lens
OrganizationConfigRuleStatus OrganizationConfigRuleStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConfigRuleStatus' {Text
organizationConfigRuleName :: Text
$sel:organizationConfigRuleName:OrganizationConfigRuleStatus' :: OrganizationConfigRuleStatus -> Text
organizationConfigRuleName} -> Text
organizationConfigRuleName) (\s :: OrganizationConfigRuleStatus
s@OrganizationConfigRuleStatus' {} Text
a -> OrganizationConfigRuleStatus
s {$sel:organizationConfigRuleName:OrganizationConfigRuleStatus' :: Text
organizationConfigRuleName = Text
a} :: OrganizationConfigRuleStatus)
organizationConfigRuleStatus_organizationRuleStatus :: Lens.Lens' OrganizationConfigRuleStatus OrganizationRuleStatus
organizationConfigRuleStatus_organizationRuleStatus :: (OrganizationRuleStatus -> f OrganizationRuleStatus)
-> OrganizationConfigRuleStatus -> f OrganizationConfigRuleStatus
organizationConfigRuleStatus_organizationRuleStatus = (OrganizationConfigRuleStatus -> OrganizationRuleStatus)
-> (OrganizationConfigRuleStatus
-> OrganizationRuleStatus -> OrganizationConfigRuleStatus)
-> Lens
OrganizationConfigRuleStatus
OrganizationConfigRuleStatus
OrganizationRuleStatus
OrganizationRuleStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConfigRuleStatus' {OrganizationRuleStatus
organizationRuleStatus :: OrganizationRuleStatus
$sel:organizationRuleStatus:OrganizationConfigRuleStatus' :: OrganizationConfigRuleStatus -> OrganizationRuleStatus
organizationRuleStatus} -> OrganizationRuleStatus
organizationRuleStatus) (\s :: OrganizationConfigRuleStatus
s@OrganizationConfigRuleStatus' {} OrganizationRuleStatus
a -> OrganizationConfigRuleStatus
s {$sel:organizationRuleStatus:OrganizationConfigRuleStatus' :: OrganizationRuleStatus
organizationRuleStatus = OrganizationRuleStatus
a} :: OrganizationConfigRuleStatus)
instance Core.FromJSON OrganizationConfigRuleStatus where
parseJSON :: Value -> Parser OrganizationConfigRuleStatus
parseJSON =
String
-> (Object -> Parser OrganizationConfigRuleStatus)
-> Value
-> Parser OrganizationConfigRuleStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OrganizationConfigRuleStatus"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> OrganizationRuleStatus
-> OrganizationConfigRuleStatus
OrganizationConfigRuleStatus'
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> OrganizationRuleStatus
-> OrganizationConfigRuleStatus)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Text
-> OrganizationRuleStatus
-> OrganizationConfigRuleStatus)
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
-> OrganizationRuleStatus
-> OrganizationConfigRuleStatus)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Text -> OrganizationRuleStatus -> OrganizationConfigRuleStatus)
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 -> OrganizationRuleStatus -> OrganizationConfigRuleStatus)
-> Parser (Maybe POSIX)
-> Parser
(Text -> OrganizationRuleStatus -> OrganizationConfigRuleStatus)
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 -> OrganizationRuleStatus -> OrganizationConfigRuleStatus)
-> Parser Text
-> Parser (OrganizationRuleStatus -> OrganizationConfigRuleStatus)
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
"OrganizationConfigRuleName")
Parser (OrganizationRuleStatus -> OrganizationConfigRuleStatus)
-> Parser OrganizationRuleStatus
-> Parser OrganizationConfigRuleStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OrganizationRuleStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OrganizationRuleStatus")
)
instance
Prelude.Hashable
OrganizationConfigRuleStatus
instance Prelude.NFData OrganizationConfigRuleStatus