{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.RDS.DescribeDBSnapshots
-- 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)
--
-- Returns information about DB snapshots. This API action supports
-- pagination.
--
-- This operation returns paginated results.
module Amazonka.RDS.DescribeDBSnapshots
  ( -- * Creating a Request
    DescribeDBSnapshots (..),
    newDescribeDBSnapshots,

    -- * Request Lenses
    describeDBSnapshots_includeShared,
    describeDBSnapshots_filters,
    describeDBSnapshots_dbSnapshotIdentifier,
    describeDBSnapshots_snapshotType,
    describeDBSnapshots_dbInstanceIdentifier,
    describeDBSnapshots_marker,
    describeDBSnapshots_maxRecords,
    describeDBSnapshots_includePublic,
    describeDBSnapshots_dbiResourceId,

    -- * Destructuring the Response
    DescribeDBSnapshotsResponse (..),
    newDescribeDBSnapshotsResponse,

    -- * Response Lenses
    describeDBSnapshotsResponse_marker,
    describeDBSnapshotsResponse_dbSnapshots,
    describeDBSnapshotsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDS.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- |
--
-- /See:/ 'newDescribeDBSnapshots' smart constructor.
data DescribeDBSnapshots = DescribeDBSnapshots'
  { -- | A value that indicates whether to include shared manual DB cluster
    -- snapshots from other Amazon Web Services accounts that this Amazon Web
    -- Services account has been given permission to copy or restore. By
    -- default, these snapshots are not included.
    --
    -- You can give an Amazon Web Services account permission to restore a
    -- manual DB snapshot from another Amazon Web Services account by using the
    -- @ModifyDBSnapshotAttribute@ API action.
    DescribeDBSnapshots -> Maybe Bool
includeShared :: Prelude.Maybe Prelude.Bool,
    -- | A filter that specifies one or more DB snapshots to describe.
    --
    -- Supported filters:
    --
    -- -   @db-instance-id@ - Accepts DB instance identifiers and DB instance
    --     Amazon Resource Names (ARNs).
    --
    -- -   @db-snapshot-id@ - Accepts DB snapshot identifiers.
    --
    -- -   @dbi-resource-id@ - Accepts identifiers of source DB instances.
    --
    -- -   @snapshot-type@ - Accepts types of DB snapshots.
    --
    -- -   @engine@ - Accepts names of database engines.
    DescribeDBSnapshots -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | A specific DB snapshot identifier to describe. This parameter can\'t be
    -- used in conjunction with @DBInstanceIdentifier@. This value is stored as
    -- a lowercase string.
    --
    -- Constraints:
    --
    -- -   If supplied, must match the identifier of an existing DBSnapshot.
    --
    -- -   If this identifier is for an automated snapshot, the @SnapshotType@
    --     parameter must also be specified.
    DescribeDBSnapshots -> Maybe Text
dbSnapshotIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The type of snapshots to be returned. You can specify one of the
    -- following values:
    --
    -- -   @automated@ - Return all DB snapshots that have been automatically
    --     taken by Amazon RDS for my Amazon Web Services account.
    --
    -- -   @manual@ - Return all DB snapshots that have been taken by my Amazon
    --     Web Services account.
    --
    -- -   @shared@ - Return all manual DB snapshots that have been shared to
    --     my Amazon Web Services account.
    --
    -- -   @public@ - Return all DB snapshots that have been marked as public.
    --
    -- -   @awsbackup@ - Return the DB snapshots managed by the Amazon Web
    --     Services Backup service.
    --
    --     For information about Amazon Web Services Backup, see the
    --     <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html Amazon Web Services Backup Developer Guide.>
    --
    --     The @awsbackup@ type does not apply to Aurora.
    --
    -- If you don\'t specify a @SnapshotType@ value, then both automated and
    -- manual snapshots are returned. Shared and public DB snapshots are not
    -- included in the returned results by default. You can include shared
    -- snapshots with these results by enabling the @IncludeShared@ parameter.
    -- You can include public snapshots with these results by enabling the
    -- @IncludePublic@ parameter.
    --
    -- The @IncludeShared@ and @IncludePublic@ parameters don\'t apply for
    -- @SnapshotType@ values of @manual@ or @automated@. The @IncludePublic@
    -- parameter doesn\'t apply when @SnapshotType@ is set to @shared@. The
    -- @IncludeShared@ parameter doesn\'t apply when @SnapshotType@ is set to
    -- @public@.
    DescribeDBSnapshots -> Maybe Text
snapshotType :: Prelude.Maybe Prelude.Text,
    -- | The ID of the DB instance to retrieve the list of DB snapshots for. This
    -- parameter can\'t be used in conjunction with @DBSnapshotIdentifier@.
    -- This parameter isn\'t case-sensitive.
    --
    -- Constraints:
    --
    -- -   If supplied, must match the identifier of an existing DBInstance.
    DescribeDBSnapshots -> Maybe Text
dbInstanceIdentifier :: Prelude.Maybe Prelude.Text,
    -- | An optional pagination token provided by a previous
    -- @DescribeDBSnapshots@ request. If this parameter is specified, the
    -- response includes only records beyond the marker, up to the value
    -- specified by @MaxRecords@.
    DescribeDBSnapshots -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of records to include in the response. If more
    -- records exist than the specified @MaxRecords@ value, a pagination token
    -- called a marker is included in the response so that you can retrieve the
    -- remaining results.
    --
    -- Default: 100
    --
    -- Constraints: Minimum 20, maximum 100.
    DescribeDBSnapshots -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
    -- | A value that indicates whether to include manual DB cluster snapshots
    -- that are public and can be copied or restored by any Amazon Web Services
    -- account. By default, the public snapshots are not included.
    --
    -- You can share a manual DB snapshot as public by using the
    -- ModifyDBSnapshotAttribute API.
    DescribeDBSnapshots -> Maybe Bool
includePublic :: Prelude.Maybe Prelude.Bool,
    -- | A specific DB resource ID to describe.
    DescribeDBSnapshots -> Maybe Text
dbiResourceId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeDBSnapshots -> DescribeDBSnapshots -> Bool
(DescribeDBSnapshots -> DescribeDBSnapshots -> Bool)
-> (DescribeDBSnapshots -> DescribeDBSnapshots -> Bool)
-> Eq DescribeDBSnapshots
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBSnapshots -> DescribeDBSnapshots -> Bool
$c/= :: DescribeDBSnapshots -> DescribeDBSnapshots -> Bool
== :: DescribeDBSnapshots -> DescribeDBSnapshots -> Bool
$c== :: DescribeDBSnapshots -> DescribeDBSnapshots -> Bool
Prelude.Eq, ReadPrec [DescribeDBSnapshots]
ReadPrec DescribeDBSnapshots
Int -> ReadS DescribeDBSnapshots
ReadS [DescribeDBSnapshots]
(Int -> ReadS DescribeDBSnapshots)
-> ReadS [DescribeDBSnapshots]
-> ReadPrec DescribeDBSnapshots
-> ReadPrec [DescribeDBSnapshots]
-> Read DescribeDBSnapshots
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBSnapshots]
$creadListPrec :: ReadPrec [DescribeDBSnapshots]
readPrec :: ReadPrec DescribeDBSnapshots
$creadPrec :: ReadPrec DescribeDBSnapshots
readList :: ReadS [DescribeDBSnapshots]
$creadList :: ReadS [DescribeDBSnapshots]
readsPrec :: Int -> ReadS DescribeDBSnapshots
$creadsPrec :: Int -> ReadS DescribeDBSnapshots
Prelude.Read, Int -> DescribeDBSnapshots -> ShowS
[DescribeDBSnapshots] -> ShowS
DescribeDBSnapshots -> String
(Int -> DescribeDBSnapshots -> ShowS)
-> (DescribeDBSnapshots -> String)
-> ([DescribeDBSnapshots] -> ShowS)
-> Show DescribeDBSnapshots
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBSnapshots] -> ShowS
$cshowList :: [DescribeDBSnapshots] -> ShowS
show :: DescribeDBSnapshots -> String
$cshow :: DescribeDBSnapshots -> String
showsPrec :: Int -> DescribeDBSnapshots -> ShowS
$cshowsPrec :: Int -> DescribeDBSnapshots -> ShowS
Prelude.Show, (forall x. DescribeDBSnapshots -> Rep DescribeDBSnapshots x)
-> (forall x. Rep DescribeDBSnapshots x -> DescribeDBSnapshots)
-> Generic DescribeDBSnapshots
forall x. Rep DescribeDBSnapshots x -> DescribeDBSnapshots
forall x. DescribeDBSnapshots -> Rep DescribeDBSnapshots x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDBSnapshots x -> DescribeDBSnapshots
$cfrom :: forall x. DescribeDBSnapshots -> Rep DescribeDBSnapshots x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDBSnapshots' 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:
--
-- 'includeShared', 'describeDBSnapshots_includeShared' - A value that indicates whether to include shared manual DB cluster
-- snapshots from other Amazon Web Services accounts that this Amazon Web
-- Services account has been given permission to copy or restore. By
-- default, these snapshots are not included.
--
-- You can give an Amazon Web Services account permission to restore a
-- manual DB snapshot from another Amazon Web Services account by using the
-- @ModifyDBSnapshotAttribute@ API action.
--
-- 'filters', 'describeDBSnapshots_filters' - A filter that specifies one or more DB snapshots to describe.
--
-- Supported filters:
--
-- -   @db-instance-id@ - Accepts DB instance identifiers and DB instance
--     Amazon Resource Names (ARNs).
--
-- -   @db-snapshot-id@ - Accepts DB snapshot identifiers.
--
-- -   @dbi-resource-id@ - Accepts identifiers of source DB instances.
--
-- -   @snapshot-type@ - Accepts types of DB snapshots.
--
-- -   @engine@ - Accepts names of database engines.
--
-- 'dbSnapshotIdentifier', 'describeDBSnapshots_dbSnapshotIdentifier' - A specific DB snapshot identifier to describe. This parameter can\'t be
-- used in conjunction with @DBInstanceIdentifier@. This value is stored as
-- a lowercase string.
--
-- Constraints:
--
-- -   If supplied, must match the identifier of an existing DBSnapshot.
--
-- -   If this identifier is for an automated snapshot, the @SnapshotType@
--     parameter must also be specified.
--
-- 'snapshotType', 'describeDBSnapshots_snapshotType' - The type of snapshots to be returned. You can specify one of the
-- following values:
--
-- -   @automated@ - Return all DB snapshots that have been automatically
--     taken by Amazon RDS for my Amazon Web Services account.
--
-- -   @manual@ - Return all DB snapshots that have been taken by my Amazon
--     Web Services account.
--
-- -   @shared@ - Return all manual DB snapshots that have been shared to
--     my Amazon Web Services account.
--
-- -   @public@ - Return all DB snapshots that have been marked as public.
--
-- -   @awsbackup@ - Return the DB snapshots managed by the Amazon Web
--     Services Backup service.
--
--     For information about Amazon Web Services Backup, see the
--     <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html Amazon Web Services Backup Developer Guide.>
--
--     The @awsbackup@ type does not apply to Aurora.
--
-- If you don\'t specify a @SnapshotType@ value, then both automated and
-- manual snapshots are returned. Shared and public DB snapshots are not
-- included in the returned results by default. You can include shared
-- snapshots with these results by enabling the @IncludeShared@ parameter.
-- You can include public snapshots with these results by enabling the
-- @IncludePublic@ parameter.
--
-- The @IncludeShared@ and @IncludePublic@ parameters don\'t apply for
-- @SnapshotType@ values of @manual@ or @automated@. The @IncludePublic@
-- parameter doesn\'t apply when @SnapshotType@ is set to @shared@. The
-- @IncludeShared@ parameter doesn\'t apply when @SnapshotType@ is set to
-- @public@.
--
-- 'dbInstanceIdentifier', 'describeDBSnapshots_dbInstanceIdentifier' - The ID of the DB instance to retrieve the list of DB snapshots for. This
-- parameter can\'t be used in conjunction with @DBSnapshotIdentifier@.
-- This parameter isn\'t case-sensitive.
--
-- Constraints:
--
-- -   If supplied, must match the identifier of an existing DBInstance.
--
-- 'marker', 'describeDBSnapshots_marker' - An optional pagination token provided by a previous
-- @DescribeDBSnapshots@ request. If this parameter is specified, the
-- response includes only records beyond the marker, up to the value
-- specified by @MaxRecords@.
--
-- 'maxRecords', 'describeDBSnapshots_maxRecords' - The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a pagination token
-- called a marker is included in the response so that you can retrieve the
-- remaining results.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
--
-- 'includePublic', 'describeDBSnapshots_includePublic' - A value that indicates whether to include manual DB cluster snapshots
-- that are public and can be copied or restored by any Amazon Web Services
-- account. By default, the public snapshots are not included.
--
-- You can share a manual DB snapshot as public by using the
-- ModifyDBSnapshotAttribute API.
--
-- 'dbiResourceId', 'describeDBSnapshots_dbiResourceId' - A specific DB resource ID to describe.
newDescribeDBSnapshots ::
  DescribeDBSnapshots
newDescribeDBSnapshots :: DescribeDBSnapshots
newDescribeDBSnapshots =
  DescribeDBSnapshots' :: Maybe Bool
-> Maybe [Filter]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> Maybe Text
-> DescribeDBSnapshots
DescribeDBSnapshots'
    { $sel:includeShared:DescribeDBSnapshots' :: Maybe Bool
includeShared =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:filters:DescribeDBSnapshots' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
      $sel:dbSnapshotIdentifier:DescribeDBSnapshots' :: Maybe Text
dbSnapshotIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:snapshotType:DescribeDBSnapshots' :: Maybe Text
snapshotType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbInstanceIdentifier:DescribeDBSnapshots' :: Maybe Text
dbInstanceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:marker:DescribeDBSnapshots' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRecords:DescribeDBSnapshots' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:includePublic:DescribeDBSnapshots' :: Maybe Bool
includePublic = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:dbiResourceId:DescribeDBSnapshots' :: Maybe Text
dbiResourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A value that indicates whether to include shared manual DB cluster
-- snapshots from other Amazon Web Services accounts that this Amazon Web
-- Services account has been given permission to copy or restore. By
-- default, these snapshots are not included.
--
-- You can give an Amazon Web Services account permission to restore a
-- manual DB snapshot from another Amazon Web Services account by using the
-- @ModifyDBSnapshotAttribute@ API action.
describeDBSnapshots_includeShared :: Lens.Lens' DescribeDBSnapshots (Prelude.Maybe Prelude.Bool)
describeDBSnapshots_includeShared :: (Maybe Bool -> f (Maybe Bool))
-> DescribeDBSnapshots -> f DescribeDBSnapshots
describeDBSnapshots_includeShared = (DescribeDBSnapshots -> Maybe Bool)
-> (DescribeDBSnapshots -> Maybe Bool -> DescribeDBSnapshots)
-> Lens
     DescribeDBSnapshots DescribeDBSnapshots (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshots' {Maybe Bool
includeShared :: Maybe Bool
$sel:includeShared:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Bool
includeShared} -> Maybe Bool
includeShared) (\s :: DescribeDBSnapshots
s@DescribeDBSnapshots' {} Maybe Bool
a -> DescribeDBSnapshots
s {$sel:includeShared:DescribeDBSnapshots' :: Maybe Bool
includeShared = Maybe Bool
a} :: DescribeDBSnapshots)

-- | A filter that specifies one or more DB snapshots to describe.
--
-- Supported filters:
--
-- -   @db-instance-id@ - Accepts DB instance identifiers and DB instance
--     Amazon Resource Names (ARNs).
--
-- -   @db-snapshot-id@ - Accepts DB snapshot identifiers.
--
-- -   @dbi-resource-id@ - Accepts identifiers of source DB instances.
--
-- -   @snapshot-type@ - Accepts types of DB snapshots.
--
-- -   @engine@ - Accepts names of database engines.
describeDBSnapshots_filters :: Lens.Lens' DescribeDBSnapshots (Prelude.Maybe [Filter])
describeDBSnapshots_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeDBSnapshots -> f DescribeDBSnapshots
describeDBSnapshots_filters = (DescribeDBSnapshots -> Maybe [Filter])
-> (DescribeDBSnapshots -> Maybe [Filter] -> DescribeDBSnapshots)
-> Lens
     DescribeDBSnapshots
     DescribeDBSnapshots
     (Maybe [Filter])
     (Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshots' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeDBSnapshots
s@DescribeDBSnapshots' {} Maybe [Filter]
a -> DescribeDBSnapshots
s {$sel:filters:DescribeDBSnapshots' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeDBSnapshots) ((Maybe [Filter] -> f (Maybe [Filter]))
 -> DescribeDBSnapshots -> f DescribeDBSnapshots)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
    -> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeDBSnapshots
-> f DescribeDBSnapshots
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Filter] [Filter] [Filter] [Filter]
-> Iso
     (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter]) (Maybe [Filter])
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 [Filter] [Filter] [Filter] [Filter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A specific DB snapshot identifier to describe. This parameter can\'t be
-- used in conjunction with @DBInstanceIdentifier@. This value is stored as
-- a lowercase string.
--
-- Constraints:
--
-- -   If supplied, must match the identifier of an existing DBSnapshot.
--
-- -   If this identifier is for an automated snapshot, the @SnapshotType@
--     parameter must also be specified.
describeDBSnapshots_dbSnapshotIdentifier :: Lens.Lens' DescribeDBSnapshots (Prelude.Maybe Prelude.Text)
describeDBSnapshots_dbSnapshotIdentifier :: (Maybe Text -> f (Maybe Text))
-> DescribeDBSnapshots -> f DescribeDBSnapshots
describeDBSnapshots_dbSnapshotIdentifier = (DescribeDBSnapshots -> Maybe Text)
-> (DescribeDBSnapshots -> Maybe Text -> DescribeDBSnapshots)
-> Lens
     DescribeDBSnapshots DescribeDBSnapshots (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshots' {Maybe Text
dbSnapshotIdentifier :: Maybe Text
$sel:dbSnapshotIdentifier:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
dbSnapshotIdentifier} -> Maybe Text
dbSnapshotIdentifier) (\s :: DescribeDBSnapshots
s@DescribeDBSnapshots' {} Maybe Text
a -> DescribeDBSnapshots
s {$sel:dbSnapshotIdentifier:DescribeDBSnapshots' :: Maybe Text
dbSnapshotIdentifier = Maybe Text
a} :: DescribeDBSnapshots)

-- | The type of snapshots to be returned. You can specify one of the
-- following values:
--
-- -   @automated@ - Return all DB snapshots that have been automatically
--     taken by Amazon RDS for my Amazon Web Services account.
--
-- -   @manual@ - Return all DB snapshots that have been taken by my Amazon
--     Web Services account.
--
-- -   @shared@ - Return all manual DB snapshots that have been shared to
--     my Amazon Web Services account.
--
-- -   @public@ - Return all DB snapshots that have been marked as public.
--
-- -   @awsbackup@ - Return the DB snapshots managed by the Amazon Web
--     Services Backup service.
--
--     For information about Amazon Web Services Backup, see the
--     <https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html Amazon Web Services Backup Developer Guide.>
--
--     The @awsbackup@ type does not apply to Aurora.
--
-- If you don\'t specify a @SnapshotType@ value, then both automated and
-- manual snapshots are returned. Shared and public DB snapshots are not
-- included in the returned results by default. You can include shared
-- snapshots with these results by enabling the @IncludeShared@ parameter.
-- You can include public snapshots with these results by enabling the
-- @IncludePublic@ parameter.
--
-- The @IncludeShared@ and @IncludePublic@ parameters don\'t apply for
-- @SnapshotType@ values of @manual@ or @automated@. The @IncludePublic@
-- parameter doesn\'t apply when @SnapshotType@ is set to @shared@. The
-- @IncludeShared@ parameter doesn\'t apply when @SnapshotType@ is set to
-- @public@.
describeDBSnapshots_snapshotType :: Lens.Lens' DescribeDBSnapshots (Prelude.Maybe Prelude.Text)
describeDBSnapshots_snapshotType :: (Maybe Text -> f (Maybe Text))
-> DescribeDBSnapshots -> f DescribeDBSnapshots
describeDBSnapshots_snapshotType = (DescribeDBSnapshots -> Maybe Text)
-> (DescribeDBSnapshots -> Maybe Text -> DescribeDBSnapshots)
-> Lens
     DescribeDBSnapshots DescribeDBSnapshots (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshots' {Maybe Text
snapshotType :: Maybe Text
$sel:snapshotType:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
snapshotType} -> Maybe Text
snapshotType) (\s :: DescribeDBSnapshots
s@DescribeDBSnapshots' {} Maybe Text
a -> DescribeDBSnapshots
s {$sel:snapshotType:DescribeDBSnapshots' :: Maybe Text
snapshotType = Maybe Text
a} :: DescribeDBSnapshots)

-- | The ID of the DB instance to retrieve the list of DB snapshots for. This
-- parameter can\'t be used in conjunction with @DBSnapshotIdentifier@.
-- This parameter isn\'t case-sensitive.
--
-- Constraints:
--
-- -   If supplied, must match the identifier of an existing DBInstance.
describeDBSnapshots_dbInstanceIdentifier :: Lens.Lens' DescribeDBSnapshots (Prelude.Maybe Prelude.Text)
describeDBSnapshots_dbInstanceIdentifier :: (Maybe Text -> f (Maybe Text))
-> DescribeDBSnapshots -> f DescribeDBSnapshots
describeDBSnapshots_dbInstanceIdentifier = (DescribeDBSnapshots -> Maybe Text)
-> (DescribeDBSnapshots -> Maybe Text -> DescribeDBSnapshots)
-> Lens
     DescribeDBSnapshots DescribeDBSnapshots (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshots' {Maybe Text
dbInstanceIdentifier :: Maybe Text
$sel:dbInstanceIdentifier:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
dbInstanceIdentifier} -> Maybe Text
dbInstanceIdentifier) (\s :: DescribeDBSnapshots
s@DescribeDBSnapshots' {} Maybe Text
a -> DescribeDBSnapshots
s {$sel:dbInstanceIdentifier:DescribeDBSnapshots' :: Maybe Text
dbInstanceIdentifier = Maybe Text
a} :: DescribeDBSnapshots)

-- | An optional pagination token provided by a previous
-- @DescribeDBSnapshots@ request. If this parameter is specified, the
-- response includes only records beyond the marker, up to the value
-- specified by @MaxRecords@.
describeDBSnapshots_marker :: Lens.Lens' DescribeDBSnapshots (Prelude.Maybe Prelude.Text)
describeDBSnapshots_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeDBSnapshots -> f DescribeDBSnapshots
describeDBSnapshots_marker = (DescribeDBSnapshots -> Maybe Text)
-> (DescribeDBSnapshots -> Maybe Text -> DescribeDBSnapshots)
-> Lens
     DescribeDBSnapshots DescribeDBSnapshots (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshots' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDBSnapshots
s@DescribeDBSnapshots' {} Maybe Text
a -> DescribeDBSnapshots
s {$sel:marker:DescribeDBSnapshots' :: Maybe Text
marker = Maybe Text
a} :: DescribeDBSnapshots)

-- | The maximum number of records to include in the response. If more
-- records exist than the specified @MaxRecords@ value, a pagination token
-- called a marker is included in the response so that you can retrieve the
-- remaining results.
--
-- Default: 100
--
-- Constraints: Minimum 20, maximum 100.
describeDBSnapshots_maxRecords :: Lens.Lens' DescribeDBSnapshots (Prelude.Maybe Prelude.Int)
describeDBSnapshots_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeDBSnapshots -> f DescribeDBSnapshots
describeDBSnapshots_maxRecords = (DescribeDBSnapshots -> Maybe Int)
-> (DescribeDBSnapshots -> Maybe Int -> DescribeDBSnapshots)
-> Lens
     DescribeDBSnapshots DescribeDBSnapshots (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshots' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeDBSnapshots
s@DescribeDBSnapshots' {} Maybe Int
a -> DescribeDBSnapshots
s {$sel:maxRecords:DescribeDBSnapshots' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeDBSnapshots)

-- | A value that indicates whether to include manual DB cluster snapshots
-- that are public and can be copied or restored by any Amazon Web Services
-- account. By default, the public snapshots are not included.
--
-- You can share a manual DB snapshot as public by using the
-- ModifyDBSnapshotAttribute API.
describeDBSnapshots_includePublic :: Lens.Lens' DescribeDBSnapshots (Prelude.Maybe Prelude.Bool)
describeDBSnapshots_includePublic :: (Maybe Bool -> f (Maybe Bool))
-> DescribeDBSnapshots -> f DescribeDBSnapshots
describeDBSnapshots_includePublic = (DescribeDBSnapshots -> Maybe Bool)
-> (DescribeDBSnapshots -> Maybe Bool -> DescribeDBSnapshots)
-> Lens
     DescribeDBSnapshots DescribeDBSnapshots (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshots' {Maybe Bool
includePublic :: Maybe Bool
$sel:includePublic:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Bool
includePublic} -> Maybe Bool
includePublic) (\s :: DescribeDBSnapshots
s@DescribeDBSnapshots' {} Maybe Bool
a -> DescribeDBSnapshots
s {$sel:includePublic:DescribeDBSnapshots' :: Maybe Bool
includePublic = Maybe Bool
a} :: DescribeDBSnapshots)

-- | A specific DB resource ID to describe.
describeDBSnapshots_dbiResourceId :: Lens.Lens' DescribeDBSnapshots (Prelude.Maybe Prelude.Text)
describeDBSnapshots_dbiResourceId :: (Maybe Text -> f (Maybe Text))
-> DescribeDBSnapshots -> f DescribeDBSnapshots
describeDBSnapshots_dbiResourceId = (DescribeDBSnapshots -> Maybe Text)
-> (DescribeDBSnapshots -> Maybe Text -> DescribeDBSnapshots)
-> Lens
     DescribeDBSnapshots DescribeDBSnapshots (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshots' {Maybe Text
dbiResourceId :: Maybe Text
$sel:dbiResourceId:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
dbiResourceId} -> Maybe Text
dbiResourceId) (\s :: DescribeDBSnapshots
s@DescribeDBSnapshots' {} Maybe Text
a -> DescribeDBSnapshots
s {$sel:dbiResourceId:DescribeDBSnapshots' :: Maybe Text
dbiResourceId = Maybe Text
a} :: DescribeDBSnapshots)

instance Core.AWSPager DescribeDBSnapshots where
  page :: DescribeDBSnapshots
-> AWSResponse DescribeDBSnapshots -> Maybe DescribeDBSnapshots
page DescribeDBSnapshots
rq AWSResponse DescribeDBSnapshots
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDBSnapshots
DescribeDBSnapshotsResponse
rs
            DescribeDBSnapshotsResponse
-> Getting (First Text) DescribeDBSnapshotsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDBSnapshotsResponse
-> Const (First Text) DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe Text)
describeDBSnapshotsResponse_marker
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeDBSnapshotsResponse
 -> Const (First Text) DescribeDBSnapshotsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDBSnapshotsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeDBSnapshots
forall a. Maybe a
Prelude.Nothing
    | Maybe [DBSnapshot] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDBSnapshots
DescribeDBSnapshotsResponse
rs
            DescribeDBSnapshotsResponse
-> Getting
     (First [DBSnapshot]) DescribeDBSnapshotsResponse [DBSnapshot]
-> Maybe [DBSnapshot]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DBSnapshot]
 -> Const (First [DBSnapshot]) (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> Const (First [DBSnapshot]) DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots
              ((Maybe [DBSnapshot]
  -> Const (First [DBSnapshot]) (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse
 -> Const (First [DBSnapshot]) DescribeDBSnapshotsResponse)
-> (([DBSnapshot] -> Const (First [DBSnapshot]) [DBSnapshot])
    -> Maybe [DBSnapshot]
    -> Const (First [DBSnapshot]) (Maybe [DBSnapshot]))
-> Getting
     (First [DBSnapshot]) DescribeDBSnapshotsResponse [DBSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBSnapshot] -> Const (First [DBSnapshot]) [DBSnapshot])
-> Maybe [DBSnapshot]
-> Const (First [DBSnapshot]) (Maybe [DBSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeDBSnapshots
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeDBSnapshots -> Maybe DescribeDBSnapshots
forall a. a -> Maybe a
Prelude.Just (DescribeDBSnapshots -> Maybe DescribeDBSnapshots)
-> DescribeDBSnapshots -> Maybe DescribeDBSnapshots
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeDBSnapshots
rq
          DescribeDBSnapshots
-> (DescribeDBSnapshots -> DescribeDBSnapshots)
-> DescribeDBSnapshots
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeDBSnapshots -> Identity DescribeDBSnapshots
Lens
  DescribeDBSnapshots DescribeDBSnapshots (Maybe Text) (Maybe Text)
describeDBSnapshots_marker
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeDBSnapshots -> Identity DescribeDBSnapshots)
-> Maybe Text -> DescribeDBSnapshots -> DescribeDBSnapshots
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeDBSnapshots
DescribeDBSnapshotsResponse
rs
          DescribeDBSnapshotsResponse
-> Getting (First Text) DescribeDBSnapshotsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDBSnapshotsResponse
-> Const (First Text) DescribeDBSnapshotsResponse
Lens' DescribeDBSnapshotsResponse (Maybe Text)
describeDBSnapshotsResponse_marker
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeDBSnapshotsResponse
 -> Const (First Text) DescribeDBSnapshotsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDBSnapshotsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeDBSnapshots where
  type
    AWSResponse DescribeDBSnapshots =
      DescribeDBSnapshotsResponse
  request :: DescribeDBSnapshots -> Request DescribeDBSnapshots
request = Service -> DescribeDBSnapshots -> Request DescribeDBSnapshots
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDBSnapshots
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDBSnapshots)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DescribeDBSnapshots))
-> Logger
-> Service
-> Proxy DescribeDBSnapshots
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDBSnapshots)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DescribeDBSnapshotsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [DBSnapshot] -> Int -> DescribeDBSnapshotsResponse
DescribeDBSnapshotsResponse'
            (Maybe Text
 -> Maybe [DBSnapshot] -> Int -> DescribeDBSnapshotsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [DBSnapshot] -> Int -> DescribeDBSnapshotsResponse)
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
"Marker")
            Either
  String (Maybe [DBSnapshot] -> Int -> DescribeDBSnapshotsResponse)
-> Either String (Maybe [DBSnapshot])
-> Either String (Int -> DescribeDBSnapshotsResponse)
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
"DBSnapshots" 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 [DBSnapshot]))
-> Either String (Maybe [DBSnapshot])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [DBSnapshot])
-> [Node] -> Either String (Maybe [DBSnapshot])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [DBSnapshot]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"DBSnapshot")
                        )
            Either String (Int -> DescribeDBSnapshotsResponse)
-> Either String Int -> Either String DescribeDBSnapshotsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeDBSnapshots

instance Prelude.NFData DescribeDBSnapshots

instance Core.ToHeaders DescribeDBSnapshots where
  toHeaders :: DescribeDBSnapshots -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeDBSnapshots -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DescribeDBSnapshots where
  toPath :: DescribeDBSnapshots -> ByteString
toPath = ByteString -> DescribeDBSnapshots -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery DescribeDBSnapshots where
  toQuery :: DescribeDBSnapshots -> QueryString
toQuery DescribeDBSnapshots' {Maybe Bool
Maybe Int
Maybe [Filter]
Maybe Text
dbiResourceId :: Maybe Text
includePublic :: Maybe Bool
maxRecords :: Maybe Int
marker :: Maybe Text
dbInstanceIdentifier :: Maybe Text
snapshotType :: Maybe Text
dbSnapshotIdentifier :: Maybe Text
filters :: Maybe [Filter]
includeShared :: Maybe Bool
$sel:dbiResourceId:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
$sel:includePublic:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Bool
$sel:maxRecords:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Int
$sel:marker:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
$sel:dbInstanceIdentifier:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
$sel:snapshotType:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
$sel:dbSnapshotIdentifier:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Text
$sel:filters:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe [Filter]
$sel:includeShared:DescribeDBSnapshots' :: DescribeDBSnapshots -> Maybe Bool
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeDBSnapshots" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"IncludeShared" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
includeShared,
        ByteString
"Filters"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Filter] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"Filter" ([Filter] -> QueryString) -> Maybe [Filter] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        ByteString
"DBSnapshotIdentifier" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbSnapshotIdentifier,
        ByteString
"SnapshotType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotType,
        ByteString
"DBInstanceIdentifier" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbInstanceIdentifier,
        ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
        ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords,
        ByteString
"IncludePublic" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
includePublic,
        ByteString
"DbiResourceId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbiResourceId
      ]

-- | Contains the result of a successful invocation of the
-- @DescribeDBSnapshots@ action.
--
-- /See:/ 'newDescribeDBSnapshotsResponse' smart constructor.
data DescribeDBSnapshotsResponse = DescribeDBSnapshotsResponse'
  { -- | An optional pagination token provided by a previous request. If this
    -- parameter is specified, the response includes only records beyond the
    -- marker, up to the value specified by @MaxRecords@.
    DescribeDBSnapshotsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
    -- | A list of @DBSnapshot@ instances.
    DescribeDBSnapshotsResponse -> Maybe [DBSnapshot]
dbSnapshots :: Prelude.Maybe [DBSnapshot],
    -- | The response's http status code.
    DescribeDBSnapshotsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDBSnapshotsResponse -> DescribeDBSnapshotsResponse -> Bool
(DescribeDBSnapshotsResponse
 -> DescribeDBSnapshotsResponse -> Bool)
-> (DescribeDBSnapshotsResponse
    -> DescribeDBSnapshotsResponse -> Bool)
-> Eq DescribeDBSnapshotsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBSnapshotsResponse -> DescribeDBSnapshotsResponse -> Bool
$c/= :: DescribeDBSnapshotsResponse -> DescribeDBSnapshotsResponse -> Bool
== :: DescribeDBSnapshotsResponse -> DescribeDBSnapshotsResponse -> Bool
$c== :: DescribeDBSnapshotsResponse -> DescribeDBSnapshotsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDBSnapshotsResponse]
ReadPrec DescribeDBSnapshotsResponse
Int -> ReadS DescribeDBSnapshotsResponse
ReadS [DescribeDBSnapshotsResponse]
(Int -> ReadS DescribeDBSnapshotsResponse)
-> ReadS [DescribeDBSnapshotsResponse]
-> ReadPrec DescribeDBSnapshotsResponse
-> ReadPrec [DescribeDBSnapshotsResponse]
-> Read DescribeDBSnapshotsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBSnapshotsResponse]
$creadListPrec :: ReadPrec [DescribeDBSnapshotsResponse]
readPrec :: ReadPrec DescribeDBSnapshotsResponse
$creadPrec :: ReadPrec DescribeDBSnapshotsResponse
readList :: ReadS [DescribeDBSnapshotsResponse]
$creadList :: ReadS [DescribeDBSnapshotsResponse]
readsPrec :: Int -> ReadS DescribeDBSnapshotsResponse
$creadsPrec :: Int -> ReadS DescribeDBSnapshotsResponse
Prelude.Read, Int -> DescribeDBSnapshotsResponse -> ShowS
[DescribeDBSnapshotsResponse] -> ShowS
DescribeDBSnapshotsResponse -> String
(Int -> DescribeDBSnapshotsResponse -> ShowS)
-> (DescribeDBSnapshotsResponse -> String)
-> ([DescribeDBSnapshotsResponse] -> ShowS)
-> Show DescribeDBSnapshotsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBSnapshotsResponse] -> ShowS
$cshowList :: [DescribeDBSnapshotsResponse] -> ShowS
show :: DescribeDBSnapshotsResponse -> String
$cshow :: DescribeDBSnapshotsResponse -> String
showsPrec :: Int -> DescribeDBSnapshotsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDBSnapshotsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDBSnapshotsResponse -> Rep DescribeDBSnapshotsResponse x)
-> (forall x.
    Rep DescribeDBSnapshotsResponse x -> DescribeDBSnapshotsResponse)
-> Generic DescribeDBSnapshotsResponse
forall x.
Rep DescribeDBSnapshotsResponse x -> DescribeDBSnapshotsResponse
forall x.
DescribeDBSnapshotsResponse -> Rep DescribeDBSnapshotsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDBSnapshotsResponse x -> DescribeDBSnapshotsResponse
$cfrom :: forall x.
DescribeDBSnapshotsResponse -> Rep DescribeDBSnapshotsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDBSnapshotsResponse' 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:
--
-- 'marker', 'describeDBSnapshotsResponse_marker' - An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
--
-- 'dbSnapshots', 'describeDBSnapshotsResponse_dbSnapshots' - A list of @DBSnapshot@ instances.
--
-- 'httpStatus', 'describeDBSnapshotsResponse_httpStatus' - The response's http status code.
newDescribeDBSnapshotsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDBSnapshotsResponse
newDescribeDBSnapshotsResponse :: Int -> DescribeDBSnapshotsResponse
newDescribeDBSnapshotsResponse Int
pHttpStatus_ =
  DescribeDBSnapshotsResponse' :: Maybe Text
-> Maybe [DBSnapshot] -> Int -> DescribeDBSnapshotsResponse
DescribeDBSnapshotsResponse'
    { $sel:marker:DescribeDBSnapshotsResponse' :: Maybe Text
marker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dbSnapshots:DescribeDBSnapshotsResponse' :: Maybe [DBSnapshot]
dbSnapshots = Maybe [DBSnapshot]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDBSnapshotsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An optional pagination token provided by a previous request. If this
-- parameter is specified, the response includes only records beyond the
-- marker, up to the value specified by @MaxRecords@.
describeDBSnapshotsResponse_marker :: Lens.Lens' DescribeDBSnapshotsResponse (Prelude.Maybe Prelude.Text)
describeDBSnapshotsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse
describeDBSnapshotsResponse_marker = (DescribeDBSnapshotsResponse -> Maybe Text)
-> (DescribeDBSnapshotsResponse
    -> Maybe Text -> DescribeDBSnapshotsResponse)
-> Lens' DescribeDBSnapshotsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshotsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDBSnapshotsResponse' :: DescribeDBSnapshotsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDBSnapshotsResponse
s@DescribeDBSnapshotsResponse' {} Maybe Text
a -> DescribeDBSnapshotsResponse
s {$sel:marker:DescribeDBSnapshotsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeDBSnapshotsResponse)

-- | A list of @DBSnapshot@ instances.
describeDBSnapshotsResponse_dbSnapshots :: Lens.Lens' DescribeDBSnapshotsResponse (Prelude.Maybe [DBSnapshot])
describeDBSnapshotsResponse_dbSnapshots :: (Maybe [DBSnapshot] -> f (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse
describeDBSnapshotsResponse_dbSnapshots = (DescribeDBSnapshotsResponse -> Maybe [DBSnapshot])
-> (DescribeDBSnapshotsResponse
    -> Maybe [DBSnapshot] -> DescribeDBSnapshotsResponse)
-> Lens' DescribeDBSnapshotsResponse (Maybe [DBSnapshot])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshotsResponse' {Maybe [DBSnapshot]
dbSnapshots :: Maybe [DBSnapshot]
$sel:dbSnapshots:DescribeDBSnapshotsResponse' :: DescribeDBSnapshotsResponse -> Maybe [DBSnapshot]
dbSnapshots} -> Maybe [DBSnapshot]
dbSnapshots) (\s :: DescribeDBSnapshotsResponse
s@DescribeDBSnapshotsResponse' {} Maybe [DBSnapshot]
a -> DescribeDBSnapshotsResponse
s {$sel:dbSnapshots:DescribeDBSnapshotsResponse' :: Maybe [DBSnapshot]
dbSnapshots = Maybe [DBSnapshot]
a} :: DescribeDBSnapshotsResponse) ((Maybe [DBSnapshot] -> f (Maybe [DBSnapshot]))
 -> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse)
-> ((Maybe [DBSnapshot] -> f (Maybe [DBSnapshot]))
    -> Maybe [DBSnapshot] -> f (Maybe [DBSnapshot]))
-> (Maybe [DBSnapshot] -> f (Maybe [DBSnapshot]))
-> DescribeDBSnapshotsResponse
-> f DescribeDBSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [DBSnapshot] [DBSnapshot] [DBSnapshot] [DBSnapshot]
-> Iso
     (Maybe [DBSnapshot])
     (Maybe [DBSnapshot])
     (Maybe [DBSnapshot])
     (Maybe [DBSnapshot])
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 [DBSnapshot] [DBSnapshot] [DBSnapshot] [DBSnapshot]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
describeDBSnapshotsResponse_httpStatus :: Lens.Lens' DescribeDBSnapshotsResponse Prelude.Int
describeDBSnapshotsResponse_httpStatus :: (Int -> f Int)
-> DescribeDBSnapshotsResponse -> f DescribeDBSnapshotsResponse
describeDBSnapshotsResponse_httpStatus = (DescribeDBSnapshotsResponse -> Int)
-> (DescribeDBSnapshotsResponse
    -> Int -> DescribeDBSnapshotsResponse)
-> Lens
     DescribeDBSnapshotsResponse DescribeDBSnapshotsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBSnapshotsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeDBSnapshotsResponse' :: DescribeDBSnapshotsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeDBSnapshotsResponse
s@DescribeDBSnapshotsResponse' {} Int
a -> DescribeDBSnapshotsResponse
s {$sel:httpStatus:DescribeDBSnapshotsResponse' :: Int
httpStatus = Int
a} :: DescribeDBSnapshotsResponse)

instance Prelude.NFData DescribeDBSnapshotsResponse