{-# 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.ElastiCache.Types.CacheCluster
-- 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.ElastiCache.Types.CacheCluster where

import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.CacheNode
import Amazonka.ElastiCache.Types.CacheParameterGroupStatus
import Amazonka.ElastiCache.Types.CacheSecurityGroupMembership
import Amazonka.ElastiCache.Types.Endpoint
import Amazonka.ElastiCache.Types.LogDeliveryConfiguration
import Amazonka.ElastiCache.Types.NotificationConfiguration
import Amazonka.ElastiCache.Types.PendingModifiedValues
import Amazonka.ElastiCache.Types.SecurityGroupMembership
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Contains all of the attributes of a specific cluster.
--
-- /See:/ 'newCacheCluster' smart constructor.
data CacheCluster = CacheCluster'
  { -- | The date the auth token was last modified
    CacheCluster -> Maybe ISO8601
authTokenLastModifiedDate :: Prelude.Maybe Core.ISO8601,
    -- | The version of the cache engine that is used in this cluster.
    CacheCluster -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the compute and memory capacity node type for the cluster.
    --
    -- The following node types are supported by ElastiCache. Generally
    -- speaking, the current generation types provide more memory and
    -- computational power at lower cost when compared to their equivalent
    -- previous generation counterparts.
    --
    -- -   General purpose:
    --
    --     -   Current generation:
    --
    --         __M6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward).
    --
    --         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
    --         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
    --         @cache.m6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
    --         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
    --         @cache.m5.24xlarge@
    --
    --         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
    --         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
    --
    --         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
    --         @cache.t3.medium@
    --
    --         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
    --         @cache.t2.medium@
    --
    --     -   Previous generation: (not recommended)
    --
    --         __T1 node types:__ @cache.t1.micro@
    --
    --         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
    --         @cache.m1.large@, @cache.m1.xlarge@
    --
    --         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
    --         @cache.m3.xlarge@, @cache.m3.2xlarge@
    --
    -- -   Compute optimized:
    --
    --     -   Previous generation: (not recommended)
    --
    --         __C1 node types:__ @cache.c1.xlarge@
    --
    -- -   Memory optimized:
    --
    --     -   Current generation:
    --
    --         __R6g node types__ (available only for Redis engine version
    --         5.0.6 onward and for Memcached engine version 1.5.16 onward).
    --
    --         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
    --         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
    --         @cache.r6g.16xlarge@
    --
    --         For region availability, see
    --         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
    --
    --         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
    --         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
    --         @cache.r5.24xlarge@
    --
    --         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
    --         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
    --         @cache.r4.16xlarge@
    --
    --     -   Previous generation: (not recommended)
    --
    --         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
    --         @cache.m2.4xlarge@
    --
    --         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
    --         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
    --
    -- __Additional node type info__
    --
    -- -   All current generation instance types are created in Amazon VPC by
    --     default.
    --
    -- -   Redis append-only files (AOF) are not supported for T1 or T2
    --     instances.
    --
    -- -   Redis Multi-AZ with automatic failover is not supported on T1
    --     instances.
    --
    -- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
    --     supported on Redis version 2.8.22 and later.
    CacheCluster -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
    -- | A list of cache nodes that are members of the cluster.
    CacheCluster -> Maybe [CacheNode]
cacheNodes :: Prelude.Maybe [CacheNode],
    -- | The date and time when the cluster was created.
    CacheCluster -> Maybe ISO8601
cacheClusterCreateTime :: Prelude.Maybe Core.ISO8601,
    -- | A flag that enables encryption at-rest when set to @true@.
    --
    -- You cannot modify the value of @AtRestEncryptionEnabled@ after the
    -- cluster is created. To enable at-rest encryption on a cluster you must
    -- set @AtRestEncryptionEnabled@ to @true@ when you create a cluster.
    --
    -- __Required:__ Only available when creating a replication group in an
    -- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
    --
    -- Default: @false@
    CacheCluster -> Maybe Bool
atRestEncryptionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | This parameter is currently disabled.
    CacheCluster -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | A list of VPC Security Groups associated with the cluster.
    CacheCluster -> Maybe [SecurityGroupMembership]
securityGroups :: Prelude.Maybe [SecurityGroupMembership],
    -- | Describes a notification topic and its status. Notification topics are
    -- used for publishing ElastiCache events to subscribers using Amazon
    -- Simple Notification Service (SNS).
    CacheCluster -> Maybe NotificationConfiguration
notificationConfiguration :: Prelude.Maybe NotificationConfiguration,
    -- | The ARN (Amazon Resource Name) of the cache cluster.
    CacheCluster -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | A flag that enables in-transit encryption when set to @true@.
    --
    -- You cannot modify the value of @TransitEncryptionEnabled@ after the
    -- cluster is created. To enable in-transit encryption on a cluster you
    -- must set @TransitEncryptionEnabled@ to @true@ when you create a cluster.
    --
    -- __Required:__ Only available when creating a replication group in an
    -- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
    --
    -- Default: @false@
    CacheCluster -> Maybe Bool
transitEncryptionEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The daily time range (in UTC) during which ElastiCache begins taking a
    -- daily snapshot of your cluster.
    --
    -- Example: @05:00-09:00@
    CacheCluster -> Maybe Text
snapshotWindow :: Prelude.Maybe Prelude.Text,
    -- | The user-supplied identifier of the cluster. This identifier is a unique
    -- key that identifies a cluster.
    CacheCluster -> Maybe Text
cacheClusterId :: Prelude.Maybe Prelude.Text,
    -- | Returns the destination, format and type of the logs.
    CacheCluster -> Maybe [LogDeliveryConfiguration]
logDeliveryConfigurations :: Prelude.Maybe [LogDeliveryConfiguration],
    -- | Represents a Memcached cluster endpoint which can be used by an
    -- application to connect to any node in the cluster. The configuration
    -- endpoint will always have @.cfg@ in it.
    --
    -- Example: @mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211@
    CacheCluster -> Maybe Endpoint
configurationEndpoint :: Prelude.Maybe Endpoint,
    -- | The name of the cache engine (@memcached@ or @redis@) to be used for
    -- this cluster.
    CacheCluster -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
    -- | A list of cache security group elements, composed of name and status
    -- sub-elements.
    CacheCluster -> Maybe [CacheSecurityGroupMembership]
cacheSecurityGroups :: Prelude.Maybe [CacheSecurityGroupMembership],
    -- | A boolean value indicating whether log delivery is enabled for the
    -- replication group.
    CacheCluster -> Maybe Bool
replicationGroupLogDeliveryEnabled :: Prelude.Maybe Prelude.Bool,
    -- | A flag that enables using an @AuthToken@ (password) when issuing Redis
    -- commands.
    --
    -- Default: @false@
    CacheCluster -> Maybe Bool
authTokenEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The URL of the web page where you can download the latest ElastiCache
    -- client library.
    CacheCluster -> Maybe Text
clientDownloadLandingPage :: Prelude.Maybe Prelude.Text,
    -- | 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.
    --
    -- Valid values for @ddd@ are:
    --
    -- -   @sun@
    --
    -- -   @mon@
    --
    -- -   @tue@
    --
    -- -   @wed@
    --
    -- -   @thu@
    --
    -- -   @fri@
    --
    -- -   @sat@
    --
    -- Example: @sun:23:00-mon:01:30@
    CacheCluster -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The name of the cache subnet group associated with the cluster.
    CacheCluster -> Maybe Text
cacheSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | The name of the Availability Zone in which the cluster is located or
    -- \"Multiple\" if the cache nodes are located in different Availability
    -- Zones.
    CacheCluster -> Maybe Text
preferredAvailabilityZone :: Prelude.Maybe Prelude.Text,
    -- | Status of the cache parameter group.
    CacheCluster -> Maybe CacheParameterGroupStatus
cacheParameterGroup :: Prelude.Maybe CacheParameterGroupStatus,
    -- | The current state of this cluster, one of the following values:
    -- @available@, @creating@, @deleted@, @deleting@, @incompatible-network@,
    -- @modifying@, @rebooting cluster nodes@, @restore-failed@, or
    -- @snapshotting@.
    CacheCluster -> Maybe Text
cacheClusterStatus :: Prelude.Maybe Prelude.Text,
    -- | The number of days for which ElastiCache retains automatic cluster
    -- 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.
    --
    -- If the value of SnapshotRetentionLimit is set to zero (0), backups are
    -- turned off.
    CacheCluster -> Maybe Int
snapshotRetentionLimit :: Prelude.Maybe Prelude.Int,
    -- | The outpost ARN in which the cache cluster is created.
    CacheCluster -> Maybe Text
preferredOutpostArn :: Prelude.Maybe Prelude.Text,
    -- | The replication group to which this cluster belongs. If this field is
    -- empty, the cluster is not associated with any replication group.
    CacheCluster -> Maybe Text
replicationGroupId :: Prelude.Maybe Prelude.Text,
    CacheCluster -> Maybe PendingModifiedValues
pendingModifiedValues :: Prelude.Maybe PendingModifiedValues,
    -- | The number of cache nodes in the cluster.
    --
    -- For clusters running Redis, this value must be 1. For clusters running
    -- Memcached, this value must be between 1 and 40.
    CacheCluster -> Maybe Int
numCacheNodes :: Prelude.Maybe Prelude.Int
  }
  deriving (CacheCluster -> CacheCluster -> Bool
(CacheCluster -> CacheCluster -> Bool)
-> (CacheCluster -> CacheCluster -> Bool) -> Eq CacheCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheCluster -> CacheCluster -> Bool
$c/= :: CacheCluster -> CacheCluster -> Bool
== :: CacheCluster -> CacheCluster -> Bool
$c== :: CacheCluster -> CacheCluster -> Bool
Prelude.Eq, ReadPrec [CacheCluster]
ReadPrec CacheCluster
Int -> ReadS CacheCluster
ReadS [CacheCluster]
(Int -> ReadS CacheCluster)
-> ReadS [CacheCluster]
-> ReadPrec CacheCluster
-> ReadPrec [CacheCluster]
-> Read CacheCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CacheCluster]
$creadListPrec :: ReadPrec [CacheCluster]
readPrec :: ReadPrec CacheCluster
$creadPrec :: ReadPrec CacheCluster
readList :: ReadS [CacheCluster]
$creadList :: ReadS [CacheCluster]
readsPrec :: Int -> ReadS CacheCluster
$creadsPrec :: Int -> ReadS CacheCluster
Prelude.Read, Int -> CacheCluster -> ShowS
[CacheCluster] -> ShowS
CacheCluster -> String
(Int -> CacheCluster -> ShowS)
-> (CacheCluster -> String)
-> ([CacheCluster] -> ShowS)
-> Show CacheCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheCluster] -> ShowS
$cshowList :: [CacheCluster] -> ShowS
show :: CacheCluster -> String
$cshow :: CacheCluster -> String
showsPrec :: Int -> CacheCluster -> ShowS
$cshowsPrec :: Int -> CacheCluster -> ShowS
Prelude.Show, (forall x. CacheCluster -> Rep CacheCluster x)
-> (forall x. Rep CacheCluster x -> CacheCluster)
-> Generic CacheCluster
forall x. Rep CacheCluster x -> CacheCluster
forall x. CacheCluster -> Rep CacheCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CacheCluster x -> CacheCluster
$cfrom :: forall x. CacheCluster -> Rep CacheCluster x
Prelude.Generic)

-- |
-- Create a value of 'CacheCluster' 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:
--
-- 'authTokenLastModifiedDate', 'cacheCluster_authTokenLastModifiedDate' - The date the auth token was last modified
--
-- 'engineVersion', 'cacheCluster_engineVersion' - The version of the cache engine that is used in this cluster.
--
-- 'cacheNodeType', 'cacheCluster_cacheNodeType' - The name of the compute and memory capacity node type for the cluster.
--
-- The following node types are supported by ElastiCache. Generally
-- speaking, the current generation types provide more memory and
-- computational power at lower cost when compared to their equivalent
-- previous generation counterparts.
--
-- -   General purpose:
--
--     -   Current generation:
--
--         __M6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
--         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
--         @cache.m6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
--         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
--         @cache.m5.24xlarge@
--
--         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
--         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
--
--         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
--         @cache.t3.medium@
--
--         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
--         @cache.t2.medium@
--
--     -   Previous generation: (not recommended)
--
--         __T1 node types:__ @cache.t1.micro@
--
--         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
--         @cache.m1.large@, @cache.m1.xlarge@
--
--         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
--         @cache.m3.xlarge@, @cache.m3.2xlarge@
--
-- -   Compute optimized:
--
--     -   Previous generation: (not recommended)
--
--         __C1 node types:__ @cache.c1.xlarge@
--
-- -   Memory optimized:
--
--     -   Current generation:
--
--         __R6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
--         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
--         @cache.r6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
--         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
--         @cache.r5.24xlarge@
--
--         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
--         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
--         @cache.r4.16xlarge@
--
--     -   Previous generation: (not recommended)
--
--         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
--         @cache.m2.4xlarge@
--
--         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
--         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
--
-- __Additional node type info__
--
-- -   All current generation instance types are created in Amazon VPC by
--     default.
--
-- -   Redis append-only files (AOF) are not supported for T1 or T2
--     instances.
--
-- -   Redis Multi-AZ with automatic failover is not supported on T1
--     instances.
--
-- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
--     supported on Redis version 2.8.22 and later.
--
-- 'cacheNodes', 'cacheCluster_cacheNodes' - A list of cache nodes that are members of the cluster.
--
-- 'cacheClusterCreateTime', 'cacheCluster_cacheClusterCreateTime' - The date and time when the cluster was created.
--
-- 'atRestEncryptionEnabled', 'cacheCluster_atRestEncryptionEnabled' - A flag that enables encryption at-rest when set to @true@.
--
-- You cannot modify the value of @AtRestEncryptionEnabled@ after the
-- cluster is created. To enable at-rest encryption on a cluster you must
-- set @AtRestEncryptionEnabled@ to @true@ when you create a cluster.
--
-- __Required:__ Only available when creating a replication group in an
-- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
--
-- Default: @false@
--
-- 'autoMinorVersionUpgrade', 'cacheCluster_autoMinorVersionUpgrade' - This parameter is currently disabled.
--
-- 'securityGroups', 'cacheCluster_securityGroups' - A list of VPC Security Groups associated with the cluster.
--
-- 'notificationConfiguration', 'cacheCluster_notificationConfiguration' - Describes a notification topic and its status. Notification topics are
-- used for publishing ElastiCache events to subscribers using Amazon
-- Simple Notification Service (SNS).
--
-- 'arn', 'cacheCluster_arn' - The ARN (Amazon Resource Name) of the cache cluster.
--
-- 'transitEncryptionEnabled', 'cacheCluster_transitEncryptionEnabled' - A flag that enables in-transit encryption when set to @true@.
--
-- You cannot modify the value of @TransitEncryptionEnabled@ after the
-- cluster is created. To enable in-transit encryption on a cluster you
-- must set @TransitEncryptionEnabled@ to @true@ when you create a cluster.
--
-- __Required:__ Only available when creating a replication group in an
-- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
--
-- Default: @false@
--
-- 'snapshotWindow', 'cacheCluster_snapshotWindow' - The daily time range (in UTC) during which ElastiCache begins taking a
-- daily snapshot of your cluster.
--
-- Example: @05:00-09:00@
--
-- 'cacheClusterId', 'cacheCluster_cacheClusterId' - The user-supplied identifier of the cluster. This identifier is a unique
-- key that identifies a cluster.
--
-- 'logDeliveryConfigurations', 'cacheCluster_logDeliveryConfigurations' - Returns the destination, format and type of the logs.
--
-- 'configurationEndpoint', 'cacheCluster_configurationEndpoint' - Represents a Memcached cluster endpoint which can be used by an
-- application to connect to any node in the cluster. The configuration
-- endpoint will always have @.cfg@ in it.
--
-- Example: @mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211@
--
-- 'engine', 'cacheCluster_engine' - The name of the cache engine (@memcached@ or @redis@) to be used for
-- this cluster.
--
-- 'cacheSecurityGroups', 'cacheCluster_cacheSecurityGroups' - A list of cache security group elements, composed of name and status
-- sub-elements.
--
-- 'replicationGroupLogDeliveryEnabled', 'cacheCluster_replicationGroupLogDeliveryEnabled' - A boolean value indicating whether log delivery is enabled for the
-- replication group.
--
-- 'authTokenEnabled', 'cacheCluster_authTokenEnabled' - A flag that enables using an @AuthToken@ (password) when issuing Redis
-- commands.
--
-- Default: @false@
--
-- 'clientDownloadLandingPage', 'cacheCluster_clientDownloadLandingPage' - The URL of the web page where you can download the latest ElastiCache
-- client library.
--
-- 'preferredMaintenanceWindow', 'cacheCluster_preferredMaintenanceWindow' - 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.
--
-- Valid values for @ddd@ are:
--
-- -   @sun@
--
-- -   @mon@
--
-- -   @tue@
--
-- -   @wed@
--
-- -   @thu@
--
-- -   @fri@
--
-- -   @sat@
--
-- Example: @sun:23:00-mon:01:30@
--
-- 'cacheSubnetGroupName', 'cacheCluster_cacheSubnetGroupName' - The name of the cache subnet group associated with the cluster.
--
-- 'preferredAvailabilityZone', 'cacheCluster_preferredAvailabilityZone' - The name of the Availability Zone in which the cluster is located or
-- \"Multiple\" if the cache nodes are located in different Availability
-- Zones.
--
-- 'cacheParameterGroup', 'cacheCluster_cacheParameterGroup' - Status of the cache parameter group.
--
-- 'cacheClusterStatus', 'cacheCluster_cacheClusterStatus' - The current state of this cluster, one of the following values:
-- @available@, @creating@, @deleted@, @deleting@, @incompatible-network@,
-- @modifying@, @rebooting cluster nodes@, @restore-failed@, or
-- @snapshotting@.
--
-- 'snapshotRetentionLimit', 'cacheCluster_snapshotRetentionLimit' - The number of days for which ElastiCache retains automatic cluster
-- 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.
--
-- If the value of SnapshotRetentionLimit is set to zero (0), backups are
-- turned off.
--
-- 'preferredOutpostArn', 'cacheCluster_preferredOutpostArn' - The outpost ARN in which the cache cluster is created.
--
-- 'replicationGroupId', 'cacheCluster_replicationGroupId' - The replication group to which this cluster belongs. If this field is
-- empty, the cluster is not associated with any replication group.
--
-- 'pendingModifiedValues', 'cacheCluster_pendingModifiedValues' - Undocumented member.
--
-- 'numCacheNodes', 'cacheCluster_numCacheNodes' - The number of cache nodes in the cluster.
--
-- For clusters running Redis, this value must be 1. For clusters running
-- Memcached, this value must be between 1 and 40.
newCacheCluster ::
  CacheCluster
newCacheCluster :: CacheCluster
newCacheCluster =
  CacheCluster' :: Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe [CacheNode]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Bool
-> Maybe [SecurityGroupMembership]
-> Maybe NotificationConfiguration
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [LogDeliveryConfiguration]
-> Maybe Endpoint
-> Maybe Text
-> Maybe [CacheSecurityGroupMembership]
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe CacheParameterGroupStatus
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe PendingModifiedValues
-> Maybe Int
-> CacheCluster
CacheCluster'
    { $sel:authTokenLastModifiedDate:CacheCluster' :: Maybe ISO8601
authTokenLastModifiedDate =
        Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:engineVersion:CacheCluster' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodeType:CacheCluster' :: Maybe Text
cacheNodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodes:CacheCluster' :: Maybe [CacheNode]
cacheNodes = Maybe [CacheNode]
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheClusterCreateTime:CacheCluster' :: Maybe ISO8601
cacheClusterCreateTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:atRestEncryptionEnabled:CacheCluster' :: Maybe Bool
atRestEncryptionEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:autoMinorVersionUpgrade:CacheCluster' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroups:CacheCluster' :: Maybe [SecurityGroupMembership]
securityGroups = Maybe [SecurityGroupMembership]
forall a. Maybe a
Prelude.Nothing,
      $sel:notificationConfiguration:CacheCluster' :: Maybe NotificationConfiguration
notificationConfiguration = Maybe NotificationConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CacheCluster' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:transitEncryptionEnabled:CacheCluster' :: Maybe Bool
transitEncryptionEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotWindow:CacheCluster' :: Maybe Text
snapshotWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheClusterId:CacheCluster' :: Maybe Text
cacheClusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logDeliveryConfigurations:CacheCluster' :: Maybe [LogDeliveryConfiguration]
logDeliveryConfigurations = Maybe [LogDeliveryConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:configurationEndpoint:CacheCluster' :: Maybe Endpoint
configurationEndpoint = Maybe Endpoint
forall a. Maybe a
Prelude.Nothing,
      $sel:engine:CacheCluster' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSecurityGroups:CacheCluster' :: Maybe [CacheSecurityGroupMembership]
cacheSecurityGroups = Maybe [CacheSecurityGroupMembership]
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupLogDeliveryEnabled:CacheCluster' :: Maybe Bool
replicationGroupLogDeliveryEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:authTokenEnabled:CacheCluster' :: Maybe Bool
authTokenEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:clientDownloadLandingPage:CacheCluster' :: Maybe Text
clientDownloadLandingPage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:CacheCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSubnetGroupName:CacheCluster' :: Maybe Text
cacheSubnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredAvailabilityZone:CacheCluster' :: Maybe Text
preferredAvailabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheParameterGroup:CacheCluster' :: Maybe CacheParameterGroupStatus
cacheParameterGroup = Maybe CacheParameterGroupStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheClusterStatus:CacheCluster' :: Maybe Text
cacheClusterStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotRetentionLimit:CacheCluster' :: Maybe Int
snapshotRetentionLimit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredOutpostArn:CacheCluster' :: Maybe Text
preferredOutpostArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupId:CacheCluster' :: Maybe Text
replicationGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:pendingModifiedValues:CacheCluster' :: Maybe PendingModifiedValues
pendingModifiedValues = Maybe PendingModifiedValues
forall a. Maybe a
Prelude.Nothing,
      $sel:numCacheNodes:CacheCluster' :: Maybe Int
numCacheNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The date the auth token was last modified
cacheCluster_authTokenLastModifiedDate :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.UTCTime)
cacheCluster_authTokenLastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheCluster -> f CacheCluster
cacheCluster_authTokenLastModifiedDate = (CacheCluster -> Maybe ISO8601)
-> (CacheCluster -> Maybe ISO8601 -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe ISO8601
authTokenLastModifiedDate :: Maybe ISO8601
$sel:authTokenLastModifiedDate:CacheCluster' :: CacheCluster -> Maybe ISO8601
authTokenLastModifiedDate} -> Maybe ISO8601
authTokenLastModifiedDate) (\s :: CacheCluster
s@CacheCluster' {} Maybe ISO8601
a -> CacheCluster
s {$sel:authTokenLastModifiedDate:CacheCluster' :: Maybe ISO8601
authTokenLastModifiedDate = Maybe ISO8601
a} :: CacheCluster) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CacheCluster -> f CacheCluster)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheCluster
-> f CacheCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The version of the cache engine that is used in this cluster.
cacheCluster_engineVersion :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_engineVersion :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_engineVersion = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:CacheCluster' :: CacheCluster -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:engineVersion:CacheCluster' :: Maybe Text
engineVersion = Maybe Text
a} :: CacheCluster)

-- | The name of the compute and memory capacity node type for the cluster.
--
-- The following node types are supported by ElastiCache. Generally
-- speaking, the current generation types provide more memory and
-- computational power at lower cost when compared to their equivalent
-- previous generation counterparts.
--
-- -   General purpose:
--
--     -   Current generation:
--
--         __M6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.m6g.large@, @cache.m6g.xlarge@, @cache.m6g.2xlarge@,
--         @cache.m6g.4xlarge@, @cache.m6g.8xlarge@, @cache.m6g.12xlarge@,
--         @cache.m6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __M5 node types:__ @cache.m5.large@, @cache.m5.xlarge@,
--         @cache.m5.2xlarge@, @cache.m5.4xlarge@, @cache.m5.12xlarge@,
--         @cache.m5.24xlarge@
--
--         __M4 node types:__ @cache.m4.large@, @cache.m4.xlarge@,
--         @cache.m4.2xlarge@, @cache.m4.4xlarge@, @cache.m4.10xlarge@
--
--         __T3 node types:__ @cache.t3.micro@, @cache.t3.small@,
--         @cache.t3.medium@
--
--         __T2 node types:__ @cache.t2.micro@, @cache.t2.small@,
--         @cache.t2.medium@
--
--     -   Previous generation: (not recommended)
--
--         __T1 node types:__ @cache.t1.micro@
--
--         __M1 node types:__ @cache.m1.small@, @cache.m1.medium@,
--         @cache.m1.large@, @cache.m1.xlarge@
--
--         __M3 node types:__ @cache.m3.medium@, @cache.m3.large@,
--         @cache.m3.xlarge@, @cache.m3.2xlarge@
--
-- -   Compute optimized:
--
--     -   Previous generation: (not recommended)
--
--         __C1 node types:__ @cache.c1.xlarge@
--
-- -   Memory optimized:
--
--     -   Current generation:
--
--         __R6g node types__ (available only for Redis engine version
--         5.0.6 onward and for Memcached engine version 1.5.16 onward).
--
--         @cache.r6g.large@, @cache.r6g.xlarge@, @cache.r6g.2xlarge@,
--         @cache.r6g.4xlarge@, @cache.r6g.8xlarge@, @cache.r6g.12xlarge@,
--         @cache.r6g.16xlarge@
--
--         For region availability, see
--         <https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html#CacheNodes.SupportedTypesByRegion Supported Node Types>
--
--         __R5 node types:__ @cache.r5.large@, @cache.r5.xlarge@,
--         @cache.r5.2xlarge@, @cache.r5.4xlarge@, @cache.r5.12xlarge@,
--         @cache.r5.24xlarge@
--
--         __R4 node types:__ @cache.r4.large@, @cache.r4.xlarge@,
--         @cache.r4.2xlarge@, @cache.r4.4xlarge@, @cache.r4.8xlarge@,
--         @cache.r4.16xlarge@
--
--     -   Previous generation: (not recommended)
--
--         __M2 node types:__ @cache.m2.xlarge@, @cache.m2.2xlarge@,
--         @cache.m2.4xlarge@
--
--         __R3 node types:__ @cache.r3.large@, @cache.r3.xlarge@,
--         @cache.r3.2xlarge@, @cache.r3.4xlarge@, @cache.r3.8xlarge@
--
-- __Additional node type info__
--
-- -   All current generation instance types are created in Amazon VPC by
--     default.
--
-- -   Redis append-only files (AOF) are not supported for T1 or T2
--     instances.
--
-- -   Redis Multi-AZ with automatic failover is not supported on T1
--     instances.
--
-- -   Redis configuration variables @appendonly@ and @appendfsync@ are not
--     supported on Redis version 2.8.22 and later.
cacheCluster_cacheNodeType :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_cacheNodeType :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_cacheNodeType = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:CacheCluster' :: CacheCluster -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:cacheNodeType:CacheCluster' :: Maybe Text
cacheNodeType = Maybe Text
a} :: CacheCluster)

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

-- | The date and time when the cluster was created.
cacheCluster_cacheClusterCreateTime :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.UTCTime)
cacheCluster_cacheClusterCreateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheCluster -> f CacheCluster
cacheCluster_cacheClusterCreateTime = (CacheCluster -> Maybe ISO8601)
-> (CacheCluster -> Maybe ISO8601 -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe ISO8601
cacheClusterCreateTime :: Maybe ISO8601
$sel:cacheClusterCreateTime:CacheCluster' :: CacheCluster -> Maybe ISO8601
cacheClusterCreateTime} -> Maybe ISO8601
cacheClusterCreateTime) (\s :: CacheCluster
s@CacheCluster' {} Maybe ISO8601
a -> CacheCluster
s {$sel:cacheClusterCreateTime:CacheCluster' :: Maybe ISO8601
cacheClusterCreateTime = Maybe ISO8601
a} :: CacheCluster) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> CacheCluster -> f CacheCluster)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CacheCluster
-> f CacheCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (Maybe UTCTime) (Maybe UTCTime)
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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A flag that enables encryption at-rest when set to @true@.
--
-- You cannot modify the value of @AtRestEncryptionEnabled@ after the
-- cluster is created. To enable at-rest encryption on a cluster you must
-- set @AtRestEncryptionEnabled@ to @true@ when you create a cluster.
--
-- __Required:__ Only available when creating a replication group in an
-- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
--
-- Default: @false@
cacheCluster_atRestEncryptionEnabled :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Bool)
cacheCluster_atRestEncryptionEnabled :: (Maybe Bool -> f (Maybe Bool)) -> CacheCluster -> f CacheCluster
cacheCluster_atRestEncryptionEnabled = (CacheCluster -> Maybe Bool)
-> (CacheCluster -> Maybe Bool -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Bool
atRestEncryptionEnabled :: Maybe Bool
$sel:atRestEncryptionEnabled:CacheCluster' :: CacheCluster -> Maybe Bool
atRestEncryptionEnabled} -> Maybe Bool
atRestEncryptionEnabled) (\s :: CacheCluster
s@CacheCluster' {} Maybe Bool
a -> CacheCluster
s {$sel:atRestEncryptionEnabled:CacheCluster' :: Maybe Bool
atRestEncryptionEnabled = Maybe Bool
a} :: CacheCluster)

-- | This parameter is currently disabled.
cacheCluster_autoMinorVersionUpgrade :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Bool)
cacheCluster_autoMinorVersionUpgrade :: (Maybe Bool -> f (Maybe Bool)) -> CacheCluster -> f CacheCluster
cacheCluster_autoMinorVersionUpgrade = (CacheCluster -> Maybe Bool)
-> (CacheCluster -> Maybe Bool -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Bool
autoMinorVersionUpgrade :: Maybe Bool
$sel:autoMinorVersionUpgrade:CacheCluster' :: CacheCluster -> Maybe Bool
autoMinorVersionUpgrade} -> Maybe Bool
autoMinorVersionUpgrade) (\s :: CacheCluster
s@CacheCluster' {} Maybe Bool
a -> CacheCluster
s {$sel:autoMinorVersionUpgrade:CacheCluster' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
a} :: CacheCluster)

-- | A list of VPC Security Groups associated with the cluster.
cacheCluster_securityGroups :: Lens.Lens' CacheCluster (Prelude.Maybe [SecurityGroupMembership])
cacheCluster_securityGroups :: (Maybe [SecurityGroupMembership]
 -> f (Maybe [SecurityGroupMembership]))
-> CacheCluster -> f CacheCluster
cacheCluster_securityGroups = (CacheCluster -> Maybe [SecurityGroupMembership])
-> (CacheCluster
    -> Maybe [SecurityGroupMembership] -> CacheCluster)
-> Lens
     CacheCluster
     CacheCluster
     (Maybe [SecurityGroupMembership])
     (Maybe [SecurityGroupMembership])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe [SecurityGroupMembership]
securityGroups :: Maybe [SecurityGroupMembership]
$sel:securityGroups:CacheCluster' :: CacheCluster -> Maybe [SecurityGroupMembership]
securityGroups} -> Maybe [SecurityGroupMembership]
securityGroups) (\s :: CacheCluster
s@CacheCluster' {} Maybe [SecurityGroupMembership]
a -> CacheCluster
s {$sel:securityGroups:CacheCluster' :: Maybe [SecurityGroupMembership]
securityGroups = Maybe [SecurityGroupMembership]
a} :: CacheCluster) ((Maybe [SecurityGroupMembership]
  -> f (Maybe [SecurityGroupMembership]))
 -> CacheCluster -> f CacheCluster)
-> ((Maybe [SecurityGroupMembership]
     -> f (Maybe [SecurityGroupMembership]))
    -> Maybe [SecurityGroupMembership]
    -> f (Maybe [SecurityGroupMembership]))
-> (Maybe [SecurityGroupMembership]
    -> f (Maybe [SecurityGroupMembership]))
-> CacheCluster
-> f CacheCluster
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 ElastiCache events to subscribers using Amazon
-- Simple Notification Service (SNS).
cacheCluster_notificationConfiguration :: Lens.Lens' CacheCluster (Prelude.Maybe NotificationConfiguration)
cacheCluster_notificationConfiguration :: (Maybe NotificationConfiguration
 -> f (Maybe NotificationConfiguration))
-> CacheCluster -> f CacheCluster
cacheCluster_notificationConfiguration = (CacheCluster -> Maybe NotificationConfiguration)
-> (CacheCluster
    -> Maybe NotificationConfiguration -> CacheCluster)
-> Lens
     CacheCluster
     CacheCluster
     (Maybe NotificationConfiguration)
     (Maybe NotificationConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe NotificationConfiguration
notificationConfiguration :: Maybe NotificationConfiguration
$sel:notificationConfiguration:CacheCluster' :: CacheCluster -> Maybe NotificationConfiguration
notificationConfiguration} -> Maybe NotificationConfiguration
notificationConfiguration) (\s :: CacheCluster
s@CacheCluster' {} Maybe NotificationConfiguration
a -> CacheCluster
s {$sel:notificationConfiguration:CacheCluster' :: Maybe NotificationConfiguration
notificationConfiguration = Maybe NotificationConfiguration
a} :: CacheCluster)

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

-- | A flag that enables in-transit encryption when set to @true@.
--
-- You cannot modify the value of @TransitEncryptionEnabled@ after the
-- cluster is created. To enable in-transit encryption on a cluster you
-- must set @TransitEncryptionEnabled@ to @true@ when you create a cluster.
--
-- __Required:__ Only available when creating a replication group in an
-- Amazon VPC using redis version @3.2.6@, @4.x@ or later.
--
-- Default: @false@
cacheCluster_transitEncryptionEnabled :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Bool)
cacheCluster_transitEncryptionEnabled :: (Maybe Bool -> f (Maybe Bool)) -> CacheCluster -> f CacheCluster
cacheCluster_transitEncryptionEnabled = (CacheCluster -> Maybe Bool)
-> (CacheCluster -> Maybe Bool -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Bool
transitEncryptionEnabled :: Maybe Bool
$sel:transitEncryptionEnabled:CacheCluster' :: CacheCluster -> Maybe Bool
transitEncryptionEnabled} -> Maybe Bool
transitEncryptionEnabled) (\s :: CacheCluster
s@CacheCluster' {} Maybe Bool
a -> CacheCluster
s {$sel:transitEncryptionEnabled:CacheCluster' :: Maybe Bool
transitEncryptionEnabled = Maybe Bool
a} :: CacheCluster)

-- | The daily time range (in UTC) during which ElastiCache begins taking a
-- daily snapshot of your cluster.
--
-- Example: @05:00-09:00@
cacheCluster_snapshotWindow :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_snapshotWindow :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_snapshotWindow = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
snapshotWindow :: Maybe Text
$sel:snapshotWindow:CacheCluster' :: CacheCluster -> Maybe Text
snapshotWindow} -> Maybe Text
snapshotWindow) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:snapshotWindow:CacheCluster' :: Maybe Text
snapshotWindow = Maybe Text
a} :: CacheCluster)

-- | The user-supplied identifier of the cluster. This identifier is a unique
-- key that identifies a cluster.
cacheCluster_cacheClusterId :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_cacheClusterId :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_cacheClusterId = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
cacheClusterId :: Maybe Text
$sel:cacheClusterId:CacheCluster' :: CacheCluster -> Maybe Text
cacheClusterId} -> Maybe Text
cacheClusterId) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:cacheClusterId:CacheCluster' :: Maybe Text
cacheClusterId = Maybe Text
a} :: CacheCluster)

-- | Returns the destination, format and type of the logs.
cacheCluster_logDeliveryConfigurations :: Lens.Lens' CacheCluster (Prelude.Maybe [LogDeliveryConfiguration])
cacheCluster_logDeliveryConfigurations :: (Maybe [LogDeliveryConfiguration]
 -> f (Maybe [LogDeliveryConfiguration]))
-> CacheCluster -> f CacheCluster
cacheCluster_logDeliveryConfigurations = (CacheCluster -> Maybe [LogDeliveryConfiguration])
-> (CacheCluster
    -> Maybe [LogDeliveryConfiguration] -> CacheCluster)
-> Lens
     CacheCluster
     CacheCluster
     (Maybe [LogDeliveryConfiguration])
     (Maybe [LogDeliveryConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe [LogDeliveryConfiguration]
logDeliveryConfigurations :: Maybe [LogDeliveryConfiguration]
$sel:logDeliveryConfigurations:CacheCluster' :: CacheCluster -> Maybe [LogDeliveryConfiguration]
logDeliveryConfigurations} -> Maybe [LogDeliveryConfiguration]
logDeliveryConfigurations) (\s :: CacheCluster
s@CacheCluster' {} Maybe [LogDeliveryConfiguration]
a -> CacheCluster
s {$sel:logDeliveryConfigurations:CacheCluster' :: Maybe [LogDeliveryConfiguration]
logDeliveryConfigurations = Maybe [LogDeliveryConfiguration]
a} :: CacheCluster) ((Maybe [LogDeliveryConfiguration]
  -> f (Maybe [LogDeliveryConfiguration]))
 -> CacheCluster -> f CacheCluster)
-> ((Maybe [LogDeliveryConfiguration]
     -> f (Maybe [LogDeliveryConfiguration]))
    -> Maybe [LogDeliveryConfiguration]
    -> f (Maybe [LogDeliveryConfiguration]))
-> (Maybe [LogDeliveryConfiguration]
    -> f (Maybe [LogDeliveryConfiguration]))
-> CacheCluster
-> f CacheCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LogDeliveryConfiguration]
  [LogDeliveryConfiguration]
  [LogDeliveryConfiguration]
  [LogDeliveryConfiguration]
-> Iso
     (Maybe [LogDeliveryConfiguration])
     (Maybe [LogDeliveryConfiguration])
     (Maybe [LogDeliveryConfiguration])
     (Maybe [LogDeliveryConfiguration])
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
  [LogDeliveryConfiguration]
  [LogDeliveryConfiguration]
  [LogDeliveryConfiguration]
  [LogDeliveryConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Represents a Memcached cluster endpoint which can be used by an
-- application to connect to any node in the cluster. The configuration
-- endpoint will always have @.cfg@ in it.
--
-- Example: @mem-3.9dvc4r.cfg.usw2.cache.amazonaws.com:11211@
cacheCluster_configurationEndpoint :: Lens.Lens' CacheCluster (Prelude.Maybe Endpoint)
cacheCluster_configurationEndpoint :: (Maybe Endpoint -> f (Maybe Endpoint))
-> CacheCluster -> f CacheCluster
cacheCluster_configurationEndpoint = (CacheCluster -> Maybe Endpoint)
-> (CacheCluster -> Maybe Endpoint -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Endpoint) (Maybe Endpoint)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Endpoint
configurationEndpoint :: Maybe Endpoint
$sel:configurationEndpoint:CacheCluster' :: CacheCluster -> Maybe Endpoint
configurationEndpoint} -> Maybe Endpoint
configurationEndpoint) (\s :: CacheCluster
s@CacheCluster' {} Maybe Endpoint
a -> CacheCluster
s {$sel:configurationEndpoint:CacheCluster' :: Maybe Endpoint
configurationEndpoint = Maybe Endpoint
a} :: CacheCluster)

-- | The name of the cache engine (@memcached@ or @redis@) to be used for
-- this cluster.
cacheCluster_engine :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_engine :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_engine = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
engine :: Maybe Text
$sel:engine:CacheCluster' :: CacheCluster -> Maybe Text
engine} -> Maybe Text
engine) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:engine:CacheCluster' :: Maybe Text
engine = Maybe Text
a} :: CacheCluster)

-- | A list of cache security group elements, composed of name and status
-- sub-elements.
cacheCluster_cacheSecurityGroups :: Lens.Lens' CacheCluster (Prelude.Maybe [CacheSecurityGroupMembership])
cacheCluster_cacheSecurityGroups :: (Maybe [CacheSecurityGroupMembership]
 -> f (Maybe [CacheSecurityGroupMembership]))
-> CacheCluster -> f CacheCluster
cacheCluster_cacheSecurityGroups = (CacheCluster -> Maybe [CacheSecurityGroupMembership])
-> (CacheCluster
    -> Maybe [CacheSecurityGroupMembership] -> CacheCluster)
-> Lens
     CacheCluster
     CacheCluster
     (Maybe [CacheSecurityGroupMembership])
     (Maybe [CacheSecurityGroupMembership])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe [CacheSecurityGroupMembership]
cacheSecurityGroups :: Maybe [CacheSecurityGroupMembership]
$sel:cacheSecurityGroups:CacheCluster' :: CacheCluster -> Maybe [CacheSecurityGroupMembership]
cacheSecurityGroups} -> Maybe [CacheSecurityGroupMembership]
cacheSecurityGroups) (\s :: CacheCluster
s@CacheCluster' {} Maybe [CacheSecurityGroupMembership]
a -> CacheCluster
s {$sel:cacheSecurityGroups:CacheCluster' :: Maybe [CacheSecurityGroupMembership]
cacheSecurityGroups = Maybe [CacheSecurityGroupMembership]
a} :: CacheCluster) ((Maybe [CacheSecurityGroupMembership]
  -> f (Maybe [CacheSecurityGroupMembership]))
 -> CacheCluster -> f CacheCluster)
-> ((Maybe [CacheSecurityGroupMembership]
     -> f (Maybe [CacheSecurityGroupMembership]))
    -> Maybe [CacheSecurityGroupMembership]
    -> f (Maybe [CacheSecurityGroupMembership]))
-> (Maybe [CacheSecurityGroupMembership]
    -> f (Maybe [CacheSecurityGroupMembership]))
-> CacheCluster
-> f CacheCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CacheSecurityGroupMembership]
  [CacheSecurityGroupMembership]
  [CacheSecurityGroupMembership]
  [CacheSecurityGroupMembership]
-> Iso
     (Maybe [CacheSecurityGroupMembership])
     (Maybe [CacheSecurityGroupMembership])
     (Maybe [CacheSecurityGroupMembership])
     (Maybe [CacheSecurityGroupMembership])
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
  [CacheSecurityGroupMembership]
  [CacheSecurityGroupMembership]
  [CacheSecurityGroupMembership]
  [CacheSecurityGroupMembership]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A boolean value indicating whether log delivery is enabled for the
-- replication group.
cacheCluster_replicationGroupLogDeliveryEnabled :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Bool)
cacheCluster_replicationGroupLogDeliveryEnabled :: (Maybe Bool -> f (Maybe Bool)) -> CacheCluster -> f CacheCluster
cacheCluster_replicationGroupLogDeliveryEnabled = (CacheCluster -> Maybe Bool)
-> (CacheCluster -> Maybe Bool -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Bool
replicationGroupLogDeliveryEnabled :: Maybe Bool
$sel:replicationGroupLogDeliveryEnabled:CacheCluster' :: CacheCluster -> Maybe Bool
replicationGroupLogDeliveryEnabled} -> Maybe Bool
replicationGroupLogDeliveryEnabled) (\s :: CacheCluster
s@CacheCluster' {} Maybe Bool
a -> CacheCluster
s {$sel:replicationGroupLogDeliveryEnabled:CacheCluster' :: Maybe Bool
replicationGroupLogDeliveryEnabled = Maybe Bool
a} :: CacheCluster)

-- | A flag that enables using an @AuthToken@ (password) when issuing Redis
-- commands.
--
-- Default: @false@
cacheCluster_authTokenEnabled :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Bool)
cacheCluster_authTokenEnabled :: (Maybe Bool -> f (Maybe Bool)) -> CacheCluster -> f CacheCluster
cacheCluster_authTokenEnabled = (CacheCluster -> Maybe Bool)
-> (CacheCluster -> Maybe Bool -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Bool
authTokenEnabled :: Maybe Bool
$sel:authTokenEnabled:CacheCluster' :: CacheCluster -> Maybe Bool
authTokenEnabled} -> Maybe Bool
authTokenEnabled) (\s :: CacheCluster
s@CacheCluster' {} Maybe Bool
a -> CacheCluster
s {$sel:authTokenEnabled:CacheCluster' :: Maybe Bool
authTokenEnabled = Maybe Bool
a} :: CacheCluster)

-- | The URL of the web page where you can download the latest ElastiCache
-- client library.
cacheCluster_clientDownloadLandingPage :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_clientDownloadLandingPage :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_clientDownloadLandingPage = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
clientDownloadLandingPage :: Maybe Text
$sel:clientDownloadLandingPage:CacheCluster' :: CacheCluster -> Maybe Text
clientDownloadLandingPage} -> Maybe Text
clientDownloadLandingPage) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:clientDownloadLandingPage:CacheCluster' :: Maybe Text
clientDownloadLandingPage = Maybe Text
a} :: CacheCluster)

-- | 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.
--
-- Valid values for @ddd@ are:
--
-- -   @sun@
--
-- -   @mon@
--
-- -   @tue@
--
-- -   @wed@
--
-- -   @thu@
--
-- -   @fri@
--
-- -   @sat@
--
-- Example: @sun:23:00-mon:01:30@
cacheCluster_preferredMaintenanceWindow :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_preferredMaintenanceWindow = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:CacheCluster' :: CacheCluster -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:preferredMaintenanceWindow:CacheCluster' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: CacheCluster)

-- | The name of the cache subnet group associated with the cluster.
cacheCluster_cacheSubnetGroupName :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_cacheSubnetGroupName :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_cacheSubnetGroupName = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
cacheSubnetGroupName :: Maybe Text
$sel:cacheSubnetGroupName:CacheCluster' :: CacheCluster -> Maybe Text
cacheSubnetGroupName} -> Maybe Text
cacheSubnetGroupName) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:cacheSubnetGroupName:CacheCluster' :: Maybe Text
cacheSubnetGroupName = Maybe Text
a} :: CacheCluster)

-- | The name of the Availability Zone in which the cluster is located or
-- \"Multiple\" if the cache nodes are located in different Availability
-- Zones.
cacheCluster_preferredAvailabilityZone :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_preferredAvailabilityZone :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_preferredAvailabilityZone = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
preferredAvailabilityZone :: Maybe Text
$sel:preferredAvailabilityZone:CacheCluster' :: CacheCluster -> Maybe Text
preferredAvailabilityZone} -> Maybe Text
preferredAvailabilityZone) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:preferredAvailabilityZone:CacheCluster' :: Maybe Text
preferredAvailabilityZone = Maybe Text
a} :: CacheCluster)

-- | Status of the cache parameter group.
cacheCluster_cacheParameterGroup :: Lens.Lens' CacheCluster (Prelude.Maybe CacheParameterGroupStatus)
cacheCluster_cacheParameterGroup :: (Maybe CacheParameterGroupStatus
 -> f (Maybe CacheParameterGroupStatus))
-> CacheCluster -> f CacheCluster
cacheCluster_cacheParameterGroup = (CacheCluster -> Maybe CacheParameterGroupStatus)
-> (CacheCluster
    -> Maybe CacheParameterGroupStatus -> CacheCluster)
-> Lens
     CacheCluster
     CacheCluster
     (Maybe CacheParameterGroupStatus)
     (Maybe CacheParameterGroupStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe CacheParameterGroupStatus
cacheParameterGroup :: Maybe CacheParameterGroupStatus
$sel:cacheParameterGroup:CacheCluster' :: CacheCluster -> Maybe CacheParameterGroupStatus
cacheParameterGroup} -> Maybe CacheParameterGroupStatus
cacheParameterGroup) (\s :: CacheCluster
s@CacheCluster' {} Maybe CacheParameterGroupStatus
a -> CacheCluster
s {$sel:cacheParameterGroup:CacheCluster' :: Maybe CacheParameterGroupStatus
cacheParameterGroup = Maybe CacheParameterGroupStatus
a} :: CacheCluster)

-- | The current state of this cluster, one of the following values:
-- @available@, @creating@, @deleted@, @deleting@, @incompatible-network@,
-- @modifying@, @rebooting cluster nodes@, @restore-failed@, or
-- @snapshotting@.
cacheCluster_cacheClusterStatus :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_cacheClusterStatus :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_cacheClusterStatus = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
cacheClusterStatus :: Maybe Text
$sel:cacheClusterStatus:CacheCluster' :: CacheCluster -> Maybe Text
cacheClusterStatus} -> Maybe Text
cacheClusterStatus) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:cacheClusterStatus:CacheCluster' :: Maybe Text
cacheClusterStatus = Maybe Text
a} :: CacheCluster)

-- | The number of days for which ElastiCache retains automatic cluster
-- 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.
--
-- If the value of SnapshotRetentionLimit is set to zero (0), backups are
-- turned off.
cacheCluster_snapshotRetentionLimit :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Int)
cacheCluster_snapshotRetentionLimit :: (Maybe Int -> f (Maybe Int)) -> CacheCluster -> f CacheCluster
cacheCluster_snapshotRetentionLimit = (CacheCluster -> Maybe Int)
-> (CacheCluster -> Maybe Int -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Int
snapshotRetentionLimit :: Maybe Int
$sel:snapshotRetentionLimit:CacheCluster' :: CacheCluster -> Maybe Int
snapshotRetentionLimit} -> Maybe Int
snapshotRetentionLimit) (\s :: CacheCluster
s@CacheCluster' {} Maybe Int
a -> CacheCluster
s {$sel:snapshotRetentionLimit:CacheCluster' :: Maybe Int
snapshotRetentionLimit = Maybe Int
a} :: CacheCluster)

-- | The outpost ARN in which the cache cluster is created.
cacheCluster_preferredOutpostArn :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_preferredOutpostArn :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_preferredOutpostArn = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
preferredOutpostArn :: Maybe Text
$sel:preferredOutpostArn:CacheCluster' :: CacheCluster -> Maybe Text
preferredOutpostArn} -> Maybe Text
preferredOutpostArn) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:preferredOutpostArn:CacheCluster' :: Maybe Text
preferredOutpostArn = Maybe Text
a} :: CacheCluster)

-- | The replication group to which this cluster belongs. If this field is
-- empty, the cluster is not associated with any replication group.
cacheCluster_replicationGroupId :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Text)
cacheCluster_replicationGroupId :: (Maybe Text -> f (Maybe Text)) -> CacheCluster -> f CacheCluster
cacheCluster_replicationGroupId = (CacheCluster -> Maybe Text)
-> (CacheCluster -> Maybe Text -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Text
replicationGroupId :: Maybe Text
$sel:replicationGroupId:CacheCluster' :: CacheCluster -> Maybe Text
replicationGroupId} -> Maybe Text
replicationGroupId) (\s :: CacheCluster
s@CacheCluster' {} Maybe Text
a -> CacheCluster
s {$sel:replicationGroupId:CacheCluster' :: Maybe Text
replicationGroupId = Maybe Text
a} :: CacheCluster)

-- | Undocumented member.
cacheCluster_pendingModifiedValues :: Lens.Lens' CacheCluster (Prelude.Maybe PendingModifiedValues)
cacheCluster_pendingModifiedValues :: (Maybe PendingModifiedValues -> f (Maybe PendingModifiedValues))
-> CacheCluster -> f CacheCluster
cacheCluster_pendingModifiedValues = (CacheCluster -> Maybe PendingModifiedValues)
-> (CacheCluster -> Maybe PendingModifiedValues -> CacheCluster)
-> Lens
     CacheCluster
     CacheCluster
     (Maybe PendingModifiedValues)
     (Maybe PendingModifiedValues)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe PendingModifiedValues
pendingModifiedValues :: Maybe PendingModifiedValues
$sel:pendingModifiedValues:CacheCluster' :: CacheCluster -> Maybe PendingModifiedValues
pendingModifiedValues} -> Maybe PendingModifiedValues
pendingModifiedValues) (\s :: CacheCluster
s@CacheCluster' {} Maybe PendingModifiedValues
a -> CacheCluster
s {$sel:pendingModifiedValues:CacheCluster' :: Maybe PendingModifiedValues
pendingModifiedValues = Maybe PendingModifiedValues
a} :: CacheCluster)

-- | The number of cache nodes in the cluster.
--
-- For clusters running Redis, this value must be 1. For clusters running
-- Memcached, this value must be between 1 and 40.
cacheCluster_numCacheNodes :: Lens.Lens' CacheCluster (Prelude.Maybe Prelude.Int)
cacheCluster_numCacheNodes :: (Maybe Int -> f (Maybe Int)) -> CacheCluster -> f CacheCluster
cacheCluster_numCacheNodes = (CacheCluster -> Maybe Int)
-> (CacheCluster -> Maybe Int -> CacheCluster)
-> Lens CacheCluster CacheCluster (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CacheCluster' {Maybe Int
numCacheNodes :: Maybe Int
$sel:numCacheNodes:CacheCluster' :: CacheCluster -> Maybe Int
numCacheNodes} -> Maybe Int
numCacheNodes) (\s :: CacheCluster
s@CacheCluster' {} Maybe Int
a -> CacheCluster
s {$sel:numCacheNodes:CacheCluster' :: Maybe Int
numCacheNodes = Maybe Int
a} :: CacheCluster)

instance Core.FromXML CacheCluster where
  parseXML :: [Node] -> Either String CacheCluster
parseXML [Node]
x =
    Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe [CacheNode]
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Bool
-> Maybe [SecurityGroupMembership]
-> Maybe NotificationConfiguration
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [LogDeliveryConfiguration]
-> Maybe Endpoint
-> Maybe Text
-> Maybe [CacheSecurityGroupMembership]
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe CacheParameterGroupStatus
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe PendingModifiedValues
-> Maybe Int
-> CacheCluster
CacheCluster'
      (Maybe ISO8601
 -> Maybe Text
 -> Maybe Text
 -> Maybe [CacheNode]
 -> Maybe ISO8601
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe [SecurityGroupMembership]
 -> Maybe NotificationConfiguration
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe [LogDeliveryConfiguration]
 -> Maybe Endpoint
 -> Maybe Text
 -> Maybe [CacheSecurityGroupMembership]
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe CacheParameterGroupStatus
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe PendingModifiedValues
 -> Maybe Int
 -> CacheCluster)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [CacheNode]
      -> Maybe ISO8601
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AuthTokenLastModifiedDate")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [CacheNode]
   -> Maybe ISO8601
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [CacheNode]
      -> Maybe ISO8601
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EngineVersion")
      Either
  String
  (Maybe Text
   -> Maybe [CacheNode]
   -> Maybe ISO8601
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [CacheNode]
      -> Maybe ISO8601
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheNodeType")
      Either
  String
  (Maybe [CacheNode]
   -> Maybe ISO8601
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe [CacheNode])
-> Either
     String
     (Maybe ISO8601
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheNodes" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [CacheNode]))
-> Either String (Maybe [CacheNode])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [CacheNode])
-> [Node] -> Either String (Maybe [CacheNode])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [CacheNode]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"CacheNode")
                  )
      Either
  String
  (Maybe ISO8601
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Bool
      -> Maybe Bool
      -> Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheClusterCreateTime")
      Either
  String
  (Maybe Bool
   -> Maybe Bool
   -> Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Bool
      -> Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AtRestEncryptionEnabled")
      Either
  String
  (Maybe Bool
   -> Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe [SecurityGroupMembership]
      -> Maybe NotificationConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutoMinorVersionUpgrade")
      Either
  String
  (Maybe [SecurityGroupMembership]
   -> Maybe NotificationConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe [SecurityGroupMembership])
-> Either
     String
     (Maybe NotificationConfiguration
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SecurityGroups" Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [SecurityGroupMembership]))
-> Either String (Maybe [SecurityGroupMembership])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [SecurityGroupMembership])
-> [Node] -> Either String (Maybe [SecurityGroupMembership])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [SecurityGroupMembership]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                  )
      Either
  String
  (Maybe NotificationConfiguration
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe NotificationConfiguration)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe NotificationConfiguration)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NotificationConfiguration")
      Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ARN")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TransitEncryptionEnabled")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SnapshotWindow")
      Either
  String
  (Maybe Text
   -> Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [LogDeliveryConfiguration]
      -> Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheClusterId")
      Either
  String
  (Maybe [LogDeliveryConfiguration]
   -> Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe [LogDeliveryConfiguration])
-> Either
     String
     (Maybe Endpoint
      -> Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"LogDeliveryConfigurations"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [LogDeliveryConfiguration]))
-> Either String (Maybe [LogDeliveryConfiguration])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [LogDeliveryConfiguration])
-> [Node] -> Either String (Maybe [LogDeliveryConfiguration])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
                        (Text -> [Node] -> Either String [LogDeliveryConfiguration]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"LogDeliveryConfiguration")
                  )
      Either
  String
  (Maybe Endpoint
   -> Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Endpoint)
-> Either
     String
     (Maybe Text
      -> Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Endpoint)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ConfigurationEndpoint")
      Either
  String
  (Maybe Text
   -> Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [CacheSecurityGroupMembership]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Engine")
      Either
  String
  (Maybe [CacheSecurityGroupMembership]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe [CacheSecurityGroupMembership])
-> Either
     String
     (Maybe Bool
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheSecurityGroups"
                      Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                      Either String [Node]
-> ([Node] -> Either String (Maybe [CacheSecurityGroupMembership]))
-> Either String (Maybe [CacheSecurityGroupMembership])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [CacheSecurityGroupMembership])
-> [Node] -> Either String (Maybe [CacheSecurityGroupMembership])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [CacheSecurityGroupMembership]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"CacheSecurityGroup")
                  )
      Either
  String
  (Maybe Bool
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReplicationGroupLogDeliveryEnabled")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AuthTokenEnabled")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ClientDownloadLandingPage")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PreferredMaintenanceWindow")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheSubnetGroupName")
      Either
  String
  (Maybe Text
   -> Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe CacheParameterGroupStatus
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PreferredAvailabilityZone")
      Either
  String
  (Maybe CacheParameterGroupStatus
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe CacheParameterGroupStatus)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe CacheParameterGroupStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheParameterGroup")
      Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheClusterStatus")
      Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe PendingModifiedValues
      -> Maybe Int
      -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"SnapshotRetentionLimit")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe PendingModifiedValues
   -> Maybe Int
   -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe PendingModifiedValues -> Maybe Int -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PreferredOutpostArn")
      Either
  String
  (Maybe Text
   -> Maybe PendingModifiedValues -> Maybe Int -> CacheCluster)
-> Either String (Maybe Text)
-> Either
     String (Maybe PendingModifiedValues -> Maybe Int -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ReplicationGroupId")
      Either
  String (Maybe PendingModifiedValues -> Maybe Int -> CacheCluster)
-> Either String (Maybe PendingModifiedValues)
-> Either String (Maybe Int -> CacheCluster)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe PendingModifiedValues)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PendingModifiedValues")
      Either String (Maybe Int -> CacheCluster)
-> Either String (Maybe Int) -> Either String CacheCluster
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NumCacheNodes")

instance Prelude.Hashable CacheCluster

instance Prelude.NFData CacheCluster