{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DocumentDB.Types.DBClusterSnapshot where

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

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

-- | 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 :: Lens' DBClusterSnapshot (Maybe [Text])
dbClusterSnapshot_availabilityZones = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the time when the cluster was created, in Universal
-- Coordinated Time (UTC).
dbClusterSnapshot_clusterCreateTime :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.UTCTime)
dbClusterSnapshot_clusterCreateTime :: Lens' DBClusterSnapshot (Maybe UTCTime)
dbClusterSnapshot_clusterCreateTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | 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 :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_dbClusterIdentifier = 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)

-- | The Amazon Resource Name (ARN) for the cluster snapshot.
dbClusterSnapshot_dbClusterSnapshotArn :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_dbClusterSnapshotArn :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_dbClusterSnapshotArn = 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)

-- | Specifies the identifier for the cluster snapshot.
dbClusterSnapshot_dbClusterSnapshotIdentifier :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_dbClusterSnapshotIdentifier :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_dbClusterSnapshotIdentifier = 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 :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_engine = 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 version of the database engine for this cluster snapshot.
dbClusterSnapshot_engineVersion :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_engineVersion :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_engineVersion = 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)

-- | If @StorageEncrypted@ is @true@, the KMS key identifier for the
-- encrypted cluster snapshot.
dbClusterSnapshot_kmsKeyId :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_kmsKeyId :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_kmsKeyId = 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 master user name for the cluster snapshot.
dbClusterSnapshot_masterUsername :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_masterUsername :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_masterUsername = 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)

-- | Specifies the percentage of the estimated data that has been
-- transferred.
dbClusterSnapshot_percentProgress :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Int)
dbClusterSnapshot_percentProgress :: Lens' DBClusterSnapshot (Maybe Int)
dbClusterSnapshot_percentProgress = 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 :: Lens' DBClusterSnapshot (Maybe Int)
dbClusterSnapshot_port = 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)

-- | Provides the time when the snapshot was taken, in UTC.
dbClusterSnapshot_snapshotCreateTime :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.UTCTime)
dbClusterSnapshot_snapshotCreateTime :: Lens' DBClusterSnapshot (Maybe UTCTime)
dbClusterSnapshot_snapshotCreateTime = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Provides the type of the cluster snapshot.
dbClusterSnapshot_snapshotType :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_snapshotType :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_snapshotType = 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 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 :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_sourceDBClusterSnapshotArn = 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 status of this cluster snapshot.
dbClusterSnapshot_status :: Lens.Lens' DBClusterSnapshot (Prelude.Maybe Prelude.Text)
dbClusterSnapshot_status :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_status = 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 :: Lens' DBClusterSnapshot (Maybe Bool)
dbClusterSnapshot_storageEncrypted = 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)

-- | 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 :: Lens' DBClusterSnapshot (Maybe Text)
dbClusterSnapshot_vpcId = 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)

instance Data.FromXML DBClusterSnapshot where
  parseXML :: [Node] -> Either String DBClusterSnapshot
parseXML [Node]
x =
    Maybe [Text]
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> DBClusterSnapshot
DBClusterSnapshot'
      forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
                      forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"AvailabilityZones"
                      forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                      forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"AvailabilityZone")
                  )
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"ClusterCreateTime")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBClusterIdentifier")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBClusterSnapshotArn")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DBClusterSnapshotIdentifier")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Engine")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"EngineVersion")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"KmsKeyId")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"MasterUsername")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"PercentProgress")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Port")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SnapshotCreateTime")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SnapshotType")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"SourceDBClusterSnapshotArn")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Status")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"StorageEncrypted")
      forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"VpcId")

instance Prelude.Hashable DBClusterSnapshot where
  hashWithSalt :: Int -> DBClusterSnapshot -> Int
hashWithSalt Int
_salt DBClusterSnapshot' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe Text
Maybe ISO8601
vpcId :: Maybe Text
storageEncrypted :: Maybe Bool
status :: Maybe Text
sourceDBClusterSnapshotArn :: Maybe Text
snapshotType :: Maybe Text
snapshotCreateTime :: Maybe ISO8601
port :: Maybe Int
percentProgress :: Maybe Int
masterUsername :: Maybe Text
kmsKeyId :: Maybe Text
engineVersion :: Maybe Text
engine :: Maybe Text
dbClusterSnapshotIdentifier :: Maybe Text
dbClusterSnapshotArn :: Maybe Text
dbClusterIdentifier :: Maybe Text
clusterCreateTime :: Maybe ISO8601
availabilityZones :: Maybe [Text]
$sel:vpcId:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:storageEncrypted:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Bool
$sel:status:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:sourceDBClusterSnapshotArn:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:snapshotType:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:snapshotCreateTime:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe ISO8601
$sel:port:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Int
$sel:percentProgress:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Int
$sel:masterUsername:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:kmsKeyId:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:engineVersion:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:engine:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:dbClusterSnapshotIdentifier:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:dbClusterSnapshotArn:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:dbClusterIdentifier:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:clusterCreateTime:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe ISO8601
$sel:availabilityZones:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
availabilityZones
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
clusterCreateTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbClusterIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbClusterSnapshotArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dbClusterSnapshotIdentifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engine
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
engineVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
masterUsername
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
percentProgress
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
port
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
snapshotCreateTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snapshotType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceDBClusterSnapshotArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
storageEncrypted
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId

instance Prelude.NFData DBClusterSnapshot where
  rnf :: DBClusterSnapshot -> ()
rnf DBClusterSnapshot' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe Text
Maybe ISO8601
vpcId :: Maybe Text
storageEncrypted :: Maybe Bool
status :: Maybe Text
sourceDBClusterSnapshotArn :: Maybe Text
snapshotType :: Maybe Text
snapshotCreateTime :: Maybe ISO8601
port :: Maybe Int
percentProgress :: Maybe Int
masterUsername :: Maybe Text
kmsKeyId :: Maybe Text
engineVersion :: Maybe Text
engine :: Maybe Text
dbClusterSnapshotIdentifier :: Maybe Text
dbClusterSnapshotArn :: Maybe Text
dbClusterIdentifier :: Maybe Text
clusterCreateTime :: Maybe ISO8601
availabilityZones :: Maybe [Text]
$sel:vpcId:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:storageEncrypted:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Bool
$sel:status:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:sourceDBClusterSnapshotArn:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:snapshotType:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:snapshotCreateTime:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe ISO8601
$sel:port:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Int
$sel:percentProgress:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Int
$sel:masterUsername:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:kmsKeyId:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:engineVersion:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:engine:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:dbClusterSnapshotIdentifier:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:dbClusterSnapshotArn:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:dbClusterIdentifier:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe Text
$sel:clusterCreateTime:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe ISO8601
$sel:availabilityZones:DBClusterSnapshot' :: DBClusterSnapshot -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
availabilityZones
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
clusterCreateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbClusterIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbClusterSnapshotArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dbClusterSnapshotIdentifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engine
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
engineVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
masterUsername
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
percentProgress
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
snapshotCreateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snapshotType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceDBClusterSnapshotArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
storageEncrypted
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId