{-# 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.EMR.Types.Cluster
-- 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.EMR.Types.Cluster where

import qualified Amazonka.Core as Core
import Amazonka.EMR.Types.Application
import Amazonka.EMR.Types.ClusterStatus
import Amazonka.EMR.Types.Configuration
import Amazonka.EMR.Types.Ec2InstanceAttributes
import Amazonka.EMR.Types.InstanceCollectionType
import Amazonka.EMR.Types.KerberosAttributes
import Amazonka.EMR.Types.PlacementGroupConfig
import Amazonka.EMR.Types.RepoUpgradeOnBoot
import Amazonka.EMR.Types.ScaleDownBehavior
import Amazonka.EMR.Types.Tag
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The detailed description of the cluster.
--
-- /See:/ 'newCluster' smart constructor.
data Cluster = Cluster'
  { -- | The KMS key used for encrypting log files. This attribute is only
    -- available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
    Cluster -> Maybe Text
logEncryptionKmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name of the cluster.
    Cluster -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
    -- | The AMI version requested for this cluster.
    Cluster -> Maybe Text
requestedAmiVersion :: Prelude.Maybe Prelude.Text,
    -- | The size, in GiB, of the Amazon EBS root device volume of the Linux AMI
    -- that is used for each EC2 instance. Available in Amazon EMR version 4.x
    -- and later.
    Cluster -> Maybe Int
ebsRootVolumeSize :: Prelude.Maybe Prelude.Int,
    -- | Provides information about the EC2 instances in a cluster grouped by
    -- category. For example, key name, subnet ID, IAM instance profile, and so
    -- on.
    Cluster -> Maybe Ec2InstanceAttributes
ec2InstanceAttributes :: Prelude.Maybe Ec2InstanceAttributes,
    -- | The Amazon Resource Name (ARN) of the Outpost where the cluster is
    -- launched.
    Cluster -> Maybe Text
outpostArn :: Prelude.Maybe Prelude.Text,
    -- | An approximation of the cost of the cluster, represented in
    -- m1.small\/hours. This value is incremented one time for every hour an
    -- m1.small instance runs. Larger instances are weighted more, so an EC2
    -- instance that is roughly four times more expensive would result in the
    -- normalized instance hours being incremented by four. This result is only
    -- an approximation and does not reflect the actual billing rate.
    Cluster -> Maybe Int
normalizedInstanceHours :: Prelude.Maybe Prelude.Int,
    -- | Applies only to Amazon EMR releases 4.x and later. The list of
    -- Configurations supplied to the EMR cluster.
    Cluster -> Maybe [Configuration]
configurations :: Prelude.Maybe [Configuration],
    -- | Available only in Amazon EMR version 5.7.0 and later. The ID of a custom
    -- Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.
    Cluster -> Maybe Text
customAmiId :: Prelude.Maybe Prelude.Text,
    -- | An IAM role for automatic scaling policies. The default role is
    -- @EMR_AutoScaling_DefaultRole@. The IAM role provides permissions that
    -- the automatic scaling feature requires to launch and terminate EC2
    -- instances in an instance group.
    Cluster -> Maybe Text
autoScalingRole :: Prelude.Maybe Prelude.Text,
    -- | The name of the security configuration applied to the cluster.
    Cluster -> Maybe Text
securityConfiguration :: Prelude.Maybe Prelude.Text,
    -- | The way that individual Amazon EC2 instances terminate when an automatic
    -- scale-in activity occurs or an instance group is resized.
    -- @TERMINATE_AT_INSTANCE_HOUR@ indicates that Amazon EMR terminates nodes
    -- at the instance-hour boundary, regardless of when the request to
    -- terminate the instance was submitted. This option is only available with
    -- Amazon EMR 5.1.0 and later and is the default for clusters created using
    -- that version. @TERMINATE_AT_TASK_COMPLETION@ indicates that Amazon EMR
    -- adds nodes to a deny list and drains tasks from nodes before terminating
    -- the Amazon EC2 instances, regardless of the instance-hour boundary. With
    -- either behavior, Amazon EMR removes the least active nodes first and
    -- blocks instance termination if it could lead to HDFS corruption.
    -- @TERMINATE_AT_TASK_COMPLETION@ is available only in Amazon EMR version
    -- 4.1.0 and later, and is the default for versions of Amazon EMR earlier
    -- than 5.1.0.
    Cluster -> Maybe ScaleDownBehavior
scaleDownBehavior :: Prelude.Maybe ScaleDownBehavior,
    -- | The instance fleet configuration is available only in Amazon EMR
    -- versions 4.8.0 and later, excluding 5.0.x versions.
    --
    -- The instance group configuration of the cluster. A value of
    -- @INSTANCE_GROUP@ indicates a uniform instance group configuration. A
    -- value of @INSTANCE_FLEET@ indicates an instance fleets configuration.
    Cluster -> Maybe InstanceCollectionType
instanceCollectionType :: Prelude.Maybe InstanceCollectionType,
    -- | The Amazon EMR release label, which determines the version of
    -- open-source application packages installed on the cluster. Release
    -- labels are in the form @emr-x.x.x@, where x.x.x is an Amazon EMR release
    -- version such as @emr-5.14.0@. For more information about Amazon EMR
    -- release versions and included application versions and features, see
    -- <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/>. The release
    -- label applies only to Amazon EMR releases version 4.0 and later. Earlier
    -- versions use @AmiVersion@.
    Cluster -> Maybe Text
releaseLabel :: Prelude.Maybe Prelude.Text,
    -- | Applies only when @CustomAmiID@ is used. Specifies the type of updates
    -- that are applied from the Amazon Linux AMI package repositories when an
    -- instance boots using the AMI.
    Cluster -> Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot :: Prelude.Maybe RepoUpgradeOnBoot,
    -- | The path to the Amazon S3 location where logs for this cluster are
    -- stored.
    Cluster -> Maybe Text
logUri :: Prelude.Maybe Prelude.Text,
    -- | Attributes for Kerberos configuration when Kerberos authentication is
    -- enabled using a security configuration. For more information see
    -- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html Use Kerberos Authentication>
    -- in the /Amazon EMR Management Guide/.
    Cluster -> Maybe KerberosAttributes
kerberosAttributes :: Prelude.Maybe KerberosAttributes,
    -- | Placement group configured for an Amazon EMR cluster.
    Cluster -> Maybe [PlacementGroupConfig]
placementGroups :: Prelude.Maybe [PlacementGroupConfig],
    -- | The AMI version running on this cluster.
    Cluster -> Maybe Text
runningAmiVersion :: Prelude.Maybe Prelude.Text,
    -- | The DNS name of the master node. If the cluster is on a private subnet,
    -- this is the private DNS name. On a public subnet, this is the public DNS
    -- name.
    Cluster -> Maybe Text
masterPublicDnsName :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether Amazon EMR will lock the cluster to prevent the EC2
    -- instances from being terminated by an API call or user intervention, or
    -- in the event of a cluster error.
    Cluster -> Maybe Bool
terminationProtected :: Prelude.Maybe Prelude.Bool,
    -- | Indicates whether the cluster is visible to IAM principals in the Amazon
    -- Web Services account associated with the cluster. When @true@, IAM
    -- principals in the Amazon Web Services account can perform EMR cluster
    -- actions on the cluster that their IAM policies allow. When @false@, only
    -- the IAM principal that created the cluster and the Amazon Web Services
    -- account root user can perform EMR actions, regardless of IAM permissions
    -- policies attached to other IAM principals.
    --
    -- The default value is @true@ if a value is not provided when creating a
    -- cluster using the EMR API RunJobFlow command, the CLI
    -- <https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html create-cluster>
    -- command, or the Amazon Web Services Management Console. IAM principals
    -- that are allowed to perform actions on the cluster can use the
    -- SetVisibleToAllUsers action to change the value on a running cluster.
    -- For more information, see
    -- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users Understanding the EMR Cluster VisibleToAllUsers Setting>
    -- in the /Amazon EMRManagement Guide/.
    Cluster -> Maybe Bool
visibleToAllUsers :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the cluster should terminate after completing all
    -- steps.
    Cluster -> Maybe Bool
autoTerminate :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the number of steps that can be executed concurrently.
    Cluster -> Maybe Int
stepConcurrencyLevel :: Prelude.Maybe Prelude.Int,
    -- | The applications installed on this cluster.
    Cluster -> Maybe [Application]
applications :: Prelude.Maybe [Application],
    -- | A list of tags associated with a cluster.
    Cluster -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The IAM role that Amazon EMR assumes in order to access Amazon Web
    -- Services resources on your behalf.
    Cluster -> Maybe Text
serviceRole :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the cluster.
    Cluster -> Text
id :: Prelude.Text,
    -- | The name of the cluster.
    Cluster -> Text
name :: Prelude.Text,
    -- | The current status details about the cluster.
    Cluster -> ClusterStatus
status :: ClusterStatus
  }
  deriving (Cluster -> Cluster -> Bool
(Cluster -> Cluster -> Bool)
-> (Cluster -> Cluster -> Bool) -> Eq Cluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Cluster -> Cluster -> Bool
$c/= :: Cluster -> Cluster -> Bool
== :: Cluster -> Cluster -> Bool
$c== :: Cluster -> Cluster -> Bool
Prelude.Eq, ReadPrec [Cluster]
ReadPrec Cluster
Int -> ReadS Cluster
ReadS [Cluster]
(Int -> ReadS Cluster)
-> ReadS [Cluster]
-> ReadPrec Cluster
-> ReadPrec [Cluster]
-> Read Cluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Cluster]
$creadListPrec :: ReadPrec [Cluster]
readPrec :: ReadPrec Cluster
$creadPrec :: ReadPrec Cluster
readList :: ReadS [Cluster]
$creadList :: ReadS [Cluster]
readsPrec :: Int -> ReadS Cluster
$creadsPrec :: Int -> ReadS Cluster
Prelude.Read, Int -> Cluster -> ShowS
[Cluster] -> ShowS
Cluster -> String
(Int -> Cluster -> ShowS)
-> (Cluster -> String) -> ([Cluster] -> ShowS) -> Show Cluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Cluster] -> ShowS
$cshowList :: [Cluster] -> ShowS
show :: Cluster -> String
$cshow :: Cluster -> String
showsPrec :: Int -> Cluster -> ShowS
$cshowsPrec :: Int -> Cluster -> ShowS
Prelude.Show, (forall x. Cluster -> Rep Cluster x)
-> (forall x. Rep Cluster x -> Cluster) -> Generic Cluster
forall x. Rep Cluster x -> Cluster
forall x. Cluster -> Rep Cluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Cluster x -> Cluster
$cfrom :: forall x. Cluster -> Rep Cluster x
Prelude.Generic)

-- |
-- Create a value of 'Cluster' 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:
--
-- 'logEncryptionKmsKeyId', 'cluster_logEncryptionKmsKeyId' - The KMS key used for encrypting log files. This attribute is only
-- available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
--
-- 'clusterArn', 'cluster_clusterArn' - The Amazon Resource Name of the cluster.
--
-- 'requestedAmiVersion', 'cluster_requestedAmiVersion' - The AMI version requested for this cluster.
--
-- 'ebsRootVolumeSize', 'cluster_ebsRootVolumeSize' - The size, in GiB, of the Amazon EBS root device volume of the Linux AMI
-- that is used for each EC2 instance. Available in Amazon EMR version 4.x
-- and later.
--
-- 'ec2InstanceAttributes', 'cluster_ec2InstanceAttributes' - Provides information about the EC2 instances in a cluster grouped by
-- category. For example, key name, subnet ID, IAM instance profile, and so
-- on.
--
-- 'outpostArn', 'cluster_outpostArn' - The Amazon Resource Name (ARN) of the Outpost where the cluster is
-- launched.
--
-- 'normalizedInstanceHours', 'cluster_normalizedInstanceHours' - An approximation of the cost of the cluster, represented in
-- m1.small\/hours. This value is incremented one time for every hour an
-- m1.small instance runs. Larger instances are weighted more, so an EC2
-- instance that is roughly four times more expensive would result in the
-- normalized instance hours being incremented by four. This result is only
-- an approximation and does not reflect the actual billing rate.
--
-- 'configurations', 'cluster_configurations' - Applies only to Amazon EMR releases 4.x and later. The list of
-- Configurations supplied to the EMR cluster.
--
-- 'customAmiId', 'cluster_customAmiId' - Available only in Amazon EMR version 5.7.0 and later. The ID of a custom
-- Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.
--
-- 'autoScalingRole', 'cluster_autoScalingRole' - An IAM role for automatic scaling policies. The default role is
-- @EMR_AutoScaling_DefaultRole@. The IAM role provides permissions that
-- the automatic scaling feature requires to launch and terminate EC2
-- instances in an instance group.
--
-- 'securityConfiguration', 'cluster_securityConfiguration' - The name of the security configuration applied to the cluster.
--
-- 'scaleDownBehavior', 'cluster_scaleDownBehavior' - The way that individual Amazon EC2 instances terminate when an automatic
-- scale-in activity occurs or an instance group is resized.
-- @TERMINATE_AT_INSTANCE_HOUR@ indicates that Amazon EMR terminates nodes
-- at the instance-hour boundary, regardless of when the request to
-- terminate the instance was submitted. This option is only available with
-- Amazon EMR 5.1.0 and later and is the default for clusters created using
-- that version. @TERMINATE_AT_TASK_COMPLETION@ indicates that Amazon EMR
-- adds nodes to a deny list and drains tasks from nodes before terminating
-- the Amazon EC2 instances, regardless of the instance-hour boundary. With
-- either behavior, Amazon EMR removes the least active nodes first and
-- blocks instance termination if it could lead to HDFS corruption.
-- @TERMINATE_AT_TASK_COMPLETION@ is available only in Amazon EMR version
-- 4.1.0 and later, and is the default for versions of Amazon EMR earlier
-- than 5.1.0.
--
-- 'instanceCollectionType', 'cluster_instanceCollectionType' - The instance fleet configuration is available only in Amazon EMR
-- versions 4.8.0 and later, excluding 5.0.x versions.
--
-- The instance group configuration of the cluster. A value of
-- @INSTANCE_GROUP@ indicates a uniform instance group configuration. A
-- value of @INSTANCE_FLEET@ indicates an instance fleets configuration.
--
-- 'releaseLabel', 'cluster_releaseLabel' - The Amazon EMR release label, which determines the version of
-- open-source application packages installed on the cluster. Release
-- labels are in the form @emr-x.x.x@, where x.x.x is an Amazon EMR release
-- version such as @emr-5.14.0@. For more information about Amazon EMR
-- release versions and included application versions and features, see
-- <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/>. The release
-- label applies only to Amazon EMR releases version 4.0 and later. Earlier
-- versions use @AmiVersion@.
--
-- 'repoUpgradeOnBoot', 'cluster_repoUpgradeOnBoot' - Applies only when @CustomAmiID@ is used. Specifies the type of updates
-- that are applied from the Amazon Linux AMI package repositories when an
-- instance boots using the AMI.
--
-- 'logUri', 'cluster_logUri' - The path to the Amazon S3 location where logs for this cluster are
-- stored.
--
-- 'kerberosAttributes', 'cluster_kerberosAttributes' - Attributes for Kerberos configuration when Kerberos authentication is
-- enabled using a security configuration. For more information see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html Use Kerberos Authentication>
-- in the /Amazon EMR Management Guide/.
--
-- 'placementGroups', 'cluster_placementGroups' - Placement group configured for an Amazon EMR cluster.
--
-- 'runningAmiVersion', 'cluster_runningAmiVersion' - The AMI version running on this cluster.
--
-- 'masterPublicDnsName', 'cluster_masterPublicDnsName' - The DNS name of the master node. If the cluster is on a private subnet,
-- this is the private DNS name. On a public subnet, this is the public DNS
-- name.
--
-- 'terminationProtected', 'cluster_terminationProtected' - Indicates whether Amazon EMR will lock the cluster to prevent the EC2
-- instances from being terminated by an API call or user intervention, or
-- in the event of a cluster error.
--
-- 'visibleToAllUsers', 'cluster_visibleToAllUsers' - Indicates whether the cluster is visible to IAM principals in the Amazon
-- Web Services account associated with the cluster. When @true@, IAM
-- principals in the Amazon Web Services account can perform EMR cluster
-- actions on the cluster that their IAM policies allow. When @false@, only
-- the IAM principal that created the cluster and the Amazon Web Services
-- account root user can perform EMR actions, regardless of IAM permissions
-- policies attached to other IAM principals.
--
-- The default value is @true@ if a value is not provided when creating a
-- cluster using the EMR API RunJobFlow command, the CLI
-- <https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html create-cluster>
-- command, or the Amazon Web Services Management Console. IAM principals
-- that are allowed to perform actions on the cluster can use the
-- SetVisibleToAllUsers action to change the value on a running cluster.
-- For more information, see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users Understanding the EMR Cluster VisibleToAllUsers Setting>
-- in the /Amazon EMRManagement Guide/.
--
-- 'autoTerminate', 'cluster_autoTerminate' - Specifies whether the cluster should terminate after completing all
-- steps.
--
-- 'stepConcurrencyLevel', 'cluster_stepConcurrencyLevel' - Specifies the number of steps that can be executed concurrently.
--
-- 'applications', 'cluster_applications' - The applications installed on this cluster.
--
-- 'tags', 'cluster_tags' - A list of tags associated with a cluster.
--
-- 'serviceRole', 'cluster_serviceRole' - The IAM role that Amazon EMR assumes in order to access Amazon Web
-- Services resources on your behalf.
--
-- 'id', 'cluster_id' - The unique identifier for the cluster.
--
-- 'name', 'cluster_name' - The name of the cluster.
--
-- 'status', 'cluster_status' - The current status details about the cluster.
newCluster ::
  -- | 'id'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'status'
  ClusterStatus ->
  Cluster
newCluster :: Text -> Text -> ClusterStatus -> Cluster
newCluster Text
pId_ Text
pName_ ClusterStatus
pStatus_ =
  Cluster' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Ec2InstanceAttributes
-> Maybe Text
-> Maybe Int
-> Maybe [Configuration]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ScaleDownBehavior
-> Maybe InstanceCollectionType
-> Maybe Text
-> Maybe RepoUpgradeOnBoot
-> Maybe Text
-> Maybe KerberosAttributes
-> Maybe [PlacementGroupConfig]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Int
-> Maybe [Application]
-> Maybe [Tag]
-> Maybe Text
-> Text
-> Text
-> ClusterStatus
-> Cluster
Cluster'
    { $sel:logEncryptionKmsKeyId:Cluster' :: Maybe Text
logEncryptionKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterArn:Cluster' :: Maybe Text
clusterArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestedAmiVersion:Cluster' :: Maybe Text
requestedAmiVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ebsRootVolumeSize:Cluster' :: Maybe Int
ebsRootVolumeSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:ec2InstanceAttributes:Cluster' :: Maybe Ec2InstanceAttributes
ec2InstanceAttributes = Maybe Ec2InstanceAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:outpostArn:Cluster' :: Maybe Text
outpostArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:normalizedInstanceHours:Cluster' :: Maybe Int
normalizedInstanceHours = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:configurations:Cluster' :: Maybe [Configuration]
configurations = Maybe [Configuration]
forall a. Maybe a
Prelude.Nothing,
      $sel:customAmiId:Cluster' :: Maybe Text
customAmiId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoScalingRole:Cluster' :: Maybe Text
autoScalingRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:securityConfiguration:Cluster' :: Maybe Text
securityConfiguration = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scaleDownBehavior:Cluster' :: Maybe ScaleDownBehavior
scaleDownBehavior = Maybe ScaleDownBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceCollectionType:Cluster' :: Maybe InstanceCollectionType
instanceCollectionType = Maybe InstanceCollectionType
forall a. Maybe a
Prelude.Nothing,
      $sel:releaseLabel:Cluster' :: Maybe Text
releaseLabel = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repoUpgradeOnBoot:Cluster' :: Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot = Maybe RepoUpgradeOnBoot
forall a. Maybe a
Prelude.Nothing,
      $sel:logUri:Cluster' :: Maybe Text
logUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kerberosAttributes:Cluster' :: Maybe KerberosAttributes
kerberosAttributes = Maybe KerberosAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:placementGroups:Cluster' :: Maybe [PlacementGroupConfig]
placementGroups = Maybe [PlacementGroupConfig]
forall a. Maybe a
Prelude.Nothing,
      $sel:runningAmiVersion:Cluster' :: Maybe Text
runningAmiVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:masterPublicDnsName:Cluster' :: Maybe Text
masterPublicDnsName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:terminationProtected:Cluster' :: Maybe Bool
terminationProtected = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:visibleToAllUsers:Cluster' :: Maybe Bool
visibleToAllUsers = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:autoTerminate:Cluster' :: Maybe Bool
autoTerminate = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:stepConcurrencyLevel:Cluster' :: Maybe Int
stepConcurrencyLevel = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:applications:Cluster' :: Maybe [Application]
applications = Maybe [Application]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Cluster' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRole:Cluster' :: Maybe Text
serviceRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Cluster' :: Text
id = Text
pId_,
      $sel:name:Cluster' :: Text
name = Text
pName_,
      $sel:status:Cluster' :: ClusterStatus
status = ClusterStatus
pStatus_
    }

-- | The KMS key used for encrypting log files. This attribute is only
-- available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
cluster_logEncryptionKmsKeyId :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_logEncryptionKmsKeyId :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_logEncryptionKmsKeyId = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
logEncryptionKmsKeyId :: Maybe Text
$sel:logEncryptionKmsKeyId:Cluster' :: Cluster -> Maybe Text
logEncryptionKmsKeyId} -> Maybe Text
logEncryptionKmsKeyId) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:logEncryptionKmsKeyId:Cluster' :: Maybe Text
logEncryptionKmsKeyId = Maybe Text
a} :: Cluster)

-- | The Amazon Resource Name of the cluster.
cluster_clusterArn :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_clusterArn :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_clusterArn = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
clusterArn :: Maybe Text
$sel:clusterArn:Cluster' :: Cluster -> Maybe Text
clusterArn} -> Maybe Text
clusterArn) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:clusterArn:Cluster' :: Maybe Text
clusterArn = Maybe Text
a} :: Cluster)

-- | The AMI version requested for this cluster.
cluster_requestedAmiVersion :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_requestedAmiVersion :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_requestedAmiVersion = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
requestedAmiVersion :: Maybe Text
$sel:requestedAmiVersion:Cluster' :: Cluster -> Maybe Text
requestedAmiVersion} -> Maybe Text
requestedAmiVersion) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:requestedAmiVersion:Cluster' :: Maybe Text
requestedAmiVersion = Maybe Text
a} :: Cluster)

-- | The size, in GiB, of the Amazon EBS root device volume of the Linux AMI
-- that is used for each EC2 instance. Available in Amazon EMR version 4.x
-- and later.
cluster_ebsRootVolumeSize :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_ebsRootVolumeSize :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_ebsRootVolumeSize = (Cluster -> Maybe Int)
-> (Cluster -> Maybe Int -> Cluster)
-> Lens Cluster Cluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Int
ebsRootVolumeSize :: Maybe Int
$sel:ebsRootVolumeSize:Cluster' :: Cluster -> Maybe Int
ebsRootVolumeSize} -> Maybe Int
ebsRootVolumeSize) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:ebsRootVolumeSize:Cluster' :: Maybe Int
ebsRootVolumeSize = Maybe Int
a} :: Cluster)

-- | Provides information about the EC2 instances in a cluster grouped by
-- category. For example, key name, subnet ID, IAM instance profile, and so
-- on.
cluster_ec2InstanceAttributes :: Lens.Lens' Cluster (Prelude.Maybe Ec2InstanceAttributes)
cluster_ec2InstanceAttributes :: (Maybe Ec2InstanceAttributes -> f (Maybe Ec2InstanceAttributes))
-> Cluster -> f Cluster
cluster_ec2InstanceAttributes = (Cluster -> Maybe Ec2InstanceAttributes)
-> (Cluster -> Maybe Ec2InstanceAttributes -> Cluster)
-> Lens
     Cluster
     Cluster
     (Maybe Ec2InstanceAttributes)
     (Maybe Ec2InstanceAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Ec2InstanceAttributes
ec2InstanceAttributes :: Maybe Ec2InstanceAttributes
$sel:ec2InstanceAttributes:Cluster' :: Cluster -> Maybe Ec2InstanceAttributes
ec2InstanceAttributes} -> Maybe Ec2InstanceAttributes
ec2InstanceAttributes) (\s :: Cluster
s@Cluster' {} Maybe Ec2InstanceAttributes
a -> Cluster
s {$sel:ec2InstanceAttributes:Cluster' :: Maybe Ec2InstanceAttributes
ec2InstanceAttributes = Maybe Ec2InstanceAttributes
a} :: Cluster)

-- | The Amazon Resource Name (ARN) of the Outpost where the cluster is
-- launched.
cluster_outpostArn :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_outpostArn :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_outpostArn = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
outpostArn :: Maybe Text
$sel:outpostArn:Cluster' :: Cluster -> Maybe Text
outpostArn} -> Maybe Text
outpostArn) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:outpostArn:Cluster' :: Maybe Text
outpostArn = Maybe Text
a} :: Cluster)

-- | An approximation of the cost of the cluster, represented in
-- m1.small\/hours. This value is incremented one time for every hour an
-- m1.small instance runs. Larger instances are weighted more, so an EC2
-- instance that is roughly four times more expensive would result in the
-- normalized instance hours being incremented by four. This result is only
-- an approximation and does not reflect the actual billing rate.
cluster_normalizedInstanceHours :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_normalizedInstanceHours :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_normalizedInstanceHours = (Cluster -> Maybe Int)
-> (Cluster -> Maybe Int -> Cluster)
-> Lens Cluster Cluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Int
normalizedInstanceHours :: Maybe Int
$sel:normalizedInstanceHours:Cluster' :: Cluster -> Maybe Int
normalizedInstanceHours} -> Maybe Int
normalizedInstanceHours) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:normalizedInstanceHours:Cluster' :: Maybe Int
normalizedInstanceHours = Maybe Int
a} :: Cluster)

-- | Applies only to Amazon EMR releases 4.x and later. The list of
-- Configurations supplied to the EMR cluster.
cluster_configurations :: Lens.Lens' Cluster (Prelude.Maybe [Configuration])
cluster_configurations :: (Maybe [Configuration] -> f (Maybe [Configuration]))
-> Cluster -> f Cluster
cluster_configurations = (Cluster -> Maybe [Configuration])
-> (Cluster -> Maybe [Configuration] -> Cluster)
-> Lens
     Cluster Cluster (Maybe [Configuration]) (Maybe [Configuration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [Configuration]
configurations :: Maybe [Configuration]
$sel:configurations:Cluster' :: Cluster -> Maybe [Configuration]
configurations} -> Maybe [Configuration]
configurations) (\s :: Cluster
s@Cluster' {} Maybe [Configuration]
a -> Cluster
s {$sel:configurations:Cluster' :: Maybe [Configuration]
configurations = Maybe [Configuration]
a} :: Cluster) ((Maybe [Configuration] -> f (Maybe [Configuration]))
 -> Cluster -> f Cluster)
-> ((Maybe [Configuration] -> f (Maybe [Configuration]))
    -> Maybe [Configuration] -> f (Maybe [Configuration]))
-> (Maybe [Configuration] -> f (Maybe [Configuration]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [Configuration] [Configuration] [Configuration] [Configuration]
-> Iso
     (Maybe [Configuration])
     (Maybe [Configuration])
     (Maybe [Configuration])
     (Maybe [Configuration])
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
  [Configuration] [Configuration] [Configuration] [Configuration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Available only in Amazon EMR version 5.7.0 and later. The ID of a custom
-- Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.
cluster_customAmiId :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_customAmiId :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_customAmiId = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
customAmiId :: Maybe Text
$sel:customAmiId:Cluster' :: Cluster -> Maybe Text
customAmiId} -> Maybe Text
customAmiId) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:customAmiId:Cluster' :: Maybe Text
customAmiId = Maybe Text
a} :: Cluster)

-- | An IAM role for automatic scaling policies. The default role is
-- @EMR_AutoScaling_DefaultRole@. The IAM role provides permissions that
-- the automatic scaling feature requires to launch and terminate EC2
-- instances in an instance group.
cluster_autoScalingRole :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_autoScalingRole :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_autoScalingRole = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
autoScalingRole :: Maybe Text
$sel:autoScalingRole:Cluster' :: Cluster -> Maybe Text
autoScalingRole} -> Maybe Text
autoScalingRole) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:autoScalingRole:Cluster' :: Maybe Text
autoScalingRole = Maybe Text
a} :: Cluster)

-- | The name of the security configuration applied to the cluster.
cluster_securityConfiguration :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_securityConfiguration :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_securityConfiguration = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
securityConfiguration :: Maybe Text
$sel:securityConfiguration:Cluster' :: Cluster -> Maybe Text
securityConfiguration} -> Maybe Text
securityConfiguration) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:securityConfiguration:Cluster' :: Maybe Text
securityConfiguration = Maybe Text
a} :: Cluster)

-- | The way that individual Amazon EC2 instances terminate when an automatic
-- scale-in activity occurs or an instance group is resized.
-- @TERMINATE_AT_INSTANCE_HOUR@ indicates that Amazon EMR terminates nodes
-- at the instance-hour boundary, regardless of when the request to
-- terminate the instance was submitted. This option is only available with
-- Amazon EMR 5.1.0 and later and is the default for clusters created using
-- that version. @TERMINATE_AT_TASK_COMPLETION@ indicates that Amazon EMR
-- adds nodes to a deny list and drains tasks from nodes before terminating
-- the Amazon EC2 instances, regardless of the instance-hour boundary. With
-- either behavior, Amazon EMR removes the least active nodes first and
-- blocks instance termination if it could lead to HDFS corruption.
-- @TERMINATE_AT_TASK_COMPLETION@ is available only in Amazon EMR version
-- 4.1.0 and later, and is the default for versions of Amazon EMR earlier
-- than 5.1.0.
cluster_scaleDownBehavior :: Lens.Lens' Cluster (Prelude.Maybe ScaleDownBehavior)
cluster_scaleDownBehavior :: (Maybe ScaleDownBehavior -> f (Maybe ScaleDownBehavior))
-> Cluster -> f Cluster
cluster_scaleDownBehavior = (Cluster -> Maybe ScaleDownBehavior)
-> (Cluster -> Maybe ScaleDownBehavior -> Cluster)
-> Lens
     Cluster Cluster (Maybe ScaleDownBehavior) (Maybe ScaleDownBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe ScaleDownBehavior
scaleDownBehavior :: Maybe ScaleDownBehavior
$sel:scaleDownBehavior:Cluster' :: Cluster -> Maybe ScaleDownBehavior
scaleDownBehavior} -> Maybe ScaleDownBehavior
scaleDownBehavior) (\s :: Cluster
s@Cluster' {} Maybe ScaleDownBehavior
a -> Cluster
s {$sel:scaleDownBehavior:Cluster' :: Maybe ScaleDownBehavior
scaleDownBehavior = Maybe ScaleDownBehavior
a} :: Cluster)

-- | The instance fleet configuration is available only in Amazon EMR
-- versions 4.8.0 and later, excluding 5.0.x versions.
--
-- The instance group configuration of the cluster. A value of
-- @INSTANCE_GROUP@ indicates a uniform instance group configuration. A
-- value of @INSTANCE_FLEET@ indicates an instance fleets configuration.
cluster_instanceCollectionType :: Lens.Lens' Cluster (Prelude.Maybe InstanceCollectionType)
cluster_instanceCollectionType :: (Maybe InstanceCollectionType -> f (Maybe InstanceCollectionType))
-> Cluster -> f Cluster
cluster_instanceCollectionType = (Cluster -> Maybe InstanceCollectionType)
-> (Cluster -> Maybe InstanceCollectionType -> Cluster)
-> Lens
     Cluster
     Cluster
     (Maybe InstanceCollectionType)
     (Maybe InstanceCollectionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe InstanceCollectionType
instanceCollectionType :: Maybe InstanceCollectionType
$sel:instanceCollectionType:Cluster' :: Cluster -> Maybe InstanceCollectionType
instanceCollectionType} -> Maybe InstanceCollectionType
instanceCollectionType) (\s :: Cluster
s@Cluster' {} Maybe InstanceCollectionType
a -> Cluster
s {$sel:instanceCollectionType:Cluster' :: Maybe InstanceCollectionType
instanceCollectionType = Maybe InstanceCollectionType
a} :: Cluster)

-- | The Amazon EMR release label, which determines the version of
-- open-source application packages installed on the cluster. Release
-- labels are in the form @emr-x.x.x@, where x.x.x is an Amazon EMR release
-- version such as @emr-5.14.0@. For more information about Amazon EMR
-- release versions and included application versions and features, see
-- <https://docs.aws.amazon.com/emr/latest/ReleaseGuide/>. The release
-- label applies only to Amazon EMR releases version 4.0 and later. Earlier
-- versions use @AmiVersion@.
cluster_releaseLabel :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_releaseLabel :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_releaseLabel = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
releaseLabel :: Maybe Text
$sel:releaseLabel:Cluster' :: Cluster -> Maybe Text
releaseLabel} -> Maybe Text
releaseLabel) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:releaseLabel:Cluster' :: Maybe Text
releaseLabel = Maybe Text
a} :: Cluster)

-- | Applies only when @CustomAmiID@ is used. Specifies the type of updates
-- that are applied from the Amazon Linux AMI package repositories when an
-- instance boots using the AMI.
cluster_repoUpgradeOnBoot :: Lens.Lens' Cluster (Prelude.Maybe RepoUpgradeOnBoot)
cluster_repoUpgradeOnBoot :: (Maybe RepoUpgradeOnBoot -> f (Maybe RepoUpgradeOnBoot))
-> Cluster -> f Cluster
cluster_repoUpgradeOnBoot = (Cluster -> Maybe RepoUpgradeOnBoot)
-> (Cluster -> Maybe RepoUpgradeOnBoot -> Cluster)
-> Lens
     Cluster Cluster (Maybe RepoUpgradeOnBoot) (Maybe RepoUpgradeOnBoot)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot :: Maybe RepoUpgradeOnBoot
$sel:repoUpgradeOnBoot:Cluster' :: Cluster -> Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot} -> Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot) (\s :: Cluster
s@Cluster' {} Maybe RepoUpgradeOnBoot
a -> Cluster
s {$sel:repoUpgradeOnBoot:Cluster' :: Maybe RepoUpgradeOnBoot
repoUpgradeOnBoot = Maybe RepoUpgradeOnBoot
a} :: Cluster)

-- | The path to the Amazon S3 location where logs for this cluster are
-- stored.
cluster_logUri :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_logUri :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_logUri = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
logUri :: Maybe Text
$sel:logUri:Cluster' :: Cluster -> Maybe Text
logUri} -> Maybe Text
logUri) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:logUri:Cluster' :: Maybe Text
logUri = Maybe Text
a} :: Cluster)

-- | Attributes for Kerberos configuration when Kerberos authentication is
-- enabled using a security configuration. For more information see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html Use Kerberos Authentication>
-- in the /Amazon EMR Management Guide/.
cluster_kerberosAttributes :: Lens.Lens' Cluster (Prelude.Maybe KerberosAttributes)
cluster_kerberosAttributes :: (Maybe KerberosAttributes -> f (Maybe KerberosAttributes))
-> Cluster -> f Cluster
cluster_kerberosAttributes = (Cluster -> Maybe KerberosAttributes)
-> (Cluster -> Maybe KerberosAttributes -> Cluster)
-> Lens
     Cluster
     Cluster
     (Maybe KerberosAttributes)
     (Maybe KerberosAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe KerberosAttributes
kerberosAttributes :: Maybe KerberosAttributes
$sel:kerberosAttributes:Cluster' :: Cluster -> Maybe KerberosAttributes
kerberosAttributes} -> Maybe KerberosAttributes
kerberosAttributes) (\s :: Cluster
s@Cluster' {} Maybe KerberosAttributes
a -> Cluster
s {$sel:kerberosAttributes:Cluster' :: Maybe KerberosAttributes
kerberosAttributes = Maybe KerberosAttributes
a} :: Cluster)

-- | Placement group configured for an Amazon EMR cluster.
cluster_placementGroups :: Lens.Lens' Cluster (Prelude.Maybe [PlacementGroupConfig])
cluster_placementGroups :: (Maybe [PlacementGroupConfig] -> f (Maybe [PlacementGroupConfig]))
-> Cluster -> f Cluster
cluster_placementGroups = (Cluster -> Maybe [PlacementGroupConfig])
-> (Cluster -> Maybe [PlacementGroupConfig] -> Cluster)
-> Lens
     Cluster
     Cluster
     (Maybe [PlacementGroupConfig])
     (Maybe [PlacementGroupConfig])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [PlacementGroupConfig]
placementGroups :: Maybe [PlacementGroupConfig]
$sel:placementGroups:Cluster' :: Cluster -> Maybe [PlacementGroupConfig]
placementGroups} -> Maybe [PlacementGroupConfig]
placementGroups) (\s :: Cluster
s@Cluster' {} Maybe [PlacementGroupConfig]
a -> Cluster
s {$sel:placementGroups:Cluster' :: Maybe [PlacementGroupConfig]
placementGroups = Maybe [PlacementGroupConfig]
a} :: Cluster) ((Maybe [PlacementGroupConfig] -> f (Maybe [PlacementGroupConfig]))
 -> Cluster -> f Cluster)
-> ((Maybe [PlacementGroupConfig]
     -> f (Maybe [PlacementGroupConfig]))
    -> Maybe [PlacementGroupConfig]
    -> f (Maybe [PlacementGroupConfig]))
-> (Maybe [PlacementGroupConfig]
    -> f (Maybe [PlacementGroupConfig]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [PlacementGroupConfig]
  [PlacementGroupConfig]
  [PlacementGroupConfig]
  [PlacementGroupConfig]
-> Iso
     (Maybe [PlacementGroupConfig])
     (Maybe [PlacementGroupConfig])
     (Maybe [PlacementGroupConfig])
     (Maybe [PlacementGroupConfig])
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
  [PlacementGroupConfig]
  [PlacementGroupConfig]
  [PlacementGroupConfig]
  [PlacementGroupConfig]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The AMI version running on this cluster.
cluster_runningAmiVersion :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_runningAmiVersion :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_runningAmiVersion = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
runningAmiVersion :: Maybe Text
$sel:runningAmiVersion:Cluster' :: Cluster -> Maybe Text
runningAmiVersion} -> Maybe Text
runningAmiVersion) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:runningAmiVersion:Cluster' :: Maybe Text
runningAmiVersion = Maybe Text
a} :: Cluster)

-- | The DNS name of the master node. If the cluster is on a private subnet,
-- this is the private DNS name. On a public subnet, this is the public DNS
-- name.
cluster_masterPublicDnsName :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_masterPublicDnsName :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_masterPublicDnsName = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
masterPublicDnsName :: Maybe Text
$sel:masterPublicDnsName:Cluster' :: Cluster -> Maybe Text
masterPublicDnsName} -> Maybe Text
masterPublicDnsName) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:masterPublicDnsName:Cluster' :: Maybe Text
masterPublicDnsName = Maybe Text
a} :: Cluster)

-- | Indicates whether Amazon EMR will lock the cluster to prevent the EC2
-- instances from being terminated by an API call or user intervention, or
-- in the event of a cluster error.
cluster_terminationProtected :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Bool)
cluster_terminationProtected :: (Maybe Bool -> f (Maybe Bool)) -> Cluster -> f Cluster
cluster_terminationProtected = (Cluster -> Maybe Bool)
-> (Cluster -> Maybe Bool -> Cluster)
-> Lens Cluster Cluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Bool
terminationProtected :: Maybe Bool
$sel:terminationProtected:Cluster' :: Cluster -> Maybe Bool
terminationProtected} -> Maybe Bool
terminationProtected) (\s :: Cluster
s@Cluster' {} Maybe Bool
a -> Cluster
s {$sel:terminationProtected:Cluster' :: Maybe Bool
terminationProtected = Maybe Bool
a} :: Cluster)

-- | Indicates whether the cluster is visible to IAM principals in the Amazon
-- Web Services account associated with the cluster. When @true@, IAM
-- principals in the Amazon Web Services account can perform EMR cluster
-- actions on the cluster that their IAM policies allow. When @false@, only
-- the IAM principal that created the cluster and the Amazon Web Services
-- account root user can perform EMR actions, regardless of IAM permissions
-- policies attached to other IAM principals.
--
-- The default value is @true@ if a value is not provided when creating a
-- cluster using the EMR API RunJobFlow command, the CLI
-- <https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html create-cluster>
-- command, or the Amazon Web Services Management Console. IAM principals
-- that are allowed to perform actions on the cluster can use the
-- SetVisibleToAllUsers action to change the value on a running cluster.
-- For more information, see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users Understanding the EMR Cluster VisibleToAllUsers Setting>
-- in the /Amazon EMRManagement Guide/.
cluster_visibleToAllUsers :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Bool)
cluster_visibleToAllUsers :: (Maybe Bool -> f (Maybe Bool)) -> Cluster -> f Cluster
cluster_visibleToAllUsers = (Cluster -> Maybe Bool)
-> (Cluster -> Maybe Bool -> Cluster)
-> Lens Cluster Cluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Bool
visibleToAllUsers :: Maybe Bool
$sel:visibleToAllUsers:Cluster' :: Cluster -> Maybe Bool
visibleToAllUsers} -> Maybe Bool
visibleToAllUsers) (\s :: Cluster
s@Cluster' {} Maybe Bool
a -> Cluster
s {$sel:visibleToAllUsers:Cluster' :: Maybe Bool
visibleToAllUsers = Maybe Bool
a} :: Cluster)

-- | Specifies whether the cluster should terminate after completing all
-- steps.
cluster_autoTerminate :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Bool)
cluster_autoTerminate :: (Maybe Bool -> f (Maybe Bool)) -> Cluster -> f Cluster
cluster_autoTerminate = (Cluster -> Maybe Bool)
-> (Cluster -> Maybe Bool -> Cluster)
-> Lens Cluster Cluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Bool
autoTerminate :: Maybe Bool
$sel:autoTerminate:Cluster' :: Cluster -> Maybe Bool
autoTerminate} -> Maybe Bool
autoTerminate) (\s :: Cluster
s@Cluster' {} Maybe Bool
a -> Cluster
s {$sel:autoTerminate:Cluster' :: Maybe Bool
autoTerminate = Maybe Bool
a} :: Cluster)

-- | Specifies the number of steps that can be executed concurrently.
cluster_stepConcurrencyLevel :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_stepConcurrencyLevel :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_stepConcurrencyLevel = (Cluster -> Maybe Int)
-> (Cluster -> Maybe Int -> Cluster)
-> Lens Cluster Cluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Int
stepConcurrencyLevel :: Maybe Int
$sel:stepConcurrencyLevel:Cluster' :: Cluster -> Maybe Int
stepConcurrencyLevel} -> Maybe Int
stepConcurrencyLevel) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:stepConcurrencyLevel:Cluster' :: Maybe Int
stepConcurrencyLevel = Maybe Int
a} :: Cluster)

-- | The applications installed on this cluster.
cluster_applications :: Lens.Lens' Cluster (Prelude.Maybe [Application])
cluster_applications :: (Maybe [Application] -> f (Maybe [Application]))
-> Cluster -> f Cluster
cluster_applications = (Cluster -> Maybe [Application])
-> (Cluster -> Maybe [Application] -> Cluster)
-> Lens Cluster Cluster (Maybe [Application]) (Maybe [Application])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [Application]
applications :: Maybe [Application]
$sel:applications:Cluster' :: Cluster -> Maybe [Application]
applications} -> Maybe [Application]
applications) (\s :: Cluster
s@Cluster' {} Maybe [Application]
a -> Cluster
s {$sel:applications:Cluster' :: Maybe [Application]
applications = Maybe [Application]
a} :: Cluster) ((Maybe [Application] -> f (Maybe [Application]))
 -> Cluster -> f Cluster)
-> ((Maybe [Application] -> f (Maybe [Application]))
    -> Maybe [Application] -> f (Maybe [Application]))
-> (Maybe [Application] -> f (Maybe [Application]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Application] [Application] [Application] [Application]
-> Iso
     (Maybe [Application])
     (Maybe [Application])
     (Maybe [Application])
     (Maybe [Application])
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 [Application] [Application] [Application] [Application]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of tags associated with a cluster.
cluster_tags :: Lens.Lens' Cluster (Prelude.Maybe [Tag])
cluster_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Cluster -> f Cluster
cluster_tags = (Cluster -> Maybe [Tag])
-> (Cluster -> Maybe [Tag] -> Cluster)
-> Lens Cluster Cluster (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Cluster' :: Cluster -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Cluster
s@Cluster' {} Maybe [Tag]
a -> Cluster
s {$sel:tags:Cluster' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Cluster) ((Maybe [Tag] -> f (Maybe [Tag])) -> Cluster -> f Cluster)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The IAM role that Amazon EMR assumes in order to access Amazon Web
-- Services resources on your behalf.
cluster_serviceRole :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_serviceRole :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_serviceRole = (Cluster -> Maybe Text)
-> (Cluster -> Maybe Text -> Cluster)
-> Lens Cluster Cluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Text
serviceRole :: Maybe Text
$sel:serviceRole:Cluster' :: Cluster -> Maybe Text
serviceRole} -> Maybe Text
serviceRole) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:serviceRole:Cluster' :: Maybe Text
serviceRole = Maybe Text
a} :: Cluster)

-- | The unique identifier for the cluster.
cluster_id :: Lens.Lens' Cluster Prelude.Text
cluster_id :: (Text -> f Text) -> Cluster -> f Cluster
cluster_id = (Cluster -> Text)
-> (Cluster -> Text -> Cluster) -> Lens Cluster Cluster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Text
id :: Text
$sel:id:Cluster' :: Cluster -> Text
id} -> Text
id) (\s :: Cluster
s@Cluster' {} Text
a -> Cluster
s {$sel:id:Cluster' :: Text
id = Text
a} :: Cluster)

-- | The name of the cluster.
cluster_name :: Lens.Lens' Cluster Prelude.Text
cluster_name :: (Text -> f Text) -> Cluster -> f Cluster
cluster_name = (Cluster -> Text)
-> (Cluster -> Text -> Cluster) -> Lens Cluster Cluster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Text
name :: Text
$sel:name:Cluster' :: Cluster -> Text
name} -> Text
name) (\s :: Cluster
s@Cluster' {} Text
a -> Cluster
s {$sel:name:Cluster' :: Text
name = Text
a} :: Cluster)

-- | The current status details about the cluster.
cluster_status :: Lens.Lens' Cluster ClusterStatus
cluster_status :: (ClusterStatus -> f ClusterStatus) -> Cluster -> f Cluster
cluster_status = (Cluster -> ClusterStatus)
-> (Cluster -> ClusterStatus -> Cluster)
-> Lens Cluster Cluster ClusterStatus ClusterStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {ClusterStatus
status :: ClusterStatus
$sel:status:Cluster' :: Cluster -> ClusterStatus
status} -> ClusterStatus
status) (\s :: Cluster
s@Cluster' {} ClusterStatus
a -> Cluster
s {$sel:status:Cluster' :: ClusterStatus
status = ClusterStatus
a} :: Cluster)

instance Core.FromJSON Cluster where
  parseJSON :: Value -> Parser Cluster
parseJSON =
    String -> (Object -> Parser Cluster) -> Value -> Parser Cluster
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Cluster"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Ec2InstanceAttributes
-> Maybe Text
-> Maybe Int
-> Maybe [Configuration]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ScaleDownBehavior
-> Maybe InstanceCollectionType
-> Maybe Text
-> Maybe RepoUpgradeOnBoot
-> Maybe Text
-> Maybe KerberosAttributes
-> Maybe [PlacementGroupConfig]
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Int
-> Maybe [Application]
-> Maybe [Tag]
-> Maybe Text
-> Text
-> Text
-> ClusterStatus
-> Cluster
Cluster'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Ec2InstanceAttributes
 -> Maybe Text
 -> Maybe Int
 -> Maybe [Configuration]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ScaleDownBehavior
 -> Maybe InstanceCollectionType
 -> Maybe Text
 -> Maybe RepoUpgradeOnBoot
 -> Maybe Text
 -> Maybe KerberosAttributes
 -> Maybe [PlacementGroupConfig]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Int
 -> Maybe [Application]
 -> Maybe [Tag]
 -> Maybe Text
 -> Text
 -> Text
 -> ClusterStatus
 -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Ec2InstanceAttributes
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Configuration]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"LogEncryptionKmsKeyId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Ec2InstanceAttributes
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Configuration]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Ec2InstanceAttributes
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Configuration]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"ClusterArn")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Ec2InstanceAttributes
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Configuration]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Ec2InstanceAttributes
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Configuration]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"RequestedAmiVersion")
            Parser
  (Maybe Int
   -> Maybe Ec2InstanceAttributes
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Configuration]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Int)
-> Parser
     (Maybe Ec2InstanceAttributes
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Configuration]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EbsRootVolumeSize")
            Parser
  (Maybe Ec2InstanceAttributes
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Configuration]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Ec2InstanceAttributes)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe [Configuration]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Ec2InstanceAttributes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Ec2InstanceAttributes")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe [Configuration]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe [Configuration]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"OutpostArn")
            Parser
  (Maybe Int
   -> Maybe [Configuration]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Int)
-> Parser
     (Maybe [Configuration]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NormalizedInstanceHours")
            Parser
  (Maybe [Configuration]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe [Configuration])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Configuration]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Configurations" Parser (Maybe (Maybe [Configuration]))
-> Maybe [Configuration] -> Parser (Maybe [Configuration])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Configuration]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"CustomAmiId")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"AutoScalingRole")
            Parser
  (Maybe Text
   -> Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe ScaleDownBehavior
      -> Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"SecurityConfiguration")
            Parser
  (Maybe ScaleDownBehavior
   -> Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe ScaleDownBehavior)
-> Parser
     (Maybe InstanceCollectionType
      -> Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ScaleDownBehavior)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScaleDownBehavior")
            Parser
  (Maybe InstanceCollectionType
   -> Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe InstanceCollectionType)
-> Parser
     (Maybe Text
      -> Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceCollectionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstanceCollectionType")
            Parser
  (Maybe Text
   -> Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe RepoUpgradeOnBoot
      -> Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"ReleaseLabel")
            Parser
  (Maybe RepoUpgradeOnBoot
   -> Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe RepoUpgradeOnBoot)
-> Parser
     (Maybe Text
      -> Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RepoUpgradeOnBoot)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RepoUpgradeOnBoot")
            Parser
  (Maybe Text
   -> Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe KerberosAttributes
      -> Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"LogUri")
            Parser
  (Maybe KerberosAttributes
   -> Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe KerberosAttributes)
-> Parser
     (Maybe [PlacementGroupConfig]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe KerberosAttributes)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KerberosAttributes")
            Parser
  (Maybe [PlacementGroupConfig]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe [PlacementGroupConfig])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [PlacementGroupConfig]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PlacementGroups"
                            Parser (Maybe (Maybe [PlacementGroupConfig]))
-> Maybe [PlacementGroupConfig]
-> Parser (Maybe [PlacementGroupConfig])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PlacementGroupConfig]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"RunningAmiVersion")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"MasterPublicDnsName")
            Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"TerminationProtected")
            Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"VisibleToAllUsers")
            Parser
  (Maybe Bool
   -> Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Int
      -> Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
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
"AutoTerminate")
            Parser
  (Maybe Int
   -> Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe Int)
-> Parser
     (Maybe [Application]
      -> Maybe [Tag]
      -> Maybe Text
      -> Text
      -> Text
      -> ClusterStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StepConcurrencyLevel")
            Parser
  (Maybe [Application]
   -> Maybe [Tag]
   -> Maybe Text
   -> Text
   -> Text
   -> ClusterStatus
   -> Cluster)
-> Parser (Maybe [Application])
-> Parser
     (Maybe [Tag]
      -> Maybe Text -> Text -> Text -> ClusterStatus -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Application]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Applications" Parser (Maybe (Maybe [Application]))
-> Maybe [Application] -> Parser (Maybe [Application])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Application]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [Tag]
   -> Maybe Text -> Text -> Text -> ClusterStatus -> Cluster)
-> Parser (Maybe [Tag])
-> Parser (Maybe Text -> Text -> Text -> ClusterStatus -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Text -> Text -> ClusterStatus -> Cluster)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> ClusterStatus -> Cluster)
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
"ServiceRole")
            Parser (Text -> Text -> ClusterStatus -> Cluster)
-> Parser Text -> Parser (Text -> ClusterStatus -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Id")
            Parser (Text -> ClusterStatus -> Cluster)
-> Parser Text -> Parser (ClusterStatus -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
            Parser (ClusterStatus -> Cluster)
-> Parser ClusterStatus -> Parser Cluster
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ClusterStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Status")
      )

instance Prelude.Hashable Cluster

instance Prelude.NFData Cluster