{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CloudFormation.Types.StackEvent where

import Amazonka.CloudFormation.Types.HookFailureMode
import Amazonka.CloudFormation.Types.HookInvocationPoint
import Amazonka.CloudFormation.Types.HookStatus
import Amazonka.CloudFormation.Types.ResourceStatus
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

-- | The StackEvent data type.
--
-- /See:/ 'newStackEvent' smart constructor.
data StackEvent = 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 -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | Specify the hook failure mode for non-compliant resources in the
    -- followings ways.
    --
    -- -   @FAIL@ Stops provisioning resources.
    --
    -- -   @WARN@ Allows provisioning to continue with a warning message.
    StackEvent -> Maybe HookFailureMode
hookFailureMode :: Prelude.Maybe HookFailureMode,
    -- | Invocation points are points in provisioning logic where hooks are
    -- initiated.
    StackEvent -> Maybe HookInvocationPoint
hookInvocationPoint :: Prelude.Maybe HookInvocationPoint,
    -- | Provides the status of the change set hook.
    StackEvent -> Maybe HookStatus
hookStatus :: Prelude.Maybe HookStatus,
    -- | Provides the reason for the hook status.
    StackEvent -> Maybe Text
hookStatusReason :: Prelude.Maybe Prelude.Text,
    -- | The name of the hook.
    StackEvent -> Maybe Text
hookType :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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,
    -- | Success\/failure message associated with the resource.
    StackEvent -> Maybe Text
resourceStatusReason :: 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,
    -- | 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 :: Data.ISO8601
  }
  deriving (StackEvent -> StackEvent -> Bool
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]
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
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. 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:
--
-- '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@.
--
-- 'hookFailureMode', 'stackEvent_hookFailureMode' - Specify the hook failure mode for non-compliant resources in the
-- followings ways.
--
-- -   @FAIL@ Stops provisioning resources.
--
-- -   @WARN@ Allows provisioning to continue with a warning message.
--
-- 'hookInvocationPoint', 'stackEvent_hookInvocationPoint' - Invocation points are points in provisioning logic where hooks are
-- initiated.
--
-- 'hookStatus', 'stackEvent_hookStatus' - Provides the status of the change set hook.
--
-- 'hookStatusReason', 'stackEvent_hookStatusReason' - Provides the reason for the hook status.
--
-- 'hookType', 'stackEvent_hookType' - The name of the hook.
--
-- '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.
--
-- 'resourceProperties', 'stackEvent_resourceProperties' - BLOB of the properties used to create the resource.
--
-- 'resourceStatus', 'stackEvent_resourceStatus' - Current status of the resource.
--
-- 'resourceStatusReason', 'stackEvent_resourceStatusReason' - Success\/failure message associated with 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.)
--
-- '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'
      { $sel:clientRequestToken:StackEvent' :: Maybe Text
clientRequestToken = forall a. Maybe a
Prelude.Nothing,
        $sel:hookFailureMode:StackEvent' :: Maybe HookFailureMode
hookFailureMode = forall a. Maybe a
Prelude.Nothing,
        $sel:hookInvocationPoint:StackEvent' :: Maybe HookInvocationPoint
hookInvocationPoint = forall a. Maybe a
Prelude.Nothing,
        $sel:hookStatus:StackEvent' :: Maybe HookStatus
hookStatus = forall a. Maybe a
Prelude.Nothing,
        $sel:hookStatusReason:StackEvent' :: Maybe Text
hookStatusReason = forall a. Maybe a
Prelude.Nothing,
        $sel:hookType:StackEvent' :: Maybe Text
hookType = forall a. Maybe a
Prelude.Nothing,
        $sel:logicalResourceId:StackEvent' :: Maybe Text
logicalResourceId = forall a. Maybe a
Prelude.Nothing,
        $sel:physicalResourceId:StackEvent' :: Maybe Text
physicalResourceId = forall a. Maybe a
Prelude.Nothing,
        $sel:resourceProperties:StackEvent' :: Maybe Text
resourceProperties = forall a. Maybe a
Prelude.Nothing,
        $sel:resourceStatus:StackEvent' :: Maybe ResourceStatus
resourceStatus = forall a. Maybe a
Prelude.Nothing,
        $sel:resourceStatusReason:StackEvent' :: Maybe Text
resourceStatusReason = forall a. Maybe a
Prelude.Nothing,
        $sel:resourceType:StackEvent' :: Maybe Text
resourceType = 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 = forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pTimestamp_
      }

-- | 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 :: Lens' StackEvent (Maybe Text)
stackEvent_clientRequestToken = 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)

-- | Specify the hook failure mode for non-compliant resources in the
-- followings ways.
--
-- -   @FAIL@ Stops provisioning resources.
--
-- -   @WARN@ Allows provisioning to continue with a warning message.
stackEvent_hookFailureMode :: Lens.Lens' StackEvent (Prelude.Maybe HookFailureMode)
stackEvent_hookFailureMode :: Lens' StackEvent (Maybe HookFailureMode)
stackEvent_hookFailureMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe HookFailureMode
hookFailureMode :: Maybe HookFailureMode
$sel:hookFailureMode:StackEvent' :: StackEvent -> Maybe HookFailureMode
hookFailureMode} -> Maybe HookFailureMode
hookFailureMode) (\s :: StackEvent
s@StackEvent' {} Maybe HookFailureMode
a -> StackEvent
s {$sel:hookFailureMode:StackEvent' :: Maybe HookFailureMode
hookFailureMode = Maybe HookFailureMode
a} :: StackEvent)

-- | Invocation points are points in provisioning logic where hooks are
-- initiated.
stackEvent_hookInvocationPoint :: Lens.Lens' StackEvent (Prelude.Maybe HookInvocationPoint)
stackEvent_hookInvocationPoint :: Lens' StackEvent (Maybe HookInvocationPoint)
stackEvent_hookInvocationPoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe HookInvocationPoint
hookInvocationPoint :: Maybe HookInvocationPoint
$sel:hookInvocationPoint:StackEvent' :: StackEvent -> Maybe HookInvocationPoint
hookInvocationPoint} -> Maybe HookInvocationPoint
hookInvocationPoint) (\s :: StackEvent
s@StackEvent' {} Maybe HookInvocationPoint
a -> StackEvent
s {$sel:hookInvocationPoint:StackEvent' :: Maybe HookInvocationPoint
hookInvocationPoint = Maybe HookInvocationPoint
a} :: StackEvent)

-- | Provides the status of the change set hook.
stackEvent_hookStatus :: Lens.Lens' StackEvent (Prelude.Maybe HookStatus)
stackEvent_hookStatus :: Lens' StackEvent (Maybe HookStatus)
stackEvent_hookStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe HookStatus
hookStatus :: Maybe HookStatus
$sel:hookStatus:StackEvent' :: StackEvent -> Maybe HookStatus
hookStatus} -> Maybe HookStatus
hookStatus) (\s :: StackEvent
s@StackEvent' {} Maybe HookStatus
a -> StackEvent
s {$sel:hookStatus:StackEvent' :: Maybe HookStatus
hookStatus = Maybe HookStatus
a} :: StackEvent)

-- | Provides the reason for the hook status.
stackEvent_hookStatusReason :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_hookStatusReason :: Lens' StackEvent (Maybe Text)
stackEvent_hookStatusReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe Text
hookStatusReason :: Maybe Text
$sel:hookStatusReason:StackEvent' :: StackEvent -> Maybe Text
hookStatusReason} -> Maybe Text
hookStatusReason) (\s :: StackEvent
s@StackEvent' {} Maybe Text
a -> StackEvent
s {$sel:hookStatusReason:StackEvent' :: Maybe Text
hookStatusReason = Maybe Text
a} :: StackEvent)

-- | The name of the hook.
stackEvent_hookType :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_hookType :: Lens' StackEvent (Maybe Text)
stackEvent_hookType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackEvent' {Maybe Text
hookType :: Maybe Text
$sel:hookType:StackEvent' :: StackEvent -> Maybe Text
hookType} -> Maybe Text
hookType) (\s :: StackEvent
s@StackEvent' {} Maybe Text
a -> StackEvent
s {$sel:hookType:StackEvent' :: Maybe Text
hookType = Maybe Text
a} :: StackEvent)

-- | The logical name of the resource specified in the template.
stackEvent_logicalResourceId :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_logicalResourceId :: Lens' StackEvent (Maybe Text)
stackEvent_logicalResourceId = 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 :: Lens' StackEvent (Maybe Text)
stackEvent_physicalResourceId = 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)

-- | BLOB of the properties used to create the resource.
stackEvent_resourceProperties :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_resourceProperties :: Lens' StackEvent (Maybe Text)
stackEvent_resourceProperties = 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 :: Lens' StackEvent (Maybe ResourceStatus)
stackEvent_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)

-- | Success\/failure message associated with the resource.
stackEvent_resourceStatusReason :: Lens.Lens' StackEvent (Prelude.Maybe Prelude.Text)
stackEvent_resourceStatusReason :: Lens' StackEvent (Maybe Text)
stackEvent_resourceStatusReason = 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)

-- | 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 :: Lens' StackEvent (Maybe Text)
stackEvent_resourceType = 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)

-- | The unique ID name of the instance of the stack.
stackEvent_stackId :: Lens.Lens' StackEvent Prelude.Text
stackEvent_stackId :: Lens' StackEvent Text
stackEvent_stackId = 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 :: Lens' StackEvent Text
stackEvent_eventId = 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 :: Lens' StackEvent Text
stackEvent_stackName = 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 :: Lens' StackEvent UTCTime
stackEvent_timestamp = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance Data.FromXML StackEvent where
  parseXML :: [Node] -> Either String StackEvent
parseXML [Node]
x =
    Maybe Text
-> Maybe HookFailureMode
-> Maybe HookInvocationPoint
-> Maybe HookStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> StackEvent
StackEvent'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ClientRequestToken")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"HookFailureMode")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"HookInvocationPoint")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"HookStatus")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"HookStatusReason")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"HookType")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"LogicalResourceId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"PhysicalResourceId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ResourceProperties")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ResourceStatus")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ResourceStatusReason")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ResourceType")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"StackId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"EventId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"StackName")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Timestamp")

instance Prelude.Hashable StackEvent where
  hashWithSalt :: Int -> StackEvent -> Int
hashWithSalt Int
_salt StackEvent' {Maybe Text
Maybe HookFailureMode
Maybe HookInvocationPoint
Maybe HookStatus
Maybe ResourceStatus
Text
ISO8601
timestamp :: ISO8601
stackName :: Text
eventId :: Text
stackId :: Text
resourceType :: Maybe Text
resourceStatusReason :: Maybe Text
resourceStatus :: Maybe ResourceStatus
resourceProperties :: Maybe Text
physicalResourceId :: Maybe Text
logicalResourceId :: Maybe Text
hookType :: Maybe Text
hookStatusReason :: Maybe Text
hookStatus :: Maybe HookStatus
hookInvocationPoint :: Maybe HookInvocationPoint
hookFailureMode :: Maybe HookFailureMode
clientRequestToken :: Maybe Text
$sel:timestamp:StackEvent' :: StackEvent -> ISO8601
$sel:stackName:StackEvent' :: StackEvent -> Text
$sel:eventId:StackEvent' :: StackEvent -> Text
$sel:stackId:StackEvent' :: StackEvent -> Text
$sel:resourceType:StackEvent' :: StackEvent -> Maybe Text
$sel:resourceStatusReason:StackEvent' :: StackEvent -> Maybe Text
$sel:resourceStatus:StackEvent' :: StackEvent -> Maybe ResourceStatus
$sel:resourceProperties:StackEvent' :: StackEvent -> Maybe Text
$sel:physicalResourceId:StackEvent' :: StackEvent -> Maybe Text
$sel:logicalResourceId:StackEvent' :: StackEvent -> Maybe Text
$sel:hookType:StackEvent' :: StackEvent -> Maybe Text
$sel:hookStatusReason:StackEvent' :: StackEvent -> Maybe Text
$sel:hookStatus:StackEvent' :: StackEvent -> Maybe HookStatus
$sel:hookInvocationPoint:StackEvent' :: StackEvent -> Maybe HookInvocationPoint
$sel:hookFailureMode:StackEvent' :: StackEvent -> Maybe HookFailureMode
$sel:clientRequestToken:StackEvent' :: StackEvent -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HookFailureMode
hookFailureMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HookInvocationPoint
hookInvocationPoint
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HookStatus
hookStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hookStatusReason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hookType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
logicalResourceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
physicalResourceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceProperties
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceStatus
resourceStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceStatusReason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
eventId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ISO8601
timestamp

instance Prelude.NFData StackEvent where
  rnf :: StackEvent -> ()
rnf StackEvent' {Maybe Text
Maybe HookFailureMode
Maybe HookInvocationPoint
Maybe HookStatus
Maybe ResourceStatus
Text
ISO8601
timestamp :: ISO8601
stackName :: Text
eventId :: Text
stackId :: Text
resourceType :: Maybe Text
resourceStatusReason :: Maybe Text
resourceStatus :: Maybe ResourceStatus
resourceProperties :: Maybe Text
physicalResourceId :: Maybe Text
logicalResourceId :: Maybe Text
hookType :: Maybe Text
hookStatusReason :: Maybe Text
hookStatus :: Maybe HookStatus
hookInvocationPoint :: Maybe HookInvocationPoint
hookFailureMode :: Maybe HookFailureMode
clientRequestToken :: Maybe Text
$sel:timestamp:StackEvent' :: StackEvent -> ISO8601
$sel:stackName:StackEvent' :: StackEvent -> Text
$sel:eventId:StackEvent' :: StackEvent -> Text
$sel:stackId:StackEvent' :: StackEvent -> Text
$sel:resourceType:StackEvent' :: StackEvent -> Maybe Text
$sel:resourceStatusReason:StackEvent' :: StackEvent -> Maybe Text
$sel:resourceStatus:StackEvent' :: StackEvent -> Maybe ResourceStatus
$sel:resourceProperties:StackEvent' :: StackEvent -> Maybe Text
$sel:physicalResourceId:StackEvent' :: StackEvent -> Maybe Text
$sel:logicalResourceId:StackEvent' :: StackEvent -> Maybe Text
$sel:hookType:StackEvent' :: StackEvent -> Maybe Text
$sel:hookStatusReason:StackEvent' :: StackEvent -> Maybe Text
$sel:hookStatus:StackEvent' :: StackEvent -> Maybe HookStatus
$sel:hookInvocationPoint:StackEvent' :: StackEvent -> Maybe HookInvocationPoint
$sel:hookFailureMode:StackEvent' :: StackEvent -> Maybe HookFailureMode
$sel:clientRequestToken:StackEvent' :: StackEvent -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HookFailureMode
hookFailureMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HookInvocationPoint
hookInvocationPoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HookStatus
hookStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hookStatusReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hookType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
logicalResourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
physicalResourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceProperties
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceStatus
resourceStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceStatusReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
eventId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
timestamp