{-# 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.Translate.StartTextTranslationJob
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Starts an asynchronous batch translation job. Use batch translation jobs
-- to translate large volumes of text across multiple documents at once.
-- For batch translation, you can input documents with different source
-- languages (specify @auto@ as the source language). You can specify one
-- or more target languages. Batch translation translates each input
-- document into each of the target languages. For more information, see
-- <https://docs.aws.amazon.com/translate/latest/dg/async.html Asynchronous batch processing>.
--
-- Batch translation jobs can be described with the
-- DescribeTextTranslationJob operation, listed with the
-- ListTextTranslationJobs operation, and stopped with the
-- StopTextTranslationJob operation.
module Amazonka.Translate.StartTextTranslationJob
  ( -- * Creating a Request
    StartTextTranslationJob (..),
    newStartTextTranslationJob,

    -- * Request Lenses
    startTextTranslationJob_jobName,
    startTextTranslationJob_parallelDataNames,
    startTextTranslationJob_settings,
    startTextTranslationJob_terminologyNames,
    startTextTranslationJob_inputDataConfig,
    startTextTranslationJob_outputDataConfig,
    startTextTranslationJob_dataAccessRoleArn,
    startTextTranslationJob_sourceLanguageCode,
    startTextTranslationJob_targetLanguageCodes,
    startTextTranslationJob_clientToken,

    -- * Destructuring the Response
    StartTextTranslationJobResponse (..),
    newStartTextTranslationJobResponse,

    -- * Response Lenses
    startTextTranslationJobResponse_jobId,
    startTextTranslationJobResponse_jobStatus,
    startTextTranslationJobResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Translate.Types

-- | /See:/ 'newStartTextTranslationJob' smart constructor.
data StartTextTranslationJob = StartTextTranslationJob'
  { -- | The name of the batch translation job to be performed.
    StartTextTranslationJob -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | The name of a parallel data resource to add to the translation job. This
    -- resource consists of examples that show how you want segments of text to
    -- be translated. If you specify multiple target languages for the job, the
    -- parallel data file must include translations for all the target
    -- languages.
    --
    -- When you add parallel data to a translation job, you create an /Active
    -- Custom Translation/ job.
    --
    -- This parameter accepts only one parallel data resource.
    --
    -- Active Custom Translation jobs are priced at a higher rate than other
    -- jobs that don\'t use parallel data. For more information, see
    -- <http://aws.amazon.com/translate/pricing/ Amazon Translate pricing>.
    --
    -- For a list of available parallel data resources, use the
    -- ListParallelData operation.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html Customizing your translations with parallel data>.
    StartTextTranslationJob -> Maybe [Text]
parallelDataNames :: Prelude.Maybe [Prelude.Text],
    -- | Settings to configure your translation output, including the option to
    -- set the formality level of the output text and the option to mask
    -- profane words and phrases.
    StartTextTranslationJob -> Maybe TranslationSettings
settings :: Prelude.Maybe TranslationSettings,
    -- | The name of a custom terminology resource to add to the translation job.
    -- This resource lists examples source terms and the desired translation
    -- for each term.
    --
    -- This parameter accepts only one custom terminology resource.
    --
    -- If you specify multiple target languages for the job, translate uses the
    -- designated terminology for each requested target language that has an
    -- entry for the source term in the terminology file.
    --
    -- For a list of available custom terminology resources, use the
    -- ListTerminologies operation.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html Custom terminology>.
    StartTextTranslationJob -> Maybe [Text]
terminologyNames :: Prelude.Maybe [Prelude.Text],
    -- | Specifies the format and location of the input documents for the
    -- translation job.
    StartTextTranslationJob -> InputDataConfig
inputDataConfig :: InputDataConfig,
    -- | Specifies the S3 folder to which your job output will be saved.
    StartTextTranslationJob -> OutputDataConfig
outputDataConfig :: OutputDataConfig,
    -- | The Amazon Resource Name (ARN) of an AWS Identity Access and Management
    -- (IAM) role that grants Amazon Translate read access to your input data.
    -- For more information, see
    -- <https://docs.aws.amazon.com/translate/latest/dg/identity-and-access-management.html Identity and access management>
    -- .
    StartTextTranslationJob -> Text
dataAccessRoleArn :: Prelude.Text,
    -- | The language code of the input language. Specify the language if all
    -- input documents share the same language. If you don\'t know the language
    -- of the source files, or your input documents contains different source
    -- languages, select @auto@. Amazon Translate auto detects the source
    -- language for each input document. For a list of supported language
    -- codes, see
    -- <https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html Supported languages>.
    StartTextTranslationJob -> Text
sourceLanguageCode :: Prelude.Text,
    -- | The target languages of the translation job. Enter up to 10 language
    -- codes. Each input file is translated into each target language.
    --
    -- Each language code is 2 or 5 characters long. For a list of language
    -- codes, see
    -- <https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html Supported languages>.
    StartTextTranslationJob -> NonEmpty Text
targetLanguageCodes :: Prelude.NonEmpty Prelude.Text,
    -- | A unique identifier for the request. This token is generated for you
    -- when using the Amazon Translate SDK.
    StartTextTranslationJob -> Text
clientToken :: Prelude.Text
  }
  deriving (StartTextTranslationJob -> StartTextTranslationJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartTextTranslationJob -> StartTextTranslationJob -> Bool
$c/= :: StartTextTranslationJob -> StartTextTranslationJob -> Bool
== :: StartTextTranslationJob -> StartTextTranslationJob -> Bool
$c== :: StartTextTranslationJob -> StartTextTranslationJob -> Bool
Prelude.Eq, ReadPrec [StartTextTranslationJob]
ReadPrec StartTextTranslationJob
Int -> ReadS StartTextTranslationJob
ReadS [StartTextTranslationJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartTextTranslationJob]
$creadListPrec :: ReadPrec [StartTextTranslationJob]
readPrec :: ReadPrec StartTextTranslationJob
$creadPrec :: ReadPrec StartTextTranslationJob
readList :: ReadS [StartTextTranslationJob]
$creadList :: ReadS [StartTextTranslationJob]
readsPrec :: Int -> ReadS StartTextTranslationJob
$creadsPrec :: Int -> ReadS StartTextTranslationJob
Prelude.Read, Int -> StartTextTranslationJob -> ShowS
[StartTextTranslationJob] -> ShowS
StartTextTranslationJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartTextTranslationJob] -> ShowS
$cshowList :: [StartTextTranslationJob] -> ShowS
show :: StartTextTranslationJob -> String
$cshow :: StartTextTranslationJob -> String
showsPrec :: Int -> StartTextTranslationJob -> ShowS
$cshowsPrec :: Int -> StartTextTranslationJob -> ShowS
Prelude.Show, forall x. Rep StartTextTranslationJob x -> StartTextTranslationJob
forall x. StartTextTranslationJob -> Rep StartTextTranslationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartTextTranslationJob x -> StartTextTranslationJob
$cfrom :: forall x. StartTextTranslationJob -> Rep StartTextTranslationJob x
Prelude.Generic)

-- |
-- Create a value of 'StartTextTranslationJob' 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', 'startTextTranslationJob_jobName' - The name of the batch translation job to be performed.
--
-- 'parallelDataNames', 'startTextTranslationJob_parallelDataNames' - The name of a parallel data resource to add to the translation job. This
-- resource consists of examples that show how you want segments of text to
-- be translated. If you specify multiple target languages for the job, the
-- parallel data file must include translations for all the target
-- languages.
--
-- When you add parallel data to a translation job, you create an /Active
-- Custom Translation/ job.
--
-- This parameter accepts only one parallel data resource.
--
-- Active Custom Translation jobs are priced at a higher rate than other
-- jobs that don\'t use parallel data. For more information, see
-- <http://aws.amazon.com/translate/pricing/ Amazon Translate pricing>.
--
-- For a list of available parallel data resources, use the
-- ListParallelData operation.
--
-- For more information, see
-- <https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html Customizing your translations with parallel data>.
--
-- 'settings', 'startTextTranslationJob_settings' - Settings to configure your translation output, including the option to
-- set the formality level of the output text and the option to mask
-- profane words and phrases.
--
-- 'terminologyNames', 'startTextTranslationJob_terminologyNames' - The name of a custom terminology resource to add to the translation job.
-- This resource lists examples source terms and the desired translation
-- for each term.
--
-- This parameter accepts only one custom terminology resource.
--
-- If you specify multiple target languages for the job, translate uses the
-- designated terminology for each requested target language that has an
-- entry for the source term in the terminology file.
--
-- For a list of available custom terminology resources, use the
-- ListTerminologies operation.
--
-- For more information, see
-- <https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html Custom terminology>.
--
-- 'inputDataConfig', 'startTextTranslationJob_inputDataConfig' - Specifies the format and location of the input documents for the
-- translation job.
--
-- 'outputDataConfig', 'startTextTranslationJob_outputDataConfig' - Specifies the S3 folder to which your job output will be saved.
--
-- 'dataAccessRoleArn', 'startTextTranslationJob_dataAccessRoleArn' - The Amazon Resource Name (ARN) of an AWS Identity Access and Management
-- (IAM) role that grants Amazon Translate read access to your input data.
-- For more information, see
-- <https://docs.aws.amazon.com/translate/latest/dg/identity-and-access-management.html Identity and access management>
-- .
--
-- 'sourceLanguageCode', 'startTextTranslationJob_sourceLanguageCode' - The language code of the input language. Specify the language if all
-- input documents share the same language. If you don\'t know the language
-- of the source files, or your input documents contains different source
-- languages, select @auto@. Amazon Translate auto detects the source
-- language for each input document. For a list of supported language
-- codes, see
-- <https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html Supported languages>.
--
-- 'targetLanguageCodes', 'startTextTranslationJob_targetLanguageCodes' - The target languages of the translation job. Enter up to 10 language
-- codes. Each input file is translated into each target language.
--
-- Each language code is 2 or 5 characters long. For a list of language
-- codes, see
-- <https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html Supported languages>.
--
-- 'clientToken', 'startTextTranslationJob_clientToken' - A unique identifier for the request. This token is generated for you
-- when using the Amazon Translate SDK.
newStartTextTranslationJob ::
  -- | 'inputDataConfig'
  InputDataConfig ->
  -- | 'outputDataConfig'
  OutputDataConfig ->
  -- | 'dataAccessRoleArn'
  Prelude.Text ->
  -- | 'sourceLanguageCode'
  Prelude.Text ->
  -- | 'targetLanguageCodes'
  Prelude.NonEmpty Prelude.Text ->
  -- | 'clientToken'
  Prelude.Text ->
  StartTextTranslationJob
newStartTextTranslationJob :: InputDataConfig
-> OutputDataConfig
-> Text
-> Text
-> NonEmpty Text
-> Text
-> StartTextTranslationJob
newStartTextTranslationJob
  InputDataConfig
pInputDataConfig_
  OutputDataConfig
pOutputDataConfig_
  Text
pDataAccessRoleArn_
  Text
pSourceLanguageCode_
  NonEmpty Text
pTargetLanguageCodes_
  Text
pClientToken_ =
    StartTextTranslationJob'
      { $sel:jobName:StartTextTranslationJob' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
        $sel:parallelDataNames:StartTextTranslationJob' :: Maybe [Text]
parallelDataNames = forall a. Maybe a
Prelude.Nothing,
        $sel:settings:StartTextTranslationJob' :: Maybe TranslationSettings
settings = forall a. Maybe a
Prelude.Nothing,
        $sel:terminologyNames:StartTextTranslationJob' :: Maybe [Text]
terminologyNames = forall a. Maybe a
Prelude.Nothing,
        $sel:inputDataConfig:StartTextTranslationJob' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
        $sel:outputDataConfig:StartTextTranslationJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
pOutputDataConfig_,
        $sel:dataAccessRoleArn:StartTextTranslationJob' :: Text
dataAccessRoleArn = Text
pDataAccessRoleArn_,
        $sel:sourceLanguageCode:StartTextTranslationJob' :: Text
sourceLanguageCode = Text
pSourceLanguageCode_,
        $sel:targetLanguageCodes:StartTextTranslationJob' :: NonEmpty Text
targetLanguageCodes =
          forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pTargetLanguageCodes_,
        $sel:clientToken:StartTextTranslationJob' :: Text
clientToken = Text
pClientToken_
      }

-- | The name of the batch translation job to be performed.
startTextTranslationJob_jobName :: Lens.Lens' StartTextTranslationJob (Prelude.Maybe Prelude.Text)
startTextTranslationJob_jobName :: Lens' StartTextTranslationJob (Maybe Text)
startTextTranslationJob_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {Maybe Text
jobName :: Maybe Text
$sel:jobName:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} Maybe Text
a -> StartTextTranslationJob
s {$sel:jobName:StartTextTranslationJob' :: Maybe Text
jobName = Maybe Text
a} :: StartTextTranslationJob)

-- | The name of a parallel data resource to add to the translation job. This
-- resource consists of examples that show how you want segments of text to
-- be translated. If you specify multiple target languages for the job, the
-- parallel data file must include translations for all the target
-- languages.
--
-- When you add parallel data to a translation job, you create an /Active
-- Custom Translation/ job.
--
-- This parameter accepts only one parallel data resource.
--
-- Active Custom Translation jobs are priced at a higher rate than other
-- jobs that don\'t use parallel data. For more information, see
-- <http://aws.amazon.com/translate/pricing/ Amazon Translate pricing>.
--
-- For a list of available parallel data resources, use the
-- ListParallelData operation.
--
-- For more information, see
-- <https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html Customizing your translations with parallel data>.
startTextTranslationJob_parallelDataNames :: Lens.Lens' StartTextTranslationJob (Prelude.Maybe [Prelude.Text])
startTextTranslationJob_parallelDataNames :: Lens' StartTextTranslationJob (Maybe [Text])
startTextTranslationJob_parallelDataNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {Maybe [Text]
parallelDataNames :: Maybe [Text]
$sel:parallelDataNames:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe [Text]
parallelDataNames} -> Maybe [Text]
parallelDataNames) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} Maybe [Text]
a -> StartTextTranslationJob
s {$sel:parallelDataNames:StartTextTranslationJob' :: Maybe [Text]
parallelDataNames = Maybe [Text]
a} :: StartTextTranslationJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Settings to configure your translation output, including the option to
-- set the formality level of the output text and the option to mask
-- profane words and phrases.
startTextTranslationJob_settings :: Lens.Lens' StartTextTranslationJob (Prelude.Maybe TranslationSettings)
startTextTranslationJob_settings :: Lens' StartTextTranslationJob (Maybe TranslationSettings)
startTextTranslationJob_settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {Maybe TranslationSettings
settings :: Maybe TranslationSettings
$sel:settings:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe TranslationSettings
settings} -> Maybe TranslationSettings
settings) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} Maybe TranslationSettings
a -> StartTextTranslationJob
s {$sel:settings:StartTextTranslationJob' :: Maybe TranslationSettings
settings = Maybe TranslationSettings
a} :: StartTextTranslationJob)

-- | The name of a custom terminology resource to add to the translation job.
-- This resource lists examples source terms and the desired translation
-- for each term.
--
-- This parameter accepts only one custom terminology resource.
--
-- If you specify multiple target languages for the job, translate uses the
-- designated terminology for each requested target language that has an
-- entry for the source term in the terminology file.
--
-- For a list of available custom terminology resources, use the
-- ListTerminologies operation.
--
-- For more information, see
-- <https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html Custom terminology>.
startTextTranslationJob_terminologyNames :: Lens.Lens' StartTextTranslationJob (Prelude.Maybe [Prelude.Text])
startTextTranslationJob_terminologyNames :: Lens' StartTextTranslationJob (Maybe [Text])
startTextTranslationJob_terminologyNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {Maybe [Text]
terminologyNames :: Maybe [Text]
$sel:terminologyNames:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe [Text]
terminologyNames} -> Maybe [Text]
terminologyNames) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} Maybe [Text]
a -> StartTextTranslationJob
s {$sel:terminologyNames:StartTextTranslationJob' :: Maybe [Text]
terminologyNames = Maybe [Text]
a} :: StartTextTranslationJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the format and location of the input documents for the
-- translation job.
startTextTranslationJob_inputDataConfig :: Lens.Lens' StartTextTranslationJob InputDataConfig
startTextTranslationJob_inputDataConfig :: Lens' StartTextTranslationJob InputDataConfig
startTextTranslationJob_inputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:StartTextTranslationJob' :: StartTextTranslationJob -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} InputDataConfig
a -> StartTextTranslationJob
s {$sel:inputDataConfig:StartTextTranslationJob' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: StartTextTranslationJob)

-- | Specifies the S3 folder to which your job output will be saved.
startTextTranslationJob_outputDataConfig :: Lens.Lens' StartTextTranslationJob OutputDataConfig
startTextTranslationJob_outputDataConfig :: Lens' StartTextTranslationJob OutputDataConfig
startTextTranslationJob_outputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {OutputDataConfig
outputDataConfig :: OutputDataConfig
$sel:outputDataConfig:StartTextTranslationJob' :: StartTextTranslationJob -> OutputDataConfig
outputDataConfig} -> OutputDataConfig
outputDataConfig) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} OutputDataConfig
a -> StartTextTranslationJob
s {$sel:outputDataConfig:StartTextTranslationJob' :: OutputDataConfig
outputDataConfig = OutputDataConfig
a} :: StartTextTranslationJob)

-- | The Amazon Resource Name (ARN) of an AWS Identity Access and Management
-- (IAM) role that grants Amazon Translate read access to your input data.
-- For more information, see
-- <https://docs.aws.amazon.com/translate/latest/dg/identity-and-access-management.html Identity and access management>
-- .
startTextTranslationJob_dataAccessRoleArn :: Lens.Lens' StartTextTranslationJob Prelude.Text
startTextTranslationJob_dataAccessRoleArn :: Lens' StartTextTranslationJob Text
startTextTranslationJob_dataAccessRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {Text
dataAccessRoleArn :: Text
$sel:dataAccessRoleArn:StartTextTranslationJob' :: StartTextTranslationJob -> Text
dataAccessRoleArn} -> Text
dataAccessRoleArn) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} Text
a -> StartTextTranslationJob
s {$sel:dataAccessRoleArn:StartTextTranslationJob' :: Text
dataAccessRoleArn = Text
a} :: StartTextTranslationJob)

-- | The language code of the input language. Specify the language if all
-- input documents share the same language. If you don\'t know the language
-- of the source files, or your input documents contains different source
-- languages, select @auto@. Amazon Translate auto detects the source
-- language for each input document. For a list of supported language
-- codes, see
-- <https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html Supported languages>.
startTextTranslationJob_sourceLanguageCode :: Lens.Lens' StartTextTranslationJob Prelude.Text
startTextTranslationJob_sourceLanguageCode :: Lens' StartTextTranslationJob Text
startTextTranslationJob_sourceLanguageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {Text
sourceLanguageCode :: Text
$sel:sourceLanguageCode:StartTextTranslationJob' :: StartTextTranslationJob -> Text
sourceLanguageCode} -> Text
sourceLanguageCode) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} Text
a -> StartTextTranslationJob
s {$sel:sourceLanguageCode:StartTextTranslationJob' :: Text
sourceLanguageCode = Text
a} :: StartTextTranslationJob)

-- | The target languages of the translation job. Enter up to 10 language
-- codes. Each input file is translated into each target language.
--
-- Each language code is 2 or 5 characters long. For a list of language
-- codes, see
-- <https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html Supported languages>.
startTextTranslationJob_targetLanguageCodes :: Lens.Lens' StartTextTranslationJob (Prelude.NonEmpty Prelude.Text)
startTextTranslationJob_targetLanguageCodes :: Lens' StartTextTranslationJob (NonEmpty Text)
startTextTranslationJob_targetLanguageCodes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {NonEmpty Text
targetLanguageCodes :: NonEmpty Text
$sel:targetLanguageCodes:StartTextTranslationJob' :: StartTextTranslationJob -> NonEmpty Text
targetLanguageCodes} -> NonEmpty Text
targetLanguageCodes) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} NonEmpty Text
a -> StartTextTranslationJob
s {$sel:targetLanguageCodes:StartTextTranslationJob' :: NonEmpty Text
targetLanguageCodes = NonEmpty Text
a} :: StartTextTranslationJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique identifier for the request. This token is generated for you
-- when using the Amazon Translate SDK.
startTextTranslationJob_clientToken :: Lens.Lens' StartTextTranslationJob Prelude.Text
startTextTranslationJob_clientToken :: Lens' StartTextTranslationJob Text
startTextTranslationJob_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJob' {Text
clientToken :: Text
$sel:clientToken:StartTextTranslationJob' :: StartTextTranslationJob -> Text
clientToken} -> Text
clientToken) (\s :: StartTextTranslationJob
s@StartTextTranslationJob' {} Text
a -> StartTextTranslationJob
s {$sel:clientToken:StartTextTranslationJob' :: Text
clientToken = Text
a} :: StartTextTranslationJob)

instance Core.AWSRequest StartTextTranslationJob where
  type
    AWSResponse StartTextTranslationJob =
      StartTextTranslationJobResponse
  request :: (Service -> Service)
-> StartTextTranslationJob -> Request StartTextTranslationJob
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StartTextTranslationJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse StartTextTranslationJob)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe JobStatus -> Int -> StartTextTranslationJobResponse
StartTextTranslationJobResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"JobStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable StartTextTranslationJob where
  hashWithSalt :: Int -> StartTextTranslationJob -> Int
hashWithSalt Int
_salt StartTextTranslationJob' {Maybe [Text]
Maybe Text
Maybe TranslationSettings
NonEmpty Text
Text
InputDataConfig
OutputDataConfig
clientToken :: Text
targetLanguageCodes :: NonEmpty Text
sourceLanguageCode :: Text
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
terminologyNames :: Maybe [Text]
settings :: Maybe TranslationSettings
parallelDataNames :: Maybe [Text]
jobName :: Maybe Text
$sel:clientToken:StartTextTranslationJob' :: StartTextTranslationJob -> Text
$sel:targetLanguageCodes:StartTextTranslationJob' :: StartTextTranslationJob -> NonEmpty Text
$sel:sourceLanguageCode:StartTextTranslationJob' :: StartTextTranslationJob -> Text
$sel:dataAccessRoleArn:StartTextTranslationJob' :: StartTextTranslationJob -> Text
$sel:outputDataConfig:StartTextTranslationJob' :: StartTextTranslationJob -> OutputDataConfig
$sel:inputDataConfig:StartTextTranslationJob' :: StartTextTranslationJob -> InputDataConfig
$sel:terminologyNames:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe [Text]
$sel:settings:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe TranslationSettings
$sel:parallelDataNames:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe [Text]
$sel:jobName:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
parallelDataNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TranslationSettings
settings
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
terminologyNames
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InputDataConfig
inputDataConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` OutputDataConfig
outputDataConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dataAccessRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceLanguageCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty Text
targetLanguageCodes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientToken

instance Prelude.NFData StartTextTranslationJob where
  rnf :: StartTextTranslationJob -> ()
rnf StartTextTranslationJob' {Maybe [Text]
Maybe Text
Maybe TranslationSettings
NonEmpty Text
Text
InputDataConfig
OutputDataConfig
clientToken :: Text
targetLanguageCodes :: NonEmpty Text
sourceLanguageCode :: Text
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
terminologyNames :: Maybe [Text]
settings :: Maybe TranslationSettings
parallelDataNames :: Maybe [Text]
jobName :: Maybe Text
$sel:clientToken:StartTextTranslationJob' :: StartTextTranslationJob -> Text
$sel:targetLanguageCodes:StartTextTranslationJob' :: StartTextTranslationJob -> NonEmpty Text
$sel:sourceLanguageCode:StartTextTranslationJob' :: StartTextTranslationJob -> Text
$sel:dataAccessRoleArn:StartTextTranslationJob' :: StartTextTranslationJob -> Text
$sel:outputDataConfig:StartTextTranslationJob' :: StartTextTranslationJob -> OutputDataConfig
$sel:inputDataConfig:StartTextTranslationJob' :: StartTextTranslationJob -> InputDataConfig
$sel:terminologyNames:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe [Text]
$sel:settings:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe TranslationSettings
$sel:parallelDataNames:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe [Text]
$sel:jobName:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
parallelDataNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TranslationSettings
settings
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
terminologyNames
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf InputDataConfig
inputDataConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf OutputDataConfig
outputDataConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataAccessRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceLanguageCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty Text
targetLanguageCodes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientToken

instance Data.ToHeaders StartTextTranslationJob where
  toHeaders :: StartTextTranslationJob -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSShineFrontendService_20170701.StartTextTranslationJob" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON StartTextTranslationJob where
  toJSON :: StartTextTranslationJob -> Value
toJSON StartTextTranslationJob' {Maybe [Text]
Maybe Text
Maybe TranslationSettings
NonEmpty Text
Text
InputDataConfig
OutputDataConfig
clientToken :: Text
targetLanguageCodes :: NonEmpty Text
sourceLanguageCode :: Text
dataAccessRoleArn :: Text
outputDataConfig :: OutputDataConfig
inputDataConfig :: InputDataConfig
terminologyNames :: Maybe [Text]
settings :: Maybe TranslationSettings
parallelDataNames :: Maybe [Text]
jobName :: Maybe Text
$sel:clientToken:StartTextTranslationJob' :: StartTextTranslationJob -> Text
$sel:targetLanguageCodes:StartTextTranslationJob' :: StartTextTranslationJob -> NonEmpty Text
$sel:sourceLanguageCode:StartTextTranslationJob' :: StartTextTranslationJob -> Text
$sel:dataAccessRoleArn:StartTextTranslationJob' :: StartTextTranslationJob -> Text
$sel:outputDataConfig:StartTextTranslationJob' :: StartTextTranslationJob -> OutputDataConfig
$sel:inputDataConfig:StartTextTranslationJob' :: StartTextTranslationJob -> InputDataConfig
$sel:terminologyNames:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe [Text]
$sel:settings:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe TranslationSettings
$sel:parallelDataNames:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe [Text]
$sel:jobName:StartTextTranslationJob' :: StartTextTranslationJob -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"JobName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
jobName,
            (Key
"ParallelDataNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
parallelDataNames,
            (Key
"Settings" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TranslationSettings
settings,
            (Key
"TerminologyNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
terminologyNames,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"InputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= InputDataConfig
inputDataConfig),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"OutputDataConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= OutputDataConfig
outputDataConfig),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"DataAccessRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
dataAccessRoleArn),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"SourceLanguageCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
sourceLanguageCode),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"TargetLanguageCodes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty Text
targetLanguageCodes),
            forall a. a -> Maybe a
Prelude.Just (Key
"ClientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
clientToken)
          ]
      )

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

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

-- | /See:/ 'newStartTextTranslationJobResponse' smart constructor.
data StartTextTranslationJobResponse = StartTextTranslationJobResponse'
  { -- | The identifier generated for the job. To get the status of a job, use
    -- this ID with the DescribeTextTranslationJob operation.
    StartTextTranslationJobResponse -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The status of the job. Possible values include:
    --
    -- -   @SUBMITTED@ - The job has been received and is queued for
    --     processing.
    --
    -- -   @IN_PROGRESS@ - Amazon Translate is processing the job.
    --
    -- -   @COMPLETED@ - The job was successfully completed and the output is
    --     available.
    --
    -- -   @COMPLETED_WITH_ERROR@ - The job was completed with errors. The
    --     errors can be analyzed in the job\'s output.
    --
    -- -   @FAILED@ - The job did not complete. To get details, use the
    --     DescribeTextTranslationJob operation.
    --
    -- -   @STOP_REQUESTED@ - The user who started the job has requested that
    --     it be stopped.
    --
    -- -   @STOPPED@ - The job has been stopped.
    StartTextTranslationJobResponse -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
    -- | The response's http status code.
    StartTextTranslationJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartTextTranslationJobResponse
-> StartTextTranslationJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartTextTranslationJobResponse
-> StartTextTranslationJobResponse -> Bool
$c/= :: StartTextTranslationJobResponse
-> StartTextTranslationJobResponse -> Bool
== :: StartTextTranslationJobResponse
-> StartTextTranslationJobResponse -> Bool
$c== :: StartTextTranslationJobResponse
-> StartTextTranslationJobResponse -> Bool
Prelude.Eq, ReadPrec [StartTextTranslationJobResponse]
ReadPrec StartTextTranslationJobResponse
Int -> ReadS StartTextTranslationJobResponse
ReadS [StartTextTranslationJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartTextTranslationJobResponse]
$creadListPrec :: ReadPrec [StartTextTranslationJobResponse]
readPrec :: ReadPrec StartTextTranslationJobResponse
$creadPrec :: ReadPrec StartTextTranslationJobResponse
readList :: ReadS [StartTextTranslationJobResponse]
$creadList :: ReadS [StartTextTranslationJobResponse]
readsPrec :: Int -> ReadS StartTextTranslationJobResponse
$creadsPrec :: Int -> ReadS StartTextTranslationJobResponse
Prelude.Read, Int -> StartTextTranslationJobResponse -> ShowS
[StartTextTranslationJobResponse] -> ShowS
StartTextTranslationJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartTextTranslationJobResponse] -> ShowS
$cshowList :: [StartTextTranslationJobResponse] -> ShowS
show :: StartTextTranslationJobResponse -> String
$cshow :: StartTextTranslationJobResponse -> String
showsPrec :: Int -> StartTextTranslationJobResponse -> ShowS
$cshowsPrec :: Int -> StartTextTranslationJobResponse -> ShowS
Prelude.Show, forall x.
Rep StartTextTranslationJobResponse x
-> StartTextTranslationJobResponse
forall x.
StartTextTranslationJobResponse
-> Rep StartTextTranslationJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartTextTranslationJobResponse x
-> StartTextTranslationJobResponse
$cfrom :: forall x.
StartTextTranslationJobResponse
-> Rep StartTextTranslationJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartTextTranslationJobResponse' 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:
--
-- 'jobId', 'startTextTranslationJobResponse_jobId' - The identifier generated for the job. To get the status of a job, use
-- this ID with the DescribeTextTranslationJob operation.
--
-- 'jobStatus', 'startTextTranslationJobResponse_jobStatus' - The status of the job. Possible values include:
--
-- -   @SUBMITTED@ - The job has been received and is queued for
--     processing.
--
-- -   @IN_PROGRESS@ - Amazon Translate is processing the job.
--
-- -   @COMPLETED@ - The job was successfully completed and the output is
--     available.
--
-- -   @COMPLETED_WITH_ERROR@ - The job was completed with errors. The
--     errors can be analyzed in the job\'s output.
--
-- -   @FAILED@ - The job did not complete. To get details, use the
--     DescribeTextTranslationJob operation.
--
-- -   @STOP_REQUESTED@ - The user who started the job has requested that
--     it be stopped.
--
-- -   @STOPPED@ - The job has been stopped.
--
-- 'httpStatus', 'startTextTranslationJobResponse_httpStatus' - The response's http status code.
newStartTextTranslationJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartTextTranslationJobResponse
newStartTextTranslationJobResponse :: Int -> StartTextTranslationJobResponse
newStartTextTranslationJobResponse Int
pHttpStatus_ =
  StartTextTranslationJobResponse'
    { $sel:jobId:StartTextTranslationJobResponse' :: Maybe Text
jobId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:StartTextTranslationJobResponse' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartTextTranslationJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier generated for the job. To get the status of a job, use
-- this ID with the DescribeTextTranslationJob operation.
startTextTranslationJobResponse_jobId :: Lens.Lens' StartTextTranslationJobResponse (Prelude.Maybe Prelude.Text)
startTextTranslationJobResponse_jobId :: Lens' StartTextTranslationJobResponse (Maybe Text)
startTextTranslationJobResponse_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJobResponse' {Maybe Text
jobId :: Maybe Text
$sel:jobId:StartTextTranslationJobResponse' :: StartTextTranslationJobResponse -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: StartTextTranslationJobResponse
s@StartTextTranslationJobResponse' {} Maybe Text
a -> StartTextTranslationJobResponse
s {$sel:jobId:StartTextTranslationJobResponse' :: Maybe Text
jobId = Maybe Text
a} :: StartTextTranslationJobResponse)

-- | The status of the job. Possible values include:
--
-- -   @SUBMITTED@ - The job has been received and is queued for
--     processing.
--
-- -   @IN_PROGRESS@ - Amazon Translate is processing the job.
--
-- -   @COMPLETED@ - The job was successfully completed and the output is
--     available.
--
-- -   @COMPLETED_WITH_ERROR@ - The job was completed with errors. The
--     errors can be analyzed in the job\'s output.
--
-- -   @FAILED@ - The job did not complete. To get details, use the
--     DescribeTextTranslationJob operation.
--
-- -   @STOP_REQUESTED@ - The user who started the job has requested that
--     it be stopped.
--
-- -   @STOPPED@ - The job has been stopped.
startTextTranslationJobResponse_jobStatus :: Lens.Lens' StartTextTranslationJobResponse (Prelude.Maybe JobStatus)
startTextTranslationJobResponse_jobStatus :: Lens' StartTextTranslationJobResponse (Maybe JobStatus)
startTextTranslationJobResponse_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTextTranslationJobResponse' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:StartTextTranslationJobResponse' :: StartTextTranslationJobResponse -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: StartTextTranslationJobResponse
s@StartTextTranslationJobResponse' {} Maybe JobStatus
a -> StartTextTranslationJobResponse
s {$sel:jobStatus:StartTextTranslationJobResponse' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: StartTextTranslationJobResponse)

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

instance
  Prelude.NFData
    StartTextTranslationJobResponse
  where
  rnf :: StartTextTranslationJobResponse -> ()
rnf StartTextTranslationJobResponse' {Int
Maybe Text
Maybe JobStatus
httpStatus :: Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
$sel:httpStatus:StartTextTranslationJobResponse' :: StartTextTranslationJobResponse -> Int
$sel:jobStatus:StartTextTranslationJobResponse' :: StartTextTranslationJobResponse -> Maybe JobStatus
$sel:jobId:StartTextTranslationJobResponse' :: StartTextTranslationJobResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobStatus
jobStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus