{-# 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.ConformancePackStatusDetail where
import Amazonka.Config.Types.ConformancePackState
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConformancePackStatusDetail = ConformancePackStatusDetail'
{
ConformancePackStatusDetail -> Maybe Text
conformancePackStatusReason :: Prelude.Maybe Prelude.Text,
ConformancePackStatusDetail -> Maybe POSIX
lastUpdateCompletedTime :: Prelude.Maybe Core.POSIX,
ConformancePackStatusDetail -> Text
conformancePackName :: Prelude.Text,
ConformancePackStatusDetail -> Text
conformancePackId :: Prelude.Text,
ConformancePackStatusDetail -> Text
conformancePackArn :: Prelude.Text,
ConformancePackStatusDetail -> ConformancePackState
conformancePackState :: ConformancePackState,
ConformancePackStatusDetail -> Text
stackArn :: Prelude.Text,
ConformancePackStatusDetail -> POSIX
lastUpdateRequestedTime :: Core.POSIX
}
deriving (ConformancePackStatusDetail -> ConformancePackStatusDetail -> Bool
(ConformancePackStatusDetail
-> ConformancePackStatusDetail -> Bool)
-> (ConformancePackStatusDetail
-> ConformancePackStatusDetail -> Bool)
-> Eq ConformancePackStatusDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConformancePackStatusDetail -> ConformancePackStatusDetail -> Bool
$c/= :: ConformancePackStatusDetail -> ConformancePackStatusDetail -> Bool
== :: ConformancePackStatusDetail -> ConformancePackStatusDetail -> Bool
$c== :: ConformancePackStatusDetail -> ConformancePackStatusDetail -> Bool
Prelude.Eq, ReadPrec [ConformancePackStatusDetail]
ReadPrec ConformancePackStatusDetail
Int -> ReadS ConformancePackStatusDetail
ReadS [ConformancePackStatusDetail]
(Int -> ReadS ConformancePackStatusDetail)
-> ReadS [ConformancePackStatusDetail]
-> ReadPrec ConformancePackStatusDetail
-> ReadPrec [ConformancePackStatusDetail]
-> Read ConformancePackStatusDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConformancePackStatusDetail]
$creadListPrec :: ReadPrec [ConformancePackStatusDetail]
readPrec :: ReadPrec ConformancePackStatusDetail
$creadPrec :: ReadPrec ConformancePackStatusDetail
readList :: ReadS [ConformancePackStatusDetail]
$creadList :: ReadS [ConformancePackStatusDetail]
readsPrec :: Int -> ReadS ConformancePackStatusDetail
$creadsPrec :: Int -> ReadS ConformancePackStatusDetail
Prelude.Read, Int -> ConformancePackStatusDetail -> ShowS
[ConformancePackStatusDetail] -> ShowS
ConformancePackStatusDetail -> String
(Int -> ConformancePackStatusDetail -> ShowS)
-> (ConformancePackStatusDetail -> String)
-> ([ConformancePackStatusDetail] -> ShowS)
-> Show ConformancePackStatusDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConformancePackStatusDetail] -> ShowS
$cshowList :: [ConformancePackStatusDetail] -> ShowS
show :: ConformancePackStatusDetail -> String
$cshow :: ConformancePackStatusDetail -> String
showsPrec :: Int -> ConformancePackStatusDetail -> ShowS
$cshowsPrec :: Int -> ConformancePackStatusDetail -> ShowS
Prelude.Show, (forall x.
ConformancePackStatusDetail -> Rep ConformancePackStatusDetail x)
-> (forall x.
Rep ConformancePackStatusDetail x -> ConformancePackStatusDetail)
-> Generic ConformancePackStatusDetail
forall x.
Rep ConformancePackStatusDetail x -> ConformancePackStatusDetail
forall x.
ConformancePackStatusDetail -> Rep ConformancePackStatusDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConformancePackStatusDetail x -> ConformancePackStatusDetail
$cfrom :: forall x.
ConformancePackStatusDetail -> Rep ConformancePackStatusDetail x
Prelude.Generic)
newConformancePackStatusDetail ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ConformancePackState ->
Prelude.Text ->
Prelude.UTCTime ->
ConformancePackStatusDetail
newConformancePackStatusDetail :: Text
-> Text
-> Text
-> ConformancePackState
-> Text
-> UTCTime
-> ConformancePackStatusDetail
newConformancePackStatusDetail
Text
pConformancePackName_
Text
pConformancePackId_
Text
pConformancePackArn_
ConformancePackState
pConformancePackState_
Text
pStackArn_
UTCTime
pLastUpdateRequestedTime_ =
ConformancePackStatusDetail' :: Maybe Text
-> Maybe POSIX
-> Text
-> Text
-> Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail
ConformancePackStatusDetail'
{ $sel:conformancePackStatusReason:ConformancePackStatusDetail' :: Maybe Text
conformancePackStatusReason =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdateCompletedTime:ConformancePackStatusDetail' :: Maybe POSIX
lastUpdateCompletedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:conformancePackName:ConformancePackStatusDetail' :: Text
conformancePackName = Text
pConformancePackName_,
$sel:conformancePackId:ConformancePackStatusDetail' :: Text
conformancePackId = Text
pConformancePackId_,
$sel:conformancePackArn:ConformancePackStatusDetail' :: Text
conformancePackArn = Text
pConformancePackArn_,
$sel:conformancePackState:ConformancePackStatusDetail' :: ConformancePackState
conformancePackState = ConformancePackState
pConformancePackState_,
$sel:stackArn:ConformancePackStatusDetail' :: Text
stackArn = Text
pStackArn_,
$sel:lastUpdateRequestedTime:ConformancePackStatusDetail' :: POSIX
lastUpdateRequestedTime =
Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pLastUpdateRequestedTime_
}
conformancePackStatusDetail_conformancePackStatusReason :: Lens.Lens' ConformancePackStatusDetail (Prelude.Maybe Prelude.Text)
conformancePackStatusDetail_conformancePackStatusReason :: (Maybe Text -> f (Maybe Text))
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail
conformancePackStatusDetail_conformancePackStatusReason = (ConformancePackStatusDetail -> Maybe Text)
-> (ConformancePackStatusDetail
-> Maybe Text -> ConformancePackStatusDetail)
-> Lens
ConformancePackStatusDetail
ConformancePackStatusDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackStatusDetail' {Maybe Text
conformancePackStatusReason :: Maybe Text
$sel:conformancePackStatusReason:ConformancePackStatusDetail' :: ConformancePackStatusDetail -> Maybe Text
conformancePackStatusReason} -> Maybe Text
conformancePackStatusReason) (\s :: ConformancePackStatusDetail
s@ConformancePackStatusDetail' {} Maybe Text
a -> ConformancePackStatusDetail
s {$sel:conformancePackStatusReason:ConformancePackStatusDetail' :: Maybe Text
conformancePackStatusReason = Maybe Text
a} :: ConformancePackStatusDetail)
conformancePackStatusDetail_lastUpdateCompletedTime :: Lens.Lens' ConformancePackStatusDetail (Prelude.Maybe Prelude.UTCTime)
conformancePackStatusDetail_lastUpdateCompletedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail
conformancePackStatusDetail_lastUpdateCompletedTime = (ConformancePackStatusDetail -> Maybe POSIX)
-> (ConformancePackStatusDetail
-> Maybe POSIX -> ConformancePackStatusDetail)
-> Lens
ConformancePackStatusDetail
ConformancePackStatusDetail
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackStatusDetail' {Maybe POSIX
lastUpdateCompletedTime :: Maybe POSIX
$sel:lastUpdateCompletedTime:ConformancePackStatusDetail' :: ConformancePackStatusDetail -> Maybe POSIX
lastUpdateCompletedTime} -> Maybe POSIX
lastUpdateCompletedTime) (\s :: ConformancePackStatusDetail
s@ConformancePackStatusDetail' {} Maybe POSIX
a -> ConformancePackStatusDetail
s {$sel:lastUpdateCompletedTime:ConformancePackStatusDetail' :: Maybe POSIX
lastUpdateCompletedTime = Maybe POSIX
a} :: ConformancePackStatusDetail) ((Maybe POSIX -> f (Maybe POSIX))
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ConformancePackStatusDetail
-> f ConformancePackStatusDetail
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
conformancePackStatusDetail_conformancePackName :: Lens.Lens' ConformancePackStatusDetail Prelude.Text
conformancePackStatusDetail_conformancePackName :: (Text -> f Text)
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail
conformancePackStatusDetail_conformancePackName = (ConformancePackStatusDetail -> Text)
-> (ConformancePackStatusDetail
-> Text -> ConformancePackStatusDetail)
-> Lens
ConformancePackStatusDetail ConformancePackStatusDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackStatusDetail' {Text
conformancePackName :: Text
$sel:conformancePackName:ConformancePackStatusDetail' :: ConformancePackStatusDetail -> Text
conformancePackName} -> Text
conformancePackName) (\s :: ConformancePackStatusDetail
s@ConformancePackStatusDetail' {} Text
a -> ConformancePackStatusDetail
s {$sel:conformancePackName:ConformancePackStatusDetail' :: Text
conformancePackName = Text
a} :: ConformancePackStatusDetail)
conformancePackStatusDetail_conformancePackId :: Lens.Lens' ConformancePackStatusDetail Prelude.Text
conformancePackStatusDetail_conformancePackId :: (Text -> f Text)
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail
conformancePackStatusDetail_conformancePackId = (ConformancePackStatusDetail -> Text)
-> (ConformancePackStatusDetail
-> Text -> ConformancePackStatusDetail)
-> Lens
ConformancePackStatusDetail ConformancePackStatusDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackStatusDetail' {Text
conformancePackId :: Text
$sel:conformancePackId:ConformancePackStatusDetail' :: ConformancePackStatusDetail -> Text
conformancePackId} -> Text
conformancePackId) (\s :: ConformancePackStatusDetail
s@ConformancePackStatusDetail' {} Text
a -> ConformancePackStatusDetail
s {$sel:conformancePackId:ConformancePackStatusDetail' :: Text
conformancePackId = Text
a} :: ConformancePackStatusDetail)
conformancePackStatusDetail_conformancePackArn :: Lens.Lens' ConformancePackStatusDetail Prelude.Text
conformancePackStatusDetail_conformancePackArn :: (Text -> f Text)
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail
conformancePackStatusDetail_conformancePackArn = (ConformancePackStatusDetail -> Text)
-> (ConformancePackStatusDetail
-> Text -> ConformancePackStatusDetail)
-> Lens
ConformancePackStatusDetail ConformancePackStatusDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackStatusDetail' {Text
conformancePackArn :: Text
$sel:conformancePackArn:ConformancePackStatusDetail' :: ConformancePackStatusDetail -> Text
conformancePackArn} -> Text
conformancePackArn) (\s :: ConformancePackStatusDetail
s@ConformancePackStatusDetail' {} Text
a -> ConformancePackStatusDetail
s {$sel:conformancePackArn:ConformancePackStatusDetail' :: Text
conformancePackArn = Text
a} :: ConformancePackStatusDetail)
conformancePackStatusDetail_conformancePackState :: Lens.Lens' ConformancePackStatusDetail ConformancePackState
conformancePackStatusDetail_conformancePackState :: (ConformancePackState -> f ConformancePackState)
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail
conformancePackStatusDetail_conformancePackState = (ConformancePackStatusDetail -> ConformancePackState)
-> (ConformancePackStatusDetail
-> ConformancePackState -> ConformancePackStatusDetail)
-> Lens
ConformancePackStatusDetail
ConformancePackStatusDetail
ConformancePackState
ConformancePackState
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackStatusDetail' {ConformancePackState
conformancePackState :: ConformancePackState
$sel:conformancePackState:ConformancePackStatusDetail' :: ConformancePackStatusDetail -> ConformancePackState
conformancePackState} -> ConformancePackState
conformancePackState) (\s :: ConformancePackStatusDetail
s@ConformancePackStatusDetail' {} ConformancePackState
a -> ConformancePackStatusDetail
s {$sel:conformancePackState:ConformancePackStatusDetail' :: ConformancePackState
conformancePackState = ConformancePackState
a} :: ConformancePackStatusDetail)
conformancePackStatusDetail_stackArn :: Lens.Lens' ConformancePackStatusDetail Prelude.Text
conformancePackStatusDetail_stackArn :: (Text -> f Text)
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail
conformancePackStatusDetail_stackArn = (ConformancePackStatusDetail -> Text)
-> (ConformancePackStatusDetail
-> Text -> ConformancePackStatusDetail)
-> Lens
ConformancePackStatusDetail ConformancePackStatusDetail Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackStatusDetail' {Text
stackArn :: Text
$sel:stackArn:ConformancePackStatusDetail' :: ConformancePackStatusDetail -> Text
stackArn} -> Text
stackArn) (\s :: ConformancePackStatusDetail
s@ConformancePackStatusDetail' {} Text
a -> ConformancePackStatusDetail
s {$sel:stackArn:ConformancePackStatusDetail' :: Text
stackArn = Text
a} :: ConformancePackStatusDetail)
conformancePackStatusDetail_lastUpdateRequestedTime :: Lens.Lens' ConformancePackStatusDetail Prelude.UTCTime
conformancePackStatusDetail_lastUpdateRequestedTime :: (UTCTime -> f UTCTime)
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail
conformancePackStatusDetail_lastUpdateRequestedTime = (ConformancePackStatusDetail -> POSIX)
-> (ConformancePackStatusDetail
-> POSIX -> ConformancePackStatusDetail)
-> Lens
ConformancePackStatusDetail ConformancePackStatusDetail POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConformancePackStatusDetail' {POSIX
lastUpdateRequestedTime :: POSIX
$sel:lastUpdateRequestedTime:ConformancePackStatusDetail' :: ConformancePackStatusDetail -> POSIX
lastUpdateRequestedTime} -> POSIX
lastUpdateRequestedTime) (\s :: ConformancePackStatusDetail
s@ConformancePackStatusDetail' {} POSIX
a -> ConformancePackStatusDetail
s {$sel:lastUpdateRequestedTime:ConformancePackStatusDetail' :: POSIX
lastUpdateRequestedTime = POSIX
a} :: ConformancePackStatusDetail) ((POSIX -> f POSIX)
-> ConformancePackStatusDetail -> f ConformancePackStatusDetail)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ConformancePackStatusDetail
-> f ConformancePackStatusDetail
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON ConformancePackStatusDetail where
parseJSON :: Value -> Parser ConformancePackStatusDetail
parseJSON =
String
-> (Object -> Parser ConformancePackStatusDetail)
-> Value
-> Parser ConformancePackStatusDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConformancePackStatusDetail"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Text
-> Text
-> Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail
ConformancePackStatusDetail'
(Maybe Text
-> Maybe POSIX
-> Text
-> Text
-> Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Text
-> Text
-> Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail)
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
"ConformancePackStatusReason")
Parser
(Maybe POSIX
-> Text
-> Text
-> Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail)
-> Parser (Maybe POSIX)
-> Parser
(Text
-> Text
-> Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail)
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
"LastUpdateCompletedTime")
Parser
(Text
-> Text
-> Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail)
-> Parser Text
-> Parser
(Text
-> Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail)
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
"ConformancePackName")
Parser
(Text
-> Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail)
-> Parser Text
-> Parser
(Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail)
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
"ConformancePackId")
Parser
(Text
-> ConformancePackState
-> Text
-> POSIX
-> ConformancePackStatusDetail)
-> Parser Text
-> Parser
(ConformancePackState
-> Text -> POSIX -> ConformancePackStatusDetail)
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
"ConformancePackArn")
Parser
(ConformancePackState
-> Text -> POSIX -> ConformancePackStatusDetail)
-> Parser ConformancePackState
-> Parser (Text -> POSIX -> ConformancePackStatusDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ConformancePackState
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ConformancePackState")
Parser (Text -> POSIX -> ConformancePackStatusDetail)
-> Parser Text -> Parser (POSIX -> ConformancePackStatusDetail)
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
"StackArn")
Parser (POSIX -> ConformancePackStatusDetail)
-> Parser POSIX -> Parser ConformancePackStatusDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LastUpdateRequestedTime")
)
instance Prelude.Hashable ConformancePackStatusDetail
instance Prelude.NFData ConformancePackStatusDetail