{-# 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.ListWorldGenerationJobs
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists world generator jobs.
--
-- This operation returns paginated results.
module Amazonka.RobOMaker.ListWorldGenerationJobs
  ( -- * Creating a Request
    ListWorldGenerationJobs (..),
    newListWorldGenerationJobs,

    -- * Request Lenses
    listWorldGenerationJobs_filters,
    listWorldGenerationJobs_maxResults,
    listWorldGenerationJobs_nextToken,

    -- * Destructuring the Response
    ListWorldGenerationJobsResponse (..),
    newListWorldGenerationJobsResponse,

    -- * Response Lenses
    listWorldGenerationJobsResponse_nextToken,
    listWorldGenerationJobsResponse_httpStatus,
    listWorldGenerationJobsResponse_worldGenerationJobSummaries,
  )
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.RobOMaker.Types

-- | /See:/ 'newListWorldGenerationJobs' smart constructor.
data ListWorldGenerationJobs = ListWorldGenerationJobs'
  { -- | Optional filters to limit results. You can use @status@ and
    -- @templateId@.
    ListWorldGenerationJobs -> Maybe (NonEmpty Filter)
filters :: Prelude.Maybe (Prelude.NonEmpty Filter),
    -- | When this parameter is used, @ListWorldGeneratorJobs@ 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 @ListWorldGeneratorJobs@ request with the returned
    -- @nextToken@ value. This value can be between 1 and 100. If this
    -- parameter is not used, then @ListWorldGeneratorJobs@ returns up to 100
    -- results and a @nextToken@ value if applicable.
    ListWorldGenerationJobs -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | 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
    -- @ListWorldGenerationJobsRequest@ 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.
    ListWorldGenerationJobs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListWorldGenerationJobs -> ListWorldGenerationJobs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWorldGenerationJobs -> ListWorldGenerationJobs -> Bool
$c/= :: ListWorldGenerationJobs -> ListWorldGenerationJobs -> Bool
== :: ListWorldGenerationJobs -> ListWorldGenerationJobs -> Bool
$c== :: ListWorldGenerationJobs -> ListWorldGenerationJobs -> Bool
Prelude.Eq, ReadPrec [ListWorldGenerationJobs]
ReadPrec ListWorldGenerationJobs
Int -> ReadS ListWorldGenerationJobs
ReadS [ListWorldGenerationJobs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWorldGenerationJobs]
$creadListPrec :: ReadPrec [ListWorldGenerationJobs]
readPrec :: ReadPrec ListWorldGenerationJobs
$creadPrec :: ReadPrec ListWorldGenerationJobs
readList :: ReadS [ListWorldGenerationJobs]
$creadList :: ReadS [ListWorldGenerationJobs]
readsPrec :: Int -> ReadS ListWorldGenerationJobs
$creadsPrec :: Int -> ReadS ListWorldGenerationJobs
Prelude.Read, Int -> ListWorldGenerationJobs -> ShowS
[ListWorldGenerationJobs] -> ShowS
ListWorldGenerationJobs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWorldGenerationJobs] -> ShowS
$cshowList :: [ListWorldGenerationJobs] -> ShowS
show :: ListWorldGenerationJobs -> String
$cshow :: ListWorldGenerationJobs -> String
showsPrec :: Int -> ListWorldGenerationJobs -> ShowS
$cshowsPrec :: Int -> ListWorldGenerationJobs -> ShowS
Prelude.Show, forall x. Rep ListWorldGenerationJobs x -> ListWorldGenerationJobs
forall x. ListWorldGenerationJobs -> Rep ListWorldGenerationJobs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListWorldGenerationJobs x -> ListWorldGenerationJobs
$cfrom :: forall x. ListWorldGenerationJobs -> Rep ListWorldGenerationJobs x
Prelude.Generic)

-- |
-- Create a value of 'ListWorldGenerationJobs' 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', 'listWorldGenerationJobs_filters' - Optional filters to limit results. You can use @status@ and
-- @templateId@.
--
-- 'maxResults', 'listWorldGenerationJobs_maxResults' - When this parameter is used, @ListWorldGeneratorJobs@ 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 @ListWorldGeneratorJobs@ request with the returned
-- @nextToken@ value. This value can be between 1 and 100. If this
-- parameter is not used, then @ListWorldGeneratorJobs@ returns up to 100
-- results and a @nextToken@ value if applicable.
--
-- 'nextToken', 'listWorldGenerationJobs_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
-- @ListWorldGenerationJobsRequest@ 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.
newListWorldGenerationJobs ::
  ListWorldGenerationJobs
newListWorldGenerationJobs :: ListWorldGenerationJobs
newListWorldGenerationJobs =
  ListWorldGenerationJobs'
    { $sel:filters:ListWorldGenerationJobs' :: Maybe (NonEmpty Filter)
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListWorldGenerationJobs' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListWorldGenerationJobs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | Optional filters to limit results. You can use @status@ and
-- @templateId@.
listWorldGenerationJobs_filters :: Lens.Lens' ListWorldGenerationJobs (Prelude.Maybe (Prelude.NonEmpty Filter))
listWorldGenerationJobs_filters :: Lens' ListWorldGenerationJobs (Maybe (NonEmpty Filter))
listWorldGenerationJobs_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldGenerationJobs' {Maybe (NonEmpty Filter)
filters :: Maybe (NonEmpty Filter)
$sel:filters:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe (NonEmpty Filter)
filters} -> Maybe (NonEmpty Filter)
filters) (\s :: ListWorldGenerationJobs
s@ListWorldGenerationJobs' {} Maybe (NonEmpty Filter)
a -> ListWorldGenerationJobs
s {$sel:filters:ListWorldGenerationJobs' :: Maybe (NonEmpty Filter)
filters = Maybe (NonEmpty Filter)
a} :: ListWorldGenerationJobs) 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

-- | When this parameter is used, @ListWorldGeneratorJobs@ 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 @ListWorldGeneratorJobs@ request with the returned
-- @nextToken@ value. This value can be between 1 and 100. If this
-- parameter is not used, then @ListWorldGeneratorJobs@ returns up to 100
-- results and a @nextToken@ value if applicable.
listWorldGenerationJobs_maxResults :: Lens.Lens' ListWorldGenerationJobs (Prelude.Maybe Prelude.Int)
listWorldGenerationJobs_maxResults :: Lens' ListWorldGenerationJobs (Maybe Int)
listWorldGenerationJobs_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldGenerationJobs' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListWorldGenerationJobs
s@ListWorldGenerationJobs' {} Maybe Int
a -> ListWorldGenerationJobs
s {$sel:maxResults:ListWorldGenerationJobs' :: Maybe Int
maxResults = Maybe Int
a} :: ListWorldGenerationJobs)

-- | 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
-- @ListWorldGenerationJobsRequest@ 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.
listWorldGenerationJobs_nextToken :: Lens.Lens' ListWorldGenerationJobs (Prelude.Maybe Prelude.Text)
listWorldGenerationJobs_nextToken :: Lens' ListWorldGenerationJobs (Maybe Text)
listWorldGenerationJobs_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldGenerationJobs' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListWorldGenerationJobs
s@ListWorldGenerationJobs' {} Maybe Text
a -> ListWorldGenerationJobs
s {$sel:nextToken:ListWorldGenerationJobs' :: Maybe Text
nextToken = Maybe Text
a} :: ListWorldGenerationJobs)

instance Core.AWSPager ListWorldGenerationJobs where
  page :: ListWorldGenerationJobs
-> AWSResponse ListWorldGenerationJobs
-> Maybe ListWorldGenerationJobs
page ListWorldGenerationJobs
rq AWSResponse ListWorldGenerationJobs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListWorldGenerationJobs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListWorldGenerationJobsResponse (Maybe Text)
listWorldGenerationJobsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListWorldGenerationJobs
rs
            forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListWorldGenerationJobsResponse [WorldGenerationJobSummary]
listWorldGenerationJobsResponse_worldGenerationJobSummaries
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListWorldGenerationJobs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListWorldGenerationJobs (Maybe Text)
listWorldGenerationJobs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListWorldGenerationJobs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListWorldGenerationJobsResponse (Maybe Text)
listWorldGenerationJobsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListWorldGenerationJobs where
  type
    AWSResponse ListWorldGenerationJobs =
      ListWorldGenerationJobsResponse
  request :: (Service -> Service)
-> ListWorldGenerationJobs -> Request ListWorldGenerationJobs
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListWorldGenerationJobs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListWorldGenerationJobs)))
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 Text
-> Int
-> [WorldGenerationJobSummary]
-> ListWorldGenerationJobsResponse
ListWorldGenerationJobsResponse'
            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
"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))
            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
"worldGenerationJobSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListWorldGenerationJobs where
  hashWithSalt :: Int -> ListWorldGenerationJobs -> Int
hashWithSalt Int
_salt ListWorldGenerationJobs' {Maybe Int
Maybe (NonEmpty Filter)
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe (NonEmpty Filter)
$sel:nextToken:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe Text
$sel:maxResults:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe Int
$sel:filters:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe (NonEmpty Filter)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Filter)
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListWorldGenerationJobs where
  rnf :: ListWorldGenerationJobs -> ()
rnf ListWorldGenerationJobs' {Maybe Int
Maybe (NonEmpty Filter)
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe (NonEmpty Filter)
$sel:nextToken:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe Text
$sel:maxResults:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe Int
$sel:filters:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe (NonEmpty Filter)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Filter)
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders ListWorldGenerationJobs where
  toHeaders :: ListWorldGenerationJobs -> 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.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListWorldGenerationJobs where
  toJSON :: ListWorldGenerationJobs -> Value
toJSON ListWorldGenerationJobs' {Maybe Int
Maybe (NonEmpty Filter)
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
filters :: Maybe (NonEmpty Filter)
$sel:nextToken:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe Text
$sel:maxResults:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe Int
$sel:filters:ListWorldGenerationJobs' :: ListWorldGenerationJobs -> Maybe (NonEmpty Filter)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Filter)
filters,
            (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults,
            (Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

instance Data.ToPath ListWorldGenerationJobs where
  toPath :: ListWorldGenerationJobs -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/listWorldGenerationJobs"

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

-- | /See:/ 'newListWorldGenerationJobsResponse' smart constructor.
data ListWorldGenerationJobsResponse = ListWorldGenerationJobsResponse'
  { -- | 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
    -- @ListWorldGeneratorJobsRequest@ 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.
    ListWorldGenerationJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListWorldGenerationJobsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Summary information for world generator jobs.
    ListWorldGenerationJobsResponse -> [WorldGenerationJobSummary]
worldGenerationJobSummaries :: [WorldGenerationJobSummary]
  }
  deriving (ListWorldGenerationJobsResponse
-> ListWorldGenerationJobsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListWorldGenerationJobsResponse
-> ListWorldGenerationJobsResponse -> Bool
$c/= :: ListWorldGenerationJobsResponse
-> ListWorldGenerationJobsResponse -> Bool
== :: ListWorldGenerationJobsResponse
-> ListWorldGenerationJobsResponse -> Bool
$c== :: ListWorldGenerationJobsResponse
-> ListWorldGenerationJobsResponse -> Bool
Prelude.Eq, ReadPrec [ListWorldGenerationJobsResponse]
ReadPrec ListWorldGenerationJobsResponse
Int -> ReadS ListWorldGenerationJobsResponse
ReadS [ListWorldGenerationJobsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListWorldGenerationJobsResponse]
$creadListPrec :: ReadPrec [ListWorldGenerationJobsResponse]
readPrec :: ReadPrec ListWorldGenerationJobsResponse
$creadPrec :: ReadPrec ListWorldGenerationJobsResponse
readList :: ReadS [ListWorldGenerationJobsResponse]
$creadList :: ReadS [ListWorldGenerationJobsResponse]
readsPrec :: Int -> ReadS ListWorldGenerationJobsResponse
$creadsPrec :: Int -> ReadS ListWorldGenerationJobsResponse
Prelude.Read, Int -> ListWorldGenerationJobsResponse -> ShowS
[ListWorldGenerationJobsResponse] -> ShowS
ListWorldGenerationJobsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListWorldGenerationJobsResponse] -> ShowS
$cshowList :: [ListWorldGenerationJobsResponse] -> ShowS
show :: ListWorldGenerationJobsResponse -> String
$cshow :: ListWorldGenerationJobsResponse -> String
showsPrec :: Int -> ListWorldGenerationJobsResponse -> ShowS
$cshowsPrec :: Int -> ListWorldGenerationJobsResponse -> ShowS
Prelude.Show, forall x.
Rep ListWorldGenerationJobsResponse x
-> ListWorldGenerationJobsResponse
forall x.
ListWorldGenerationJobsResponse
-> Rep ListWorldGenerationJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListWorldGenerationJobsResponse x
-> ListWorldGenerationJobsResponse
$cfrom :: forall x.
ListWorldGenerationJobsResponse
-> Rep ListWorldGenerationJobsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListWorldGenerationJobsResponse' 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', 'listWorldGenerationJobsResponse_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
-- @ListWorldGeneratorJobsRequest@ 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', 'listWorldGenerationJobsResponse_httpStatus' - The response's http status code.
--
-- 'worldGenerationJobSummaries', 'listWorldGenerationJobsResponse_worldGenerationJobSummaries' - Summary information for world generator jobs.
newListWorldGenerationJobsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListWorldGenerationJobsResponse
newListWorldGenerationJobsResponse :: Int -> ListWorldGenerationJobsResponse
newListWorldGenerationJobsResponse Int
pHttpStatus_ =
  ListWorldGenerationJobsResponse'
    { $sel:nextToken:ListWorldGenerationJobsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListWorldGenerationJobsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:worldGenerationJobSummaries:ListWorldGenerationJobsResponse' :: [WorldGenerationJobSummary]
worldGenerationJobSummaries =
        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
-- @ListWorldGeneratorJobsRequest@ 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.
listWorldGenerationJobsResponse_nextToken :: Lens.Lens' ListWorldGenerationJobsResponse (Prelude.Maybe Prelude.Text)
listWorldGenerationJobsResponse_nextToken :: Lens' ListWorldGenerationJobsResponse (Maybe Text)
listWorldGenerationJobsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldGenerationJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListWorldGenerationJobsResponse' :: ListWorldGenerationJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListWorldGenerationJobsResponse
s@ListWorldGenerationJobsResponse' {} Maybe Text
a -> ListWorldGenerationJobsResponse
s {$sel:nextToken:ListWorldGenerationJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListWorldGenerationJobsResponse)

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

-- | Summary information for world generator jobs.
listWorldGenerationJobsResponse_worldGenerationJobSummaries :: Lens.Lens' ListWorldGenerationJobsResponse [WorldGenerationJobSummary]
listWorldGenerationJobsResponse_worldGenerationJobSummaries :: Lens' ListWorldGenerationJobsResponse [WorldGenerationJobSummary]
listWorldGenerationJobsResponse_worldGenerationJobSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListWorldGenerationJobsResponse' {[WorldGenerationJobSummary]
worldGenerationJobSummaries :: [WorldGenerationJobSummary]
$sel:worldGenerationJobSummaries:ListWorldGenerationJobsResponse' :: ListWorldGenerationJobsResponse -> [WorldGenerationJobSummary]
worldGenerationJobSummaries} -> [WorldGenerationJobSummary]
worldGenerationJobSummaries) (\s :: ListWorldGenerationJobsResponse
s@ListWorldGenerationJobsResponse' {} [WorldGenerationJobSummary]
a -> ListWorldGenerationJobsResponse
s {$sel:worldGenerationJobSummaries:ListWorldGenerationJobsResponse' :: [WorldGenerationJobSummary]
worldGenerationJobSummaries = [WorldGenerationJobSummary]
a} :: ListWorldGenerationJobsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListWorldGenerationJobsResponse
  where
  rnf :: ListWorldGenerationJobsResponse -> ()
rnf ListWorldGenerationJobsResponse' {Int
[WorldGenerationJobSummary]
Maybe Text
worldGenerationJobSummaries :: [WorldGenerationJobSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:worldGenerationJobSummaries:ListWorldGenerationJobsResponse' :: ListWorldGenerationJobsResponse -> [WorldGenerationJobSummary]
$sel:httpStatus:ListWorldGenerationJobsResponse' :: ListWorldGenerationJobsResponse -> Int
$sel:nextToken:ListWorldGenerationJobsResponse' :: ListWorldGenerationJobsResponse -> Maybe Text
..} =
    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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [WorldGenerationJobSummary]
worldGenerationJobSummaries