{-# 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.DescribeWorldGenerationJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes a world generation job.
module Amazonka.RobOMaker.DescribeWorldGenerationJob
  ( -- * Creating a Request
    DescribeWorldGenerationJob (..),
    newDescribeWorldGenerationJob,

    -- * Request Lenses
    describeWorldGenerationJob_job,

    -- * Destructuring the Response
    DescribeWorldGenerationJobResponse (..),
    newDescribeWorldGenerationJobResponse,

    -- * Response Lenses
    describeWorldGenerationJobResponse_arn,
    describeWorldGenerationJobResponse_clientRequestToken,
    describeWorldGenerationJobResponse_createdAt,
    describeWorldGenerationJobResponse_failureCode,
    describeWorldGenerationJobResponse_failureReason,
    describeWorldGenerationJobResponse_finishedWorldsSummary,
    describeWorldGenerationJobResponse_status,
    describeWorldGenerationJobResponse_tags,
    describeWorldGenerationJobResponse_template,
    describeWorldGenerationJobResponse_worldCount,
    describeWorldGenerationJobResponse_worldTags,
    describeWorldGenerationJobResponse_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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.RobOMaker.Types

-- | /See:/ 'newDescribeWorldGenerationJob' smart constructor.
data DescribeWorldGenerationJob = DescribeWorldGenerationJob'
  { -- | The Amazon Resource Name (arn) of the world generation job to describe.
    DescribeWorldGenerationJob -> Text
job :: Prelude.Text
  }
  deriving (DescribeWorldGenerationJob -> DescribeWorldGenerationJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorldGenerationJob -> DescribeWorldGenerationJob -> Bool
$c/= :: DescribeWorldGenerationJob -> DescribeWorldGenerationJob -> Bool
== :: DescribeWorldGenerationJob -> DescribeWorldGenerationJob -> Bool
$c== :: DescribeWorldGenerationJob -> DescribeWorldGenerationJob -> Bool
Prelude.Eq, ReadPrec [DescribeWorldGenerationJob]
ReadPrec DescribeWorldGenerationJob
Int -> ReadS DescribeWorldGenerationJob
ReadS [DescribeWorldGenerationJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorldGenerationJob]
$creadListPrec :: ReadPrec [DescribeWorldGenerationJob]
readPrec :: ReadPrec DescribeWorldGenerationJob
$creadPrec :: ReadPrec DescribeWorldGenerationJob
readList :: ReadS [DescribeWorldGenerationJob]
$creadList :: ReadS [DescribeWorldGenerationJob]
readsPrec :: Int -> ReadS DescribeWorldGenerationJob
$creadsPrec :: Int -> ReadS DescribeWorldGenerationJob
Prelude.Read, Int -> DescribeWorldGenerationJob -> ShowS
[DescribeWorldGenerationJob] -> ShowS
DescribeWorldGenerationJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorldGenerationJob] -> ShowS
$cshowList :: [DescribeWorldGenerationJob] -> ShowS
show :: DescribeWorldGenerationJob -> String
$cshow :: DescribeWorldGenerationJob -> String
showsPrec :: Int -> DescribeWorldGenerationJob -> ShowS
$cshowsPrec :: Int -> DescribeWorldGenerationJob -> ShowS
Prelude.Show, forall x.
Rep DescribeWorldGenerationJob x -> DescribeWorldGenerationJob
forall x.
DescribeWorldGenerationJob -> Rep DescribeWorldGenerationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWorldGenerationJob x -> DescribeWorldGenerationJob
$cfrom :: forall x.
DescribeWorldGenerationJob -> Rep DescribeWorldGenerationJob x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWorldGenerationJob' 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:
--
-- 'job', 'describeWorldGenerationJob_job' - The Amazon Resource Name (arn) of the world generation job to describe.
newDescribeWorldGenerationJob ::
  -- | 'job'
  Prelude.Text ->
  DescribeWorldGenerationJob
newDescribeWorldGenerationJob :: Text -> DescribeWorldGenerationJob
newDescribeWorldGenerationJob Text
pJob_ =
  DescribeWorldGenerationJob' {$sel:job:DescribeWorldGenerationJob' :: Text
job = Text
pJob_}

-- | The Amazon Resource Name (arn) of the world generation job to describe.
describeWorldGenerationJob_job :: Lens.Lens' DescribeWorldGenerationJob Prelude.Text
describeWorldGenerationJob_job :: Lens' DescribeWorldGenerationJob Text
describeWorldGenerationJob_job = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJob' {Text
job :: Text
$sel:job:DescribeWorldGenerationJob' :: DescribeWorldGenerationJob -> Text
job} -> Text
job) (\s :: DescribeWorldGenerationJob
s@DescribeWorldGenerationJob' {} Text
a -> DescribeWorldGenerationJob
s {$sel:job:DescribeWorldGenerationJob' :: Text
job = Text
a} :: DescribeWorldGenerationJob)

instance Core.AWSRequest DescribeWorldGenerationJob where
  type
    AWSResponse DescribeWorldGenerationJob =
      DescribeWorldGenerationJobResponse
  request :: (Service -> Service)
-> DescribeWorldGenerationJob -> Request DescribeWorldGenerationJob
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 DescribeWorldGenerationJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeWorldGenerationJob)))
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
-> Maybe Text
-> Maybe POSIX
-> Maybe WorldGenerationJobErrorCode
-> Maybe Text
-> Maybe FinishedWorldsSummary
-> Maybe WorldGenerationJobStatus
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe WorldCount
-> Maybe (HashMap Text Text)
-> Int
-> DescribeWorldGenerationJobResponse
DescribeWorldGenerationJobResponse'
            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
"arn")
            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
"clientRequestToken")
            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
"createdAt")
            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
"failureCode")
            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
"failureReason")
            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
"finishedWorldsSummary")
            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
"status")
            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
"tags" 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
"template")
            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
"worldCount")
            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
"worldTags" 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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeWorldGenerationJob where
  hashWithSalt :: Int -> DescribeWorldGenerationJob -> Int
hashWithSalt Int
_salt DescribeWorldGenerationJob' {Text
job :: Text
$sel:job:DescribeWorldGenerationJob' :: DescribeWorldGenerationJob -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
job

instance Prelude.NFData DescribeWorldGenerationJob where
  rnf :: DescribeWorldGenerationJob -> ()
rnf DescribeWorldGenerationJob' {Text
job :: Text
$sel:job:DescribeWorldGenerationJob' :: DescribeWorldGenerationJob -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
job

instance Data.ToHeaders DescribeWorldGenerationJob where
  toHeaders :: DescribeWorldGenerationJob -> 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 DescribeWorldGenerationJob where
  toJSON :: DescribeWorldGenerationJob -> Value
toJSON DescribeWorldGenerationJob' {Text
job :: Text
$sel:job:DescribeWorldGenerationJob' :: DescribeWorldGenerationJob -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"job" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
job)]
      )

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

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

-- | /See:/ 'newDescribeWorldGenerationJobResponse' smart constructor.
data DescribeWorldGenerationJobResponse = DescribeWorldGenerationJobResponse'
  { -- | The Amazon Resource Name (ARN) of the world generation job.
    DescribeWorldGenerationJobResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    DescribeWorldGenerationJobResponse -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the world generation job
    -- was created.
    DescribeWorldGenerationJobResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | The failure code of the world generation job if it failed:
    --
    -- [InternalServiceError]
    --     Internal service error.
    --
    -- [LimitExceeded]
    --     The requested resource exceeds the maximum number allowed, or the
    --     number of concurrent stream requests exceeds the maximum number
    --     allowed.
    --
    -- [ResourceNotFound]
    --     The specified resource could not be found.
    --
    -- [RequestThrottled]
    --     The request was throttled.
    --
    -- [InvalidInput]
    --     An input parameter in the request is not valid.
    DescribeWorldGenerationJobResponse
-> Maybe WorldGenerationJobErrorCode
failureCode :: Prelude.Maybe WorldGenerationJobErrorCode,
    -- | The reason why the world generation job failed.
    DescribeWorldGenerationJobResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | Summary information about finished worlds.
    DescribeWorldGenerationJobResponse -> Maybe FinishedWorldsSummary
finishedWorldsSummary :: Prelude.Maybe FinishedWorldsSummary,
    -- | The status of the world generation job:
    --
    -- [Pending]
    --     The world generation job request is pending.
    --
    -- [Running]
    --     The world generation job is running.
    --
    -- [Completed]
    --     The world generation job completed.
    --
    -- [Failed]
    --     The world generation job failed. See @failureCode@ for more
    --     information.
    --
    -- [PartialFailed]
    --     Some worlds did not generate.
    --
    -- [Canceled]
    --     The world generation job was cancelled.
    --
    -- [Canceling]
    --     The world generation job is being cancelled.
    DescribeWorldGenerationJobResponse
-> Maybe WorldGenerationJobStatus
status :: Prelude.Maybe WorldGenerationJobStatus,
    -- | A map that contains tag keys and tag values that are attached to the
    -- world generation job.
    DescribeWorldGenerationJobResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The Amazon Resource Name (arn) of the world template.
    DescribeWorldGenerationJobResponse -> Maybe Text
template :: Prelude.Maybe Prelude.Text,
    -- | Information about the world count.
    DescribeWorldGenerationJobResponse -> Maybe WorldCount
worldCount :: Prelude.Maybe WorldCount,
    -- | A map that contains tag keys and tag values that are attached to the
    -- generated worlds.
    DescribeWorldGenerationJobResponse -> Maybe (HashMap Text Text)
worldTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeWorldGenerationJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeWorldGenerationJobResponse
-> DescribeWorldGenerationJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorldGenerationJobResponse
-> DescribeWorldGenerationJobResponse -> Bool
$c/= :: DescribeWorldGenerationJobResponse
-> DescribeWorldGenerationJobResponse -> Bool
== :: DescribeWorldGenerationJobResponse
-> DescribeWorldGenerationJobResponse -> Bool
$c== :: DescribeWorldGenerationJobResponse
-> DescribeWorldGenerationJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribeWorldGenerationJobResponse]
ReadPrec DescribeWorldGenerationJobResponse
Int -> ReadS DescribeWorldGenerationJobResponse
ReadS [DescribeWorldGenerationJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorldGenerationJobResponse]
$creadListPrec :: ReadPrec [DescribeWorldGenerationJobResponse]
readPrec :: ReadPrec DescribeWorldGenerationJobResponse
$creadPrec :: ReadPrec DescribeWorldGenerationJobResponse
readList :: ReadS [DescribeWorldGenerationJobResponse]
$creadList :: ReadS [DescribeWorldGenerationJobResponse]
readsPrec :: Int -> ReadS DescribeWorldGenerationJobResponse
$creadsPrec :: Int -> ReadS DescribeWorldGenerationJobResponse
Prelude.Read, Int -> DescribeWorldGenerationJobResponse -> ShowS
[DescribeWorldGenerationJobResponse] -> ShowS
DescribeWorldGenerationJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorldGenerationJobResponse] -> ShowS
$cshowList :: [DescribeWorldGenerationJobResponse] -> ShowS
show :: DescribeWorldGenerationJobResponse -> String
$cshow :: DescribeWorldGenerationJobResponse -> String
showsPrec :: Int -> DescribeWorldGenerationJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeWorldGenerationJobResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeWorldGenerationJobResponse x
-> DescribeWorldGenerationJobResponse
forall x.
DescribeWorldGenerationJobResponse
-> Rep DescribeWorldGenerationJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWorldGenerationJobResponse x
-> DescribeWorldGenerationJobResponse
$cfrom :: forall x.
DescribeWorldGenerationJobResponse
-> Rep DescribeWorldGenerationJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWorldGenerationJobResponse' 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:
--
-- 'arn', 'describeWorldGenerationJobResponse_arn' - The Amazon Resource Name (ARN) of the world generation job.
--
-- 'clientRequestToken', 'describeWorldGenerationJobResponse_clientRequestToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'createdAt', 'describeWorldGenerationJobResponse_createdAt' - The time, in milliseconds since the epoch, when the world generation job
-- was created.
--
-- 'failureCode', 'describeWorldGenerationJobResponse_failureCode' - The failure code of the world generation job if it failed:
--
-- [InternalServiceError]
--     Internal service error.
--
-- [LimitExceeded]
--     The requested resource exceeds the maximum number allowed, or the
--     number of concurrent stream requests exceeds the maximum number
--     allowed.
--
-- [ResourceNotFound]
--     The specified resource could not be found.
--
-- [RequestThrottled]
--     The request was throttled.
--
-- [InvalidInput]
--     An input parameter in the request is not valid.
--
-- 'failureReason', 'describeWorldGenerationJobResponse_failureReason' - The reason why the world generation job failed.
--
-- 'finishedWorldsSummary', 'describeWorldGenerationJobResponse_finishedWorldsSummary' - Summary information about finished worlds.
--
-- 'status', 'describeWorldGenerationJobResponse_status' - The status of the world generation job:
--
-- [Pending]
--     The world generation job request is pending.
--
-- [Running]
--     The world generation job is running.
--
-- [Completed]
--     The world generation job completed.
--
-- [Failed]
--     The world generation job failed. See @failureCode@ for more
--     information.
--
-- [PartialFailed]
--     Some worlds did not generate.
--
-- [Canceled]
--     The world generation job was cancelled.
--
-- [Canceling]
--     The world generation job is being cancelled.
--
-- 'tags', 'describeWorldGenerationJobResponse_tags' - A map that contains tag keys and tag values that are attached to the
-- world generation job.
--
-- 'template', 'describeWorldGenerationJobResponse_template' - The Amazon Resource Name (arn) of the world template.
--
-- 'worldCount', 'describeWorldGenerationJobResponse_worldCount' - Information about the world count.
--
-- 'worldTags', 'describeWorldGenerationJobResponse_worldTags' - A map that contains tag keys and tag values that are attached to the
-- generated worlds.
--
-- 'httpStatus', 'describeWorldGenerationJobResponse_httpStatus' - The response's http status code.
newDescribeWorldGenerationJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeWorldGenerationJobResponse
newDescribeWorldGenerationJobResponse :: Int -> DescribeWorldGenerationJobResponse
newDescribeWorldGenerationJobResponse Int
pHttpStatus_ =
  DescribeWorldGenerationJobResponse'
    { $sel:arn:DescribeWorldGenerationJobResponse' :: Maybe Text
arn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:DescribeWorldGenerationJobResponse' :: Maybe Text
clientRequestToken = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:DescribeWorldGenerationJobResponse' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:failureCode:DescribeWorldGenerationJobResponse' :: Maybe WorldGenerationJobErrorCode
failureCode = forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:DescribeWorldGenerationJobResponse' :: Maybe Text
failureReason = forall a. Maybe a
Prelude.Nothing,
      $sel:finishedWorldsSummary:DescribeWorldGenerationJobResponse' :: Maybe FinishedWorldsSummary
finishedWorldsSummary = forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeWorldGenerationJobResponse' :: Maybe WorldGenerationJobStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeWorldGenerationJobResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:template:DescribeWorldGenerationJobResponse' :: Maybe Text
template = forall a. Maybe a
Prelude.Nothing,
      $sel:worldCount:DescribeWorldGenerationJobResponse' :: Maybe WorldCount
worldCount = forall a. Maybe a
Prelude.Nothing,
      $sel:worldTags:DescribeWorldGenerationJobResponse' :: Maybe (HashMap Text Text)
worldTags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeWorldGenerationJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the world generation job.
describeWorldGenerationJobResponse_arn :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe Prelude.Text)
describeWorldGenerationJobResponse_arn :: Lens' DescribeWorldGenerationJobResponse (Maybe Text)
describeWorldGenerationJobResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe Text
a -> DescribeWorldGenerationJobResponse
s {$sel:arn:DescribeWorldGenerationJobResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeWorldGenerationJobResponse)

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
describeWorldGenerationJobResponse_clientRequestToken :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe Prelude.Text)
describeWorldGenerationJobResponse_clientRequestToken :: Lens' DescribeWorldGenerationJobResponse (Maybe Text)
describeWorldGenerationJobResponse_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe Text
a -> DescribeWorldGenerationJobResponse
s {$sel:clientRequestToken:DescribeWorldGenerationJobResponse' :: Maybe Text
clientRequestToken = Maybe Text
a} :: DescribeWorldGenerationJobResponse)

-- | The time, in milliseconds since the epoch, when the world generation job
-- was created.
describeWorldGenerationJobResponse_createdAt :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe Prelude.UTCTime)
describeWorldGenerationJobResponse_createdAt :: Lens' DescribeWorldGenerationJobResponse (Maybe UTCTime)
describeWorldGenerationJobResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe POSIX
a -> DescribeWorldGenerationJobResponse
s {$sel:createdAt:DescribeWorldGenerationJobResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DescribeWorldGenerationJobResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The failure code of the world generation job if it failed:
--
-- [InternalServiceError]
--     Internal service error.
--
-- [LimitExceeded]
--     The requested resource exceeds the maximum number allowed, or the
--     number of concurrent stream requests exceeds the maximum number
--     allowed.
--
-- [ResourceNotFound]
--     The specified resource could not be found.
--
-- [RequestThrottled]
--     The request was throttled.
--
-- [InvalidInput]
--     An input parameter in the request is not valid.
describeWorldGenerationJobResponse_failureCode :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe WorldGenerationJobErrorCode)
describeWorldGenerationJobResponse_failureCode :: Lens'
  DescribeWorldGenerationJobResponse
  (Maybe WorldGenerationJobErrorCode)
describeWorldGenerationJobResponse_failureCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe WorldGenerationJobErrorCode
failureCode :: Maybe WorldGenerationJobErrorCode
$sel:failureCode:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse
-> Maybe WorldGenerationJobErrorCode
failureCode} -> Maybe WorldGenerationJobErrorCode
failureCode) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe WorldGenerationJobErrorCode
a -> DescribeWorldGenerationJobResponse
s {$sel:failureCode:DescribeWorldGenerationJobResponse' :: Maybe WorldGenerationJobErrorCode
failureCode = Maybe WorldGenerationJobErrorCode
a} :: DescribeWorldGenerationJobResponse)

-- | The reason why the world generation job failed.
describeWorldGenerationJobResponse_failureReason :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe Prelude.Text)
describeWorldGenerationJobResponse_failureReason :: Lens' DescribeWorldGenerationJobResponse (Maybe Text)
describeWorldGenerationJobResponse_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe Text
a -> DescribeWorldGenerationJobResponse
s {$sel:failureReason:DescribeWorldGenerationJobResponse' :: Maybe Text
failureReason = Maybe Text
a} :: DescribeWorldGenerationJobResponse)

-- | Summary information about finished worlds.
describeWorldGenerationJobResponse_finishedWorldsSummary :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe FinishedWorldsSummary)
describeWorldGenerationJobResponse_finishedWorldsSummary :: Lens'
  DescribeWorldGenerationJobResponse (Maybe FinishedWorldsSummary)
describeWorldGenerationJobResponse_finishedWorldsSummary = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe FinishedWorldsSummary
finishedWorldsSummary :: Maybe FinishedWorldsSummary
$sel:finishedWorldsSummary:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe FinishedWorldsSummary
finishedWorldsSummary} -> Maybe FinishedWorldsSummary
finishedWorldsSummary) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe FinishedWorldsSummary
a -> DescribeWorldGenerationJobResponse
s {$sel:finishedWorldsSummary:DescribeWorldGenerationJobResponse' :: Maybe FinishedWorldsSummary
finishedWorldsSummary = Maybe FinishedWorldsSummary
a} :: DescribeWorldGenerationJobResponse)

-- | The status of the world generation job:
--
-- [Pending]
--     The world generation job request is pending.
--
-- [Running]
--     The world generation job is running.
--
-- [Completed]
--     The world generation job completed.
--
-- [Failed]
--     The world generation job failed. See @failureCode@ for more
--     information.
--
-- [PartialFailed]
--     Some worlds did not generate.
--
-- [Canceled]
--     The world generation job was cancelled.
--
-- [Canceling]
--     The world generation job is being cancelled.
describeWorldGenerationJobResponse_status :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe WorldGenerationJobStatus)
describeWorldGenerationJobResponse_status :: Lens'
  DescribeWorldGenerationJobResponse (Maybe WorldGenerationJobStatus)
describeWorldGenerationJobResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe WorldGenerationJobStatus
status :: Maybe WorldGenerationJobStatus
$sel:status:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse
-> Maybe WorldGenerationJobStatus
status} -> Maybe WorldGenerationJobStatus
status) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe WorldGenerationJobStatus
a -> DescribeWorldGenerationJobResponse
s {$sel:status:DescribeWorldGenerationJobResponse' :: Maybe WorldGenerationJobStatus
status = Maybe WorldGenerationJobStatus
a} :: DescribeWorldGenerationJobResponse)

-- | A map that contains tag keys and tag values that are attached to the
-- world generation job.
describeWorldGenerationJobResponse_tags :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeWorldGenerationJobResponse_tags :: Lens'
  DescribeWorldGenerationJobResponse (Maybe (HashMap Text Text))
describeWorldGenerationJobResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe (HashMap Text Text)
a -> DescribeWorldGenerationJobResponse
s {$sel:tags:DescribeWorldGenerationJobResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeWorldGenerationJobResponse) 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

-- | The Amazon Resource Name (arn) of the world template.
describeWorldGenerationJobResponse_template :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe Prelude.Text)
describeWorldGenerationJobResponse_template :: Lens' DescribeWorldGenerationJobResponse (Maybe Text)
describeWorldGenerationJobResponse_template = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe Text
template :: Maybe Text
$sel:template:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe Text
template} -> Maybe Text
template) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe Text
a -> DescribeWorldGenerationJobResponse
s {$sel:template:DescribeWorldGenerationJobResponse' :: Maybe Text
template = Maybe Text
a} :: DescribeWorldGenerationJobResponse)

-- | Information about the world count.
describeWorldGenerationJobResponse_worldCount :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe WorldCount)
describeWorldGenerationJobResponse_worldCount :: Lens' DescribeWorldGenerationJobResponse (Maybe WorldCount)
describeWorldGenerationJobResponse_worldCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe WorldCount
worldCount :: Maybe WorldCount
$sel:worldCount:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe WorldCount
worldCount} -> Maybe WorldCount
worldCount) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe WorldCount
a -> DescribeWorldGenerationJobResponse
s {$sel:worldCount:DescribeWorldGenerationJobResponse' :: Maybe WorldCount
worldCount = Maybe WorldCount
a} :: DescribeWorldGenerationJobResponse)

-- | A map that contains tag keys and tag values that are attached to the
-- generated worlds.
describeWorldGenerationJobResponse_worldTags :: Lens.Lens' DescribeWorldGenerationJobResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeWorldGenerationJobResponse_worldTags :: Lens'
  DescribeWorldGenerationJobResponse (Maybe (HashMap Text Text))
describeWorldGenerationJobResponse_worldTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldGenerationJobResponse' {Maybe (HashMap Text Text)
worldTags :: Maybe (HashMap Text Text)
$sel:worldTags:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe (HashMap Text Text)
worldTags} -> Maybe (HashMap Text Text)
worldTags) (\s :: DescribeWorldGenerationJobResponse
s@DescribeWorldGenerationJobResponse' {} Maybe (HashMap Text Text)
a -> DescribeWorldGenerationJobResponse
s {$sel:worldTags:DescribeWorldGenerationJobResponse' :: Maybe (HashMap Text Text)
worldTags = Maybe (HashMap Text Text)
a} :: DescribeWorldGenerationJobResponse) 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

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

instance
  Prelude.NFData
    DescribeWorldGenerationJobResponse
  where
  rnf :: DescribeWorldGenerationJobResponse -> ()
rnf DescribeWorldGenerationJobResponse' {Int
Maybe Text
Maybe (HashMap Text Text)
Maybe POSIX
Maybe WorldCount
Maybe WorldGenerationJobErrorCode
Maybe FinishedWorldsSummary
Maybe WorldGenerationJobStatus
httpStatus :: Int
worldTags :: Maybe (HashMap Text Text)
worldCount :: Maybe WorldCount
template :: Maybe Text
tags :: Maybe (HashMap Text Text)
status :: Maybe WorldGenerationJobStatus
finishedWorldsSummary :: Maybe FinishedWorldsSummary
failureReason :: Maybe Text
failureCode :: Maybe WorldGenerationJobErrorCode
createdAt :: Maybe POSIX
clientRequestToken :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Int
$sel:worldTags:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe (HashMap Text Text)
$sel:worldCount:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe WorldCount
$sel:template:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe Text
$sel:tags:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe (HashMap Text Text)
$sel:status:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse
-> Maybe WorldGenerationJobStatus
$sel:finishedWorldsSummary:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe FinishedWorldsSummary
$sel:failureReason:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe Text
$sel:failureCode:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse
-> Maybe WorldGenerationJobErrorCode
$sel:createdAt:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe POSIX
$sel:clientRequestToken:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe Text
$sel:arn:DescribeWorldGenerationJobResponse' :: DescribeWorldGenerationJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorldGenerationJobErrorCode
failureCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FinishedWorldsSummary
finishedWorldsSummary
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorldGenerationJobStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
template
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorldCount
worldCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
worldTags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus