{-# 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.Personalize.CreateDatasetExportJob
-- 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 job that exports data from your dataset to an Amazon S3
-- bucket. To allow Amazon Personalize to export the training data, you
-- must specify an service-linked IAM role that gives Amazon Personalize
-- @PutObject@ permissions for your Amazon S3 bucket. For information, see
-- <https://docs.aws.amazon.com/personalize/latest/dg/export-data.html Exporting a dataset>
-- in the Amazon Personalize developer guide.
--
-- __Status__
--
-- A dataset export job can be in one of the following states:
--
-- -   CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
--
-- To get the status of the export job, call DescribeDatasetExportJob, and
-- specify the Amazon Resource Name (ARN) of the dataset export job. The
-- dataset export is complete when the status shows as ACTIVE. If the
-- status shows as CREATE FAILED, the response includes a @failureReason@
-- key, which describes why the job failed.
module Amazonka.Personalize.CreateDatasetExportJob
  ( -- * Creating a Request
    CreateDatasetExportJob (..),
    newCreateDatasetExportJob,

    -- * Request Lenses
    createDatasetExportJob_ingestionMode,
    createDatasetExportJob_jobName,
    createDatasetExportJob_datasetArn,
    createDatasetExportJob_roleArn,
    createDatasetExportJob_jobOutput,

    -- * Destructuring the Response
    CreateDatasetExportJobResponse (..),
    newCreateDatasetExportJobResponse,

    -- * Response Lenses
    createDatasetExportJobResponse_datasetExportJobArn,
    createDatasetExportJobResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateDatasetExportJob' smart constructor.
data CreateDatasetExportJob = CreateDatasetExportJob'
  { -- | The data to export, based on how you imported the data. You can choose
    -- to export only @BULK@ data that you imported using a dataset import job,
    -- only @PUT@ data that you imported incrementally (using the console,
    -- PutEvents, PutUsers and PutItems operations), or @ALL@ for both types.
    -- The default value is @PUT@.
    CreateDatasetExportJob -> Maybe IngestionMode
ingestionMode :: Prelude.Maybe IngestionMode,
    -- | The name for the dataset export job.
    CreateDatasetExportJob -> Text
jobName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the dataset that contains the data to
    -- export.
    CreateDatasetExportJob -> Text
datasetArn :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the IAM service role that has
    -- permissions to add data to your output Amazon S3 bucket.
    CreateDatasetExportJob -> Text
roleArn :: Prelude.Text,
    -- | The path to the Amazon S3 bucket where the job\'s output is stored.
    CreateDatasetExportJob -> DatasetExportJobOutput
jobOutput :: DatasetExportJobOutput
  }
  deriving (CreateDatasetExportJob -> CreateDatasetExportJob -> Bool
(CreateDatasetExportJob -> CreateDatasetExportJob -> Bool)
-> (CreateDatasetExportJob -> CreateDatasetExportJob -> Bool)
-> Eq CreateDatasetExportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDatasetExportJob -> CreateDatasetExportJob -> Bool
$c/= :: CreateDatasetExportJob -> CreateDatasetExportJob -> Bool
== :: CreateDatasetExportJob -> CreateDatasetExportJob -> Bool
$c== :: CreateDatasetExportJob -> CreateDatasetExportJob -> Bool
Prelude.Eq, ReadPrec [CreateDatasetExportJob]
ReadPrec CreateDatasetExportJob
Int -> ReadS CreateDatasetExportJob
ReadS [CreateDatasetExportJob]
(Int -> ReadS CreateDatasetExportJob)
-> ReadS [CreateDatasetExportJob]
-> ReadPrec CreateDatasetExportJob
-> ReadPrec [CreateDatasetExportJob]
-> Read CreateDatasetExportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDatasetExportJob]
$creadListPrec :: ReadPrec [CreateDatasetExportJob]
readPrec :: ReadPrec CreateDatasetExportJob
$creadPrec :: ReadPrec CreateDatasetExportJob
readList :: ReadS [CreateDatasetExportJob]
$creadList :: ReadS [CreateDatasetExportJob]
readsPrec :: Int -> ReadS CreateDatasetExportJob
$creadsPrec :: Int -> ReadS CreateDatasetExportJob
Prelude.Read, Int -> CreateDatasetExportJob -> ShowS
[CreateDatasetExportJob] -> ShowS
CreateDatasetExportJob -> String
(Int -> CreateDatasetExportJob -> ShowS)
-> (CreateDatasetExportJob -> String)
-> ([CreateDatasetExportJob] -> ShowS)
-> Show CreateDatasetExportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDatasetExportJob] -> ShowS
$cshowList :: [CreateDatasetExportJob] -> ShowS
show :: CreateDatasetExportJob -> String
$cshow :: CreateDatasetExportJob -> String
showsPrec :: Int -> CreateDatasetExportJob -> ShowS
$cshowsPrec :: Int -> CreateDatasetExportJob -> ShowS
Prelude.Show, (forall x. CreateDatasetExportJob -> Rep CreateDatasetExportJob x)
-> (forall x.
    Rep CreateDatasetExportJob x -> CreateDatasetExportJob)
-> Generic CreateDatasetExportJob
forall x. Rep CreateDatasetExportJob x -> CreateDatasetExportJob
forall x. CreateDatasetExportJob -> Rep CreateDatasetExportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDatasetExportJob x -> CreateDatasetExportJob
$cfrom :: forall x. CreateDatasetExportJob -> Rep CreateDatasetExportJob x
Prelude.Generic)

-- |
-- Create a value of 'CreateDatasetExportJob' 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:
--
-- 'ingestionMode', 'createDatasetExportJob_ingestionMode' - The data to export, based on how you imported the data. You can choose
-- to export only @BULK@ data that you imported using a dataset import job,
-- only @PUT@ data that you imported incrementally (using the console,
-- PutEvents, PutUsers and PutItems operations), or @ALL@ for both types.
-- The default value is @PUT@.
--
-- 'jobName', 'createDatasetExportJob_jobName' - The name for the dataset export job.
--
-- 'datasetArn', 'createDatasetExportJob_datasetArn' - The Amazon Resource Name (ARN) of the dataset that contains the data to
-- export.
--
-- 'roleArn', 'createDatasetExportJob_roleArn' - The Amazon Resource Name (ARN) of the IAM service role that has
-- permissions to add data to your output Amazon S3 bucket.
--
-- 'jobOutput', 'createDatasetExportJob_jobOutput' - The path to the Amazon S3 bucket where the job\'s output is stored.
newCreateDatasetExportJob ::
  -- | 'jobName'
  Prelude.Text ->
  -- | 'datasetArn'
  Prelude.Text ->
  -- | 'roleArn'
  Prelude.Text ->
  -- | 'jobOutput'
  DatasetExportJobOutput ->
  CreateDatasetExportJob
newCreateDatasetExportJob :: Text
-> Text -> Text -> DatasetExportJobOutput -> CreateDatasetExportJob
newCreateDatasetExportJob
  Text
pJobName_
  Text
pDatasetArn_
  Text
pRoleArn_
  DatasetExportJobOutput
pJobOutput_ =
    CreateDatasetExportJob' :: Maybe IngestionMode
-> Text
-> Text
-> Text
-> DatasetExportJobOutput
-> CreateDatasetExportJob
CreateDatasetExportJob'
      { $sel:ingestionMode:CreateDatasetExportJob' :: Maybe IngestionMode
ingestionMode =
          Maybe IngestionMode
forall a. Maybe a
Prelude.Nothing,
        $sel:jobName:CreateDatasetExportJob' :: Text
jobName = Text
pJobName_,
        $sel:datasetArn:CreateDatasetExportJob' :: Text
datasetArn = Text
pDatasetArn_,
        $sel:roleArn:CreateDatasetExportJob' :: Text
roleArn = Text
pRoleArn_,
        $sel:jobOutput:CreateDatasetExportJob' :: DatasetExportJobOutput
jobOutput = DatasetExportJobOutput
pJobOutput_
      }

-- | The data to export, based on how you imported the data. You can choose
-- to export only @BULK@ data that you imported using a dataset import job,
-- only @PUT@ data that you imported incrementally (using the console,
-- PutEvents, PutUsers and PutItems operations), or @ALL@ for both types.
-- The default value is @PUT@.
createDatasetExportJob_ingestionMode :: Lens.Lens' CreateDatasetExportJob (Prelude.Maybe IngestionMode)
createDatasetExportJob_ingestionMode :: (Maybe IngestionMode -> f (Maybe IngestionMode))
-> CreateDatasetExportJob -> f CreateDatasetExportJob
createDatasetExportJob_ingestionMode = (CreateDatasetExportJob -> Maybe IngestionMode)
-> (CreateDatasetExportJob
    -> Maybe IngestionMode -> CreateDatasetExportJob)
-> Lens
     CreateDatasetExportJob
     CreateDatasetExportJob
     (Maybe IngestionMode)
     (Maybe IngestionMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetExportJob' {Maybe IngestionMode
ingestionMode :: Maybe IngestionMode
$sel:ingestionMode:CreateDatasetExportJob' :: CreateDatasetExportJob -> Maybe IngestionMode
ingestionMode} -> Maybe IngestionMode
ingestionMode) (\s :: CreateDatasetExportJob
s@CreateDatasetExportJob' {} Maybe IngestionMode
a -> CreateDatasetExportJob
s {$sel:ingestionMode:CreateDatasetExportJob' :: Maybe IngestionMode
ingestionMode = Maybe IngestionMode
a} :: CreateDatasetExportJob)

-- | The name for the dataset export job.
createDatasetExportJob_jobName :: Lens.Lens' CreateDatasetExportJob Prelude.Text
createDatasetExportJob_jobName :: (Text -> f Text)
-> CreateDatasetExportJob -> f CreateDatasetExportJob
createDatasetExportJob_jobName = (CreateDatasetExportJob -> Text)
-> (CreateDatasetExportJob -> Text -> CreateDatasetExportJob)
-> Lens CreateDatasetExportJob CreateDatasetExportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetExportJob' {Text
jobName :: Text
$sel:jobName:CreateDatasetExportJob' :: CreateDatasetExportJob -> Text
jobName} -> Text
jobName) (\s :: CreateDatasetExportJob
s@CreateDatasetExportJob' {} Text
a -> CreateDatasetExportJob
s {$sel:jobName:CreateDatasetExportJob' :: Text
jobName = Text
a} :: CreateDatasetExportJob)

-- | The Amazon Resource Name (ARN) of the dataset that contains the data to
-- export.
createDatasetExportJob_datasetArn :: Lens.Lens' CreateDatasetExportJob Prelude.Text
createDatasetExportJob_datasetArn :: (Text -> f Text)
-> CreateDatasetExportJob -> f CreateDatasetExportJob
createDatasetExportJob_datasetArn = (CreateDatasetExportJob -> Text)
-> (CreateDatasetExportJob -> Text -> CreateDatasetExportJob)
-> Lens CreateDatasetExportJob CreateDatasetExportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetExportJob' {Text
datasetArn :: Text
$sel:datasetArn:CreateDatasetExportJob' :: CreateDatasetExportJob -> Text
datasetArn} -> Text
datasetArn) (\s :: CreateDatasetExportJob
s@CreateDatasetExportJob' {} Text
a -> CreateDatasetExportJob
s {$sel:datasetArn:CreateDatasetExportJob' :: Text
datasetArn = Text
a} :: CreateDatasetExportJob)

-- | The Amazon Resource Name (ARN) of the IAM service role that has
-- permissions to add data to your output Amazon S3 bucket.
createDatasetExportJob_roleArn :: Lens.Lens' CreateDatasetExportJob Prelude.Text
createDatasetExportJob_roleArn :: (Text -> f Text)
-> CreateDatasetExportJob -> f CreateDatasetExportJob
createDatasetExportJob_roleArn = (CreateDatasetExportJob -> Text)
-> (CreateDatasetExportJob -> Text -> CreateDatasetExportJob)
-> Lens CreateDatasetExportJob CreateDatasetExportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetExportJob' {Text
roleArn :: Text
$sel:roleArn:CreateDatasetExportJob' :: CreateDatasetExportJob -> Text
roleArn} -> Text
roleArn) (\s :: CreateDatasetExportJob
s@CreateDatasetExportJob' {} Text
a -> CreateDatasetExportJob
s {$sel:roleArn:CreateDatasetExportJob' :: Text
roleArn = Text
a} :: CreateDatasetExportJob)

-- | The path to the Amazon S3 bucket where the job\'s output is stored.
createDatasetExportJob_jobOutput :: Lens.Lens' CreateDatasetExportJob DatasetExportJobOutput
createDatasetExportJob_jobOutput :: (DatasetExportJobOutput -> f DatasetExportJobOutput)
-> CreateDatasetExportJob -> f CreateDatasetExportJob
createDatasetExportJob_jobOutput = (CreateDatasetExportJob -> DatasetExportJobOutput)
-> (CreateDatasetExportJob
    -> DatasetExportJobOutput -> CreateDatasetExportJob)
-> Lens
     CreateDatasetExportJob
     CreateDatasetExportJob
     DatasetExportJobOutput
     DatasetExportJobOutput
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetExportJob' {DatasetExportJobOutput
jobOutput :: DatasetExportJobOutput
$sel:jobOutput:CreateDatasetExportJob' :: CreateDatasetExportJob -> DatasetExportJobOutput
jobOutput} -> DatasetExportJobOutput
jobOutput) (\s :: CreateDatasetExportJob
s@CreateDatasetExportJob' {} DatasetExportJobOutput
a -> CreateDatasetExportJob
s {$sel:jobOutput:CreateDatasetExportJob' :: DatasetExportJobOutput
jobOutput = DatasetExportJobOutput
a} :: CreateDatasetExportJob)

instance Core.AWSRequest CreateDatasetExportJob where
  type
    AWSResponse CreateDatasetExportJob =
      CreateDatasetExportJobResponse
  request :: CreateDatasetExportJob -> Request CreateDatasetExportJob
request = Service -> CreateDatasetExportJob -> Request CreateDatasetExportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateDatasetExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDatasetExportJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateDatasetExportJob))
-> Logger
-> Service
-> Proxy CreateDatasetExportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDatasetExportJob)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateDatasetExportJobResponse
CreateDatasetExportJobResponse'
            (Maybe Text -> Int -> CreateDatasetExportJobResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateDatasetExportJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"datasetExportJobArn")
            Either String (Int -> CreateDatasetExportJobResponse)
-> Either String Int
-> Either String CreateDatasetExportJobResponse
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 CreateDatasetExportJob

instance Prelude.NFData CreateDatasetExportJob

instance Core.ToHeaders CreateDatasetExportJob where
  toHeaders :: CreateDatasetExportJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateDatasetExportJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonPersonalize.CreateDatasetExportJob" ::
                          Prelude.ByteString
                      ),
            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 CreateDatasetExportJob where
  toJSON :: CreateDatasetExportJob -> Value
toJSON CreateDatasetExportJob' {Maybe IngestionMode
Text
DatasetExportJobOutput
jobOutput :: DatasetExportJobOutput
roleArn :: Text
datasetArn :: Text
jobName :: Text
ingestionMode :: Maybe IngestionMode
$sel:jobOutput:CreateDatasetExportJob' :: CreateDatasetExportJob -> DatasetExportJobOutput
$sel:roleArn:CreateDatasetExportJob' :: CreateDatasetExportJob -> Text
$sel:datasetArn:CreateDatasetExportJob' :: CreateDatasetExportJob -> Text
$sel:jobName:CreateDatasetExportJob' :: CreateDatasetExportJob -> Text
$sel:ingestionMode:CreateDatasetExportJob' :: CreateDatasetExportJob -> Maybe IngestionMode
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ingestionMode" Text -> IngestionMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (IngestionMode -> Pair) -> Maybe IngestionMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IngestionMode
ingestionMode,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"jobName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"datasetArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
datasetArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"roleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"jobOutput" Text -> DatasetExportJobOutput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DatasetExportJobOutput
jobOutput)
          ]
      )

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

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

-- | /See:/ 'newCreateDatasetExportJobResponse' smart constructor.
data CreateDatasetExportJobResponse = CreateDatasetExportJobResponse'
  { -- | The Amazon Resource Name (ARN) of the dataset export job.
    CreateDatasetExportJobResponse -> Maybe Text
datasetExportJobArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateDatasetExportJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateDatasetExportJobResponse
-> CreateDatasetExportJobResponse -> Bool
(CreateDatasetExportJobResponse
 -> CreateDatasetExportJobResponse -> Bool)
-> (CreateDatasetExportJobResponse
    -> CreateDatasetExportJobResponse -> Bool)
-> Eq CreateDatasetExportJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDatasetExportJobResponse
-> CreateDatasetExportJobResponse -> Bool
$c/= :: CreateDatasetExportJobResponse
-> CreateDatasetExportJobResponse -> Bool
== :: CreateDatasetExportJobResponse
-> CreateDatasetExportJobResponse -> Bool
$c== :: CreateDatasetExportJobResponse
-> CreateDatasetExportJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateDatasetExportJobResponse]
ReadPrec CreateDatasetExportJobResponse
Int -> ReadS CreateDatasetExportJobResponse
ReadS [CreateDatasetExportJobResponse]
(Int -> ReadS CreateDatasetExportJobResponse)
-> ReadS [CreateDatasetExportJobResponse]
-> ReadPrec CreateDatasetExportJobResponse
-> ReadPrec [CreateDatasetExportJobResponse]
-> Read CreateDatasetExportJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDatasetExportJobResponse]
$creadListPrec :: ReadPrec [CreateDatasetExportJobResponse]
readPrec :: ReadPrec CreateDatasetExportJobResponse
$creadPrec :: ReadPrec CreateDatasetExportJobResponse
readList :: ReadS [CreateDatasetExportJobResponse]
$creadList :: ReadS [CreateDatasetExportJobResponse]
readsPrec :: Int -> ReadS CreateDatasetExportJobResponse
$creadsPrec :: Int -> ReadS CreateDatasetExportJobResponse
Prelude.Read, Int -> CreateDatasetExportJobResponse -> ShowS
[CreateDatasetExportJobResponse] -> ShowS
CreateDatasetExportJobResponse -> String
(Int -> CreateDatasetExportJobResponse -> ShowS)
-> (CreateDatasetExportJobResponse -> String)
-> ([CreateDatasetExportJobResponse] -> ShowS)
-> Show CreateDatasetExportJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDatasetExportJobResponse] -> ShowS
$cshowList :: [CreateDatasetExportJobResponse] -> ShowS
show :: CreateDatasetExportJobResponse -> String
$cshow :: CreateDatasetExportJobResponse -> String
showsPrec :: Int -> CreateDatasetExportJobResponse -> ShowS
$cshowsPrec :: Int -> CreateDatasetExportJobResponse -> ShowS
Prelude.Show, (forall x.
 CreateDatasetExportJobResponse
 -> Rep CreateDatasetExportJobResponse x)
-> (forall x.
    Rep CreateDatasetExportJobResponse x
    -> CreateDatasetExportJobResponse)
-> Generic CreateDatasetExportJobResponse
forall x.
Rep CreateDatasetExportJobResponse x
-> CreateDatasetExportJobResponse
forall x.
CreateDatasetExportJobResponse
-> Rep CreateDatasetExportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDatasetExportJobResponse x
-> CreateDatasetExportJobResponse
$cfrom :: forall x.
CreateDatasetExportJobResponse
-> Rep CreateDatasetExportJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateDatasetExportJobResponse' 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:
--
-- 'datasetExportJobArn', 'createDatasetExportJobResponse_datasetExportJobArn' - The Amazon Resource Name (ARN) of the dataset export job.
--
-- 'httpStatus', 'createDatasetExportJobResponse_httpStatus' - The response's http status code.
newCreateDatasetExportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDatasetExportJobResponse
newCreateDatasetExportJobResponse :: Int -> CreateDatasetExportJobResponse
newCreateDatasetExportJobResponse Int
pHttpStatus_ =
  CreateDatasetExportJobResponse' :: Maybe Text -> Int -> CreateDatasetExportJobResponse
CreateDatasetExportJobResponse'
    { $sel:datasetExportJobArn:CreateDatasetExportJobResponse' :: Maybe Text
datasetExportJobArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDatasetExportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance
  Prelude.NFData
    CreateDatasetExportJobResponse