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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Internal
import Amazonka.Redshift.Types.AccountWithRestoreAccess
import Amazonka.Redshift.Types.Tag

-- | Describes a snapshot.
--
-- /See:/ 'newSnapshot' smart constructor.
data Snapshot = Snapshot'
  { -- | The snapshot status. The value of the status depends on the API
    -- operation used:
    --
    -- -   CreateClusterSnapshot and CopyClusterSnapshot returns status as
    --     \"creating\".
    --
    -- -   DescribeClusterSnapshots returns status as \"creating\",
    --     \"available\", \"final snapshot\", or \"failed\".
    --
    -- -   DeleteClusterSnapshot returns status as \"deleted\".
    Snapshot -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The list of node types that this cluster snapshot is able to restore
    -- into.
    Snapshot -> Maybe [Text]
restorableNodeTypes :: Prelude.Maybe [Prelude.Text],
    -- | A list of the Amazon Web Services accounts authorized to restore the
    -- snapshot. Returns @null@ if no accounts are authorized. Visible only to
    -- the snapshot owner.
    Snapshot -> Maybe [AccountWithRestoreAccess]
accountsWithRestoreAccess :: Prelude.Maybe [AccountWithRestoreAccess],
    -- | The number of days that a manual snapshot is retained. If the value is
    -- -1, the manual snapshot is retained indefinitely.
    --
    -- The value must be either -1 or an integer between 1 and 3,653.
    Snapshot -> Maybe Int
manualSnapshotRetentionPeriod :: Prelude.Maybe Prelude.Int,
    -- | An option that specifies whether to create the cluster with enhanced VPC
    -- routing enabled. To create a cluster that uses enhanced VPC routing, the
    -- cluster must be in a VPC. For more information, see
    -- <https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html Enhanced VPC Routing>
    -- in the Amazon Redshift Cluster Management Guide.
    --
    -- If this option is @true@, enhanced VPC routing is enabled.
    --
    -- Default: false
    Snapshot -> Maybe Bool
enhancedVpcRouting :: Prelude.Maybe Prelude.Bool,
    -- | The snapshot identifier that is provided in the request.
    Snapshot -> Maybe Text
snapshotIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The cluster version of the cluster used to create the snapshot. For
    -- example, 1.0.15503.
    Snapshot -> Maybe Text
engineFullVersion :: Prelude.Maybe Prelude.Text,
    -- | A boolean that indicates whether the snapshot data is encrypted using
    -- the HSM keys of the source cluster. @true@ indicates that the data is
    -- encrypted using HSM keys.
    Snapshot -> Maybe Bool
encryptedWithHSM :: Prelude.Maybe Prelude.Bool,
    -- | The admin user name for the cluster.
    Snapshot -> Maybe Text
masterUsername :: Prelude.Maybe Prelude.Text,
    -- | The source region from which the snapshot was copied.
    Snapshot -> Maybe Text
sourceRegion :: Prelude.Maybe Prelude.Text,
    -- | The name of the maintenance track for the snapshot.
    Snapshot -> Maybe Text
maintenanceTrackName :: Prelude.Maybe Prelude.Text,
    -- | A timestamp representing the start of the retention period for the
    -- snapshot.
    Snapshot -> Maybe ISO8601
snapshotRetentionStartTime :: Prelude.Maybe Core.ISO8601,
    -- | The number of days until a manual snapshot will pass its retention
    -- period.
    Snapshot -> Maybe Int
manualSnapshotRemainingDays :: Prelude.Maybe Prelude.Int,
    -- | The VPC identifier of the cluster if the snapshot is from a cluster in a
    -- VPC. Otherwise, this field is not in the output.
    Snapshot -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | The number of megabytes that have been transferred to the snapshot
    -- backup.
    Snapshot -> Maybe Double
backupProgressInMegaBytes :: Prelude.Maybe Prelude.Double,
    -- | If @true@, the data in the snapshot is encrypted at rest.
    Snapshot -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
    -- | The identifier of the cluster for which the snapshot was taken.
    Snapshot -> Maybe Text
clusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The number of nodes in the cluster.
    Snapshot -> Maybe Int
numberOfNodes :: Prelude.Maybe Prelude.Int,
    -- | The snapshot type. Snapshots created using CreateClusterSnapshot and
    -- CopyClusterSnapshot are of type \"manual\".
    Snapshot -> Maybe Text
snapshotType :: Prelude.Maybe Prelude.Text,
    -- | The Key Management Service (KMS) key ID of the encryption key that was
    -- used to encrypt data in the cluster from which the snapshot was taken.
    Snapshot -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The Availability Zone in which the cluster was created.
    Snapshot -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
    -- | The number of megabytes per second being transferred to the snapshot
    -- backup. Returns @0@ for a completed backup.
    Snapshot -> Maybe Double
currentBackupRateInMegaBytesPerSecond :: Prelude.Maybe Prelude.Double,
    -- | The time (in UTC format) when Amazon Redshift began the snapshot. A
    -- snapshot contains a copy of the cluster data as of this exact time.
    Snapshot -> Maybe ISO8601
snapshotCreateTime :: Prelude.Maybe Core.ISO8601,
    -- | The version ID of the Amazon Redshift engine that is running on the
    -- cluster.
    Snapshot -> Maybe Text
clusterVersion :: Prelude.Maybe Prelude.Text,
    -- | For manual snapshots, the Amazon Web Services account used to create or
    -- copy the snapshot. For automatic snapshots, the owner of the cluster.
    -- The owner can perform all snapshot actions, such as sharing a manual
    -- snapshot.
    Snapshot -> Maybe Text
ownerAccount :: Prelude.Maybe Prelude.Text,
    -- | The node type of the nodes in the cluster.
    Snapshot -> Maybe Text
nodeType :: Prelude.Maybe Prelude.Text,
    -- | The amount of time an in-progress snapshot backup has been running, or
    -- the amount of time it took a completed backup to finish.
    Snapshot -> Maybe Integer
elapsedTimeInSeconds :: Prelude.Maybe Prelude.Integer,
    -- | The time (UTC) when the cluster was originally created.
    Snapshot -> Maybe ISO8601
clusterCreateTime :: Prelude.Maybe Core.ISO8601,
    -- | The estimate of the time remaining before the snapshot backup will
    -- complete. Returns @0@ for a completed backup.
    Snapshot -> Maybe Integer
estimatedSecondsToCompletion :: Prelude.Maybe Prelude.Integer,
    -- | The size of the incremental backup.
    Snapshot -> Maybe Double
actualIncrementalBackupSizeInMegaBytes :: Prelude.Maybe Prelude.Double,
    -- | The list of tags for the cluster snapshot.
    Snapshot -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The port that the cluster is listening on.
    Snapshot -> Maybe Int
port :: Prelude.Maybe Prelude.Int,
    -- | The size of the complete set of backup data that would be used to
    -- restore the cluster.
    Snapshot -> Maybe Double
totalBackupSizeInMegaBytes :: Prelude.Maybe Prelude.Double,
    -- | The name of the database that was created when the cluster was created.
    Snapshot -> Maybe Text
dbName :: 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:
--
-- 'status', 'snapshot_status' - The snapshot status. The value of the status depends on the API
-- operation used:
--
-- -   CreateClusterSnapshot and CopyClusterSnapshot returns status as
--     \"creating\".
--
-- -   DescribeClusterSnapshots returns status as \"creating\",
--     \"available\", \"final snapshot\", or \"failed\".
--
-- -   DeleteClusterSnapshot returns status as \"deleted\".
--
-- 'restorableNodeTypes', 'snapshot_restorableNodeTypes' - The list of node types that this cluster snapshot is able to restore
-- into.
--
-- 'accountsWithRestoreAccess', 'snapshot_accountsWithRestoreAccess' - A list of the Amazon Web Services accounts authorized to restore the
-- snapshot. Returns @null@ if no accounts are authorized. Visible only to
-- the snapshot owner.
--
-- 'manualSnapshotRetentionPeriod', 'snapshot_manualSnapshotRetentionPeriod' - The number of days that a manual snapshot is retained. If the value is
-- -1, the manual snapshot is retained indefinitely.
--
-- The value must be either -1 or an integer between 1 and 3,653.
--
-- 'enhancedVpcRouting', 'snapshot_enhancedVpcRouting' - An option that specifies whether to create the cluster with enhanced VPC
-- routing enabled. To create a cluster that uses enhanced VPC routing, the
-- cluster must be in a VPC. For more information, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html Enhanced VPC Routing>
-- in the Amazon Redshift Cluster Management Guide.
--
-- If this option is @true@, enhanced VPC routing is enabled.
--
-- Default: false
--
-- 'snapshotIdentifier', 'snapshot_snapshotIdentifier' - The snapshot identifier that is provided in the request.
--
-- 'engineFullVersion', 'snapshot_engineFullVersion' - The cluster version of the cluster used to create the snapshot. For
-- example, 1.0.15503.
--
-- 'encryptedWithHSM', 'snapshot_encryptedWithHSM' - A boolean that indicates whether the snapshot data is encrypted using
-- the HSM keys of the source cluster. @true@ indicates that the data is
-- encrypted using HSM keys.
--
-- 'masterUsername', 'snapshot_masterUsername' - The admin user name for the cluster.
--
-- 'sourceRegion', 'snapshot_sourceRegion' - The source region from which the snapshot was copied.
--
-- 'maintenanceTrackName', 'snapshot_maintenanceTrackName' - The name of the maintenance track for the snapshot.
--
-- 'snapshotRetentionStartTime', 'snapshot_snapshotRetentionStartTime' - A timestamp representing the start of the retention period for the
-- snapshot.
--
-- 'manualSnapshotRemainingDays', 'snapshot_manualSnapshotRemainingDays' - The number of days until a manual snapshot will pass its retention
-- period.
--
-- 'vpcId', 'snapshot_vpcId' - The VPC identifier of the cluster if the snapshot is from a cluster in a
-- VPC. Otherwise, this field is not in the output.
--
-- 'backupProgressInMegaBytes', 'snapshot_backupProgressInMegaBytes' - The number of megabytes that have been transferred to the snapshot
-- backup.
--
-- 'encrypted', 'snapshot_encrypted' - If @true@, the data in the snapshot is encrypted at rest.
--
-- 'clusterIdentifier', 'snapshot_clusterIdentifier' - The identifier of the cluster for which the snapshot was taken.
--
-- 'numberOfNodes', 'snapshot_numberOfNodes' - The number of nodes in the cluster.
--
-- 'snapshotType', 'snapshot_snapshotType' - The snapshot type. Snapshots created using CreateClusterSnapshot and
-- CopyClusterSnapshot are of type \"manual\".
--
-- 'kmsKeyId', 'snapshot_kmsKeyId' - The Key Management Service (KMS) key ID of the encryption key that was
-- used to encrypt data in the cluster from which the snapshot was taken.
--
-- 'availabilityZone', 'snapshot_availabilityZone' - The Availability Zone in which the cluster was created.
--
-- 'currentBackupRateInMegaBytesPerSecond', 'snapshot_currentBackupRateInMegaBytesPerSecond' - The number of megabytes per second being transferred to the snapshot
-- backup. Returns @0@ for a completed backup.
--
-- 'snapshotCreateTime', 'snapshot_snapshotCreateTime' - The time (in UTC format) when Amazon Redshift began the snapshot. A
-- snapshot contains a copy of the cluster data as of this exact time.
--
-- 'clusterVersion', 'snapshot_clusterVersion' - The version ID of the Amazon Redshift engine that is running on the
-- cluster.
--
-- 'ownerAccount', 'snapshot_ownerAccount' - For manual snapshots, the Amazon Web Services account used to create or
-- copy the snapshot. For automatic snapshots, the owner of the cluster.
-- The owner can perform all snapshot actions, such as sharing a manual
-- snapshot.
--
-- 'nodeType', 'snapshot_nodeType' - The node type of the nodes in the cluster.
--
-- 'elapsedTimeInSeconds', 'snapshot_elapsedTimeInSeconds' - The amount of time an in-progress snapshot backup has been running, or
-- the amount of time it took a completed backup to finish.
--
-- 'clusterCreateTime', 'snapshot_clusterCreateTime' - The time (UTC) when the cluster was originally created.
--
-- 'estimatedSecondsToCompletion', 'snapshot_estimatedSecondsToCompletion' - The estimate of the time remaining before the snapshot backup will
-- complete. Returns @0@ for a completed backup.
--
-- 'actualIncrementalBackupSizeInMegaBytes', 'snapshot_actualIncrementalBackupSizeInMegaBytes' - The size of the incremental backup.
--
-- 'tags', 'snapshot_tags' - The list of tags for the cluster snapshot.
--
-- 'port', 'snapshot_port' - The port that the cluster is listening on.
--
-- 'totalBackupSizeInMegaBytes', 'snapshot_totalBackupSizeInMegaBytes' - The size of the complete set of backup data that would be used to
-- restore the cluster.
--
-- 'dbName', 'snapshot_dbName' - The name of the database that was created when the cluster was created.
newSnapshot ::
  Snapshot
newSnapshot :: Snapshot
newSnapshot =
  Snapshot' :: Maybe Text
-> Maybe [Text]
-> Maybe [AccountWithRestoreAccess]
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ISO8601
-> Maybe Integer
-> Maybe Double
-> Maybe [Tag]
-> Maybe Int
-> Maybe Double
-> Maybe Text
-> Snapshot
Snapshot'
    { $sel:status:Snapshot' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:restorableNodeTypes:Snapshot' :: Maybe [Text]
restorableNodeTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:accountsWithRestoreAccess:Snapshot' :: Maybe [AccountWithRestoreAccess]
accountsWithRestoreAccess = Maybe [AccountWithRestoreAccess]
forall a. Maybe a
Prelude.Nothing,
      $sel:manualSnapshotRetentionPeriod:Snapshot' :: Maybe Int
manualSnapshotRetentionPeriod = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:enhancedVpcRouting:Snapshot' :: Maybe Bool
enhancedVpcRouting = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotIdentifier:Snapshot' :: Maybe Text
snapshotIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engineFullVersion:Snapshot' :: Maybe Text
engineFullVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encryptedWithHSM:Snapshot' :: Maybe Bool
encryptedWithHSM = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:masterUsername:Snapshot' :: Maybe Text
masterUsername = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceRegion:Snapshot' :: Maybe Text
sourceRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maintenanceTrackName:Snapshot' :: Maybe Text
maintenanceTrackName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotRetentionStartTime:Snapshot' :: Maybe ISO8601
snapshotRetentionStartTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:manualSnapshotRemainingDays:Snapshot' :: Maybe Int
manualSnapshotRemainingDays = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:Snapshot' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:backupProgressInMegaBytes:Snapshot' :: Maybe Double
backupProgressInMegaBytes = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:encrypted:Snapshot' :: Maybe Bool
encrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterIdentifier:Snapshot' :: Maybe Text
clusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfNodes:Snapshot' :: Maybe Int
numberOfNodes = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotType:Snapshot' :: Maybe Text
snapshotType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:Snapshot' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZone:Snapshot' :: Maybe Text
availabilityZone = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:currentBackupRateInMegaBytesPerSecond:Snapshot' :: Maybe Double
currentBackupRateInMegaBytesPerSecond =
        Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotCreateTime:Snapshot' :: Maybe ISO8601
snapshotCreateTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterVersion:Snapshot' :: Maybe Text
clusterVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccount:Snapshot' :: Maybe Text
ownerAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nodeType:Snapshot' :: Maybe Text
nodeType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:elapsedTimeInSeconds:Snapshot' :: Maybe Integer
elapsedTimeInSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterCreateTime:Snapshot' :: Maybe ISO8601
clusterCreateTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:estimatedSecondsToCompletion:Snapshot' :: Maybe Integer
estimatedSecondsToCompletion = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:actualIncrementalBackupSizeInMegaBytes:Snapshot' :: Maybe Double
actualIncrementalBackupSizeInMegaBytes =
        Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Snapshot' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:port:Snapshot' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:totalBackupSizeInMegaBytes:Snapshot' :: Maybe Double
totalBackupSizeInMegaBytes = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:dbName:Snapshot' :: Maybe Text
dbName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The snapshot status. The value of the status depends on the API
-- operation used:
--
-- -   CreateClusterSnapshot and CopyClusterSnapshot returns status as
--     \"creating\".
--
-- -   DescribeClusterSnapshots returns status as \"creating\",
--     \"available\", \"final snapshot\", or \"failed\".
--
-- -   DeleteClusterSnapshot returns status as \"deleted\".
snapshot_status :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_status :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_status = (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
status :: Maybe Text
$sel:status:Snapshot' :: Snapshot -> Maybe Text
status} -> Maybe Text
status) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:status:Snapshot' :: Maybe Text
status = Maybe Text
a} :: Snapshot)

-- | The list of node types that this cluster snapshot is able to restore
-- into.
snapshot_restorableNodeTypes :: Lens.Lens' Snapshot (Prelude.Maybe [Prelude.Text])
snapshot_restorableNodeTypes :: (Maybe [Text] -> f (Maybe [Text])) -> Snapshot -> f Snapshot
snapshot_restorableNodeTypes = (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]
restorableNodeTypes :: Maybe [Text]
$sel:restorableNodeTypes:Snapshot' :: Snapshot -> Maybe [Text]
restorableNodeTypes} -> Maybe [Text]
restorableNodeTypes) (\s :: Snapshot
s@Snapshot' {} Maybe [Text]
a -> Snapshot
s {$sel:restorableNodeTypes:Snapshot' :: Maybe [Text]
restorableNodeTypes = Maybe [Text]
a} :: Snapshot) ((Maybe [Text] -> f (Maybe [Text])) -> Snapshot -> f Snapshot)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Snapshot
-> f Snapshot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of the Amazon Web Services accounts authorized to restore the
-- snapshot. Returns @null@ if no accounts are authorized. Visible only to
-- the snapshot owner.
snapshot_accountsWithRestoreAccess :: Lens.Lens' Snapshot (Prelude.Maybe [AccountWithRestoreAccess])
snapshot_accountsWithRestoreAccess :: (Maybe [AccountWithRestoreAccess]
 -> f (Maybe [AccountWithRestoreAccess]))
-> Snapshot -> f Snapshot
snapshot_accountsWithRestoreAccess = (Snapshot -> Maybe [AccountWithRestoreAccess])
-> (Snapshot -> Maybe [AccountWithRestoreAccess] -> Snapshot)
-> Lens
     Snapshot
     Snapshot
     (Maybe [AccountWithRestoreAccess])
     (Maybe [AccountWithRestoreAccess])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe [AccountWithRestoreAccess]
accountsWithRestoreAccess :: Maybe [AccountWithRestoreAccess]
$sel:accountsWithRestoreAccess:Snapshot' :: Snapshot -> Maybe [AccountWithRestoreAccess]
accountsWithRestoreAccess} -> Maybe [AccountWithRestoreAccess]
accountsWithRestoreAccess) (\s :: Snapshot
s@Snapshot' {} Maybe [AccountWithRestoreAccess]
a -> Snapshot
s {$sel:accountsWithRestoreAccess:Snapshot' :: Maybe [AccountWithRestoreAccess]
accountsWithRestoreAccess = Maybe [AccountWithRestoreAccess]
a} :: Snapshot) ((Maybe [AccountWithRestoreAccess]
  -> f (Maybe [AccountWithRestoreAccess]))
 -> Snapshot -> f Snapshot)
-> ((Maybe [AccountWithRestoreAccess]
     -> f (Maybe [AccountWithRestoreAccess]))
    -> Maybe [AccountWithRestoreAccess]
    -> f (Maybe [AccountWithRestoreAccess]))
-> (Maybe [AccountWithRestoreAccess]
    -> f (Maybe [AccountWithRestoreAccess]))
-> Snapshot
-> f Snapshot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AccountWithRestoreAccess]
  [AccountWithRestoreAccess]
  [AccountWithRestoreAccess]
  [AccountWithRestoreAccess]
-> Iso
     (Maybe [AccountWithRestoreAccess])
     (Maybe [AccountWithRestoreAccess])
     (Maybe [AccountWithRestoreAccess])
     (Maybe [AccountWithRestoreAccess])
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
  [AccountWithRestoreAccess]
  [AccountWithRestoreAccess]
  [AccountWithRestoreAccess]
  [AccountWithRestoreAccess]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of days that a manual snapshot is retained. If the value is
-- -1, the manual snapshot is retained indefinitely.
--
-- The value must be either -1 or an integer between 1 and 3,653.
snapshot_manualSnapshotRetentionPeriod :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Int)
snapshot_manualSnapshotRetentionPeriod :: (Maybe Int -> f (Maybe Int)) -> Snapshot -> f Snapshot
snapshot_manualSnapshotRetentionPeriod = (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
manualSnapshotRetentionPeriod :: Maybe Int
$sel:manualSnapshotRetentionPeriod:Snapshot' :: Snapshot -> Maybe Int
manualSnapshotRetentionPeriod} -> Maybe Int
manualSnapshotRetentionPeriod) (\s :: Snapshot
s@Snapshot' {} Maybe Int
a -> Snapshot
s {$sel:manualSnapshotRetentionPeriod:Snapshot' :: Maybe Int
manualSnapshotRetentionPeriod = Maybe Int
a} :: Snapshot)

-- | An option that specifies whether to create the cluster with enhanced VPC
-- routing enabled. To create a cluster that uses enhanced VPC routing, the
-- cluster must be in a VPC. For more information, see
-- <https://docs.aws.amazon.com/redshift/latest/mgmt/enhanced-vpc-routing.html Enhanced VPC Routing>
-- in the Amazon Redshift Cluster Management Guide.
--
-- If this option is @true@, enhanced VPC routing is enabled.
--
-- Default: false
snapshot_enhancedVpcRouting :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Bool)
snapshot_enhancedVpcRouting :: (Maybe Bool -> f (Maybe Bool)) -> Snapshot -> f Snapshot
snapshot_enhancedVpcRouting = (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
enhancedVpcRouting :: Maybe Bool
$sel:enhancedVpcRouting:Snapshot' :: Snapshot -> Maybe Bool
enhancedVpcRouting} -> Maybe Bool
enhancedVpcRouting) (\s :: Snapshot
s@Snapshot' {} Maybe Bool
a -> Snapshot
s {$sel:enhancedVpcRouting:Snapshot' :: Maybe Bool
enhancedVpcRouting = Maybe Bool
a} :: Snapshot)

-- | The snapshot identifier that is provided in the request.
snapshot_snapshotIdentifier :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_snapshotIdentifier :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_snapshotIdentifier = (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
snapshotIdentifier :: Maybe Text
$sel:snapshotIdentifier:Snapshot' :: Snapshot -> Maybe Text
snapshotIdentifier} -> Maybe Text
snapshotIdentifier) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:snapshotIdentifier:Snapshot' :: Maybe Text
snapshotIdentifier = Maybe Text
a} :: Snapshot)

-- | The cluster version of the cluster used to create the snapshot. For
-- example, 1.0.15503.
snapshot_engineFullVersion :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_engineFullVersion :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_engineFullVersion = (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
engineFullVersion :: Maybe Text
$sel:engineFullVersion:Snapshot' :: Snapshot -> Maybe Text
engineFullVersion} -> Maybe Text
engineFullVersion) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:engineFullVersion:Snapshot' :: Maybe Text
engineFullVersion = Maybe Text
a} :: Snapshot)

-- | A boolean that indicates whether the snapshot data is encrypted using
-- the HSM keys of the source cluster. @true@ indicates that the data is
-- encrypted using HSM keys.
snapshot_encryptedWithHSM :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Bool)
snapshot_encryptedWithHSM :: (Maybe Bool -> f (Maybe Bool)) -> Snapshot -> f Snapshot
snapshot_encryptedWithHSM = (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
encryptedWithHSM :: Maybe Bool
$sel:encryptedWithHSM:Snapshot' :: Snapshot -> Maybe Bool
encryptedWithHSM} -> Maybe Bool
encryptedWithHSM) (\s :: Snapshot
s@Snapshot' {} Maybe Bool
a -> Snapshot
s {$sel:encryptedWithHSM:Snapshot' :: Maybe Bool
encryptedWithHSM = Maybe Bool
a} :: Snapshot)

-- | The admin user name for the cluster.
snapshot_masterUsername :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_masterUsername :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_masterUsername = (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
masterUsername :: Maybe Text
$sel:masterUsername:Snapshot' :: Snapshot -> Maybe Text
masterUsername} -> Maybe Text
masterUsername) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:masterUsername:Snapshot' :: Maybe Text
masterUsername = Maybe Text
a} :: Snapshot)

-- | The source region from which the snapshot was copied.
snapshot_sourceRegion :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_sourceRegion :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_sourceRegion = (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
sourceRegion :: Maybe Text
$sel:sourceRegion:Snapshot' :: Snapshot -> Maybe Text
sourceRegion} -> Maybe Text
sourceRegion) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:sourceRegion:Snapshot' :: Maybe Text
sourceRegion = Maybe Text
a} :: Snapshot)

-- | The name of the maintenance track for the snapshot.
snapshot_maintenanceTrackName :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_maintenanceTrackName :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_maintenanceTrackName = (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
maintenanceTrackName :: Maybe Text
$sel:maintenanceTrackName:Snapshot' :: Snapshot -> Maybe Text
maintenanceTrackName} -> Maybe Text
maintenanceTrackName) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:maintenanceTrackName:Snapshot' :: Maybe Text
maintenanceTrackName = Maybe Text
a} :: Snapshot)

-- | A timestamp representing the start of the retention period for the
-- snapshot.
snapshot_snapshotRetentionStartTime :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.UTCTime)
snapshot_snapshotRetentionStartTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Snapshot -> f Snapshot
snapshot_snapshotRetentionStartTime = (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
snapshotRetentionStartTime :: Maybe ISO8601
$sel:snapshotRetentionStartTime:Snapshot' :: Snapshot -> Maybe ISO8601
snapshotRetentionStartTime} -> Maybe ISO8601
snapshotRetentionStartTime) (\s :: Snapshot
s@Snapshot' {} Maybe ISO8601
a -> Snapshot
s {$sel:snapshotRetentionStartTime:Snapshot' :: Maybe ISO8601
snapshotRetentionStartTime = 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

-- | The number of days until a manual snapshot will pass its retention
-- period.
snapshot_manualSnapshotRemainingDays :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Int)
snapshot_manualSnapshotRemainingDays :: (Maybe Int -> f (Maybe Int)) -> Snapshot -> f Snapshot
snapshot_manualSnapshotRemainingDays = (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
manualSnapshotRemainingDays :: Maybe Int
$sel:manualSnapshotRemainingDays:Snapshot' :: Snapshot -> Maybe Int
manualSnapshotRemainingDays} -> Maybe Int
manualSnapshotRemainingDays) (\s :: Snapshot
s@Snapshot' {} Maybe Int
a -> Snapshot
s {$sel:manualSnapshotRemainingDays:Snapshot' :: Maybe Int
manualSnapshotRemainingDays = Maybe Int
a} :: Snapshot)

-- | The VPC identifier of the cluster if the snapshot is from a cluster in a
-- VPC. Otherwise, this field is not in the output.
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 number of megabytes that have been transferred to the snapshot
-- backup.
snapshot_backupProgressInMegaBytes :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Double)
snapshot_backupProgressInMegaBytes :: (Maybe Double -> f (Maybe Double)) -> Snapshot -> f Snapshot
snapshot_backupProgressInMegaBytes = (Snapshot -> Maybe Double)
-> (Snapshot -> Maybe Double -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Double
backupProgressInMegaBytes :: Maybe Double
$sel:backupProgressInMegaBytes:Snapshot' :: Snapshot -> Maybe Double
backupProgressInMegaBytes} -> Maybe Double
backupProgressInMegaBytes) (\s :: Snapshot
s@Snapshot' {} Maybe Double
a -> Snapshot
s {$sel:backupProgressInMegaBytes:Snapshot' :: Maybe Double
backupProgressInMegaBytes = Maybe Double
a} :: Snapshot)

-- | If @true@, the data in the snapshot is encrypted at rest.
snapshot_encrypted :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Bool)
snapshot_encrypted :: (Maybe Bool -> f (Maybe Bool)) -> Snapshot -> f Snapshot
snapshot_encrypted = (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
encrypted :: Maybe Bool
$sel:encrypted:Snapshot' :: Snapshot -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: Snapshot
s@Snapshot' {} Maybe Bool
a -> Snapshot
s {$sel:encrypted:Snapshot' :: Maybe Bool
encrypted = Maybe Bool
a} :: Snapshot)

-- | The identifier of the cluster for which the snapshot was taken.
snapshot_clusterIdentifier :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_clusterIdentifier :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_clusterIdentifier = (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
clusterIdentifier :: Maybe Text
$sel:clusterIdentifier:Snapshot' :: Snapshot -> Maybe Text
clusterIdentifier} -> Maybe Text
clusterIdentifier) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:clusterIdentifier:Snapshot' :: Maybe Text
clusterIdentifier = Maybe Text
a} :: Snapshot)

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

-- | The snapshot type. Snapshots created using CreateClusterSnapshot and
-- CopyClusterSnapshot are of type \"manual\".
snapshot_snapshotType :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_snapshotType :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_snapshotType = (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
snapshotType :: Maybe Text
$sel:snapshotType:Snapshot' :: Snapshot -> Maybe Text
snapshotType} -> Maybe Text
snapshotType) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:snapshotType:Snapshot' :: Maybe Text
snapshotType = Maybe Text
a} :: Snapshot)

-- | The Key Management Service (KMS) key ID of the encryption key that was
-- used to encrypt data in the cluster from which the snapshot was taken.
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)

-- | The Availability Zone in which the cluster was created.
snapshot_availabilityZone :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_availabilityZone :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_availabilityZone = (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
availabilityZone :: Maybe Text
$sel:availabilityZone:Snapshot' :: Snapshot -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:availabilityZone:Snapshot' :: Maybe Text
availabilityZone = Maybe Text
a} :: Snapshot)

-- | The number of megabytes per second being transferred to the snapshot
-- backup. Returns @0@ for a completed backup.
snapshot_currentBackupRateInMegaBytesPerSecond :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Double)
snapshot_currentBackupRateInMegaBytesPerSecond :: (Maybe Double -> f (Maybe Double)) -> Snapshot -> f Snapshot
snapshot_currentBackupRateInMegaBytesPerSecond = (Snapshot -> Maybe Double)
-> (Snapshot -> Maybe Double -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Double
currentBackupRateInMegaBytesPerSecond :: Maybe Double
$sel:currentBackupRateInMegaBytesPerSecond:Snapshot' :: Snapshot -> Maybe Double
currentBackupRateInMegaBytesPerSecond} -> Maybe Double
currentBackupRateInMegaBytesPerSecond) (\s :: Snapshot
s@Snapshot' {} Maybe Double
a -> Snapshot
s {$sel:currentBackupRateInMegaBytesPerSecond:Snapshot' :: Maybe Double
currentBackupRateInMegaBytesPerSecond = Maybe Double
a} :: Snapshot)

-- | The time (in UTC format) when Amazon Redshift began the snapshot. A
-- snapshot contains a copy of the cluster data as of this exact time.
snapshot_snapshotCreateTime :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.UTCTime)
snapshot_snapshotCreateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Snapshot -> f Snapshot
snapshot_snapshotCreateTime = (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
snapshotCreateTime :: Maybe ISO8601
$sel:snapshotCreateTime:Snapshot' :: Snapshot -> Maybe ISO8601
snapshotCreateTime} -> Maybe ISO8601
snapshotCreateTime) (\s :: Snapshot
s@Snapshot' {} Maybe ISO8601
a -> Snapshot
s {$sel:snapshotCreateTime:Snapshot' :: Maybe ISO8601
snapshotCreateTime = 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

-- | The version ID of the Amazon Redshift engine that is running on the
-- cluster.
snapshot_clusterVersion :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_clusterVersion :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_clusterVersion = (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
clusterVersion :: Maybe Text
$sel:clusterVersion:Snapshot' :: Snapshot -> Maybe Text
clusterVersion} -> Maybe Text
clusterVersion) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:clusterVersion:Snapshot' :: Maybe Text
clusterVersion = Maybe Text
a} :: Snapshot)

-- | For manual snapshots, the Amazon Web Services account used to create or
-- copy the snapshot. For automatic snapshots, the owner of the cluster.
-- The owner can perform all snapshot actions, such as sharing a manual
-- snapshot.
snapshot_ownerAccount :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_ownerAccount :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_ownerAccount = (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
ownerAccount :: Maybe Text
$sel:ownerAccount:Snapshot' :: Snapshot -> Maybe Text
ownerAccount} -> Maybe Text
ownerAccount) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:ownerAccount:Snapshot' :: Maybe Text
ownerAccount = Maybe Text
a} :: Snapshot)

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

-- | The amount of time an in-progress snapshot backup has been running, or
-- the amount of time it took a completed backup to finish.
snapshot_elapsedTimeInSeconds :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Integer)
snapshot_elapsedTimeInSeconds :: (Maybe Integer -> f (Maybe Integer)) -> Snapshot -> f Snapshot
snapshot_elapsedTimeInSeconds = (Snapshot -> Maybe Integer)
-> (Snapshot -> Maybe Integer -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Integer
elapsedTimeInSeconds :: Maybe Integer
$sel:elapsedTimeInSeconds:Snapshot' :: Snapshot -> Maybe Integer
elapsedTimeInSeconds} -> Maybe Integer
elapsedTimeInSeconds) (\s :: Snapshot
s@Snapshot' {} Maybe Integer
a -> Snapshot
s {$sel:elapsedTimeInSeconds:Snapshot' :: Maybe Integer
elapsedTimeInSeconds = Maybe Integer
a} :: Snapshot)

-- | The time (UTC) when the cluster was originally created.
snapshot_clusterCreateTime :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.UTCTime)
snapshot_clusterCreateTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Snapshot -> f Snapshot
snapshot_clusterCreateTime = (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
clusterCreateTime :: Maybe ISO8601
$sel:clusterCreateTime:Snapshot' :: Snapshot -> Maybe ISO8601
clusterCreateTime} -> Maybe ISO8601
clusterCreateTime) (\s :: Snapshot
s@Snapshot' {} Maybe ISO8601
a -> Snapshot
s {$sel:clusterCreateTime:Snapshot' :: Maybe ISO8601
clusterCreateTime = 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

-- | The estimate of the time remaining before the snapshot backup will
-- complete. Returns @0@ for a completed backup.
snapshot_estimatedSecondsToCompletion :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Integer)
snapshot_estimatedSecondsToCompletion :: (Maybe Integer -> f (Maybe Integer)) -> Snapshot -> f Snapshot
snapshot_estimatedSecondsToCompletion = (Snapshot -> Maybe Integer)
-> (Snapshot -> Maybe Integer -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Integer
estimatedSecondsToCompletion :: Maybe Integer
$sel:estimatedSecondsToCompletion:Snapshot' :: Snapshot -> Maybe Integer
estimatedSecondsToCompletion} -> Maybe Integer
estimatedSecondsToCompletion) (\s :: Snapshot
s@Snapshot' {} Maybe Integer
a -> Snapshot
s {$sel:estimatedSecondsToCompletion:Snapshot' :: Maybe Integer
estimatedSecondsToCompletion = Maybe Integer
a} :: Snapshot)

-- | The size of the incremental backup.
snapshot_actualIncrementalBackupSizeInMegaBytes :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Double)
snapshot_actualIncrementalBackupSizeInMegaBytes :: (Maybe Double -> f (Maybe Double)) -> Snapshot -> f Snapshot
snapshot_actualIncrementalBackupSizeInMegaBytes = (Snapshot -> Maybe Double)
-> (Snapshot -> Maybe Double -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Double
actualIncrementalBackupSizeInMegaBytes :: Maybe Double
$sel:actualIncrementalBackupSizeInMegaBytes:Snapshot' :: Snapshot -> Maybe Double
actualIncrementalBackupSizeInMegaBytes} -> Maybe Double
actualIncrementalBackupSizeInMegaBytes) (\s :: Snapshot
s@Snapshot' {} Maybe Double
a -> Snapshot
s {$sel:actualIncrementalBackupSizeInMegaBytes:Snapshot' :: Maybe Double
actualIncrementalBackupSizeInMegaBytes = Maybe Double
a} :: Snapshot)

-- | The list of tags for the cluster snapshot.
snapshot_tags :: Lens.Lens' Snapshot (Prelude.Maybe [Tag])
snapshot_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Snapshot -> f Snapshot
snapshot_tags = (Snapshot -> Maybe [Tag])
-> (Snapshot -> Maybe [Tag] -> Snapshot)
-> Lens Snapshot Snapshot (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Snapshot' :: Snapshot -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Snapshot
s@Snapshot' {} Maybe [Tag]
a -> Snapshot
s {$sel:tags:Snapshot' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Snapshot) ((Maybe [Tag] -> f (Maybe [Tag])) -> Snapshot -> f Snapshot)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Snapshot
-> f Snapshot
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The port that the cluster is listening on.
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)

-- | The size of the complete set of backup data that would be used to
-- restore the cluster.
snapshot_totalBackupSizeInMegaBytes :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Double)
snapshot_totalBackupSizeInMegaBytes :: (Maybe Double -> f (Maybe Double)) -> Snapshot -> f Snapshot
snapshot_totalBackupSizeInMegaBytes = (Snapshot -> Maybe Double)
-> (Snapshot -> Maybe Double -> Snapshot)
-> Lens Snapshot Snapshot (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Snapshot' {Maybe Double
totalBackupSizeInMegaBytes :: Maybe Double
$sel:totalBackupSizeInMegaBytes:Snapshot' :: Snapshot -> Maybe Double
totalBackupSizeInMegaBytes} -> Maybe Double
totalBackupSizeInMegaBytes) (\s :: Snapshot
s@Snapshot' {} Maybe Double
a -> Snapshot
s {$sel:totalBackupSizeInMegaBytes:Snapshot' :: Maybe Double
totalBackupSizeInMegaBytes = Maybe Double
a} :: Snapshot)

-- | The name of the database that was created when the cluster was created.
snapshot_dbName :: Lens.Lens' Snapshot (Prelude.Maybe Prelude.Text)
snapshot_dbName :: (Maybe Text -> f (Maybe Text)) -> Snapshot -> f Snapshot
snapshot_dbName = (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
dbName :: Maybe Text
$sel:dbName:Snapshot' :: Snapshot -> Maybe Text
dbName} -> Maybe Text
dbName) (\s :: Snapshot
s@Snapshot' {} Maybe Text
a -> Snapshot
s {$sel:dbName:Snapshot' :: Maybe Text
dbName = Maybe Text
a} :: Snapshot)

instance Core.FromXML Snapshot where
  parseXML :: [Node] -> Either String Snapshot
parseXML [Node]
x =
    Maybe Text
-> Maybe [Text]
-> Maybe [AccountWithRestoreAccess]
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Int
-> Maybe Text
-> Maybe Double
-> Maybe Bool
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe ISO8601
-> Maybe Integer
-> Maybe Double
-> Maybe [Tag]
-> Maybe Int
-> Maybe Double
-> Maybe Text
-> Snapshot
Snapshot'
      (Maybe Text
 -> Maybe [Text]
 -> Maybe [AccountWithRestoreAccess]
 -> Maybe Int
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Int
 -> Maybe Text
 -> Maybe Double
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Double
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Integer
 -> Maybe ISO8601
 -> Maybe Integer
 -> Maybe Double
 -> Maybe [Tag]
 -> Maybe Int
 -> Maybe Double
 -> Maybe Text
 -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe [AccountWithRestoreAccess]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"Status")
      Either
  String
  (Maybe [Text]
   -> Maybe [AccountWithRestoreAccess]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe [AccountWithRestoreAccess]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"RestorableNodeTypes"
                      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 [Text]))
-> Either String (Maybe [Text])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Text])
-> [Node] -> Either String (Maybe [Text])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Text]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"NodeType")
                  )
      Either
  String
  (Maybe [AccountWithRestoreAccess]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe [AccountWithRestoreAccess])
-> Either
     String
     (Maybe Int
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"AccountsWithRestoreAccess"
                      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 [AccountWithRestoreAccess]))
-> Either String (Maybe [AccountWithRestoreAccess])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [AccountWithRestoreAccess])
-> [Node] -> Either String (Maybe [AccountWithRestoreAccess])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may
                        (Text -> [Node] -> Either String [AccountWithRestoreAccess]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"AccountWithRestoreAccess")
                  )
      Either
  String
  (Maybe Int
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"ManualSnapshotRetentionPeriod")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"EnhancedVpcRouting")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"SnapshotIdentifier")
      Either
  String
  (Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"EngineFullVersion")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"EncryptedWithHSM")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"MasterUsername")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"SourceRegion")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"MaintenanceTrackName")
      Either
  String
  (Maybe ISO8601
   -> Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"SnapshotRetentionStartTime")
      Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"ManualSnapshotRemainingDays")
      Either
  String
  (Maybe Text
   -> Maybe Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Double
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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 Double
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> Maybe Text
      -> Snapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Double)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"BackupProgressInMegaBytes")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"Encrypted")
      Either
  String
  (Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"ClusterIdentifier")
      Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"NumberOfNodes")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"SnapshotType")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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 Text
   -> Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Double
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"AvailabilityZone")
      Either
  String
  (Maybe Double
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> Maybe Text
      -> Snapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Double)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CurrentBackupRateInMegaBytesPerSecond")
      Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"SnapshotCreateTime")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"ClusterVersion")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"OwnerAccount")
      Either
  String
  (Maybe Text
   -> Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Integer
      -> Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"NodeType")
      Either
  String
  (Maybe Integer
   -> Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> Maybe Text
      -> Snapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ElapsedTimeInSeconds")
      Either
  String
  (Maybe ISO8601
   -> Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Integer
      -> Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> 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
"ClusterCreateTime")
      Either
  String
  (Maybe Integer
   -> Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Double
      -> Maybe [Tag]
      -> Maybe Int
      -> Maybe Double
      -> Maybe Text
      -> Snapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EstimatedSecondsToCompletion")
      Either
  String
  (Maybe Double
   -> Maybe [Tag]
   -> Maybe Int
   -> Maybe Double
   -> Maybe Text
   -> Snapshot)
-> Either String (Maybe Double)
-> Either
     String
     (Maybe [Tag]
      -> Maybe Int -> Maybe Double -> Maybe Text -> Snapshot)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Double)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ActualIncrementalBackupSizeInMegaBytes")
      Either
  String
  (Maybe [Tag]
   -> Maybe Int -> Maybe Double -> Maybe Text -> Snapshot)
-> Either String (Maybe [Tag])
-> Either
     String (Maybe Int -> Maybe Double -> 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
"Tags" 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 [Tag]))
-> Either String (Maybe [Tag])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [Tag])
-> [Node] -> Either String (Maybe [Tag])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [Tag]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"Tag")
                  )
      Either String (Maybe Int -> Maybe Double -> Maybe Text -> Snapshot)
-> Either String (Maybe Int)
-> Either String (Maybe Double -> 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 Double -> Maybe Text -> Snapshot)
-> Either String (Maybe Double)
-> 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 Double)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TotalBackupSizeInMegaBytes")
      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
"DBName")

instance Prelude.Hashable Snapshot

instance Prelude.NFData Snapshot