{-# 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.CreateDatasetImportJob
-- 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 imports training data from your data source (an
-- Amazon S3 bucket) to an Amazon Personalize dataset. To allow Amazon
-- Personalize to import the training data, you must specify an IAM service
-- role that has permission to read from the data source, as Amazon
-- Personalize makes a copy of your data and processes it internally. For
-- information on granting access to your Amazon S3 bucket, see
-- <https://docs.aws.amazon.com/personalize/latest/dg/granting-personalize-s3-access.html Giving Amazon Personalize Access to Amazon S3 Resources>.
--
-- The dataset import job replaces any existing data in the dataset that
-- you imported in bulk.
--
-- __Status__
--
-- A dataset import job can be in one of the following states:
--
-- -   CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
--
-- To get the status of the import job, call DescribeDatasetImportJob,
-- providing the Amazon Resource Name (ARN) of the dataset import job. The
-- dataset import 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.
--
-- Importing takes time. You must wait until the status shows as ACTIVE
-- before training a model using the dataset.
--
-- __Related APIs__
--
-- -   ListDatasetImportJobs
--
-- -   DescribeDatasetImportJob
module Amazonka.Personalize.CreateDatasetImportJob
  ( -- * Creating a Request
    CreateDatasetImportJob (..),
    newCreateDatasetImportJob,

    -- * Request Lenses
    createDatasetImportJob_jobName,
    createDatasetImportJob_datasetArn,
    createDatasetImportJob_dataSource,
    createDatasetImportJob_roleArn,

    -- * Destructuring the Response
    CreateDatasetImportJobResponse (..),
    newCreateDatasetImportJobResponse,

    -- * Response Lenses
    createDatasetImportJobResponse_datasetImportJobArn,
    createDatasetImportJobResponse_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:/ 'newCreateDatasetImportJob' smart constructor.
data CreateDatasetImportJob = CreateDatasetImportJob'
  { -- | The name for the dataset import job.
    CreateDatasetImportJob -> Text
jobName :: Prelude.Text,
    -- | The ARN of the dataset that receives the imported data.
    CreateDatasetImportJob -> Text
datasetArn :: Prelude.Text,
    -- | The Amazon S3 bucket that contains the training data to import.
    CreateDatasetImportJob -> DataSource
dataSource :: DataSource,
    -- | The ARN of the IAM role that has permissions to read from the Amazon S3
    -- data source.
    CreateDatasetImportJob -> Text
roleArn :: Prelude.Text
  }
  deriving (CreateDatasetImportJob -> CreateDatasetImportJob -> Bool
(CreateDatasetImportJob -> CreateDatasetImportJob -> Bool)
-> (CreateDatasetImportJob -> CreateDatasetImportJob -> Bool)
-> Eq CreateDatasetImportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDatasetImportJob -> CreateDatasetImportJob -> Bool
$c/= :: CreateDatasetImportJob -> CreateDatasetImportJob -> Bool
== :: CreateDatasetImportJob -> CreateDatasetImportJob -> Bool
$c== :: CreateDatasetImportJob -> CreateDatasetImportJob -> Bool
Prelude.Eq, ReadPrec [CreateDatasetImportJob]
ReadPrec CreateDatasetImportJob
Int -> ReadS CreateDatasetImportJob
ReadS [CreateDatasetImportJob]
(Int -> ReadS CreateDatasetImportJob)
-> ReadS [CreateDatasetImportJob]
-> ReadPrec CreateDatasetImportJob
-> ReadPrec [CreateDatasetImportJob]
-> Read CreateDatasetImportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDatasetImportJob]
$creadListPrec :: ReadPrec [CreateDatasetImportJob]
readPrec :: ReadPrec CreateDatasetImportJob
$creadPrec :: ReadPrec CreateDatasetImportJob
readList :: ReadS [CreateDatasetImportJob]
$creadList :: ReadS [CreateDatasetImportJob]
readsPrec :: Int -> ReadS CreateDatasetImportJob
$creadsPrec :: Int -> ReadS CreateDatasetImportJob
Prelude.Read, Int -> CreateDatasetImportJob -> ShowS
[CreateDatasetImportJob] -> ShowS
CreateDatasetImportJob -> String
(Int -> CreateDatasetImportJob -> ShowS)
-> (CreateDatasetImportJob -> String)
-> ([CreateDatasetImportJob] -> ShowS)
-> Show CreateDatasetImportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDatasetImportJob] -> ShowS
$cshowList :: [CreateDatasetImportJob] -> ShowS
show :: CreateDatasetImportJob -> String
$cshow :: CreateDatasetImportJob -> String
showsPrec :: Int -> CreateDatasetImportJob -> ShowS
$cshowsPrec :: Int -> CreateDatasetImportJob -> ShowS
Prelude.Show, (forall x. CreateDatasetImportJob -> Rep CreateDatasetImportJob x)
-> (forall x.
    Rep CreateDatasetImportJob x -> CreateDatasetImportJob)
-> Generic CreateDatasetImportJob
forall x. Rep CreateDatasetImportJob x -> CreateDatasetImportJob
forall x. CreateDatasetImportJob -> Rep CreateDatasetImportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDatasetImportJob x -> CreateDatasetImportJob
$cfrom :: forall x. CreateDatasetImportJob -> Rep CreateDatasetImportJob x
Prelude.Generic)

-- |
-- Create a value of 'CreateDatasetImportJob' 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:
--
-- 'jobName', 'createDatasetImportJob_jobName' - The name for the dataset import job.
--
-- 'datasetArn', 'createDatasetImportJob_datasetArn' - The ARN of the dataset that receives the imported data.
--
-- 'dataSource', 'createDatasetImportJob_dataSource' - The Amazon S3 bucket that contains the training data to import.
--
-- 'roleArn', 'createDatasetImportJob_roleArn' - The ARN of the IAM role that has permissions to read from the Amazon S3
-- data source.
newCreateDatasetImportJob ::
  -- | 'jobName'
  Prelude.Text ->
  -- | 'datasetArn'
  Prelude.Text ->
  -- | 'dataSource'
  DataSource ->
  -- | 'roleArn'
  Prelude.Text ->
  CreateDatasetImportJob
newCreateDatasetImportJob :: Text -> Text -> DataSource -> Text -> CreateDatasetImportJob
newCreateDatasetImportJob
  Text
pJobName_
  Text
pDatasetArn_
  DataSource
pDataSource_
  Text
pRoleArn_ =
    CreateDatasetImportJob' :: Text -> Text -> DataSource -> Text -> CreateDatasetImportJob
CreateDatasetImportJob'
      { $sel:jobName:CreateDatasetImportJob' :: Text
jobName = Text
pJobName_,
        $sel:datasetArn:CreateDatasetImportJob' :: Text
datasetArn = Text
pDatasetArn_,
        $sel:dataSource:CreateDatasetImportJob' :: DataSource
dataSource = DataSource
pDataSource_,
        $sel:roleArn:CreateDatasetImportJob' :: Text
roleArn = Text
pRoleArn_
      }

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

-- | The ARN of the dataset that receives the imported data.
createDatasetImportJob_datasetArn :: Lens.Lens' CreateDatasetImportJob Prelude.Text
createDatasetImportJob_datasetArn :: (Text -> f Text)
-> CreateDatasetImportJob -> f CreateDatasetImportJob
createDatasetImportJob_datasetArn = (CreateDatasetImportJob -> Text)
-> (CreateDatasetImportJob -> Text -> CreateDatasetImportJob)
-> Lens CreateDatasetImportJob CreateDatasetImportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetImportJob' {Text
datasetArn :: Text
$sel:datasetArn:CreateDatasetImportJob' :: CreateDatasetImportJob -> Text
datasetArn} -> Text
datasetArn) (\s :: CreateDatasetImportJob
s@CreateDatasetImportJob' {} Text
a -> CreateDatasetImportJob
s {$sel:datasetArn:CreateDatasetImportJob' :: Text
datasetArn = Text
a} :: CreateDatasetImportJob)

-- | The Amazon S3 bucket that contains the training data to import.
createDatasetImportJob_dataSource :: Lens.Lens' CreateDatasetImportJob DataSource
createDatasetImportJob_dataSource :: (DataSource -> f DataSource)
-> CreateDatasetImportJob -> f CreateDatasetImportJob
createDatasetImportJob_dataSource = (CreateDatasetImportJob -> DataSource)
-> (CreateDatasetImportJob -> DataSource -> CreateDatasetImportJob)
-> Lens
     CreateDatasetImportJob CreateDatasetImportJob DataSource DataSource
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetImportJob' {DataSource
dataSource :: DataSource
$sel:dataSource:CreateDatasetImportJob' :: CreateDatasetImportJob -> DataSource
dataSource} -> DataSource
dataSource) (\s :: CreateDatasetImportJob
s@CreateDatasetImportJob' {} DataSource
a -> CreateDatasetImportJob
s {$sel:dataSource:CreateDatasetImportJob' :: DataSource
dataSource = DataSource
a} :: CreateDatasetImportJob)

-- | The ARN of the IAM role that has permissions to read from the Amazon S3
-- data source.
createDatasetImportJob_roleArn :: Lens.Lens' CreateDatasetImportJob Prelude.Text
createDatasetImportJob_roleArn :: (Text -> f Text)
-> CreateDatasetImportJob -> f CreateDatasetImportJob
createDatasetImportJob_roleArn = (CreateDatasetImportJob -> Text)
-> (CreateDatasetImportJob -> Text -> CreateDatasetImportJob)
-> Lens CreateDatasetImportJob CreateDatasetImportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetImportJob' {Text
roleArn :: Text
$sel:roleArn:CreateDatasetImportJob' :: CreateDatasetImportJob -> Text
roleArn} -> Text
roleArn) (\s :: CreateDatasetImportJob
s@CreateDatasetImportJob' {} Text
a -> CreateDatasetImportJob
s {$sel:roleArn:CreateDatasetImportJob' :: Text
roleArn = Text
a} :: CreateDatasetImportJob)

instance Core.AWSRequest CreateDatasetImportJob where
  type
    AWSResponse CreateDatasetImportJob =
      CreateDatasetImportJobResponse
  request :: CreateDatasetImportJob -> Request CreateDatasetImportJob
request = Service -> CreateDatasetImportJob -> Request CreateDatasetImportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateDatasetImportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDatasetImportJob)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateDatasetImportJob))
-> Logger
-> Service
-> Proxy CreateDatasetImportJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDatasetImportJob)))
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 -> CreateDatasetImportJobResponse
CreateDatasetImportJobResponse'
            (Maybe Text -> Int -> CreateDatasetImportJobResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateDatasetImportJobResponse)
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
"datasetImportJobArn")
            Either String (Int -> CreateDatasetImportJobResponse)
-> Either String Int
-> Either String CreateDatasetImportJobResponse
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 CreateDatasetImportJob

instance Prelude.NFData CreateDatasetImportJob

instance Core.ToHeaders CreateDatasetImportJob where
  toHeaders :: CreateDatasetImportJob -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateDatasetImportJob -> 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.CreateDatasetImportJob" ::
                          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 CreateDatasetImportJob where
  toJSON :: CreateDatasetImportJob -> Value
toJSON CreateDatasetImportJob' {Text
DataSource
roleArn :: Text
dataSource :: DataSource
datasetArn :: Text
jobName :: Text
$sel:roleArn:CreateDatasetImportJob' :: CreateDatasetImportJob -> Text
$sel:dataSource:CreateDatasetImportJob' :: CreateDatasetImportJob -> DataSource
$sel:datasetArn:CreateDatasetImportJob' :: CreateDatasetImportJob -> Text
$sel:jobName:CreateDatasetImportJob' :: CreateDatasetImportJob -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ 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
"dataSource" Text -> DataSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DataSource
dataSource),
            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)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateDatasetImportJobResponse' 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:
--
-- 'datasetImportJobArn', 'createDatasetImportJobResponse_datasetImportJobArn' - The ARN of the dataset import job.
--
-- 'httpStatus', 'createDatasetImportJobResponse_httpStatus' - The response's http status code.
newCreateDatasetImportJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDatasetImportJobResponse
newCreateDatasetImportJobResponse :: Int -> CreateDatasetImportJobResponse
newCreateDatasetImportJobResponse Int
pHttpStatus_ =
  CreateDatasetImportJobResponse' :: Maybe Text -> Int -> CreateDatasetImportJobResponse
CreateDatasetImportJobResponse'
    { $sel:datasetImportJobArn:CreateDatasetImportJobResponse' :: Maybe Text
datasetImportJobArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDatasetImportJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the dataset import job.
createDatasetImportJobResponse_datasetImportJobArn :: Lens.Lens' CreateDatasetImportJobResponse (Prelude.Maybe Prelude.Text)
createDatasetImportJobResponse_datasetImportJobArn :: (Maybe Text -> f (Maybe Text))
-> CreateDatasetImportJobResponse
-> f CreateDatasetImportJobResponse
createDatasetImportJobResponse_datasetImportJobArn = (CreateDatasetImportJobResponse -> Maybe Text)
-> (CreateDatasetImportJobResponse
    -> Maybe Text -> CreateDatasetImportJobResponse)
-> Lens
     CreateDatasetImportJobResponse
     CreateDatasetImportJobResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDatasetImportJobResponse' {Maybe Text
datasetImportJobArn :: Maybe Text
$sel:datasetImportJobArn:CreateDatasetImportJobResponse' :: CreateDatasetImportJobResponse -> Maybe Text
datasetImportJobArn} -> Maybe Text
datasetImportJobArn) (\s :: CreateDatasetImportJobResponse
s@CreateDatasetImportJobResponse' {} Maybe Text
a -> CreateDatasetImportJobResponse
s {$sel:datasetImportJobArn:CreateDatasetImportJobResponse' :: Maybe Text
datasetImportJobArn = Maybe Text
a} :: CreateDatasetImportJobResponse)

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

instance
  Prelude.NFData
    CreateDatasetImportJobResponse