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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MemoryDb.Types.AZStatus
import Amazonka.MemoryDb.Types.ClusterPendingUpdates
import Amazonka.MemoryDb.Types.Endpoint
import Amazonka.MemoryDb.Types.SecurityGroupMembership
import Amazonka.MemoryDb.Types.Shard
import qualified Amazonka.Prelude as Prelude

-- | Contains all of the attributes of a specific cluster.
--
-- /See:/ 'newCluster' smart constructor.
data Cluster = Cluster'
  { -- | The Redis engine version used by the cluster
    Cluster -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The status of the cluster. For example, Available, Updating, Creating.
    Cluster -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | When set to true, the cluster will automatically receive minor engine
    -- version upgrades after launch.
    Cluster -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the SNS notification topic
    Cluster -> Maybe Text
snsTopicArn :: Prelude.Maybe Prelude.Text,
    -- | A list of security groups used by the cluster
    Cluster -> Maybe [SecurityGroupMembership]
securityGroups :: Prelude.Maybe [SecurityGroupMembership],
    -- | Indicates if the cluster has a Multi-AZ configuration (multiaz) or not
    -- (singleaz).
    Cluster -> Maybe AZStatus
availabilityMode :: Prelude.Maybe AZStatus,
    -- | The status of the parameter group used by the cluster, for example
    -- \'active\' or \'applying\'.
    Cluster -> Maybe Text
parameterGroupStatus :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the cluster.
    Cluster -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | A group of settings that are currently being applied.
    Cluster -> Maybe ClusterPendingUpdates
pendingUpdates :: Prelude.Maybe ClusterPendingUpdates,
    -- | The number of shards in the cluster
    Cluster -> Maybe Int
numberOfShards :: Prelude.Maybe Prelude.Int,
    -- | The daily time range (in UTC) during which MemoryDB begins taking a
    -- daily snapshot of your shard. Example: 05:00-09:00 If you do not specify
    -- this parameter, MemoryDB automatically chooses an appropriate time
    -- range.
    Cluster -> Maybe Text
snapshotWindow :: Prelude.Maybe Prelude.Text,
    -- | The name of the subnet group used by the cluster
    Cluster -> Maybe Text
subnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | A flag to indicate if In-transit encryption is enabled
    Cluster -> Maybe Bool
tLSEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the weekly time range during which maintenance on the cluster
    -- is performed. It is specified as a range in the format
    -- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
    -- is a 60 minute period.
    Cluster -> Maybe Text
maintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The ID of the KMS key used to encrypt the cluster
    Cluster -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | A list of shards that are members of the cluster.
    Cluster -> Maybe [Shard]
shards :: Prelude.Maybe [Shard],
    -- | The user-supplied name of the cluster. This identifier is a unique key
    -- that identifies a cluster.
    Cluster -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Redis engine patch version used by the cluster
    Cluster -> Maybe Text
enginePatchVersion :: Prelude.Maybe Prelude.Text,
    -- | The number of days for which MemoryDB retains automatic snapshots before
    -- deleting them. For example, if you set SnapshotRetentionLimit to 5, a
    -- snapshot that was taken today is retained for 5 days before being
    -- deleted.
    Cluster -> Maybe Int
snapshotRetentionLimit :: Prelude.Maybe Prelude.Int,
    -- | The cluster\'s node type
    Cluster -> Maybe Text
nodeType :: Prelude.Maybe Prelude.Text,
    -- | The SNS topic must be in Active status to receive notifications
    Cluster -> Maybe Text
snsTopicStatus :: Prelude.Maybe Prelude.Text,
    -- | A description of the cluster
    Cluster -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of the Access Control List associated with this cluster.
    Cluster -> Maybe Text
aCLName :: Prelude.Maybe Prelude.Text,
    -- | The cluster\'s configuration endpoint
    Cluster -> Maybe Endpoint
clusterEndpoint :: Prelude.Maybe Endpoint,
    -- | The name of the parameter group used by the cluster
    Cluster -> Maybe Text
parameterGroupName :: Prelude.Maybe Prelude.Text
  }
  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:
--
-- 'engineVersion', 'cluster_engineVersion' - The Redis engine version used by the cluster
--
-- 'status', 'cluster_status' - The status of the cluster. For example, Available, Updating, Creating.
--
-- 'autoMinorVersionUpgrade', 'cluster_autoMinorVersionUpgrade' - When set to true, the cluster will automatically receive minor engine
-- version upgrades after launch.
--
-- 'snsTopicArn', 'cluster_snsTopicArn' - The Amazon Resource Name (ARN) of the SNS notification topic
--
-- 'securityGroups', 'cluster_securityGroups' - A list of security groups used by the cluster
--
-- 'availabilityMode', 'cluster_availabilityMode' - Indicates if the cluster has a Multi-AZ configuration (multiaz) or not
-- (singleaz).
--
-- 'parameterGroupStatus', 'cluster_parameterGroupStatus' - The status of the parameter group used by the cluster, for example
-- \'active\' or \'applying\'.
--
-- 'arn', 'cluster_arn' - The Amazon Resource Name (ARN) of the cluster.
--
-- 'pendingUpdates', 'cluster_pendingUpdates' - A group of settings that are currently being applied.
--
-- 'numberOfShards', 'cluster_numberOfShards' - The number of shards in the cluster
--
-- 'snapshotWindow', 'cluster_snapshotWindow' - The daily time range (in UTC) during which MemoryDB begins taking a
-- daily snapshot of your shard. Example: 05:00-09:00 If you do not specify
-- this parameter, MemoryDB automatically chooses an appropriate time
-- range.
--
-- 'subnetGroupName', 'cluster_subnetGroupName' - The name of the subnet group used by the cluster
--
-- 'tLSEnabled', 'cluster_tLSEnabled' - A flag to indicate if In-transit encryption is enabled
--
-- 'maintenanceWindow', 'cluster_maintenanceWindow' - Specifies the weekly time range during which maintenance on the cluster
-- is performed. It is specified as a range in the format
-- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
-- is a 60 minute period.
--
-- 'kmsKeyId', 'cluster_kmsKeyId' - The ID of the KMS key used to encrypt the cluster
--
-- 'shards', 'cluster_shards' - A list of shards that are members of the cluster.
--
-- 'name', 'cluster_name' - The user-supplied name of the cluster. This identifier is a unique key
-- that identifies a cluster.
--
-- 'enginePatchVersion', 'cluster_enginePatchVersion' - The Redis engine patch version used by the cluster
--
-- 'snapshotRetentionLimit', 'cluster_snapshotRetentionLimit' - The number of days for which MemoryDB retains automatic snapshots before
-- deleting them. For example, if you set SnapshotRetentionLimit to 5, a
-- snapshot that was taken today is retained for 5 days before being
-- deleted.
--
-- 'nodeType', 'cluster_nodeType' - The cluster\'s node type
--
-- 'snsTopicStatus', 'cluster_snsTopicStatus' - The SNS topic must be in Active status to receive notifications
--
-- 'description', 'cluster_description' - A description of the cluster
--
-- 'aCLName', 'cluster_aCLName' - The name of the Access Control List associated with this cluster.
--
-- 'clusterEndpoint', 'cluster_clusterEndpoint' - The cluster\'s configuration endpoint
--
-- 'parameterGroupName', 'cluster_parameterGroupName' - The name of the parameter group used by the cluster
newCluster ::
  Cluster
newCluster :: Cluster
newCluster =
  Cluster' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [SecurityGroupMembership]
-> Maybe AZStatus
-> Maybe Text
-> Maybe Text
-> Maybe ClusterPendingUpdates
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Endpoint
-> Maybe Text
-> Cluster
Cluster'
    { $sel:engineVersion:Cluster' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:Cluster' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:autoMinorVersionUpgrade:Cluster' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopicArn:Cluster' :: Maybe Text
snsTopicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroups:Cluster' :: Maybe [SecurityGroupMembership]
securityGroups = Maybe [SecurityGroupMembership]
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityMode:Cluster' :: Maybe AZStatus
availabilityMode = Maybe AZStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroupStatus:Cluster' :: Maybe Text
parameterGroupStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Cluster' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingUpdates:Cluster' :: Maybe ClusterPendingUpdates
pendingUpdates = Maybe ClusterPendingUpdates
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfShards:Cluster' :: Maybe Int
numberOfShards = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotWindow:Cluster' :: Maybe Text
snapshotWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:subnetGroupName:Cluster' :: Maybe Text
subnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tLSEnabled:Cluster' :: Maybe Bool
tLSEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:maintenanceWindow:Cluster' :: Maybe Text
maintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:Cluster' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:shards:Cluster' :: Maybe [Shard]
shards = Maybe [Shard]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Cluster' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enginePatchVersion:Cluster' :: Maybe Text
enginePatchVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotRetentionLimit:Cluster' :: Maybe Int
snapshotRetentionLimit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeType:Cluster' :: Maybe Text
nodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopicStatus:Cluster' :: Maybe Text
snsTopicStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Cluster' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:aCLName:Cluster' :: Maybe Text
aCLName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterEndpoint:Cluster' :: Maybe Endpoint
clusterEndpoint = Maybe Endpoint
forall a. Maybe a
Prelude.Nothing,
      $sel:parameterGroupName:Cluster' :: Maybe Text
parameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The Redis engine version used by the cluster
cluster_engineVersion :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_engineVersion :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_engineVersion = (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
engineVersion :: Maybe Text
$sel:engineVersion:Cluster' :: Cluster -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:engineVersion:Cluster' :: Maybe Text
engineVersion = Maybe Text
a} :: Cluster)

-- | The status of the cluster. For example, Available, Updating, Creating.
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)

-- | When set to true, the cluster will automatically receive minor engine
-- version upgrades after launch.
cluster_autoMinorVersionUpgrade :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Bool)
cluster_autoMinorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool)) -> Cluster -> f Cluster
cluster_autoMinorVersionUpgrade = (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
autoMinorVersionUpgrade :: Maybe Bool
$sel:autoMinorVersionUpgrade:Cluster' :: Cluster -> Maybe Bool
autoMinorVersionUpgrade} -> Maybe Bool
autoMinorVersionUpgrade) (\s :: Cluster
s@Cluster' {} Maybe Bool
a -> Cluster
s {$sel:autoMinorVersionUpgrade:Cluster' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
a} :: Cluster)

-- | The Amazon Resource Name (ARN) of the SNS notification topic
cluster_snsTopicArn :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_snsTopicArn :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_snsTopicArn = (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
snsTopicArn :: Maybe Text
$sel:snsTopicArn:Cluster' :: Cluster -> Maybe Text
snsTopicArn} -> Maybe Text
snsTopicArn) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:snsTopicArn:Cluster' :: Maybe Text
snsTopicArn = Maybe Text
a} :: Cluster)

-- | A list of security groups used by 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

-- | Indicates if the cluster has a Multi-AZ configuration (multiaz) or not
-- (singleaz).
cluster_availabilityMode :: Lens.Lens' Cluster (Prelude.Maybe AZStatus)
cluster_availabilityMode :: (Maybe AZStatus -> f (Maybe AZStatus)) -> Cluster -> f Cluster
cluster_availabilityMode = (Cluster -> Maybe AZStatus)
-> (Cluster -> Maybe AZStatus -> Cluster)
-> Lens Cluster Cluster (Maybe AZStatus) (Maybe AZStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe AZStatus
availabilityMode :: Maybe AZStatus
$sel:availabilityMode:Cluster' :: Cluster -> Maybe AZStatus
availabilityMode} -> Maybe AZStatus
availabilityMode) (\s :: Cluster
s@Cluster' {} Maybe AZStatus
a -> Cluster
s {$sel:availabilityMode:Cluster' :: Maybe AZStatus
availabilityMode = Maybe AZStatus
a} :: Cluster)

-- | The status of the parameter group used by the cluster, for example
-- \'active\' or \'applying\'.
cluster_parameterGroupStatus :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_parameterGroupStatus :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_parameterGroupStatus = (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
parameterGroupStatus :: Maybe Text
$sel:parameterGroupStatus:Cluster' :: Cluster -> Maybe Text
parameterGroupStatus} -> Maybe Text
parameterGroupStatus) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:parameterGroupStatus:Cluster' :: Maybe Text
parameterGroupStatus = Maybe Text
a} :: Cluster)

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

-- | A group of settings that are currently being applied.
cluster_pendingUpdates :: Lens.Lens' Cluster (Prelude.Maybe ClusterPendingUpdates)
cluster_pendingUpdates :: (Maybe ClusterPendingUpdates -> f (Maybe ClusterPendingUpdates))
-> Cluster -> f Cluster
cluster_pendingUpdates = (Cluster -> Maybe ClusterPendingUpdates)
-> (Cluster -> Maybe ClusterPendingUpdates -> Cluster)
-> Lens
     Cluster
     Cluster
     (Maybe ClusterPendingUpdates)
     (Maybe ClusterPendingUpdates)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Cluster' {Maybe ClusterPendingUpdates
pendingUpdates :: Maybe ClusterPendingUpdates
$sel:pendingUpdates:Cluster' :: Cluster -> Maybe ClusterPendingUpdates
pendingUpdates} -> Maybe ClusterPendingUpdates
pendingUpdates) (\s :: Cluster
s@Cluster' {} Maybe ClusterPendingUpdates
a -> Cluster
s {$sel:pendingUpdates:Cluster' :: Maybe ClusterPendingUpdates
pendingUpdates = Maybe ClusterPendingUpdates
a} :: Cluster)

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

-- | The daily time range (in UTC) during which MemoryDB begins taking a
-- daily snapshot of your shard. Example: 05:00-09:00 If you do not specify
-- this parameter, MemoryDB automatically chooses an appropriate time
-- range.
cluster_snapshotWindow :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_snapshotWindow :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_snapshotWindow = (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
snapshotWindow :: Maybe Text
$sel:snapshotWindow:Cluster' :: Cluster -> Maybe Text
snapshotWindow} -> Maybe Text
snapshotWindow) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:snapshotWindow:Cluster' :: Maybe Text
snapshotWindow = Maybe Text
a} :: Cluster)

-- | The name of the subnet group used by the cluster
cluster_subnetGroupName :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_subnetGroupName :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_subnetGroupName = (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
subnetGroupName :: Maybe Text
$sel:subnetGroupName:Cluster' :: Cluster -> Maybe Text
subnetGroupName} -> Maybe Text
subnetGroupName) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:subnetGroupName:Cluster' :: Maybe Text
subnetGroupName = Maybe Text
a} :: Cluster)

-- | A flag to indicate if In-transit encryption is enabled
cluster_tLSEnabled :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Bool)
cluster_tLSEnabled :: (Maybe Bool -> f (Maybe Bool)) -> Cluster -> f Cluster
cluster_tLSEnabled = (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
tLSEnabled :: Maybe Bool
$sel:tLSEnabled:Cluster' :: Cluster -> Maybe Bool
tLSEnabled} -> Maybe Bool
tLSEnabled) (\s :: Cluster
s@Cluster' {} Maybe Bool
a -> Cluster
s {$sel:tLSEnabled:Cluster' :: Maybe Bool
tLSEnabled = Maybe Bool
a} :: Cluster)

-- | Specifies the weekly time range during which maintenance on the cluster
-- is performed. It is specified as a range in the format
-- ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window
-- is a 60 minute period.
cluster_maintenanceWindow :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_maintenanceWindow :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_maintenanceWindow = (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
maintenanceWindow :: Maybe Text
$sel:maintenanceWindow:Cluster' :: Cluster -> Maybe Text
maintenanceWindow} -> Maybe Text
maintenanceWindow) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:maintenanceWindow:Cluster' :: Maybe Text
maintenanceWindow = Maybe Text
a} :: Cluster)

-- | The ID of the KMS key used to encrypt the cluster
cluster_kmsKeyId :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_kmsKeyId :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_kmsKeyId = (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
kmsKeyId :: Maybe Text
$sel:kmsKeyId:Cluster' :: Cluster -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:kmsKeyId:Cluster' :: Maybe Text
kmsKeyId = Maybe Text
a} :: Cluster)

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

-- | The user-supplied name of the cluster. This identifier is a unique key
-- that identifies a cluster.
cluster_name :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_name :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_name = (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
name :: Maybe Text
$sel:name:Cluster' :: Cluster -> Maybe Text
name} -> Maybe Text
name) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:name:Cluster' :: Maybe Text
name = Maybe Text
a} :: Cluster)

-- | The Redis engine patch version used by the cluster
cluster_enginePatchVersion :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_enginePatchVersion :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_enginePatchVersion = (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
enginePatchVersion :: Maybe Text
$sel:enginePatchVersion:Cluster' :: Cluster -> Maybe Text
enginePatchVersion} -> Maybe Text
enginePatchVersion) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:enginePatchVersion:Cluster' :: Maybe Text
enginePatchVersion = Maybe Text
a} :: Cluster)

-- | The number of days for which MemoryDB retains automatic snapshots before
-- deleting them. For example, if you set SnapshotRetentionLimit to 5, a
-- snapshot that was taken today is retained for 5 days before being
-- deleted.
cluster_snapshotRetentionLimit :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Int)
cluster_snapshotRetentionLimit :: (Maybe Int -> f (Maybe Int)) -> Cluster -> f Cluster
cluster_snapshotRetentionLimit = (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
snapshotRetentionLimit :: Maybe Int
$sel:snapshotRetentionLimit:Cluster' :: Cluster -> Maybe Int
snapshotRetentionLimit} -> Maybe Int
snapshotRetentionLimit) (\s :: Cluster
s@Cluster' {} Maybe Int
a -> Cluster
s {$sel:snapshotRetentionLimit:Cluster' :: Maybe Int
snapshotRetentionLimit = Maybe Int
a} :: Cluster)

-- | The cluster\'s node 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)

-- | The SNS topic must be in Active status to receive notifications
cluster_snsTopicStatus :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_snsTopicStatus :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_snsTopicStatus = (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
snsTopicStatus :: Maybe Text
$sel:snsTopicStatus:Cluster' :: Cluster -> Maybe Text
snsTopicStatus} -> Maybe Text
snsTopicStatus) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:snsTopicStatus:Cluster' :: Maybe Text
snsTopicStatus = Maybe Text
a} :: Cluster)

-- | A 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 name of the Access Control List associated with this cluster.
cluster_aCLName :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_aCLName :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_aCLName = (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
aCLName :: Maybe Text
$sel:aCLName:Cluster' :: Cluster -> Maybe Text
aCLName} -> Maybe Text
aCLName) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:aCLName:Cluster' :: Maybe Text
aCLName = Maybe Text
a} :: Cluster)

-- | The cluster\'s configuration endpoint
cluster_clusterEndpoint :: Lens.Lens' Cluster (Prelude.Maybe Endpoint)
cluster_clusterEndpoint :: (Maybe Endpoint -> f (Maybe Endpoint)) -> Cluster -> f Cluster
cluster_clusterEndpoint = (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
clusterEndpoint :: Maybe Endpoint
$sel:clusterEndpoint:Cluster' :: Cluster -> Maybe Endpoint
clusterEndpoint} -> Maybe Endpoint
clusterEndpoint) (\s :: Cluster
s@Cluster' {} Maybe Endpoint
a -> Cluster
s {$sel:clusterEndpoint:Cluster' :: Maybe Endpoint
clusterEndpoint = Maybe Endpoint
a} :: Cluster)

-- | The name of the parameter group used by the cluster
cluster_parameterGroupName :: Lens.Lens' Cluster (Prelude.Maybe Prelude.Text)
cluster_parameterGroupName :: (Maybe Text -> f (Maybe Text)) -> Cluster -> f Cluster
cluster_parameterGroupName = (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
parameterGroupName :: Maybe Text
$sel:parameterGroupName:Cluster' :: Cluster -> Maybe Text
parameterGroupName} -> Maybe Text
parameterGroupName) (\s :: Cluster
s@Cluster' {} Maybe Text
a -> Cluster
s {$sel:parameterGroupName:Cluster' :: Maybe Text
parameterGroupName = Maybe Text
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 Bool
-> Maybe Text
-> Maybe [SecurityGroupMembership]
-> Maybe AZStatus
-> Maybe Text
-> Maybe Text
-> Maybe ClusterPendingUpdates
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Shard]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Endpoint
-> Maybe Text
-> Cluster
Cluster'
            (Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe [SecurityGroupMembership]
 -> Maybe AZStatus
 -> Maybe Text
 -> Maybe Text
 -> Maybe ClusterPendingUpdates
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Shard]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Endpoint
 -> Maybe Text
 -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [SecurityGroupMembership]
      -> Maybe AZStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ClusterPendingUpdates
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"EngineVersion")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [SecurityGroupMembership]
   -> Maybe AZStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ClusterPendingUpdates
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe [SecurityGroupMembership]
      -> Maybe AZStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ClusterPendingUpdates
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"Status")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe [SecurityGroupMembership]
   -> Maybe AZStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ClusterPendingUpdates
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe [SecurityGroupMembership]
      -> Maybe AZStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ClusterPendingUpdates
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"AutoMinorVersionUpgrade")
            Parser
  (Maybe Text
   -> Maybe [SecurityGroupMembership]
   -> Maybe AZStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ClusterPendingUpdates
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe [SecurityGroupMembership]
      -> Maybe AZStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ClusterPendingUpdates
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"SnsTopicArn")
            Parser
  (Maybe [SecurityGroupMembership]
   -> Maybe AZStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ClusterPendingUpdates
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe [SecurityGroupMembership])
-> Parser
     (Maybe AZStatus
      -> Maybe Text
      -> Maybe Text
      -> Maybe ClusterPendingUpdates
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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 AZStatus
   -> Maybe Text
   -> Maybe Text
   -> Maybe ClusterPendingUpdates
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe AZStatus)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ClusterPendingUpdates
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AZStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AvailabilityMode")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ClusterPendingUpdates
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ClusterPendingUpdates
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"ParameterGroupStatus")
            Parser
  (Maybe Text
   -> Maybe ClusterPendingUpdates
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe ClusterPendingUpdates
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"ARN")
            Parser
  (Maybe ClusterPendingUpdates
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe ClusterPendingUpdates)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ClusterPendingUpdates)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PendingUpdates")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"NumberOfShards")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"SnapshotWindow")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"SubnetGroupName")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"TLSEnabled")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"MaintenanceWindow")
            Parser
  (Maybe Text
   -> Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Shard]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"KmsKeyId")
            Parser
  (Maybe [Shard]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe [Shard])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> Cluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Shard]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Shards" Parser (Maybe (Maybe [Shard]))
-> Maybe [Shard] -> Parser (Maybe [Shard])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Shard]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"Name")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"EnginePatchVersion")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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
"SnapshotRetentionLimit")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Endpoint
      -> Maybe Text
      -> 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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Endpoint
   -> Maybe Text
   -> Cluster)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Endpoint -> Maybe Text -> 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
"SnsTopicStatus")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Endpoint -> Maybe Text -> Cluster)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Endpoint -> Maybe Text -> 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 Text -> Maybe Endpoint -> Maybe Text -> Cluster)
-> Parser (Maybe Text)
-> Parser (Maybe Endpoint -> Maybe Text -> 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
"ACLName")
            Parser (Maybe Endpoint -> Maybe Text -> Cluster)
-> Parser (Maybe Endpoint) -> Parser (Maybe Text -> 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
"ClusterEndpoint")
            Parser (Maybe Text -> Cluster)
-> Parser (Maybe Text) -> Parser 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
"ParameterGroupName")
      )

instance Prelude.Hashable Cluster

instance Prelude.NFData Cluster