{-# 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.Stack
-- 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.Stack where

import Amazonka.CloudFormation.Types.Capability
import Amazonka.CloudFormation.Types.Output
import Amazonka.CloudFormation.Types.Parameter
import Amazonka.CloudFormation.Types.RollbackConfiguration
import Amazonka.CloudFormation.Types.StackDriftInformation
import Amazonka.CloudFormation.Types.StackStatus
import Amazonka.CloudFormation.Types.Tag
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The Stack data type.
--
-- /See:/ 'newStack' smart constructor.
data Stack = Stack'
  { -- | Boolean to enable or disable rollback on stack creation failures:
    --
    -- -   @true@: disable rollback
    --
    -- -   @false@: enable rollback
    Stack -> Maybe Bool
disableRollback :: Prelude.Maybe Prelude.Bool,
    -- | The time the stack was last updated. This field will only be returned if
    -- the stack has been updated at least once.
    Stack -> Maybe ISO8601
lastUpdatedTime :: Prelude.Maybe Core.ISO8601,
    -- | For nested stacks--stacks created as resources for another stack--the
    -- stack ID of the top-level stack to which the nested stack ultimately
    -- belongs.
    --
    -- For more information, see
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html Working with Nested Stacks>
    -- in the /CloudFormation User Guide/.
    Stack -> Maybe Text
rootId :: Prelude.Maybe Prelude.Text,
    -- | SNS topic ARNs to which stack related events are published.
    Stack -> Maybe [Text]
notificationARNs :: Prelude.Maybe [Prelude.Text],
    -- | Success\/failure message associated with the stack status.
    Stack -> Maybe Text
stackStatusReason :: Prelude.Maybe Prelude.Text,
    -- | Whether termination protection is enabled for the stack.
    --
    -- For
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html nested stacks>,
    -- termination protection is set on the root stack and cannot be changed
    -- directly on the nested stack. For more information, see
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html Protecting a Stack From Being Deleted>
    -- in the /CloudFormation User Guide/.
    Stack -> Maybe Bool
enableTerminationProtection :: Prelude.Maybe Prelude.Bool,
    -- | Information on whether a stack\'s actual configuration differs, or has
    -- /drifted/, from it\'s expected configuration, as defined in the stack
    -- template and any values specified as template parameters. For more
    -- information, see
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html Detecting Unregulated Configuration Changes to Stacks and Resources>.
    Stack -> Maybe StackDriftInformation
driftInformation :: Prelude.Maybe StackDriftInformation,
    -- | The unique ID of the change set.
    Stack -> Maybe Text
changeSetId :: Prelude.Maybe Prelude.Text,
    -- | The time the stack was deleted.
    Stack -> Maybe ISO8601
deletionTime :: Prelude.Maybe Core.ISO8601,
    -- | A list of output structures.
    Stack -> Maybe [Output]
outputs :: Prelude.Maybe [Output],
    -- | A list of @Parameter@ structures.
    Stack -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | Unique identifier of the stack.
    Stack -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | A user-defined description associated with the stack.
    Stack -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The capabilities allowed in the stack.
    Stack -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability],
    -- | The rollback triggers for CloudFormation to monitor during stack
    -- creation and updating operations, and for the specified monitoring
    -- period afterwards.
    Stack -> Maybe RollbackConfiguration
rollbackConfiguration :: Prelude.Maybe RollbackConfiguration,
    -- | A list of @Tag@s that specify information about the stack.
    Stack -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The amount of time within which stack creation should complete.
    Stack -> Maybe Natural
timeoutInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | For nested stacks--stacks created as resources for another stack--the
    -- stack ID of the direct parent of this stack. For the first level of
    -- nested stacks, the root stack is also the parent stack.
    --
    -- For more information, see
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html Working with Nested Stacks>
    -- in the /CloudFormation User Guide/.
    Stack -> Maybe Text
parentId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of an Identity and Access Management
    -- (IAM) role that is associated with the stack. During a stack operation,
    -- CloudFormation uses this role\'s credentials to make calls on your
    -- behalf.
    Stack -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | The name associated with the stack.
    Stack -> Text
stackName :: Prelude.Text,
    -- | The time at which the stack was created.
    Stack -> ISO8601
creationTime :: Core.ISO8601,
    -- | Current status of the stack.
    Stack -> StackStatus
stackStatus :: StackStatus
  }
  deriving (Stack -> Stack -> Bool
(Stack -> Stack -> Bool) -> (Stack -> Stack -> Bool) -> Eq Stack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Stack -> Stack -> Bool
$c/= :: Stack -> Stack -> Bool
== :: Stack -> Stack -> Bool
$c== :: Stack -> Stack -> Bool
Prelude.Eq, ReadPrec [Stack]
ReadPrec Stack
Int -> ReadS Stack
ReadS [Stack]
(Int -> ReadS Stack)
-> ReadS [Stack]
-> ReadPrec Stack
-> ReadPrec [Stack]
-> Read Stack
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Stack]
$creadListPrec :: ReadPrec [Stack]
readPrec :: ReadPrec Stack
$creadPrec :: ReadPrec Stack
readList :: ReadS [Stack]
$creadList :: ReadS [Stack]
readsPrec :: Int -> ReadS Stack
$creadsPrec :: Int -> ReadS Stack
Prelude.Read, Int -> Stack -> ShowS
[Stack] -> ShowS
Stack -> String
(Int -> Stack -> ShowS)
-> (Stack -> String) -> ([Stack] -> ShowS) -> Show Stack
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Stack] -> ShowS
$cshowList :: [Stack] -> ShowS
show :: Stack -> String
$cshow :: Stack -> String
showsPrec :: Int -> Stack -> ShowS
$cshowsPrec :: Int -> Stack -> ShowS
Prelude.Show, (forall x. Stack -> Rep Stack x)
-> (forall x. Rep Stack x -> Stack) -> Generic Stack
forall x. Rep Stack x -> Stack
forall x. Stack -> Rep Stack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Stack x -> Stack
$cfrom :: forall x. Stack -> Rep Stack x
Prelude.Generic)

-- |
-- Create a value of 'Stack' 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:
--
-- 'disableRollback', 'stack_disableRollback' - Boolean to enable or disable rollback on stack creation failures:
--
-- -   @true@: disable rollback
--
-- -   @false@: enable rollback
--
-- 'lastUpdatedTime', 'stack_lastUpdatedTime' - The time the stack was last updated. This field will only be returned if
-- the stack has been updated at least once.
--
-- 'rootId', 'stack_rootId' - For nested stacks--stacks created as resources for another stack--the
-- stack ID of the top-level stack to which the nested stack ultimately
-- belongs.
--
-- For more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html Working with Nested Stacks>
-- in the /CloudFormation User Guide/.
--
-- 'notificationARNs', 'stack_notificationARNs' - SNS topic ARNs to which stack related events are published.
--
-- 'stackStatusReason', 'stack_stackStatusReason' - Success\/failure message associated with the stack status.
--
-- 'enableTerminationProtection', 'stack_enableTerminationProtection' - Whether termination protection is enabled for the stack.
--
-- For
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html nested stacks>,
-- termination protection is set on the root stack and cannot be changed
-- directly on the nested stack. For more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html Protecting a Stack From Being Deleted>
-- in the /CloudFormation User Guide/.
--
-- 'driftInformation', 'stack_driftInformation' - Information on whether a stack\'s actual configuration differs, or has
-- /drifted/, from it\'s expected configuration, as defined in the stack
-- template and any values specified as template parameters. For more
-- information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html Detecting Unregulated Configuration Changes to Stacks and Resources>.
--
-- 'changeSetId', 'stack_changeSetId' - The unique ID of the change set.
--
-- 'deletionTime', 'stack_deletionTime' - The time the stack was deleted.
--
-- 'outputs', 'stack_outputs' - A list of output structures.
--
-- 'parameters', 'stack_parameters' - A list of @Parameter@ structures.
--
-- 'stackId', 'stack_stackId' - Unique identifier of the stack.
--
-- 'description', 'stack_description' - A user-defined description associated with the stack.
--
-- 'capabilities', 'stack_capabilities' - The capabilities allowed in the stack.
--
-- 'rollbackConfiguration', 'stack_rollbackConfiguration' - The rollback triggers for CloudFormation to monitor during stack
-- creation and updating operations, and for the specified monitoring
-- period afterwards.
--
-- 'tags', 'stack_tags' - A list of @Tag@s that specify information about the stack.
--
-- 'timeoutInMinutes', 'stack_timeoutInMinutes' - The amount of time within which stack creation should complete.
--
-- 'parentId', 'stack_parentId' - For nested stacks--stacks created as resources for another stack--the
-- stack ID of the direct parent of this stack. For the first level of
-- nested stacks, the root stack is also the parent stack.
--
-- For more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html Working with Nested Stacks>
-- in the /CloudFormation User Guide/.
--
-- 'roleARN', 'stack_roleARN' - The Amazon Resource Name (ARN) of an Identity and Access Management
-- (IAM) role that is associated with the stack. During a stack operation,
-- CloudFormation uses this role\'s credentials to make calls on your
-- behalf.
--
-- 'stackName', 'stack_stackName' - The name associated with the stack.
--
-- 'creationTime', 'stack_creationTime' - The time at which the stack was created.
--
-- 'stackStatus', 'stack_stackStatus' - Current status of the stack.
newStack ::
  -- | 'stackName'
  Prelude.Text ->
  -- | 'creationTime'
  Prelude.UTCTime ->
  -- | 'stackStatus'
  StackStatus ->
  Stack
newStack :: Text -> UTCTime -> StackStatus -> Stack
newStack Text
pStackName_ UTCTime
pCreationTime_ StackStatus
pStackStatus_ =
  Stack' :: Maybe Bool
-> Maybe ISO8601
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe StackDriftInformation
-> Maybe Text
-> Maybe ISO8601
-> Maybe [Output]
-> Maybe [Parameter]
-> Maybe Text
-> Maybe Text
-> Maybe [Capability]
-> Maybe RollbackConfiguration
-> Maybe [Tag]
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Text
-> ISO8601
-> StackStatus
-> Stack
Stack'
    { $sel:disableRollback:Stack' :: Maybe Bool
disableRollback = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTime:Stack' :: Maybe ISO8601
lastUpdatedTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:rootId:Stack' :: Maybe Text
rootId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationARNs:Stack' :: Maybe [Text]
notificationARNs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackStatusReason:Stack' :: Maybe Text
stackStatusReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enableTerminationProtection:Stack' :: Maybe Bool
enableTerminationProtection = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:driftInformation:Stack' :: Maybe StackDriftInformation
driftInformation = Maybe StackDriftInformation
forall a. Maybe a
Prelude.Nothing,
      $sel:changeSetId:Stack' :: Maybe Text
changeSetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deletionTime:Stack' :: Maybe ISO8601
deletionTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:outputs:Stack' :: Maybe [Output]
outputs = Maybe [Output]
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:Stack' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:Stack' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Stack' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:capabilities:Stack' :: Maybe [Capability]
capabilities = Maybe [Capability]
forall a. Maybe a
Prelude.Nothing,
      $sel:rollbackConfiguration:Stack' :: Maybe RollbackConfiguration
rollbackConfiguration = Maybe RollbackConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Stack' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMinutes:Stack' :: Maybe Natural
timeoutInMinutes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:parentId:Stack' :: Maybe Text
parentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:Stack' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:Stack' :: Text
stackName = Text
pStackName_,
      $sel:creationTime:Stack' :: ISO8601
creationTime = 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
pCreationTime_,
      $sel:stackStatus:Stack' :: StackStatus
stackStatus = StackStatus
pStackStatus_
    }

-- | Boolean to enable or disable rollback on stack creation failures:
--
-- -   @true@: disable rollback
--
-- -   @false@: enable rollback
stack_disableRollback :: Lens.Lens' Stack (Prelude.Maybe Prelude.Bool)
stack_disableRollback :: (Maybe Bool -> f (Maybe Bool)) -> Stack -> f Stack
stack_disableRollback = (Stack -> Maybe Bool)
-> (Stack -> Maybe Bool -> Stack)
-> Lens Stack Stack (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Bool
disableRollback :: Maybe Bool
$sel:disableRollback:Stack' :: Stack -> Maybe Bool
disableRollback} -> Maybe Bool
disableRollback) (\s :: Stack
s@Stack' {} Maybe Bool
a -> Stack
s {$sel:disableRollback:Stack' :: Maybe Bool
disableRollback = Maybe Bool
a} :: Stack)

-- | The time the stack was last updated. This field will only be returned if
-- the stack has been updated at least once.
stack_lastUpdatedTime :: Lens.Lens' Stack (Prelude.Maybe Prelude.UTCTime)
stack_lastUpdatedTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Stack -> f Stack
stack_lastUpdatedTime = (Stack -> Maybe ISO8601)
-> (Stack -> Maybe ISO8601 -> Stack)
-> Lens Stack Stack (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe ISO8601
lastUpdatedTime :: Maybe ISO8601
$sel:lastUpdatedTime:Stack' :: Stack -> Maybe ISO8601
lastUpdatedTime} -> Maybe ISO8601
lastUpdatedTime) (\s :: Stack
s@Stack' {} Maybe ISO8601
a -> Stack
s {$sel:lastUpdatedTime:Stack' :: Maybe ISO8601
lastUpdatedTime = Maybe ISO8601
a} :: Stack) ((Maybe ISO8601 -> f (Maybe ISO8601)) -> Stack -> f Stack)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | For nested stacks--stacks created as resources for another stack--the
-- stack ID of the top-level stack to which the nested stack ultimately
-- belongs.
--
-- For more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html Working with Nested Stacks>
-- in the /CloudFormation User Guide/.
stack_rootId :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_rootId :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_rootId = (Stack -> Maybe Text)
-> (Stack -> Maybe Text -> Stack)
-> Lens Stack Stack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Text
rootId :: Maybe Text
$sel:rootId:Stack' :: Stack -> Maybe Text
rootId} -> Maybe Text
rootId) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:rootId:Stack' :: Maybe Text
rootId = Maybe Text
a} :: Stack)

-- | SNS topic ARNs to which stack related events are published.
stack_notificationARNs :: Lens.Lens' Stack (Prelude.Maybe [Prelude.Text])
stack_notificationARNs :: (Maybe [Text] -> f (Maybe [Text])) -> Stack -> f Stack
stack_notificationARNs = (Stack -> Maybe [Text])
-> (Stack -> Maybe [Text] -> Stack)
-> Lens Stack Stack (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe [Text]
notificationARNs :: Maybe [Text]
$sel:notificationARNs:Stack' :: Stack -> Maybe [Text]
notificationARNs} -> Maybe [Text]
notificationARNs) (\s :: Stack
s@Stack' {} Maybe [Text]
a -> Stack
s {$sel:notificationARNs:Stack' :: Maybe [Text]
notificationARNs = Maybe [Text]
a} :: Stack) ((Maybe [Text] -> f (Maybe [Text])) -> Stack -> f Stack)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Success\/failure message associated with the stack status.
stack_stackStatusReason :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_stackStatusReason :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_stackStatusReason = (Stack -> Maybe Text)
-> (Stack -> Maybe Text -> Stack)
-> Lens Stack Stack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Text
stackStatusReason :: Maybe Text
$sel:stackStatusReason:Stack' :: Stack -> Maybe Text
stackStatusReason} -> Maybe Text
stackStatusReason) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:stackStatusReason:Stack' :: Maybe Text
stackStatusReason = Maybe Text
a} :: Stack)

-- | Whether termination protection is enabled for the stack.
--
-- For
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html nested stacks>,
-- termination protection is set on the root stack and cannot be changed
-- directly on the nested stack. For more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html Protecting a Stack From Being Deleted>
-- in the /CloudFormation User Guide/.
stack_enableTerminationProtection :: Lens.Lens' Stack (Prelude.Maybe Prelude.Bool)
stack_enableTerminationProtection :: (Maybe Bool -> f (Maybe Bool)) -> Stack -> f Stack
stack_enableTerminationProtection = (Stack -> Maybe Bool)
-> (Stack -> Maybe Bool -> Stack)
-> Lens Stack Stack (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Bool
enableTerminationProtection :: Maybe Bool
$sel:enableTerminationProtection:Stack' :: Stack -> Maybe Bool
enableTerminationProtection} -> Maybe Bool
enableTerminationProtection) (\s :: Stack
s@Stack' {} Maybe Bool
a -> Stack
s {$sel:enableTerminationProtection:Stack' :: Maybe Bool
enableTerminationProtection = Maybe Bool
a} :: Stack)

-- | Information on whether a stack\'s actual configuration differs, or has
-- /drifted/, from it\'s expected configuration, as defined in the stack
-- template and any values specified as template parameters. For more
-- information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html Detecting Unregulated Configuration Changes to Stacks and Resources>.
stack_driftInformation :: Lens.Lens' Stack (Prelude.Maybe StackDriftInformation)
stack_driftInformation :: (Maybe StackDriftInformation -> f (Maybe StackDriftInformation))
-> Stack -> f Stack
stack_driftInformation = (Stack -> Maybe StackDriftInformation)
-> (Stack -> Maybe StackDriftInformation -> Stack)
-> Lens
     Stack
     Stack
     (Maybe StackDriftInformation)
     (Maybe StackDriftInformation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe StackDriftInformation
driftInformation :: Maybe StackDriftInformation
$sel:driftInformation:Stack' :: Stack -> Maybe StackDriftInformation
driftInformation} -> Maybe StackDriftInformation
driftInformation) (\s :: Stack
s@Stack' {} Maybe StackDriftInformation
a -> Stack
s {$sel:driftInformation:Stack' :: Maybe StackDriftInformation
driftInformation = Maybe StackDriftInformation
a} :: Stack)

-- | The unique ID of the change set.
stack_changeSetId :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_changeSetId :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_changeSetId = (Stack -> Maybe Text)
-> (Stack -> Maybe Text -> Stack)
-> Lens Stack Stack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Text
changeSetId :: Maybe Text
$sel:changeSetId:Stack' :: Stack -> Maybe Text
changeSetId} -> Maybe Text
changeSetId) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:changeSetId:Stack' :: Maybe Text
changeSetId = Maybe Text
a} :: Stack)

-- | The time the stack was deleted.
stack_deletionTime :: Lens.Lens' Stack (Prelude.Maybe Prelude.UTCTime)
stack_deletionTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Stack -> f Stack
stack_deletionTime = (Stack -> Maybe ISO8601)
-> (Stack -> Maybe ISO8601 -> Stack)
-> Lens Stack Stack (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe ISO8601
deletionTime :: Maybe ISO8601
$sel:deletionTime:Stack' :: Stack -> Maybe ISO8601
deletionTime} -> Maybe ISO8601
deletionTime) (\s :: Stack
s@Stack' {} Maybe ISO8601
a -> Stack
s {$sel:deletionTime:Stack' :: Maybe ISO8601
deletionTime = Maybe ISO8601
a} :: Stack) ((Maybe ISO8601 -> f (Maybe ISO8601)) -> Stack -> f Stack)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A list of output structures.
stack_outputs :: Lens.Lens' Stack (Prelude.Maybe [Output])
stack_outputs :: (Maybe [Output] -> f (Maybe [Output])) -> Stack -> f Stack
stack_outputs = (Stack -> Maybe [Output])
-> (Stack -> Maybe [Output] -> Stack)
-> Lens Stack Stack (Maybe [Output]) (Maybe [Output])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe [Output]
outputs :: Maybe [Output]
$sel:outputs:Stack' :: Stack -> Maybe [Output]
outputs} -> Maybe [Output]
outputs) (\s :: Stack
s@Stack' {} Maybe [Output]
a -> Stack
s {$sel:outputs:Stack' :: Maybe [Output]
outputs = Maybe [Output]
a} :: Stack) ((Maybe [Output] -> f (Maybe [Output])) -> Stack -> f Stack)
-> ((Maybe [Output] -> f (Maybe [Output]))
    -> Maybe [Output] -> f (Maybe [Output]))
-> (Maybe [Output] -> f (Maybe [Output]))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Output] [Output] [Output] [Output]
-> Iso
     (Maybe [Output]) (Maybe [Output]) (Maybe [Output]) (Maybe [Output])
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 [Output] [Output] [Output] [Output]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of @Parameter@ structures.
stack_parameters :: Lens.Lens' Stack (Prelude.Maybe [Parameter])
stack_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter])) -> Stack -> f Stack
stack_parameters = (Stack -> Maybe [Parameter])
-> (Stack -> Maybe [Parameter] -> Stack)
-> Lens Stack Stack (Maybe [Parameter]) (Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:Stack' :: Stack -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: Stack
s@Stack' {} Maybe [Parameter]
a -> Stack
s {$sel:parameters:Stack' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: Stack) ((Maybe [Parameter] -> f (Maybe [Parameter])) -> Stack -> f Stack)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Parameter] [Parameter] [Parameter] [Parameter]
-> Iso
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
     (Maybe [Parameter])
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 [Parameter] [Parameter] [Parameter] [Parameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Unique identifier of the stack.
stack_stackId :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_stackId :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_stackId = (Stack -> Maybe Text)
-> (Stack -> Maybe Text -> Stack)
-> Lens Stack Stack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Text
stackId :: Maybe Text
$sel:stackId:Stack' :: Stack -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:stackId:Stack' :: Maybe Text
stackId = Maybe Text
a} :: Stack)

-- | A user-defined description associated with the stack.
stack_description :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_description :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_description = (Stack -> Maybe Text)
-> (Stack -> Maybe Text -> Stack)
-> Lens Stack Stack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Text
description :: Maybe Text
$sel:description:Stack' :: Stack -> Maybe Text
description} -> Maybe Text
description) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:description:Stack' :: Maybe Text
description = Maybe Text
a} :: Stack)

-- | The capabilities allowed in the stack.
stack_capabilities :: Lens.Lens' Stack (Prelude.Maybe [Capability])
stack_capabilities :: (Maybe [Capability] -> f (Maybe [Capability])) -> Stack -> f Stack
stack_capabilities = (Stack -> Maybe [Capability])
-> (Stack -> Maybe [Capability] -> Stack)
-> Lens Stack Stack (Maybe [Capability]) (Maybe [Capability])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe [Capability]
capabilities :: Maybe [Capability]
$sel:capabilities:Stack' :: Stack -> Maybe [Capability]
capabilities} -> Maybe [Capability]
capabilities) (\s :: Stack
s@Stack' {} Maybe [Capability]
a -> Stack
s {$sel:capabilities:Stack' :: Maybe [Capability]
capabilities = Maybe [Capability]
a} :: Stack) ((Maybe [Capability] -> f (Maybe [Capability]))
 -> Stack -> f Stack)
-> ((Maybe [Capability] -> f (Maybe [Capability]))
    -> Maybe [Capability] -> f (Maybe [Capability]))
-> (Maybe [Capability] -> f (Maybe [Capability]))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Capability] [Capability] [Capability] [Capability]
-> Iso
     (Maybe [Capability])
     (Maybe [Capability])
     (Maybe [Capability])
     (Maybe [Capability])
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 [Capability] [Capability] [Capability] [Capability]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The rollback triggers for CloudFormation to monitor during stack
-- creation and updating operations, and for the specified monitoring
-- period afterwards.
stack_rollbackConfiguration :: Lens.Lens' Stack (Prelude.Maybe RollbackConfiguration)
stack_rollbackConfiguration :: (Maybe RollbackConfiguration -> f (Maybe RollbackConfiguration))
-> Stack -> f Stack
stack_rollbackConfiguration = (Stack -> Maybe RollbackConfiguration)
-> (Stack -> Maybe RollbackConfiguration -> Stack)
-> Lens
     Stack
     Stack
     (Maybe RollbackConfiguration)
     (Maybe RollbackConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe RollbackConfiguration
rollbackConfiguration :: Maybe RollbackConfiguration
$sel:rollbackConfiguration:Stack' :: Stack -> Maybe RollbackConfiguration
rollbackConfiguration} -> Maybe RollbackConfiguration
rollbackConfiguration) (\s :: Stack
s@Stack' {} Maybe RollbackConfiguration
a -> Stack
s {$sel:rollbackConfiguration:Stack' :: Maybe RollbackConfiguration
rollbackConfiguration = Maybe RollbackConfiguration
a} :: Stack)

-- | A list of @Tag@s that specify information about the stack.
stack_tags :: Lens.Lens' Stack (Prelude.Maybe [Tag])
stack_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Stack -> f Stack
stack_tags = (Stack -> Maybe [Tag])
-> (Stack -> Maybe [Tag] -> Stack)
-> Lens Stack Stack (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Stack' :: Stack -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Stack
s@Stack' {} Maybe [Tag]
a -> Stack
s {$sel:tags:Stack' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Stack) ((Maybe [Tag] -> f (Maybe [Tag])) -> Stack -> f Stack)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The amount of time within which stack creation should complete.
stack_timeoutInMinutes :: Lens.Lens' Stack (Prelude.Maybe Prelude.Natural)
stack_timeoutInMinutes :: (Maybe Natural -> f (Maybe Natural)) -> Stack -> f Stack
stack_timeoutInMinutes = (Stack -> Maybe Natural)
-> (Stack -> Maybe Natural -> Stack)
-> Lens Stack Stack (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Natural
timeoutInMinutes :: Maybe Natural
$sel:timeoutInMinutes:Stack' :: Stack -> Maybe Natural
timeoutInMinutes} -> Maybe Natural
timeoutInMinutes) (\s :: Stack
s@Stack' {} Maybe Natural
a -> Stack
s {$sel:timeoutInMinutes:Stack' :: Maybe Natural
timeoutInMinutes = Maybe Natural
a} :: Stack)

-- | For nested stacks--stacks created as resources for another stack--the
-- stack ID of the direct parent of this stack. For the first level of
-- nested stacks, the root stack is also the parent stack.
--
-- For more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html Working with Nested Stacks>
-- in the /CloudFormation User Guide/.
stack_parentId :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_parentId :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_parentId = (Stack -> Maybe Text)
-> (Stack -> Maybe Text -> Stack)
-> Lens Stack Stack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Text
parentId :: Maybe Text
$sel:parentId:Stack' :: Stack -> Maybe Text
parentId} -> Maybe Text
parentId) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:parentId:Stack' :: Maybe Text
parentId = Maybe Text
a} :: Stack)

-- | The Amazon Resource Name (ARN) of an Identity and Access Management
-- (IAM) role that is associated with the stack. During a stack operation,
-- CloudFormation uses this role\'s credentials to make calls on your
-- behalf.
stack_roleARN :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_roleARN :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_roleARN = (Stack -> Maybe Text)
-> (Stack -> Maybe Text -> Stack)
-> Lens Stack Stack (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:Stack' :: Stack -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:roleARN:Stack' :: Maybe Text
roleARN = Maybe Text
a} :: Stack)

-- | The name associated with the stack.
stack_stackName :: Lens.Lens' Stack Prelude.Text
stack_stackName :: (Text -> f Text) -> Stack -> f Stack
stack_stackName = (Stack -> Text)
-> (Stack -> Text -> Stack) -> Lens Stack Stack Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Text
stackName :: Text
$sel:stackName:Stack' :: Stack -> Text
stackName} -> Text
stackName) (\s :: Stack
s@Stack' {} Text
a -> Stack
s {$sel:stackName:Stack' :: Text
stackName = Text
a} :: Stack)

-- | The time at which the stack was created.
stack_creationTime :: Lens.Lens' Stack Prelude.UTCTime
stack_creationTime :: (UTCTime -> f UTCTime) -> Stack -> f Stack
stack_creationTime = (Stack -> ISO8601)
-> (Stack -> ISO8601 -> Stack) -> Lens Stack Stack ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {ISO8601
creationTime :: ISO8601
$sel:creationTime:Stack' :: Stack -> ISO8601
creationTime} -> ISO8601
creationTime) (\s :: Stack
s@Stack' {} ISO8601
a -> Stack
s {$sel:creationTime:Stack' :: ISO8601
creationTime = ISO8601
a} :: Stack) ((ISO8601 -> f ISO8601) -> Stack -> f Stack)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> Stack
-> f Stack
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

-- | Current status of the stack.
stack_stackStatus :: Lens.Lens' Stack StackStatus
stack_stackStatus :: (StackStatus -> f StackStatus) -> Stack -> f Stack
stack_stackStatus = (Stack -> StackStatus)
-> (Stack -> StackStatus -> Stack)
-> Lens Stack Stack StackStatus StackStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {StackStatus
stackStatus :: StackStatus
$sel:stackStatus:Stack' :: Stack -> StackStatus
stackStatus} -> StackStatus
stackStatus) (\s :: Stack
s@Stack' {} StackStatus
a -> Stack
s {$sel:stackStatus:Stack' :: StackStatus
stackStatus = StackStatus
a} :: Stack)

instance Core.FromXML Stack where
  parseXML :: [Node] -> Either String Stack
parseXML [Node]
x =
    Maybe Bool
-> Maybe ISO8601
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe StackDriftInformation
-> Maybe Text
-> Maybe ISO8601
-> Maybe [Output]
-> Maybe [Parameter]
-> Maybe Text
-> Maybe Text
-> Maybe [Capability]
-> Maybe RollbackConfiguration
-> Maybe [Tag]
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Text
-> ISO8601
-> StackStatus
-> Stack
Stack'
      (Maybe Bool
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe StackDriftInformation
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe [Output]
 -> Maybe [Parameter]
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Capability]
 -> Maybe RollbackConfiguration
 -> Maybe [Tag]
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> ISO8601
 -> StackStatus
 -> Stack)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe StackDriftInformation
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe [Output]
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DisableRollback")
      Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe StackDriftInformation
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe [Output]
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe StackDriftInformation
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe [Output]
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LastUpdatedTime")
      Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe StackDriftInformation
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe [Output]
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe StackDriftInformation
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe [Output]
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
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
"RootId")
      Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe StackDriftInformation
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe [Output]
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe StackDriftInformation
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe [Output]
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NotificationARNs"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe StackDriftInformation
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe [Output]
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe StackDriftInformation
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe [Output]
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
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
"StackStatusReason")
      Either
  String
  (Maybe Bool
   -> Maybe StackDriftInformation
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe [Output]
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe StackDriftInformation
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe [Output]
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EnableTerminationProtection")
      Either
  String
  (Maybe StackDriftInformation
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe [Output]
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe StackDriftInformation)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe [Output]
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe StackDriftInformation)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DriftInformation")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe [Output]
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe [Output]
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
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
"ChangeSetId")
      Either
  String
  (Maybe ISO8601
   -> Maybe [Output]
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe [Output]
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DeletionTime")
      Either
  String
  (Maybe [Output]
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe [Output])
-> Either
     String
     (Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Outputs" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Output]))
-> Either String (Maybe [Output])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Output])
-> [Node] -> Either String (Maybe [Output])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Output]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe [Parameter])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Parameters" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Parameter]))
-> Either String (Maybe [Parameter])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Parameter])
-> [Node] -> Either String (Maybe [Parameter])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Parameter]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
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
"StackId")
      Either
  String
  (Maybe Text
   -> Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Capability]
      -> Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
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
"Description")
      Either
  String
  (Maybe [Capability]
   -> Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe [Capability])
-> Either
     String
     (Maybe RollbackConfiguration
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Capabilities" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Capability]))
-> Either String (Maybe [Capability])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Capability])
-> [Node] -> Either String (Maybe [Capability])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Capability]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe RollbackConfiguration
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe RollbackConfiguration)
-> Either
     String
     (Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe RollbackConfiguration)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"RollbackConfiguration")
      Either
  String
  (Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe [Tag])
-> Either
     String
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ISO8601
      -> StackStatus
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Tags" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [Tag]))
-> Either String (Maybe [Tag])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Tag])
-> [Node] -> Either String (Maybe [Tag])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ISO8601
   -> StackStatus
   -> Stack)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Text -> ISO8601 -> StackStatus -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Natural)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TimeoutInMinutes")
      Either
  String
  (Maybe Text
   -> Maybe Text -> Text -> ISO8601 -> StackStatus -> Stack)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Text -> ISO8601 -> StackStatus -> Stack)
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
"ParentId")
      Either
  String (Maybe Text -> Text -> ISO8601 -> StackStatus -> Stack)
-> Either String (Maybe Text)
-> Either String (Text -> ISO8601 -> StackStatus -> Stack)
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
"RoleARN")
      Either String (Text -> ISO8601 -> StackStatus -> Stack)
-> Either String Text
-> Either String (ISO8601 -> StackStatus -> Stack)
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 -> StackStatus -> Stack)
-> Either String ISO8601 -> Either String (StackStatus -> Stack)
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
"CreationTime")
      Either String (StackStatus -> Stack)
-> Either String StackStatus -> Either String Stack
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String StackStatus
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"StackStatus")

instance Prelude.Hashable Stack

instance Prelude.NFData Stack