{-# 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.Backup.ListRecoveryPointsByBackupVault
(
ListRecoveryPointsByBackupVault (..),
newListRecoveryPointsByBackupVault,
listRecoveryPointsByBackupVault_byResourceArn,
listRecoveryPointsByBackupVault_byCreatedAfter,
listRecoveryPointsByBackupVault_byCreatedBefore,
listRecoveryPointsByBackupVault_byBackupPlanId,
listRecoveryPointsByBackupVault_byResourceType,
listRecoveryPointsByBackupVault_nextToken,
listRecoveryPointsByBackupVault_maxResults,
listRecoveryPointsByBackupVault_backupVaultName,
ListRecoveryPointsByBackupVaultResponse (..),
newListRecoveryPointsByBackupVaultResponse,
listRecoveryPointsByBackupVaultResponse_recoveryPoints,
listRecoveryPointsByBackupVaultResponse_nextToken,
listRecoveryPointsByBackupVaultResponse_httpStatus,
)
where
import Amazonka.Backup.Types
import qualified Amazonka.Core as Core
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 ListRecoveryPointsByBackupVault = ListRecoveryPointsByBackupVault'
{
ListRecoveryPointsByBackupVault -> Maybe Text
byResourceArn :: Prelude.Maybe Prelude.Text,
ListRecoveryPointsByBackupVault -> Maybe POSIX
byCreatedAfter :: Prelude.Maybe Core.POSIX,
ListRecoveryPointsByBackupVault -> Maybe POSIX
byCreatedBefore :: Prelude.Maybe Core.POSIX,
ListRecoveryPointsByBackupVault -> Maybe Text
byBackupPlanId :: Prelude.Maybe Prelude.Text,
ListRecoveryPointsByBackupVault -> Maybe Text
byResourceType :: Prelude.Maybe Prelude.Text,
ListRecoveryPointsByBackupVault -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListRecoveryPointsByBackupVault -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListRecoveryPointsByBackupVault -> Text
backupVaultName :: Prelude.Text
}
deriving (ListRecoveryPointsByBackupVault
-> ListRecoveryPointsByBackupVault -> Bool
(ListRecoveryPointsByBackupVault
-> ListRecoveryPointsByBackupVault -> Bool)
-> (ListRecoveryPointsByBackupVault
-> ListRecoveryPointsByBackupVault -> Bool)
-> Eq ListRecoveryPointsByBackupVault
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecoveryPointsByBackupVault
-> ListRecoveryPointsByBackupVault -> Bool
$c/= :: ListRecoveryPointsByBackupVault
-> ListRecoveryPointsByBackupVault -> Bool
== :: ListRecoveryPointsByBackupVault
-> ListRecoveryPointsByBackupVault -> Bool
$c== :: ListRecoveryPointsByBackupVault
-> ListRecoveryPointsByBackupVault -> Bool
Prelude.Eq, ReadPrec [ListRecoveryPointsByBackupVault]
ReadPrec ListRecoveryPointsByBackupVault
Int -> ReadS ListRecoveryPointsByBackupVault
ReadS [ListRecoveryPointsByBackupVault]
(Int -> ReadS ListRecoveryPointsByBackupVault)
-> ReadS [ListRecoveryPointsByBackupVault]
-> ReadPrec ListRecoveryPointsByBackupVault
-> ReadPrec [ListRecoveryPointsByBackupVault]
-> Read ListRecoveryPointsByBackupVault
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecoveryPointsByBackupVault]
$creadListPrec :: ReadPrec [ListRecoveryPointsByBackupVault]
readPrec :: ReadPrec ListRecoveryPointsByBackupVault
$creadPrec :: ReadPrec ListRecoveryPointsByBackupVault
readList :: ReadS [ListRecoveryPointsByBackupVault]
$creadList :: ReadS [ListRecoveryPointsByBackupVault]
readsPrec :: Int -> ReadS ListRecoveryPointsByBackupVault
$creadsPrec :: Int -> ReadS ListRecoveryPointsByBackupVault
Prelude.Read, Int -> ListRecoveryPointsByBackupVault -> ShowS
[ListRecoveryPointsByBackupVault] -> ShowS
ListRecoveryPointsByBackupVault -> String
(Int -> ListRecoveryPointsByBackupVault -> ShowS)
-> (ListRecoveryPointsByBackupVault -> String)
-> ([ListRecoveryPointsByBackupVault] -> ShowS)
-> Show ListRecoveryPointsByBackupVault
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecoveryPointsByBackupVault] -> ShowS
$cshowList :: [ListRecoveryPointsByBackupVault] -> ShowS
show :: ListRecoveryPointsByBackupVault -> String
$cshow :: ListRecoveryPointsByBackupVault -> String
showsPrec :: Int -> ListRecoveryPointsByBackupVault -> ShowS
$cshowsPrec :: Int -> ListRecoveryPointsByBackupVault -> ShowS
Prelude.Show, (forall x.
ListRecoveryPointsByBackupVault
-> Rep ListRecoveryPointsByBackupVault x)
-> (forall x.
Rep ListRecoveryPointsByBackupVault x
-> ListRecoveryPointsByBackupVault)
-> Generic ListRecoveryPointsByBackupVault
forall x.
Rep ListRecoveryPointsByBackupVault x
-> ListRecoveryPointsByBackupVault
forall x.
ListRecoveryPointsByBackupVault
-> Rep ListRecoveryPointsByBackupVault x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRecoveryPointsByBackupVault x
-> ListRecoveryPointsByBackupVault
$cfrom :: forall x.
ListRecoveryPointsByBackupVault
-> Rep ListRecoveryPointsByBackupVault x
Prelude.Generic)
newListRecoveryPointsByBackupVault ::
Prelude.Text ->
ListRecoveryPointsByBackupVault
newListRecoveryPointsByBackupVault :: Text -> ListRecoveryPointsByBackupVault
newListRecoveryPointsByBackupVault Text
pBackupVaultName_ =
ListRecoveryPointsByBackupVault' :: Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Text
-> ListRecoveryPointsByBackupVault
ListRecoveryPointsByBackupVault'
{ $sel:byResourceArn:ListRecoveryPointsByBackupVault' :: Maybe Text
byResourceArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:byCreatedAfter:ListRecoveryPointsByBackupVault' :: Maybe POSIX
byCreatedAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:byCreatedBefore:ListRecoveryPointsByBackupVault' :: Maybe POSIX
byCreatedBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:byBackupPlanId:ListRecoveryPointsByBackupVault' :: Maybe Text
byBackupPlanId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:byResourceType:ListRecoveryPointsByBackupVault' :: Maybe Text
byResourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListRecoveryPointsByBackupVault' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListRecoveryPointsByBackupVault' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:backupVaultName:ListRecoveryPointsByBackupVault' :: Text
backupVaultName = Text
pBackupVaultName_
}
listRecoveryPointsByBackupVault_byResourceArn :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Text)
listRecoveryPointsByBackupVault_byResourceArn :: (Maybe Text -> f (Maybe Text))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
listRecoveryPointsByBackupVault_byResourceArn = (ListRecoveryPointsByBackupVault -> Maybe Text)
-> (ListRecoveryPointsByBackupVault
-> Maybe Text -> ListRecoveryPointsByBackupVault)
-> Lens
ListRecoveryPointsByBackupVault
ListRecoveryPointsByBackupVault
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVault' {Maybe Text
byResourceArn :: Maybe Text
$sel:byResourceArn:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
byResourceArn} -> Maybe Text
byResourceArn) (\s :: ListRecoveryPointsByBackupVault
s@ListRecoveryPointsByBackupVault' {} Maybe Text
a -> ListRecoveryPointsByBackupVault
s {$sel:byResourceArn:ListRecoveryPointsByBackupVault' :: Maybe Text
byResourceArn = Maybe Text
a} :: ListRecoveryPointsByBackupVault)
listRecoveryPointsByBackupVault_byCreatedAfter :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.UTCTime)
listRecoveryPointsByBackupVault_byCreatedAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
listRecoveryPointsByBackupVault_byCreatedAfter = (ListRecoveryPointsByBackupVault -> Maybe POSIX)
-> (ListRecoveryPointsByBackupVault
-> Maybe POSIX -> ListRecoveryPointsByBackupVault)
-> Lens
ListRecoveryPointsByBackupVault
ListRecoveryPointsByBackupVault
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVault' {Maybe POSIX
byCreatedAfter :: Maybe POSIX
$sel:byCreatedAfter:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe POSIX
byCreatedAfter} -> Maybe POSIX
byCreatedAfter) (\s :: ListRecoveryPointsByBackupVault
s@ListRecoveryPointsByBackupVault' {} Maybe POSIX
a -> ListRecoveryPointsByBackupVault
s {$sel:byCreatedAfter:ListRecoveryPointsByBackupVault' :: Maybe POSIX
byCreatedAfter = Maybe POSIX
a} :: ListRecoveryPointsByBackupVault) ((Maybe POSIX -> f (Maybe POSIX))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listRecoveryPointsByBackupVault_byCreatedBefore :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.UTCTime)
listRecoveryPointsByBackupVault_byCreatedBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
listRecoveryPointsByBackupVault_byCreatedBefore = (ListRecoveryPointsByBackupVault -> Maybe POSIX)
-> (ListRecoveryPointsByBackupVault
-> Maybe POSIX -> ListRecoveryPointsByBackupVault)
-> Lens
ListRecoveryPointsByBackupVault
ListRecoveryPointsByBackupVault
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVault' {Maybe POSIX
byCreatedBefore :: Maybe POSIX
$sel:byCreatedBefore:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe POSIX
byCreatedBefore} -> Maybe POSIX
byCreatedBefore) (\s :: ListRecoveryPointsByBackupVault
s@ListRecoveryPointsByBackupVault' {} Maybe POSIX
a -> ListRecoveryPointsByBackupVault
s {$sel:byCreatedBefore:ListRecoveryPointsByBackupVault' :: Maybe POSIX
byCreatedBefore = Maybe POSIX
a} :: ListRecoveryPointsByBackupVault) ((Maybe POSIX -> f (Maybe POSIX))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
listRecoveryPointsByBackupVault_byBackupPlanId :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Text)
listRecoveryPointsByBackupVault_byBackupPlanId :: (Maybe Text -> f (Maybe Text))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
listRecoveryPointsByBackupVault_byBackupPlanId = (ListRecoveryPointsByBackupVault -> Maybe Text)
-> (ListRecoveryPointsByBackupVault
-> Maybe Text -> ListRecoveryPointsByBackupVault)
-> Lens
ListRecoveryPointsByBackupVault
ListRecoveryPointsByBackupVault
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVault' {Maybe Text
byBackupPlanId :: Maybe Text
$sel:byBackupPlanId:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
byBackupPlanId} -> Maybe Text
byBackupPlanId) (\s :: ListRecoveryPointsByBackupVault
s@ListRecoveryPointsByBackupVault' {} Maybe Text
a -> ListRecoveryPointsByBackupVault
s {$sel:byBackupPlanId:ListRecoveryPointsByBackupVault' :: Maybe Text
byBackupPlanId = Maybe Text
a} :: ListRecoveryPointsByBackupVault)
listRecoveryPointsByBackupVault_byResourceType :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Text)
listRecoveryPointsByBackupVault_byResourceType :: (Maybe Text -> f (Maybe Text))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
listRecoveryPointsByBackupVault_byResourceType = (ListRecoveryPointsByBackupVault -> Maybe Text)
-> (ListRecoveryPointsByBackupVault
-> Maybe Text -> ListRecoveryPointsByBackupVault)
-> Lens
ListRecoveryPointsByBackupVault
ListRecoveryPointsByBackupVault
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVault' {Maybe Text
byResourceType :: Maybe Text
$sel:byResourceType:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
byResourceType} -> Maybe Text
byResourceType) (\s :: ListRecoveryPointsByBackupVault
s@ListRecoveryPointsByBackupVault' {} Maybe Text
a -> ListRecoveryPointsByBackupVault
s {$sel:byResourceType:ListRecoveryPointsByBackupVault' :: Maybe Text
byResourceType = Maybe Text
a} :: ListRecoveryPointsByBackupVault)
listRecoveryPointsByBackupVault_nextToken :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Text)
listRecoveryPointsByBackupVault_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
listRecoveryPointsByBackupVault_nextToken = (ListRecoveryPointsByBackupVault -> Maybe Text)
-> (ListRecoveryPointsByBackupVault
-> Maybe Text -> ListRecoveryPointsByBackupVault)
-> Lens
ListRecoveryPointsByBackupVault
ListRecoveryPointsByBackupVault
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVault' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecoveryPointsByBackupVault
s@ListRecoveryPointsByBackupVault' {} Maybe Text
a -> ListRecoveryPointsByBackupVault
s {$sel:nextToken:ListRecoveryPointsByBackupVault' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecoveryPointsByBackupVault)
listRecoveryPointsByBackupVault_maxResults :: Lens.Lens' ListRecoveryPointsByBackupVault (Prelude.Maybe Prelude.Natural)
listRecoveryPointsByBackupVault_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
listRecoveryPointsByBackupVault_maxResults = (ListRecoveryPointsByBackupVault -> Maybe Natural)
-> (ListRecoveryPointsByBackupVault
-> Maybe Natural -> ListRecoveryPointsByBackupVault)
-> Lens
ListRecoveryPointsByBackupVault
ListRecoveryPointsByBackupVault
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVault' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRecoveryPointsByBackupVault
s@ListRecoveryPointsByBackupVault' {} Maybe Natural
a -> ListRecoveryPointsByBackupVault
s {$sel:maxResults:ListRecoveryPointsByBackupVault' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRecoveryPointsByBackupVault)
listRecoveryPointsByBackupVault_backupVaultName :: Lens.Lens' ListRecoveryPointsByBackupVault Prelude.Text
listRecoveryPointsByBackupVault_backupVaultName :: (Text -> f Text)
-> ListRecoveryPointsByBackupVault
-> f ListRecoveryPointsByBackupVault
listRecoveryPointsByBackupVault_backupVaultName = (ListRecoveryPointsByBackupVault -> Text)
-> (ListRecoveryPointsByBackupVault
-> Text -> ListRecoveryPointsByBackupVault)
-> Lens
ListRecoveryPointsByBackupVault
ListRecoveryPointsByBackupVault
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVault' {Text
backupVaultName :: Text
$sel:backupVaultName:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Text
backupVaultName} -> Text
backupVaultName) (\s :: ListRecoveryPointsByBackupVault
s@ListRecoveryPointsByBackupVault' {} Text
a -> ListRecoveryPointsByBackupVault
s {$sel:backupVaultName:ListRecoveryPointsByBackupVault' :: Text
backupVaultName = Text
a} :: ListRecoveryPointsByBackupVault)
instance
Core.AWSRequest
ListRecoveryPointsByBackupVault
where
type
AWSResponse ListRecoveryPointsByBackupVault =
ListRecoveryPointsByBackupVaultResponse
request :: ListRecoveryPointsByBackupVault
-> Request ListRecoveryPointsByBackupVault
request = Service
-> ListRecoveryPointsByBackupVault
-> Request ListRecoveryPointsByBackupVault
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy ListRecoveryPointsByBackupVault
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListRecoveryPointsByBackupVault)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListRecoveryPointsByBackupVault))
-> Logger
-> Service
-> Proxy ListRecoveryPointsByBackupVault
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse ListRecoveryPointsByBackupVault)))
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 [RecoveryPointByBackupVault]
-> Maybe Text -> Int -> ListRecoveryPointsByBackupVaultResponse
ListRecoveryPointsByBackupVaultResponse'
(Maybe [RecoveryPointByBackupVault]
-> Maybe Text -> Int -> ListRecoveryPointsByBackupVaultResponse)
-> Either String (Maybe [RecoveryPointByBackupVault])
-> Either
String
(Maybe Text -> Int -> ListRecoveryPointsByBackupVaultResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [RecoveryPointByBackupVault]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RecoveryPoints" Either String (Maybe (Maybe [RecoveryPointByBackupVault]))
-> Maybe [RecoveryPointByBackupVault]
-> Either String (Maybe [RecoveryPointByBackupVault])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [RecoveryPointByBackupVault]
forall a. Monoid a => a
Prelude.mempty)
Either
String
(Maybe Text -> Int -> ListRecoveryPointsByBackupVaultResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListRecoveryPointsByBackupVaultResponse)
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 -> ListRecoveryPointsByBackupVaultResponse)
-> Either String Int
-> Either String ListRecoveryPointsByBackupVaultResponse
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
ListRecoveryPointsByBackupVault
instance
Prelude.NFData
ListRecoveryPointsByBackupVault
instance
Core.ToHeaders
ListRecoveryPointsByBackupVault
where
toHeaders :: ListRecoveryPointsByBackupVault -> ResponseHeaders
toHeaders =
ResponseHeaders
-> ListRecoveryPointsByBackupVault -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath ListRecoveryPointsByBackupVault where
toPath :: ListRecoveryPointsByBackupVault -> ByteString
toPath ListRecoveryPointsByBackupVault' {Maybe Natural
Maybe Text
Maybe POSIX
Text
backupVaultName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
byResourceType :: Maybe Text
byBackupPlanId :: Maybe Text
byCreatedBefore :: Maybe POSIX
byCreatedAfter :: Maybe POSIX
byResourceArn :: Maybe Text
$sel:backupVaultName:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Text
$sel:maxResults:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Natural
$sel:nextToken:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
$sel:byResourceType:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
$sel:byBackupPlanId:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
$sel:byCreatedBefore:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe POSIX
$sel:byCreatedAfter:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe POSIX
$sel:byResourceArn:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/backup-vaults/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
backupVaultName,
ByteString
"/recovery-points/"
]
instance Core.ToQuery ListRecoveryPointsByBackupVault where
toQuery :: ListRecoveryPointsByBackupVault -> QueryString
toQuery ListRecoveryPointsByBackupVault' {Maybe Natural
Maybe Text
Maybe POSIX
Text
backupVaultName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
byResourceType :: Maybe Text
byBackupPlanId :: Maybe Text
byCreatedBefore :: Maybe POSIX
byCreatedAfter :: Maybe POSIX
byResourceArn :: Maybe Text
$sel:backupVaultName:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Text
$sel:maxResults:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Natural
$sel:nextToken:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
$sel:byResourceType:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
$sel:byBackupPlanId:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
$sel:byCreatedBefore:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe POSIX
$sel:byCreatedAfter:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe POSIX
$sel:byResourceArn:ListRecoveryPointsByBackupVault' :: ListRecoveryPointsByBackupVault -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"resourceArn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
byResourceArn,
ByteString
"createdAfter" ByteString -> Maybe POSIX -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe POSIX
byCreatedAfter,
ByteString
"createdBefore" ByteString -> Maybe POSIX -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe POSIX
byCreatedBefore,
ByteString
"backupPlanId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
byBackupPlanId,
ByteString
"resourceType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
byResourceType,
ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data ListRecoveryPointsByBackupVaultResponse = ListRecoveryPointsByBackupVaultResponse'
{
ListRecoveryPointsByBackupVaultResponse
-> Maybe [RecoveryPointByBackupVault]
recoveryPoints :: Prelude.Maybe [RecoveryPointByBackupVault],
ListRecoveryPointsByBackupVaultResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListRecoveryPointsByBackupVaultResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListRecoveryPointsByBackupVaultResponse
-> ListRecoveryPointsByBackupVaultResponse -> Bool
(ListRecoveryPointsByBackupVaultResponse
-> ListRecoveryPointsByBackupVaultResponse -> Bool)
-> (ListRecoveryPointsByBackupVaultResponse
-> ListRecoveryPointsByBackupVaultResponse -> Bool)
-> Eq ListRecoveryPointsByBackupVaultResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecoveryPointsByBackupVaultResponse
-> ListRecoveryPointsByBackupVaultResponse -> Bool
$c/= :: ListRecoveryPointsByBackupVaultResponse
-> ListRecoveryPointsByBackupVaultResponse -> Bool
== :: ListRecoveryPointsByBackupVaultResponse
-> ListRecoveryPointsByBackupVaultResponse -> Bool
$c== :: ListRecoveryPointsByBackupVaultResponse
-> ListRecoveryPointsByBackupVaultResponse -> Bool
Prelude.Eq, ReadPrec [ListRecoveryPointsByBackupVaultResponse]
ReadPrec ListRecoveryPointsByBackupVaultResponse
Int -> ReadS ListRecoveryPointsByBackupVaultResponse
ReadS [ListRecoveryPointsByBackupVaultResponse]
(Int -> ReadS ListRecoveryPointsByBackupVaultResponse)
-> ReadS [ListRecoveryPointsByBackupVaultResponse]
-> ReadPrec ListRecoveryPointsByBackupVaultResponse
-> ReadPrec [ListRecoveryPointsByBackupVaultResponse]
-> Read ListRecoveryPointsByBackupVaultResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecoveryPointsByBackupVaultResponse]
$creadListPrec :: ReadPrec [ListRecoveryPointsByBackupVaultResponse]
readPrec :: ReadPrec ListRecoveryPointsByBackupVaultResponse
$creadPrec :: ReadPrec ListRecoveryPointsByBackupVaultResponse
readList :: ReadS [ListRecoveryPointsByBackupVaultResponse]
$creadList :: ReadS [ListRecoveryPointsByBackupVaultResponse]
readsPrec :: Int -> ReadS ListRecoveryPointsByBackupVaultResponse
$creadsPrec :: Int -> ReadS ListRecoveryPointsByBackupVaultResponse
Prelude.Read, Int -> ListRecoveryPointsByBackupVaultResponse -> ShowS
[ListRecoveryPointsByBackupVaultResponse] -> ShowS
ListRecoveryPointsByBackupVaultResponse -> String
(Int -> ListRecoveryPointsByBackupVaultResponse -> ShowS)
-> (ListRecoveryPointsByBackupVaultResponse -> String)
-> ([ListRecoveryPointsByBackupVaultResponse] -> ShowS)
-> Show ListRecoveryPointsByBackupVaultResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecoveryPointsByBackupVaultResponse] -> ShowS
$cshowList :: [ListRecoveryPointsByBackupVaultResponse] -> ShowS
show :: ListRecoveryPointsByBackupVaultResponse -> String
$cshow :: ListRecoveryPointsByBackupVaultResponse -> String
showsPrec :: Int -> ListRecoveryPointsByBackupVaultResponse -> ShowS
$cshowsPrec :: Int -> ListRecoveryPointsByBackupVaultResponse -> ShowS
Prelude.Show, (forall x.
ListRecoveryPointsByBackupVaultResponse
-> Rep ListRecoveryPointsByBackupVaultResponse x)
-> (forall x.
Rep ListRecoveryPointsByBackupVaultResponse x
-> ListRecoveryPointsByBackupVaultResponse)
-> Generic ListRecoveryPointsByBackupVaultResponse
forall x.
Rep ListRecoveryPointsByBackupVaultResponse x
-> ListRecoveryPointsByBackupVaultResponse
forall x.
ListRecoveryPointsByBackupVaultResponse
-> Rep ListRecoveryPointsByBackupVaultResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRecoveryPointsByBackupVaultResponse x
-> ListRecoveryPointsByBackupVaultResponse
$cfrom :: forall x.
ListRecoveryPointsByBackupVaultResponse
-> Rep ListRecoveryPointsByBackupVaultResponse x
Prelude.Generic)
newListRecoveryPointsByBackupVaultResponse ::
Prelude.Int ->
ListRecoveryPointsByBackupVaultResponse
newListRecoveryPointsByBackupVaultResponse :: Int -> ListRecoveryPointsByBackupVaultResponse
newListRecoveryPointsByBackupVaultResponse
Int
pHttpStatus_ =
ListRecoveryPointsByBackupVaultResponse' :: Maybe [RecoveryPointByBackupVault]
-> Maybe Text -> Int -> ListRecoveryPointsByBackupVaultResponse
ListRecoveryPointsByBackupVaultResponse'
{ $sel:recoveryPoints:ListRecoveryPointsByBackupVaultResponse' :: Maybe [RecoveryPointByBackupVault]
recoveryPoints =
Maybe [RecoveryPointByBackupVault]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListRecoveryPointsByBackupVaultResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListRecoveryPointsByBackupVaultResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listRecoveryPointsByBackupVaultResponse_recoveryPoints :: Lens.Lens' ListRecoveryPointsByBackupVaultResponse (Prelude.Maybe [RecoveryPointByBackupVault])
listRecoveryPointsByBackupVaultResponse_recoveryPoints :: (Maybe [RecoveryPointByBackupVault]
-> f (Maybe [RecoveryPointByBackupVault]))
-> ListRecoveryPointsByBackupVaultResponse
-> f ListRecoveryPointsByBackupVaultResponse
listRecoveryPointsByBackupVaultResponse_recoveryPoints = (ListRecoveryPointsByBackupVaultResponse
-> Maybe [RecoveryPointByBackupVault])
-> (ListRecoveryPointsByBackupVaultResponse
-> Maybe [RecoveryPointByBackupVault]
-> ListRecoveryPointsByBackupVaultResponse)
-> Lens
ListRecoveryPointsByBackupVaultResponse
ListRecoveryPointsByBackupVaultResponse
(Maybe [RecoveryPointByBackupVault])
(Maybe [RecoveryPointByBackupVault])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVaultResponse' {Maybe [RecoveryPointByBackupVault]
recoveryPoints :: Maybe [RecoveryPointByBackupVault]
$sel:recoveryPoints:ListRecoveryPointsByBackupVaultResponse' :: ListRecoveryPointsByBackupVaultResponse
-> Maybe [RecoveryPointByBackupVault]
recoveryPoints} -> Maybe [RecoveryPointByBackupVault]
recoveryPoints) (\s :: ListRecoveryPointsByBackupVaultResponse
s@ListRecoveryPointsByBackupVaultResponse' {} Maybe [RecoveryPointByBackupVault]
a -> ListRecoveryPointsByBackupVaultResponse
s {$sel:recoveryPoints:ListRecoveryPointsByBackupVaultResponse' :: Maybe [RecoveryPointByBackupVault]
recoveryPoints = Maybe [RecoveryPointByBackupVault]
a} :: ListRecoveryPointsByBackupVaultResponse) ((Maybe [RecoveryPointByBackupVault]
-> f (Maybe [RecoveryPointByBackupVault]))
-> ListRecoveryPointsByBackupVaultResponse
-> f ListRecoveryPointsByBackupVaultResponse)
-> ((Maybe [RecoveryPointByBackupVault]
-> f (Maybe [RecoveryPointByBackupVault]))
-> Maybe [RecoveryPointByBackupVault]
-> f (Maybe [RecoveryPointByBackupVault]))
-> (Maybe [RecoveryPointByBackupVault]
-> f (Maybe [RecoveryPointByBackupVault]))
-> ListRecoveryPointsByBackupVaultResponse
-> f ListRecoveryPointsByBackupVaultResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RecoveryPointByBackupVault]
[RecoveryPointByBackupVault]
[RecoveryPointByBackupVault]
[RecoveryPointByBackupVault]
-> Iso
(Maybe [RecoveryPointByBackupVault])
(Maybe [RecoveryPointByBackupVault])
(Maybe [RecoveryPointByBackupVault])
(Maybe [RecoveryPointByBackupVault])
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
[RecoveryPointByBackupVault]
[RecoveryPointByBackupVault]
[RecoveryPointByBackupVault]
[RecoveryPointByBackupVault]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listRecoveryPointsByBackupVaultResponse_nextToken :: Lens.Lens' ListRecoveryPointsByBackupVaultResponse (Prelude.Maybe Prelude.Text)
listRecoveryPointsByBackupVaultResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRecoveryPointsByBackupVaultResponse
-> f ListRecoveryPointsByBackupVaultResponse
listRecoveryPointsByBackupVaultResponse_nextToken = (ListRecoveryPointsByBackupVaultResponse -> Maybe Text)
-> (ListRecoveryPointsByBackupVaultResponse
-> Maybe Text -> ListRecoveryPointsByBackupVaultResponse)
-> Lens
ListRecoveryPointsByBackupVaultResponse
ListRecoveryPointsByBackupVaultResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVaultResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecoveryPointsByBackupVaultResponse' :: ListRecoveryPointsByBackupVaultResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecoveryPointsByBackupVaultResponse
s@ListRecoveryPointsByBackupVaultResponse' {} Maybe Text
a -> ListRecoveryPointsByBackupVaultResponse
s {$sel:nextToken:ListRecoveryPointsByBackupVaultResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecoveryPointsByBackupVaultResponse)
listRecoveryPointsByBackupVaultResponse_httpStatus :: Lens.Lens' ListRecoveryPointsByBackupVaultResponse Prelude.Int
listRecoveryPointsByBackupVaultResponse_httpStatus :: (Int -> f Int)
-> ListRecoveryPointsByBackupVaultResponse
-> f ListRecoveryPointsByBackupVaultResponse
listRecoveryPointsByBackupVaultResponse_httpStatus = (ListRecoveryPointsByBackupVaultResponse -> Int)
-> (ListRecoveryPointsByBackupVaultResponse
-> Int -> ListRecoveryPointsByBackupVaultResponse)
-> Lens
ListRecoveryPointsByBackupVaultResponse
ListRecoveryPointsByBackupVaultResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecoveryPointsByBackupVaultResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListRecoveryPointsByBackupVaultResponse' :: ListRecoveryPointsByBackupVaultResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListRecoveryPointsByBackupVaultResponse
s@ListRecoveryPointsByBackupVaultResponse' {} Int
a -> ListRecoveryPointsByBackupVaultResponse
s {$sel:httpStatus:ListRecoveryPointsByBackupVaultResponse' :: Int
httpStatus = Int
a} :: ListRecoveryPointsByBackupVaultResponse)
instance
Prelude.NFData
ListRecoveryPointsByBackupVaultResponse