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

import qualified Amazonka.Core as Core
import Amazonka.DAX.Types.ClusterEndpointEncryptionType
import Amazonka.DAX.Types.Endpoint
import Amazonka.DAX.Types.Node
import Amazonka.DAX.Types.NotificationConfiguration
import Amazonka.DAX.Types.ParameterGroupStatus
import Amazonka.DAX.Types.SSEDescription
import Amazonka.DAX.Types.SecurityGroupMembership
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains all of the attributes of a specific DAX cluster.
--
-- /See:/ 'newCluster' smart constructor.
data Cluster = Cluster'
  { -- | The current status of the cluster.
    Cluster -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | A valid Amazon Resource Name (ARN) that identifies an IAM role. At
    -- runtime, DAX will assume this role and use the role\'s permissions to
    -- access DynamoDB on your behalf.
    Cluster -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) that uniquely identifies the cluster.
    Cluster -> Maybe Text
clusterArn :: Prelude.Maybe Prelude.Text,
    -- | The number of nodes in the cluster that are active (i.e., capable of
    -- serving requests).
    Cluster -> Maybe Int
activeNodes :: Prelude.Maybe Prelude.Int,
    -- | A list of security groups, and the status of each, for the nodes in the
    -- cluster.
    Cluster -> Maybe [SecurityGroupMembership]
securityGroups :: Prelude.Maybe [SecurityGroupMembership],
    -- | Describes a notification topic and its status. Notification topics are
    -- used for publishing DAX events to subscribers using Amazon Simple
    -- Notification Service (SNS).
    Cluster -> Maybe NotificationConfiguration
notificationConfiguration :: Prelude.Maybe NotificationConfiguration,
    -- | A list of nodes to be removed from the cluster.
    Cluster -> Maybe [Text]
nodeIdsToRemove :: Prelude.Maybe [Prelude.Text],
    -- | The type of encryption supported by the cluster\'s endpoint. Values are:
    --
    -- -   @NONE@ for no encryption
    --
    --     @TLS@ for Transport Layer Security
    Cluster -> Maybe ClusterEndpointEncryptionType
clusterEndpointEncryptionType :: Prelude.Maybe ClusterEndpointEncryptionType,
    -- | The total number of nodes in the cluster.
    Cluster -> Maybe Int
totalNodes :: Prelude.Maybe Prelude.Int,
    -- | A range of time when maintenance of DAX cluster software will be
    -- performed. For example: @sun:01:00-sun:09:00@. Cluster maintenance
    -- normally takes less than 30 minutes, and is performed automatically
    -- within the maintenance window.
    Cluster -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The subnet group where the DAX cluster is running.
    Cluster -> Maybe Text
subnetGroup :: Prelude.Maybe Prelude.Text,
    -- | The name of the DAX cluster.
    Cluster -> Maybe Text
clusterName :: Prelude.Maybe Prelude.Text,
    -- | The node type for the nodes in the cluster. (All nodes in a DAX cluster
    -- are of the same type.)
    Cluster -> Maybe Text
nodeType :: Prelude.Maybe Prelude.Text,
    -- | A list of nodes that are currently in the cluster.
    Cluster -> Maybe [Node]
nodes :: Prelude.Maybe [Node],
    -- | The endpoint for this DAX cluster, consisting of a DNS name, a port
    -- number, and a URL. Applications should use the URL to configure the DAX
    -- client to find their cluster.
    Cluster -> Maybe Endpoint
clusterDiscoveryEndpoint :: Prelude.Maybe Endpoint,
    -- | The description of the server-side encryption status on the specified
    -- DAX cluster.
    Cluster -> Maybe SSEDescription
sSEDescription :: Prelude.Maybe SSEDescription,
    -- | The description of the cluster.
    Cluster -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The parameter group being used by nodes in the cluster.
    Cluster -> Maybe ParameterGroupStatus
parameterGroup :: Prelude.Maybe ParameterGroupStatus
  }
  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:
--
-- 'status', 'cluster_status' - The current status of the cluster.
--
-- 'iamRoleArn', 'cluster_iamRoleArn' - A valid Amazon Resource Name (ARN) that identifies an IAM role. At
-- runtime, DAX will assume this role and use the role\'s permissions to
-- access DynamoDB on your behalf.
--
-- 'clusterArn', 'cluster_clusterArn' - The Amazon Resource Name (ARN) that uniquely identifies the cluster.
--
-- 'activeNodes', 'cluster_activeNodes' - The number of nodes in the cluster that are active (i.e., capable of
-- serving requests).
--
-- 'securityGroups', 'cluster_securityGroups' - A list of security groups, and the status of each, for the nodes in the
-- cluster.
--
-- 'notificationConfiguration', 'cluster_notificationConfiguration' - Describes a notification topic and its status. Notification topics are
-- used for publishing DAX events to subscribers using Amazon Simple
-- Notification Service (SNS).
--
-- 'nodeIdsToRemove', 'cluster_nodeIdsToRemove' - A list of nodes to be removed from the cluster.
--
-- 'clusterEndpointEncryptionType', 'cluster_clusterEndpointEncryptionType' - The type of encryption supported by the cluster\'s endpoint. Values are:
--
-- -   @NONE@ for no encryption
--
--     @TLS@ for Transport Layer Security
--
-- 'totalNodes', 'cluster_totalNodes' - The total number of nodes in the cluster.
--
-- 'preferredMaintenanceWindow', 'cluster_preferredMaintenanceWindow' - A range of time when maintenance of DAX cluster software will be
-- performed. For example: @sun:01:00-sun:09:00@. Cluster maintenance
-- normally takes less than 30 minutes, and is performed automatically
-- within the maintenance window.
--
-- 'subnetGroup', 'cluster_subnetGroup' - The subnet group where the DAX cluster is running.
--
-- 'clusterName', 'cluster_clusterName' - The name of the DAX cluster.
--
-- 'nodeType', 'cluster_nodeType' - The node type for the nodes in the cluster. (All nodes in a DAX cluster
-- are of the same type.)
--
-- 'nodes', 'cluster_nodes' - A list of nodes that are currently in the cluster.
--
-- 'clusterDiscoveryEndpoint', 'cluster_clusterDiscoveryEndpoint' - The endpoint for this DAX cluster, consisting of a DNS name, a port
-- number, and a URL. Applications should use the URL to configure the DAX
-- client to find their cluster.
--
-- 'sSEDescription', 'cluster_sSEDescription' - The description of the server-side encryption status on the specified
-- DAX cluster.
--
-- 'description', 'cluster_description' - The description of the cluster.
--
-- 'parameterGroup', 'cluster_parameterGroup' - The parameter group being used by nodes in the cluster.
newCluster ::
  Cluster
newCluster :: Cluster
newCluster =
  Cluster' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [SecurityGroupMembership]
-> Maybe NotificationConfiguration
-> Maybe [Text]
-> Maybe ClusterEndpointEncryptionType
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Node]
-> Maybe Endpoint
-> Maybe SSEDescription
-> Maybe Text
-> Maybe ParameterGroupStatus
-> Cluster
Cluster'
    { $sel:status:Cluster' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRoleArn:Cluster' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterArn:Cluster' :: Maybe Text
clusterArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:activeNodes:Cluster' :: Maybe Int
activeNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroups:Cluster' :: Maybe [SecurityGroupMembership]
securityGroups = Maybe [SecurityGroupMembership]
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationConfiguration:Cluster' :: Maybe NotificationConfiguration
notificationConfiguration = Maybe NotificationConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeIdsToRemove:Cluster' :: Maybe [Text]
nodeIdsToRemove = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterEndpointEncryptionType:Cluster' :: Maybe ClusterEndpointEncryptionType
clusterEndpointEncryptionType = Maybe ClusterEndpointEncryptionType
forall a. Maybe a
Prelude.Nothing,
      $sel:totalNodes:Cluster' :: Maybe Int
totalNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:Cluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetGroup:Cluster' :: Maybe Text
subnetGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterName:Cluster' :: Maybe Text
clusterName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeType:Cluster' :: Maybe Text
nodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nodes:Cluster' :: Maybe [Node]
nodes = Maybe [Node]
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterDiscoveryEndpoint:Cluster' :: Maybe Endpoint
clusterDiscoveryEndpoint = Maybe Endpoint
forall a. Maybe a
Prelude.Nothing,
      $sel:sSEDescription:Cluster' :: Maybe SSEDescription
sSEDescription = Maybe SSEDescription
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Cluster' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroup:Cluster' :: Maybe ParameterGroupStatus
parameterGroup = Maybe ParameterGroupStatus
forall a. Maybe a
Prelude.Nothing
    }

-- | The current status of the cluster.
cluster_status :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_status :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_status = (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
status :: Maybe Text
$sel:status:Cluster' :: Cluster -> Maybe Text
status} -> Maybe Text
status) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:status:Cluster' :: Maybe Text
status = Maybe Text
a} :: Cluster)

-- | A valid Amazon Resource Name (ARN) that identifies an IAM role. At
-- runtime, DAX will assume this role and use the role\'s permissions to
-- access DynamoDB on your behalf.
cluster_iamRoleArn :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_iamRoleArn :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_iamRoleArn = (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
iamRoleArn :: Maybe Text
$sel:iamRoleArn:Cluster' :: Cluster -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:iamRoleArn:Cluster' :: Maybe Text
iamRoleArn = Maybe Text
a} :: Cluster)

-- | The Amazon Resource Name (ARN) that uniquely identifies 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 number of nodes in the cluster that are active (i.e., capable of
-- serving requests).
cluster_activeNodes :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_activeNodes :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_activeNodes = (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
activeNodes :: Maybe Int
$sel:activeNodes:Cluster' :: Cluster -> Maybe Int
activeNodes} -> Maybe Int
activeNodes) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:activeNodes:Cluster' :: Maybe Int
activeNodes = Maybe Int
a} :: Cluster)

-- | A list of security groups, and the status of each, for the nodes in the
-- cluster.
cluster_securityGroups :: Lens.Lens' Cluster (Prelude.Maybe [SecurityGroupMembership])
cluster_securityGroups :: (Maybe [SecurityGroupMembership]
 -> f (Maybe [SecurityGroupMembership]))
-> Cluster -> f Cluster
cluster_securityGroups = (Cluster -> Maybe [SecurityGroupMembership])
-> (Cluster -> Maybe [SecurityGroupMembership] -> Cluster)
-> Lens
     Cluster
     Cluster
     (Maybe [SecurityGroupMembership])
     (Maybe [SecurityGroupMembership])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [SecurityGroupMembership]
securityGroups :: Maybe [SecurityGroupMembership]
$sel:securityGroups:Cluster' :: Cluster -> Maybe [SecurityGroupMembership]
securityGroups} -> Maybe [SecurityGroupMembership]
securityGroups) (\s :: Cluster
s@Cluster' {} Maybe [SecurityGroupMembership]
a -> Cluster
s {$sel:securityGroups:Cluster' :: Maybe [SecurityGroupMembership]
securityGroups = Maybe [SecurityGroupMembership]
a} :: Cluster) ((Maybe [SecurityGroupMembership]
  -> f (Maybe [SecurityGroupMembership]))
 -> Cluster -> f Cluster)
-> ((Maybe [SecurityGroupMembership]
     -> f (Maybe [SecurityGroupMembership]))
    -> Maybe [SecurityGroupMembership]
    -> f (Maybe [SecurityGroupMembership]))
-> (Maybe [SecurityGroupMembership]
    -> f (Maybe [SecurityGroupMembership]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SecurityGroupMembership]
  [SecurityGroupMembership]
  [SecurityGroupMembership]
  [SecurityGroupMembership]
-> Iso
     (Maybe [SecurityGroupMembership])
     (Maybe [SecurityGroupMembership])
     (Maybe [SecurityGroupMembership])
     (Maybe [SecurityGroupMembership])
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
  [SecurityGroupMembership]
  [SecurityGroupMembership]
  [SecurityGroupMembership]
  [SecurityGroupMembership]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Describes a notification topic and its status. Notification topics are
-- used for publishing DAX events to subscribers using Amazon Simple
-- Notification Service (SNS).
cluster_notificationConfiguration :: Lens.Lens' Cluster (Prelude.Maybe NotificationConfiguration)
cluster_notificationConfiguration :: (Maybe NotificationConfiguration
 -> f (Maybe NotificationConfiguration))
-> Cluster -> f Cluster
cluster_notificationConfiguration = (Cluster -> Maybe NotificationConfiguration)
-> (Cluster -> Maybe NotificationConfiguration -> Cluster)
-> Lens
     Cluster
     Cluster
     (Maybe NotificationConfiguration)
     (Maybe NotificationConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe NotificationConfiguration
notificationConfiguration :: Maybe NotificationConfiguration
$sel:notificationConfiguration:Cluster' :: Cluster -> Maybe NotificationConfiguration
notificationConfiguration} -> Maybe NotificationConfiguration
notificationConfiguration) (\s :: Cluster
s@Cluster' {} Maybe NotificationConfiguration
a -> Cluster
s {$sel:notificationConfiguration:Cluster' :: Maybe NotificationConfiguration
notificationConfiguration = Maybe NotificationConfiguration
a} :: Cluster)

-- | A list of nodes to be removed from the cluster.
cluster_nodeIdsToRemove :: Lens.Lens' Cluster (Prelude.Maybe [Prelude.Text])
cluster_nodeIdsToRemove :: (Maybe [Text] -> f (Maybe [Text])) -> Cluster -> f Cluster
cluster_nodeIdsToRemove = (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]
nodeIdsToRemove :: Maybe [Text]
$sel:nodeIdsToRemove:Cluster' :: Cluster -> Maybe [Text]
nodeIdsToRemove} -> Maybe [Text]
nodeIdsToRemove) (\s :: Cluster
s@Cluster' {} Maybe [Text]
a -> Cluster
s {$sel:nodeIdsToRemove:Cluster' :: Maybe [Text]
nodeIdsToRemove = Maybe [Text]
a} :: Cluster) ((Maybe [Text] -> f (Maybe [Text])) -> Cluster -> f Cluster)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Cluster
-> f Cluster
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 type of encryption supported by the cluster\'s endpoint. Values are:
--
-- -   @NONE@ for no encryption
--
--     @TLS@ for Transport Layer Security
cluster_clusterEndpointEncryptionType :: Lens.Lens' Cluster (Prelude.Maybe ClusterEndpointEncryptionType)
cluster_clusterEndpointEncryptionType :: (Maybe ClusterEndpointEncryptionType
 -> f (Maybe ClusterEndpointEncryptionType))
-> Cluster -> f Cluster
cluster_clusterEndpointEncryptionType = (Cluster -> Maybe ClusterEndpointEncryptionType)
-> (Cluster -> Maybe ClusterEndpointEncryptionType -> Cluster)
-> Lens
     Cluster
     Cluster
     (Maybe ClusterEndpointEncryptionType)
     (Maybe ClusterEndpointEncryptionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe ClusterEndpointEncryptionType
clusterEndpointEncryptionType :: Maybe ClusterEndpointEncryptionType
$sel:clusterEndpointEncryptionType:Cluster' :: Cluster -> Maybe ClusterEndpointEncryptionType
clusterEndpointEncryptionType} -> Maybe ClusterEndpointEncryptionType
clusterEndpointEncryptionType) (\s :: Cluster
s@Cluster' {} Maybe ClusterEndpointEncryptionType
a -> Cluster
s {$sel:clusterEndpointEncryptionType:Cluster' :: Maybe ClusterEndpointEncryptionType
clusterEndpointEncryptionType = Maybe ClusterEndpointEncryptionType
a} :: Cluster)

-- | The total number of nodes in the cluster.
cluster_totalNodes :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_totalNodes :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_totalNodes = (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
totalNodes :: Maybe Int
$sel:totalNodes:Cluster' :: Cluster -> Maybe Int
totalNodes} -> Maybe Int
totalNodes) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:totalNodes:Cluster' :: Maybe Int
totalNodes = Maybe Int
a} :: Cluster)

-- | A range of time when maintenance of DAX cluster software will be
-- performed. For example: @sun:01:00-sun:09:00@. Cluster maintenance
-- normally takes less than 30 minutes, and is performed automatically
-- within the maintenance window.
cluster_preferredMaintenanceWindow :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_preferredMaintenanceWindow = (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
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:Cluster' :: Cluster -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:preferredMaintenanceWindow:Cluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: Cluster)

-- | The subnet group where the DAX cluster is running.
cluster_subnetGroup :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_subnetGroup :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_subnetGroup = (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
subnetGroup :: Maybe Text
$sel:subnetGroup:Cluster' :: Cluster -> Maybe Text
subnetGroup} -> Maybe Text
subnetGroup) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:subnetGroup:Cluster' :: Maybe Text
subnetGroup = Maybe Text
a} :: Cluster)

-- | The name of the DAX cluster.
cluster_clusterName :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_clusterName :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_clusterName = (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
clusterName :: Maybe Text
$sel:clusterName:Cluster' :: Cluster -> Maybe Text
clusterName} -> Maybe Text
clusterName) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:clusterName:Cluster' :: Maybe Text
clusterName = Maybe Text
a} :: Cluster)

-- | The node type for the nodes in the cluster. (All nodes in a DAX cluster
-- are of the same type.)
cluster_nodeType :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_nodeType :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_nodeType = (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
nodeType :: Maybe Text
$sel:nodeType:Cluster' :: Cluster -> Maybe Text
nodeType} -> Maybe Text
nodeType) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:nodeType:Cluster' :: Maybe Text
nodeType = Maybe Text
a} :: Cluster)

-- | A list of nodes that are currently in the cluster.
cluster_nodes :: Lens.Lens' Cluster (Prelude.Maybe [Node])
cluster_nodes :: (Maybe [Node] -> f (Maybe [Node])) -> Cluster -> f Cluster
cluster_nodes = (Cluster -> Maybe [Node])
-> (Cluster -> Maybe [Node] -> Cluster)
-> Lens Cluster Cluster (Maybe [Node]) (Maybe [Node])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe [Node]
nodes :: Maybe [Node]
$sel:nodes:Cluster' :: Cluster -> Maybe [Node]
nodes} -> Maybe [Node]
nodes) (\s :: Cluster
s@Cluster' {} Maybe [Node]
a -> Cluster
s {$sel:nodes:Cluster' :: Maybe [Node]
nodes = Maybe [Node]
a} :: Cluster) ((Maybe [Node] -> f (Maybe [Node])) -> Cluster -> f Cluster)
-> ((Maybe [Node] -> f (Maybe [Node]))
    -> Maybe [Node] -> f (Maybe [Node]))
-> (Maybe [Node] -> f (Maybe [Node]))
-> Cluster
-> f Cluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Node] [Node] [Node] [Node]
-> Iso (Maybe [Node]) (Maybe [Node]) (Maybe [Node]) (Maybe [Node])
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 [Node] [Node] [Node] [Node]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The endpoint for this DAX cluster, consisting of a DNS name, a port
-- number, and a URL. Applications should use the URL to configure the DAX
-- client to find their cluster.
cluster_clusterDiscoveryEndpoint :: Lens.Lens' Cluster (Prelude.Maybe Endpoint)
cluster_clusterDiscoveryEndpoint :: (Maybe Endpoint -> f (Maybe Endpoint)) -> Cluster -> f Cluster
cluster_clusterDiscoveryEndpoint = (Cluster -> Maybe Endpoint)
-> (Cluster -> Maybe Endpoint -> Cluster)
-> Lens Cluster Cluster (Maybe Endpoint) (Maybe Endpoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe Endpoint
clusterDiscoveryEndpoint :: Maybe Endpoint
$sel:clusterDiscoveryEndpoint:Cluster' :: Cluster -> Maybe Endpoint
clusterDiscoveryEndpoint} -> Maybe Endpoint
clusterDiscoveryEndpoint) (\s :: Cluster
s@Cluster' {} Maybe Endpoint
a -> Cluster
s {$sel:clusterDiscoveryEndpoint:Cluster' :: Maybe Endpoint
clusterDiscoveryEndpoint = Maybe Endpoint
a} :: Cluster)

-- | The description of the server-side encryption status on the specified
-- DAX cluster.
cluster_sSEDescription :: Lens.Lens' Cluster (Prelude.Maybe SSEDescription)
cluster_sSEDescription :: (Maybe SSEDescription -> f (Maybe SSEDescription))
-> Cluster -> f Cluster
cluster_sSEDescription = (Cluster -> Maybe SSEDescription)
-> (Cluster -> Maybe SSEDescription -> Cluster)
-> Lens
     Cluster Cluster (Maybe SSEDescription) (Maybe SSEDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe SSEDescription
sSEDescription :: Maybe SSEDescription
$sel:sSEDescription:Cluster' :: Cluster -> Maybe SSEDescription
sSEDescription} -> Maybe SSEDescription
sSEDescription) (\s :: Cluster
s@Cluster' {} Maybe SSEDescription
a -> Cluster
s {$sel:sSEDescription:Cluster' :: Maybe SSEDescription
sSEDescription = Maybe SSEDescription
a} :: Cluster)

-- | The description of the cluster.
cluster_description :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_description :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_description = (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
description :: Maybe Text
$sel:description:Cluster' :: Cluster -> Maybe Text
description} -> Maybe Text
description) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:description:Cluster' :: Maybe Text
description = Maybe Text
a} :: Cluster)

-- | The parameter group being used by nodes in the cluster.
cluster_parameterGroup :: Lens.Lens' Cluster (Prelude.Maybe ParameterGroupStatus)
cluster_parameterGroup :: (Maybe ParameterGroupStatus -> f (Maybe ParameterGroupStatus))
-> Cluster -> f Cluster
cluster_parameterGroup = (Cluster -> Maybe ParameterGroupStatus)
-> (Cluster -> Maybe ParameterGroupStatus -> Cluster)
-> Lens
     Cluster
     Cluster
     (Maybe ParameterGroupStatus)
     (Maybe ParameterGroupStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe ParameterGroupStatus
parameterGroup :: Maybe ParameterGroupStatus
$sel:parameterGroup:Cluster' :: Cluster -> Maybe ParameterGroupStatus
parameterGroup} -> Maybe ParameterGroupStatus
parameterGroup) (\s :: Cluster
s@Cluster' {} Maybe ParameterGroupStatus
a -> Cluster
s {$sel:parameterGroup:Cluster' :: Maybe ParameterGroupStatus
parameterGroup = Maybe ParameterGroupStatus
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 [SecurityGroupMembership]
-> Maybe NotificationConfiguration
-> Maybe [Text]
-> Maybe ClusterEndpointEncryptionType
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Node]
-> Maybe Endpoint
-> Maybe SSEDescription
-> Maybe Text
-> Maybe ParameterGroupStatus
-> Cluster
Cluster'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe [SecurityGroupMembership]
 -> Maybe NotificationConfiguration
 -> Maybe [Text]
 -> Maybe ClusterEndpointEncryptionType
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Node]
 -> Maybe Endpoint
 -> Maybe SSEDescription
 -> Maybe Text
 -> Maybe ParameterGroupStatus
 -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe [Text]
      -> Maybe ClusterEndpointEncryptionType
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> 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
"Status")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe [Text]
   -> Maybe ClusterEndpointEncryptionType
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe [Text]
      -> Maybe ClusterEndpointEncryptionType
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> 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
"IamRoleArn")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe [Text]
   -> Maybe ClusterEndpointEncryptionType
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe [Text]
      -> Maybe ClusterEndpointEncryptionType
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> 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 Int
   -> Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe [Text]
   -> Maybe ClusterEndpointEncryptionType
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe Int)
-> Parser
     (Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe [Text]
      -> Maybe ClusterEndpointEncryptionType
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> 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
"ActiveNodes")
            Parser
  (Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe [Text]
   -> Maybe ClusterEndpointEncryptionType
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe [SecurityGroupMembership])
-> Parser
     (Maybe NotificationConfiguration
      -> Maybe [Text]
      -> Maybe ClusterEndpointEncryptionType
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [SecurityGroupMembership]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SecurityGroups" Parser (Maybe (Maybe [SecurityGroupMembership]))
-> Maybe [SecurityGroupMembership]
-> Parser (Maybe [SecurityGroupMembership])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SecurityGroupMembership]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe NotificationConfiguration
   -> Maybe [Text]
   -> Maybe ClusterEndpointEncryptionType
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe NotificationConfiguration)
-> Parser
     (Maybe [Text]
      -> Maybe ClusterEndpointEncryptionType
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NotificationConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotificationConfiguration")
            Parser
  (Maybe [Text]
   -> Maybe ClusterEndpointEncryptionType
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe [Text])
-> Parser
     (Maybe ClusterEndpointEncryptionType
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> Cluster)
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
"NodeIdsToRemove"
                            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 ClusterEndpointEncryptionType
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe ClusterEndpointEncryptionType)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ClusterEndpointEncryptionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClusterEndpointEncryptionType")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> 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
"TotalNodes")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> 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
"PreferredMaintenanceWindow")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> 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
"SubnetGroup")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> 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
"ClusterName")
            Parser
  (Maybe Text
   -> Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Node]
      -> Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> 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
"NodeType")
            Parser
  (Maybe [Node]
   -> Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe [Node])
-> Parser
     (Maybe Endpoint
      -> Maybe SSEDescription
      -> Maybe Text
      -> Maybe ParameterGroupStatus
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Node]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Nodes" Parser (Maybe (Maybe [Node]))
-> Maybe [Node] -> Parser (Maybe [Node])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Node]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Endpoint
   -> Maybe SSEDescription
   -> Maybe Text
   -> Maybe ParameterGroupStatus
   -> Cluster)
-> Parser (Maybe Endpoint)
-> Parser
     (Maybe SSEDescription
      -> Maybe Text -> Maybe ParameterGroupStatus -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Endpoint)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClusterDiscoveryEndpoint")
            Parser
  (Maybe SSEDescription
   -> Maybe Text -> Maybe ParameterGroupStatus -> Cluster)
-> Parser (Maybe SSEDescription)
-> Parser (Maybe Text -> Maybe ParameterGroupStatus -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SSEDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SSEDescription")
            Parser (Maybe Text -> Maybe ParameterGroupStatus -> Cluster)
-> Parser (Maybe Text)
-> Parser (Maybe ParameterGroupStatus -> 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
"Description")
            Parser (Maybe ParameterGroupStatus -> Cluster)
-> Parser (Maybe ParameterGroupStatus) -> Parser Cluster
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ParameterGroupStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ParameterGroup")
      )

instance Prelude.Hashable Cluster

instance Prelude.NFData Cluster