{-# 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.QLDB.ListJournalS3Exports
(
ListJournalS3Exports (..),
newListJournalS3Exports,
listJournalS3Exports_maxResults,
listJournalS3Exports_nextToken,
ListJournalS3ExportsResponse (..),
newListJournalS3ExportsResponse,
listJournalS3ExportsResponse_journalS3Exports,
listJournalS3ExportsResponse_nextToken,
listJournalS3ExportsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.QLDB.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ListJournalS3Exports = ListJournalS3Exports'
{
ListJournalS3Exports -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
ListJournalS3Exports -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (ListJournalS3Exports -> ListJournalS3Exports -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJournalS3Exports -> ListJournalS3Exports -> Bool
$c/= :: ListJournalS3Exports -> ListJournalS3Exports -> Bool
== :: ListJournalS3Exports -> ListJournalS3Exports -> Bool
$c== :: ListJournalS3Exports -> ListJournalS3Exports -> Bool
Prelude.Eq, ReadPrec [ListJournalS3Exports]
ReadPrec ListJournalS3Exports
Int -> ReadS ListJournalS3Exports
ReadS [ListJournalS3Exports]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJournalS3Exports]
$creadListPrec :: ReadPrec [ListJournalS3Exports]
readPrec :: ReadPrec ListJournalS3Exports
$creadPrec :: ReadPrec ListJournalS3Exports
readList :: ReadS [ListJournalS3Exports]
$creadList :: ReadS [ListJournalS3Exports]
readsPrec :: Int -> ReadS ListJournalS3Exports
$creadsPrec :: Int -> ReadS ListJournalS3Exports
Prelude.Read, Int -> ListJournalS3Exports -> ShowS
[ListJournalS3Exports] -> ShowS
ListJournalS3Exports -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJournalS3Exports] -> ShowS
$cshowList :: [ListJournalS3Exports] -> ShowS
show :: ListJournalS3Exports -> String
$cshow :: ListJournalS3Exports -> String
showsPrec :: Int -> ListJournalS3Exports -> ShowS
$cshowsPrec :: Int -> ListJournalS3Exports -> ShowS
Prelude.Show, forall x. Rep ListJournalS3Exports x -> ListJournalS3Exports
forall x. ListJournalS3Exports -> Rep ListJournalS3Exports x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListJournalS3Exports x -> ListJournalS3Exports
$cfrom :: forall x. ListJournalS3Exports -> Rep ListJournalS3Exports x
Prelude.Generic)
newListJournalS3Exports ::
ListJournalS3Exports
newListJournalS3Exports :: ListJournalS3Exports
newListJournalS3Exports =
ListJournalS3Exports'
{ $sel:maxResults:ListJournalS3Exports' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListJournalS3Exports' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
}
listJournalS3Exports_maxResults :: Lens.Lens' ListJournalS3Exports (Prelude.Maybe Prelude.Natural)
listJournalS3Exports_maxResults :: Lens' ListJournalS3Exports (Maybe Natural)
listJournalS3Exports_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3Exports' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListJournalS3Exports' :: ListJournalS3Exports -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListJournalS3Exports
s@ListJournalS3Exports' {} Maybe Natural
a -> ListJournalS3Exports
s {$sel:maxResults:ListJournalS3Exports' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListJournalS3Exports)
listJournalS3Exports_nextToken :: Lens.Lens' ListJournalS3Exports (Prelude.Maybe Prelude.Text)
listJournalS3Exports_nextToken :: Lens' ListJournalS3Exports (Maybe Text)
listJournalS3Exports_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3Exports' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJournalS3Exports' :: ListJournalS3Exports -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJournalS3Exports
s@ListJournalS3Exports' {} Maybe Text
a -> ListJournalS3Exports
s {$sel:nextToken:ListJournalS3Exports' :: Maybe Text
nextToken = Maybe Text
a} :: ListJournalS3Exports)
instance Core.AWSRequest ListJournalS3Exports where
type
AWSResponse ListJournalS3Exports =
ListJournalS3ExportsResponse
request :: (Service -> Service)
-> ListJournalS3Exports -> Request ListJournalS3Exports
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListJournalS3Exports
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListJournalS3Exports)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe [JournalS3ExportDescription]
-> Maybe Text -> Int -> ListJournalS3ExportsResponse
ListJournalS3ExportsResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JournalS3Exports"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ListJournalS3Exports where
hashWithSalt :: Int -> ListJournalS3Exports -> Int
hashWithSalt Int
_salt ListJournalS3Exports' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListJournalS3Exports' :: ListJournalS3Exports -> Maybe Text
$sel:maxResults:ListJournalS3Exports' :: ListJournalS3Exports -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
instance Prelude.NFData ListJournalS3Exports where
rnf :: ListJournalS3Exports -> ()
rnf ListJournalS3Exports' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListJournalS3Exports' :: ListJournalS3Exports -> Maybe Text
$sel:maxResults:ListJournalS3Exports' :: ListJournalS3Exports -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
instance Data.ToHeaders ListJournalS3Exports where
toHeaders :: ListJournalS3Exports -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Data.ToPath ListJournalS3Exports where
toPath :: ListJournalS3Exports -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/journal-s3-exports"
instance Data.ToQuery ListJournalS3Exports where
toQuery :: ListJournalS3Exports -> QueryString
toQuery ListJournalS3Exports' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:nextToken:ListJournalS3Exports' :: ListJournalS3Exports -> Maybe Text
$sel:maxResults:ListJournalS3Exports' :: ListJournalS3Exports -> Maybe Natural
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"max_results" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"next_token" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
]
data ListJournalS3ExportsResponse = ListJournalS3ExportsResponse'
{
ListJournalS3ExportsResponse -> Maybe [JournalS3ExportDescription]
journalS3Exports :: Prelude.Maybe [JournalS3ExportDescription],
ListJournalS3ExportsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListJournalS3ExportsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListJournalS3ExportsResponse
-> ListJournalS3ExportsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJournalS3ExportsResponse
-> ListJournalS3ExportsResponse -> Bool
$c/= :: ListJournalS3ExportsResponse
-> ListJournalS3ExportsResponse -> Bool
== :: ListJournalS3ExportsResponse
-> ListJournalS3ExportsResponse -> Bool
$c== :: ListJournalS3ExportsResponse
-> ListJournalS3ExportsResponse -> Bool
Prelude.Eq, ReadPrec [ListJournalS3ExportsResponse]
ReadPrec ListJournalS3ExportsResponse
Int -> ReadS ListJournalS3ExportsResponse
ReadS [ListJournalS3ExportsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJournalS3ExportsResponse]
$creadListPrec :: ReadPrec [ListJournalS3ExportsResponse]
readPrec :: ReadPrec ListJournalS3ExportsResponse
$creadPrec :: ReadPrec ListJournalS3ExportsResponse
readList :: ReadS [ListJournalS3ExportsResponse]
$creadList :: ReadS [ListJournalS3ExportsResponse]
readsPrec :: Int -> ReadS ListJournalS3ExportsResponse
$creadsPrec :: Int -> ReadS ListJournalS3ExportsResponse
Prelude.Read, Int -> ListJournalS3ExportsResponse -> ShowS
[ListJournalS3ExportsResponse] -> ShowS
ListJournalS3ExportsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJournalS3ExportsResponse] -> ShowS
$cshowList :: [ListJournalS3ExportsResponse] -> ShowS
show :: ListJournalS3ExportsResponse -> String
$cshow :: ListJournalS3ExportsResponse -> String
showsPrec :: Int -> ListJournalS3ExportsResponse -> ShowS
$cshowsPrec :: Int -> ListJournalS3ExportsResponse -> ShowS
Prelude.Show, forall x.
Rep ListJournalS3ExportsResponse x -> ListJournalS3ExportsResponse
forall x.
ListJournalS3ExportsResponse -> Rep ListJournalS3ExportsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListJournalS3ExportsResponse x -> ListJournalS3ExportsResponse
$cfrom :: forall x.
ListJournalS3ExportsResponse -> Rep ListJournalS3ExportsResponse x
Prelude.Generic)
newListJournalS3ExportsResponse ::
Prelude.Int ->
ListJournalS3ExportsResponse
newListJournalS3ExportsResponse :: Int -> ListJournalS3ExportsResponse
newListJournalS3ExportsResponse Int
pHttpStatus_ =
ListJournalS3ExportsResponse'
{ $sel:journalS3Exports:ListJournalS3ExportsResponse' :: Maybe [JournalS3ExportDescription]
journalS3Exports =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListJournalS3ExportsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListJournalS3ExportsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listJournalS3ExportsResponse_journalS3Exports :: Lens.Lens' ListJournalS3ExportsResponse (Prelude.Maybe [JournalS3ExportDescription])
listJournalS3ExportsResponse_journalS3Exports :: Lens'
ListJournalS3ExportsResponse (Maybe [JournalS3ExportDescription])
listJournalS3ExportsResponse_journalS3Exports = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3ExportsResponse' {Maybe [JournalS3ExportDescription]
journalS3Exports :: Maybe [JournalS3ExportDescription]
$sel:journalS3Exports:ListJournalS3ExportsResponse' :: ListJournalS3ExportsResponse -> Maybe [JournalS3ExportDescription]
journalS3Exports} -> Maybe [JournalS3ExportDescription]
journalS3Exports) (\s :: ListJournalS3ExportsResponse
s@ListJournalS3ExportsResponse' {} Maybe [JournalS3ExportDescription]
a -> ListJournalS3ExportsResponse
s {$sel:journalS3Exports:ListJournalS3ExportsResponse' :: Maybe [JournalS3ExportDescription]
journalS3Exports = Maybe [JournalS3ExportDescription]
a} :: ListJournalS3ExportsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listJournalS3ExportsResponse_nextToken :: Lens.Lens' ListJournalS3ExportsResponse (Prelude.Maybe Prelude.Text)
listJournalS3ExportsResponse_nextToken :: Lens' ListJournalS3ExportsResponse (Maybe Text)
listJournalS3ExportsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3ExportsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJournalS3ExportsResponse' :: ListJournalS3ExportsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJournalS3ExportsResponse
s@ListJournalS3ExportsResponse' {} Maybe Text
a -> ListJournalS3ExportsResponse
s {$sel:nextToken:ListJournalS3ExportsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListJournalS3ExportsResponse)
listJournalS3ExportsResponse_httpStatus :: Lens.Lens' ListJournalS3ExportsResponse Prelude.Int
listJournalS3ExportsResponse_httpStatus :: Lens' ListJournalS3ExportsResponse Int
listJournalS3ExportsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3ExportsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListJournalS3ExportsResponse' :: ListJournalS3ExportsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListJournalS3ExportsResponse
s@ListJournalS3ExportsResponse' {} Int
a -> ListJournalS3ExportsResponse
s {$sel:httpStatus:ListJournalS3ExportsResponse' :: Int
httpStatus = Int
a} :: ListJournalS3ExportsResponse)
instance Prelude.NFData ListJournalS3ExportsResponse where
rnf :: ListJournalS3ExportsResponse -> ()
rnf ListJournalS3ExportsResponse' {Int
Maybe [JournalS3ExportDescription]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
journalS3Exports :: Maybe [JournalS3ExportDescription]
$sel:httpStatus:ListJournalS3ExportsResponse' :: ListJournalS3ExportsResponse -> Int
$sel:nextToken:ListJournalS3ExportsResponse' :: ListJournalS3ExportsResponse -> Maybe Text
$sel:journalS3Exports:ListJournalS3ExportsResponse' :: ListJournalS3ExportsResponse -> Maybe [JournalS3ExportDescription]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [JournalS3ExportDescription]
journalS3Exports
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus