{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudFormation.Types.StackEvent
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
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

-- | The StackEvent data type.
--
-- /See:/ 'newStackEvent' smart constructor.
data StackEvent = StackEvent'
  { -- | The logical name of the resource specified in the template.
    StackEvent -> Maybe Text
logicalResourceId :: Prelude.Maybe Prelude.Text,
    -- | The name or unique identifier associated with the physical instance of
    -- the resource.
    StackEvent -> Maybe Text
physicalResourceId :: Prelude.Maybe Prelude.Text,
    -- | Type of resource. (For more information, go to
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Amazon Web Services Resource Types Reference>
    -- in the CloudFormation User Guide.)
    StackEvent -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
    -- | Success\/failure message associated with the resource.
    StackEvent -> Maybe Text
resourceStatusReason :: Prelude.Maybe Prelude.Text,
    -- | BLOB of the properties used to create the resource.
    StackEvent -> Maybe Text
resourceProperties :: Prelude.Maybe Prelude.Text,
    -- | Current status of the resource.
    StackEvent -> Maybe ResourceStatus
resourceStatus :: Prelude.Maybe ResourceStatus,
    -- | The token passed to the operation that generated this event.
    --
    -- All events triggered by a given stack operation are assigned the same
    -- client request token, which you can use to track operations. For
    -- example, if you execute a @CreateStack@ operation with the token
    -- @token1@, then all the @StackEvents@ generated by that operation will
    -- have @ClientRequestToken@ set as @token1@.
    --
    -- In the console, stack operations display the client request token on the
    -- Events tab. Stack operations that are initiated from the console use the
    -- token format /Console-StackOperation-ID/, which helps you easily
    -- identify the stack operation . For example, if you create a stack using
    -- the console, each stack event would be assigned the same token in the
    -- following format:
    -- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@.
    StackEvent -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The unique ID name of the instance of the stack.
    StackEvent -> Text
stackId :: Prelude.Text,
    -- | The unique ID of this event.
    StackEvent -> Text
eventId :: Prelude.Text,
    -- | The name associated with a stack.
    StackEvent -> Text
stackName :: Prelude.Text,
    -- | Time the status was updated.
    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)

-- |
-- Create a value of 'StackEvent' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'logicalResourceId', 'stackEvent_logicalResourceId' - The logical name of the resource specified in the template.
--
-- 'physicalResourceId', 'stackEvent_physicalResourceId' - The name or unique identifier associated with the physical instance of
-- the resource.
--
-- 'resourceType', 'stackEvent_resourceType' - Type of resource. (For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Amazon Web Services Resource Types Reference>
-- in the CloudFormation User Guide.)
--
-- 'resourceStatusReason', 'stackEvent_resourceStatusReason' - Success\/failure message associated with the resource.
--
-- 'resourceProperties', 'stackEvent_resourceProperties' - BLOB of the properties used to create the resource.
--
-- 'resourceStatus', 'stackEvent_resourceStatus' - Current status of the resource.
--
-- 'clientRequestToken', 'stackEvent_clientRequestToken' - The token passed to the operation that generated this event.
--
-- All events triggered by a given stack operation are assigned the same
-- client request token, which you can use to track operations. For
-- example, if you execute a @CreateStack@ operation with the token
-- @token1@, then all the @StackEvents@ generated by that operation will
-- have @ClientRequestToken@ set as @token1@.
--
-- In the console, stack operations display the client request token on the
-- Events tab. Stack operations that are initiated from the console use the
-- token format /Console-StackOperation-ID/, which helps you easily
-- identify the stack operation . For example, if you create a stack using
-- the console, each stack event would be assigned the same token in the
-- following format:
-- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@.
--
-- 'stackId', 'stackEvent_stackId' - The unique ID name of the instance of the stack.
--
-- 'eventId', 'stackEvent_eventId' - The unique ID of this event.
--
-- 'stackName', 'stackEvent_stackName' - The name associated with a stack.
--
-- 'timestamp', 'stackEvent_timestamp' - Time the status was updated.
newStackEvent ::
  -- | 'stackId'
  Prelude.Text ->
  -- | 'eventId'
  Prelude.Text ->
  -- | 'stackName'
  Prelude.Text ->
  -- | 'timestamp'
  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_
      }

-- | The logical name of the resource specified in the template.
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)

-- | The name or unique identifier associated with the physical instance of
-- the resource.
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)

-- | Type of resource. (For more information, go to
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html Amazon Web Services Resource Types Reference>
-- in the CloudFormation User Guide.)
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)

-- | Success\/failure message associated with the resource.
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)

-- | BLOB of the properties used to create the resource.
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)

-- | Current status of the resource.
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)

-- | The token passed to the operation that generated this event.
--
-- All events triggered by a given stack operation are assigned the same
-- client request token, which you can use to track operations. For
-- example, if you execute a @CreateStack@ operation with the token
-- @token1@, then all the @StackEvents@ generated by that operation will
-- have @ClientRequestToken@ set as @token1@.
--
-- In the console, stack operations display the client request token on the
-- Events tab. Stack operations that are initiated from the console use the
-- token format /Console-StackOperation-ID/, which helps you easily
-- identify the stack operation . For example, if you create a stack using
-- the console, each stack event would be assigned the same token in the
-- following format:
-- @Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002@.
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)

-- | The unique ID name of the instance of the stack.
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)

-- | The unique ID of this event.
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)

-- | The name associated with a stack.
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)

-- | Time the status was updated.
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