{-# 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.OrganizationConformancePackStatus where
import Amazonka.Config.Types.OrganizationResourceStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OrganizationConformancePackStatus = OrganizationConformancePackStatus'
{
OrganizationConformancePackStatus -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
OrganizationConformancePackStatus -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
OrganizationConformancePackStatus -> Maybe POSIX
lastUpdateTime :: Prelude.Maybe Core.POSIX,
OrganizationConformancePackStatus -> Text
organizationConformancePackName :: Prelude.Text,
OrganizationConformancePackStatus -> OrganizationResourceStatus
status :: OrganizationResourceStatus
}
deriving (OrganizationConformancePackStatus
-> OrganizationConformancePackStatus -> Bool
(OrganizationConformancePackStatus
-> OrganizationConformancePackStatus -> Bool)
-> (OrganizationConformancePackStatus
-> OrganizationConformancePackStatus -> Bool)
-> Eq OrganizationConformancePackStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrganizationConformancePackStatus
-> OrganizationConformancePackStatus -> Bool
$c/= :: OrganizationConformancePackStatus
-> OrganizationConformancePackStatus -> Bool
== :: OrganizationConformancePackStatus
-> OrganizationConformancePackStatus -> Bool
$c== :: OrganizationConformancePackStatus
-> OrganizationConformancePackStatus -> Bool
Prelude.Eq, ReadPrec [OrganizationConformancePackStatus]
ReadPrec OrganizationConformancePackStatus
Int -> ReadS OrganizationConformancePackStatus
ReadS [OrganizationConformancePackStatus]
(Int -> ReadS OrganizationConformancePackStatus)
-> ReadS [OrganizationConformancePackStatus]
-> ReadPrec OrganizationConformancePackStatus
-> ReadPrec [OrganizationConformancePackStatus]
-> Read OrganizationConformancePackStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrganizationConformancePackStatus]
$creadListPrec :: ReadPrec [OrganizationConformancePackStatus]
readPrec :: ReadPrec OrganizationConformancePackStatus
$creadPrec :: ReadPrec OrganizationConformancePackStatus
readList :: ReadS [OrganizationConformancePackStatus]
$creadList :: ReadS [OrganizationConformancePackStatus]
readsPrec :: Int -> ReadS OrganizationConformancePackStatus
$creadsPrec :: Int -> ReadS OrganizationConformancePackStatus
Prelude.Read, Int -> OrganizationConformancePackStatus -> ShowS
[OrganizationConformancePackStatus] -> ShowS
OrganizationConformancePackStatus -> String
(Int -> OrganizationConformancePackStatus -> ShowS)
-> (OrganizationConformancePackStatus -> String)
-> ([OrganizationConformancePackStatus] -> ShowS)
-> Show OrganizationConformancePackStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrganizationConformancePackStatus] -> ShowS
$cshowList :: [OrganizationConformancePackStatus] -> ShowS
show :: OrganizationConformancePackStatus -> String
$cshow :: OrganizationConformancePackStatus -> String
showsPrec :: Int -> OrganizationConformancePackStatus -> ShowS
$cshowsPrec :: Int -> OrganizationConformancePackStatus -> ShowS
Prelude.Show, (forall x.
OrganizationConformancePackStatus
-> Rep OrganizationConformancePackStatus x)
-> (forall x.
Rep OrganizationConformancePackStatus x
-> OrganizationConformancePackStatus)
-> Generic OrganizationConformancePackStatus
forall x.
Rep OrganizationConformancePackStatus x
-> OrganizationConformancePackStatus
forall x.
OrganizationConformancePackStatus
-> Rep OrganizationConformancePackStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OrganizationConformancePackStatus x
-> OrganizationConformancePackStatus
$cfrom :: forall x.
OrganizationConformancePackStatus
-> Rep OrganizationConformancePackStatus x
Prelude.Generic)
newOrganizationConformancePackStatus ::
Prelude.Text ->
OrganizationResourceStatus ->
OrganizationConformancePackStatus
newOrganizationConformancePackStatus :: Text
-> OrganizationResourceStatus -> OrganizationConformancePackStatus
newOrganizationConformancePackStatus
Text
pOrganizationConformancePackName_
OrganizationResourceStatus
pStatus_ =
OrganizationConformancePackStatus' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> OrganizationResourceStatus
-> OrganizationConformancePackStatus
OrganizationConformancePackStatus'
{ $sel:errorCode:OrganizationConformancePackStatus' :: Maybe Text
errorCode =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:OrganizationConformancePackStatus' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateTime:OrganizationConformancePackStatus' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:organizationConformancePackName:OrganizationConformancePackStatus' :: Text
organizationConformancePackName =
Text
pOrganizationConformancePackName_,
$sel:status:OrganizationConformancePackStatus' :: OrganizationResourceStatus
status = OrganizationResourceStatus
pStatus_
}
organizationConformancePackStatus_errorCode :: Lens.Lens' OrganizationConformancePackStatus (Prelude.Maybe Prelude.Text)
organizationConformancePackStatus_errorCode :: (Maybe Text -> f (Maybe Text))
-> OrganizationConformancePackStatus
-> f OrganizationConformancePackStatus
organizationConformancePackStatus_errorCode = (OrganizationConformancePackStatus -> Maybe Text)
-> (OrganizationConformancePackStatus
-> Maybe Text -> OrganizationConformancePackStatus)
-> Lens
OrganizationConformancePackStatus
OrganizationConformancePackStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePackStatus' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: OrganizationConformancePackStatus
s@OrganizationConformancePackStatus' {} Maybe Text
a -> OrganizationConformancePackStatus
s {$sel:errorCode:OrganizationConformancePackStatus' :: Maybe Text
errorCode = Maybe Text
a} :: OrganizationConformancePackStatus)
organizationConformancePackStatus_errorMessage :: Lens.Lens' OrganizationConformancePackStatus (Prelude.Maybe Prelude.Text)
organizationConformancePackStatus_errorMessage :: (Maybe Text -> f (Maybe Text))
-> OrganizationConformancePackStatus
-> f OrganizationConformancePackStatus
organizationConformancePackStatus_errorMessage = (OrganizationConformancePackStatus -> Maybe Text)
-> (OrganizationConformancePackStatus
-> Maybe Text -> OrganizationConformancePackStatus)
-> Lens
OrganizationConformancePackStatus
OrganizationConformancePackStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePackStatus' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: OrganizationConformancePackStatus
s@OrganizationConformancePackStatus' {} Maybe Text
a -> OrganizationConformancePackStatus
s {$sel:errorMessage:OrganizationConformancePackStatus' :: Maybe Text
errorMessage = Maybe Text
a} :: OrganizationConformancePackStatus)
organizationConformancePackStatus_lastUpdateTime :: Lens.Lens' OrganizationConformancePackStatus (Prelude.Maybe Prelude.UTCTime)
organizationConformancePackStatus_lastUpdateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> OrganizationConformancePackStatus
-> f OrganizationConformancePackStatus
organizationConformancePackStatus_lastUpdateTime = (OrganizationConformancePackStatus -> Maybe POSIX)
-> (OrganizationConformancePackStatus
-> Maybe POSIX -> OrganizationConformancePackStatus)
-> Lens
OrganizationConformancePackStatus
OrganizationConformancePackStatus
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePackStatus' {Maybe POSIX
lastUpdateTime :: Maybe POSIX
$sel:lastUpdateTime:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Maybe POSIX
lastUpdateTime} -> Maybe POSIX
lastUpdateTime) (\s :: OrganizationConformancePackStatus
s@OrganizationConformancePackStatus' {} Maybe POSIX
a -> OrganizationConformancePackStatus
s {$sel:lastUpdateTime:OrganizationConformancePackStatus' :: Maybe POSIX
lastUpdateTime = Maybe POSIX
a} :: OrganizationConformancePackStatus) ((Maybe POSIX -> f (Maybe POSIX))
-> OrganizationConformancePackStatus
-> f OrganizationConformancePackStatus)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> OrganizationConformancePackStatus
-> f OrganizationConformancePackStatus
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
organizationConformancePackStatus_organizationConformancePackName :: Lens.Lens' OrganizationConformancePackStatus Prelude.Text
organizationConformancePackStatus_organizationConformancePackName :: (Text -> f Text)
-> OrganizationConformancePackStatus
-> f OrganizationConformancePackStatus
organizationConformancePackStatus_organizationConformancePackName = (OrganizationConformancePackStatus -> Text)
-> (OrganizationConformancePackStatus
-> Text -> OrganizationConformancePackStatus)
-> Lens
OrganizationConformancePackStatus
OrganizationConformancePackStatus
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePackStatus' {Text
organizationConformancePackName :: Text
$sel:organizationConformancePackName:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Text
organizationConformancePackName} -> Text
organizationConformancePackName) (\s :: OrganizationConformancePackStatus
s@OrganizationConformancePackStatus' {} Text
a -> OrganizationConformancePackStatus
s {$sel:organizationConformancePackName:OrganizationConformancePackStatus' :: Text
organizationConformancePackName = Text
a} :: OrganizationConformancePackStatus)
organizationConformancePackStatus_status :: Lens.Lens' OrganizationConformancePackStatus OrganizationResourceStatus
organizationConformancePackStatus_status :: (OrganizationResourceStatus -> f OrganizationResourceStatus)
-> OrganizationConformancePackStatus
-> f OrganizationConformancePackStatus
organizationConformancePackStatus_status = (OrganizationConformancePackStatus -> OrganizationResourceStatus)
-> (OrganizationConformancePackStatus
-> OrganizationResourceStatus -> OrganizationConformancePackStatus)
-> Lens
OrganizationConformancePackStatus
OrganizationConformancePackStatus
OrganizationResourceStatus
OrganizationResourceStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrganizationConformancePackStatus' {OrganizationResourceStatus
status :: OrganizationResourceStatus
$sel:status:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> OrganizationResourceStatus
status} -> OrganizationResourceStatus
status) (\s :: OrganizationConformancePackStatus
s@OrganizationConformancePackStatus' {} OrganizationResourceStatus
a -> OrganizationConformancePackStatus
s {$sel:status:OrganizationConformancePackStatus' :: OrganizationResourceStatus
status = OrganizationResourceStatus
a} :: OrganizationConformancePackStatus)
instance
Core.FromJSON
OrganizationConformancePackStatus
where
parseJSON :: Value -> Parser OrganizationConformancePackStatus
parseJSON =
String
-> (Object -> Parser OrganizationConformancePackStatus)
-> Value
-> Parser OrganizationConformancePackStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OrganizationConformancePackStatus"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> OrganizationResourceStatus
-> OrganizationConformancePackStatus
OrganizationConformancePackStatus'
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> OrganizationResourceStatus
-> OrganizationConformancePackStatus)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Text
-> OrganizationResourceStatus
-> OrganizationConformancePackStatus)
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
-> OrganizationResourceStatus
-> OrganizationConformancePackStatus)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Text
-> OrganizationResourceStatus
-> OrganizationConformancePackStatus)
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
-> OrganizationResourceStatus
-> OrganizationConformancePackStatus)
-> Parser (Maybe POSIX)
-> Parser
(Text
-> OrganizationResourceStatus -> OrganizationConformancePackStatus)
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
-> OrganizationResourceStatus -> OrganizationConformancePackStatus)
-> Parser Text
-> Parser
(OrganizationResourceStatus -> OrganizationConformancePackStatus)
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
"OrganizationConformancePackName")
Parser
(OrganizationResourceStatus -> OrganizationConformancePackStatus)
-> Parser OrganizationResourceStatus
-> Parser OrganizationConformancePackStatus
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser OrganizationResourceStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Status")
)
instance
Prelude.Hashable
OrganizationConformancePackStatus
instance
Prelude.NFData
OrganizationConformancePackStatus