{-# 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.RobOMaker.ListWorldExportJobs
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists world export jobs.
--
-- This operation returns paginated results.
module Amazonka.RobOMaker.ListWorldExportJobs
  ( -- * Creating a Request
    ListWorldExportJobs (..),
    newListWorldExportJobs,

    -- * Request Lenses
    listWorldExportJobs_filters,
    listWorldExportJobs_nextToken,
    listWorldExportJobs_maxResults,

    -- * Destructuring the Response
    ListWorldExportJobsResponse (..),
    newListWorldExportJobsResponse,

    -- * Response Lenses
    listWorldExportJobsResponse_nextToken,
    listWorldExportJobsResponse_httpStatus,
    listWorldExportJobsResponse_worldExportJobSummaries,
  )
where

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
import Amazonka.RobOMaker.Types

-- | /See:/ 'newListWorldExportJobs' smart constructor.
data ListWorldExportJobs = ListWorldExportJobs'
  { -- | Optional filters to limit results. You can use @generationJobId@ and
    -- @templateId@.
    ListWorldExportJobs -> Maybe (NonEmpty Filter)
filters :: Prelude.Maybe (Prelude.NonEmpty Filter),
    -- | If the previous paginated request did not return all of the remaining
    -- results, the response object\'s @nextToken@ parameter value is set to a
    -- token. To retrieve the next set of results, call @ListWorldExportJobs@
    -- again and assign that token to the request object\'s @nextToken@
    -- parameter. If there are no remaining results, the previous response
    -- object\'s NextToken parameter is set to null.
    ListWorldExportJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | When this parameter is used, @ListWorldExportJobs@ only returns
    -- @maxResults@ results in a single page along with a @nextToken@ response
    -- element. The remaining results of the initial request can be seen by
    -- sending another @ListWorldExportJobs@ request with the returned
    -- @nextToken@ value. This value can be between 1 and 100. If this
    -- parameter is not used, then @ListWorldExportJobs@ returns up to 100
    -- results and a @nextToken@ value if applicable.
    ListWorldExportJobs -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
  }
  deriving (ListWorldExportJobs -> ListWorldExportJobs -> Bool
(ListWorldExportJobs -> ListWorldExportJobs -> Bool)
-> (ListWorldExportJobs -> ListWorldExportJobs -> Bool)
-> Eq ListWorldExportJobs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWorldExportJobs -> ListWorldExportJobs -> Bool
$c/= :: ListWorldExportJobs -> ListWorldExportJobs -> Bool
== :: ListWorldExportJobs -> ListWorldExportJobs -> Bool
$c== :: ListWorldExportJobs -> ListWorldExportJobs -> Bool
Prelude.Eq, ReadPrec [ListWorldExportJobs]
ReadPrec ListWorldExportJobs
Int -> ReadS ListWorldExportJobs
ReadS [ListWorldExportJobs]
(Int -> ReadS ListWorldExportJobs)
-> ReadS [ListWorldExportJobs]
-> ReadPrec ListWorldExportJobs
-> ReadPrec [ListWorldExportJobs]
-> Read ListWorldExportJobs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWorldExportJobs]
$creadListPrec :: ReadPrec [ListWorldExportJobs]
readPrec :: ReadPrec ListWorldExportJobs
$creadPrec :: ReadPrec ListWorldExportJobs
readList :: ReadS [ListWorldExportJobs]
$creadList :: ReadS [ListWorldExportJobs]
readsPrec :: Int -> ReadS ListWorldExportJobs
$creadsPrec :: Int -> ReadS ListWorldExportJobs
Prelude.Read, Int -> ListWorldExportJobs -> ShowS
[ListWorldExportJobs] -> ShowS
ListWorldExportJobs -> String
(Int -> ListWorldExportJobs -> ShowS)
-> (ListWorldExportJobs -> String)
-> ([ListWorldExportJobs] -> ShowS)
-> Show ListWorldExportJobs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWorldExportJobs] -> ShowS
$cshowList :: [ListWorldExportJobs] -> ShowS
show :: ListWorldExportJobs -> String
$cshow :: ListWorldExportJobs -> String
showsPrec :: Int -> ListWorldExportJobs -> ShowS
$cshowsPrec :: Int -> ListWorldExportJobs -> ShowS
Prelude.Show, (forall x. ListWorldExportJobs -> Rep ListWorldExportJobs x)
-> (forall x. Rep ListWorldExportJobs x -> ListWorldExportJobs)
-> Generic ListWorldExportJobs
forall x. Rep ListWorldExportJobs x -> ListWorldExportJobs
forall x. ListWorldExportJobs -> Rep ListWorldExportJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListWorldExportJobs x -> ListWorldExportJobs
$cfrom :: forall x. ListWorldExportJobs -> Rep ListWorldExportJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListWorldExportJobs' 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:
--
-- 'filters', 'listWorldExportJobs_filters' - Optional filters to limit results. You can use @generationJobId@ and
-- @templateId@.
--
-- 'nextToken', 'listWorldExportJobs_nextToken' - If the previous paginated request did not return all of the remaining
-- results, the response object\'s @nextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call @ListWorldExportJobs@
-- again and assign that token to the request object\'s @nextToken@
-- parameter. If there are no remaining results, the previous response
-- object\'s NextToken parameter is set to null.
--
-- 'maxResults', 'listWorldExportJobs_maxResults' - When this parameter is used, @ListWorldExportJobs@ only returns
-- @maxResults@ results in a single page along with a @nextToken@ response
-- element. The remaining results of the initial request can be seen by
-- sending another @ListWorldExportJobs@ request with the returned
-- @nextToken@ value. This value can be between 1 and 100. If this
-- parameter is not used, then @ListWorldExportJobs@ returns up to 100
-- results and a @nextToken@ value if applicable.
newListWorldExportJobs ::
  ListWorldExportJobs
newListWorldExportJobs :: ListWorldExportJobs
newListWorldExportJobs =
  ListWorldExportJobs' :: Maybe (NonEmpty Filter)
-> Maybe Text -> Maybe Int -> ListWorldExportJobs
ListWorldExportJobs'
    { $sel:filters:ListWorldExportJobs' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListWorldExportJobs' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListWorldExportJobs' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | Optional filters to limit results. You can use @generationJobId@ and
-- @templateId@.
listWorldExportJobs_filters :: Lens.Lens' ListWorldExportJobs (Prelude.Maybe (Prelude.NonEmpty Filter))
listWorldExportJobs_filters :: (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListWorldExportJobs -> f ListWorldExportJobs
listWorldExportJobs_filters = (ListWorldExportJobs -> Maybe (NonEmpty Filter))
-> (ListWorldExportJobs
    -> Maybe (NonEmpty Filter) -> ListWorldExportJobs)
-> Lens
     ListWorldExportJobs
     ListWorldExportJobs
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldExportJobs' {Maybe (NonEmpty Filter)
filters :: Maybe (NonEmpty Filter)
$sel:filters:ListWorldExportJobs' :: ListWorldExportJobs -> Maybe (NonEmpty Filter)
filters} -> Maybe (NonEmpty Filter)
filters) (\s :: ListWorldExportJobs
s@ListWorldExportJobs' {} Maybe (NonEmpty Filter)
a -> ListWorldExportJobs
s {$sel:filters:ListWorldExportJobs' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
a} :: ListWorldExportJobs) ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
 -> ListWorldExportJobs -> f ListWorldExportJobs)
-> ((Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
    -> Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> (Maybe (NonEmpty Filter) -> f (Maybe (NonEmpty Filter)))
-> ListWorldExportJobs
-> f ListWorldExportJobs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
-> Iso
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
     (Maybe (NonEmpty Filter))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
  (NonEmpty Filter)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the previous paginated request did not return all of the remaining
-- results, the response object\'s @nextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call @ListWorldExportJobs@
-- again and assign that token to the request object\'s @nextToken@
-- parameter. If there are no remaining results, the previous response
-- object\'s NextToken parameter is set to null.
listWorldExportJobs_nextToken :: Lens.Lens' ListWorldExportJobs (Prelude.Maybe Prelude.Text)
listWorldExportJobs_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListWorldExportJobs -> f ListWorldExportJobs
listWorldExportJobs_nextToken = (ListWorldExportJobs -> Maybe Text)
-> (ListWorldExportJobs -> Maybe Text -> ListWorldExportJobs)
-> Lens
     ListWorldExportJobs ListWorldExportJobs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldExportJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListWorldExportJobs' :: ListWorldExportJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListWorldExportJobs
s@ListWorldExportJobs' {} Maybe Text
a -> ListWorldExportJobs
s {$sel:nextToken:ListWorldExportJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListWorldExportJobs)

-- | When this parameter is used, @ListWorldExportJobs@ only returns
-- @maxResults@ results in a single page along with a @nextToken@ response
-- element. The remaining results of the initial request can be seen by
-- sending another @ListWorldExportJobs@ request with the returned
-- @nextToken@ value. This value can be between 1 and 100. If this
-- parameter is not used, then @ListWorldExportJobs@ returns up to 100
-- results and a @nextToken@ value if applicable.
listWorldExportJobs_maxResults :: Lens.Lens' ListWorldExportJobs (Prelude.Maybe Prelude.Int)
listWorldExportJobs_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListWorldExportJobs -> f ListWorldExportJobs
listWorldExportJobs_maxResults = (ListWorldExportJobs -> Maybe Int)
-> (ListWorldExportJobs -> Maybe Int -> ListWorldExportJobs)
-> Lens
     ListWorldExportJobs ListWorldExportJobs (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldExportJobs' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListWorldExportJobs' :: ListWorldExportJobs -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListWorldExportJobs
s@ListWorldExportJobs' {} Maybe Int
a -> ListWorldExportJobs
s {$sel:maxResults:ListWorldExportJobs' :: Maybe Int
maxResults = Maybe Int
a} :: ListWorldExportJobs)

instance Core.AWSPager ListWorldExportJobs where
  page :: ListWorldExportJobs
-> AWSResponse ListWorldExportJobs -> Maybe ListWorldExportJobs
page ListWorldExportJobs
rq AWSResponse ListWorldExportJobs
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListWorldExportJobs
ListWorldExportJobsResponse
rs
            ListWorldExportJobsResponse
-> Getting (First Text) ListWorldExportJobsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListWorldExportJobsResponse
-> Const (First Text) ListWorldExportJobsResponse
Lens' ListWorldExportJobsResponse (Maybe Text)
listWorldExportJobsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListWorldExportJobsResponse
 -> Const (First Text) ListWorldExportJobsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListWorldExportJobsResponse 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 ListWorldExportJobs
forall a. Maybe a
Prelude.Nothing
    | [WorldExportJobSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListWorldExportJobs
ListWorldExportJobsResponse
rs
            ListWorldExportJobsResponse
-> Getting
     [WorldExportJobSummary]
     ListWorldExportJobsResponse
     [WorldExportJobSummary]
-> [WorldExportJobSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
  [WorldExportJobSummary]
  ListWorldExportJobsResponse
  [WorldExportJobSummary]
Lens' ListWorldExportJobsResponse [WorldExportJobSummary]
listWorldExportJobsResponse_worldExportJobSummaries
        ) =
      Maybe ListWorldExportJobs
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListWorldExportJobs -> Maybe ListWorldExportJobs
forall a. a -> Maybe a
Prelude.Just (ListWorldExportJobs -> Maybe ListWorldExportJobs)
-> ListWorldExportJobs -> Maybe ListWorldExportJobs
forall a b. (a -> b) -> a -> b
Prelude.$
        ListWorldExportJobs
rq
          ListWorldExportJobs
-> (ListWorldExportJobs -> ListWorldExportJobs)
-> ListWorldExportJobs
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListWorldExportJobs -> Identity ListWorldExportJobs
Lens
  ListWorldExportJobs ListWorldExportJobs (Maybe Text) (Maybe Text)
listWorldExportJobs_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListWorldExportJobs -> Identity ListWorldExportJobs)
-> Maybe Text -> ListWorldExportJobs -> ListWorldExportJobs
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListWorldExportJobs
ListWorldExportJobsResponse
rs
          ListWorldExportJobsResponse
-> Getting (First Text) ListWorldExportJobsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListWorldExportJobsResponse
-> Const (First Text) ListWorldExportJobsResponse
Lens' ListWorldExportJobsResponse (Maybe Text)
listWorldExportJobsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListWorldExportJobsResponse
 -> Const (First Text) ListWorldExportJobsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListWorldExportJobsResponse 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 ListWorldExportJobs where
  type
    AWSResponse ListWorldExportJobs =
      ListWorldExportJobsResponse
  request :: ListWorldExportJobs -> Request ListWorldExportJobs
request = Service -> ListWorldExportJobs -> Request ListWorldExportJobs
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListWorldExportJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListWorldExportJobs)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListWorldExportJobs))
-> Logger
-> Service
-> Proxy ListWorldExportJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListWorldExportJobs)))
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 Text
-> Int -> [WorldExportJobSummary] -> ListWorldExportJobsResponse
ListWorldExportJobsResponse'
            (Maybe Text
 -> Int -> [WorldExportJobSummary] -> ListWorldExportJobsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int -> [WorldExportJobSummary] -> ListWorldExportJobsResponse)
forall (f :: * -> *) a b. Functor 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 -> [WorldExportJobSummary] -> ListWorldExportJobsResponse)
-> Either String Int
-> Either
     String ([WorldExportJobSummary] -> ListWorldExportJobsResponse)
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))
            Either
  String ([WorldExportJobSummary] -> ListWorldExportJobsResponse)
-> Either String [WorldExportJobSummary]
-> Either String ListWorldExportJobsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [WorldExportJobSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"worldExportJobSummaries"
                            Either String (Maybe [WorldExportJobSummary])
-> [WorldExportJobSummary] -> Either String [WorldExportJobSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [WorldExportJobSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListWorldExportJobs

instance Prelude.NFData ListWorldExportJobs

instance Core.ToHeaders ListWorldExportJobs where
  toHeaders :: ListWorldExportJobs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListWorldExportJobs -> 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.ToJSON ListWorldExportJobs where
  toJSON :: ListWorldExportJobs -> Value
toJSON ListWorldExportJobs' {Maybe Int
Maybe (NonEmpty Filter)
Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
filters :: Maybe (NonEmpty Filter)
$sel:maxResults:ListWorldExportJobs' :: ListWorldExportJobs -> Maybe Int
$sel:nextToken:ListWorldExportJobs' :: ListWorldExportJobs -> Maybe Text
$sel:filters:ListWorldExportJobs' :: ListWorldExportJobs -> Maybe (NonEmpty Filter)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"filters" Text -> NonEmpty Filter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Filter -> Pair) -> Maybe (NonEmpty Filter) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Filter)
filters,
            (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 -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
          ]
      )

instance Core.ToPath ListWorldExportJobs where
  toPath :: ListWorldExportJobs -> ByteString
toPath = ByteString -> ListWorldExportJobs -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/listWorldExportJobs"

instance Core.ToQuery ListWorldExportJobs where
  toQuery :: ListWorldExportJobs -> QueryString
toQuery = QueryString -> ListWorldExportJobs -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListWorldExportJobsResponse' smart constructor.
data ListWorldExportJobsResponse = ListWorldExportJobsResponse'
  { -- | If the previous paginated request did not return all of the remaining
    -- results, the response object\'s @nextToken@ parameter value is set to a
    -- token. To retrieve the next set of results, call
    -- @ListWorldExportJobsRequest@ again and assign that token to the request
    -- object\'s @nextToken@ parameter. If there are no remaining results, the
    -- previous response object\'s NextToken parameter is set to null.
    ListWorldExportJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListWorldExportJobsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Summary information for world export jobs.
    ListWorldExportJobsResponse -> [WorldExportJobSummary]
worldExportJobSummaries :: [WorldExportJobSummary]
  }
  deriving (ListWorldExportJobsResponse -> ListWorldExportJobsResponse -> Bool
(ListWorldExportJobsResponse
 -> ListWorldExportJobsResponse -> Bool)
-> (ListWorldExportJobsResponse
    -> ListWorldExportJobsResponse -> Bool)
-> Eq ListWorldExportJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWorldExportJobsResponse -> ListWorldExportJobsResponse -> Bool
$c/= :: ListWorldExportJobsResponse -> ListWorldExportJobsResponse -> Bool
== :: ListWorldExportJobsResponse -> ListWorldExportJobsResponse -> Bool
$c== :: ListWorldExportJobsResponse -> ListWorldExportJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListWorldExportJobsResponse]
ReadPrec ListWorldExportJobsResponse
Int -> ReadS ListWorldExportJobsResponse
ReadS [ListWorldExportJobsResponse]
(Int -> ReadS ListWorldExportJobsResponse)
-> ReadS [ListWorldExportJobsResponse]
-> ReadPrec ListWorldExportJobsResponse
-> ReadPrec [ListWorldExportJobsResponse]
-> Read ListWorldExportJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWorldExportJobsResponse]
$creadListPrec :: ReadPrec [ListWorldExportJobsResponse]
readPrec :: ReadPrec ListWorldExportJobsResponse
$creadPrec :: ReadPrec ListWorldExportJobsResponse
readList :: ReadS [ListWorldExportJobsResponse]
$creadList :: ReadS [ListWorldExportJobsResponse]
readsPrec :: Int -> ReadS ListWorldExportJobsResponse
$creadsPrec :: Int -> ReadS ListWorldExportJobsResponse
Prelude.Read, Int -> ListWorldExportJobsResponse -> ShowS
[ListWorldExportJobsResponse] -> ShowS
ListWorldExportJobsResponse -> String
(Int -> ListWorldExportJobsResponse -> ShowS)
-> (ListWorldExportJobsResponse -> String)
-> ([ListWorldExportJobsResponse] -> ShowS)
-> Show ListWorldExportJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWorldExportJobsResponse] -> ShowS
$cshowList :: [ListWorldExportJobsResponse] -> ShowS
show :: ListWorldExportJobsResponse -> String
$cshow :: ListWorldExportJobsResponse -> String
showsPrec :: Int -> ListWorldExportJobsResponse -> ShowS
$cshowsPrec :: Int -> ListWorldExportJobsResponse -> ShowS
Prelude.Show, (forall x.
 ListWorldExportJobsResponse -> Rep ListWorldExportJobsResponse x)
-> (forall x.
    Rep ListWorldExportJobsResponse x -> ListWorldExportJobsResponse)
-> Generic ListWorldExportJobsResponse
forall x.
Rep ListWorldExportJobsResponse x -> ListWorldExportJobsResponse
forall x.
ListWorldExportJobsResponse -> Rep ListWorldExportJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListWorldExportJobsResponse x -> ListWorldExportJobsResponse
$cfrom :: forall x.
ListWorldExportJobsResponse -> Rep ListWorldExportJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListWorldExportJobsResponse' 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:
--
-- 'nextToken', 'listWorldExportJobsResponse_nextToken' - If the previous paginated request did not return all of the remaining
-- results, the response object\'s @nextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call
-- @ListWorldExportJobsRequest@ again and assign that token to the request
-- object\'s @nextToken@ parameter. If there are no remaining results, the
-- previous response object\'s NextToken parameter is set to null.
--
-- 'httpStatus', 'listWorldExportJobsResponse_httpStatus' - The response's http status code.
--
-- 'worldExportJobSummaries', 'listWorldExportJobsResponse_worldExportJobSummaries' - Summary information for world export jobs.
newListWorldExportJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListWorldExportJobsResponse
newListWorldExportJobsResponse :: Int -> ListWorldExportJobsResponse
newListWorldExportJobsResponse Int
pHttpStatus_ =
  ListWorldExportJobsResponse' :: Maybe Text
-> Int -> [WorldExportJobSummary] -> ListWorldExportJobsResponse
ListWorldExportJobsResponse'
    { $sel:nextToken:ListWorldExportJobsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListWorldExportJobsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:worldExportJobSummaries:ListWorldExportJobsResponse' :: [WorldExportJobSummary]
worldExportJobSummaries = [WorldExportJobSummary]
forall a. Monoid a => a
Prelude.mempty
    }

-- | If the previous paginated request did not return all of the remaining
-- results, the response object\'s @nextToken@ parameter value is set to a
-- token. To retrieve the next set of results, call
-- @ListWorldExportJobsRequest@ again and assign that token to the request
-- object\'s @nextToken@ parameter. If there are no remaining results, the
-- previous response object\'s NextToken parameter is set to null.
listWorldExportJobsResponse_nextToken :: Lens.Lens' ListWorldExportJobsResponse (Prelude.Maybe Prelude.Text)
listWorldExportJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListWorldExportJobsResponse -> f ListWorldExportJobsResponse
listWorldExportJobsResponse_nextToken = (ListWorldExportJobsResponse -> Maybe Text)
-> (ListWorldExportJobsResponse
    -> Maybe Text -> ListWorldExportJobsResponse)
-> Lens' ListWorldExportJobsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldExportJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListWorldExportJobsResponse' :: ListWorldExportJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListWorldExportJobsResponse
s@ListWorldExportJobsResponse' {} Maybe Text
a -> ListWorldExportJobsResponse
s {$sel:nextToken:ListWorldExportJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListWorldExportJobsResponse)

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

-- | Summary information for world export jobs.
listWorldExportJobsResponse_worldExportJobSummaries :: Lens.Lens' ListWorldExportJobsResponse [WorldExportJobSummary]
listWorldExportJobsResponse_worldExportJobSummaries :: ([WorldExportJobSummary] -> f [WorldExportJobSummary])
-> ListWorldExportJobsResponse -> f ListWorldExportJobsResponse
listWorldExportJobsResponse_worldExportJobSummaries = (ListWorldExportJobsResponse -> [WorldExportJobSummary])
-> (ListWorldExportJobsResponse
    -> [WorldExportJobSummary] -> ListWorldExportJobsResponse)
-> Lens' ListWorldExportJobsResponse [WorldExportJobSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldExportJobsResponse' {[WorldExportJobSummary]
worldExportJobSummaries :: [WorldExportJobSummary]
$sel:worldExportJobSummaries:ListWorldExportJobsResponse' :: ListWorldExportJobsResponse -> [WorldExportJobSummary]
worldExportJobSummaries} -> [WorldExportJobSummary]
worldExportJobSummaries) (\s :: ListWorldExportJobsResponse
s@ListWorldExportJobsResponse' {} [WorldExportJobSummary]
a -> ListWorldExportJobsResponse
s {$sel:worldExportJobSummaries:ListWorldExportJobsResponse' :: [WorldExportJobSummary]
worldExportJobSummaries = [WorldExportJobSummary]
a} :: ListWorldExportJobsResponse) (([WorldExportJobSummary] -> f [WorldExportJobSummary])
 -> ListWorldExportJobsResponse -> f ListWorldExportJobsResponse)
-> (([WorldExportJobSummary] -> f [WorldExportJobSummary])
    -> [WorldExportJobSummary] -> f [WorldExportJobSummary])
-> ([WorldExportJobSummary] -> f [WorldExportJobSummary])
-> ListWorldExportJobsResponse
-> f ListWorldExportJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([WorldExportJobSummary] -> f [WorldExportJobSummary])
-> [WorldExportJobSummary] -> f [WorldExportJobSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListWorldExportJobsResponse