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

import Amazonka.CloudFormation.Types.StackDriftStatus
import Amazonka.CloudFormation.Types.StackInstanceComprehensiveStatus
import Amazonka.CloudFormation.Types.StackInstanceStatus
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 structure that contains summary information about a stack instance.
--
-- /See:/ 'newStackInstanceSummary' smart constructor.
data StackInstanceSummary = StackInstanceSummary'
  { -- | [Self-managed permissions] The name of the Amazon Web Services account
    -- that the stack instance is associated with.
    StackInstanceSummary -> Maybe Text
account :: Prelude.Maybe Prelude.Text,
    -- | Status of the stack instance\'s actual configuration compared to the
    -- expected template and parameter configuration of the stack set to which
    -- it belongs.
    --
    -- -   @DRIFTED@: The stack differs from the expected template and
    --     parameter configuration of the stack set to which it belongs. A
    --     stack instance is considered to have drifted if one or more of the
    --     resources in the associated stack have drifted.
    --
    -- -   @NOT_CHECKED@: CloudFormation hasn\'t checked if the stack instance
    --     differs from its expected stack set configuration.
    --
    -- -   @IN_SYNC@: The stack instance\'s actual configuration matches its
    --     expected stack set configuration.
    --
    -- -   @UNKNOWN@: This value is reserved for future use.
    StackInstanceSummary -> Maybe StackDriftStatus
driftStatus :: Prelude.Maybe StackDriftStatus,
    -- | Most recent time when CloudFormation performed a drift detection
    -- operation on the stack instance. This value will be @NULL@ for any stack
    -- instance on which drift detection hasn\'t yet been performed.
    StackInstanceSummary -> Maybe ISO8601
lastDriftCheckTimestamp :: Prelude.Maybe Data.ISO8601,
    -- | The last unique ID of a StackSet operation performed on a stack
    -- instance.
    StackInstanceSummary -> Maybe Text
lastOperationId :: Prelude.Maybe Prelude.Text,
    -- | [Service-managed permissions] The organization root ID or organizational
    -- unit (OU) IDs that you specified for
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html DeploymentTargets>.
    StackInstanceSummary -> Maybe Text
organizationalUnitId :: Prelude.Maybe Prelude.Text,
    -- | The name of the Amazon Web Services Region that the stack instance is
    -- associated with.
    StackInstanceSummary -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | The ID of the stack instance.
    StackInstanceSummary -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | The detailed status of the stack instance.
    StackInstanceSummary -> Maybe StackInstanceComprehensiveStatus
stackInstanceStatus :: Prelude.Maybe StackInstanceComprehensiveStatus,
    -- | The name or unique ID of the stack set that the stack instance is
    -- associated with.
    StackInstanceSummary -> Maybe Text
stackSetId :: Prelude.Maybe Prelude.Text,
    -- | The status of the stack instance, in terms of its synchronization with
    -- its associated stack set.
    --
    -- -   @INOPERABLE@: A @DeleteStackInstances@ operation has failed and left
    --     the stack in an unstable state. Stacks in this state are excluded
    --     from further @UpdateStackSet@ operations. You might need to perform
    --     a @DeleteStackInstances@ operation, with @RetainStacks@ set to
    --     @true@, to delete the stack instance, and then delete the stack
    --     manually.
    --
    -- -   @OUTDATED@: The stack isn\'t currently up to date with the stack set
    --     because:
    --
    --     -   The associated stack failed during a @CreateStackSet@ or
    --         @UpdateStackSet@ operation.
    --
    --     -   The stack was part of a @CreateStackSet@ or @UpdateStackSet@
    --         operation that failed or was stopped before the stack was
    --         created or updated.
    --
    -- -   @CURRENT@: The stack is currently up to date with the stack set.
    StackInstanceSummary -> Maybe StackInstanceStatus
status :: Prelude.Maybe StackInstanceStatus,
    -- | The explanation for the specific status code assigned to this stack
    -- instance.
    StackInstanceSummary -> Maybe Text
statusReason :: Prelude.Maybe Prelude.Text
  }
  deriving (StackInstanceSummary -> StackInstanceSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackInstanceSummary -> StackInstanceSummary -> Bool
$c/= :: StackInstanceSummary -> StackInstanceSummary -> Bool
== :: StackInstanceSummary -> StackInstanceSummary -> Bool
$c== :: StackInstanceSummary -> StackInstanceSummary -> Bool
Prelude.Eq, ReadPrec [StackInstanceSummary]
ReadPrec StackInstanceSummary
Int -> ReadS StackInstanceSummary
ReadS [StackInstanceSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StackInstanceSummary]
$creadListPrec :: ReadPrec [StackInstanceSummary]
readPrec :: ReadPrec StackInstanceSummary
$creadPrec :: ReadPrec StackInstanceSummary
readList :: ReadS [StackInstanceSummary]
$creadList :: ReadS [StackInstanceSummary]
readsPrec :: Int -> ReadS StackInstanceSummary
$creadsPrec :: Int -> ReadS StackInstanceSummary
Prelude.Read, Int -> StackInstanceSummary -> ShowS
[StackInstanceSummary] -> ShowS
StackInstanceSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackInstanceSummary] -> ShowS
$cshowList :: [StackInstanceSummary] -> ShowS
show :: StackInstanceSummary -> String
$cshow :: StackInstanceSummary -> String
showsPrec :: Int -> StackInstanceSummary -> ShowS
$cshowsPrec :: Int -> StackInstanceSummary -> ShowS
Prelude.Show, forall x. Rep StackInstanceSummary x -> StackInstanceSummary
forall x. StackInstanceSummary -> Rep StackInstanceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackInstanceSummary x -> StackInstanceSummary
$cfrom :: forall x. StackInstanceSummary -> Rep StackInstanceSummary x
Prelude.Generic)

-- |
-- Create a value of 'StackInstanceSummary' 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:
--
-- 'account', 'stackInstanceSummary_account' - [Self-managed permissions] The name of the Amazon Web Services account
-- that the stack instance is associated with.
--
-- 'driftStatus', 'stackInstanceSummary_driftStatus' - Status of the stack instance\'s actual configuration compared to the
-- expected template and parameter configuration of the stack set to which
-- it belongs.
--
-- -   @DRIFTED@: The stack differs from the expected template and
--     parameter configuration of the stack set to which it belongs. A
--     stack instance is considered to have drifted if one or more of the
--     resources in the associated stack have drifted.
--
-- -   @NOT_CHECKED@: CloudFormation hasn\'t checked if the stack instance
--     differs from its expected stack set configuration.
--
-- -   @IN_SYNC@: The stack instance\'s actual configuration matches its
--     expected stack set configuration.
--
-- -   @UNKNOWN@: This value is reserved for future use.
--
-- 'lastDriftCheckTimestamp', 'stackInstanceSummary_lastDriftCheckTimestamp' - Most recent time when CloudFormation performed a drift detection
-- operation on the stack instance. This value will be @NULL@ for any stack
-- instance on which drift detection hasn\'t yet been performed.
--
-- 'lastOperationId', 'stackInstanceSummary_lastOperationId' - The last unique ID of a StackSet operation performed on a stack
-- instance.
--
-- 'organizationalUnitId', 'stackInstanceSummary_organizationalUnitId' - [Service-managed permissions] The organization root ID or organizational
-- unit (OU) IDs that you specified for
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html DeploymentTargets>.
--
-- 'region', 'stackInstanceSummary_region' - The name of the Amazon Web Services Region that the stack instance is
-- associated with.
--
-- 'stackId', 'stackInstanceSummary_stackId' - The ID of the stack instance.
--
-- 'stackInstanceStatus', 'stackInstanceSummary_stackInstanceStatus' - The detailed status of the stack instance.
--
-- 'stackSetId', 'stackInstanceSummary_stackSetId' - The name or unique ID of the stack set that the stack instance is
-- associated with.
--
-- 'status', 'stackInstanceSummary_status' - The status of the stack instance, in terms of its synchronization with
-- its associated stack set.
--
-- -   @INOPERABLE@: A @DeleteStackInstances@ operation has failed and left
--     the stack in an unstable state. Stacks in this state are excluded
--     from further @UpdateStackSet@ operations. You might need to perform
--     a @DeleteStackInstances@ operation, with @RetainStacks@ set to
--     @true@, to delete the stack instance, and then delete the stack
--     manually.
--
-- -   @OUTDATED@: The stack isn\'t currently up to date with the stack set
--     because:
--
--     -   The associated stack failed during a @CreateStackSet@ or
--         @UpdateStackSet@ operation.
--
--     -   The stack was part of a @CreateStackSet@ or @UpdateStackSet@
--         operation that failed or was stopped before the stack was
--         created or updated.
--
-- -   @CURRENT@: The stack is currently up to date with the stack set.
--
-- 'statusReason', 'stackInstanceSummary_statusReason' - The explanation for the specific status code assigned to this stack
-- instance.
newStackInstanceSummary ::
  StackInstanceSummary
newStackInstanceSummary :: StackInstanceSummary
newStackInstanceSummary =
  StackInstanceSummary'
    { $sel:account:StackInstanceSummary' :: Maybe Text
account = forall a. Maybe a
Prelude.Nothing,
      $sel:driftStatus:StackInstanceSummary' :: Maybe StackDriftStatus
driftStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:lastDriftCheckTimestamp:StackInstanceSummary' :: Maybe ISO8601
lastDriftCheckTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:lastOperationId:StackInstanceSummary' :: Maybe Text
lastOperationId = forall a. Maybe a
Prelude.Nothing,
      $sel:organizationalUnitId:StackInstanceSummary' :: Maybe Text
organizationalUnitId = forall a. Maybe a
Prelude.Nothing,
      $sel:region:StackInstanceSummary' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:StackInstanceSummary' :: Maybe Text
stackId = forall a. Maybe a
Prelude.Nothing,
      $sel:stackInstanceStatus:StackInstanceSummary' :: Maybe StackInstanceComprehensiveStatus
stackInstanceStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetId:StackInstanceSummary' :: Maybe Text
stackSetId = forall a. Maybe a
Prelude.Nothing,
      $sel:status:StackInstanceSummary' :: Maybe StackInstanceStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:statusReason:StackInstanceSummary' :: Maybe Text
statusReason = forall a. Maybe a
Prelude.Nothing
    }

-- | [Self-managed permissions] The name of the Amazon Web Services account
-- that the stack instance is associated with.
stackInstanceSummary_account :: Lens.Lens' StackInstanceSummary (Prelude.Maybe Prelude.Text)
stackInstanceSummary_account :: Lens' StackInstanceSummary (Maybe Text)
stackInstanceSummary_account = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe Text
account :: Maybe Text
$sel:account:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
account} -> Maybe Text
account) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe Text
a -> StackInstanceSummary
s {$sel:account:StackInstanceSummary' :: Maybe Text
account = Maybe Text
a} :: StackInstanceSummary)

-- | Status of the stack instance\'s actual configuration compared to the
-- expected template and parameter configuration of the stack set to which
-- it belongs.
--
-- -   @DRIFTED@: The stack differs from the expected template and
--     parameter configuration of the stack set to which it belongs. A
--     stack instance is considered to have drifted if one or more of the
--     resources in the associated stack have drifted.
--
-- -   @NOT_CHECKED@: CloudFormation hasn\'t checked if the stack instance
--     differs from its expected stack set configuration.
--
-- -   @IN_SYNC@: The stack instance\'s actual configuration matches its
--     expected stack set configuration.
--
-- -   @UNKNOWN@: This value is reserved for future use.
stackInstanceSummary_driftStatus :: Lens.Lens' StackInstanceSummary (Prelude.Maybe StackDriftStatus)
stackInstanceSummary_driftStatus :: Lens' StackInstanceSummary (Maybe StackDriftStatus)
stackInstanceSummary_driftStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe StackDriftStatus
driftStatus :: Maybe StackDriftStatus
$sel:driftStatus:StackInstanceSummary' :: StackInstanceSummary -> Maybe StackDriftStatus
driftStatus} -> Maybe StackDriftStatus
driftStatus) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe StackDriftStatus
a -> StackInstanceSummary
s {$sel:driftStatus:StackInstanceSummary' :: Maybe StackDriftStatus
driftStatus = Maybe StackDriftStatus
a} :: StackInstanceSummary)

-- | Most recent time when CloudFormation performed a drift detection
-- operation on the stack instance. This value will be @NULL@ for any stack
-- instance on which drift detection hasn\'t yet been performed.
stackInstanceSummary_lastDriftCheckTimestamp :: Lens.Lens' StackInstanceSummary (Prelude.Maybe Prelude.UTCTime)
stackInstanceSummary_lastDriftCheckTimestamp :: Lens' StackInstanceSummary (Maybe UTCTime)
stackInstanceSummary_lastDriftCheckTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe ISO8601
lastDriftCheckTimestamp :: Maybe ISO8601
$sel:lastDriftCheckTimestamp:StackInstanceSummary' :: StackInstanceSummary -> Maybe ISO8601
lastDriftCheckTimestamp} -> Maybe ISO8601
lastDriftCheckTimestamp) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe ISO8601
a -> StackInstanceSummary
s {$sel:lastDriftCheckTimestamp:StackInstanceSummary' :: Maybe ISO8601
lastDriftCheckTimestamp = Maybe ISO8601
a} :: StackInstanceSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The last unique ID of a StackSet operation performed on a stack
-- instance.
stackInstanceSummary_lastOperationId :: Lens.Lens' StackInstanceSummary (Prelude.Maybe Prelude.Text)
stackInstanceSummary_lastOperationId :: Lens' StackInstanceSummary (Maybe Text)
stackInstanceSummary_lastOperationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe Text
lastOperationId :: Maybe Text
$sel:lastOperationId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
lastOperationId} -> Maybe Text
lastOperationId) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe Text
a -> StackInstanceSummary
s {$sel:lastOperationId:StackInstanceSummary' :: Maybe Text
lastOperationId = Maybe Text
a} :: StackInstanceSummary)

-- | [Service-managed permissions] The organization root ID or organizational
-- unit (OU) IDs that you specified for
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DeploymentTargets.html DeploymentTargets>.
stackInstanceSummary_organizationalUnitId :: Lens.Lens' StackInstanceSummary (Prelude.Maybe Prelude.Text)
stackInstanceSummary_organizationalUnitId :: Lens' StackInstanceSummary (Maybe Text)
stackInstanceSummary_organizationalUnitId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe Text
organizationalUnitId :: Maybe Text
$sel:organizationalUnitId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
organizationalUnitId} -> Maybe Text
organizationalUnitId) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe Text
a -> StackInstanceSummary
s {$sel:organizationalUnitId:StackInstanceSummary' :: Maybe Text
organizationalUnitId = Maybe Text
a} :: StackInstanceSummary)

-- | The name of the Amazon Web Services Region that the stack instance is
-- associated with.
stackInstanceSummary_region :: Lens.Lens' StackInstanceSummary (Prelude.Maybe Prelude.Text)
stackInstanceSummary_region :: Lens' StackInstanceSummary (Maybe Text)
stackInstanceSummary_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe Text
region :: Maybe Text
$sel:region:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
region} -> Maybe Text
region) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe Text
a -> StackInstanceSummary
s {$sel:region:StackInstanceSummary' :: Maybe Text
region = Maybe Text
a} :: StackInstanceSummary)

-- | The ID of the stack instance.
stackInstanceSummary_stackId :: Lens.Lens' StackInstanceSummary (Prelude.Maybe Prelude.Text)
stackInstanceSummary_stackId :: Lens' StackInstanceSummary (Maybe Text)
stackInstanceSummary_stackId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe Text
stackId :: Maybe Text
$sel:stackId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe Text
a -> StackInstanceSummary
s {$sel:stackId:StackInstanceSummary' :: Maybe Text
stackId = Maybe Text
a} :: StackInstanceSummary)

-- | The detailed status of the stack instance.
stackInstanceSummary_stackInstanceStatus :: Lens.Lens' StackInstanceSummary (Prelude.Maybe StackInstanceComprehensiveStatus)
stackInstanceSummary_stackInstanceStatus :: Lens' StackInstanceSummary (Maybe StackInstanceComprehensiveStatus)
stackInstanceSummary_stackInstanceStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe StackInstanceComprehensiveStatus
stackInstanceStatus :: Maybe StackInstanceComprehensiveStatus
$sel:stackInstanceStatus:StackInstanceSummary' :: StackInstanceSummary -> Maybe StackInstanceComprehensiveStatus
stackInstanceStatus} -> Maybe StackInstanceComprehensiveStatus
stackInstanceStatus) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe StackInstanceComprehensiveStatus
a -> StackInstanceSummary
s {$sel:stackInstanceStatus:StackInstanceSummary' :: Maybe StackInstanceComprehensiveStatus
stackInstanceStatus = Maybe StackInstanceComprehensiveStatus
a} :: StackInstanceSummary)

-- | The name or unique ID of the stack set that the stack instance is
-- associated with.
stackInstanceSummary_stackSetId :: Lens.Lens' StackInstanceSummary (Prelude.Maybe Prelude.Text)
stackInstanceSummary_stackSetId :: Lens' StackInstanceSummary (Maybe Text)
stackInstanceSummary_stackSetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe Text
stackSetId :: Maybe Text
$sel:stackSetId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
stackSetId} -> Maybe Text
stackSetId) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe Text
a -> StackInstanceSummary
s {$sel:stackSetId:StackInstanceSummary' :: Maybe Text
stackSetId = Maybe Text
a} :: StackInstanceSummary)

-- | The status of the stack instance, in terms of its synchronization with
-- its associated stack set.
--
-- -   @INOPERABLE@: A @DeleteStackInstances@ operation has failed and left
--     the stack in an unstable state. Stacks in this state are excluded
--     from further @UpdateStackSet@ operations. You might need to perform
--     a @DeleteStackInstances@ operation, with @RetainStacks@ set to
--     @true@, to delete the stack instance, and then delete the stack
--     manually.
--
-- -   @OUTDATED@: The stack isn\'t currently up to date with the stack set
--     because:
--
--     -   The associated stack failed during a @CreateStackSet@ or
--         @UpdateStackSet@ operation.
--
--     -   The stack was part of a @CreateStackSet@ or @UpdateStackSet@
--         operation that failed or was stopped before the stack was
--         created or updated.
--
-- -   @CURRENT@: The stack is currently up to date with the stack set.
stackInstanceSummary_status :: Lens.Lens' StackInstanceSummary (Prelude.Maybe StackInstanceStatus)
stackInstanceSummary_status :: Lens' StackInstanceSummary (Maybe StackInstanceStatus)
stackInstanceSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe StackInstanceStatus
status :: Maybe StackInstanceStatus
$sel:status:StackInstanceSummary' :: StackInstanceSummary -> Maybe StackInstanceStatus
status} -> Maybe StackInstanceStatus
status) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe StackInstanceStatus
a -> StackInstanceSummary
s {$sel:status:StackInstanceSummary' :: Maybe StackInstanceStatus
status = Maybe StackInstanceStatus
a} :: StackInstanceSummary)

-- | The explanation for the specific status code assigned to this stack
-- instance.
stackInstanceSummary_statusReason :: Lens.Lens' StackInstanceSummary (Prelude.Maybe Prelude.Text)
stackInstanceSummary_statusReason :: Lens' StackInstanceSummary (Maybe Text)
stackInstanceSummary_statusReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackInstanceSummary' {Maybe Text
statusReason :: Maybe Text
$sel:statusReason:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
statusReason} -> Maybe Text
statusReason) (\s :: StackInstanceSummary
s@StackInstanceSummary' {} Maybe Text
a -> StackInstanceSummary
s {$sel:statusReason:StackInstanceSummary' :: Maybe Text
statusReason = Maybe Text
a} :: StackInstanceSummary)

instance Data.FromXML StackInstanceSummary where
  parseXML :: [Node] -> Either String StackInstanceSummary
parseXML [Node]
x =
    Maybe Text
-> Maybe StackDriftStatus
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe StackInstanceComprehensiveStatus
-> Maybe Text
-> Maybe StackInstanceStatus
-> Maybe Text
-> StackInstanceSummary
StackInstanceSummary'
      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
"Account")
      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
"DriftStatus")
      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
"LastDriftCheckTimestamp")
      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
"LastOperationId")
      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
"OrganizationalUnitId")
      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
"Region")
      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
"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 (Maybe a)
Data..@? Text
"StackInstanceStatus")
      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
"StackSetId")
      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
"Status")
      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
"StatusReason")

instance Prelude.Hashable StackInstanceSummary where
  hashWithSalt :: Int -> StackInstanceSummary -> Int
hashWithSalt Int
_salt StackInstanceSummary' {Maybe Text
Maybe ISO8601
Maybe StackDriftStatus
Maybe StackInstanceComprehensiveStatus
Maybe StackInstanceStatus
statusReason :: Maybe Text
status :: Maybe StackInstanceStatus
stackSetId :: Maybe Text
stackInstanceStatus :: Maybe StackInstanceComprehensiveStatus
stackId :: Maybe Text
region :: Maybe Text
organizationalUnitId :: Maybe Text
lastOperationId :: Maybe Text
lastDriftCheckTimestamp :: Maybe ISO8601
driftStatus :: Maybe StackDriftStatus
account :: Maybe Text
$sel:statusReason:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:status:StackInstanceSummary' :: StackInstanceSummary -> Maybe StackInstanceStatus
$sel:stackSetId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:stackInstanceStatus:StackInstanceSummary' :: StackInstanceSummary -> Maybe StackInstanceComprehensiveStatus
$sel:stackId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:region:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:organizationalUnitId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:lastOperationId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:lastDriftCheckTimestamp:StackInstanceSummary' :: StackInstanceSummary -> Maybe ISO8601
$sel:driftStatus:StackInstanceSummary' :: StackInstanceSummary -> Maybe StackDriftStatus
$sel:account:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
account
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StackDriftStatus
driftStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
lastDriftCheckTimestamp
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
lastOperationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
organizationalUnitId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StackInstanceComprehensiveStatus
stackInstanceStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackSetId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StackInstanceStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusReason

instance Prelude.NFData StackInstanceSummary where
  rnf :: StackInstanceSummary -> ()
rnf StackInstanceSummary' {Maybe Text
Maybe ISO8601
Maybe StackDriftStatus
Maybe StackInstanceComprehensiveStatus
Maybe StackInstanceStatus
statusReason :: Maybe Text
status :: Maybe StackInstanceStatus
stackSetId :: Maybe Text
stackInstanceStatus :: Maybe StackInstanceComprehensiveStatus
stackId :: Maybe Text
region :: Maybe Text
organizationalUnitId :: Maybe Text
lastOperationId :: Maybe Text
lastDriftCheckTimestamp :: Maybe ISO8601
driftStatus :: Maybe StackDriftStatus
account :: Maybe Text
$sel:statusReason:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:status:StackInstanceSummary' :: StackInstanceSummary -> Maybe StackInstanceStatus
$sel:stackSetId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:stackInstanceStatus:StackInstanceSummary' :: StackInstanceSummary -> Maybe StackInstanceComprehensiveStatus
$sel:stackId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:region:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:organizationalUnitId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:lastOperationId:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
$sel:lastDriftCheckTimestamp:StackInstanceSummary' :: StackInstanceSummary -> Maybe ISO8601
$sel:driftStatus:StackInstanceSummary' :: StackInstanceSummary -> Maybe StackDriftStatus
$sel:account:StackInstanceSummary' :: StackInstanceSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
account
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StackDriftStatus
driftStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
lastDriftCheckTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lastOperationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
organizationalUnitId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StackInstanceComprehensiveStatus
stackInstanceStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackSetId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StackInstanceStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusReason