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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpsWorks.Types.CloudWatchLogsConfiguration
import Amazonka.OpsWorks.Types.LayerAttributesKeys
import Amazonka.OpsWorks.Types.LayerType
import Amazonka.OpsWorks.Types.LifecycleEventConfiguration
import Amazonka.OpsWorks.Types.Recipes
import Amazonka.OpsWorks.Types.VolumeConfiguration
import qualified Amazonka.Prelude as Prelude

-- | Describes a layer.
--
-- /See:/ 'newLayer' smart constructor.
data Layer = Layer'
  { -- | The ARN of the default IAM profile to be used for the layer\'s EC2
    -- instances. For more information about IAM ARNs, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
    Layer -> Maybe Text
customInstanceProfileArn :: Prelude.Maybe Prelude.Text,
    -- | An array containing the layer\'s custom security group IDs.
    Layer -> Maybe [Text]
customSecurityGroupIds :: Prelude.Maybe [Prelude.Text],
    -- | Whether to install operating system and package updates when the
    -- instance boots. The default value is @true@. If this value is set to
    -- @false@, you must then update your instances manually by using
    -- CreateDeployment to run the @update_dependencies@ stack command or
    -- manually running @yum@ (Amazon Linux) or @apt-get@ (Ubuntu) on the
    -- instances.
    --
    -- We strongly recommend using the default value of @true@, to ensure that
    -- your instances have the latest security updates.
    Layer -> Maybe Bool
installUpdatesOnBoot :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon CloudWatch Logs configuration settings for the layer.
    Layer -> Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration :: Prelude.Maybe CloudWatchLogsConfiguration,
    -- | A @LifeCycleEventConfiguration@ object that specifies the Shutdown event
    -- configuration.
    Layer -> Maybe LifecycleEventConfiguration
lifecycleEventConfiguration :: Prelude.Maybe LifecycleEventConfiguration,
    -- | The Amazon Resource Number (ARN) of a layer.
    Layer -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Date when the layer was created.
    Layer -> Maybe Text
createdAt :: Prelude.Maybe Prelude.Text,
    -- | The layer short name.
    Layer -> Maybe Text
shortname :: Prelude.Maybe Prelude.Text,
    -- | AWS OpsWorks Stacks supports five lifecycle events: __setup__,
    -- __configuration__, __deploy__, __undeploy__, and __shutdown__. For each
    -- layer, AWS OpsWorks Stacks runs a set of standard recipes for each
    -- event. You can also provide custom recipes for any or all layers and
    -- events. AWS OpsWorks Stacks runs custom event recipes after the standard
    -- recipes. @LayerCustomRecipes@ specifies the custom recipes for a
    -- particular layer to be run in response to each of the five events.
    --
    -- To specify a recipe, use the cookbook\'s directory name in the
    -- repository followed by two colons and the recipe name, which is the
    -- recipe\'s file name without the @.rb@ extension. For example:
    -- @phpapp2::dbsetup@ specifies the @dbsetup.rb@ recipe in the
    -- repository\'s @phpapp2@ folder.
    Layer -> Maybe Recipes
defaultRecipes :: Prelude.Maybe Recipes,
    -- | A @LayerCustomRecipes@ object that specifies the layer\'s custom
    -- recipes.
    Layer -> Maybe Recipes
customRecipes :: Prelude.Maybe Recipes,
    -- | A JSON formatted string containing the layer\'s custom stack
    -- configuration and deployment attributes.
    Layer -> Maybe Text
customJson :: Prelude.Maybe Prelude.Text,
    -- | A @VolumeConfigurations@ object that describes the layer\'s Amazon EBS
    -- volumes.
    Layer -> Maybe [VolumeConfiguration]
volumeConfigurations :: Prelude.Maybe [VolumeConfiguration],
    -- | Whether auto healing is disabled for the layer.
    Layer -> Maybe Bool
enableAutoHealing :: Prelude.Maybe Prelude.Bool,
    -- | An array of @Package@ objects that describe the layer\'s packages.
    Layer -> Maybe [Text]
packages :: Prelude.Maybe [Prelude.Text],
    -- | The layer attributes.
    --
    -- For the @HaproxyStatsPassword@, @MysqlRootPassword@, and
    -- @GangliaPassword@ attributes, AWS OpsWorks Stacks returns
    -- @*****FILTERED*****@ instead of the actual value
    --
    -- For an ECS Cluster layer, AWS OpsWorks Stacks the @EcsClusterArn@
    -- attribute is set to the cluster\'s ARN.
    Layer -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes :: Prelude.Maybe (Prelude.HashMap LayerAttributesKeys (Prelude.Maybe Prelude.Text)),
    -- | The layer name.
    Layer -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | For stacks that are running in a VPC, whether to automatically assign a
    -- public IP address to the layer\'s instances. For more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
    Layer -> Maybe Bool
autoAssignPublicIps :: Prelude.Maybe Prelude.Bool,
    -- | The layer type.
    Layer -> Maybe LayerType
type' :: Prelude.Maybe LayerType,
    -- | Whether the layer uses Amazon EBS-optimized instances.
    Layer -> Maybe Bool
useEbsOptimizedInstances :: Prelude.Maybe Prelude.Bool,
    -- | The layer stack ID.
    Layer -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text,
    -- | The layer ID.
    Layer -> Maybe Text
layerId :: Prelude.Maybe Prelude.Text,
    -- | An array containing the layer\'s security group names.
    Layer -> Maybe [Text]
defaultSecurityGroupNames :: Prelude.Maybe [Prelude.Text],
    -- | Whether to automatically assign an
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html Elastic IP address>
    -- to the layer\'s instances. For more information, see
    -- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
    Layer -> Maybe Bool
autoAssignElasticIps :: Prelude.Maybe Prelude.Bool
  }
  deriving (Layer -> Layer -> Bool
(Layer -> Layer -> Bool) -> (Layer -> Layer -> Bool) -> Eq Layer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Layer -> Layer -> Bool
$c/= :: Layer -> Layer -> Bool
== :: Layer -> Layer -> Bool
$c== :: Layer -> Layer -> Bool
Prelude.Eq, ReadPrec [Layer]
ReadPrec Layer
Int -> ReadS Layer
ReadS [Layer]
(Int -> ReadS Layer)
-> ReadS [Layer]
-> ReadPrec Layer
-> ReadPrec [Layer]
-> Read Layer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Layer]
$creadListPrec :: ReadPrec [Layer]
readPrec :: ReadPrec Layer
$creadPrec :: ReadPrec Layer
readList :: ReadS [Layer]
$creadList :: ReadS [Layer]
readsPrec :: Int -> ReadS Layer
$creadsPrec :: Int -> ReadS Layer
Prelude.Read, Int -> Layer -> ShowS
[Layer] -> ShowS
Layer -> String
(Int -> Layer -> ShowS)
-> (Layer -> String) -> ([Layer] -> ShowS) -> Show Layer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Layer] -> ShowS
$cshowList :: [Layer] -> ShowS
show :: Layer -> String
$cshow :: Layer -> String
showsPrec :: Int -> Layer -> ShowS
$cshowsPrec :: Int -> Layer -> ShowS
Prelude.Show, (forall x. Layer -> Rep Layer x)
-> (forall x. Rep Layer x -> Layer) -> Generic Layer
forall x. Rep Layer x -> Layer
forall x. Layer -> Rep Layer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Layer x -> Layer
$cfrom :: forall x. Layer -> Rep Layer x
Prelude.Generic)

-- |
-- Create a value of 'Layer' 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:
--
-- 'customInstanceProfileArn', 'layer_customInstanceProfileArn' - The ARN of the default IAM profile to be used for the layer\'s EC2
-- instances. For more information about IAM ARNs, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
--
-- 'customSecurityGroupIds', 'layer_customSecurityGroupIds' - An array containing the layer\'s custom security group IDs.
--
-- 'installUpdatesOnBoot', 'layer_installUpdatesOnBoot' - Whether to install operating system and package updates when the
-- instance boots. The default value is @true@. If this value is set to
-- @false@, you must then update your instances manually by using
-- CreateDeployment to run the @update_dependencies@ stack command or
-- manually running @yum@ (Amazon Linux) or @apt-get@ (Ubuntu) on the
-- instances.
--
-- We strongly recommend using the default value of @true@, to ensure that
-- your instances have the latest security updates.
--
-- 'cloudWatchLogsConfiguration', 'layer_cloudWatchLogsConfiguration' - The Amazon CloudWatch Logs configuration settings for the layer.
--
-- 'lifecycleEventConfiguration', 'layer_lifecycleEventConfiguration' - A @LifeCycleEventConfiguration@ object that specifies the Shutdown event
-- configuration.
--
-- 'arn', 'layer_arn' - The Amazon Resource Number (ARN) of a layer.
--
-- 'createdAt', 'layer_createdAt' - Date when the layer was created.
--
-- 'shortname', 'layer_shortname' - The layer short name.
--
-- 'defaultRecipes', 'layer_defaultRecipes' - AWS OpsWorks Stacks supports five lifecycle events: __setup__,
-- __configuration__, __deploy__, __undeploy__, and __shutdown__. For each
-- layer, AWS OpsWorks Stacks runs a set of standard recipes for each
-- event. You can also provide custom recipes for any or all layers and
-- events. AWS OpsWorks Stacks runs custom event recipes after the standard
-- recipes. @LayerCustomRecipes@ specifies the custom recipes for a
-- particular layer to be run in response to each of the five events.
--
-- To specify a recipe, use the cookbook\'s directory name in the
-- repository followed by two colons and the recipe name, which is the
-- recipe\'s file name without the @.rb@ extension. For example:
-- @phpapp2::dbsetup@ specifies the @dbsetup.rb@ recipe in the
-- repository\'s @phpapp2@ folder.
--
-- 'customRecipes', 'layer_customRecipes' - A @LayerCustomRecipes@ object that specifies the layer\'s custom
-- recipes.
--
-- 'customJson', 'layer_customJson' - A JSON formatted string containing the layer\'s custom stack
-- configuration and deployment attributes.
--
-- 'volumeConfigurations', 'layer_volumeConfigurations' - A @VolumeConfigurations@ object that describes the layer\'s Amazon EBS
-- volumes.
--
-- 'enableAutoHealing', 'layer_enableAutoHealing' - Whether auto healing is disabled for the layer.
--
-- 'packages', 'layer_packages' - An array of @Package@ objects that describe the layer\'s packages.
--
-- 'attributes', 'layer_attributes' - The layer attributes.
--
-- For the @HaproxyStatsPassword@, @MysqlRootPassword@, and
-- @GangliaPassword@ attributes, AWS OpsWorks Stacks returns
-- @*****FILTERED*****@ instead of the actual value
--
-- For an ECS Cluster layer, AWS OpsWorks Stacks the @EcsClusterArn@
-- attribute is set to the cluster\'s ARN.
--
-- 'name', 'layer_name' - The layer name.
--
-- 'autoAssignPublicIps', 'layer_autoAssignPublicIps' - For stacks that are running in a VPC, whether to automatically assign a
-- public IP address to the layer\'s instances. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
--
-- 'type'', 'layer_type' - The layer type.
--
-- 'useEbsOptimizedInstances', 'layer_useEbsOptimizedInstances' - Whether the layer uses Amazon EBS-optimized instances.
--
-- 'stackId', 'layer_stackId' - The layer stack ID.
--
-- 'layerId', 'layer_layerId' - The layer ID.
--
-- 'defaultSecurityGroupNames', 'layer_defaultSecurityGroupNames' - An array containing the layer\'s security group names.
--
-- 'autoAssignElasticIps', 'layer_autoAssignElasticIps' - Whether to automatically assign an
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html Elastic IP address>
-- to the layer\'s instances. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
newLayer ::
  Layer
newLayer :: Layer
newLayer =
  Layer' :: Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe CloudWatchLogsConfiguration
-> Maybe LifecycleEventConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Recipes
-> Maybe Recipes
-> Maybe Text
-> Maybe [VolumeConfiguration]
-> Maybe Bool
-> Maybe [Text]
-> Maybe (HashMap LayerAttributesKeys (Maybe Text))
-> Maybe Text
-> Maybe Bool
-> Maybe LayerType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Layer
Layer'
    { $sel:customInstanceProfileArn:Layer' :: Maybe Text
customInstanceProfileArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:customSecurityGroupIds:Layer' :: Maybe [Text]
customSecurityGroupIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:installUpdatesOnBoot:Layer' :: Maybe Bool
installUpdatesOnBoot = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLogsConfiguration:Layer' :: Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration = Maybe CloudWatchLogsConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:lifecycleEventConfiguration:Layer' :: Maybe LifecycleEventConfiguration
lifecycleEventConfiguration = Maybe LifecycleEventConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Layer' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:Layer' :: Maybe Text
createdAt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:shortname:Layer' :: Maybe Text
shortname = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultRecipes:Layer' :: Maybe Recipes
defaultRecipes = Maybe Recipes
forall a. Maybe a
Prelude.Nothing,
      $sel:customRecipes:Layer' :: Maybe Recipes
customRecipes = Maybe Recipes
forall a. Maybe a
Prelude.Nothing,
      $sel:customJson:Layer' :: Maybe Text
customJson = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:volumeConfigurations:Layer' :: Maybe [VolumeConfiguration]
volumeConfigurations = Maybe [VolumeConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:enableAutoHealing:Layer' :: Maybe Bool
enableAutoHealing = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:packages:Layer' :: Maybe [Text]
packages = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:attributes:Layer' :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes = Maybe (HashMap LayerAttributesKeys (Maybe Text))
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Layer' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoAssignPublicIps:Layer' :: Maybe Bool
autoAssignPublicIps = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:type':Layer' :: Maybe LayerType
type' = Maybe LayerType
forall a. Maybe a
Prelude.Nothing,
      $sel:useEbsOptimizedInstances:Layer' :: Maybe Bool
useEbsOptimizedInstances = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:Layer' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:layerId:Layer' :: Maybe Text
layerId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultSecurityGroupNames:Layer' :: Maybe [Text]
defaultSecurityGroupNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:autoAssignElasticIps:Layer' :: Maybe Bool
autoAssignElasticIps = Maybe Bool
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the default IAM profile to be used for the layer\'s EC2
-- instances. For more information about IAM ARNs, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html Using Identifiers>.
layer_customInstanceProfileArn :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_customInstanceProfileArn :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_customInstanceProfileArn = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
customInstanceProfileArn :: Maybe Text
$sel:customInstanceProfileArn:Layer' :: Layer -> Maybe Text
customInstanceProfileArn} -> Maybe Text
customInstanceProfileArn) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:customInstanceProfileArn:Layer' :: Maybe Text
customInstanceProfileArn = Maybe Text
a} :: Layer)

-- | An array containing the layer\'s custom security group IDs.
layer_customSecurityGroupIds :: Lens.Lens' Layer (Prelude.Maybe [Prelude.Text])
layer_customSecurityGroupIds :: (Maybe [Text] -> f (Maybe [Text])) -> Layer -> f Layer
layer_customSecurityGroupIds = (Layer -> Maybe [Text])
-> (Layer -> Maybe [Text] -> Layer)
-> Lens Layer Layer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe [Text]
customSecurityGroupIds :: Maybe [Text]
$sel:customSecurityGroupIds:Layer' :: Layer -> Maybe [Text]
customSecurityGroupIds} -> Maybe [Text]
customSecurityGroupIds) (\s :: Layer
s@Layer' {} Maybe [Text]
a -> Layer
s {$sel:customSecurityGroupIds:Layer' :: Maybe [Text]
customSecurityGroupIds = Maybe [Text]
a} :: Layer) ((Maybe [Text] -> f (Maybe [Text])) -> Layer -> f Layer)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Layer
-> f Layer
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

-- | Whether to install operating system and package updates when the
-- instance boots. The default value is @true@. If this value is set to
-- @false@, you must then update your instances manually by using
-- CreateDeployment to run the @update_dependencies@ stack command or
-- manually running @yum@ (Amazon Linux) or @apt-get@ (Ubuntu) on the
-- instances.
--
-- We strongly recommend using the default value of @true@, to ensure that
-- your instances have the latest security updates.
layer_installUpdatesOnBoot :: Lens.Lens' Layer (Prelude.Maybe Prelude.Bool)
layer_installUpdatesOnBoot :: (Maybe Bool -> f (Maybe Bool)) -> Layer -> f Layer
layer_installUpdatesOnBoot = (Layer -> Maybe Bool)
-> (Layer -> Maybe Bool -> Layer)
-> Lens Layer Layer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Bool
installUpdatesOnBoot :: Maybe Bool
$sel:installUpdatesOnBoot:Layer' :: Layer -> Maybe Bool
installUpdatesOnBoot} -> Maybe Bool
installUpdatesOnBoot) (\s :: Layer
s@Layer' {} Maybe Bool
a -> Layer
s {$sel:installUpdatesOnBoot:Layer' :: Maybe Bool
installUpdatesOnBoot = Maybe Bool
a} :: Layer)

-- | The Amazon CloudWatch Logs configuration settings for the layer.
layer_cloudWatchLogsConfiguration :: Lens.Lens' Layer (Prelude.Maybe CloudWatchLogsConfiguration)
layer_cloudWatchLogsConfiguration :: (Maybe CloudWatchLogsConfiguration
 -> f (Maybe CloudWatchLogsConfiguration))
-> Layer -> f Layer
layer_cloudWatchLogsConfiguration = (Layer -> Maybe CloudWatchLogsConfiguration)
-> (Layer -> Maybe CloudWatchLogsConfiguration -> Layer)
-> Lens
     Layer
     Layer
     (Maybe CloudWatchLogsConfiguration)
     (Maybe CloudWatchLogsConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration :: Maybe CloudWatchLogsConfiguration
$sel:cloudWatchLogsConfiguration:Layer' :: Layer -> Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration} -> Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration) (\s :: Layer
s@Layer' {} Maybe CloudWatchLogsConfiguration
a -> Layer
s {$sel:cloudWatchLogsConfiguration:Layer' :: Maybe CloudWatchLogsConfiguration
cloudWatchLogsConfiguration = Maybe CloudWatchLogsConfiguration
a} :: Layer)

-- | A @LifeCycleEventConfiguration@ object that specifies the Shutdown event
-- configuration.
layer_lifecycleEventConfiguration :: Lens.Lens' Layer (Prelude.Maybe LifecycleEventConfiguration)
layer_lifecycleEventConfiguration :: (Maybe LifecycleEventConfiguration
 -> f (Maybe LifecycleEventConfiguration))
-> Layer -> f Layer
layer_lifecycleEventConfiguration = (Layer -> Maybe LifecycleEventConfiguration)
-> (Layer -> Maybe LifecycleEventConfiguration -> Layer)
-> Lens
     Layer
     Layer
     (Maybe LifecycleEventConfiguration)
     (Maybe LifecycleEventConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe LifecycleEventConfiguration
lifecycleEventConfiguration :: Maybe LifecycleEventConfiguration
$sel:lifecycleEventConfiguration:Layer' :: Layer -> Maybe LifecycleEventConfiguration
lifecycleEventConfiguration} -> Maybe LifecycleEventConfiguration
lifecycleEventConfiguration) (\s :: Layer
s@Layer' {} Maybe LifecycleEventConfiguration
a -> Layer
s {$sel:lifecycleEventConfiguration:Layer' :: Maybe LifecycleEventConfiguration
lifecycleEventConfiguration = Maybe LifecycleEventConfiguration
a} :: Layer)

-- | The Amazon Resource Number (ARN) of a layer.
layer_arn :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_arn :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_arn = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
arn :: Maybe Text
$sel:arn:Layer' :: Layer -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:arn:Layer' :: Maybe Text
arn = Maybe Text
a} :: Layer)

-- | Date when the layer was created.
layer_createdAt :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_createdAt :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_createdAt = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
createdAt :: Maybe Text
$sel:createdAt:Layer' :: Layer -> Maybe Text
createdAt} -> Maybe Text
createdAt) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:createdAt:Layer' :: Maybe Text
createdAt = Maybe Text
a} :: Layer)

-- | The layer short name.
layer_shortname :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_shortname :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_shortname = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
shortname :: Maybe Text
$sel:shortname:Layer' :: Layer -> Maybe Text
shortname} -> Maybe Text
shortname) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:shortname:Layer' :: Maybe Text
shortname = Maybe Text
a} :: Layer)

-- | AWS OpsWorks Stacks supports five lifecycle events: __setup__,
-- __configuration__, __deploy__, __undeploy__, and __shutdown__. For each
-- layer, AWS OpsWorks Stacks runs a set of standard recipes for each
-- event. You can also provide custom recipes for any or all layers and
-- events. AWS OpsWorks Stacks runs custom event recipes after the standard
-- recipes. @LayerCustomRecipes@ specifies the custom recipes for a
-- particular layer to be run in response to each of the five events.
--
-- To specify a recipe, use the cookbook\'s directory name in the
-- repository followed by two colons and the recipe name, which is the
-- recipe\'s file name without the @.rb@ extension. For example:
-- @phpapp2::dbsetup@ specifies the @dbsetup.rb@ recipe in the
-- repository\'s @phpapp2@ folder.
layer_defaultRecipes :: Lens.Lens' Layer (Prelude.Maybe Recipes)
layer_defaultRecipes :: (Maybe Recipes -> f (Maybe Recipes)) -> Layer -> f Layer
layer_defaultRecipes = (Layer -> Maybe Recipes)
-> (Layer -> Maybe Recipes -> Layer)
-> Lens Layer Layer (Maybe Recipes) (Maybe Recipes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Recipes
defaultRecipes :: Maybe Recipes
$sel:defaultRecipes:Layer' :: Layer -> Maybe Recipes
defaultRecipes} -> Maybe Recipes
defaultRecipes) (\s :: Layer
s@Layer' {} Maybe Recipes
a -> Layer
s {$sel:defaultRecipes:Layer' :: Maybe Recipes
defaultRecipes = Maybe Recipes
a} :: Layer)

-- | A @LayerCustomRecipes@ object that specifies the layer\'s custom
-- recipes.
layer_customRecipes :: Lens.Lens' Layer (Prelude.Maybe Recipes)
layer_customRecipes :: (Maybe Recipes -> f (Maybe Recipes)) -> Layer -> f Layer
layer_customRecipes = (Layer -> Maybe Recipes)
-> (Layer -> Maybe Recipes -> Layer)
-> Lens Layer Layer (Maybe Recipes) (Maybe Recipes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Recipes
customRecipes :: Maybe Recipes
$sel:customRecipes:Layer' :: Layer -> Maybe Recipes
customRecipes} -> Maybe Recipes
customRecipes) (\s :: Layer
s@Layer' {} Maybe Recipes
a -> Layer
s {$sel:customRecipes:Layer' :: Maybe Recipes
customRecipes = Maybe Recipes
a} :: Layer)

-- | A JSON formatted string containing the layer\'s custom stack
-- configuration and deployment attributes.
layer_customJson :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_customJson :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_customJson = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
customJson :: Maybe Text
$sel:customJson:Layer' :: Layer -> Maybe Text
customJson} -> Maybe Text
customJson) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:customJson:Layer' :: Maybe Text
customJson = Maybe Text
a} :: Layer)

-- | A @VolumeConfigurations@ object that describes the layer\'s Amazon EBS
-- volumes.
layer_volumeConfigurations :: Lens.Lens' Layer (Prelude.Maybe [VolumeConfiguration])
layer_volumeConfigurations :: (Maybe [VolumeConfiguration] -> f (Maybe [VolumeConfiguration]))
-> Layer -> f Layer
layer_volumeConfigurations = (Layer -> Maybe [VolumeConfiguration])
-> (Layer -> Maybe [VolumeConfiguration] -> Layer)
-> Lens
     Layer
     Layer
     (Maybe [VolumeConfiguration])
     (Maybe [VolumeConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe [VolumeConfiguration]
volumeConfigurations :: Maybe [VolumeConfiguration]
$sel:volumeConfigurations:Layer' :: Layer -> Maybe [VolumeConfiguration]
volumeConfigurations} -> Maybe [VolumeConfiguration]
volumeConfigurations) (\s :: Layer
s@Layer' {} Maybe [VolumeConfiguration]
a -> Layer
s {$sel:volumeConfigurations:Layer' :: Maybe [VolumeConfiguration]
volumeConfigurations = Maybe [VolumeConfiguration]
a} :: Layer) ((Maybe [VolumeConfiguration] -> f (Maybe [VolumeConfiguration]))
 -> Layer -> f Layer)
-> ((Maybe [VolumeConfiguration]
     -> f (Maybe [VolumeConfiguration]))
    -> Maybe [VolumeConfiguration] -> f (Maybe [VolumeConfiguration]))
-> (Maybe [VolumeConfiguration] -> f (Maybe [VolumeConfiguration]))
-> Layer
-> f Layer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [VolumeConfiguration]
  [VolumeConfiguration]
  [VolumeConfiguration]
  [VolumeConfiguration]
-> Iso
     (Maybe [VolumeConfiguration])
     (Maybe [VolumeConfiguration])
     (Maybe [VolumeConfiguration])
     (Maybe [VolumeConfiguration])
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
  [VolumeConfiguration]
  [VolumeConfiguration]
  [VolumeConfiguration]
  [VolumeConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Whether auto healing is disabled for the layer.
layer_enableAutoHealing :: Lens.Lens' Layer (Prelude.Maybe Prelude.Bool)
layer_enableAutoHealing :: (Maybe Bool -> f (Maybe Bool)) -> Layer -> f Layer
layer_enableAutoHealing = (Layer -> Maybe Bool)
-> (Layer -> Maybe Bool -> Layer)
-> Lens Layer Layer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Bool
enableAutoHealing :: Maybe Bool
$sel:enableAutoHealing:Layer' :: Layer -> Maybe Bool
enableAutoHealing} -> Maybe Bool
enableAutoHealing) (\s :: Layer
s@Layer' {} Maybe Bool
a -> Layer
s {$sel:enableAutoHealing:Layer' :: Maybe Bool
enableAutoHealing = Maybe Bool
a} :: Layer)

-- | An array of @Package@ objects that describe the layer\'s packages.
layer_packages :: Lens.Lens' Layer (Prelude.Maybe [Prelude.Text])
layer_packages :: (Maybe [Text] -> f (Maybe [Text])) -> Layer -> f Layer
layer_packages = (Layer -> Maybe [Text])
-> (Layer -> Maybe [Text] -> Layer)
-> Lens Layer Layer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe [Text]
packages :: Maybe [Text]
$sel:packages:Layer' :: Layer -> Maybe [Text]
packages} -> Maybe [Text]
packages) (\s :: Layer
s@Layer' {} Maybe [Text]
a -> Layer
s {$sel:packages:Layer' :: Maybe [Text]
packages = Maybe [Text]
a} :: Layer) ((Maybe [Text] -> f (Maybe [Text])) -> Layer -> f Layer)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Layer
-> f Layer
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 layer attributes.
--
-- For the @HaproxyStatsPassword@, @MysqlRootPassword@, and
-- @GangliaPassword@ attributes, AWS OpsWorks Stacks returns
-- @*****FILTERED*****@ instead of the actual value
--
-- For an ECS Cluster layer, AWS OpsWorks Stacks the @EcsClusterArn@
-- attribute is set to the cluster\'s ARN.
layer_attributes :: Lens.Lens' Layer (Prelude.Maybe (Prelude.HashMap LayerAttributesKeys (Prelude.Maybe Prelude.Text)))
layer_attributes :: (Maybe (HashMap LayerAttributesKeys (Maybe Text))
 -> f (Maybe (HashMap LayerAttributesKeys (Maybe Text))))
-> Layer -> f Layer
layer_attributes = (Layer -> Maybe (HashMap LayerAttributesKeys (Maybe Text)))
-> (Layer
    -> Maybe (HashMap LayerAttributesKeys (Maybe Text)) -> Layer)
-> Lens
     Layer
     Layer
     (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
     (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
$sel:attributes:Layer' :: Layer -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes} -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes) (\s :: Layer
s@Layer' {} Maybe (HashMap LayerAttributesKeys (Maybe Text))
a -> Layer
s {$sel:attributes:Layer' :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
attributes = Maybe (HashMap LayerAttributesKeys (Maybe Text))
a} :: Layer) ((Maybe (HashMap LayerAttributesKeys (Maybe Text))
  -> f (Maybe (HashMap LayerAttributesKeys (Maybe Text))))
 -> Layer -> f Layer)
-> ((Maybe (HashMap LayerAttributesKeys (Maybe Text))
     -> f (Maybe (HashMap LayerAttributesKeys (Maybe Text))))
    -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
    -> f (Maybe (HashMap LayerAttributesKeys (Maybe Text))))
-> (Maybe (HashMap LayerAttributesKeys (Maybe Text))
    -> f (Maybe (HashMap LayerAttributesKeys (Maybe Text))))
-> Layer
-> f Layer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap LayerAttributesKeys (Maybe Text))
  (HashMap LayerAttributesKeys (Maybe Text))
  (HashMap LayerAttributesKeys (Maybe Text))
  (HashMap LayerAttributesKeys (Maybe Text))
-> Iso
     (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
     (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
     (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
     (Maybe (HashMap LayerAttributesKeys (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 LayerAttributesKeys (Maybe Text))
  (HashMap LayerAttributesKeys (Maybe Text))
  (HashMap LayerAttributesKeys (Maybe Text))
  (HashMap LayerAttributesKeys (Maybe Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The layer name.
layer_name :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_name :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_name = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
name :: Maybe Text
$sel:name:Layer' :: Layer -> Maybe Text
name} -> Maybe Text
name) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:name:Layer' :: Maybe Text
name = Maybe Text
a} :: Layer)

-- | For stacks that are running in a VPC, whether to automatically assign a
-- public IP address to the layer\'s instances. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
layer_autoAssignPublicIps :: Lens.Lens' Layer (Prelude.Maybe Prelude.Bool)
layer_autoAssignPublicIps :: (Maybe Bool -> f (Maybe Bool)) -> Layer -> f Layer
layer_autoAssignPublicIps = (Layer -> Maybe Bool)
-> (Layer -> Maybe Bool -> Layer)
-> Lens Layer Layer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Bool
autoAssignPublicIps :: Maybe Bool
$sel:autoAssignPublicIps:Layer' :: Layer -> Maybe Bool
autoAssignPublicIps} -> Maybe Bool
autoAssignPublicIps) (\s :: Layer
s@Layer' {} Maybe Bool
a -> Layer
s {$sel:autoAssignPublicIps:Layer' :: Maybe Bool
autoAssignPublicIps = Maybe Bool
a} :: Layer)

-- | The layer type.
layer_type :: Lens.Lens' Layer (Prelude.Maybe LayerType)
layer_type :: (Maybe LayerType -> f (Maybe LayerType)) -> Layer -> f Layer
layer_type = (Layer -> Maybe LayerType)
-> (Layer -> Maybe LayerType -> Layer)
-> Lens Layer Layer (Maybe LayerType) (Maybe LayerType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe LayerType
type' :: Maybe LayerType
$sel:type':Layer' :: Layer -> Maybe LayerType
type'} -> Maybe LayerType
type') (\s :: Layer
s@Layer' {} Maybe LayerType
a -> Layer
s {$sel:type':Layer' :: Maybe LayerType
type' = Maybe LayerType
a} :: Layer)

-- | Whether the layer uses Amazon EBS-optimized instances.
layer_useEbsOptimizedInstances :: Lens.Lens' Layer (Prelude.Maybe Prelude.Bool)
layer_useEbsOptimizedInstances :: (Maybe Bool -> f (Maybe Bool)) -> Layer -> f Layer
layer_useEbsOptimizedInstances = (Layer -> Maybe Bool)
-> (Layer -> Maybe Bool -> Layer)
-> Lens Layer Layer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Bool
useEbsOptimizedInstances :: Maybe Bool
$sel:useEbsOptimizedInstances:Layer' :: Layer -> Maybe Bool
useEbsOptimizedInstances} -> Maybe Bool
useEbsOptimizedInstances) (\s :: Layer
s@Layer' {} Maybe Bool
a -> Layer
s {$sel:useEbsOptimizedInstances:Layer' :: Maybe Bool
useEbsOptimizedInstances = Maybe Bool
a} :: Layer)

-- | The layer stack ID.
layer_stackId :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_stackId :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_stackId = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
stackId :: Maybe Text
$sel:stackId:Layer' :: Layer -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:stackId:Layer' :: Maybe Text
stackId = Maybe Text
a} :: Layer)

-- | The layer ID.
layer_layerId :: Lens.Lens' Layer (Prelude.Maybe Prelude.Text)
layer_layerId :: (Maybe Text -> f (Maybe Text)) -> Layer -> f Layer
layer_layerId = (Layer -> Maybe Text)
-> (Layer -> Maybe Text -> Layer)
-> Lens Layer Layer (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Text
layerId :: Maybe Text
$sel:layerId:Layer' :: Layer -> Maybe Text
layerId} -> Maybe Text
layerId) (\s :: Layer
s@Layer' {} Maybe Text
a -> Layer
s {$sel:layerId:Layer' :: Maybe Text
layerId = Maybe Text
a} :: Layer)

-- | An array containing the layer\'s security group names.
layer_defaultSecurityGroupNames :: Lens.Lens' Layer (Prelude.Maybe [Prelude.Text])
layer_defaultSecurityGroupNames :: (Maybe [Text] -> f (Maybe [Text])) -> Layer -> f Layer
layer_defaultSecurityGroupNames = (Layer -> Maybe [Text])
-> (Layer -> Maybe [Text] -> Layer)
-> Lens Layer Layer (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe [Text]
defaultSecurityGroupNames :: Maybe [Text]
$sel:defaultSecurityGroupNames:Layer' :: Layer -> Maybe [Text]
defaultSecurityGroupNames} -> Maybe [Text]
defaultSecurityGroupNames) (\s :: Layer
s@Layer' {} Maybe [Text]
a -> Layer
s {$sel:defaultSecurityGroupNames:Layer' :: Maybe [Text]
defaultSecurityGroupNames = Maybe [Text]
a} :: Layer) ((Maybe [Text] -> f (Maybe [Text])) -> Layer -> f Layer)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Layer
-> f Layer
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

-- | Whether to automatically assign an
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html Elastic IP address>
-- to the layer\'s instances. For more information, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html How to Edit a Layer>.
layer_autoAssignElasticIps :: Lens.Lens' Layer (Prelude.Maybe Prelude.Bool)
layer_autoAssignElasticIps :: (Maybe Bool -> f (Maybe Bool)) -> Layer -> f Layer
layer_autoAssignElasticIps = (Layer -> Maybe Bool)
-> (Layer -> Maybe Bool -> Layer)
-> Lens Layer Layer (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Layer' {Maybe Bool
autoAssignElasticIps :: Maybe Bool
$sel:autoAssignElasticIps:Layer' :: Layer -> Maybe Bool
autoAssignElasticIps} -> Maybe Bool
autoAssignElasticIps) (\s :: Layer
s@Layer' {} Maybe Bool
a -> Layer
s {$sel:autoAssignElasticIps:Layer' :: Maybe Bool
autoAssignElasticIps = Maybe Bool
a} :: Layer)

instance Core.FromJSON Layer where
  parseJSON :: Value -> Parser Layer
parseJSON =
    String -> (Object -> Parser Layer) -> Value -> Parser Layer
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Layer"
      ( \Object
x ->
          Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Maybe CloudWatchLogsConfiguration
-> Maybe LifecycleEventConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Recipes
-> Maybe Recipes
-> Maybe Text
-> Maybe [VolumeConfiguration]
-> Maybe Bool
-> Maybe [Text]
-> Maybe (HashMap LayerAttributesKeys (Maybe Text))
-> Maybe Text
-> Maybe Bool
-> Maybe LayerType
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Bool
-> Layer
Layer'
            (Maybe Text
 -> Maybe [Text]
 -> Maybe Bool
 -> Maybe CloudWatchLogsConfiguration
 -> Maybe LifecycleEventConfiguration
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Recipes
 -> Maybe Recipes
 -> Maybe Text
 -> Maybe [VolumeConfiguration]
 -> Maybe Bool
 -> Maybe [Text]
 -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
 -> Maybe Text
 -> Maybe Bool
 -> Maybe LayerType
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Bool
 -> Layer)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Bool
      -> Maybe CloudWatchLogsConfiguration
      -> Maybe LifecycleEventConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Recipes
      -> Maybe Recipes
      -> Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
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
"CustomInstanceProfileArn")
            Parser
  (Maybe [Text]
   -> Maybe Bool
   -> Maybe CloudWatchLogsConfiguration
   -> Maybe LifecycleEventConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Recipes
   -> Maybe Recipes
   -> Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Bool
      -> Maybe CloudWatchLogsConfiguration
      -> Maybe LifecycleEventConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Recipes
      -> Maybe Recipes
      -> Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CustomSecurityGroupIds"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Bool
   -> Maybe CloudWatchLogsConfiguration
   -> Maybe LifecycleEventConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Recipes
   -> Maybe Recipes
   -> Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Bool)
-> Parser
     (Maybe CloudWatchLogsConfiguration
      -> Maybe LifecycleEventConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Recipes
      -> Maybe Recipes
      -> Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
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
"InstallUpdatesOnBoot")
            Parser
  (Maybe CloudWatchLogsConfiguration
   -> Maybe LifecycleEventConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Recipes
   -> Maybe Recipes
   -> Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe CloudWatchLogsConfiguration)
-> Parser
     (Maybe LifecycleEventConfiguration
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Recipes
      -> Maybe Recipes
      -> Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CloudWatchLogsConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudWatchLogsConfiguration")
            Parser
  (Maybe LifecycleEventConfiguration
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Recipes
   -> Maybe Recipes
   -> Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe LifecycleEventConfiguration)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Recipes
      -> Maybe Recipes
      -> Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LifecycleEventConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LifecycleEventConfiguration")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Recipes
   -> Maybe Recipes
   -> Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Recipes
      -> Maybe Recipes
      -> Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
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 Recipes
   -> Maybe Recipes
   -> Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Recipes
      -> Maybe Recipes
      -> Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
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 Recipes
   -> Maybe Recipes
   -> Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Recipes
      -> Maybe Recipes
      -> Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
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
"Shortname")
            Parser
  (Maybe Recipes
   -> Maybe Recipes
   -> Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Recipes)
-> Parser
     (Maybe Recipes
      -> Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Recipes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultRecipes")
            Parser
  (Maybe Recipes
   -> Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Recipes)
-> Parser
     (Maybe Text
      -> Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Recipes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CustomRecipes")
            Parser
  (Maybe Text
   -> Maybe [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Text)
-> Parser
     (Maybe [VolumeConfiguration]
      -> Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
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 [VolumeConfiguration]
   -> Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe [VolumeConfiguration])
-> Parser
     (Maybe Bool
      -> Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [VolumeConfiguration]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VolumeConfigurations"
                            Parser (Maybe (Maybe [VolumeConfiguration]))
-> Maybe [VolumeConfiguration]
-> Parser (Maybe [VolumeConfiguration])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [VolumeConfiguration]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Bool
   -> Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [Text]
      -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
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
"EnableAutoHealing")
            Parser
  (Maybe [Text]
   -> Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe [Text])
-> Parser
     (Maybe (HashMap LayerAttributesKeys (Maybe Text))
      -> Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Packages" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe (HashMap LayerAttributesKeys (Maybe Text))
   -> Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Parser
     (Maybe (Maybe (HashMap LayerAttributesKeys (Maybe Text))))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Attributes" Parser (Maybe (Maybe (HashMap LayerAttributesKeys (Maybe Text))))
-> Maybe (HashMap LayerAttributesKeys (Maybe Text))
-> Parser (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap LayerAttributesKeys (Maybe Text))
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
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 Bool
   -> Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe Bool)
-> Parser
     (Maybe LayerType
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Bool
      -> Layer)
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
"AutoAssignPublicIps")
            Parser
  (Maybe LayerType
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Bool
   -> Layer)
-> Parser (Maybe LayerType)
-> Parser
     (Maybe Bool
      -> Maybe Text -> Maybe Text -> Maybe [Text] -> Maybe Bool -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LayerType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Type")
            Parser
  (Maybe Bool
   -> Maybe Text -> Maybe Text -> Maybe [Text] -> Maybe Bool -> Layer)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text -> Maybe Text -> Maybe [Text] -> Maybe Bool -> Layer)
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
"UseEbsOptimizedInstances")
            Parser
  (Maybe Text -> Maybe Text -> Maybe [Text] -> Maybe Bool -> Layer)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Text] -> Maybe Bool -> Layer)
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 -> Maybe [Text] -> Maybe Bool -> Layer)
-> Parser (Maybe Text)
-> Parser (Maybe [Text] -> Maybe Bool -> Layer)
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
"LayerId")
            Parser (Maybe [Text] -> Maybe Bool -> Layer)
-> Parser (Maybe [Text]) -> Parser (Maybe Bool -> Layer)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultSecurityGroupNames"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe Bool -> Layer) -> Parser (Maybe Bool) -> Parser Layer
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
"AutoAssignElasticIps")
      )

instance Prelude.Hashable Layer

instance Prelude.NFData Layer