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

import qualified Amazonka.Core as Core
import Amazonka.ElastiCache.Types.AutomaticFailoverStatus
import Amazonka.ElastiCache.Types.NodeSnapshot
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents a copy of an entire Redis cluster as of the time when the
-- snapshot was taken.
--
-- /See:/ 'newSnapshot' smart constructor.
data Snapshot = Snapshot'
  { -- | The version of the cache engine version that is used by the source
    -- cluster.
    Snapshot -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the compute and memory capacity node type for the source
    -- 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.
    Snapshot -> Maybe Text
cacheNodeType :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the source cluster was created.
    Snapshot -> Maybe ISO8601
cacheClusterCreateTime :: Prelude.Maybe Core.ISO8601,
    -- | This parameter is currently disabled.
    Snapshot -> Maybe Bool
autoMinorVersionUpgrade :: Prelude.Maybe Prelude.Bool,
    -- | The ARN (Amazon Resource Name) of the snapshot.
    Snapshot -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The cache parameter group that is associated with the source cluster.
    Snapshot -> Maybe Text
cacheParameterGroupName :: Prelude.Maybe Prelude.Text,
    -- | A description of the source replication group.
    Snapshot -> Maybe Text
replicationGroupDescription :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet
    -- group for the source cluster.
    Snapshot -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | The status of the snapshot. Valid values: @creating@ | @available@ |
    -- @restoring@ | @copying@ | @deleting@.
    Snapshot -> Maybe Text
snapshotStatus :: Prelude.Maybe Prelude.Text,
    -- | The daily time range during which ElastiCache takes daily snapshots of
    -- the source cluster.
    Snapshot -> Maybe Text
snapshotWindow :: Prelude.Maybe Prelude.Text,
    -- | The user-supplied identifier of the source cluster.
    Snapshot -> Maybe Text
cacheClusterId :: Prelude.Maybe Prelude.Text,
    -- | The name of the cache engine (@memcached@ or @redis@) used by the source
    -- cluster.
    Snapshot -> Maybe Text
engine :: 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@
    Snapshot -> Maybe Text
preferredMaintenanceWindow :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the topic used by the source cluster
    -- for publishing notifications.
    Snapshot -> Maybe Text
topicArn :: Prelude.Maybe Prelude.Text,
    -- | The ID of the KMS key used to encrypt the snapshot.
    Snapshot -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | A list of the cache nodes in the source cluster.
    Snapshot -> Maybe [NodeSnapshot]
nodeSnapshots :: Prelude.Maybe [NodeSnapshot],
    -- | The name of the cache subnet group associated with the source cluster.
    Snapshot -> Maybe Text
cacheSubnetGroupName :: Prelude.Maybe Prelude.Text,
    -- | The name of the Availability Zone in which the source cluster is
    -- located.
    Snapshot -> Maybe Text
preferredAvailabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The number of node groups (shards) in this snapshot. When restoring from
    -- a snapshot, the number of node groups (shards) in the snapshot and in
    -- the restored replication group must be the same.
    Snapshot -> Maybe Int
numNodeGroups :: Prelude.Maybe Prelude.Int,
    -- | For an automatic snapshot, the number of days for which ElastiCache
    -- retains the snapshot before deleting it.
    --
    -- For manual snapshots, this field reflects the @SnapshotRetentionLimit@
    -- for the source cluster when the snapshot was created. This field is
    -- otherwise ignored: Manual snapshots do not expire, and can only be
    -- deleted using the @DeleteSnapshot@ operation.
    --
    -- __Important__ If the value of SnapshotRetentionLimit is set to zero (0),
    -- backups are turned off.
    Snapshot -> Maybe Int
snapshotRetentionLimit :: Prelude.Maybe Prelude.Int,
    -- | The name of a snapshot. For an automatic snapshot, the name is
    -- system-generated. For a manual snapshot, this is the user-provided name.
    Snapshot -> Maybe Text
snapshotName :: Prelude.Maybe Prelude.Text,
    -- | The ARN (Amazon Resource Name) of the preferred outpost.
    Snapshot -> Maybe Text
preferredOutpostArn :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the source replication group.
    Snapshot -> Maybe Text
replicationGroupId :: Prelude.Maybe Prelude.Text,
    -- | The number of cache nodes in the source cluster.
    --
    -- For clusters running Redis, this value must be 1. For clusters running
    -- Memcached, this value must be between 1 and 40.
    Snapshot -> Maybe Int
numCacheNodes :: Prelude.Maybe Prelude.Int,
    -- | The port number used by each cache nodes in the source cluster.
    Snapshot -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | Indicates the status of automatic failover for the source Redis
    -- replication group.
    Snapshot -> Maybe AutomaticFailoverStatus
automaticFailover :: Prelude.Maybe AutomaticFailoverStatus,
    -- | Indicates whether the snapshot is from an automatic backup (@automated@)
    -- or was created manually (@manual@).
    Snapshot -> Maybe Text
snapshotSource :: Prelude.Maybe Prelude.Text
  }
  deriving (Snapshot -> Snapshot -> Bool
(Snapshot -> Snapshot -> Bool)
-> (Snapshot -> Snapshot -> Bool) -> Eq Snapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Snapshot -> Snapshot -> Bool
$c/= :: Snapshot -> Snapshot -> Bool
== :: Snapshot -> Snapshot -> Bool
$c== :: Snapshot -> Snapshot -> Bool
Prelude.Eq, ReadPrec [Snapshot]
ReadPrec Snapshot
Int -> ReadS Snapshot
ReadS [Snapshot]
(Int -> ReadS Snapshot)
-> ReadS [Snapshot]
-> ReadPrec Snapshot
-> ReadPrec [Snapshot]
-> Read Snapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Snapshot]
$creadListPrec :: ReadPrec [Snapshot]
readPrec :: ReadPrec Snapshot
$creadPrec :: ReadPrec Snapshot
readList :: ReadS [Snapshot]
$creadList :: ReadS [Snapshot]
readsPrec :: Int -> ReadS Snapshot
$creadsPrec :: Int -> ReadS Snapshot
Prelude.Read, Int -> Snapshot -> ShowS
[Snapshot] -> ShowS
Snapshot -> String
(Int -> Snapshot -> ShowS)
-> (Snapshot -> String) -> ([Snapshot] -> ShowS) -> Show Snapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Snapshot] -> ShowS
$cshowList :: [Snapshot] -> ShowS
show :: Snapshot -> String
$cshow :: Snapshot -> String
showsPrec :: Int -> Snapshot -> ShowS
$cshowsPrec :: Int -> Snapshot -> ShowS
Prelude.Show, (forall x. Snapshot -> Rep Snapshot x)
-> (forall x. Rep Snapshot x -> Snapshot) -> Generic Snapshot
forall x. Rep Snapshot x -> Snapshot
forall x. Snapshot -> Rep Snapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Snapshot x -> Snapshot
$cfrom :: forall x. Snapshot -> Rep Snapshot x
Prelude.Generic)

-- |
-- Create a value of 'Snapshot' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'engineVersion', 'snapshot_engineVersion' - The version of the cache engine version that is used by the source
-- cluster.
--
-- 'cacheNodeType', 'snapshot_cacheNodeType' - The name of the compute and memory capacity node type for the source
-- 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.
--
-- 'cacheClusterCreateTime', 'snapshot_cacheClusterCreateTime' - The date and time when the source cluster was created.
--
-- 'autoMinorVersionUpgrade', 'snapshot_autoMinorVersionUpgrade' - This parameter is currently disabled.
--
-- 'arn', 'snapshot_arn' - The ARN (Amazon Resource Name) of the snapshot.
--
-- 'cacheParameterGroupName', 'snapshot_cacheParameterGroupName' - The cache parameter group that is associated with the source cluster.
--
-- 'replicationGroupDescription', 'snapshot_replicationGroupDescription' - A description of the source replication group.
--
-- 'vpcId', 'snapshot_vpcId' - The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet
-- group for the source cluster.
--
-- 'snapshotStatus', 'snapshot_snapshotStatus' - The status of the snapshot. Valid values: @creating@ | @available@ |
-- @restoring@ | @copying@ | @deleting@.
--
-- 'snapshotWindow', 'snapshot_snapshotWindow' - The daily time range during which ElastiCache takes daily snapshots of
-- the source cluster.
--
-- 'cacheClusterId', 'snapshot_cacheClusterId' - The user-supplied identifier of the source cluster.
--
-- 'engine', 'snapshot_engine' - The name of the cache engine (@memcached@ or @redis@) used by the source
-- cluster.
--
-- 'preferredMaintenanceWindow', 'snapshot_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@
--
-- 'topicArn', 'snapshot_topicArn' - The Amazon Resource Name (ARN) for the topic used by the source cluster
-- for publishing notifications.
--
-- 'kmsKeyId', 'snapshot_kmsKeyId' - The ID of the KMS key used to encrypt the snapshot.
--
-- 'nodeSnapshots', 'snapshot_nodeSnapshots' - A list of the cache nodes in the source cluster.
--
-- 'cacheSubnetGroupName', 'snapshot_cacheSubnetGroupName' - The name of the cache subnet group associated with the source cluster.
--
-- 'preferredAvailabilityZone', 'snapshot_preferredAvailabilityZone' - The name of the Availability Zone in which the source cluster is
-- located.
--
-- 'numNodeGroups', 'snapshot_numNodeGroups' - The number of node groups (shards) in this snapshot. When restoring from
-- a snapshot, the number of node groups (shards) in the snapshot and in
-- the restored replication group must be the same.
--
-- 'snapshotRetentionLimit', 'snapshot_snapshotRetentionLimit' - For an automatic snapshot, the number of days for which ElastiCache
-- retains the snapshot before deleting it.
--
-- For manual snapshots, this field reflects the @SnapshotRetentionLimit@
-- for the source cluster when the snapshot was created. This field is
-- otherwise ignored: Manual snapshots do not expire, and can only be
-- deleted using the @DeleteSnapshot@ operation.
--
-- __Important__ If the value of SnapshotRetentionLimit is set to zero (0),
-- backups are turned off.
--
-- 'snapshotName', 'snapshot_snapshotName' - The name of a snapshot. For an automatic snapshot, the name is
-- system-generated. For a manual snapshot, this is the user-provided name.
--
-- 'preferredOutpostArn', 'snapshot_preferredOutpostArn' - The ARN (Amazon Resource Name) of the preferred outpost.
--
-- 'replicationGroupId', 'snapshot_replicationGroupId' - The unique identifier of the source replication group.
--
-- 'numCacheNodes', 'snapshot_numCacheNodes' - The number of cache nodes in the source cluster.
--
-- For clusters running Redis, this value must be 1. For clusters running
-- Memcached, this value must be between 1 and 40.
--
-- 'port', 'snapshot_port' - The port number used by each cache nodes in the source cluster.
--
-- 'automaticFailover', 'snapshot_automaticFailover' - Indicates the status of automatic failover for the source Redis
-- replication group.
--
-- 'snapshotSource', 'snapshot_snapshotSource' - Indicates whether the snapshot is from an automatic backup (@automated@)
-- or was created manually (@manual@).
newSnapshot ::
  Snapshot
newSnapshot :: Snapshot
newSnapshot =
  Snapshot' :: Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [NodeSnapshot]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe AutomaticFailoverStatus
-> Maybe Text
-> Snapshot
Snapshot'
    { $sel:engineVersion:Snapshot' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheNodeType:Snapshot' :: Maybe Text
cacheNodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheClusterCreateTime:Snapshot' :: Maybe ISO8601
cacheClusterCreateTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:autoMinorVersionUpgrade:Snapshot' :: Maybe Bool
autoMinorVersionUpgrade = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Snapshot' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheParameterGroupName:Snapshot' :: Maybe Text
cacheParameterGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupDescription:Snapshot' :: Maybe Text
replicationGroupDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:Snapshot' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotStatus:Snapshot' :: Maybe Text
snapshotStatus = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotWindow:Snapshot' :: Maybe Text
snapshotWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheClusterId:Snapshot' :: Maybe Text
cacheClusterId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engine:Snapshot' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredMaintenanceWindow:Snapshot' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:topicArn:Snapshot' :: Maybe Text
topicArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:Snapshot' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeSnapshots:Snapshot' :: Maybe [NodeSnapshot]
nodeSnapshots = Maybe [NodeSnapshot]
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheSubnetGroupName:Snapshot' :: Maybe Text
cacheSubnetGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredAvailabilityZone:Snapshot' :: Maybe Text
preferredAvailabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numNodeGroups:Snapshot' :: Maybe Int
numNodeGroups = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotRetentionLimit:Snapshot' :: Maybe Int
snapshotRetentionLimit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotName:Snapshot' :: Maybe Text
snapshotName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:preferredOutpostArn:Snapshot' :: Maybe Text
preferredOutpostArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationGroupId:Snapshot' :: Maybe Text
replicationGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numCacheNodes:Snapshot' :: Maybe Int
numCacheNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:port:Snapshot' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:automaticFailover:Snapshot' :: Maybe AutomaticFailoverStatus
automaticFailover = Maybe AutomaticFailoverStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotSource:Snapshot' :: Maybe Text
snapshotSource = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

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

-- | The name of the compute and memory capacity node type for the source
-- 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.
snapshot_cacheNodeType :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_cacheNodeType :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_cacheNodeType = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
cacheNodeType :: Maybe Text
$sel:cacheNodeType:Snapshot' :: Snapshot -> Maybe Text
cacheNodeType} -> Maybe Text
cacheNodeType) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:cacheNodeType:Snapshot' :: Maybe Text
cacheNodeType = Maybe Text
a} :: Snapshot)

-- | The date and time when the source cluster was created.
snapshot_cacheClusterCreateTime :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.UTCTime)
snapshot_cacheClusterCreateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Snapshot -> f Snapshot
snapshot_cacheClusterCreateTime = (Snapshot -> Maybe ISO8601)
-> (Snapshot -> Maybe ISO8601 -> Snapshot)
-> Lens Snapshot Snapshot (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe ISO8601
cacheClusterCreateTime :: Maybe ISO8601
$sel:cacheClusterCreateTime:Snapshot' :: Snapshot -> Maybe ISO8601
cacheClusterCreateTime} -> Maybe ISO8601
cacheClusterCreateTime) (\s :: Snapshot
s@Snapshot' {} Maybe ISO8601
a -> Snapshot
s {$sel:cacheClusterCreateTime:Snapshot' :: Maybe ISO8601
cacheClusterCreateTime = Maybe ISO8601
a} :: Snapshot) ((Maybe ISO8601 -> f (Maybe ISO8601)) -> Snapshot -> f Snapshot)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Snapshot
-> f Snapshot
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

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

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

-- | The cache parameter group that is associated with the source cluster.
snapshot_cacheParameterGroupName :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_cacheParameterGroupName :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_cacheParameterGroupName = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
cacheParameterGroupName :: Maybe Text
$sel:cacheParameterGroupName:Snapshot' :: Snapshot -> Maybe Text
cacheParameterGroupName} -> Maybe Text
cacheParameterGroupName) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:cacheParameterGroupName:Snapshot' :: Maybe Text
cacheParameterGroupName = Maybe Text
a} :: Snapshot)

-- | A description of the source replication group.
snapshot_replicationGroupDescription :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_replicationGroupDescription :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_replicationGroupDescription = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
replicationGroupDescription :: Maybe Text
$sel:replicationGroupDescription:Snapshot' :: Snapshot -> Maybe Text
replicationGroupDescription} -> Maybe Text
replicationGroupDescription) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:replicationGroupDescription:Snapshot' :: Maybe Text
replicationGroupDescription = Maybe Text
a} :: Snapshot)

-- | The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet
-- group for the source cluster.
snapshot_vpcId :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_vpcId :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_vpcId = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:Snapshot' :: Snapshot -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:vpcId:Snapshot' :: Maybe Text
vpcId = Maybe Text
a} :: Snapshot)

-- | The status of the snapshot. Valid values: @creating@ | @available@ |
-- @restoring@ | @copying@ | @deleting@.
snapshot_snapshotStatus :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_snapshotStatus :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_snapshotStatus = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
snapshotStatus :: Maybe Text
$sel:snapshotStatus:Snapshot' :: Snapshot -> Maybe Text
snapshotStatus} -> Maybe Text
snapshotStatus) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:snapshotStatus:Snapshot' :: Maybe Text
snapshotStatus = Maybe Text
a} :: Snapshot)

-- | The daily time range during which ElastiCache takes daily snapshots of
-- the source cluster.
snapshot_snapshotWindow :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_snapshotWindow :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_snapshotWindow = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
snapshotWindow :: Maybe Text
$sel:snapshotWindow:Snapshot' :: Snapshot -> Maybe Text
snapshotWindow} -> Maybe Text
snapshotWindow) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:snapshotWindow:Snapshot' :: Maybe Text
snapshotWindow = Maybe Text
a} :: Snapshot)

-- | The user-supplied identifier of the source cluster.
snapshot_cacheClusterId :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_cacheClusterId :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_cacheClusterId = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
cacheClusterId :: Maybe Text
$sel:cacheClusterId:Snapshot' :: Snapshot -> Maybe Text
cacheClusterId} -> Maybe Text
cacheClusterId) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:cacheClusterId:Snapshot' :: Maybe Text
cacheClusterId = Maybe Text
a} :: Snapshot)

-- | The name of the cache engine (@memcached@ or @redis@) used by the source
-- cluster.
snapshot_engine :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_engine :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_engine = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
engine :: Maybe Text
$sel:engine:Snapshot' :: Snapshot -> Maybe Text
engine} -> Maybe Text
engine) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:engine:Snapshot' :: Maybe Text
engine = Maybe Text
a} :: Snapshot)

-- | 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@
snapshot_preferredMaintenanceWindow :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_preferredMaintenanceWindow :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_preferredMaintenanceWindow = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
preferredMaintenanceWindow :: Maybe Text
$sel:preferredMaintenanceWindow:Snapshot' :: Snapshot -> Maybe Text
preferredMaintenanceWindow} -> Maybe Text
preferredMaintenanceWindow) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:preferredMaintenanceWindow:Snapshot' :: Maybe Text
preferredMaintenanceWindow = Maybe Text
a} :: Snapshot)

-- | The Amazon Resource Name (ARN) for the topic used by the source cluster
-- for publishing notifications.
snapshot_topicArn :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_topicArn :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_topicArn = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
topicArn :: Maybe Text
$sel:topicArn:Snapshot' :: Snapshot -> Maybe Text
topicArn} -> Maybe Text
topicArn) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:topicArn:Snapshot' :: Maybe Text
topicArn = Maybe Text
a} :: Snapshot)

-- | The ID of the KMS key used to encrypt the snapshot.
snapshot_kmsKeyId :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_kmsKeyId :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_kmsKeyId = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:Snapshot' :: Snapshot -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:kmsKeyId:Snapshot' :: Maybe Text
kmsKeyId = Maybe Text
a} :: Snapshot)

-- | A list of the cache nodes in the source cluster.
snapshot_nodeSnapshots :: Lens.Lens' Snapshot (Prelude.Maybe [NodeSnapshot])
snapshot_nodeSnapshots :: (Maybe [NodeSnapshot] -> f (Maybe [NodeSnapshot]))
-> Snapshot -> f Snapshot
snapshot_nodeSnapshots = (Snapshot -> Maybe [NodeSnapshot])
-> (Snapshot -> Maybe [NodeSnapshot] -> Snapshot)
-> Lens
     Snapshot Snapshot (Maybe [NodeSnapshot]) (Maybe [NodeSnapshot])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe [NodeSnapshot]
nodeSnapshots :: Maybe [NodeSnapshot]
$sel:nodeSnapshots:Snapshot' :: Snapshot -> Maybe [NodeSnapshot]
nodeSnapshots} -> Maybe [NodeSnapshot]
nodeSnapshots) (\s :: Snapshot
s@Snapshot' {} Maybe [NodeSnapshot]
a -> Snapshot
s {$sel:nodeSnapshots:Snapshot' :: Maybe [NodeSnapshot]
nodeSnapshots = Maybe [NodeSnapshot]
a} :: Snapshot) ((Maybe [NodeSnapshot] -> f (Maybe [NodeSnapshot]))
 -> Snapshot -> f Snapshot)
-> ((Maybe [NodeSnapshot] -> f (Maybe [NodeSnapshot]))
    -> Maybe [NodeSnapshot] -> f (Maybe [NodeSnapshot]))
-> (Maybe [NodeSnapshot] -> f (Maybe [NodeSnapshot]))
-> Snapshot
-> f Snapshot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [NodeSnapshot] [NodeSnapshot] [NodeSnapshot] [NodeSnapshot]
-> Iso
     (Maybe [NodeSnapshot])
     (Maybe [NodeSnapshot])
     (Maybe [NodeSnapshot])
     (Maybe [NodeSnapshot])
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 [NodeSnapshot] [NodeSnapshot] [NodeSnapshot] [NodeSnapshot]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | The name of the Availability Zone in which the source cluster is
-- located.
snapshot_preferredAvailabilityZone :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_preferredAvailabilityZone :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_preferredAvailabilityZone = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
preferredAvailabilityZone :: Maybe Text
$sel:preferredAvailabilityZone:Snapshot' :: Snapshot -> Maybe Text
preferredAvailabilityZone} -> Maybe Text
preferredAvailabilityZone) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:preferredAvailabilityZone:Snapshot' :: Maybe Text
preferredAvailabilityZone = Maybe Text
a} :: Snapshot)

-- | The number of node groups (shards) in this snapshot. When restoring from
-- a snapshot, the number of node groups (shards) in the snapshot and in
-- the restored replication group must be the same.
snapshot_numNodeGroups :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Int)
snapshot_numNodeGroups :: (Maybe Int -> f (Maybe Int)) -> Snapshot -> f Snapshot
snapshot_numNodeGroups = (Snapshot -> Maybe Int)
-> (Snapshot -> Maybe Int -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Int
numNodeGroups :: Maybe Int
$sel:numNodeGroups:Snapshot' :: Snapshot -> Maybe Int
numNodeGroups} -> Maybe Int
numNodeGroups) (\s :: Snapshot
s@Snapshot' {} Maybe Int
a -> Snapshot
s {$sel:numNodeGroups:Snapshot' :: Maybe Int
numNodeGroups = Maybe Int
a} :: Snapshot)

-- | For an automatic snapshot, the number of days for which ElastiCache
-- retains the snapshot before deleting it.
--
-- For manual snapshots, this field reflects the @SnapshotRetentionLimit@
-- for the source cluster when the snapshot was created. This field is
-- otherwise ignored: Manual snapshots do not expire, and can only be
-- deleted using the @DeleteSnapshot@ operation.
--
-- __Important__ If the value of SnapshotRetentionLimit is set to zero (0),
-- backups are turned off.
snapshot_snapshotRetentionLimit :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Int)
snapshot_snapshotRetentionLimit :: (Maybe Int -> f (Maybe Int)) -> Snapshot -> f Snapshot
snapshot_snapshotRetentionLimit = (Snapshot -> Maybe Int)
-> (Snapshot -> Maybe Int -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Int
snapshotRetentionLimit :: Maybe Int
$sel:snapshotRetentionLimit:Snapshot' :: Snapshot -> Maybe Int
snapshotRetentionLimit} -> Maybe Int
snapshotRetentionLimit) (\s :: Snapshot
s@Snapshot' {} Maybe Int
a -> Snapshot
s {$sel:snapshotRetentionLimit:Snapshot' :: Maybe Int
snapshotRetentionLimit = Maybe Int
a} :: Snapshot)

-- | The name of a snapshot. For an automatic snapshot, the name is
-- system-generated. For a manual snapshot, this is the user-provided name.
snapshot_snapshotName :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_snapshotName :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_snapshotName = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
snapshotName :: Maybe Text
$sel:snapshotName:Snapshot' :: Snapshot -> Maybe Text
snapshotName} -> Maybe Text
snapshotName) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:snapshotName:Snapshot' :: Maybe Text
snapshotName = Maybe Text
a} :: Snapshot)

-- | The ARN (Amazon Resource Name) of the preferred outpost.
snapshot_preferredOutpostArn :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_preferredOutpostArn :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_preferredOutpostArn = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
preferredOutpostArn :: Maybe Text
$sel:preferredOutpostArn:Snapshot' :: Snapshot -> Maybe Text
preferredOutpostArn} -> Maybe Text
preferredOutpostArn) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:preferredOutpostArn:Snapshot' :: Maybe Text
preferredOutpostArn = Maybe Text
a} :: Snapshot)

-- | The unique identifier of the source replication group.
snapshot_replicationGroupId :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_replicationGroupId :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_replicationGroupId = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
replicationGroupId :: Maybe Text
$sel:replicationGroupId:Snapshot' :: Snapshot -> Maybe Text
replicationGroupId} -> Maybe Text
replicationGroupId) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:replicationGroupId:Snapshot' :: Maybe Text
replicationGroupId = Maybe Text
a} :: Snapshot)

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

-- | The port number used by each cache nodes in the source cluster.
snapshot_port :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Int)
snapshot_port :: (Maybe Int -> f (Maybe Int)) -> Snapshot -> f Snapshot
snapshot_port = (Snapshot -> Maybe Int)
-> (Snapshot -> Maybe Int -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Int
port :: Maybe Int
$sel:port:Snapshot' :: Snapshot -> Maybe Int
port} -> Maybe Int
port) (\s :: Snapshot
s@Snapshot' {} Maybe Int
a -> Snapshot
s {$sel:port:Snapshot' :: Maybe Int
port = Maybe Int
a} :: Snapshot)

-- | Indicates the status of automatic failover for the source Redis
-- replication group.
snapshot_automaticFailover :: Lens.Lens' Snapshot (Prelude.Maybe AutomaticFailoverStatus)
snapshot_automaticFailover :: (Maybe AutomaticFailoverStatus
 -> f (Maybe AutomaticFailoverStatus))
-> Snapshot -> f Snapshot
snapshot_automaticFailover = (Snapshot -> Maybe AutomaticFailoverStatus)
-> (Snapshot -> Maybe AutomaticFailoverStatus -> Snapshot)
-> Lens
     Snapshot
     Snapshot
     (Maybe AutomaticFailoverStatus)
     (Maybe AutomaticFailoverStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe AutomaticFailoverStatus
automaticFailover :: Maybe AutomaticFailoverStatus
$sel:automaticFailover:Snapshot' :: Snapshot -> Maybe AutomaticFailoverStatus
automaticFailover} -> Maybe AutomaticFailoverStatus
automaticFailover) (\s :: Snapshot
s@Snapshot' {} Maybe AutomaticFailoverStatus
a -> Snapshot
s {$sel:automaticFailover:Snapshot' :: Maybe AutomaticFailoverStatus
automaticFailover = Maybe AutomaticFailoverStatus
a} :: Snapshot)

-- | Indicates whether the snapshot is from an automatic backup (@automated@)
-- or was created manually (@manual@).
snapshot_snapshotSource :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_snapshotSource :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_snapshotSource = (Snapshot -> Maybe Text)
-> (Snapshot -> Maybe Text -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Text
snapshotSource :: Maybe Text
$sel:snapshotSource:Snapshot' :: Snapshot -> Maybe Text
snapshotSource} -> Maybe Text
snapshotSource) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:snapshotSource:Snapshot' :: Maybe Text
snapshotSource = Maybe Text
a} :: Snapshot)

instance Core.FromXML Snapshot where
  parseXML :: [Node] -> Either String Snapshot
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [NodeSnapshot]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe AutomaticFailoverStatus
-> Maybe Text
-> Snapshot
Snapshot'
      (Maybe Text
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [NodeSnapshot]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> Maybe AutomaticFailoverStatus
 -> Maybe Text
 -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
forall (f :: * -> *) a b. Functor 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 ISO8601
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 ISO8601
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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
"CacheParameterGroupName")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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
"ReplicationGroupDescription")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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
"VpcId")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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
"SnapshotStatus")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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
"TopicArn")
      Either
  String
  (Maybe Text
   -> Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [NodeSnapshot]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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
"KmsKeyId")
      Either
  String
  (Maybe [NodeSnapshot]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe [NodeSnapshot])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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
"NodeSnapshots" 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 [NodeSnapshot]))
-> Either String (Maybe [NodeSnapshot])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [NodeSnapshot])
-> [Node] -> Either String (Maybe [NodeSnapshot])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [NodeSnapshot]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"NodeSnapshot")
                  )
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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
"NumNodeGroups")
      Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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
"SnapshotName")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe Int
      -> Maybe AutomaticFailoverStatus
      -> Maybe Text
      -> Snapshot)
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 Int
   -> Maybe Int
   -> Maybe AutomaticFailoverStatus
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Int
      -> Maybe AutomaticFailoverStatus -> Maybe Text -> Snapshot)
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")
      Either
  String
  (Maybe Int
   -> Maybe AutomaticFailoverStatus -> Maybe Text -> Snapshot)
-> Either String (Maybe Int)
-> Either
     String (Maybe AutomaticFailoverStatus -> Maybe Text -> Snapshot)
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
"Port")
      Either
  String (Maybe AutomaticFailoverStatus -> Maybe Text -> Snapshot)
-> Either String (Maybe AutomaticFailoverStatus)
-> Either String (Maybe Text -> Snapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe AutomaticFailoverStatus)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutomaticFailover")
      Either String (Maybe Text -> Snapshot)
-> Either String (Maybe Text) -> Either String Snapshot
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
"SnapshotSource")

instance Prelude.Hashable Snapshot

instance Prelude.NFData Snapshot