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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpsWorks.Types.ChefConfiguration
import Amazonka.OpsWorks.Types.RootDeviceType
import Amazonka.OpsWorks.Types.Source
import Amazonka.OpsWorks.Types.StackAttributesKeys
import Amazonka.OpsWorks.Types.StackConfigurationManager
import qualified Amazonka.Prelude as Prelude

-- | Describes a stack.
--
-- /See:/ 'newStack' smart constructor.
data Stack = Stack'
  { -- | The ARN of an IAM profile that is the default profile for all of the
    -- stack\'s EC2 instances. For more information about IAM ARNs, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
    Stack -> Maybe Text
defaultInstanceProfileArn :: Prelude.Maybe Prelude.Text,
    -- | The stack AWS Identity and Access Management (IAM) role.
    Stack -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The default root device type. This value is used by default for all
    -- instances in the stack, but you can override it when you create an
    -- instance. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device Storage for the Root Device>.
    Stack -> Maybe RootDeviceType
defaultRootDeviceType :: Prelude.Maybe RootDeviceType,
    -- | The stack\'s ARN.
    Stack -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date when the stack was created.
    Stack -> Maybe Text
createdAt :: Prelude.Maybe Prelude.Text,
    -- | The VPC ID; applicable only if the stack is running in a VPC.
    Stack -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | A @ChefConfiguration@ object that specifies whether to enable Berkshelf
    -- and the Berkshelf version. For more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html Create a New Stack>.
    Stack -> Maybe ChefConfiguration
chefConfiguration :: Prelude.Maybe ChefConfiguration,
    -- | The agent version. This parameter is set to @LATEST@ for auto-update. or
    -- a version number for a fixed agent version.
    Stack -> Maybe Text
agentVersion :: Prelude.Maybe Prelude.Text,
    -- | A default Amazon EC2 key pair for the stack\'s instances. You can
    -- override this value when you create or update an instance.
    Stack -> Maybe Text
defaultSshKeyName :: Prelude.Maybe Prelude.Text,
    -- | A JSON object that contains user-defined attributes to be added to the
    -- stack configuration and deployment attributes. You can use custom JSON
    -- to override the corresponding default stack configuration attribute
    -- values or to pass data to recipes. The string should be in the following
    -- format:
    --
    -- @\"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\",...}\"@
    --
    -- For more information on custom JSON, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html Use Custom JSON to Modify the Stack Configuration Attributes>.
    Stack -> Maybe Text
customJson :: Prelude.Maybe Prelude.Text,
    -- | Contains the information required to retrieve an app or cookbook from a
    -- repository. For more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html Adding Apps>
    -- or
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html Cookbooks and Recipes>.
    Stack -> Maybe Source
customCookbooksSource :: Prelude.Maybe Source,
    -- | The stack\'s default Availability Zone. For more information, see
    -- <https://docs.aws.amazon.com/general/latest/gr/rande.html Regions and Endpoints>.
    Stack -> Maybe Text
defaultAvailabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The stack\'s attributes.
    Stack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes :: Prelude.Maybe (Prelude.HashMap StackAttributesKeys (Prelude.Maybe Prelude.Text)),
    -- | The stack name.
    Stack -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The stack\'s default operating system.
    Stack -> Maybe Text
defaultOs :: Prelude.Maybe Prelude.Text,
    -- | Whether the stack automatically associates the AWS OpsWorks Stacks
    -- built-in security groups with the stack\'s layers.
    Stack -> Maybe Bool
useOpsworksSecurityGroups :: Prelude.Maybe Prelude.Bool,
    -- | Whether the stack uses custom cookbooks.
    Stack -> Maybe Bool
useCustomCookbooks :: Prelude.Maybe Prelude.Bool,
    -- | The default subnet ID; applicable only if the stack is running in a VPC.
    Stack -> Maybe Text
defaultSubnetId :: Prelude.Maybe Prelude.Text,
    -- | The stack AWS region, such as \"ap-northeast-2\". For more information
    -- about AWS regions, see
    -- <https://docs.aws.amazon.com/general/latest/gr/rande.html Regions and Endpoints>.
    Stack -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | The configuration manager.
    Stack -> Maybe StackConfigurationManager
configurationManager :: Prelude.Maybe StackConfigurationManager,
    -- | The stack ID.
    Stack -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | The stack host name theme, with spaces replaced by underscores.
    Stack -> Maybe Text
hostnameTheme :: Prelude.Maybe Prelude.Text
  }
  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:
--
-- 'defaultInstanceProfileArn', 'stack_defaultInstanceProfileArn' - The ARN of an IAM profile that is the default profile for all of the
-- stack\'s EC2 instances. For more information about IAM ARNs, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
--
-- 'serviceRoleArn', 'stack_serviceRoleArn' - The stack AWS Identity and Access Management (IAM) role.
--
-- 'defaultRootDeviceType', 'stack_defaultRootDeviceType' - The default root device type. This value is used by default for all
-- instances in the stack, but you can override it when you create an
-- instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device Storage for the Root Device>.
--
-- 'arn', 'stack_arn' - The stack\'s ARN.
--
-- 'createdAt', 'stack_createdAt' - The date when the stack was created.
--
-- 'vpcId', 'stack_vpcId' - The VPC ID; applicable only if the stack is running in a VPC.
--
-- 'chefConfiguration', 'stack_chefConfiguration' - A @ChefConfiguration@ object that specifies whether to enable Berkshelf
-- and the Berkshelf version. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html Create a New Stack>.
--
-- 'agentVersion', 'stack_agentVersion' - The agent version. This parameter is set to @LATEST@ for auto-update. or
-- a version number for a fixed agent version.
--
-- 'defaultSshKeyName', 'stack_defaultSshKeyName' - A default Amazon EC2 key pair for the stack\'s instances. You can
-- override this value when you create or update an instance.
--
-- 'customJson', 'stack_customJson' - A JSON object that contains user-defined attributes to be added to the
-- stack configuration and deployment attributes. You can use custom JSON
-- to override the corresponding default stack configuration attribute
-- values or to pass data to recipes. The string should be in the following
-- format:
--
-- @\"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\",...}\"@
--
-- For more information on custom JSON, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html Use Custom JSON to Modify the Stack Configuration Attributes>.
--
-- 'customCookbooksSource', 'stack_customCookbooksSource' - Contains the information required to retrieve an app or cookbook from a
-- repository. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html Adding Apps>
-- or
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html Cookbooks and Recipes>.
--
-- 'defaultAvailabilityZone', 'stack_defaultAvailabilityZone' - The stack\'s default Availability Zone. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html Regions and Endpoints>.
--
-- 'attributes', 'stack_attributes' - The stack\'s attributes.
--
-- 'name', 'stack_name' - The stack name.
--
-- 'defaultOs', 'stack_defaultOs' - The stack\'s default operating system.
--
-- 'useOpsworksSecurityGroups', 'stack_useOpsworksSecurityGroups' - Whether the stack automatically associates the AWS OpsWorks Stacks
-- built-in security groups with the stack\'s layers.
--
-- 'useCustomCookbooks', 'stack_useCustomCookbooks' - Whether the stack uses custom cookbooks.
--
-- 'defaultSubnetId', 'stack_defaultSubnetId' - The default subnet ID; applicable only if the stack is running in a VPC.
--
-- 'region', 'stack_region' - The stack AWS region, such as \"ap-northeast-2\". For more information
-- about AWS regions, see
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html Regions and Endpoints>.
--
-- 'configurationManager', 'stack_configurationManager' - The configuration manager.
--
-- 'stackId', 'stack_stackId' - The stack ID.
--
-- 'hostnameTheme', 'stack_hostnameTheme' - The stack host name theme, with spaces replaced by underscores.
newStack ::
  Stack
newStack :: Stack
newStack =
  Stack' :: Maybe Text
-> Maybe Text
-> Maybe RootDeviceType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChefConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Source
-> Maybe Text
-> Maybe (HashMap StackAttributesKeys (Maybe Text))
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe StackConfigurationManager
-> Maybe Text
-> Maybe Text
-> Stack
Stack'
    { $sel:defaultInstanceProfileArn:Stack' :: Maybe Text
defaultInstanceProfileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRoleArn:Stack' :: Maybe Text
serviceRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRootDeviceType:Stack' :: Maybe RootDeviceType
defaultRootDeviceType = Maybe RootDeviceType
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Stack' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Stack' :: Maybe Text
createdAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:Stack' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:chefConfiguration:Stack' :: Maybe ChefConfiguration
chefConfiguration = Maybe ChefConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:agentVersion:Stack' :: Maybe Text
agentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultSshKeyName:Stack' :: Maybe Text
defaultSshKeyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customJson:Stack' :: Maybe Text
customJson = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customCookbooksSource:Stack' :: Maybe Source
customCookbooksSource = Maybe Source
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultAvailabilityZone:Stack' :: Maybe Text
defaultAvailabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:attributes:Stack' :: Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes = Maybe (HashMap StackAttributesKeys (Maybe Text))
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Stack' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultOs:Stack' :: Maybe Text
defaultOs = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:useOpsworksSecurityGroups:Stack' :: Maybe Bool
useOpsworksSecurityGroups = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:useCustomCookbooks:Stack' :: Maybe Bool
useCustomCookbooks = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultSubnetId:Stack' :: Maybe Text
defaultSubnetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:region:Stack' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationManager:Stack' :: Maybe StackConfigurationManager
configurationManager = Maybe StackConfigurationManager
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:Stack' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hostnameTheme:Stack' :: Maybe Text
hostnameTheme = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of an IAM profile that is the default profile for all of the
-- stack\'s EC2 instances. For more information about IAM ARNs, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
stack_defaultInstanceProfileArn :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_defaultInstanceProfileArn :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_defaultInstanceProfileArn = (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
defaultInstanceProfileArn :: Maybe Text
$sel:defaultInstanceProfileArn:Stack' :: Stack -> Maybe Text
defaultInstanceProfileArn} -> Maybe Text
defaultInstanceProfileArn) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:defaultInstanceProfileArn:Stack' :: Maybe Text
defaultInstanceProfileArn = Maybe Text
a} :: Stack)

-- | The stack AWS Identity and Access Management (IAM) role.
stack_serviceRoleArn :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_serviceRoleArn :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_serviceRoleArn = (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
serviceRoleArn :: Maybe Text
$sel:serviceRoleArn:Stack' :: Stack -> Maybe Text
serviceRoleArn} -> Maybe Text
serviceRoleArn) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:serviceRoleArn:Stack' :: Maybe Text
serviceRoleArn = Maybe Text
a} :: Stack)

-- | The default root device type. This value is used by default for all
-- instances in the stack, but you can override it when you create an
-- instance. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device Storage for the Root Device>.
stack_defaultRootDeviceType :: Lens.Lens' Stack (Prelude.Maybe RootDeviceType)
stack_defaultRootDeviceType :: (Maybe RootDeviceType -> f (Maybe RootDeviceType))
-> Stack -> f Stack
stack_defaultRootDeviceType = (Stack -> Maybe RootDeviceType)
-> (Stack -> Maybe RootDeviceType -> Stack)
-> Lens Stack Stack (Maybe RootDeviceType) (Maybe RootDeviceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe RootDeviceType
defaultRootDeviceType :: Maybe RootDeviceType
$sel:defaultRootDeviceType:Stack' :: Stack -> Maybe RootDeviceType
defaultRootDeviceType} -> Maybe RootDeviceType
defaultRootDeviceType) (\s :: Stack
s@Stack' {} Maybe RootDeviceType
a -> Stack
s {$sel:defaultRootDeviceType:Stack' :: Maybe RootDeviceType
defaultRootDeviceType = Maybe RootDeviceType
a} :: Stack)

-- | The stack\'s ARN.
stack_arn :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_arn :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_arn = (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
arn :: Maybe Text
$sel:arn:Stack' :: Stack -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:arn:Stack' :: Maybe Text
arn = Maybe Text
a} :: Stack)

-- | The date when the stack was created.
stack_createdAt :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_createdAt :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_createdAt = (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
createdAt :: Maybe Text
$sel:createdAt:Stack' :: Stack -> Maybe Text
createdAt} -> Maybe Text
createdAt) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:createdAt:Stack' :: Maybe Text
createdAt = Maybe Text
a} :: Stack)

-- | The VPC ID; applicable only if the stack is running in a VPC.
stack_vpcId :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_vpcId :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_vpcId = (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
vpcId :: Maybe Text
$sel:vpcId:Stack' :: Stack -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:vpcId:Stack' :: Maybe Text
vpcId = Maybe Text
a} :: Stack)

-- | A @ChefConfiguration@ object that specifies whether to enable Berkshelf
-- and the Berkshelf version. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html Create a New Stack>.
stack_chefConfiguration :: Lens.Lens' Stack (Prelude.Maybe ChefConfiguration)
stack_chefConfiguration :: (Maybe ChefConfiguration -> f (Maybe ChefConfiguration))
-> Stack -> f Stack
stack_chefConfiguration = (Stack -> Maybe ChefConfiguration)
-> (Stack -> Maybe ChefConfiguration -> Stack)
-> Lens
     Stack Stack (Maybe ChefConfiguration) (Maybe ChefConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe ChefConfiguration
chefConfiguration :: Maybe ChefConfiguration
$sel:chefConfiguration:Stack' :: Stack -> Maybe ChefConfiguration
chefConfiguration} -> Maybe ChefConfiguration
chefConfiguration) (\s :: Stack
s@Stack' {} Maybe ChefConfiguration
a -> Stack
s {$sel:chefConfiguration:Stack' :: Maybe ChefConfiguration
chefConfiguration = Maybe ChefConfiguration
a} :: Stack)

-- | The agent version. This parameter is set to @LATEST@ for auto-update. or
-- a version number for a fixed agent version.
stack_agentVersion :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_agentVersion :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_agentVersion = (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
agentVersion :: Maybe Text
$sel:agentVersion:Stack' :: Stack -> Maybe Text
agentVersion} -> Maybe Text
agentVersion) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:agentVersion:Stack' :: Maybe Text
agentVersion = Maybe Text
a} :: Stack)

-- | A default Amazon EC2 key pair for the stack\'s instances. You can
-- override this value when you create or update an instance.
stack_defaultSshKeyName :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_defaultSshKeyName :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_defaultSshKeyName = (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
defaultSshKeyName :: Maybe Text
$sel:defaultSshKeyName:Stack' :: Stack -> Maybe Text
defaultSshKeyName} -> Maybe Text
defaultSshKeyName) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:defaultSshKeyName:Stack' :: Maybe Text
defaultSshKeyName = Maybe Text
a} :: Stack)

-- | A JSON object that contains user-defined attributes to be added to the
-- stack configuration and deployment attributes. You can use custom JSON
-- to override the corresponding default stack configuration attribute
-- values or to pass data to recipes. The string should be in the following
-- format:
--
-- @\"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\",...}\"@
--
-- For more information on custom JSON, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html Use Custom JSON to Modify the Stack Configuration Attributes>.
stack_customJson :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_customJson :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_customJson = (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
customJson :: Maybe Text
$sel:customJson:Stack' :: Stack -> Maybe Text
customJson} -> Maybe Text
customJson) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:customJson:Stack' :: Maybe Text
customJson = Maybe Text
a} :: Stack)

-- | Contains the information required to retrieve an app or cookbook from a
-- repository. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html Adding Apps>
-- or
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html Cookbooks and Recipes>.
stack_customCookbooksSource :: Lens.Lens' Stack (Prelude.Maybe Source)
stack_customCookbooksSource :: (Maybe Source -> f (Maybe Source)) -> Stack -> f Stack
stack_customCookbooksSource = (Stack -> Maybe Source)
-> (Stack -> Maybe Source -> Stack)
-> Lens Stack Stack (Maybe Source) (Maybe Source)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe Source
customCookbooksSource :: Maybe Source
$sel:customCookbooksSource:Stack' :: Stack -> Maybe Source
customCookbooksSource} -> Maybe Source
customCookbooksSource) (\s :: Stack
s@Stack' {} Maybe Source
a -> Stack
s {$sel:customCookbooksSource:Stack' :: Maybe Source
customCookbooksSource = Maybe Source
a} :: Stack)

-- | The stack\'s default Availability Zone. For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html Regions and Endpoints>.
stack_defaultAvailabilityZone :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_defaultAvailabilityZone :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_defaultAvailabilityZone = (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
defaultAvailabilityZone :: Maybe Text
$sel:defaultAvailabilityZone:Stack' :: Stack -> Maybe Text
defaultAvailabilityZone} -> Maybe Text
defaultAvailabilityZone) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:defaultAvailabilityZone:Stack' :: Maybe Text
defaultAvailabilityZone = Maybe Text
a} :: Stack)

-- | The stack\'s attributes.
stack_attributes :: Lens.Lens' Stack (Prelude.Maybe (Prelude.HashMap StackAttributesKeys (Prelude.Maybe Prelude.Text)))
stack_attributes :: (Maybe (HashMap StackAttributesKeys (Maybe Text))
 -> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
-> Stack -> f Stack
stack_attributes = (Stack -> Maybe (HashMap StackAttributesKeys (Maybe Text)))
-> (Stack
    -> Maybe (HashMap StackAttributesKeys (Maybe Text)) -> Stack)
-> Lens
     Stack
     Stack
     (Maybe (HashMap StackAttributesKeys (Maybe Text)))
     (Maybe (HashMap StackAttributesKeys (Maybe Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes :: Maybe (HashMap StackAttributesKeys (Maybe Text))
$sel:attributes:Stack' :: Stack -> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes} -> Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes) (\s :: Stack
s@Stack' {} Maybe (HashMap StackAttributesKeys (Maybe Text))
a -> Stack
s {$sel:attributes:Stack' :: Maybe (HashMap StackAttributesKeys (Maybe Text))
attributes = Maybe (HashMap StackAttributesKeys (Maybe Text))
a} :: Stack) ((Maybe (HashMap StackAttributesKeys (Maybe Text))
  -> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
 -> Stack -> f Stack)
-> ((Maybe (HashMap StackAttributesKeys (Maybe Text))
     -> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
    -> Maybe (HashMap StackAttributesKeys (Maybe Text))
    -> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
-> (Maybe (HashMap StackAttributesKeys (Maybe Text))
    -> f (Maybe (HashMap StackAttributesKeys (Maybe Text))))
-> Stack
-> f Stack
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap StackAttributesKeys (Maybe Text))
  (HashMap StackAttributesKeys (Maybe Text))
  (HashMap StackAttributesKeys (Maybe Text))
  (HashMap StackAttributesKeys (Maybe Text))
-> Iso
     (Maybe (HashMap StackAttributesKeys (Maybe Text)))
     (Maybe (HashMap StackAttributesKeys (Maybe Text)))
     (Maybe (HashMap StackAttributesKeys (Maybe Text)))
     (Maybe (HashMap StackAttributesKeys (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
  (HashMap StackAttributesKeys (Maybe Text))
  (HashMap StackAttributesKeys (Maybe Text))
  (HashMap StackAttributesKeys (Maybe Text))
  (HashMap StackAttributesKeys (Maybe Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The stack name.
stack_name :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_name :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_name = (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
name :: Maybe Text
$sel:name:Stack' :: Stack -> Maybe Text
name} -> Maybe Text
name) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:name:Stack' :: Maybe Text
name = Maybe Text
a} :: Stack)

-- | The stack\'s default operating system.
stack_defaultOs :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_defaultOs :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_defaultOs = (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
defaultOs :: Maybe Text
$sel:defaultOs:Stack' :: Stack -> Maybe Text
defaultOs} -> Maybe Text
defaultOs) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:defaultOs:Stack' :: Maybe Text
defaultOs = Maybe Text
a} :: Stack)

-- | Whether the stack automatically associates the AWS OpsWorks Stacks
-- built-in security groups with the stack\'s layers.
stack_useOpsworksSecurityGroups :: Lens.Lens' Stack (Prelude.Maybe Prelude.Bool)
stack_useOpsworksSecurityGroups :: (Maybe Bool -> f (Maybe Bool)) -> Stack -> f Stack
stack_useOpsworksSecurityGroups = (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
useOpsworksSecurityGroups :: Maybe Bool
$sel:useOpsworksSecurityGroups:Stack' :: Stack -> Maybe Bool
useOpsworksSecurityGroups} -> Maybe Bool
useOpsworksSecurityGroups) (\s :: Stack
s@Stack' {} Maybe Bool
a -> Stack
s {$sel:useOpsworksSecurityGroups:Stack' :: Maybe Bool
useOpsworksSecurityGroups = Maybe Bool
a} :: Stack)

-- | Whether the stack uses custom cookbooks.
stack_useCustomCookbooks :: Lens.Lens' Stack (Prelude.Maybe Prelude.Bool)
stack_useCustomCookbooks :: (Maybe Bool -> f (Maybe Bool)) -> Stack -> f Stack
stack_useCustomCookbooks = (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
useCustomCookbooks :: Maybe Bool
$sel:useCustomCookbooks:Stack' :: Stack -> Maybe Bool
useCustomCookbooks} -> Maybe Bool
useCustomCookbooks) (\s :: Stack
s@Stack' {} Maybe Bool
a -> Stack
s {$sel:useCustomCookbooks:Stack' :: Maybe Bool
useCustomCookbooks = Maybe Bool
a} :: Stack)

-- | The default subnet ID; applicable only if the stack is running in a VPC.
stack_defaultSubnetId :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_defaultSubnetId :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_defaultSubnetId = (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
defaultSubnetId :: Maybe Text
$sel:defaultSubnetId:Stack' :: Stack -> Maybe Text
defaultSubnetId} -> Maybe Text
defaultSubnetId) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:defaultSubnetId:Stack' :: Maybe Text
defaultSubnetId = Maybe Text
a} :: Stack)

-- | The stack AWS region, such as \"ap-northeast-2\". For more information
-- about AWS regions, see
-- <https://docs.aws.amazon.com/general/latest/gr/rande.html Regions and Endpoints>.
stack_region :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_region :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_region = (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
region :: Maybe Text
$sel:region:Stack' :: Stack -> Maybe Text
region} -> Maybe Text
region) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:region:Stack' :: Maybe Text
region = Maybe Text
a} :: Stack)

-- | The configuration manager.
stack_configurationManager :: Lens.Lens' Stack (Prelude.Maybe StackConfigurationManager)
stack_configurationManager :: (Maybe StackConfigurationManager
 -> f (Maybe StackConfigurationManager))
-> Stack -> f Stack
stack_configurationManager = (Stack -> Maybe StackConfigurationManager)
-> (Stack -> Maybe StackConfigurationManager -> Stack)
-> Lens
     Stack
     Stack
     (Maybe StackConfigurationManager)
     (Maybe StackConfigurationManager)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Stack' {Maybe StackConfigurationManager
configurationManager :: Maybe StackConfigurationManager
$sel:configurationManager:Stack' :: Stack -> Maybe StackConfigurationManager
configurationManager} -> Maybe StackConfigurationManager
configurationManager) (\s :: Stack
s@Stack' {} Maybe StackConfigurationManager
a -> Stack
s {$sel:configurationManager:Stack' :: Maybe StackConfigurationManager
configurationManager = Maybe StackConfigurationManager
a} :: Stack)

-- | The stack ID.
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)

-- | The stack host name theme, with spaces replaced by underscores.
stack_hostnameTheme :: Lens.Lens' Stack (Prelude.Maybe Prelude.Text)
stack_hostnameTheme :: (Maybe Text -> f (Maybe Text)) -> Stack -> f Stack
stack_hostnameTheme = (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
hostnameTheme :: Maybe Text
$sel:hostnameTheme:Stack' :: Stack -> Maybe Text
hostnameTheme} -> Maybe Text
hostnameTheme) (\s :: Stack
s@Stack' {} Maybe Text
a -> Stack
s {$sel:hostnameTheme:Stack' :: Maybe Text
hostnameTheme = Maybe Text
a} :: Stack)

instance Core.FromJSON Stack where
  parseJSON :: Value -> Parser Stack
parseJSON =
    String -> (Object -> Parser Stack) -> Value -> Parser Stack
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Stack"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe RootDeviceType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ChefConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Source
-> Maybe Text
-> Maybe (HashMap StackAttributesKeys (Maybe Text))
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe StackConfigurationManager
-> Maybe Text
-> Maybe Text
-> Stack
Stack'
            (Maybe Text
 -> Maybe Text
 -> Maybe RootDeviceType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ChefConfiguration
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Source
 -> Maybe Text
 -> Maybe (HashMap StackAttributesKeys (Maybe Text))
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe StackConfigurationManager
 -> Maybe Text
 -> Maybe Text
 -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe RootDeviceType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChefConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultInstanceProfileArn")
            Parser
  (Maybe Text
   -> Maybe RootDeviceType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChefConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe RootDeviceType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChefConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceRoleArn")
            Parser
  (Maybe RootDeviceType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChefConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe RootDeviceType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ChefConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RootDeviceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultRootDeviceType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ChefConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ChefConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ChefConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ChefConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedAt")
            Parser
  (Maybe Text
   -> Maybe ChefConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe ChefConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VpcId")
            Parser
  (Maybe ChefConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe ChefConfiguration)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChefConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ChefConfiguration")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AgentVersion")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultSshKeyName")
            Parser
  (Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Source
      -> Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CustomJson")
            Parser
  (Maybe Source
   -> Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Source)
-> Parser
     (Maybe Text
      -> Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Source)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CustomCookbooksSource")
            Parser
  (Maybe Text
   -> Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap StackAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultAvailabilityZone")
            Parser
  (Maybe (HashMap StackAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe (HashMap StackAttributesKeys (Maybe Text)))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe (Maybe (HashMap StackAttributesKeys (Maybe Text))))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Attributes" Parser (Maybe (Maybe (HashMap StackAttributesKeys (Maybe Text))))
-> Maybe (HashMap StackAttributesKeys (Maybe Text))
-> Parser (Maybe (HashMap StackAttributesKeys (Maybe Text)))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap StackAttributesKeys (Maybe Text))
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultOs")
            Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UseOpsworksSecurityGroups")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UseCustomCookbooks")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe StackConfigurationManager
      -> Maybe Text
      -> Maybe Text
      -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultSubnetId")
            Parser
  (Maybe Text
   -> Maybe StackConfigurationManager
   -> Maybe Text
   -> Maybe Text
   -> Stack)
-> Parser (Maybe Text)
-> Parser
     (Maybe StackConfigurationManager
      -> Maybe Text -> Maybe Text -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Region")
            Parser
  (Maybe StackConfigurationManager
   -> Maybe Text -> Maybe Text -> Stack)
-> Parser (Maybe StackConfigurationManager)
-> Parser (Maybe Text -> Maybe Text -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StackConfigurationManager)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConfigurationManager")
            Parser (Maybe Text -> Maybe Text -> Stack)
-> Parser (Maybe Text) -> Parser (Maybe Text -> Stack)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StackId")
            Parser (Maybe Text -> Stack) -> Parser (Maybe Text) -> Parser Stack
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"HostnameTheme")
      )

instance Prelude.Hashable Stack

instance Prelude.NFData Stack