{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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 Data.POSIX,
OrganizationConformancePackStatus -> Text
organizationConformancePackName :: Prelude.Text,
OrganizationConformancePackStatus -> OrganizationResourceStatus
status :: OrganizationResourceStatus
}
deriving (OrganizationConformancePackStatus
-> OrganizationConformancePackStatus -> Bool
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]
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
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.
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'
{ $sel:errorCode:OrganizationConformancePackStatus' :: Maybe Text
errorCode =
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:OrganizationConformancePackStatus' :: Maybe Text
errorMessage = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateTime:OrganizationConformancePackStatus' :: Maybe POSIX
lastUpdateTime = 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 :: Lens' OrganizationConformancePackStatus (Maybe Text)
organizationConformancePackStatus_errorCode = 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 :: Lens' OrganizationConformancePackStatus (Maybe Text)
organizationConformancePackStatus_errorMessage = 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 :: Lens' OrganizationConformancePackStatus (Maybe UTCTime)
organizationConformancePackStatus_lastUpdateTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
organizationConformancePackStatus_organizationConformancePackName :: Lens.Lens' OrganizationConformancePackStatus Prelude.Text
organizationConformancePackStatus_organizationConformancePackName :: Lens' OrganizationConformancePackStatus Text
organizationConformancePackStatus_organizationConformancePackName = 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 :: Lens' OrganizationConformancePackStatus OrganizationResourceStatus
organizationConformancePackStatus_status = 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
Data.FromJSON
OrganizationConformancePackStatus
where
parseJSON :: Value -> Parser OrganizationConformancePackStatus
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"OrganizationConformancePackStatus"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Text
-> OrganizationResourceStatus
-> OrganizationConformancePackStatus
OrganizationConformancePackStatus'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorCode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ErrorMessage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastUpdateTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"OrganizationConformancePackName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Status")
)
instance
Prelude.Hashable
OrganizationConformancePackStatus
where
hashWithSalt :: Int -> OrganizationConformancePackStatus -> Int
hashWithSalt
Int
_salt
OrganizationConformancePackStatus' {Maybe Text
Maybe POSIX
Text
OrganizationResourceStatus
status :: OrganizationResourceStatus
organizationConformancePackName :: Text
lastUpdateTime :: Maybe POSIX
errorMessage :: Maybe Text
errorCode :: Maybe Text
$sel:status:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> OrganizationResourceStatus
$sel:organizationConformancePackName:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Text
$sel:lastUpdateTime:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Maybe POSIX
$sel:errorMessage:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Maybe Text
$sel:errorCode:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorCode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
errorMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
organizationConformancePackName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OrganizationResourceStatus
status
instance
Prelude.NFData
OrganizationConformancePackStatus
where
rnf :: OrganizationConformancePackStatus -> ()
rnf OrganizationConformancePackStatus' {Maybe Text
Maybe POSIX
Text
OrganizationResourceStatus
status :: OrganizationResourceStatus
organizationConformancePackName :: Text
lastUpdateTime :: Maybe POSIX
errorMessage :: Maybe Text
errorCode :: Maybe Text
$sel:status:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> OrganizationResourceStatus
$sel:organizationConformancePackName:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Text
$sel:lastUpdateTime:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Maybe POSIX
$sel:errorMessage:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Maybe Text
$sel:errorCode:OrganizationConformancePackStatus' :: OrganizationConformancePackStatus -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorCode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
errorMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
organizationConformancePackName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OrganizationResourceStatus
status