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

import Amazonka.CloudFormation.Types.AutoDeployment
import Amazonka.CloudFormation.Types.Capability
import Amazonka.CloudFormation.Types.Parameter
import Amazonka.CloudFormation.Types.PermissionModels
import Amazonka.CloudFormation.Types.StackSetDriftDetectionDetails
import Amazonka.CloudFormation.Types.StackSetStatus
import Amazonka.CloudFormation.Types.Tag
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A structure that contains information about a stack set. A stack set
-- enables you to provision stacks into Amazon Web Services accounts and
-- across Regions by using a single CloudFormation template. In the stack
-- set, you specify the template to use, as well as any parameters and
-- capabilities that the template requires.
--
-- /See:/ 'newStackSet' smart constructor.
data StackSet = StackSet'
  { -- | Detailed information about the drift status of the stack set.
    --
    -- For stack sets, contains information about the last /completed/ drift
    -- operation performed on the stack set. Information about drift operations
    -- currently in progress is not included.
    StackSet -> Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails :: Prelude.Maybe StackSetDriftDetectionDetails,
    -- | The status of the stack set.
    StackSet -> Maybe StackSetStatus
status :: Prelude.Maybe StackSetStatus,
    -- | The Amazon Resource Number (ARN) of the IAM role used to create or
    -- update the stack set.
    --
    -- Use customized administrator roles to control which users or groups can
    -- manage specific stack sets within the same administrator account. For
    -- more information, see
    -- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html Prerequisites: Granting Permissions for Stack Set Operations>
    -- in the /CloudFormation User Guide/.
    StackSet -> Maybe Text
administrationRoleARN :: Prelude.Maybe Prelude.Text,
    -- | [Service-managed permissions] Describes whether StackSets automatically
    -- deploys to Organizations accounts that are added to a target
    -- organization or organizational unit (OU).
    StackSet -> Maybe AutoDeployment
autoDeployment :: Prelude.Maybe AutoDeployment,
    -- | [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>.
    StackSet -> Maybe [Text]
organizationalUnitIds :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Number (ARN) of the stack set.
    StackSet -> Maybe Text
stackSetARN :: Prelude.Maybe Prelude.Text,
    -- | Describes how the IAM roles required for stack set operations are
    -- created.
    --
    -- -   With @self-managed@ permissions, you must create the administrator
    --     and execution roles required to deploy to target accounts. For more
    --     information, see
    --     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html Grant Self-Managed Stack Set Permissions>.
    --
    -- -   With @service-managed@ permissions, StackSets automatically creates
    --     the IAM roles required to deploy to accounts managed by
    --     Organizations. For more information, see
    --     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html Grant Service-Managed Stack Set Permissions>.
    StackSet -> Maybe PermissionModels
permissionModel :: Prelude.Maybe PermissionModels,
    -- | A list of input parameters for a stack set.
    StackSet -> Maybe [Parameter]
parameters :: Prelude.Maybe [Parameter],
    -- | The structure that contains the body of the template that was used to
    -- create or update the stack set.
    StackSet -> Maybe Text
templateBody :: Prelude.Maybe Prelude.Text,
    -- | The name that\'s associated with the stack set.
    StackSet -> Maybe Text
stackSetName :: Prelude.Maybe Prelude.Text,
    -- | A description of the stack set that you specify when the stack set is
    -- created or updated.
    StackSet -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The capabilities that are allowed in the stack set. Some stack set
    -- templates might include resources that can affect permissions in your
    -- Amazon Web Services account—for example, by creating new Identity and
    -- Access Management (IAM) users. For more information, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates.>
    StackSet -> Maybe [Capability]
capabilities :: Prelude.Maybe [Capability],
    -- | A list of tags that specify information about the stack set. A maximum
    -- number of 50 tags can be specified.
    StackSet -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The ID of the stack set.
    StackSet -> Maybe Text
stackSetId :: Prelude.Maybe Prelude.Text,
    -- | The name of the IAM execution role used to create or update the stack
    -- set.
    --
    -- Use customized execution roles to control which stack resources users
    -- and groups can include in their stack sets.
    StackSet -> Maybe Text
executionRoleName :: Prelude.Maybe Prelude.Text
  }
  deriving (StackSet -> StackSet -> Bool
(StackSet -> StackSet -> Bool)
-> (StackSet -> StackSet -> Bool) -> Eq StackSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StackSet -> StackSet -> Bool
$c/= :: StackSet -> StackSet -> Bool
== :: StackSet -> StackSet -> Bool
$c== :: StackSet -> StackSet -> Bool
Prelude.Eq, ReadPrec [StackSet]
ReadPrec StackSet
Int -> ReadS StackSet
ReadS [StackSet]
(Int -> ReadS StackSet)
-> ReadS [StackSet]
-> ReadPrec StackSet
-> ReadPrec [StackSet]
-> Read StackSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StackSet]
$creadListPrec :: ReadPrec [StackSet]
readPrec :: ReadPrec StackSet
$creadPrec :: ReadPrec StackSet
readList :: ReadS [StackSet]
$creadList :: ReadS [StackSet]
readsPrec :: Int -> ReadS StackSet
$creadsPrec :: Int -> ReadS StackSet
Prelude.Read, Int -> StackSet -> ShowS
[StackSet] -> ShowS
StackSet -> String
(Int -> StackSet -> ShowS)
-> (StackSet -> String) -> ([StackSet] -> ShowS) -> Show StackSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StackSet] -> ShowS
$cshowList :: [StackSet] -> ShowS
show :: StackSet -> String
$cshow :: StackSet -> String
showsPrec :: Int -> StackSet -> ShowS
$cshowsPrec :: Int -> StackSet -> ShowS
Prelude.Show, (forall x. StackSet -> Rep StackSet x)
-> (forall x. Rep StackSet x -> StackSet) -> Generic StackSet
forall x. Rep StackSet x -> StackSet
forall x. StackSet -> Rep StackSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StackSet x -> StackSet
$cfrom :: forall x. StackSet -> Rep StackSet x
Prelude.Generic)

-- |
-- Create a value of 'StackSet' 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:
--
-- 'stackSetDriftDetectionDetails', 'stackSet_stackSetDriftDetectionDetails' - Detailed information about the drift status of the stack set.
--
-- For stack sets, contains information about the last /completed/ drift
-- operation performed on the stack set. Information about drift operations
-- currently in progress is not included.
--
-- 'status', 'stackSet_status' - The status of the stack set.
--
-- 'administrationRoleARN', 'stackSet_administrationRoleARN' - The Amazon Resource Number (ARN) of the IAM role used to create or
-- update the stack set.
--
-- Use customized administrator roles to control which users or groups can
-- manage specific stack sets within the same administrator account. For
-- more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html Prerequisites: Granting Permissions for Stack Set Operations>
-- in the /CloudFormation User Guide/.
--
-- 'autoDeployment', 'stackSet_autoDeployment' - [Service-managed permissions] Describes whether StackSets automatically
-- deploys to Organizations accounts that are added to a target
-- organization or organizational unit (OU).
--
-- 'organizationalUnitIds', 'stackSet_organizationalUnitIds' - [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>.
--
-- 'stackSetARN', 'stackSet_stackSetARN' - The Amazon Resource Number (ARN) of the stack set.
--
-- 'permissionModel', 'stackSet_permissionModel' - Describes how the IAM roles required for stack set operations are
-- created.
--
-- -   With @self-managed@ permissions, you must create the administrator
--     and execution roles required to deploy to target accounts. For more
--     information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html Grant Self-Managed Stack Set Permissions>.
--
-- -   With @service-managed@ permissions, StackSets automatically creates
--     the IAM roles required to deploy to accounts managed by
--     Organizations. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html Grant Service-Managed Stack Set Permissions>.
--
-- 'parameters', 'stackSet_parameters' - A list of input parameters for a stack set.
--
-- 'templateBody', 'stackSet_templateBody' - The structure that contains the body of the template that was used to
-- create or update the stack set.
--
-- 'stackSetName', 'stackSet_stackSetName' - The name that\'s associated with the stack set.
--
-- 'description', 'stackSet_description' - A description of the stack set that you specify when the stack set is
-- created or updated.
--
-- 'capabilities', 'stackSet_capabilities' - The capabilities that are allowed in the stack set. Some stack set
-- templates might include resources that can affect permissions in your
-- Amazon Web Services account—for example, by creating new Identity and
-- Access Management (IAM) users. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates.>
--
-- 'tags', 'stackSet_tags' - A list of tags that specify information about the stack set. A maximum
-- number of 50 tags can be specified.
--
-- 'stackSetId', 'stackSet_stackSetId' - The ID of the stack set.
--
-- 'executionRoleName', 'stackSet_executionRoleName' - The name of the IAM execution role used to create or update the stack
-- set.
--
-- Use customized execution roles to control which stack resources users
-- and groups can include in their stack sets.
newStackSet ::
  StackSet
newStackSet :: StackSet
newStackSet =
  StackSet' :: Maybe StackSetDriftDetectionDetails
-> Maybe StackSetStatus
-> Maybe Text
-> Maybe AutoDeployment
-> Maybe [Text]
-> Maybe Text
-> Maybe PermissionModels
-> Maybe [Parameter]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Capability]
-> Maybe [Tag]
-> Maybe Text
-> Maybe Text
-> StackSet
StackSet'
    { $sel:stackSetDriftDetectionDetails:StackSet' :: Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails =
        Maybe StackSetDriftDetectionDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:status:StackSet' :: Maybe StackSetStatus
status = Maybe StackSetStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:administrationRoleARN:StackSet' :: Maybe Text
administrationRoleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoDeployment:StackSet' :: Maybe AutoDeployment
autoDeployment = Maybe AutoDeployment
forall a. Maybe a
Prelude.Nothing,
      $sel:organizationalUnitIds:StackSet' :: Maybe [Text]
organizationalUnitIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetARN:StackSet' :: Maybe Text
stackSetARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:permissionModel:StackSet' :: Maybe PermissionModels
permissionModel = Maybe PermissionModels
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:StackSet' :: Maybe [Parameter]
parameters = Maybe [Parameter]
forall a. Maybe a
Prelude.Nothing,
      $sel:templateBody:StackSet' :: Maybe Text
templateBody = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetName:StackSet' :: Maybe Text
stackSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:StackSet' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:capabilities:StackSet' :: Maybe [Capability]
capabilities = Maybe [Capability]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StackSet' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackSetId:StackSet' :: Maybe Text
stackSetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleName:StackSet' :: Maybe Text
executionRoleName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Detailed information about the drift status of the stack set.
--
-- For stack sets, contains information about the last /completed/ drift
-- operation performed on the stack set. Information about drift operations
-- currently in progress is not included.
stackSet_stackSetDriftDetectionDetails :: Lens.Lens' StackSet (Prelude.Maybe StackSetDriftDetectionDetails)
stackSet_stackSetDriftDetectionDetails :: (Maybe StackSetDriftDetectionDetails
 -> f (Maybe StackSetDriftDetectionDetails))
-> StackSet -> f StackSet
stackSet_stackSetDriftDetectionDetails = (StackSet -> Maybe StackSetDriftDetectionDetails)
-> (StackSet -> Maybe StackSetDriftDetectionDetails -> StackSet)
-> Lens
     StackSet
     StackSet
     (Maybe StackSetDriftDetectionDetails)
     (Maybe StackSetDriftDetectionDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails :: Maybe StackSetDriftDetectionDetails
$sel:stackSetDriftDetectionDetails:StackSet' :: StackSet -> Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails} -> Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails) (\s :: StackSet
s@StackSet' {} Maybe StackSetDriftDetectionDetails
a -> StackSet
s {$sel:stackSetDriftDetectionDetails:StackSet' :: Maybe StackSetDriftDetectionDetails
stackSetDriftDetectionDetails = Maybe StackSetDriftDetectionDetails
a} :: StackSet)

-- | The status of the stack set.
stackSet_status :: Lens.Lens' StackSet (Prelude.Maybe StackSetStatus)
stackSet_status :: (Maybe StackSetStatus -> f (Maybe StackSetStatus))
-> StackSet -> f StackSet
stackSet_status = (StackSet -> Maybe StackSetStatus)
-> (StackSet -> Maybe StackSetStatus -> StackSet)
-> Lens
     StackSet StackSet (Maybe StackSetStatus) (Maybe StackSetStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe StackSetStatus
status :: Maybe StackSetStatus
$sel:status:StackSet' :: StackSet -> Maybe StackSetStatus
status} -> Maybe StackSetStatus
status) (\s :: StackSet
s@StackSet' {} Maybe StackSetStatus
a -> StackSet
s {$sel:status:StackSet' :: Maybe StackSetStatus
status = Maybe StackSetStatus
a} :: StackSet)

-- | The Amazon Resource Number (ARN) of the IAM role used to create or
-- update the stack set.
--
-- Use customized administrator roles to control which users or groups can
-- manage specific stack sets within the same administrator account. For
-- more information, see
-- <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html Prerequisites: Granting Permissions for Stack Set Operations>
-- in the /CloudFormation User Guide/.
stackSet_administrationRoleARN :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_administrationRoleARN :: (Maybe Text -> f (Maybe Text)) -> StackSet -> f StackSet
stackSet_administrationRoleARN = (StackSet -> Maybe Text)
-> (StackSet -> Maybe Text -> StackSet)
-> Lens StackSet StackSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
administrationRoleARN :: Maybe Text
$sel:administrationRoleARN:StackSet' :: StackSet -> Maybe Text
administrationRoleARN} -> Maybe Text
administrationRoleARN) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:administrationRoleARN:StackSet' :: Maybe Text
administrationRoleARN = Maybe Text
a} :: StackSet)

-- | [Service-managed permissions] Describes whether StackSets automatically
-- deploys to Organizations accounts that are added to a target
-- organization or organizational unit (OU).
stackSet_autoDeployment :: Lens.Lens' StackSet (Prelude.Maybe AutoDeployment)
stackSet_autoDeployment :: (Maybe AutoDeployment -> f (Maybe AutoDeployment))
-> StackSet -> f StackSet
stackSet_autoDeployment = (StackSet -> Maybe AutoDeployment)
-> (StackSet -> Maybe AutoDeployment -> StackSet)
-> Lens
     StackSet StackSet (Maybe AutoDeployment) (Maybe AutoDeployment)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe AutoDeployment
autoDeployment :: Maybe AutoDeployment
$sel:autoDeployment:StackSet' :: StackSet -> Maybe AutoDeployment
autoDeployment} -> Maybe AutoDeployment
autoDeployment) (\s :: StackSet
s@StackSet' {} Maybe AutoDeployment
a -> StackSet
s {$sel:autoDeployment:StackSet' :: Maybe AutoDeployment
autoDeployment = Maybe AutoDeployment
a} :: StackSet)

-- | [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>.
stackSet_organizationalUnitIds :: Lens.Lens' StackSet (Prelude.Maybe [Prelude.Text])
stackSet_organizationalUnitIds :: (Maybe [Text] -> f (Maybe [Text])) -> StackSet -> f StackSet
stackSet_organizationalUnitIds = (StackSet -> Maybe [Text])
-> (StackSet -> Maybe [Text] -> StackSet)
-> Lens StackSet StackSet (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe [Text]
organizationalUnitIds :: Maybe [Text]
$sel:organizationalUnitIds:StackSet' :: StackSet -> Maybe [Text]
organizationalUnitIds} -> Maybe [Text]
organizationalUnitIds) (\s :: StackSet
s@StackSet' {} Maybe [Text]
a -> StackSet
s {$sel:organizationalUnitIds:StackSet' :: Maybe [Text]
organizationalUnitIds = Maybe [Text]
a} :: StackSet) ((Maybe [Text] -> f (Maybe [Text])) -> StackSet -> f StackSet)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> StackSet
-> f StackSet
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

-- | The Amazon Resource Number (ARN) of the stack set.
stackSet_stackSetARN :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_stackSetARN :: (Maybe Text -> f (Maybe Text)) -> StackSet -> f StackSet
stackSet_stackSetARN = (StackSet -> Maybe Text)
-> (StackSet -> Maybe Text -> StackSet)
-> Lens StackSet StackSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
stackSetARN :: Maybe Text
$sel:stackSetARN:StackSet' :: StackSet -> Maybe Text
stackSetARN} -> Maybe Text
stackSetARN) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:stackSetARN:StackSet' :: Maybe Text
stackSetARN = Maybe Text
a} :: StackSet)

-- | Describes how the IAM roles required for stack set operations are
-- created.
--
-- -   With @self-managed@ permissions, you must create the administrator
--     and execution roles required to deploy to target accounts. For more
--     information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-self-managed.html Grant Self-Managed Stack Set Permissions>.
--
-- -   With @service-managed@ permissions, StackSets automatically creates
--     the IAM roles required to deploy to accounts managed by
--     Organizations. For more information, see
--     <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs-service-managed.html Grant Service-Managed Stack Set Permissions>.
stackSet_permissionModel :: Lens.Lens' StackSet (Prelude.Maybe PermissionModels)
stackSet_permissionModel :: (Maybe PermissionModels -> f (Maybe PermissionModels))
-> StackSet -> f StackSet
stackSet_permissionModel = (StackSet -> Maybe PermissionModels)
-> (StackSet -> Maybe PermissionModels -> StackSet)
-> Lens
     StackSet StackSet (Maybe PermissionModels) (Maybe PermissionModels)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe PermissionModels
permissionModel :: Maybe PermissionModels
$sel:permissionModel:StackSet' :: StackSet -> Maybe PermissionModels
permissionModel} -> Maybe PermissionModels
permissionModel) (\s :: StackSet
s@StackSet' {} Maybe PermissionModels
a -> StackSet
s {$sel:permissionModel:StackSet' :: Maybe PermissionModels
permissionModel = Maybe PermissionModels
a} :: StackSet)

-- | A list of input parameters for a stack set.
stackSet_parameters :: Lens.Lens' StackSet (Prelude.Maybe [Parameter])
stackSet_parameters :: (Maybe [Parameter] -> f (Maybe [Parameter]))
-> StackSet -> f StackSet
stackSet_parameters = (StackSet -> Maybe [Parameter])
-> (StackSet -> Maybe [Parameter] -> StackSet)
-> Lens StackSet StackSet (Maybe [Parameter]) (Maybe [Parameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe [Parameter]
parameters :: Maybe [Parameter]
$sel:parameters:StackSet' :: StackSet -> Maybe [Parameter]
parameters} -> Maybe [Parameter]
parameters) (\s :: StackSet
s@StackSet' {} Maybe [Parameter]
a -> StackSet
s {$sel:parameters:StackSet' :: Maybe [Parameter]
parameters = Maybe [Parameter]
a} :: StackSet) ((Maybe [Parameter] -> f (Maybe [Parameter]))
 -> StackSet -> f StackSet)
-> ((Maybe [Parameter] -> f (Maybe [Parameter]))
    -> Maybe [Parameter] -> f (Maybe [Parameter]))
-> (Maybe [Parameter] -> f (Maybe [Parameter]))
-> StackSet
-> f StackSet
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

-- | The structure that contains the body of the template that was used to
-- create or update the stack set.
stackSet_templateBody :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_templateBody :: (Maybe Text -> f (Maybe Text)) -> StackSet -> f StackSet
stackSet_templateBody = (StackSet -> Maybe Text)
-> (StackSet -> Maybe Text -> StackSet)
-> Lens StackSet StackSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
templateBody :: Maybe Text
$sel:templateBody:StackSet' :: StackSet -> Maybe Text
templateBody} -> Maybe Text
templateBody) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:templateBody:StackSet' :: Maybe Text
templateBody = Maybe Text
a} :: StackSet)

-- | The name that\'s associated with the stack set.
stackSet_stackSetName :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_stackSetName :: (Maybe Text -> f (Maybe Text)) -> StackSet -> f StackSet
stackSet_stackSetName = (StackSet -> Maybe Text)
-> (StackSet -> Maybe Text -> StackSet)
-> Lens StackSet StackSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
stackSetName :: Maybe Text
$sel:stackSetName:StackSet' :: StackSet -> Maybe Text
stackSetName} -> Maybe Text
stackSetName) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:stackSetName:StackSet' :: Maybe Text
stackSetName = Maybe Text
a} :: StackSet)

-- | A description of the stack set that you specify when the stack set is
-- created or updated.
stackSet_description :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_description :: (Maybe Text -> f (Maybe Text)) -> StackSet -> f StackSet
stackSet_description = (StackSet -> Maybe Text)
-> (StackSet -> Maybe Text -> StackSet)
-> Lens StackSet StackSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
description :: Maybe Text
$sel:description:StackSet' :: StackSet -> Maybe Text
description} -> Maybe Text
description) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:description:StackSet' :: Maybe Text
description = Maybe Text
a} :: StackSet)

-- | The capabilities that are allowed in the stack set. Some stack set
-- templates might include resources that can affect permissions in your
-- Amazon Web Services account—for example, by creating new Identity and
-- Access Management (IAM) users. For more information, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities Acknowledging IAM Resources in CloudFormation Templates.>
stackSet_capabilities :: Lens.Lens' StackSet (Prelude.Maybe [Capability])
stackSet_capabilities :: (Maybe [Capability] -> f (Maybe [Capability]))
-> StackSet -> f StackSet
stackSet_capabilities = (StackSet -> Maybe [Capability])
-> (StackSet -> Maybe [Capability] -> StackSet)
-> Lens StackSet StackSet (Maybe [Capability]) (Maybe [Capability])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe [Capability]
capabilities :: Maybe [Capability]
$sel:capabilities:StackSet' :: StackSet -> Maybe [Capability]
capabilities} -> Maybe [Capability]
capabilities) (\s :: StackSet
s@StackSet' {} Maybe [Capability]
a -> StackSet
s {$sel:capabilities:StackSet' :: Maybe [Capability]
capabilities = Maybe [Capability]
a} :: StackSet) ((Maybe [Capability] -> f (Maybe [Capability]))
 -> StackSet -> f StackSet)
-> ((Maybe [Capability] -> f (Maybe [Capability]))
    -> Maybe [Capability] -> f (Maybe [Capability]))
-> (Maybe [Capability] -> f (Maybe [Capability]))
-> StackSet
-> f StackSet
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

-- | A list of tags that specify information about the stack set. A maximum
-- number of 50 tags can be specified.
stackSet_tags :: Lens.Lens' StackSet (Prelude.Maybe [Tag])
stackSet_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> StackSet -> f StackSet
stackSet_tags = (StackSet -> Maybe [Tag])
-> (StackSet -> Maybe [Tag] -> StackSet)
-> Lens StackSet StackSet (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StackSet' :: StackSet -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StackSet
s@StackSet' {} Maybe [Tag]
a -> StackSet
s {$sel:tags:StackSet' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StackSet) ((Maybe [Tag] -> f (Maybe [Tag])) -> StackSet -> f StackSet)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StackSet
-> f StackSet
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 ID of the stack set.
stackSet_stackSetId :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_stackSetId :: (Maybe Text -> f (Maybe Text)) -> StackSet -> f StackSet
stackSet_stackSetId = (StackSet -> Maybe Text)
-> (StackSet -> Maybe Text -> StackSet)
-> Lens StackSet StackSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
stackSetId :: Maybe Text
$sel:stackSetId:StackSet' :: StackSet -> Maybe Text
stackSetId} -> Maybe Text
stackSetId) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:stackSetId:StackSet' :: Maybe Text
stackSetId = Maybe Text
a} :: StackSet)

-- | The name of the IAM execution role used to create or update the stack
-- set.
--
-- Use customized execution roles to control which stack resources users
-- and groups can include in their stack sets.
stackSet_executionRoleName :: Lens.Lens' StackSet (Prelude.Maybe Prelude.Text)
stackSet_executionRoleName :: (Maybe Text -> f (Maybe Text)) -> StackSet -> f StackSet
stackSet_executionRoleName = (StackSet -> Maybe Text)
-> (StackSet -> Maybe Text -> StackSet)
-> Lens StackSet StackSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StackSet' {Maybe Text
executionRoleName :: Maybe Text
$sel:executionRoleName:StackSet' :: StackSet -> Maybe Text
executionRoleName} -> Maybe Text
executionRoleName) (\s :: StackSet
s@StackSet' {} Maybe Text
a -> StackSet
s {$sel:executionRoleName:StackSet' :: Maybe Text
executionRoleName = Maybe Text
a} :: StackSet)

instance Core.FromXML StackSet where
  parseXML :: [Node] -> Either String StackSet
parseXML [Node]
x =
    Maybe StackSetDriftDetectionDetails
-> Maybe StackSetStatus
-> Maybe Text
-> Maybe AutoDeployment
-> Maybe [Text]
-> Maybe Text
-> Maybe PermissionModels
-> Maybe [Parameter]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Capability]
-> Maybe [Tag]
-> Maybe Text
-> Maybe Text
-> StackSet
StackSet'
      (Maybe StackSetDriftDetectionDetails
 -> Maybe StackSetStatus
 -> Maybe Text
 -> Maybe AutoDeployment
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe PermissionModels
 -> Maybe [Parameter]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Capability]
 -> Maybe [Tag]
 -> Maybe Text
 -> Maybe Text
 -> StackSet)
-> Either String (Maybe StackSetDriftDetectionDetails)
-> Either
     String
     (Maybe StackSetStatus
      -> Maybe Text
      -> Maybe AutoDeployment
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe PermissionModels
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node]
-> Text -> Either String (Maybe StackSetDriftDetectionDetails)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StackSetDriftDetectionDetails")
      Either
  String
  (Maybe StackSetStatus
   -> Maybe Text
   -> Maybe AutoDeployment
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe PermissionModels
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe StackSetStatus)
-> Either
     String
     (Maybe Text
      -> Maybe AutoDeployment
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe PermissionModels
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe StackSetStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Status")
      Either
  String
  (Maybe Text
   -> Maybe AutoDeployment
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe PermissionModels
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe AutoDeployment
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe PermissionModels
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
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
"AdministrationRoleARN")
      Either
  String
  (Maybe AutoDeployment
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe PermissionModels
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe AutoDeployment)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe PermissionModels
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe AutoDeployment)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutoDeployment")
      Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe PermissionModels
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe PermissionModels
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
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
"OrganizationalUnitIds"
                      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 PermissionModels
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe PermissionModels
      -> Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
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
"StackSetARN")
      Either
  String
  (Maybe PermissionModels
   -> Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe PermissionModels)
-> Either
     String
     (Maybe [Parameter]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe PermissionModels)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PermissionModel")
      Either
  String
  (Maybe [Parameter]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe [Parameter])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
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 Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
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
"TemplateBody")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Capability]
      -> Maybe [Tag]
      -> Maybe Text
      -> Maybe Text
      -> StackSet)
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
"StackSetName")
      Either
  String
  (Maybe Text
   -> Maybe [Capability]
   -> Maybe [Tag]
   -> Maybe Text
   -> Maybe Text
   -> StackSet)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Capability]
      -> Maybe [Tag] -> Maybe Text -> Maybe Text -> StackSet)
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 [Tag] -> Maybe Text -> Maybe Text -> StackSet)
-> Either String (Maybe [Capability])
-> Either
     String (Maybe [Tag] -> Maybe Text -> Maybe Text -> StackSet)
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 [Tag] -> Maybe Text -> Maybe Text -> StackSet)
-> Either String (Maybe [Tag])
-> Either String (Maybe Text -> Maybe Text -> StackSet)
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 Text -> Maybe Text -> StackSet)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> StackSet)
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
"StackSetId")
      Either String (Maybe Text -> StackSet)
-> Either String (Maybe Text) -> Either String StackSet
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
"ExecutionRoleName")

instance Prelude.Hashable StackSet

instance Prelude.NFData StackSet