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

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

-- |
-- Module      : Amazonka.QLDB.ListJournalS3ExportsForLedger
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns an array of journal export job descriptions for a specified
-- ledger.
--
-- This action returns a maximum of @MaxResults@ items, and is paginated so
-- that you can retrieve all the items by calling
-- @ListJournalS3ExportsForLedger@ multiple times.
--
-- This action does not return any expired export jobs. For more
-- information, see
-- <https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration Export job expiration>
-- in the /Amazon QLDB Developer Guide/.
module Amazonka.QLDB.ListJournalS3ExportsForLedger
  ( -- * Creating a Request
    ListJournalS3ExportsForLedger (..),
    newListJournalS3ExportsForLedger,

    -- * Request Lenses
    listJournalS3ExportsForLedger_maxResults,
    listJournalS3ExportsForLedger_nextToken,
    listJournalS3ExportsForLedger_name,

    -- * Destructuring the Response
    ListJournalS3ExportsForLedgerResponse (..),
    newListJournalS3ExportsForLedgerResponse,

    -- * Response Lenses
    listJournalS3ExportsForLedgerResponse_journalS3Exports,
    listJournalS3ExportsForLedgerResponse_nextToken,
    listJournalS3ExportsForLedgerResponse_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

-- | /See:/ 'newListJournalS3ExportsForLedger' smart constructor.
data ListJournalS3ExportsForLedger = ListJournalS3ExportsForLedger'
  { -- | The maximum number of results to return in a single
    -- @ListJournalS3ExportsForLedger@ request. (The actual number of results
    -- returned might be fewer.)
    ListJournalS3ExportsForLedger -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A pagination token, indicating that you want to retrieve the next page
    -- of results. If you received a value for @NextToken@ in the response from
    -- a previous @ListJournalS3ExportsForLedger@ call, then you should use
    -- that value as input here.
    ListJournalS3ExportsForLedger -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the ledger.
    ListJournalS3ExportsForLedger -> Text
name :: Prelude.Text
  }
  deriving (ListJournalS3ExportsForLedger
-> ListJournalS3ExportsForLedger -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJournalS3ExportsForLedger
-> ListJournalS3ExportsForLedger -> Bool
$c/= :: ListJournalS3ExportsForLedger
-> ListJournalS3ExportsForLedger -> Bool
== :: ListJournalS3ExportsForLedger
-> ListJournalS3ExportsForLedger -> Bool
$c== :: ListJournalS3ExportsForLedger
-> ListJournalS3ExportsForLedger -> Bool
Prelude.Eq, ReadPrec [ListJournalS3ExportsForLedger]
ReadPrec ListJournalS3ExportsForLedger
Int -> ReadS ListJournalS3ExportsForLedger
ReadS [ListJournalS3ExportsForLedger]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJournalS3ExportsForLedger]
$creadListPrec :: ReadPrec [ListJournalS3ExportsForLedger]
readPrec :: ReadPrec ListJournalS3ExportsForLedger
$creadPrec :: ReadPrec ListJournalS3ExportsForLedger
readList :: ReadS [ListJournalS3ExportsForLedger]
$creadList :: ReadS [ListJournalS3ExportsForLedger]
readsPrec :: Int -> ReadS ListJournalS3ExportsForLedger
$creadsPrec :: Int -> ReadS ListJournalS3ExportsForLedger
Prelude.Read, Int -> ListJournalS3ExportsForLedger -> ShowS
[ListJournalS3ExportsForLedger] -> ShowS
ListJournalS3ExportsForLedger -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJournalS3ExportsForLedger] -> ShowS
$cshowList :: [ListJournalS3ExportsForLedger] -> ShowS
show :: ListJournalS3ExportsForLedger -> String
$cshow :: ListJournalS3ExportsForLedger -> String
showsPrec :: Int -> ListJournalS3ExportsForLedger -> ShowS
$cshowsPrec :: Int -> ListJournalS3ExportsForLedger -> ShowS
Prelude.Show, forall x.
Rep ListJournalS3ExportsForLedger x
-> ListJournalS3ExportsForLedger
forall x.
ListJournalS3ExportsForLedger
-> Rep ListJournalS3ExportsForLedger x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListJournalS3ExportsForLedger x
-> ListJournalS3ExportsForLedger
$cfrom :: forall x.
ListJournalS3ExportsForLedger
-> Rep ListJournalS3ExportsForLedger x
Prelude.Generic)

-- |
-- Create a value of 'ListJournalS3ExportsForLedger' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'maxResults', 'listJournalS3ExportsForLedger_maxResults' - The maximum number of results to return in a single
-- @ListJournalS3ExportsForLedger@ request. (The actual number of results
-- returned might be fewer.)
--
-- 'nextToken', 'listJournalS3ExportsForLedger_nextToken' - A pagination token, indicating that you want to retrieve the next page
-- of results. If you received a value for @NextToken@ in the response from
-- a previous @ListJournalS3ExportsForLedger@ call, then you should use
-- that value as input here.
--
-- 'name', 'listJournalS3ExportsForLedger_name' - The name of the ledger.
newListJournalS3ExportsForLedger ::
  -- | 'name'
  Prelude.Text ->
  ListJournalS3ExportsForLedger
newListJournalS3ExportsForLedger :: Text -> ListJournalS3ExportsForLedger
newListJournalS3ExportsForLedger Text
pName_ =
  ListJournalS3ExportsForLedger'
    { $sel:maxResults:ListJournalS3ExportsForLedger' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListJournalS3ExportsForLedger' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:name:ListJournalS3ExportsForLedger' :: Text
name = Text
pName_
    }

-- | The maximum number of results to return in a single
-- @ListJournalS3ExportsForLedger@ request. (The actual number of results
-- returned might be fewer.)
listJournalS3ExportsForLedger_maxResults :: Lens.Lens' ListJournalS3ExportsForLedger (Prelude.Maybe Prelude.Natural)
listJournalS3ExportsForLedger_maxResults :: Lens' ListJournalS3ExportsForLedger (Maybe Natural)
listJournalS3ExportsForLedger_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3ExportsForLedger' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListJournalS3ExportsForLedger
s@ListJournalS3ExportsForLedger' {} Maybe Natural
a -> ListJournalS3ExportsForLedger
s {$sel:maxResults:ListJournalS3ExportsForLedger' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListJournalS3ExportsForLedger)

-- | A pagination token, indicating that you want to retrieve the next page
-- of results. If you received a value for @NextToken@ in the response from
-- a previous @ListJournalS3ExportsForLedger@ call, then you should use
-- that value as input here.
listJournalS3ExportsForLedger_nextToken :: Lens.Lens' ListJournalS3ExportsForLedger (Prelude.Maybe Prelude.Text)
listJournalS3ExportsForLedger_nextToken :: Lens' ListJournalS3ExportsForLedger (Maybe Text)
listJournalS3ExportsForLedger_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3ExportsForLedger' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJournalS3ExportsForLedger
s@ListJournalS3ExportsForLedger' {} Maybe Text
a -> ListJournalS3ExportsForLedger
s {$sel:nextToken:ListJournalS3ExportsForLedger' :: Maybe Text
nextToken = Maybe Text
a} :: ListJournalS3ExportsForLedger)

-- | The name of the ledger.
listJournalS3ExportsForLedger_name :: Lens.Lens' ListJournalS3ExportsForLedger Prelude.Text
listJournalS3ExportsForLedger_name :: Lens' ListJournalS3ExportsForLedger Text
listJournalS3ExportsForLedger_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3ExportsForLedger' {Text
name :: Text
$sel:name:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Text
name} -> Text
name) (\s :: ListJournalS3ExportsForLedger
s@ListJournalS3ExportsForLedger' {} Text
a -> ListJournalS3ExportsForLedger
s {$sel:name:ListJournalS3ExportsForLedger' :: Text
name = Text
a} :: ListJournalS3ExportsForLedger)

instance
  Core.AWSRequest
    ListJournalS3ExportsForLedger
  where
  type
    AWSResponse ListJournalS3ExportsForLedger =
      ListJournalS3ExportsForLedgerResponse
  request :: (Service -> Service)
-> ListJournalS3ExportsForLedger
-> Request ListJournalS3ExportsForLedger
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 ListJournalS3ExportsForLedger
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListJournalS3ExportsForLedger)))
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 -> ListJournalS3ExportsForLedgerResponse
ListJournalS3ExportsForLedgerResponse'
            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
    ListJournalS3ExportsForLedger
  where
  hashWithSalt :: Int -> ListJournalS3ExportsForLedger -> Int
hashWithSalt Int
_salt ListJournalS3ExportsForLedger' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Text
$sel:nextToken:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Maybe Text
$sel:maxResults:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> 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
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData ListJournalS3ExportsForLedger where
  rnf :: ListJournalS3ExportsForLedger -> ()
rnf ListJournalS3ExportsForLedger' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Text
$sel:nextToken:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Maybe Text
$sel:maxResults:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> 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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders ListJournalS3ExportsForLedger where
  toHeaders :: ListJournalS3ExportsForLedger -> 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 ListJournalS3ExportsForLedger where
  toPath :: ListJournalS3ExportsForLedger -> ByteString
toPath ListJournalS3ExportsForLedger' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Text
$sel:nextToken:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Maybe Text
$sel:maxResults:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/ledgers/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name, ByteString
"/journal-s3-exports"]

instance Data.ToQuery ListJournalS3ExportsForLedger where
  toQuery :: ListJournalS3ExportsForLedger -> QueryString
toQuery ListJournalS3ExportsForLedger' {Maybe Natural
Maybe Text
Text
name :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Text
$sel:nextToken:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> Maybe Text
$sel:maxResults:ListJournalS3ExportsForLedger' :: ListJournalS3ExportsForLedger -> 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
      ]

-- | /See:/ 'newListJournalS3ExportsForLedgerResponse' smart constructor.
data ListJournalS3ExportsForLedgerResponse = ListJournalS3ExportsForLedgerResponse'
  { -- | The array of journal export job descriptions that are associated with
    -- the specified ledger.
    ListJournalS3ExportsForLedgerResponse
-> Maybe [JournalS3ExportDescription]
journalS3Exports :: Prelude.Maybe [JournalS3ExportDescription],
    -- | -   If @NextToken@ is empty, then the last page of results has been
    --     processed and there are no more results to be retrieved.
    --
    -- -   If @NextToken@ is /not/ empty, then there are more results
    --     available. To retrieve the next page of results, use the value of
    --     @NextToken@ in a subsequent @ListJournalS3ExportsForLedger@ call.
    ListJournalS3ExportsForLedgerResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListJournalS3ExportsForLedgerResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListJournalS3ExportsForLedgerResponse
-> ListJournalS3ExportsForLedgerResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJournalS3ExportsForLedgerResponse
-> ListJournalS3ExportsForLedgerResponse -> Bool
$c/= :: ListJournalS3ExportsForLedgerResponse
-> ListJournalS3ExportsForLedgerResponse -> Bool
== :: ListJournalS3ExportsForLedgerResponse
-> ListJournalS3ExportsForLedgerResponse -> Bool
$c== :: ListJournalS3ExportsForLedgerResponse
-> ListJournalS3ExportsForLedgerResponse -> Bool
Prelude.Eq, ReadPrec [ListJournalS3ExportsForLedgerResponse]
ReadPrec ListJournalS3ExportsForLedgerResponse
Int -> ReadS ListJournalS3ExportsForLedgerResponse
ReadS [ListJournalS3ExportsForLedgerResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJournalS3ExportsForLedgerResponse]
$creadListPrec :: ReadPrec [ListJournalS3ExportsForLedgerResponse]
readPrec :: ReadPrec ListJournalS3ExportsForLedgerResponse
$creadPrec :: ReadPrec ListJournalS3ExportsForLedgerResponse
readList :: ReadS [ListJournalS3ExportsForLedgerResponse]
$creadList :: ReadS [ListJournalS3ExportsForLedgerResponse]
readsPrec :: Int -> ReadS ListJournalS3ExportsForLedgerResponse
$creadsPrec :: Int -> ReadS ListJournalS3ExportsForLedgerResponse
Prelude.Read, Int -> ListJournalS3ExportsForLedgerResponse -> ShowS
[ListJournalS3ExportsForLedgerResponse] -> ShowS
ListJournalS3ExportsForLedgerResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJournalS3ExportsForLedgerResponse] -> ShowS
$cshowList :: [ListJournalS3ExportsForLedgerResponse] -> ShowS
show :: ListJournalS3ExportsForLedgerResponse -> String
$cshow :: ListJournalS3ExportsForLedgerResponse -> String
showsPrec :: Int -> ListJournalS3ExportsForLedgerResponse -> ShowS
$cshowsPrec :: Int -> ListJournalS3ExportsForLedgerResponse -> ShowS
Prelude.Show, forall x.
Rep ListJournalS3ExportsForLedgerResponse x
-> ListJournalS3ExportsForLedgerResponse
forall x.
ListJournalS3ExportsForLedgerResponse
-> Rep ListJournalS3ExportsForLedgerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListJournalS3ExportsForLedgerResponse x
-> ListJournalS3ExportsForLedgerResponse
$cfrom :: forall x.
ListJournalS3ExportsForLedgerResponse
-> Rep ListJournalS3ExportsForLedgerResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListJournalS3ExportsForLedgerResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'journalS3Exports', 'listJournalS3ExportsForLedgerResponse_journalS3Exports' - The array of journal export job descriptions that are associated with
-- the specified ledger.
--
-- 'nextToken', 'listJournalS3ExportsForLedgerResponse_nextToken' - -   If @NextToken@ is empty, then the last page of results has been
--     processed and there are no more results to be retrieved.
--
-- -   If @NextToken@ is /not/ empty, then there are more results
--     available. To retrieve the next page of results, use the value of
--     @NextToken@ in a subsequent @ListJournalS3ExportsForLedger@ call.
--
-- 'httpStatus', 'listJournalS3ExportsForLedgerResponse_httpStatus' - The response's http status code.
newListJournalS3ExportsForLedgerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListJournalS3ExportsForLedgerResponse
newListJournalS3ExportsForLedgerResponse :: Int -> ListJournalS3ExportsForLedgerResponse
newListJournalS3ExportsForLedgerResponse Int
pHttpStatus_ =
  ListJournalS3ExportsForLedgerResponse'
    { $sel:journalS3Exports:ListJournalS3ExportsForLedgerResponse' :: Maybe [JournalS3ExportDescription]
journalS3Exports =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListJournalS3ExportsForLedgerResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListJournalS3ExportsForLedgerResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The array of journal export job descriptions that are associated with
-- the specified ledger.
listJournalS3ExportsForLedgerResponse_journalS3Exports :: Lens.Lens' ListJournalS3ExportsForLedgerResponse (Prelude.Maybe [JournalS3ExportDescription])
listJournalS3ExportsForLedgerResponse_journalS3Exports :: Lens'
  ListJournalS3ExportsForLedgerResponse
  (Maybe [JournalS3ExportDescription])
listJournalS3ExportsForLedgerResponse_journalS3Exports = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3ExportsForLedgerResponse' {Maybe [JournalS3ExportDescription]
journalS3Exports :: Maybe [JournalS3ExportDescription]
$sel:journalS3Exports:ListJournalS3ExportsForLedgerResponse' :: ListJournalS3ExportsForLedgerResponse
-> Maybe [JournalS3ExportDescription]
journalS3Exports} -> Maybe [JournalS3ExportDescription]
journalS3Exports) (\s :: ListJournalS3ExportsForLedgerResponse
s@ListJournalS3ExportsForLedgerResponse' {} Maybe [JournalS3ExportDescription]
a -> ListJournalS3ExportsForLedgerResponse
s {$sel:journalS3Exports:ListJournalS3ExportsForLedgerResponse' :: Maybe [JournalS3ExportDescription]
journalS3Exports = Maybe [JournalS3ExportDescription]
a} :: ListJournalS3ExportsForLedgerResponse) 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

-- | -   If @NextToken@ is empty, then the last page of results has been
--     processed and there are no more results to be retrieved.
--
-- -   If @NextToken@ is /not/ empty, then there are more results
--     available. To retrieve the next page of results, use the value of
--     @NextToken@ in a subsequent @ListJournalS3ExportsForLedger@ call.
listJournalS3ExportsForLedgerResponse_nextToken :: Lens.Lens' ListJournalS3ExportsForLedgerResponse (Prelude.Maybe Prelude.Text)
listJournalS3ExportsForLedgerResponse_nextToken :: Lens' ListJournalS3ExportsForLedgerResponse (Maybe Text)
listJournalS3ExportsForLedgerResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJournalS3ExportsForLedgerResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJournalS3ExportsForLedgerResponse' :: ListJournalS3ExportsForLedgerResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJournalS3ExportsForLedgerResponse
s@ListJournalS3ExportsForLedgerResponse' {} Maybe Text
a -> ListJournalS3ExportsForLedgerResponse
s {$sel:nextToken:ListJournalS3ExportsForLedgerResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListJournalS3ExportsForLedgerResponse)

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

instance
  Prelude.NFData
    ListJournalS3ExportsForLedgerResponse
  where
  rnf :: ListJournalS3ExportsForLedgerResponse -> ()
rnf ListJournalS3ExportsForLedgerResponse' {Int
Maybe [JournalS3ExportDescription]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
journalS3Exports :: Maybe [JournalS3ExportDescription]
$sel:httpStatus:ListJournalS3ExportsForLedgerResponse' :: ListJournalS3ExportsForLedgerResponse -> Int
$sel:nextToken:ListJournalS3ExportsForLedgerResponse' :: ListJournalS3ExportsForLedgerResponse -> Maybe Text
$sel:journalS3Exports:ListJournalS3ExportsForLedgerResponse' :: ListJournalS3ExportsForLedgerResponse
-> 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