{-# 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.OpsWorksCM.DescribeBackups
(
DescribeBackups (..),
newDescribeBackups,
describeBackups_serverName,
describeBackups_backupId,
describeBackups_nextToken,
describeBackups_maxResults,
DescribeBackupsResponse (..),
newDescribeBackupsResponse,
describeBackupsResponse_backups,
describeBackupsResponse_nextToken,
describeBackupsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpsWorksCM.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeBackups = DescribeBackups'
{
DescribeBackups -> Maybe Text
serverName :: Prelude.Maybe Prelude.Text,
DescribeBackups -> Maybe Text
backupId :: Prelude.Maybe Prelude.Text,
DescribeBackups -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeBackups -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (DescribeBackups -> DescribeBackups -> Bool
(DescribeBackups -> DescribeBackups -> Bool)
-> (DescribeBackups -> DescribeBackups -> Bool)
-> Eq DescribeBackups
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBackups -> DescribeBackups -> Bool
$c/= :: DescribeBackups -> DescribeBackups -> Bool
== :: DescribeBackups -> DescribeBackups -> Bool
$c== :: DescribeBackups -> DescribeBackups -> Bool
Prelude.Eq, ReadPrec [DescribeBackups]
ReadPrec DescribeBackups
Int -> ReadS DescribeBackups
ReadS [DescribeBackups]
(Int -> ReadS DescribeBackups)
-> ReadS [DescribeBackups]
-> ReadPrec DescribeBackups
-> ReadPrec [DescribeBackups]
-> Read DescribeBackups
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBackups]
$creadListPrec :: ReadPrec [DescribeBackups]
readPrec :: ReadPrec DescribeBackups
$creadPrec :: ReadPrec DescribeBackups
readList :: ReadS [DescribeBackups]
$creadList :: ReadS [DescribeBackups]
readsPrec :: Int -> ReadS DescribeBackups
$creadsPrec :: Int -> ReadS DescribeBackups
Prelude.Read, Int -> DescribeBackups -> ShowS
[DescribeBackups] -> ShowS
DescribeBackups -> String
(Int -> DescribeBackups -> ShowS)
-> (DescribeBackups -> String)
-> ([DescribeBackups] -> ShowS)
-> Show DescribeBackups
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBackups] -> ShowS
$cshowList :: [DescribeBackups] -> ShowS
show :: DescribeBackups -> String
$cshow :: DescribeBackups -> String
showsPrec :: Int -> DescribeBackups -> ShowS
$cshowsPrec :: Int -> DescribeBackups -> ShowS
Prelude.Show, (forall x. DescribeBackups -> Rep DescribeBackups x)
-> (forall x. Rep DescribeBackups x -> DescribeBackups)
-> Generic DescribeBackups
forall x. Rep DescribeBackups x -> DescribeBackups
forall x. DescribeBackups -> Rep DescribeBackups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeBackups x -> DescribeBackups
$cfrom :: forall x. DescribeBackups -> Rep DescribeBackups x
Prelude.Generic)
newDescribeBackups ::
DescribeBackups
newDescribeBackups :: DescribeBackups
newDescribeBackups =
DescribeBackups' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Natural -> DescribeBackups
DescribeBackups'
{ $sel:serverName:DescribeBackups' :: Maybe Text
serverName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:backupId:DescribeBackups' :: Maybe Text
backupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeBackups' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeBackups' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
describeBackups_serverName :: Lens.Lens' DescribeBackups (Prelude.Maybe Prelude.Text)
describeBackups_serverName :: (Maybe Text -> f (Maybe Text))
-> DescribeBackups -> f DescribeBackups
describeBackups_serverName = (DescribeBackups -> Maybe Text)
-> (DescribeBackups -> Maybe Text -> DescribeBackups)
-> Lens DescribeBackups DescribeBackups (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackups' {Maybe Text
serverName :: Maybe Text
$sel:serverName:DescribeBackups' :: DescribeBackups -> Maybe Text
serverName} -> Maybe Text
serverName) (\s :: DescribeBackups
s@DescribeBackups' {} Maybe Text
a -> DescribeBackups
s {$sel:serverName:DescribeBackups' :: Maybe Text
serverName = Maybe Text
a} :: DescribeBackups)
describeBackups_backupId :: Lens.Lens' DescribeBackups (Prelude.Maybe Prelude.Text)
describeBackups_backupId :: (Maybe Text -> f (Maybe Text))
-> DescribeBackups -> f DescribeBackups
describeBackups_backupId = (DescribeBackups -> Maybe Text)
-> (DescribeBackups -> Maybe Text -> DescribeBackups)
-> Lens DescribeBackups DescribeBackups (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackups' {Maybe Text
backupId :: Maybe Text
$sel:backupId:DescribeBackups' :: DescribeBackups -> Maybe Text
backupId} -> Maybe Text
backupId) (\s :: DescribeBackups
s@DescribeBackups' {} Maybe Text
a -> DescribeBackups
s {$sel:backupId:DescribeBackups' :: Maybe Text
backupId = Maybe Text
a} :: DescribeBackups)
describeBackups_nextToken :: Lens.Lens' DescribeBackups (Prelude.Maybe Prelude.Text)
describeBackups_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeBackups -> f DescribeBackups
describeBackups_nextToken = (DescribeBackups -> Maybe Text)
-> (DescribeBackups -> Maybe Text -> DescribeBackups)
-> Lens DescribeBackups DescribeBackups (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackups' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeBackups' :: DescribeBackups -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeBackups
s@DescribeBackups' {} Maybe Text
a -> DescribeBackups
s {$sel:nextToken:DescribeBackups' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeBackups)
describeBackups_maxResults :: Lens.Lens' DescribeBackups (Prelude.Maybe Prelude.Natural)
describeBackups_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeBackups -> f DescribeBackups
describeBackups_maxResults = (DescribeBackups -> Maybe Natural)
-> (DescribeBackups -> Maybe Natural -> DescribeBackups)
-> Lens
DescribeBackups DescribeBackups (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackups' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeBackups' :: DescribeBackups -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeBackups
s@DescribeBackups' {} Maybe Natural
a -> DescribeBackups
s {$sel:maxResults:DescribeBackups' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeBackups)
instance Core.AWSPager DescribeBackups where
page :: DescribeBackups
-> AWSResponse DescribeBackups -> Maybe DescribeBackups
page DescribeBackups
rq AWSResponse DescribeBackups
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeBackups
DescribeBackupsResponse
rs
DescribeBackupsResponse
-> Getting (First Text) DescribeBackupsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeBackupsResponse
-> Const (First Text) DescribeBackupsResponse
Lens' DescribeBackupsResponse (Maybe Text)
describeBackupsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeBackupsResponse
-> Const (First Text) DescribeBackupsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeBackupsResponse 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 DescribeBackups
forall a. Maybe a
Prelude.Nothing
| Maybe [Backup] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeBackups
DescribeBackupsResponse
rs
DescribeBackupsResponse
-> Getting (First [Backup]) DescribeBackupsResponse [Backup]
-> Maybe [Backup]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Backup] -> Const (First [Backup]) (Maybe [Backup]))
-> DescribeBackupsResponse
-> Const (First [Backup]) DescribeBackupsResponse
Lens' DescribeBackupsResponse (Maybe [Backup])
describeBackupsResponse_backups ((Maybe [Backup] -> Const (First [Backup]) (Maybe [Backup]))
-> DescribeBackupsResponse
-> Const (First [Backup]) DescribeBackupsResponse)
-> (([Backup] -> Const (First [Backup]) [Backup])
-> Maybe [Backup] -> Const (First [Backup]) (Maybe [Backup]))
-> Getting (First [Backup]) DescribeBackupsResponse [Backup]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Backup] -> Const (First [Backup]) [Backup])
-> Maybe [Backup] -> Const (First [Backup]) (Maybe [Backup])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeBackups
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeBackups -> Maybe DescribeBackups
forall a. a -> Maybe a
Prelude.Just (DescribeBackups -> Maybe DescribeBackups)
-> DescribeBackups -> Maybe DescribeBackups
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeBackups
rq
DescribeBackups
-> (DescribeBackups -> DescribeBackups) -> DescribeBackups
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeBackups -> Identity DescribeBackups
Lens DescribeBackups DescribeBackups (Maybe Text) (Maybe Text)
describeBackups_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeBackups -> Identity DescribeBackups)
-> Maybe Text -> DescribeBackups -> DescribeBackups
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeBackups
DescribeBackupsResponse
rs
DescribeBackupsResponse
-> Getting (First Text) DescribeBackupsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeBackupsResponse
-> Const (First Text) DescribeBackupsResponse
Lens' DescribeBackupsResponse (Maybe Text)
describeBackupsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeBackupsResponse
-> Const (First Text) DescribeBackupsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeBackupsResponse 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 DescribeBackups where
type
AWSResponse DescribeBackups =
DescribeBackupsResponse
request :: DescribeBackups -> Request DescribeBackups
request = Service -> DescribeBackups -> Request DescribeBackups
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeBackups
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeBackups)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeBackups))
-> Logger
-> Service
-> Proxy DescribeBackups
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeBackups)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [Backup] -> Maybe Text -> Int -> DescribeBackupsResponse
DescribeBackupsResponse'
(Maybe [Backup] -> Maybe Text -> Int -> DescribeBackupsResponse)
-> Either String (Maybe [Backup])
-> Either String (Maybe Text -> Int -> DescribeBackupsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Backup]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Backups" Either String (Maybe (Maybe [Backup]))
-> Maybe [Backup] -> Either String (Maybe [Backup])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Backup]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> DescribeBackupsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeBackupsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either String (Int -> DescribeBackupsResponse)
-> Either String Int -> Either String DescribeBackupsResponse
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 DescribeBackups
instance Prelude.NFData DescribeBackups
instance Core.ToHeaders DescribeBackups where
toHeaders :: DescribeBackups -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeBackups -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"OpsWorksCM_V2016_11_01.DescribeBackups" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DescribeBackups where
toJSON :: DescribeBackups -> Value
toJSON DescribeBackups' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
backupId :: Maybe Text
serverName :: Maybe Text
$sel:maxResults:DescribeBackups' :: DescribeBackups -> Maybe Natural
$sel:nextToken:DescribeBackups' :: DescribeBackups -> Maybe Text
$sel:backupId:DescribeBackups' :: DescribeBackups -> Maybe Text
$sel:serverName:DescribeBackups' :: DescribeBackups -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ServerName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serverName,
(Text
"BackupId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
backupId,
(Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
]
)
instance Core.ToPath DescribeBackups where
toPath :: DescribeBackups -> ByteString
toPath = ByteString -> DescribeBackups -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeBackups where
toQuery :: DescribeBackups -> QueryString
toQuery = QueryString -> DescribeBackups -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeBackupsResponse = DescribeBackupsResponse'
{
DescribeBackupsResponse -> Maybe [Backup]
backups :: Prelude.Maybe [Backup],
DescribeBackupsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeBackupsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeBackupsResponse -> DescribeBackupsResponse -> Bool
(DescribeBackupsResponse -> DescribeBackupsResponse -> Bool)
-> (DescribeBackupsResponse -> DescribeBackupsResponse -> Bool)
-> Eq DescribeBackupsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeBackupsResponse -> DescribeBackupsResponse -> Bool
$c/= :: DescribeBackupsResponse -> DescribeBackupsResponse -> Bool
== :: DescribeBackupsResponse -> DescribeBackupsResponse -> Bool
$c== :: DescribeBackupsResponse -> DescribeBackupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeBackupsResponse]
ReadPrec DescribeBackupsResponse
Int -> ReadS DescribeBackupsResponse
ReadS [DescribeBackupsResponse]
(Int -> ReadS DescribeBackupsResponse)
-> ReadS [DescribeBackupsResponse]
-> ReadPrec DescribeBackupsResponse
-> ReadPrec [DescribeBackupsResponse]
-> Read DescribeBackupsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeBackupsResponse]
$creadListPrec :: ReadPrec [DescribeBackupsResponse]
readPrec :: ReadPrec DescribeBackupsResponse
$creadPrec :: ReadPrec DescribeBackupsResponse
readList :: ReadS [DescribeBackupsResponse]
$creadList :: ReadS [DescribeBackupsResponse]
readsPrec :: Int -> ReadS DescribeBackupsResponse
$creadsPrec :: Int -> ReadS DescribeBackupsResponse
Prelude.Read, Int -> DescribeBackupsResponse -> ShowS
[DescribeBackupsResponse] -> ShowS
DescribeBackupsResponse -> String
(Int -> DescribeBackupsResponse -> ShowS)
-> (DescribeBackupsResponse -> String)
-> ([DescribeBackupsResponse] -> ShowS)
-> Show DescribeBackupsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeBackupsResponse] -> ShowS
$cshowList :: [DescribeBackupsResponse] -> ShowS
show :: DescribeBackupsResponse -> String
$cshow :: DescribeBackupsResponse -> String
showsPrec :: Int -> DescribeBackupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeBackupsResponse -> ShowS
Prelude.Show, (forall x.
DescribeBackupsResponse -> Rep DescribeBackupsResponse x)
-> (forall x.
Rep DescribeBackupsResponse x -> DescribeBackupsResponse)
-> Generic DescribeBackupsResponse
forall x. Rep DescribeBackupsResponse x -> DescribeBackupsResponse
forall x. DescribeBackupsResponse -> Rep DescribeBackupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeBackupsResponse x -> DescribeBackupsResponse
$cfrom :: forall x. DescribeBackupsResponse -> Rep DescribeBackupsResponse x
Prelude.Generic)
newDescribeBackupsResponse ::
Prelude.Int ->
DescribeBackupsResponse
newDescribeBackupsResponse :: Int -> DescribeBackupsResponse
newDescribeBackupsResponse Int
pHttpStatus_ =
DescribeBackupsResponse' :: Maybe [Backup] -> Maybe Text -> Int -> DescribeBackupsResponse
DescribeBackupsResponse'
{ $sel:backups:DescribeBackupsResponse' :: Maybe [Backup]
backups = Maybe [Backup]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeBackupsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeBackupsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeBackupsResponse_backups :: Lens.Lens' DescribeBackupsResponse (Prelude.Maybe [Backup])
describeBackupsResponse_backups :: (Maybe [Backup] -> f (Maybe [Backup]))
-> DescribeBackupsResponse -> f DescribeBackupsResponse
describeBackupsResponse_backups = (DescribeBackupsResponse -> Maybe [Backup])
-> (DescribeBackupsResponse
-> Maybe [Backup] -> DescribeBackupsResponse)
-> Lens' DescribeBackupsResponse (Maybe [Backup])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupsResponse' {Maybe [Backup]
backups :: Maybe [Backup]
$sel:backups:DescribeBackupsResponse' :: DescribeBackupsResponse -> Maybe [Backup]
backups} -> Maybe [Backup]
backups) (\s :: DescribeBackupsResponse
s@DescribeBackupsResponse' {} Maybe [Backup]
a -> DescribeBackupsResponse
s {$sel:backups:DescribeBackupsResponse' :: Maybe [Backup]
backups = Maybe [Backup]
a} :: DescribeBackupsResponse) ((Maybe [Backup] -> f (Maybe [Backup]))
-> DescribeBackupsResponse -> f DescribeBackupsResponse)
-> ((Maybe [Backup] -> f (Maybe [Backup]))
-> Maybe [Backup] -> f (Maybe [Backup]))
-> (Maybe [Backup] -> f (Maybe [Backup]))
-> DescribeBackupsResponse
-> f DescribeBackupsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Backup] [Backup] [Backup] [Backup]
-> Iso
(Maybe [Backup]) (Maybe [Backup]) (Maybe [Backup]) (Maybe [Backup])
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 [Backup] [Backup] [Backup] [Backup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeBackupsResponse_nextToken :: Lens.Lens' DescribeBackupsResponse (Prelude.Maybe Prelude.Text)
describeBackupsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeBackupsResponse -> f DescribeBackupsResponse
describeBackupsResponse_nextToken = (DescribeBackupsResponse -> Maybe Text)
-> (DescribeBackupsResponse
-> Maybe Text -> DescribeBackupsResponse)
-> Lens' DescribeBackupsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeBackupsResponse' :: DescribeBackupsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeBackupsResponse
s@DescribeBackupsResponse' {} Maybe Text
a -> DescribeBackupsResponse
s {$sel:nextToken:DescribeBackupsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeBackupsResponse)
describeBackupsResponse_httpStatus :: Lens.Lens' DescribeBackupsResponse Prelude.Int
describeBackupsResponse_httpStatus :: (Int -> f Int)
-> DescribeBackupsResponse -> f DescribeBackupsResponse
describeBackupsResponse_httpStatus = (DescribeBackupsResponse -> Int)
-> (DescribeBackupsResponse -> Int -> DescribeBackupsResponse)
-> Lens DescribeBackupsResponse DescribeBackupsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeBackupsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeBackupsResponse' :: DescribeBackupsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeBackupsResponse
s@DescribeBackupsResponse' {} Int
a -> DescribeBackupsResponse
s {$sel:httpStatus:DescribeBackupsResponse' :: Int
httpStatus = Int
a} :: DescribeBackupsResponse)
instance Prelude.NFData DescribeBackupsResponse