{-# 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.DescribeWorldExportJob
-- 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 export job.
module Amazonka.RobOMaker.DescribeWorldExportJob
  ( -- * Creating a Request
    DescribeWorldExportJob (..),
    newDescribeWorldExportJob,

    -- * Request Lenses
    describeWorldExportJob_job,

    -- * Destructuring the Response
    DescribeWorldExportJobResponse (..),
    newDescribeWorldExportJobResponse,

    -- * Response Lenses
    describeWorldExportJobResponse_arn,
    describeWorldExportJobResponse_clientRequestToken,
    describeWorldExportJobResponse_createdAt,
    describeWorldExportJobResponse_failureCode,
    describeWorldExportJobResponse_failureReason,
    describeWorldExportJobResponse_iamRole,
    describeWorldExportJobResponse_outputLocation,
    describeWorldExportJobResponse_status,
    describeWorldExportJobResponse_tags,
    describeWorldExportJobResponse_worlds,
    describeWorldExportJobResponse_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:/ 'newDescribeWorldExportJob' smart constructor.
data DescribeWorldExportJob = DescribeWorldExportJob'
  { -- | The Amazon Resource Name (arn) of the world export job to describe.
    DescribeWorldExportJob -> Text
job :: Prelude.Text
  }
  deriving (DescribeWorldExportJob -> DescribeWorldExportJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorldExportJob -> DescribeWorldExportJob -> Bool
$c/= :: DescribeWorldExportJob -> DescribeWorldExportJob -> Bool
== :: DescribeWorldExportJob -> DescribeWorldExportJob -> Bool
$c== :: DescribeWorldExportJob -> DescribeWorldExportJob -> Bool
Prelude.Eq, ReadPrec [DescribeWorldExportJob]
ReadPrec DescribeWorldExportJob
Int -> ReadS DescribeWorldExportJob
ReadS [DescribeWorldExportJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorldExportJob]
$creadListPrec :: ReadPrec [DescribeWorldExportJob]
readPrec :: ReadPrec DescribeWorldExportJob
$creadPrec :: ReadPrec DescribeWorldExportJob
readList :: ReadS [DescribeWorldExportJob]
$creadList :: ReadS [DescribeWorldExportJob]
readsPrec :: Int -> ReadS DescribeWorldExportJob
$creadsPrec :: Int -> ReadS DescribeWorldExportJob
Prelude.Read, Int -> DescribeWorldExportJob -> ShowS
[DescribeWorldExportJob] -> ShowS
DescribeWorldExportJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorldExportJob] -> ShowS
$cshowList :: [DescribeWorldExportJob] -> ShowS
show :: DescribeWorldExportJob -> String
$cshow :: DescribeWorldExportJob -> String
showsPrec :: Int -> DescribeWorldExportJob -> ShowS
$cshowsPrec :: Int -> DescribeWorldExportJob -> ShowS
Prelude.Show, forall x. Rep DescribeWorldExportJob x -> DescribeWorldExportJob
forall x. DescribeWorldExportJob -> Rep DescribeWorldExportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeWorldExportJob x -> DescribeWorldExportJob
$cfrom :: forall x. DescribeWorldExportJob -> Rep DescribeWorldExportJob x
Prelude.Generic)

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

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

instance Core.AWSRequest DescribeWorldExportJob where
  type
    AWSResponse DescribeWorldExportJob =
      DescribeWorldExportJobResponse
  request :: (Service -> Service)
-> DescribeWorldExportJob -> Request DescribeWorldExportJob
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 DescribeWorldExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeWorldExportJob)))
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 WorldExportJobErrorCode
-> Maybe Text
-> Maybe Text
-> Maybe OutputLocation
-> Maybe WorldExportJobStatus
-> Maybe (HashMap Text Text)
-> Maybe (NonEmpty Text)
-> Int
-> DescribeWorldExportJobResponse
DescribeWorldExportJobResponse'
            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
"iamRole")
            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
"outputLocation")
            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
"worlds")
            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 DescribeWorldExportJob where
  hashWithSalt :: Int -> DescribeWorldExportJob -> Int
hashWithSalt Int
_salt DescribeWorldExportJob' {Text
job :: Text
$sel:job:DescribeWorldExportJob' :: DescribeWorldExportJob -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
job

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

instance Data.ToHeaders DescribeWorldExportJob where
  toHeaders :: DescribeWorldExportJob -> 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 DescribeWorldExportJob where
  toJSON :: DescribeWorldExportJob -> Value
toJSON DescribeWorldExportJob' {Text
job :: Text
$sel:job:DescribeWorldExportJob' :: DescribeWorldExportJob -> 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 DescribeWorldExportJob where
  toPath :: DescribeWorldExportJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/describeWorldExportJob"

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

-- | /See:/ 'newDescribeWorldExportJobResponse' smart constructor.
data DescribeWorldExportJobResponse = DescribeWorldExportJobResponse'
  { -- | The Amazon Resource Name (ARN) of the world export job.
    DescribeWorldExportJobResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    DescribeWorldExportJobResponse -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the world export job was
    -- created.
    DescribeWorldExportJobResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Data.POSIX,
    -- | The failure code of the world export 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.
    DescribeWorldExportJobResponse -> Maybe WorldExportJobErrorCode
failureCode :: Prelude.Maybe WorldExportJobErrorCode,
    -- | The reason why the world export job failed.
    DescribeWorldExportJobResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The IAM role that the world export process uses to access the Amazon S3
    -- bucket and put the export.
    DescribeWorldExportJobResponse -> Maybe Text
iamRole :: Prelude.Maybe Prelude.Text,
    DescribeWorldExportJobResponse -> Maybe OutputLocation
outputLocation :: Prelude.Maybe OutputLocation,
    -- | The status of the world export job.
    --
    -- [Pending]
    --     The world export job request is pending.
    --
    -- [Running]
    --     The world export job is running.
    --
    -- [Completed]
    --     The world export job completed.
    --
    -- [Failed]
    --     The world export job failed. See @failureCode@ and @failureReason@
    --     for more information.
    --
    -- [Canceled]
    --     The world export job was cancelled.
    --
    -- [Canceling]
    --     The world export job is being cancelled.
    DescribeWorldExportJobResponse -> Maybe WorldExportJobStatus
status :: Prelude.Maybe WorldExportJobStatus,
    -- | A map that contains tag keys and tag values that are attached to the
    -- world export job.
    DescribeWorldExportJobResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A list of Amazon Resource Names (arns) that correspond to worlds to be
    -- exported.
    DescribeWorldExportJobResponse -> Maybe (NonEmpty Text)
worlds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The response's http status code.
    DescribeWorldExportJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeWorldExportJobResponse
-> DescribeWorldExportJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeWorldExportJobResponse
-> DescribeWorldExportJobResponse -> Bool
$c/= :: DescribeWorldExportJobResponse
-> DescribeWorldExportJobResponse -> Bool
== :: DescribeWorldExportJobResponse
-> DescribeWorldExportJobResponse -> Bool
$c== :: DescribeWorldExportJobResponse
-> DescribeWorldExportJobResponse -> Bool
Prelude.Eq, ReadPrec [DescribeWorldExportJobResponse]
ReadPrec DescribeWorldExportJobResponse
Int -> ReadS DescribeWorldExportJobResponse
ReadS [DescribeWorldExportJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeWorldExportJobResponse]
$creadListPrec :: ReadPrec [DescribeWorldExportJobResponse]
readPrec :: ReadPrec DescribeWorldExportJobResponse
$creadPrec :: ReadPrec DescribeWorldExportJobResponse
readList :: ReadS [DescribeWorldExportJobResponse]
$creadList :: ReadS [DescribeWorldExportJobResponse]
readsPrec :: Int -> ReadS DescribeWorldExportJobResponse
$creadsPrec :: Int -> ReadS DescribeWorldExportJobResponse
Prelude.Read, Int -> DescribeWorldExportJobResponse -> ShowS
[DescribeWorldExportJobResponse] -> ShowS
DescribeWorldExportJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeWorldExportJobResponse] -> ShowS
$cshowList :: [DescribeWorldExportJobResponse] -> ShowS
show :: DescribeWorldExportJobResponse -> String
$cshow :: DescribeWorldExportJobResponse -> String
showsPrec :: Int -> DescribeWorldExportJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeWorldExportJobResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeWorldExportJobResponse x
-> DescribeWorldExportJobResponse
forall x.
DescribeWorldExportJobResponse
-> Rep DescribeWorldExportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeWorldExportJobResponse x
-> DescribeWorldExportJobResponse
$cfrom :: forall x.
DescribeWorldExportJobResponse
-> Rep DescribeWorldExportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeWorldExportJobResponse' 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', 'describeWorldExportJobResponse_arn' - The Amazon Resource Name (ARN) of the world export job.
--
-- 'clientRequestToken', 'describeWorldExportJobResponse_clientRequestToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'createdAt', 'describeWorldExportJobResponse_createdAt' - The time, in milliseconds since the epoch, when the world export job was
-- created.
--
-- 'failureCode', 'describeWorldExportJobResponse_failureCode' - The failure code of the world export 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', 'describeWorldExportJobResponse_failureReason' - The reason why the world export job failed.
--
-- 'iamRole', 'describeWorldExportJobResponse_iamRole' - The IAM role that the world export process uses to access the Amazon S3
-- bucket and put the export.
--
-- 'outputLocation', 'describeWorldExportJobResponse_outputLocation' - Undocumented member.
--
-- 'status', 'describeWorldExportJobResponse_status' - The status of the world export job.
--
-- [Pending]
--     The world export job request is pending.
--
-- [Running]
--     The world export job is running.
--
-- [Completed]
--     The world export job completed.
--
-- [Failed]
--     The world export job failed. See @failureCode@ and @failureReason@
--     for more information.
--
-- [Canceled]
--     The world export job was cancelled.
--
-- [Canceling]
--     The world export job is being cancelled.
--
-- 'tags', 'describeWorldExportJobResponse_tags' - A map that contains tag keys and tag values that are attached to the
-- world export job.
--
-- 'worlds', 'describeWorldExportJobResponse_worlds' - A list of Amazon Resource Names (arns) that correspond to worlds to be
-- exported.
--
-- 'httpStatus', 'describeWorldExportJobResponse_httpStatus' - The response's http status code.
newDescribeWorldExportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeWorldExportJobResponse
newDescribeWorldExportJobResponse :: Int -> DescribeWorldExportJobResponse
newDescribeWorldExportJobResponse Int
pHttpStatus_ =
  DescribeWorldExportJobResponse'
    { $sel:arn:DescribeWorldExportJobResponse' :: Maybe Text
arn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:DescribeWorldExportJobResponse' :: Maybe Text
clientRequestToken = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:DescribeWorldExportJobResponse' :: Maybe POSIX
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:failureCode:DescribeWorldExportJobResponse' :: Maybe WorldExportJobErrorCode
failureCode = forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:DescribeWorldExportJobResponse' :: Maybe Text
failureReason = forall a. Maybe a
Prelude.Nothing,
      $sel:iamRole:DescribeWorldExportJobResponse' :: Maybe Text
iamRole = forall a. Maybe a
Prelude.Nothing,
      $sel:outputLocation:DescribeWorldExportJobResponse' :: Maybe OutputLocation
outputLocation = forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeWorldExportJobResponse' :: Maybe WorldExportJobStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeWorldExportJobResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:worlds:DescribeWorldExportJobResponse' :: Maybe (NonEmpty Text)
worlds = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeWorldExportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | The time, in milliseconds since the epoch, when the world export job was
-- created.
describeWorldExportJobResponse_createdAt :: Lens.Lens' DescribeWorldExportJobResponse (Prelude.Maybe Prelude.UTCTime)
describeWorldExportJobResponse_createdAt :: Lens' DescribeWorldExportJobResponse (Maybe UTCTime)
describeWorldExportJobResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldExportJobResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DescribeWorldExportJobResponse
s@DescribeWorldExportJobResponse' {} Maybe POSIX
a -> DescribeWorldExportJobResponse
s {$sel:createdAt:DescribeWorldExportJobResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DescribeWorldExportJobResponse) 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 export 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.
describeWorldExportJobResponse_failureCode :: Lens.Lens' DescribeWorldExportJobResponse (Prelude.Maybe WorldExportJobErrorCode)
describeWorldExportJobResponse_failureCode :: Lens'
  DescribeWorldExportJobResponse (Maybe WorldExportJobErrorCode)
describeWorldExportJobResponse_failureCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldExportJobResponse' {Maybe WorldExportJobErrorCode
failureCode :: Maybe WorldExportJobErrorCode
$sel:failureCode:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe WorldExportJobErrorCode
failureCode} -> Maybe WorldExportJobErrorCode
failureCode) (\s :: DescribeWorldExportJobResponse
s@DescribeWorldExportJobResponse' {} Maybe WorldExportJobErrorCode
a -> DescribeWorldExportJobResponse
s {$sel:failureCode:DescribeWorldExportJobResponse' :: Maybe WorldExportJobErrorCode
failureCode = Maybe WorldExportJobErrorCode
a} :: DescribeWorldExportJobResponse)

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

-- | The IAM role that the world export process uses to access the Amazon S3
-- bucket and put the export.
describeWorldExportJobResponse_iamRole :: Lens.Lens' DescribeWorldExportJobResponse (Prelude.Maybe Prelude.Text)
describeWorldExportJobResponse_iamRole :: Lens' DescribeWorldExportJobResponse (Maybe Text)
describeWorldExportJobResponse_iamRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldExportJobResponse' {Maybe Text
iamRole :: Maybe Text
$sel:iamRole:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe Text
iamRole} -> Maybe Text
iamRole) (\s :: DescribeWorldExportJobResponse
s@DescribeWorldExportJobResponse' {} Maybe Text
a -> DescribeWorldExportJobResponse
s {$sel:iamRole:DescribeWorldExportJobResponse' :: Maybe Text
iamRole = Maybe Text
a} :: DescribeWorldExportJobResponse)

-- | Undocumented member.
describeWorldExportJobResponse_outputLocation :: Lens.Lens' DescribeWorldExportJobResponse (Prelude.Maybe OutputLocation)
describeWorldExportJobResponse_outputLocation :: Lens' DescribeWorldExportJobResponse (Maybe OutputLocation)
describeWorldExportJobResponse_outputLocation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldExportJobResponse' {Maybe OutputLocation
outputLocation :: Maybe OutputLocation
$sel:outputLocation:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe OutputLocation
outputLocation} -> Maybe OutputLocation
outputLocation) (\s :: DescribeWorldExportJobResponse
s@DescribeWorldExportJobResponse' {} Maybe OutputLocation
a -> DescribeWorldExportJobResponse
s {$sel:outputLocation:DescribeWorldExportJobResponse' :: Maybe OutputLocation
outputLocation = Maybe OutputLocation
a} :: DescribeWorldExportJobResponse)

-- | The status of the world export job.
--
-- [Pending]
--     The world export job request is pending.
--
-- [Running]
--     The world export job is running.
--
-- [Completed]
--     The world export job completed.
--
-- [Failed]
--     The world export job failed. See @failureCode@ and @failureReason@
--     for more information.
--
-- [Canceled]
--     The world export job was cancelled.
--
-- [Canceling]
--     The world export job is being cancelled.
describeWorldExportJobResponse_status :: Lens.Lens' DescribeWorldExportJobResponse (Prelude.Maybe WorldExportJobStatus)
describeWorldExportJobResponse_status :: Lens' DescribeWorldExportJobResponse (Maybe WorldExportJobStatus)
describeWorldExportJobResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldExportJobResponse' {Maybe WorldExportJobStatus
status :: Maybe WorldExportJobStatus
$sel:status:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe WorldExportJobStatus
status} -> Maybe WorldExportJobStatus
status) (\s :: DescribeWorldExportJobResponse
s@DescribeWorldExportJobResponse' {} Maybe WorldExportJobStatus
a -> DescribeWorldExportJobResponse
s {$sel:status:DescribeWorldExportJobResponse' :: Maybe WorldExportJobStatus
status = Maybe WorldExportJobStatus
a} :: DescribeWorldExportJobResponse)

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

-- | A list of Amazon Resource Names (arns) that correspond to worlds to be
-- exported.
describeWorldExportJobResponse_worlds :: Lens.Lens' DescribeWorldExportJobResponse (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
describeWorldExportJobResponse_worlds :: Lens' DescribeWorldExportJobResponse (Maybe (NonEmpty Text))
describeWorldExportJobResponse_worlds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldExportJobResponse' {Maybe (NonEmpty Text)
worlds :: Maybe (NonEmpty Text)
$sel:worlds:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe (NonEmpty Text)
worlds} -> Maybe (NonEmpty Text)
worlds) (\s :: DescribeWorldExportJobResponse
s@DescribeWorldExportJobResponse' {} Maybe (NonEmpty Text)
a -> DescribeWorldExportJobResponse
s {$sel:worlds:DescribeWorldExportJobResponse' :: Maybe (NonEmpty Text)
worlds = Maybe (NonEmpty Text)
a} :: DescribeWorldExportJobResponse) 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.
describeWorldExportJobResponse_httpStatus :: Lens.Lens' DescribeWorldExportJobResponse Prelude.Int
describeWorldExportJobResponse_httpStatus :: Lens' DescribeWorldExportJobResponse Int
describeWorldExportJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeWorldExportJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeWorldExportJobResponse
s@DescribeWorldExportJobResponse' {} Int
a -> DescribeWorldExportJobResponse
s {$sel:httpStatus:DescribeWorldExportJobResponse' :: Int
httpStatus = Int
a} :: DescribeWorldExportJobResponse)

instance
  Prelude.NFData
    DescribeWorldExportJobResponse
  where
  rnf :: DescribeWorldExportJobResponse -> ()
rnf DescribeWorldExportJobResponse' {Int
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe POSIX
Maybe OutputLocation
Maybe WorldExportJobErrorCode
Maybe WorldExportJobStatus
httpStatus :: Int
worlds :: Maybe (NonEmpty Text)
tags :: Maybe (HashMap Text Text)
status :: Maybe WorldExportJobStatus
outputLocation :: Maybe OutputLocation
iamRole :: Maybe Text
failureReason :: Maybe Text
failureCode :: Maybe WorldExportJobErrorCode
createdAt :: Maybe POSIX
clientRequestToken :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Int
$sel:worlds:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe (NonEmpty Text)
$sel:tags:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe (HashMap Text Text)
$sel:status:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe WorldExportJobStatus
$sel:outputLocation:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe OutputLocation
$sel:iamRole:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe Text
$sel:failureReason:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe Text
$sel:failureCode:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe WorldExportJobErrorCode
$sel:createdAt:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe POSIX
$sel:clientRequestToken:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> Maybe Text
$sel:arn:DescribeWorldExportJobResponse' :: DescribeWorldExportJobResponse -> 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 WorldExportJobErrorCode
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 Text
iamRole
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OutputLocation
outputLocation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorldExportJobStatus
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 (NonEmpty Text)
worlds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus