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

    -- * Request Lenses
    createWorldExportJob_clientRequestToken,
    createWorldExportJob_tags,
    createWorldExportJob_worlds,
    createWorldExportJob_outputLocation,
    createWorldExportJob_iamRole,

    -- * Destructuring the Response
    CreateWorldExportJobResponse (..),
    newCreateWorldExportJobResponse,

    -- * Response Lenses
    createWorldExportJobResponse_status,
    createWorldExportJobResponse_arn,
    createWorldExportJobResponse_createdAt,
    createWorldExportJobResponse_failureCode,
    createWorldExportJobResponse_outputLocation,
    createWorldExportJobResponse_clientRequestToken,
    createWorldExportJobResponse_iamRole,
    createWorldExportJobResponse_tags,
    createWorldExportJobResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.RobOMaker.Types

-- | /See:/ 'newCreateWorldExportJob' smart constructor.
data CreateWorldExportJob = CreateWorldExportJob'
  { -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    CreateWorldExportJob -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | A map that contains tag keys and tag values that are attached to the
    -- world export job.
    CreateWorldExportJob -> 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
    -- export.
    CreateWorldExportJob -> NonEmpty Text
worlds :: Prelude.NonEmpty Prelude.Text,
    CreateWorldExportJob -> OutputLocation
outputLocation :: OutputLocation,
    -- | The IAM role that the world export process uses to access the Amazon S3
    -- bucket and put the export.
    CreateWorldExportJob -> Text
iamRole :: Prelude.Text
  }
  deriving (CreateWorldExportJob -> CreateWorldExportJob -> Bool
(CreateWorldExportJob -> CreateWorldExportJob -> Bool)
-> (CreateWorldExportJob -> CreateWorldExportJob -> Bool)
-> Eq CreateWorldExportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWorldExportJob -> CreateWorldExportJob -> Bool
$c/= :: CreateWorldExportJob -> CreateWorldExportJob -> Bool
== :: CreateWorldExportJob -> CreateWorldExportJob -> Bool
$c== :: CreateWorldExportJob -> CreateWorldExportJob -> Bool
Prelude.Eq, ReadPrec [CreateWorldExportJob]
ReadPrec CreateWorldExportJob
Int -> ReadS CreateWorldExportJob
ReadS [CreateWorldExportJob]
(Int -> ReadS CreateWorldExportJob)
-> ReadS [CreateWorldExportJob]
-> ReadPrec CreateWorldExportJob
-> ReadPrec [CreateWorldExportJob]
-> Read CreateWorldExportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWorldExportJob]
$creadListPrec :: ReadPrec [CreateWorldExportJob]
readPrec :: ReadPrec CreateWorldExportJob
$creadPrec :: ReadPrec CreateWorldExportJob
readList :: ReadS [CreateWorldExportJob]
$creadList :: ReadS [CreateWorldExportJob]
readsPrec :: Int -> ReadS CreateWorldExportJob
$creadsPrec :: Int -> ReadS CreateWorldExportJob
Prelude.Read, Int -> CreateWorldExportJob -> ShowS
[CreateWorldExportJob] -> ShowS
CreateWorldExportJob -> String
(Int -> CreateWorldExportJob -> ShowS)
-> (CreateWorldExportJob -> String)
-> ([CreateWorldExportJob] -> ShowS)
-> Show CreateWorldExportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWorldExportJob] -> ShowS
$cshowList :: [CreateWorldExportJob] -> ShowS
show :: CreateWorldExportJob -> String
$cshow :: CreateWorldExportJob -> String
showsPrec :: Int -> CreateWorldExportJob -> ShowS
$cshowsPrec :: Int -> CreateWorldExportJob -> ShowS
Prelude.Show, (forall x. CreateWorldExportJob -> Rep CreateWorldExportJob x)
-> (forall x. Rep CreateWorldExportJob x -> CreateWorldExportJob)
-> Generic CreateWorldExportJob
forall x. Rep CreateWorldExportJob x -> CreateWorldExportJob
forall x. CreateWorldExportJob -> Rep CreateWorldExportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateWorldExportJob x -> CreateWorldExportJob
$cfrom :: forall x. CreateWorldExportJob -> Rep CreateWorldExportJob x
Prelude.Generic)

-- |
-- Create a value of 'CreateWorldExportJob' 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:
--
-- 'clientRequestToken', 'createWorldExportJob_clientRequestToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'tags', 'createWorldExportJob_tags' - A map that contains tag keys and tag values that are attached to the
-- world export job.
--
-- 'worlds', 'createWorldExportJob_worlds' - A list of Amazon Resource Names (arns) that correspond to worlds to
-- export.
--
-- 'outputLocation', 'createWorldExportJob_outputLocation' - Undocumented member.
--
-- 'iamRole', 'createWorldExportJob_iamRole' - The IAM role that the world export process uses to access the Amazon S3
-- bucket and put the export.
newCreateWorldExportJob ::
  -- | 'worlds'
  Prelude.NonEmpty Prelude.Text ->
  -- | 'outputLocation'
  OutputLocation ->
  -- | 'iamRole'
  Prelude.Text ->
  CreateWorldExportJob
newCreateWorldExportJob :: NonEmpty Text -> OutputLocation -> Text -> CreateWorldExportJob
newCreateWorldExportJob
  NonEmpty Text
pWorlds_
  OutputLocation
pOutputLocation_
  Text
pIamRole_ =
    CreateWorldExportJob' :: Maybe Text
-> Maybe (HashMap Text Text)
-> NonEmpty Text
-> OutputLocation
-> Text
-> CreateWorldExportJob
CreateWorldExportJob'
      { $sel:clientRequestToken:CreateWorldExportJob' :: Maybe Text
clientRequestToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateWorldExportJob' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:worlds:CreateWorldExportJob' :: NonEmpty Text
worlds = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pWorlds_,
        $sel:outputLocation:CreateWorldExportJob' :: OutputLocation
outputLocation = OutputLocation
pOutputLocation_,
        $sel:iamRole:CreateWorldExportJob' :: Text
iamRole = Text
pIamRole_
      }

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

-- | A map that contains tag keys and tag values that are attached to the
-- world export job.
createWorldExportJob_tags :: Lens.Lens' CreateWorldExportJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createWorldExportJob_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateWorldExportJob -> f CreateWorldExportJob
createWorldExportJob_tags = (CreateWorldExportJob -> Maybe (HashMap Text Text))
-> (CreateWorldExportJob
    -> Maybe (HashMap Text Text) -> CreateWorldExportJob)
-> Lens
     CreateWorldExportJob
     CreateWorldExportJob
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorldExportJob' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateWorldExportJob' :: CreateWorldExportJob -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateWorldExportJob
s@CreateWorldExportJob' {} Maybe (HashMap Text Text)
a -> CreateWorldExportJob
s {$sel:tags:CreateWorldExportJob' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateWorldExportJob) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateWorldExportJob -> f CreateWorldExportJob)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateWorldExportJob
-> f CreateWorldExportJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
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
-- export.
createWorldExportJob_worlds :: Lens.Lens' CreateWorldExportJob (Prelude.NonEmpty Prelude.Text)
createWorldExportJob_worlds :: (NonEmpty Text -> f (NonEmpty Text))
-> CreateWorldExportJob -> f CreateWorldExportJob
createWorldExportJob_worlds = (CreateWorldExportJob -> NonEmpty Text)
-> (CreateWorldExportJob -> NonEmpty Text -> CreateWorldExportJob)
-> Lens
     CreateWorldExportJob
     CreateWorldExportJob
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorldExportJob' {NonEmpty Text
worlds :: NonEmpty Text
$sel:worlds:CreateWorldExportJob' :: CreateWorldExportJob -> NonEmpty Text
worlds} -> NonEmpty Text
worlds) (\s :: CreateWorldExportJob
s@CreateWorldExportJob' {} NonEmpty Text
a -> CreateWorldExportJob
s {$sel:worlds:CreateWorldExportJob' :: NonEmpty Text
worlds = NonEmpty Text
a} :: CreateWorldExportJob) ((NonEmpty Text -> f (NonEmpty Text))
 -> CreateWorldExportJob -> f CreateWorldExportJob)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> CreateWorldExportJob
-> f CreateWorldExportJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
createWorldExportJob_outputLocation :: Lens.Lens' CreateWorldExportJob OutputLocation
createWorldExportJob_outputLocation :: (OutputLocation -> f OutputLocation)
-> CreateWorldExportJob -> f CreateWorldExportJob
createWorldExportJob_outputLocation = (CreateWorldExportJob -> OutputLocation)
-> (CreateWorldExportJob -> OutputLocation -> CreateWorldExportJob)
-> Lens
     CreateWorldExportJob
     CreateWorldExportJob
     OutputLocation
     OutputLocation
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorldExportJob' {OutputLocation
outputLocation :: OutputLocation
$sel:outputLocation:CreateWorldExportJob' :: CreateWorldExportJob -> OutputLocation
outputLocation} -> OutputLocation
outputLocation) (\s :: CreateWorldExportJob
s@CreateWorldExportJob' {} OutputLocation
a -> CreateWorldExportJob
s {$sel:outputLocation:CreateWorldExportJob' :: OutputLocation
outputLocation = OutputLocation
a} :: CreateWorldExportJob)

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

instance Core.AWSRequest CreateWorldExportJob where
  type
    AWSResponse CreateWorldExportJob =
      CreateWorldExportJobResponse
  request :: CreateWorldExportJob -> Request CreateWorldExportJob
request = Service -> CreateWorldExportJob -> Request CreateWorldExportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateWorldExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateWorldExportJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateWorldExportJob))
-> Logger
-> Service
-> Proxy CreateWorldExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateWorldExportJob)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe WorldExportJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe WorldExportJobErrorCode
-> Maybe OutputLocation
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateWorldExportJobResponse
CreateWorldExportJobResponse'
            (Maybe WorldExportJobStatus
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe WorldExportJobErrorCode
 -> Maybe OutputLocation
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateWorldExportJobResponse)
-> Either String (Maybe WorldExportJobStatus)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe WorldExportJobErrorCode
      -> Maybe OutputLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateWorldExportJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe WorldExportJobStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"status")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe WorldExportJobErrorCode
   -> Maybe OutputLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateWorldExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe WorldExportJobErrorCode
      -> Maybe OutputLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateWorldExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"arn")
            Either
  String
  (Maybe POSIX
   -> Maybe WorldExportJobErrorCode
   -> Maybe OutputLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateWorldExportJobResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe WorldExportJobErrorCode
      -> Maybe OutputLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateWorldExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdAt")
            Either
  String
  (Maybe WorldExportJobErrorCode
   -> Maybe OutputLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateWorldExportJobResponse)
-> Either String (Maybe WorldExportJobErrorCode)
-> Either
     String
     (Maybe OutputLocation
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateWorldExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe WorldExportJobErrorCode)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"failureCode")
            Either
  String
  (Maybe OutputLocation
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateWorldExportJobResponse)
-> Either String (Maybe OutputLocation)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateWorldExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe OutputLocation)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"outputLocation")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateWorldExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateWorldExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"clientRequestToken")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateWorldExportJobResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> CreateWorldExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"iamRole")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> CreateWorldExportJobResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateWorldExportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> CreateWorldExportJobResponse)
-> Either String Int -> Either String CreateWorldExportJobResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateWorldExportJob

instance Prelude.NFData CreateWorldExportJob

instance Core.ToHeaders CreateWorldExportJob where
  toHeaders :: CreateWorldExportJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateWorldExportJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateWorldExportJob where
  toJSON :: CreateWorldExportJob -> Value
toJSON CreateWorldExportJob' {Maybe Text
Maybe (HashMap Text Text)
NonEmpty Text
Text
OutputLocation
iamRole :: Text
outputLocation :: OutputLocation
worlds :: NonEmpty Text
tags :: Maybe (HashMap Text Text)
clientRequestToken :: Maybe Text
$sel:iamRole:CreateWorldExportJob' :: CreateWorldExportJob -> Text
$sel:outputLocation:CreateWorldExportJob' :: CreateWorldExportJob -> OutputLocation
$sel:worlds:CreateWorldExportJob' :: CreateWorldExportJob -> NonEmpty Text
$sel:tags:CreateWorldExportJob' :: CreateWorldExportJob -> Maybe (HashMap Text Text)
$sel:clientRequestToken:CreateWorldExportJob' :: CreateWorldExportJob -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"clientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientRequestToken,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"worlds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
worlds),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"outputLocation" Text -> OutputLocation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= OutputLocation
outputLocation),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"iamRole" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
iamRole)
          ]
      )

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

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

-- | /See:/ 'newCreateWorldExportJobResponse' smart constructor.
data CreateWorldExportJobResponse = CreateWorldExportJobResponse'
  { -- | 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@ for more information.
    --
    -- [Canceled]
    --     The world export job was cancelled.
    --
    -- [Canceling]
    --     The world export job is being cancelled.
    CreateWorldExportJobResponse -> Maybe WorldExportJobStatus
status :: Prelude.Maybe WorldExportJobStatus,
    -- | The Amazon Resource Name (ARN) of the world export job.
    CreateWorldExportJobResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the world export job was
    -- created.
    CreateWorldExportJobResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.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.
    --
    -- [AllWorldGenerationFailed]
    --     All of the worlds in the world generation job failed. This can
    --     happen if your @worldCount@ is greater than 50 or less than 1.
    --
    -- For more information about troubleshooting WorldForge, see
    -- <https://docs.aws.amazon.com/robomaker/latest/dg/troubleshooting-worldforge.html Troubleshooting Simulation WorldForge>.
    CreateWorldExportJobResponse -> Maybe WorldExportJobErrorCode
failureCode :: Prelude.Maybe WorldExportJobErrorCode,
    CreateWorldExportJobResponse -> Maybe OutputLocation
outputLocation :: Prelude.Maybe OutputLocation,
    -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request.
    CreateWorldExportJobResponse -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | The IAM role that the world export process uses to access the Amazon S3
    -- bucket and put the export.
    CreateWorldExportJobResponse -> Maybe Text
iamRole :: Prelude.Maybe Prelude.Text,
    -- | A map that contains tag keys and tag values that are attached to the
    -- world export job.
    CreateWorldExportJobResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateWorldExportJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateWorldExportJobResponse
-> CreateWorldExportJobResponse -> Bool
(CreateWorldExportJobResponse
 -> CreateWorldExportJobResponse -> Bool)
-> (CreateWorldExportJobResponse
    -> CreateWorldExportJobResponse -> Bool)
-> Eq CreateWorldExportJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWorldExportJobResponse
-> CreateWorldExportJobResponse -> Bool
$c/= :: CreateWorldExportJobResponse
-> CreateWorldExportJobResponse -> Bool
== :: CreateWorldExportJobResponse
-> CreateWorldExportJobResponse -> Bool
$c== :: CreateWorldExportJobResponse
-> CreateWorldExportJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateWorldExportJobResponse]
ReadPrec CreateWorldExportJobResponse
Int -> ReadS CreateWorldExportJobResponse
ReadS [CreateWorldExportJobResponse]
(Int -> ReadS CreateWorldExportJobResponse)
-> ReadS [CreateWorldExportJobResponse]
-> ReadPrec CreateWorldExportJobResponse
-> ReadPrec [CreateWorldExportJobResponse]
-> Read CreateWorldExportJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWorldExportJobResponse]
$creadListPrec :: ReadPrec [CreateWorldExportJobResponse]
readPrec :: ReadPrec CreateWorldExportJobResponse
$creadPrec :: ReadPrec CreateWorldExportJobResponse
readList :: ReadS [CreateWorldExportJobResponse]
$creadList :: ReadS [CreateWorldExportJobResponse]
readsPrec :: Int -> ReadS CreateWorldExportJobResponse
$creadsPrec :: Int -> ReadS CreateWorldExportJobResponse
Prelude.Read, Int -> CreateWorldExportJobResponse -> ShowS
[CreateWorldExportJobResponse] -> ShowS
CreateWorldExportJobResponse -> String
(Int -> CreateWorldExportJobResponse -> ShowS)
-> (CreateWorldExportJobResponse -> String)
-> ([CreateWorldExportJobResponse] -> ShowS)
-> Show CreateWorldExportJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWorldExportJobResponse] -> ShowS
$cshowList :: [CreateWorldExportJobResponse] -> ShowS
show :: CreateWorldExportJobResponse -> String
$cshow :: CreateWorldExportJobResponse -> String
showsPrec :: Int -> CreateWorldExportJobResponse -> ShowS
$cshowsPrec :: Int -> CreateWorldExportJobResponse -> ShowS
Prelude.Show, (forall x.
 CreateWorldExportJobResponse -> Rep CreateWorldExportJobResponse x)
-> (forall x.
    Rep CreateWorldExportJobResponse x -> CreateWorldExportJobResponse)
-> Generic CreateWorldExportJobResponse
forall x.
Rep CreateWorldExportJobResponse x -> CreateWorldExportJobResponse
forall x.
CreateWorldExportJobResponse -> Rep CreateWorldExportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateWorldExportJobResponse x -> CreateWorldExportJobResponse
$cfrom :: forall x.
CreateWorldExportJobResponse -> Rep CreateWorldExportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateWorldExportJobResponse' 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:
--
-- 'status', 'createWorldExportJobResponse_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@ for more information.
--
-- [Canceled]
--     The world export job was cancelled.
--
-- [Canceling]
--     The world export job is being cancelled.
--
-- 'arn', 'createWorldExportJobResponse_arn' - The Amazon Resource Name (ARN) of the world export job.
--
-- 'createdAt', 'createWorldExportJobResponse_createdAt' - The time, in milliseconds since the epoch, when the world export job was
-- created.
--
-- 'failureCode', 'createWorldExportJobResponse_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.
--
-- [AllWorldGenerationFailed]
--     All of the worlds in the world generation job failed. This can
--     happen if your @worldCount@ is greater than 50 or less than 1.
--
-- For more information about troubleshooting WorldForge, see
-- <https://docs.aws.amazon.com/robomaker/latest/dg/troubleshooting-worldforge.html Troubleshooting Simulation WorldForge>.
--
-- 'outputLocation', 'createWorldExportJobResponse_outputLocation' - Undocumented member.
--
-- 'clientRequestToken', 'createWorldExportJobResponse_clientRequestToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request.
--
-- 'iamRole', 'createWorldExportJobResponse_iamRole' - The IAM role that the world export process uses to access the Amazon S3
-- bucket and put the export.
--
-- 'tags', 'createWorldExportJobResponse_tags' - A map that contains tag keys and tag values that are attached to the
-- world export job.
--
-- 'httpStatus', 'createWorldExportJobResponse_httpStatus' - The response's http status code.
newCreateWorldExportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateWorldExportJobResponse
newCreateWorldExportJobResponse :: Int -> CreateWorldExportJobResponse
newCreateWorldExportJobResponse Int
pHttpStatus_ =
  CreateWorldExportJobResponse' :: Maybe WorldExportJobStatus
-> Maybe Text
-> Maybe POSIX
-> Maybe WorldExportJobErrorCode
-> Maybe OutputLocation
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateWorldExportJobResponse
CreateWorldExportJobResponse'
    { $sel:status:CreateWorldExportJobResponse' :: Maybe WorldExportJobStatus
status =
        Maybe WorldExportJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CreateWorldExportJobResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:CreateWorldExportJobResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:failureCode:CreateWorldExportJobResponse' :: Maybe WorldExportJobErrorCode
failureCode = Maybe WorldExportJobErrorCode
forall a. Maybe a
Prelude.Nothing,
      $sel:outputLocation:CreateWorldExportJobResponse' :: Maybe OutputLocation
outputLocation = Maybe OutputLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:clientRequestToken:CreateWorldExportJobResponse' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRole:CreateWorldExportJobResponse' :: Maybe Text
iamRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateWorldExportJobResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateWorldExportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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@ for more information.
--
-- [Canceled]
--     The world export job was cancelled.
--
-- [Canceling]
--     The world export job is being cancelled.
createWorldExportJobResponse_status :: Lens.Lens' CreateWorldExportJobResponse (Prelude.Maybe WorldExportJobStatus)
createWorldExportJobResponse_status :: (Maybe WorldExportJobStatus -> f (Maybe WorldExportJobStatus))
-> CreateWorldExportJobResponse -> f CreateWorldExportJobResponse
createWorldExportJobResponse_status = (CreateWorldExportJobResponse -> Maybe WorldExportJobStatus)
-> (CreateWorldExportJobResponse
    -> Maybe WorldExportJobStatus -> CreateWorldExportJobResponse)
-> Lens
     CreateWorldExportJobResponse
     CreateWorldExportJobResponse
     (Maybe WorldExportJobStatus)
     (Maybe WorldExportJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorldExportJobResponse' {Maybe WorldExportJobStatus
status :: Maybe WorldExportJobStatus
$sel:status:CreateWorldExportJobResponse' :: CreateWorldExportJobResponse -> Maybe WorldExportJobStatus
status} -> Maybe WorldExportJobStatus
status) (\s :: CreateWorldExportJobResponse
s@CreateWorldExportJobResponse' {} Maybe WorldExportJobStatus
a -> CreateWorldExportJobResponse
s {$sel:status:CreateWorldExportJobResponse' :: Maybe WorldExportJobStatus
status = Maybe WorldExportJobStatus
a} :: CreateWorldExportJobResponse)

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

-- | The time, in milliseconds since the epoch, when the world export job was
-- created.
createWorldExportJobResponse_createdAt :: Lens.Lens' CreateWorldExportJobResponse (Prelude.Maybe Prelude.UTCTime)
createWorldExportJobResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateWorldExportJobResponse -> f CreateWorldExportJobResponse
createWorldExportJobResponse_createdAt = (CreateWorldExportJobResponse -> Maybe POSIX)
-> (CreateWorldExportJobResponse
    -> Maybe POSIX -> CreateWorldExportJobResponse)
-> Lens
     CreateWorldExportJobResponse
     CreateWorldExportJobResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorldExportJobResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:CreateWorldExportJobResponse' :: CreateWorldExportJobResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: CreateWorldExportJobResponse
s@CreateWorldExportJobResponse' {} Maybe POSIX
a -> CreateWorldExportJobResponse
s {$sel:createdAt:CreateWorldExportJobResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: CreateWorldExportJobResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> CreateWorldExportJobResponse -> f CreateWorldExportJobResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateWorldExportJobResponse
-> f CreateWorldExportJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._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.
--
-- [AllWorldGenerationFailed]
--     All of the worlds in the world generation job failed. This can
--     happen if your @worldCount@ is greater than 50 or less than 1.
--
-- For more information about troubleshooting WorldForge, see
-- <https://docs.aws.amazon.com/robomaker/latest/dg/troubleshooting-worldforge.html Troubleshooting Simulation WorldForge>.
createWorldExportJobResponse_failureCode :: Lens.Lens' CreateWorldExportJobResponse (Prelude.Maybe WorldExportJobErrorCode)
createWorldExportJobResponse_failureCode :: (Maybe WorldExportJobErrorCode
 -> f (Maybe WorldExportJobErrorCode))
-> CreateWorldExportJobResponse -> f CreateWorldExportJobResponse
createWorldExportJobResponse_failureCode = (CreateWorldExportJobResponse -> Maybe WorldExportJobErrorCode)
-> (CreateWorldExportJobResponse
    -> Maybe WorldExportJobErrorCode -> CreateWorldExportJobResponse)
-> Lens
     CreateWorldExportJobResponse
     CreateWorldExportJobResponse
     (Maybe WorldExportJobErrorCode)
     (Maybe WorldExportJobErrorCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorldExportJobResponse' {Maybe WorldExportJobErrorCode
failureCode :: Maybe WorldExportJobErrorCode
$sel:failureCode:CreateWorldExportJobResponse' :: CreateWorldExportJobResponse -> Maybe WorldExportJobErrorCode
failureCode} -> Maybe WorldExportJobErrorCode
failureCode) (\s :: CreateWorldExportJobResponse
s@CreateWorldExportJobResponse' {} Maybe WorldExportJobErrorCode
a -> CreateWorldExportJobResponse
s {$sel:failureCode:CreateWorldExportJobResponse' :: Maybe WorldExportJobErrorCode
failureCode = Maybe WorldExportJobErrorCode
a} :: CreateWorldExportJobResponse)

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

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

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

-- | A map that contains tag keys and tag values that are attached to the
-- world export job.
createWorldExportJobResponse_tags :: Lens.Lens' CreateWorldExportJobResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createWorldExportJobResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateWorldExportJobResponse -> f CreateWorldExportJobResponse
createWorldExportJobResponse_tags = (CreateWorldExportJobResponse -> Maybe (HashMap Text Text))
-> (CreateWorldExportJobResponse
    -> Maybe (HashMap Text Text) -> CreateWorldExportJobResponse)
-> Lens
     CreateWorldExportJobResponse
     CreateWorldExportJobResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWorldExportJobResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateWorldExportJobResponse' :: CreateWorldExportJobResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateWorldExportJobResponse
s@CreateWorldExportJobResponse' {} Maybe (HashMap Text Text)
a -> CreateWorldExportJobResponse
s {$sel:tags:CreateWorldExportJobResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateWorldExportJobResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateWorldExportJobResponse -> f CreateWorldExportJobResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateWorldExportJobResponse
-> f CreateWorldExportJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData CreateWorldExportJobResponse