{-# 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.CloudFormation.Types.StackEvent where
import Amazonka.CloudFormation.Types.ResourceStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StackEvent = StackEvent'
{
StackEvent -> Maybe Text
logicalResourceId :: Prelude.Maybe Prelude.Text,
StackEvent -> Maybe Text
physicalResourceId :: Prelude.Maybe Prelude.Text,
StackEvent -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
StackEvent -> Maybe Text
resourceStatusReason :: Prelude.Maybe Prelude.Text,
StackEvent -> Maybe Text
resourceProperties :: Prelude.Maybe Prelude.Text,
StackEvent -> Maybe ResourceStatus
resourceStatus :: Prelude.Maybe ResourceStatus,
StackEvent -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
StackEvent -> Text
stackId :: Prelude.Text,
StackEvent -> Text
eventId :: Prelude.Text,
StackEvent -> Text
stackName :: Prelude.Text,
StackEvent -> ISO8601
timestamp :: Core.ISO8601
}
deriving (StackEvent -> StackEvent -> Bool
(StackEvent -> StackEvent -> Bool)
-> (StackEvent -> StackEvent -> Bool) -> Eq StackEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackEvent -> StackEvent -> Bool
$c/= :: StackEvent -> StackEvent -> Bool
== :: StackEvent -> StackEvent -> Bool
$c== :: StackEvent -> StackEvent -> Bool
Prelude.Eq, ReadPrec [StackEvent]
ReadPrec StackEvent
Int -> ReadS StackEvent
ReadS [StackEvent]
(Int -> ReadS StackEvent)
-> ReadS [StackEvent]
-> ReadPrec StackEvent
-> ReadPrec [StackEvent]
-> Read StackEvent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StackEvent]
$creadListPrec :: ReadPrec [StackEvent]
readPrec :: ReadPrec StackEvent
$creadPrec :: ReadPrec StackEvent
readList :: ReadS [StackEvent]
$creadList :: ReadS [StackEvent]
readsPrec :: Int -> ReadS StackEvent
$creadsPrec :: Int -> ReadS StackEvent
Prelude.Read, Int -> StackEvent -> ShowS
[StackEvent] -> ShowS
StackEvent -> String
(Int -> StackEvent -> ShowS)
-> (StackEvent -> String)
-> ([StackEvent] -> ShowS)
-> Show StackEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackEvent] -> ShowS
$cshowList :: [StackEvent] -> ShowS
show :: StackEvent -> String
$cshow :: StackEvent -> String
showsPrec :: Int -> StackEvent -> ShowS
$cshowsPrec :: Int -> StackEvent -> ShowS
Prelude.Show, (forall x. StackEvent -> Rep StackEvent x)
-> (forall x. Rep StackEvent x -> StackEvent) -> Generic StackEvent
forall x. Rep StackEvent x -> StackEvent
forall x. StackEvent -> Rep StackEvent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackEvent x -> StackEvent
$cfrom :: forall x. StackEvent -> Rep StackEvent x
Prelude.Generic)
newStackEvent ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
StackEvent
newStackEvent :: Text -> Text -> Text -> UTCTime -> StackEvent
newStackEvent
Text
pStackId_
Text
pEventId_
Text
pStackName_
UTCTime
pTimestamp_ =
StackEvent' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent
StackEvent'
{ $sel:logicalResourceId:StackEvent' :: Maybe Text
logicalResourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:physicalResourceId:StackEvent' :: Maybe Text
physicalResourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:StackEvent' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceStatusReason:StackEvent' :: Maybe Text
resourceStatusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceProperties:StackEvent' :: Maybe Text
resourceProperties = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceStatus:StackEvent' :: Maybe ResourceStatus
resourceStatus = Maybe ResourceStatus
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:StackEvent' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:stackId:StackEvent' :: Text
stackId = Text
pStackId_,
$sel:eventId:StackEvent' :: Text
eventId = Text
pEventId_,
$sel:stackName:StackEvent' :: Text
stackName = Text
pStackName_,
$sel:timestamp:StackEvent' :: ISO8601
timestamp = Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601))
-> UTCTime -> ISO8601
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pTimestamp_
}
stackEvent_logicalResourceId :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_logicalResourceId :: (Maybe Text -> f (Maybe Text)) -> StackEvent -> f StackEvent
stackEvent_logicalResourceId = (StackEvent -> Maybe Text)
-> (StackEvent -> Maybe Text -> StackEvent)
-> Lens StackEvent StackEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe Text
logicalResourceId :: Maybe Text
$sel:logicalResourceId:StackEvent' :: StackEvent -> Maybe Text
logicalResourceId} -> Maybe Text
logicalResourceId) (\s :: StackEvent
s@StackEvent' {} Maybe Text
a -> StackEvent
s {$sel:logicalResourceId:StackEvent' :: Maybe Text
logicalResourceId = Maybe Text
a} :: StackEvent)
stackEvent_physicalResourceId :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_physicalResourceId :: (Maybe Text -> f (Maybe Text)) -> StackEvent -> f StackEvent
stackEvent_physicalResourceId = (StackEvent -> Maybe Text)
-> (StackEvent -> Maybe Text -> StackEvent)
-> Lens StackEvent StackEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe Text
physicalResourceId :: Maybe Text
$sel:physicalResourceId:StackEvent' :: StackEvent -> Maybe Text
physicalResourceId} -> Maybe Text
physicalResourceId) (\s :: StackEvent
s@StackEvent' {} Maybe Text
a -> StackEvent
s {$sel:physicalResourceId:StackEvent' :: Maybe Text
physicalResourceId = Maybe Text
a} :: StackEvent)
stackEvent_resourceType :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_resourceType :: (Maybe Text -> f (Maybe Text)) -> StackEvent -> f StackEvent
stackEvent_resourceType = (StackEvent -> Maybe Text)
-> (StackEvent -> Maybe Text -> StackEvent)
-> Lens StackEvent StackEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:StackEvent' :: StackEvent -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: StackEvent
s@StackEvent' {} Maybe Text
a -> StackEvent
s {$sel:resourceType:StackEvent' :: Maybe Text
resourceType = Maybe Text
a} :: StackEvent)
stackEvent_resourceStatusReason :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_resourceStatusReason :: (Maybe Text -> f (Maybe Text)) -> StackEvent -> f StackEvent
stackEvent_resourceStatusReason = (StackEvent -> Maybe Text)
-> (StackEvent -> Maybe Text -> StackEvent)
-> Lens StackEvent StackEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe Text
resourceStatusReason :: Maybe Text
$sel:resourceStatusReason:StackEvent' :: StackEvent -> Maybe Text
resourceStatusReason} -> Maybe Text
resourceStatusReason) (\s :: StackEvent
s@StackEvent' {} Maybe Text
a -> StackEvent
s {$sel:resourceStatusReason:StackEvent' :: Maybe Text
resourceStatusReason = Maybe Text
a} :: StackEvent)
stackEvent_resourceProperties :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_resourceProperties :: (Maybe Text -> f (Maybe Text)) -> StackEvent -> f StackEvent
stackEvent_resourceProperties = (StackEvent -> Maybe Text)
-> (StackEvent -> Maybe Text -> StackEvent)
-> Lens StackEvent StackEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe Text
resourceProperties :: Maybe Text
$sel:resourceProperties:StackEvent' :: StackEvent -> Maybe Text
resourceProperties} -> Maybe Text
resourceProperties) (\s :: StackEvent
s@StackEvent' {} Maybe Text
a -> StackEvent
s {$sel:resourceProperties:StackEvent' :: Maybe Text
resourceProperties = Maybe Text
a} :: StackEvent)
stackEvent_resourceStatus :: Lens.Lens' StackEvent (Prelude.Maybe ResourceStatus)
stackEvent_resourceStatus :: (Maybe ResourceStatus -> f (Maybe ResourceStatus))
-> StackEvent -> f StackEvent
stackEvent_resourceStatus = (StackEvent -> Maybe ResourceStatus)
-> (StackEvent -> Maybe ResourceStatus -> StackEvent)
-> Lens
StackEvent StackEvent (Maybe ResourceStatus) (Maybe ResourceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe ResourceStatus
resourceStatus :: Maybe ResourceStatus
$sel:resourceStatus:StackEvent' :: StackEvent -> Maybe ResourceStatus
resourceStatus} -> Maybe ResourceStatus
resourceStatus) (\s :: StackEvent
s@StackEvent' {} Maybe ResourceStatus
a -> StackEvent
s {$sel:resourceStatus:StackEvent' :: Maybe ResourceStatus
resourceStatus = Maybe ResourceStatus
a} :: StackEvent)
stackEvent_clientRequestToken :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_clientRequestToken :: (Maybe Text -> f (Maybe Text)) -> StackEvent -> f StackEvent
stackEvent_clientRequestToken = (StackEvent -> Maybe Text)
-> (StackEvent -> Maybe Text -> StackEvent)
-> Lens StackEvent StackEvent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:StackEvent' :: StackEvent -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: StackEvent
s@StackEvent' {} Maybe Text
a -> StackEvent
s {$sel:clientRequestToken:StackEvent' :: Maybe Text
clientRequestToken = Maybe Text
a} :: StackEvent)
stackEvent_stackId :: Lens.Lens' StackEvent Prelude.Text
stackEvent_stackId :: (Text -> f Text) -> StackEvent -> f StackEvent
stackEvent_stackId = (StackEvent -> Text)
-> (StackEvent -> Text -> StackEvent)
-> Lens StackEvent StackEvent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Text
stackId :: Text
$sel:stackId:StackEvent' :: StackEvent -> Text
stackId} -> Text
stackId) (\s :: StackEvent
s@StackEvent' {} Text
a -> StackEvent
s {$sel:stackId:StackEvent' :: Text
stackId = Text
a} :: StackEvent)
stackEvent_eventId :: Lens.Lens' StackEvent Prelude.Text
stackEvent_eventId :: (Text -> f Text) -> StackEvent -> f StackEvent
stackEvent_eventId = (StackEvent -> Text)
-> (StackEvent -> Text -> StackEvent)
-> Lens StackEvent StackEvent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Text
eventId :: Text
$sel:eventId:StackEvent' :: StackEvent -> Text
eventId} -> Text
eventId) (\s :: StackEvent
s@StackEvent' {} Text
a -> StackEvent
s {$sel:eventId:StackEvent' :: Text
eventId = Text
a} :: StackEvent)
stackEvent_stackName :: Lens.Lens' StackEvent Prelude.Text
stackEvent_stackName :: (Text -> f Text) -> StackEvent -> f StackEvent
stackEvent_stackName = (StackEvent -> Text)
-> (StackEvent -> Text -> StackEvent)
-> Lens StackEvent StackEvent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Text
stackName :: Text
$sel:stackName:StackEvent' :: StackEvent -> Text
stackName} -> Text
stackName) (\s :: StackEvent
s@StackEvent' {} Text
a -> StackEvent
s {$sel:stackName:StackEvent' :: Text
stackName = Text
a} :: StackEvent)
stackEvent_timestamp :: Lens.Lens' StackEvent Prelude.UTCTime
stackEvent_timestamp :: (UTCTime -> f UTCTime) -> StackEvent -> f StackEvent
stackEvent_timestamp = (StackEvent -> ISO8601)
-> (StackEvent -> ISO8601 -> StackEvent)
-> Lens StackEvent StackEvent ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {ISO8601
timestamp :: ISO8601
$sel:timestamp:StackEvent' :: StackEvent -> ISO8601
timestamp} -> ISO8601
timestamp) (\s :: StackEvent
s@StackEvent' {} ISO8601
a -> StackEvent
s {$sel:timestamp:StackEvent' :: ISO8601
timestamp = ISO8601
a} :: StackEvent) ((ISO8601 -> f ISO8601) -> StackEvent -> f StackEvent)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> StackEvent
-> f StackEvent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromXML StackEvent where
parseXML :: [Node] -> Either String StackEvent
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent
StackEvent'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LogicalResourceId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PhysicalResourceId")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ResourceType")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ResourceStatusReason")
Either
String
(Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent)
-> Either String (Maybe Text)
-> Either
String
(Maybe ResourceStatus
-> Maybe Text -> Text -> Text -> Text -> ISO8601 -> StackEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ResourceProperties")
Either
String
(Maybe ResourceStatus
-> Maybe Text -> Text -> Text -> Text -> ISO8601 -> StackEvent)
-> Either String (Maybe ResourceStatus)
-> Either
String
(Maybe Text -> Text -> Text -> Text -> ISO8601 -> StackEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ResourceStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ResourceStatus")
Either
String
(Maybe Text -> Text -> Text -> Text -> ISO8601 -> StackEvent)
-> Either String (Maybe Text)
-> Either String (Text -> Text -> Text -> ISO8601 -> StackEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ClientRequestToken")
Either String (Text -> Text -> Text -> ISO8601 -> StackEvent)
-> Either String Text
-> Either String (Text -> Text -> ISO8601 -> StackEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"StackId")
Either String (Text -> Text -> ISO8601 -> StackEvent)
-> Either String Text
-> Either String (Text -> ISO8601 -> StackEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"EventId")
Either String (Text -> ISO8601 -> StackEvent)
-> Either String Text -> Either String (ISO8601 -> StackEvent)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"StackName")
Either String (ISO8601 -> StackEvent)
-> Either String ISO8601 -> Either String StackEvent
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ISO8601
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Timestamp")
instance Prelude.Hashable StackEvent
instance Prelude.NFData StackEvent