{-# 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.DocumentDB.Types.DBClusterSnapshot
-- 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.DocumentDB.Types.DBClusterSnapshot where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Detailed information about a cluster snapshot.
--
-- /See:/ 'newDBClusterSnapshot' smart constructor.
data DBClusterSnapshot = DBClusterSnapshot'
  { -- | Provides the version of the database engine for this cluster snapshot.
    DBClusterSnapshot -> Maybe Text
engineVersion :: Prelude.Maybe Prelude.Text,
    -- | Specifies the status of this cluster snapshot.
    DBClusterSnapshot -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the cluster snapshot is encrypted.
    DBClusterSnapshot -> Maybe Bool
storageEncrypted :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the cluster identifier of the cluster that this cluster
    -- snapshot was created from.
    DBClusterSnapshot -> Maybe Text
dbClusterIdentifier :: Prelude.Maybe Prelude.Text,
    -- | Provides the master user name for the cluster snapshot.
    DBClusterSnapshot -> Maybe Text
masterUsername :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) for the cluster snapshot.
    DBClusterSnapshot -> Maybe Text
dbClusterSnapshotArn :: Prelude.Maybe Prelude.Text,
    -- | Provides the virtual private cloud (VPC) ID that is associated with the
    -- cluster snapshot.
    DBClusterSnapshot -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the identifier for the cluster snapshot.
    DBClusterSnapshot -> Maybe Text
dbClusterSnapshotIdentifier :: Prelude.Maybe Prelude.Text,
    -- | Specifies the name of the database engine.
    DBClusterSnapshot -> Maybe Text
engine :: Prelude.Maybe Prelude.Text,
    -- | Provides the list of Amazon EC2 Availability Zones that instances in the
    -- cluster snapshot can be restored in.
    DBClusterSnapshot -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | Provides the type of the cluster snapshot.
    DBClusterSnapshot -> Maybe Text
snapshotType :: Prelude.Maybe Prelude.Text,
    -- | If @StorageEncrypted@ is @true@, the KMS key identifier for the
    -- encrypted cluster snapshot.
    DBClusterSnapshot -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Provides the time when the snapshot was taken, in UTC.
    DBClusterSnapshot -> Maybe ISO8601
snapshotCreateTime :: Prelude.Maybe Core.ISO8601,
    -- | If the cluster snapshot was copied from a source cluster snapshot, the
    -- ARN for the source cluster snapshot; otherwise, a null value.
    DBClusterSnapshot -> Maybe Text
sourceDBClusterSnapshotArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies the time when the cluster was created, in Universal
    -- Coordinated Time (UTC).
    DBClusterSnapshot -> Maybe ISO8601
clusterCreateTime :: Prelude.Maybe Core.ISO8601,
    -- | Specifies the percentage of the estimated data that has been
    -- transferred.
    DBClusterSnapshot -> Maybe Int
percentProgress :: Prelude.Maybe Prelude.Int,
    -- | Specifies the port that the cluster was listening on at the time of the
    -- snapshot.
    DBClusterSnapshot -> Maybe Int
port :: Prelude.Maybe Prelude.Int
  }
  deriving (DBClusterSnapshot -> DBClusterSnapshot -> Bool
(DBClusterSnapshot -> DBClusterSnapshot -> Bool)
-> (DBClusterSnapshot -> DBClusterSnapshot -> Bool)
-> Eq DBClusterSnapshot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBClusterSnapshot -> DBClusterSnapshot -> Bool
$c/= :: DBClusterSnapshot -> DBClusterSnapshot -> Bool
== :: DBClusterSnapshot -> DBClusterSnapshot -> Bool
$c== :: DBClusterSnapshot -> DBClusterSnapshot -> Bool
Prelude.Eq, ReadPrec [DBClusterSnapshot]
ReadPrec DBClusterSnapshot
Int -> ReadS DBClusterSnapshot
ReadS [DBClusterSnapshot]
(Int -> ReadS DBClusterSnapshot)
-> ReadS [DBClusterSnapshot]
-> ReadPrec DBClusterSnapshot
-> ReadPrec [DBClusterSnapshot]
-> Read DBClusterSnapshot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DBClusterSnapshot]
$creadListPrec :: ReadPrec [DBClusterSnapshot]
readPrec :: ReadPrec DBClusterSnapshot
$creadPrec :: ReadPrec DBClusterSnapshot
readList :: ReadS [DBClusterSnapshot]
$creadList :: ReadS [DBClusterSnapshot]
readsPrec :: Int -> ReadS DBClusterSnapshot
$creadsPrec :: Int -> ReadS DBClusterSnapshot
Prelude.Read, Int -> DBClusterSnapshot -> ShowS
[DBClusterSnapshot] -> ShowS
DBClusterSnapshot -> String
(Int -> DBClusterSnapshot -> ShowS)
-> (DBClusterSnapshot -> String)
-> ([DBClusterSnapshot] -> ShowS)
-> Show DBClusterSnapshot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DBClusterSnapshot] -> ShowS
$cshowList :: [DBClusterSnapshot] -> ShowS
show :: DBClusterSnapshot -> String
$cshow :: DBClusterSnapshot -> String
showsPrec :: Int -> DBClusterSnapshot -> ShowS
$cshowsPrec :: Int -> DBClusterSnapshot -> ShowS
Prelude.Show, (forall x. DBClusterSnapshot -> Rep DBClusterSnapshot x)
-> (forall x. Rep DBClusterSnapshot x -> DBClusterSnapshot)
-> Generic DBClusterSnapshot
forall x. Rep DBClusterSnapshot x -> DBClusterSnapshot
forall x. DBClusterSnapshot -> Rep DBClusterSnapshot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DBClusterSnapshot x -> DBClusterSnapshot
$cfrom :: forall x. DBClusterSnapshot -> Rep DBClusterSnapshot x
Prelude.Generic)

-- |
-- Create a value of 'DBClusterSnapshot' 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', 'dbClusterSnapshot_engineVersion' - Provides the version of the database engine for this cluster snapshot.
--
-- 'status', 'dbClusterSnapshot_status' - Specifies the status of this cluster snapshot.
--
-- 'storageEncrypted', 'dbClusterSnapshot_storageEncrypted' - Specifies whether the cluster snapshot is encrypted.
--
-- 'dbClusterIdentifier', 'dbClusterSnapshot_dbClusterIdentifier' - Specifies the cluster identifier of the cluster that this cluster
-- snapshot was created from.
--
-- 'masterUsername', 'dbClusterSnapshot_masterUsername' - Provides the master user name for the cluster snapshot.
--
-- 'dbClusterSnapshotArn', 'dbClusterSnapshot_dbClusterSnapshotArn' - The Amazon Resource Name (ARN) for the cluster snapshot.
--
-- 'vpcId', 'dbClusterSnapshot_vpcId' - Provides the virtual private cloud (VPC) ID that is associated with the
-- cluster snapshot.
--
-- 'dbClusterSnapshotIdentifier', 'dbClusterSnapshot_dbClusterSnapshotIdentifier' - Specifies the identifier for the cluster snapshot.
--
-- 'engine', 'dbClusterSnapshot_engine' - Specifies the name of the database engine.
--
-- 'availabilityZones', 'dbClusterSnapshot_availabilityZones' - Provides the list of Amazon EC2 Availability Zones that instances in the
-- cluster snapshot can be restored in.
--
-- 'snapshotType', 'dbClusterSnapshot_snapshotType' - Provides the type of the cluster snapshot.
--
-- 'kmsKeyId', 'dbClusterSnapshot_kmsKeyId' - If @StorageEncrypted@ is @true@, the KMS key identifier for the
-- encrypted cluster snapshot.
--
-- 'snapshotCreateTime', 'dbClusterSnapshot_snapshotCreateTime' - Provides the time when the snapshot was taken, in UTC.
--
-- 'sourceDBClusterSnapshotArn', 'dbClusterSnapshot_sourceDBClusterSnapshotArn' - If the cluster snapshot was copied from a source cluster snapshot, the
-- ARN for the source cluster snapshot; otherwise, a null value.
--
-- 'clusterCreateTime', 'dbClusterSnapshot_clusterCreateTime' - Specifies the time when the cluster was created, in Universal
-- Coordinated Time (UTC).
--
-- 'percentProgress', 'dbClusterSnapshot_percentProgress' - Specifies the percentage of the estimated data that has been
-- transferred.
--
-- 'port', 'dbClusterSnapshot_port' - Specifies the port that the cluster was listening on at the time of the
-- snapshot.
newDBClusterSnapshot ::
  DBClusterSnapshot
newDBClusterSnapshot :: DBClusterSnapshot
newDBClusterSnapshot =
  DBClusterSnapshot' :: Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe Int
-> Maybe Int
-> DBClusterSnapshot
DBClusterSnapshot'
    { $sel:engineVersion:DBClusterSnapshot' :: Maybe Text
engineVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DBClusterSnapshot' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:storageEncrypted:DBClusterSnapshot' :: Maybe Bool
storageEncrypted = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterIdentifier:DBClusterSnapshot' :: Maybe Text
dbClusterIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:masterUsername:DBClusterSnapshot' :: Maybe Text
masterUsername = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterSnapshotArn:DBClusterSnapshot' :: Maybe Text
dbClusterSnapshotArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:DBClusterSnapshot' :: Maybe Text
vpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbClusterSnapshotIdentifier:DBClusterSnapshot' :: Maybe Text
dbClusterSnapshotIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:engine:DBClusterSnapshot' :: Maybe Text
engine = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:availabilityZones:DBClusterSnapshot' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotType:DBClusterSnapshot' :: Maybe Text
snapshotType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:DBClusterSnapshot' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotCreateTime:DBClusterSnapshot' :: Maybe ISO8601
snapshotCreateTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceDBClusterSnapshotArn:DBClusterSnapshot' :: Maybe Text
sourceDBClusterSnapshotArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterCreateTime:DBClusterSnapshot' :: Maybe ISO8601
clusterCreateTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
      $sel:percentProgress:DBClusterSnapshot' :: Maybe Int
percentProgress = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:port:DBClusterSnapshot' :: Maybe Int
port = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | Provides the version of the database engine for this cluster snapshot.
dbClusterSnapshot_engineVersion :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_engineVersion :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_engineVersion = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
engineVersion :: Maybe Text
$sel:engineVersion:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
engineVersion} -> Maybe Text
engineVersion) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:engineVersion:DBClusterSnapshot' :: Maybe Text
engineVersion = Maybe Text
a} :: DBClusterSnapshot)

-- | Specifies the status of this cluster snapshot.
dbClusterSnapshot_status :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_status :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_status = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
status :: Maybe Text
$sel:status:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
status} -> Maybe Text
status) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:status:DBClusterSnapshot' :: Maybe Text
status = Maybe Text
a} :: DBClusterSnapshot)

-- | Specifies whether the cluster snapshot is encrypted.
dbClusterSnapshot_storageEncrypted :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Bool)
dbClusterSnapshot_storageEncrypted :: (Maybe Bool -> f (Maybe Bool))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_storageEncrypted = (DBClusterSnapshot -> Maybe Bool)
-> (DBClusterSnapshot -> Maybe Bool -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Bool
storageEncrypted :: Maybe Bool
$sel:storageEncrypted:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Bool
storageEncrypted} -> Maybe Bool
storageEncrypted) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Bool
a -> DBClusterSnapshot
s {$sel:storageEncrypted:DBClusterSnapshot' :: Maybe Bool
storageEncrypted = Maybe Bool
a} :: DBClusterSnapshot)

-- | Specifies the cluster identifier of the cluster that this cluster
-- snapshot was created from.
dbClusterSnapshot_dbClusterIdentifier :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_dbClusterIdentifier :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_dbClusterIdentifier = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
dbClusterIdentifier :: Maybe Text
$sel:dbClusterIdentifier:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
dbClusterIdentifier} -> Maybe Text
dbClusterIdentifier) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:dbClusterIdentifier:DBClusterSnapshot' :: Maybe Text
dbClusterIdentifier = Maybe Text
a} :: DBClusterSnapshot)

-- | Provides the master user name for the cluster snapshot.
dbClusterSnapshot_masterUsername :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_masterUsername :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_masterUsername = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
masterUsername :: Maybe Text
$sel:masterUsername:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
masterUsername} -> Maybe Text
masterUsername) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:masterUsername:DBClusterSnapshot' :: Maybe Text
masterUsername = Maybe Text
a} :: DBClusterSnapshot)

-- | The Amazon Resource Name (ARN) for the cluster snapshot.
dbClusterSnapshot_dbClusterSnapshotArn :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_dbClusterSnapshotArn :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_dbClusterSnapshotArn = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
dbClusterSnapshotArn :: Maybe Text
$sel:dbClusterSnapshotArn:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
dbClusterSnapshotArn} -> Maybe Text
dbClusterSnapshotArn) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:dbClusterSnapshotArn:DBClusterSnapshot' :: Maybe Text
dbClusterSnapshotArn = Maybe Text
a} :: DBClusterSnapshot)

-- | Provides the virtual private cloud (VPC) ID that is associated with the
-- cluster snapshot.
dbClusterSnapshot_vpcId :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_vpcId :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_vpcId = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:vpcId:DBClusterSnapshot' :: Maybe Text
vpcId = Maybe Text
a} :: DBClusterSnapshot)

-- | Specifies the identifier for the cluster snapshot.
dbClusterSnapshot_dbClusterSnapshotIdentifier :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_dbClusterSnapshotIdentifier :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_dbClusterSnapshotIdentifier = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
dbClusterSnapshotIdentifier :: Maybe Text
$sel:dbClusterSnapshotIdentifier:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
dbClusterSnapshotIdentifier} -> Maybe Text
dbClusterSnapshotIdentifier) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:dbClusterSnapshotIdentifier:DBClusterSnapshot' :: Maybe Text
dbClusterSnapshotIdentifier = Maybe Text
a} :: DBClusterSnapshot)

-- | Specifies the name of the database engine.
dbClusterSnapshot_engine :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_engine :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_engine = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
engine :: Maybe Text
$sel:engine:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
engine} -> Maybe Text
engine) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:engine:DBClusterSnapshot' :: Maybe Text
engine = Maybe Text
a} :: DBClusterSnapshot)

-- | Provides the list of Amazon EC2 Availability Zones that instances in the
-- cluster snapshot can be restored in.
dbClusterSnapshot_availabilityZones :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe [Prelude.Text])
dbClusterSnapshot_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_availabilityZones = (DBClusterSnapshot -> Maybe [Text])
-> (DBClusterSnapshot -> Maybe [Text] -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe [Text]
a -> DBClusterSnapshot
s {$sel:availabilityZones:DBClusterSnapshot' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: DBClusterSnapshot) ((Maybe [Text] -> f (Maybe [Text]))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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

-- | Provides the type of the cluster snapshot.
dbClusterSnapshot_snapshotType :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_snapshotType :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_snapshotType = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
snapshotType :: Maybe Text
$sel:snapshotType:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
snapshotType} -> Maybe Text
snapshotType) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:snapshotType:DBClusterSnapshot' :: Maybe Text
snapshotType = Maybe Text
a} :: DBClusterSnapshot)

-- | If @StorageEncrypted@ is @true@, the KMS key identifier for the
-- encrypted cluster snapshot.
dbClusterSnapshot_kmsKeyId :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_kmsKeyId = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:kmsKeyId:DBClusterSnapshot' :: Maybe Text
kmsKeyId = Maybe Text
a} :: DBClusterSnapshot)

-- | Provides the time when the snapshot was taken, in UTC.
dbClusterSnapshot_snapshotCreateTime :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.UTCTime)
dbClusterSnapshot_snapshotCreateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_snapshotCreateTime = (DBClusterSnapshot -> Maybe ISO8601)
-> (DBClusterSnapshot -> Maybe ISO8601 -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe ISO8601
snapshotCreateTime :: Maybe ISO8601
$sel:snapshotCreateTime:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe ISO8601
snapshotCreateTime} -> Maybe ISO8601
snapshotCreateTime) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe ISO8601
a -> DBClusterSnapshot
s {$sel:snapshotCreateTime:DBClusterSnapshot' :: Maybe ISO8601
snapshotCreateTime = Maybe ISO8601
a} :: DBClusterSnapshot) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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

-- | If the cluster snapshot was copied from a source cluster snapshot, the
-- ARN for the source cluster snapshot; otherwise, a null value.
dbClusterSnapshot_sourceDBClusterSnapshotArn :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_sourceDBClusterSnapshotArn :: (Maybe Text -> f (Maybe Text))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_sourceDBClusterSnapshotArn = (DBClusterSnapshot -> Maybe Text)
-> (DBClusterSnapshot -> Maybe Text -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Text
sourceDBClusterSnapshotArn :: Maybe Text
$sel:sourceDBClusterSnapshotArn:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
sourceDBClusterSnapshotArn} -> Maybe Text
sourceDBClusterSnapshotArn) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Text
a -> DBClusterSnapshot
s {$sel:sourceDBClusterSnapshotArn:DBClusterSnapshot' :: Maybe Text
sourceDBClusterSnapshotArn = Maybe Text
a} :: DBClusterSnapshot)

-- | Specifies the time when the cluster was created, in Universal
-- Coordinated Time (UTC).
dbClusterSnapshot_clusterCreateTime :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.UTCTime)
dbClusterSnapshot_clusterCreateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_clusterCreateTime = (DBClusterSnapshot -> Maybe ISO8601)
-> (DBClusterSnapshot -> Maybe ISO8601 -> DBClusterSnapshot)
-> Lens
     DBClusterSnapshot DBClusterSnapshot (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe ISO8601
clusterCreateTime :: Maybe ISO8601
$sel:clusterCreateTime:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe ISO8601
clusterCreateTime} -> Maybe ISO8601
clusterCreateTime) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe ISO8601
a -> DBClusterSnapshot
s {$sel:clusterCreateTime:DBClusterSnapshot' :: Maybe ISO8601
clusterCreateTime = Maybe ISO8601
a} :: DBClusterSnapshot) ((Maybe ISO8601 -> f (Maybe ISO8601))
 -> DBClusterSnapshot -> f DBClusterSnapshot)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DBClusterSnapshot
-> f DBClusterSnapshot
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

-- | Specifies the percentage of the estimated data that has been
-- transferred.
dbClusterSnapshot_percentProgress :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Int)
dbClusterSnapshot_percentProgress :: (Maybe Int -> f (Maybe Int))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_percentProgress = (DBClusterSnapshot -> Maybe Int)
-> (DBClusterSnapshot -> Maybe Int -> DBClusterSnapshot)
-> Lens DBClusterSnapshot DBClusterSnapshot (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Int
percentProgress :: Maybe Int
$sel:percentProgress:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Int
percentProgress} -> Maybe Int
percentProgress) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Int
a -> DBClusterSnapshot
s {$sel:percentProgress:DBClusterSnapshot' :: Maybe Int
percentProgress = Maybe Int
a} :: DBClusterSnapshot)

-- | Specifies the port that the cluster was listening on at the time of the
-- snapshot.
dbClusterSnapshot_port :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Int)
dbClusterSnapshot_port :: (Maybe Int -> f (Maybe Int))
-> DBClusterSnapshot -> f DBClusterSnapshot
dbClusterSnapshot_port = (DBClusterSnapshot -> Maybe Int)
-> (DBClusterSnapshot -> Maybe Int -> DBClusterSnapshot)
-> Lens DBClusterSnapshot DBClusterSnapshot (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DBClusterSnapshot' {Maybe Int
port :: Maybe Int
$sel:port:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Int
port} -> Maybe Int
port) (\s :: DBClusterSnapshot
s@DBClusterSnapshot' {} Maybe Int
a -> DBClusterSnapshot
s {$sel:port:DBClusterSnapshot' :: Maybe Int
port = Maybe Int
a} :: DBClusterSnapshot)

instance Core.FromXML DBClusterSnapshot where
  parseXML :: [Node] -> Either String DBClusterSnapshot
parseXML [Node]
x =
    Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe ISO8601
-> Maybe Int
-> Maybe Int
-> DBClusterSnapshot
DBClusterSnapshot'
      (Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Int
 -> Maybe Int
 -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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 Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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
"Status")
      Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> 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 ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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
"StorageEncrypted")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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
"DBClusterIdentifier")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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 Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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
"DBClusterSnapshotArn")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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 ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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
"DBClusterSnapshotIdentifier")
      Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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 ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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
"AvailabilityZones"
                      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
"AvailabilityZone")
                  )
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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 ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Int
      -> Maybe Int
      -> DBClusterSnapshot)
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 ISO8601
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Int
   -> Maybe Int
   -> DBClusterSnapshot)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601 -> Maybe Int -> Maybe Int -> DBClusterSnapshot)
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 ISO8601 -> Maybe Int -> Maybe Int -> DBClusterSnapshot)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601 -> Maybe Int -> Maybe Int -> DBClusterSnapshot)
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
"SourceDBClusterSnapshotArn")
      Either
  String
  (Maybe ISO8601 -> Maybe Int -> Maybe Int -> DBClusterSnapshot)
-> Either String (Maybe ISO8601)
-> Either String (Maybe Int -> Maybe Int -> DBClusterSnapshot)
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 Int -> Maybe Int -> DBClusterSnapshot)
-> Either String (Maybe Int)
-> Either String (Maybe Int -> DBClusterSnapshot)
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
"PercentProgress")
      Either String (Maybe Int -> DBClusterSnapshot)
-> Either String (Maybe Int) -> Either String DBClusterSnapshot
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")

instance Prelude.Hashable DBClusterSnapshot

instance Prelude.NFData DBClusterSnapshot