{-# 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 #-}
module Amazonka.DocumentDB.DescribeDBClusterSnapshots
(
DescribeDBClusterSnapshots (..),
newDescribeDBClusterSnapshots,
describeDBClusterSnapshots_dbClusterIdentifier,
describeDBClusterSnapshots_includeShared,
describeDBClusterSnapshots_dbClusterSnapshotIdentifier,
describeDBClusterSnapshots_filters,
describeDBClusterSnapshots_snapshotType,
describeDBClusterSnapshots_marker,
describeDBClusterSnapshots_maxRecords,
describeDBClusterSnapshots_includePublic,
DescribeDBClusterSnapshotsResponse (..),
newDescribeDBClusterSnapshotsResponse,
describeDBClusterSnapshotsResponse_marker,
describeDBClusterSnapshotsResponse_dbClusterSnapshots,
describeDBClusterSnapshotsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DocumentDB.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeDBClusterSnapshots = DescribeDBClusterSnapshots'
{
DescribeDBClusterSnapshots -> Maybe Text
dbClusterIdentifier :: Prelude.Maybe Prelude.Text,
DescribeDBClusterSnapshots -> Maybe Bool
includeShared :: Prelude.Maybe Prelude.Bool,
DescribeDBClusterSnapshots -> Maybe Text
dbClusterSnapshotIdentifier :: Prelude.Maybe Prelude.Text,
DescribeDBClusterSnapshots -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
DescribeDBClusterSnapshots -> Maybe Text
snapshotType :: Prelude.Maybe Prelude.Text,
DescribeDBClusterSnapshots -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeDBClusterSnapshots -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int,
DescribeDBClusterSnapshots -> Maybe Bool
includePublic :: Prelude.Maybe Prelude.Bool
}
deriving (DescribeDBClusterSnapshots -> DescribeDBClusterSnapshots -> Bool
(DescribeDBClusterSnapshots -> DescribeDBClusterSnapshots -> Bool)
-> (DescribeDBClusterSnapshots
-> DescribeDBClusterSnapshots -> Bool)
-> Eq DescribeDBClusterSnapshots
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBClusterSnapshots -> DescribeDBClusterSnapshots -> Bool
$c/= :: DescribeDBClusterSnapshots -> DescribeDBClusterSnapshots -> Bool
== :: DescribeDBClusterSnapshots -> DescribeDBClusterSnapshots -> Bool
$c== :: DescribeDBClusterSnapshots -> DescribeDBClusterSnapshots -> Bool
Prelude.Eq, ReadPrec [DescribeDBClusterSnapshots]
ReadPrec DescribeDBClusterSnapshots
Int -> ReadS DescribeDBClusterSnapshots
ReadS [DescribeDBClusterSnapshots]
(Int -> ReadS DescribeDBClusterSnapshots)
-> ReadS [DescribeDBClusterSnapshots]
-> ReadPrec DescribeDBClusterSnapshots
-> ReadPrec [DescribeDBClusterSnapshots]
-> Read DescribeDBClusterSnapshots
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBClusterSnapshots]
$creadListPrec :: ReadPrec [DescribeDBClusterSnapshots]
readPrec :: ReadPrec DescribeDBClusterSnapshots
$creadPrec :: ReadPrec DescribeDBClusterSnapshots
readList :: ReadS [DescribeDBClusterSnapshots]
$creadList :: ReadS [DescribeDBClusterSnapshots]
readsPrec :: Int -> ReadS DescribeDBClusterSnapshots
$creadsPrec :: Int -> ReadS DescribeDBClusterSnapshots
Prelude.Read, Int -> DescribeDBClusterSnapshots -> ShowS
[DescribeDBClusterSnapshots] -> ShowS
DescribeDBClusterSnapshots -> String
(Int -> DescribeDBClusterSnapshots -> ShowS)
-> (DescribeDBClusterSnapshots -> String)
-> ([DescribeDBClusterSnapshots] -> ShowS)
-> Show DescribeDBClusterSnapshots
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBClusterSnapshots] -> ShowS
$cshowList :: [DescribeDBClusterSnapshots] -> ShowS
show :: DescribeDBClusterSnapshots -> String
$cshow :: DescribeDBClusterSnapshots -> String
showsPrec :: Int -> DescribeDBClusterSnapshots -> ShowS
$cshowsPrec :: Int -> DescribeDBClusterSnapshots -> ShowS
Prelude.Show, (forall x.
DescribeDBClusterSnapshots -> Rep DescribeDBClusterSnapshots x)
-> (forall x.
Rep DescribeDBClusterSnapshots x -> DescribeDBClusterSnapshots)
-> Generic DescribeDBClusterSnapshots
forall x.
Rep DescribeDBClusterSnapshots x -> DescribeDBClusterSnapshots
forall x.
DescribeDBClusterSnapshots -> Rep DescribeDBClusterSnapshots x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDBClusterSnapshots x -> DescribeDBClusterSnapshots
$cfrom :: forall x.
DescribeDBClusterSnapshots -> Rep DescribeDBClusterSnapshots x
Prelude.Generic)
newDescribeDBClusterSnapshots ::
DescribeDBClusterSnapshots
newDescribeDBClusterSnapshots :: DescribeDBClusterSnapshots
newDescribeDBClusterSnapshots =
DescribeDBClusterSnapshots' :: Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Filter]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Bool
-> DescribeDBClusterSnapshots
DescribeDBClusterSnapshots'
{ $sel:dbClusterIdentifier:DescribeDBClusterSnapshots' :: Maybe Text
dbClusterIdentifier =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:includeShared:DescribeDBClusterSnapshots' :: Maybe Bool
includeShared = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:dbClusterSnapshotIdentifier:DescribeDBClusterSnapshots' :: Maybe Text
dbClusterSnapshotIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:filters:DescribeDBClusterSnapshots' :: Maybe [Filter]
filters = Maybe [Filter]
forall a. Maybe a
Prelude.Nothing,
$sel:snapshotType:DescribeDBClusterSnapshots' :: Maybe Text
snapshotType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeDBClusterSnapshots' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeDBClusterSnapshots' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:includePublic:DescribeDBClusterSnapshots' :: Maybe Bool
includePublic = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
describeDBClusterSnapshots_dbClusterIdentifier :: Lens.Lens' DescribeDBClusterSnapshots (Prelude.Maybe Prelude.Text)
describeDBClusterSnapshots_dbClusterIdentifier :: (Maybe Text -> f (Maybe Text))
-> DescribeDBClusterSnapshots -> f DescribeDBClusterSnapshots
describeDBClusterSnapshots_dbClusterIdentifier = (DescribeDBClusterSnapshots -> Maybe Text)
-> (DescribeDBClusterSnapshots
-> Maybe Text -> DescribeDBClusterSnapshots)
-> Lens
DescribeDBClusterSnapshots
DescribeDBClusterSnapshots
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshots' {Maybe Text
dbClusterIdentifier :: Maybe Text
$sel:dbClusterIdentifier:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Text
dbClusterIdentifier} -> Maybe Text
dbClusterIdentifier) (\s :: DescribeDBClusterSnapshots
s@DescribeDBClusterSnapshots' {} Maybe Text
a -> DescribeDBClusterSnapshots
s {$sel:dbClusterIdentifier:DescribeDBClusterSnapshots' :: Maybe Text
dbClusterIdentifier = Maybe Text
a} :: DescribeDBClusterSnapshots)
describeDBClusterSnapshots_includeShared :: Lens.Lens' DescribeDBClusterSnapshots (Prelude.Maybe Prelude.Bool)
describeDBClusterSnapshots_includeShared :: (Maybe Bool -> f (Maybe Bool))
-> DescribeDBClusterSnapshots -> f DescribeDBClusterSnapshots
describeDBClusterSnapshots_includeShared = (DescribeDBClusterSnapshots -> Maybe Bool)
-> (DescribeDBClusterSnapshots
-> Maybe Bool -> DescribeDBClusterSnapshots)
-> Lens
DescribeDBClusterSnapshots
DescribeDBClusterSnapshots
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshots' {Maybe Bool
includeShared :: Maybe Bool
$sel:includeShared:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Bool
includeShared} -> Maybe Bool
includeShared) (\s :: DescribeDBClusterSnapshots
s@DescribeDBClusterSnapshots' {} Maybe Bool
a -> DescribeDBClusterSnapshots
s {$sel:includeShared:DescribeDBClusterSnapshots' :: Maybe Bool
includeShared = Maybe Bool
a} :: DescribeDBClusterSnapshots)
describeDBClusterSnapshots_dbClusterSnapshotIdentifier :: Lens.Lens' DescribeDBClusterSnapshots (Prelude.Maybe Prelude.Text)
describeDBClusterSnapshots_dbClusterSnapshotIdentifier :: (Maybe Text -> f (Maybe Text))
-> DescribeDBClusterSnapshots -> f DescribeDBClusterSnapshots
describeDBClusterSnapshots_dbClusterSnapshotIdentifier = (DescribeDBClusterSnapshots -> Maybe Text)
-> (DescribeDBClusterSnapshots
-> Maybe Text -> DescribeDBClusterSnapshots)
-> Lens
DescribeDBClusterSnapshots
DescribeDBClusterSnapshots
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshots' {Maybe Text
dbClusterSnapshotIdentifier :: Maybe Text
$sel:dbClusterSnapshotIdentifier:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Text
dbClusterSnapshotIdentifier} -> Maybe Text
dbClusterSnapshotIdentifier) (\s :: DescribeDBClusterSnapshots
s@DescribeDBClusterSnapshots' {} Maybe Text
a -> DescribeDBClusterSnapshots
s {$sel:dbClusterSnapshotIdentifier:DescribeDBClusterSnapshots' :: Maybe Text
dbClusterSnapshotIdentifier = Maybe Text
a} :: DescribeDBClusterSnapshots)
describeDBClusterSnapshots_filters :: Lens.Lens' DescribeDBClusterSnapshots (Prelude.Maybe [Filter])
describeDBClusterSnapshots_filters :: (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeDBClusterSnapshots -> f DescribeDBClusterSnapshots
describeDBClusterSnapshots_filters = (DescribeDBClusterSnapshots -> Maybe [Filter])
-> (DescribeDBClusterSnapshots
-> Maybe [Filter] -> DescribeDBClusterSnapshots)
-> Lens
DescribeDBClusterSnapshots
DescribeDBClusterSnapshots
(Maybe [Filter])
(Maybe [Filter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshots' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribeDBClusterSnapshots
s@DescribeDBClusterSnapshots' {} Maybe [Filter]
a -> DescribeDBClusterSnapshots
s {$sel:filters:DescribeDBClusterSnapshots' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribeDBClusterSnapshots) ((Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeDBClusterSnapshots -> f DescribeDBClusterSnapshots)
-> ((Maybe [Filter] -> f (Maybe [Filter]))
-> Maybe [Filter] -> f (Maybe [Filter]))
-> (Maybe [Filter] -> f (Maybe [Filter]))
-> DescribeDBClusterSnapshots
-> f DescribeDBClusterSnapshots
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
describeDBClusterSnapshots_snapshotType :: Lens.Lens' DescribeDBClusterSnapshots (Prelude.Maybe Prelude.Text)
describeDBClusterSnapshots_snapshotType :: (Maybe Text -> f (Maybe Text))
-> DescribeDBClusterSnapshots -> f DescribeDBClusterSnapshots
describeDBClusterSnapshots_snapshotType = (DescribeDBClusterSnapshots -> Maybe Text)
-> (DescribeDBClusterSnapshots
-> Maybe Text -> DescribeDBClusterSnapshots)
-> Lens
DescribeDBClusterSnapshots
DescribeDBClusterSnapshots
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshots' {Maybe Text
snapshotType :: Maybe Text
$sel:snapshotType:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Text
snapshotType} -> Maybe Text
snapshotType) (\s :: DescribeDBClusterSnapshots
s@DescribeDBClusterSnapshots' {} Maybe Text
a -> DescribeDBClusterSnapshots
s {$sel:snapshotType:DescribeDBClusterSnapshots' :: Maybe Text
snapshotType = Maybe Text
a} :: DescribeDBClusterSnapshots)
describeDBClusterSnapshots_marker :: Lens.Lens' DescribeDBClusterSnapshots (Prelude.Maybe Prelude.Text)
describeDBClusterSnapshots_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeDBClusterSnapshots -> f DescribeDBClusterSnapshots
describeDBClusterSnapshots_marker = (DescribeDBClusterSnapshots -> Maybe Text)
-> (DescribeDBClusterSnapshots
-> Maybe Text -> DescribeDBClusterSnapshots)
-> Lens
DescribeDBClusterSnapshots
DescribeDBClusterSnapshots
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshots' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDBClusterSnapshots
s@DescribeDBClusterSnapshots' {} Maybe Text
a -> DescribeDBClusterSnapshots
s {$sel:marker:DescribeDBClusterSnapshots' :: Maybe Text
marker = Maybe Text
a} :: DescribeDBClusterSnapshots)
describeDBClusterSnapshots_maxRecords :: Lens.Lens' DescribeDBClusterSnapshots (Prelude.Maybe Prelude.Int)
describeDBClusterSnapshots_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeDBClusterSnapshots -> f DescribeDBClusterSnapshots
describeDBClusterSnapshots_maxRecords = (DescribeDBClusterSnapshots -> Maybe Int)
-> (DescribeDBClusterSnapshots
-> Maybe Int -> DescribeDBClusterSnapshots)
-> Lens
DescribeDBClusterSnapshots
DescribeDBClusterSnapshots
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshots' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeDBClusterSnapshots
s@DescribeDBClusterSnapshots' {} Maybe Int
a -> DescribeDBClusterSnapshots
s {$sel:maxRecords:DescribeDBClusterSnapshots' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeDBClusterSnapshots)
describeDBClusterSnapshots_includePublic :: Lens.Lens' DescribeDBClusterSnapshots (Prelude.Maybe Prelude.Bool)
describeDBClusterSnapshots_includePublic :: (Maybe Bool -> f (Maybe Bool))
-> DescribeDBClusterSnapshots -> f DescribeDBClusterSnapshots
describeDBClusterSnapshots_includePublic = (DescribeDBClusterSnapshots -> Maybe Bool)
-> (DescribeDBClusterSnapshots
-> Maybe Bool -> DescribeDBClusterSnapshots)
-> Lens
DescribeDBClusterSnapshots
DescribeDBClusterSnapshots
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshots' {Maybe Bool
includePublic :: Maybe Bool
$sel:includePublic:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Bool
includePublic} -> Maybe Bool
includePublic) (\s :: DescribeDBClusterSnapshots
s@DescribeDBClusterSnapshots' {} Maybe Bool
a -> DescribeDBClusterSnapshots
s {$sel:includePublic:DescribeDBClusterSnapshots' :: Maybe Bool
includePublic = Maybe Bool
a} :: DescribeDBClusterSnapshots)
instance Core.AWSPager DescribeDBClusterSnapshots where
page :: DescribeDBClusterSnapshots
-> AWSResponse DescribeDBClusterSnapshots
-> Maybe DescribeDBClusterSnapshots
page DescribeDBClusterSnapshots
rq AWSResponse DescribeDBClusterSnapshots
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeDBClusterSnapshots
DescribeDBClusterSnapshotsResponse
rs
DescribeDBClusterSnapshotsResponse
-> Getting (First Text) DescribeDBClusterSnapshotsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDBClusterSnapshotsResponse
-> Const (First Text) DescribeDBClusterSnapshotsResponse
Lens' DescribeDBClusterSnapshotsResponse (Maybe Text)
describeDBClusterSnapshotsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDBClusterSnapshotsResponse
-> Const (First Text) DescribeDBClusterSnapshotsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDBClusterSnapshotsResponse 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 DescribeDBClusterSnapshots
forall a. Maybe a
Prelude.Nothing
| Maybe [DBClusterSnapshot] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeDBClusterSnapshots
DescribeDBClusterSnapshotsResponse
rs
DescribeDBClusterSnapshotsResponse
-> Getting
(First [DBClusterSnapshot])
DescribeDBClusterSnapshotsResponse
[DBClusterSnapshot]
-> Maybe [DBClusterSnapshot]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DBClusterSnapshot]
-> Const (First [DBClusterSnapshot]) (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const
(First [DBClusterSnapshot]) DescribeDBClusterSnapshotsResponse
Lens'
DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots
((Maybe [DBClusterSnapshot]
-> Const (First [DBClusterSnapshot]) (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> Const
(First [DBClusterSnapshot]) DescribeDBClusterSnapshotsResponse)
-> (([DBClusterSnapshot]
-> Const (First [DBClusterSnapshot]) [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const (First [DBClusterSnapshot]) (Maybe [DBClusterSnapshot]))
-> Getting
(First [DBClusterSnapshot])
DescribeDBClusterSnapshotsResponse
[DBClusterSnapshot]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DBClusterSnapshot]
-> Const (First [DBClusterSnapshot]) [DBClusterSnapshot])
-> Maybe [DBClusterSnapshot]
-> Const (First [DBClusterSnapshot]) (Maybe [DBClusterSnapshot])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeDBClusterSnapshots
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeDBClusterSnapshots -> Maybe DescribeDBClusterSnapshots
forall a. a -> Maybe a
Prelude.Just (DescribeDBClusterSnapshots -> Maybe DescribeDBClusterSnapshots)
-> DescribeDBClusterSnapshots -> Maybe DescribeDBClusterSnapshots
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeDBClusterSnapshots
rq
DescribeDBClusterSnapshots
-> (DescribeDBClusterSnapshots -> DescribeDBClusterSnapshots)
-> DescribeDBClusterSnapshots
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeDBClusterSnapshots
-> Identity DescribeDBClusterSnapshots
Lens
DescribeDBClusterSnapshots
DescribeDBClusterSnapshots
(Maybe Text)
(Maybe Text)
describeDBClusterSnapshots_marker
((Maybe Text -> Identity (Maybe Text))
-> DescribeDBClusterSnapshots
-> Identity DescribeDBClusterSnapshots)
-> Maybe Text
-> DescribeDBClusterSnapshots
-> DescribeDBClusterSnapshots
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeDBClusterSnapshots
DescribeDBClusterSnapshotsResponse
rs
DescribeDBClusterSnapshotsResponse
-> Getting (First Text) DescribeDBClusterSnapshotsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDBClusterSnapshotsResponse
-> Const (First Text) DescribeDBClusterSnapshotsResponse
Lens' DescribeDBClusterSnapshotsResponse (Maybe Text)
describeDBClusterSnapshotsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDBClusterSnapshotsResponse
-> Const (First Text) DescribeDBClusterSnapshotsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDBClusterSnapshotsResponse 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 DescribeDBClusterSnapshots where
type
AWSResponse DescribeDBClusterSnapshots =
DescribeDBClusterSnapshotsResponse
request :: DescribeDBClusterSnapshots -> Request DescribeDBClusterSnapshots
request = Service
-> DescribeDBClusterSnapshots -> Request DescribeDBClusterSnapshots
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeDBClusterSnapshots
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeDBClusterSnapshots)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeDBClusterSnapshots))
-> Logger
-> Service
-> Proxy DescribeDBClusterSnapshots
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeDBClusterSnapshots)))
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
"DescribeDBClusterSnapshotsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text
-> Maybe [DBClusterSnapshot]
-> Int
-> DescribeDBClusterSnapshotsResponse
DescribeDBClusterSnapshotsResponse'
(Maybe Text
-> Maybe [DBClusterSnapshot]
-> Int
-> DescribeDBClusterSnapshotsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [DBClusterSnapshot]
-> Int -> DescribeDBClusterSnapshotsResponse)
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 [DBClusterSnapshot]
-> Int -> DescribeDBClusterSnapshotsResponse)
-> Either String (Maybe [DBClusterSnapshot])
-> Either String (Int -> DescribeDBClusterSnapshotsResponse)
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
"DBClusterSnapshots"
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 [DBClusterSnapshot]))
-> Either String (Maybe [DBClusterSnapshot])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [DBClusterSnapshot])
-> [Node] -> Either String (Maybe [DBClusterSnapshot])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [DBClusterSnapshot]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"DBClusterSnapshot")
)
Either String (Int -> DescribeDBClusterSnapshotsResponse)
-> Either String Int
-> Either String DescribeDBClusterSnapshotsResponse
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 DescribeDBClusterSnapshots
instance Prelude.NFData DescribeDBClusterSnapshots
instance Core.ToHeaders DescribeDBClusterSnapshots where
toHeaders :: DescribeDBClusterSnapshots -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeDBClusterSnapshots -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeDBClusterSnapshots where
toPath :: DescribeDBClusterSnapshots -> ByteString
toPath = ByteString -> DescribeDBClusterSnapshots -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeDBClusterSnapshots where
toQuery :: DescribeDBClusterSnapshots -> QueryString
toQuery DescribeDBClusterSnapshots' {Maybe Bool
Maybe Int
Maybe [Filter]
Maybe Text
includePublic :: Maybe Bool
maxRecords :: Maybe Int
marker :: Maybe Text
snapshotType :: Maybe Text
filters :: Maybe [Filter]
dbClusterSnapshotIdentifier :: Maybe Text
includeShared :: Maybe Bool
dbClusterIdentifier :: Maybe Text
$sel:includePublic:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Bool
$sel:maxRecords:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Int
$sel:marker:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Text
$sel:snapshotType:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Text
$sel:filters:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe [Filter]
$sel:dbClusterSnapshotIdentifier:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Text
$sel:includeShared:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Bool
$sel:dbClusterIdentifier:DescribeDBClusterSnapshots' :: DescribeDBClusterSnapshots -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DescribeDBClusterSnapshots" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
ByteString
"DBClusterIdentifier" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbClusterIdentifier,
ByteString
"IncludeShared" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
includeShared,
ByteString
"DBClusterSnapshotIdentifier"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dbClusterSnapshotIdentifier,
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
"SnapshotType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
snapshotType,
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
]
data DescribeDBClusterSnapshotsResponse = DescribeDBClusterSnapshotsResponse'
{
DescribeDBClusterSnapshotsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeDBClusterSnapshotsResponse -> Maybe [DBClusterSnapshot]
dbClusterSnapshots :: Prelude.Maybe [DBClusterSnapshot],
DescribeDBClusterSnapshotsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeDBClusterSnapshotsResponse
-> DescribeDBClusterSnapshotsResponse -> Bool
(DescribeDBClusterSnapshotsResponse
-> DescribeDBClusterSnapshotsResponse -> Bool)
-> (DescribeDBClusterSnapshotsResponse
-> DescribeDBClusterSnapshotsResponse -> Bool)
-> Eq DescribeDBClusterSnapshotsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDBClusterSnapshotsResponse
-> DescribeDBClusterSnapshotsResponse -> Bool
$c/= :: DescribeDBClusterSnapshotsResponse
-> DescribeDBClusterSnapshotsResponse -> Bool
== :: DescribeDBClusterSnapshotsResponse
-> DescribeDBClusterSnapshotsResponse -> Bool
$c== :: DescribeDBClusterSnapshotsResponse
-> DescribeDBClusterSnapshotsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDBClusterSnapshotsResponse]
ReadPrec DescribeDBClusterSnapshotsResponse
Int -> ReadS DescribeDBClusterSnapshotsResponse
ReadS [DescribeDBClusterSnapshotsResponse]
(Int -> ReadS DescribeDBClusterSnapshotsResponse)
-> ReadS [DescribeDBClusterSnapshotsResponse]
-> ReadPrec DescribeDBClusterSnapshotsResponse
-> ReadPrec [DescribeDBClusterSnapshotsResponse]
-> Read DescribeDBClusterSnapshotsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDBClusterSnapshotsResponse]
$creadListPrec :: ReadPrec [DescribeDBClusterSnapshotsResponse]
readPrec :: ReadPrec DescribeDBClusterSnapshotsResponse
$creadPrec :: ReadPrec DescribeDBClusterSnapshotsResponse
readList :: ReadS [DescribeDBClusterSnapshotsResponse]
$creadList :: ReadS [DescribeDBClusterSnapshotsResponse]
readsPrec :: Int -> ReadS DescribeDBClusterSnapshotsResponse
$creadsPrec :: Int -> ReadS DescribeDBClusterSnapshotsResponse
Prelude.Read, Int -> DescribeDBClusterSnapshotsResponse -> ShowS
[DescribeDBClusterSnapshotsResponse] -> ShowS
DescribeDBClusterSnapshotsResponse -> String
(Int -> DescribeDBClusterSnapshotsResponse -> ShowS)
-> (DescribeDBClusterSnapshotsResponse -> String)
-> ([DescribeDBClusterSnapshotsResponse] -> ShowS)
-> Show DescribeDBClusterSnapshotsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDBClusterSnapshotsResponse] -> ShowS
$cshowList :: [DescribeDBClusterSnapshotsResponse] -> ShowS
show :: DescribeDBClusterSnapshotsResponse -> String
$cshow :: DescribeDBClusterSnapshotsResponse -> String
showsPrec :: Int -> DescribeDBClusterSnapshotsResponse -> ShowS
$cshowsPrec :: Int -> DescribeDBClusterSnapshotsResponse -> ShowS
Prelude.Show, (forall x.
DescribeDBClusterSnapshotsResponse
-> Rep DescribeDBClusterSnapshotsResponse x)
-> (forall x.
Rep DescribeDBClusterSnapshotsResponse x
-> DescribeDBClusterSnapshotsResponse)
-> Generic DescribeDBClusterSnapshotsResponse
forall x.
Rep DescribeDBClusterSnapshotsResponse x
-> DescribeDBClusterSnapshotsResponse
forall x.
DescribeDBClusterSnapshotsResponse
-> Rep DescribeDBClusterSnapshotsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDBClusterSnapshotsResponse x
-> DescribeDBClusterSnapshotsResponse
$cfrom :: forall x.
DescribeDBClusterSnapshotsResponse
-> Rep DescribeDBClusterSnapshotsResponse x
Prelude.Generic)
newDescribeDBClusterSnapshotsResponse ::
Prelude.Int ->
DescribeDBClusterSnapshotsResponse
newDescribeDBClusterSnapshotsResponse :: Int -> DescribeDBClusterSnapshotsResponse
newDescribeDBClusterSnapshotsResponse Int
pHttpStatus_ =
DescribeDBClusterSnapshotsResponse' :: Maybe Text
-> Maybe [DBClusterSnapshot]
-> Int
-> DescribeDBClusterSnapshotsResponse
DescribeDBClusterSnapshotsResponse'
{ $sel:marker:DescribeDBClusterSnapshotsResponse' :: Maybe Text
marker =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:dbClusterSnapshots:DescribeDBClusterSnapshotsResponse' :: Maybe [DBClusterSnapshot]
dbClusterSnapshots = Maybe [DBClusterSnapshot]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeDBClusterSnapshotsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeDBClusterSnapshotsResponse_marker :: Lens.Lens' DescribeDBClusterSnapshotsResponse (Prelude.Maybe Prelude.Text)
describeDBClusterSnapshotsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
describeDBClusterSnapshotsResponse_marker = (DescribeDBClusterSnapshotsResponse -> Maybe Text)
-> (DescribeDBClusterSnapshotsResponse
-> Maybe Text -> DescribeDBClusterSnapshotsResponse)
-> Lens' DescribeDBClusterSnapshotsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshotsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeDBClusterSnapshotsResponse' :: DescribeDBClusterSnapshotsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeDBClusterSnapshotsResponse
s@DescribeDBClusterSnapshotsResponse' {} Maybe Text
a -> DescribeDBClusterSnapshotsResponse
s {$sel:marker:DescribeDBClusterSnapshotsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeDBClusterSnapshotsResponse)
describeDBClusterSnapshotsResponse_dbClusterSnapshots :: Lens.Lens' DescribeDBClusterSnapshotsResponse (Prelude.Maybe [DBClusterSnapshot])
describeDBClusterSnapshotsResponse_dbClusterSnapshots :: (Maybe [DBClusterSnapshot] -> f (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
describeDBClusterSnapshotsResponse_dbClusterSnapshots = (DescribeDBClusterSnapshotsResponse -> Maybe [DBClusterSnapshot])
-> (DescribeDBClusterSnapshotsResponse
-> Maybe [DBClusterSnapshot] -> DescribeDBClusterSnapshotsResponse)
-> Lens'
DescribeDBClusterSnapshotsResponse (Maybe [DBClusterSnapshot])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshotsResponse' {Maybe [DBClusterSnapshot]
dbClusterSnapshots :: Maybe [DBClusterSnapshot]
$sel:dbClusterSnapshots:DescribeDBClusterSnapshotsResponse' :: DescribeDBClusterSnapshotsResponse -> Maybe [DBClusterSnapshot]
dbClusterSnapshots} -> Maybe [DBClusterSnapshot]
dbClusterSnapshots) (\s :: DescribeDBClusterSnapshotsResponse
s@DescribeDBClusterSnapshotsResponse' {} Maybe [DBClusterSnapshot]
a -> DescribeDBClusterSnapshotsResponse
s {$sel:dbClusterSnapshots:DescribeDBClusterSnapshotsResponse' :: Maybe [DBClusterSnapshot]
dbClusterSnapshots = Maybe [DBClusterSnapshot]
a} :: DescribeDBClusterSnapshotsResponse) ((Maybe [DBClusterSnapshot] -> f (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse)
-> ((Maybe [DBClusterSnapshot] -> f (Maybe [DBClusterSnapshot]))
-> Maybe [DBClusterSnapshot] -> f (Maybe [DBClusterSnapshot]))
-> (Maybe [DBClusterSnapshot] -> f (Maybe [DBClusterSnapshot]))
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DBClusterSnapshot]
[DBClusterSnapshot]
[DBClusterSnapshot]
[DBClusterSnapshot]
-> Iso
(Maybe [DBClusterSnapshot])
(Maybe [DBClusterSnapshot])
(Maybe [DBClusterSnapshot])
(Maybe [DBClusterSnapshot])
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
[DBClusterSnapshot]
[DBClusterSnapshot]
[DBClusterSnapshot]
[DBClusterSnapshot]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeDBClusterSnapshotsResponse_httpStatus :: Lens.Lens' DescribeDBClusterSnapshotsResponse Prelude.Int
describeDBClusterSnapshotsResponse_httpStatus :: (Int -> f Int)
-> DescribeDBClusterSnapshotsResponse
-> f DescribeDBClusterSnapshotsResponse
describeDBClusterSnapshotsResponse_httpStatus = (DescribeDBClusterSnapshotsResponse -> Int)
-> (DescribeDBClusterSnapshotsResponse
-> Int -> DescribeDBClusterSnapshotsResponse)
-> Lens
DescribeDBClusterSnapshotsResponse
DescribeDBClusterSnapshotsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDBClusterSnapshotsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeDBClusterSnapshotsResponse' :: DescribeDBClusterSnapshotsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeDBClusterSnapshotsResponse
s@DescribeDBClusterSnapshotsResponse' {} Int
a -> DescribeDBClusterSnapshotsResponse
s {$sel:httpStatus:DescribeDBClusterSnapshotsResponse' :: Int
httpStatus = Int
a} :: DescribeDBClusterSnapshotsResponse)
instance
Prelude.NFData
DescribeDBClusterSnapshotsResponse