{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.TextTranslationJobProperties
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Translate.Types.TextTranslationJobProperties 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 Amazonka.Translate.Types.InputDataConfig
import Amazonka.Translate.Types.JobDetails
import Amazonka.Translate.Types.JobStatus
import Amazonka.Translate.Types.OutputDataConfig
import Amazonka.Translate.Types.TranslationSettings

-- | Provides information about a translation job.
--
-- /See:/ 'newTextTranslationJobProperties' smart constructor.
data TextTranslationJobProperties = TextTranslationJobProperties'
  { -- | The Amazon Resource Name (ARN) of an AWS Identity Access and Management
    -- (IAM) role that granted Amazon Translate read access to the job\'s input
    -- data.
    TextTranslationJobProperties -> Maybe Text
dataAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The time at which the translation job ended.
    TextTranslationJobProperties -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
    -- | The input configuration properties that were specified when the job was
    -- requested.
    TextTranslationJobProperties -> Maybe InputDataConfig
inputDataConfig :: Prelude.Maybe InputDataConfig,
    -- | The number of documents successfully and unsuccessfully processed during
    -- the translation job.
    TextTranslationJobProperties -> Maybe JobDetails
jobDetails :: Prelude.Maybe JobDetails,
    -- | The ID of the translation job.
    TextTranslationJobProperties -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
    -- | The user-defined name of the translation job.
    TextTranslationJobProperties -> Maybe Text
jobName :: Prelude.Maybe Prelude.Text,
    -- | The status of the translation job.
    TextTranslationJobProperties -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
    -- | An explanation of any errors that may have occurred during the
    -- translation job.
    TextTranslationJobProperties -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The output configuration properties that were specified when the job was
    -- requested.
    TextTranslationJobProperties -> Maybe OutputDataConfig
outputDataConfig :: Prelude.Maybe OutputDataConfig,
    -- | A list containing the names of the parallel data resources applied to
    -- the translation job.
    TextTranslationJobProperties -> Maybe [Text]
parallelDataNames :: Prelude.Maybe [Prelude.Text],
    -- | Settings that configure the translation output.
    TextTranslationJobProperties -> Maybe TranslationSettings
settings :: Prelude.Maybe TranslationSettings,
    -- | The language code of the language of the source text. The language must
    -- be a language supported by Amazon Translate.
    TextTranslationJobProperties -> Maybe Text
sourceLanguageCode :: Prelude.Maybe Prelude.Text,
    -- | The time at which the translation job was submitted.
    TextTranslationJobProperties -> Maybe POSIX
submittedTime :: Prelude.Maybe Data.POSIX,
    -- | The language code of the language of the target text. The language must
    -- be a language supported by Amazon Translate.
    TextTranslationJobProperties -> Maybe (NonEmpty Text)
targetLanguageCodes :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | A list containing the names of the terminologies applied to a
    -- translation job. Only one terminology can be applied per
    -- StartTextTranslationJob request at this time.
    TextTranslationJobProperties -> Maybe [Text]
terminologyNames :: Prelude.Maybe [Prelude.Text]
  }
  deriving (TextTranslationJobProperties
-> TextTranslationJobProperties -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TextTranslationJobProperties
-> TextTranslationJobProperties -> Bool
$c/= :: TextTranslationJobProperties
-> TextTranslationJobProperties -> Bool
== :: TextTranslationJobProperties
-> TextTranslationJobProperties -> Bool
$c== :: TextTranslationJobProperties
-> TextTranslationJobProperties -> Bool
Prelude.Eq, ReadPrec [TextTranslationJobProperties]
ReadPrec TextTranslationJobProperties
Int -> ReadS TextTranslationJobProperties
ReadS [TextTranslationJobProperties]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TextTranslationJobProperties]
$creadListPrec :: ReadPrec [TextTranslationJobProperties]
readPrec :: ReadPrec TextTranslationJobProperties
$creadPrec :: ReadPrec TextTranslationJobProperties
readList :: ReadS [TextTranslationJobProperties]
$creadList :: ReadS [TextTranslationJobProperties]
readsPrec :: Int -> ReadS TextTranslationJobProperties
$creadsPrec :: Int -> ReadS TextTranslationJobProperties
Prelude.Read, Int -> TextTranslationJobProperties -> ShowS
[TextTranslationJobProperties] -> ShowS
TextTranslationJobProperties -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TextTranslationJobProperties] -> ShowS
$cshowList :: [TextTranslationJobProperties] -> ShowS
show :: TextTranslationJobProperties -> String
$cshow :: TextTranslationJobProperties -> String
showsPrec :: Int -> TextTranslationJobProperties -> ShowS
$cshowsPrec :: Int -> TextTranslationJobProperties -> ShowS
Prelude.Show, forall x.
Rep TextTranslationJobProperties x -> TextTranslationJobProperties
forall x.
TextTranslationJobProperties -> Rep TextTranslationJobProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TextTranslationJobProperties x -> TextTranslationJobProperties
$cfrom :: forall x.
TextTranslationJobProperties -> Rep TextTranslationJobProperties x
Prelude.Generic)

-- |
-- Create a value of 'TextTranslationJobProperties' 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:
--
-- 'dataAccessRoleArn', 'textTranslationJobProperties_dataAccessRoleArn' - The Amazon Resource Name (ARN) of an AWS Identity Access and Management
-- (IAM) role that granted Amazon Translate read access to the job\'s input
-- data.
--
-- 'endTime', 'textTranslationJobProperties_endTime' - The time at which the translation job ended.
--
-- 'inputDataConfig', 'textTranslationJobProperties_inputDataConfig' - The input configuration properties that were specified when the job was
-- requested.
--
-- 'jobDetails', 'textTranslationJobProperties_jobDetails' - The number of documents successfully and unsuccessfully processed during
-- the translation job.
--
-- 'jobId', 'textTranslationJobProperties_jobId' - The ID of the translation job.
--
-- 'jobName', 'textTranslationJobProperties_jobName' - The user-defined name of the translation job.
--
-- 'jobStatus', 'textTranslationJobProperties_jobStatus' - The status of the translation job.
--
-- 'message', 'textTranslationJobProperties_message' - An explanation of any errors that may have occurred during the
-- translation job.
--
-- 'outputDataConfig', 'textTranslationJobProperties_outputDataConfig' - The output configuration properties that were specified when the job was
-- requested.
--
-- 'parallelDataNames', 'textTranslationJobProperties_parallelDataNames' - A list containing the names of the parallel data resources applied to
-- the translation job.
--
-- 'settings', 'textTranslationJobProperties_settings' - Settings that configure the translation output.
--
-- 'sourceLanguageCode', 'textTranslationJobProperties_sourceLanguageCode' - The language code of the language of the source text. The language must
-- be a language supported by Amazon Translate.
--
-- 'submittedTime', 'textTranslationJobProperties_submittedTime' - The time at which the translation job was submitted.
--
-- 'targetLanguageCodes', 'textTranslationJobProperties_targetLanguageCodes' - The language code of the language of the target text. The language must
-- be a language supported by Amazon Translate.
--
-- 'terminologyNames', 'textTranslationJobProperties_terminologyNames' - A list containing the names of the terminologies applied to a
-- translation job. Only one terminology can be applied per
-- StartTextTranslationJob request at this time.
newTextTranslationJobProperties ::
  TextTranslationJobProperties
newTextTranslationJobProperties :: TextTranslationJobProperties
newTextTranslationJobProperties =
  TextTranslationJobProperties'
    { $sel:dataAccessRoleArn:TextTranslationJobProperties' :: Maybe Text
dataAccessRoleArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:TextTranslationJobProperties' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
      $sel:inputDataConfig:TextTranslationJobProperties' :: Maybe InputDataConfig
inputDataConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:jobDetails:TextTranslationJobProperties' :: Maybe JobDetails
jobDetails = forall a. Maybe a
Prelude.Nothing,
      $sel:jobId:TextTranslationJobProperties' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
      $sel:jobName:TextTranslationJobProperties' :: Maybe Text
jobName = forall a. Maybe a
Prelude.Nothing,
      $sel:jobStatus:TextTranslationJobProperties' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:message:TextTranslationJobProperties' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
      $sel:outputDataConfig:TextTranslationJobProperties' :: Maybe OutputDataConfig
outputDataConfig = forall a. Maybe a
Prelude.Nothing,
      $sel:parallelDataNames:TextTranslationJobProperties' :: Maybe [Text]
parallelDataNames = forall a. Maybe a
Prelude.Nothing,
      $sel:settings:TextTranslationJobProperties' :: Maybe TranslationSettings
settings = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceLanguageCode:TextTranslationJobProperties' :: Maybe Text
sourceLanguageCode = forall a. Maybe a
Prelude.Nothing,
      $sel:submittedTime:TextTranslationJobProperties' :: Maybe POSIX
submittedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:targetLanguageCodes:TextTranslationJobProperties' :: Maybe (NonEmpty Text)
targetLanguageCodes = forall a. Maybe a
Prelude.Nothing,
      $sel:terminologyNames:TextTranslationJobProperties' :: Maybe [Text]
terminologyNames = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of an AWS Identity Access and Management
-- (IAM) role that granted Amazon Translate read access to the job\'s input
-- data.
textTranslationJobProperties_dataAccessRoleArn :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe Prelude.Text)
textTranslationJobProperties_dataAccessRoleArn :: Lens' TextTranslationJobProperties (Maybe Text)
textTranslationJobProperties_dataAccessRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe Text
dataAccessRoleArn :: Maybe Text
$sel:dataAccessRoleArn:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
dataAccessRoleArn} -> Maybe Text
dataAccessRoleArn) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe Text
a -> TextTranslationJobProperties
s {$sel:dataAccessRoleArn:TextTranslationJobProperties' :: Maybe Text
dataAccessRoleArn = Maybe Text
a} :: TextTranslationJobProperties)

-- | The time at which the translation job ended.
textTranslationJobProperties_endTime :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe Prelude.UTCTime)
textTranslationJobProperties_endTime :: Lens' TextTranslationJobProperties (Maybe UTCTime)
textTranslationJobProperties_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe POSIX
a -> TextTranslationJobProperties
s {$sel:endTime:TextTranslationJobProperties' :: Maybe POSIX
endTime = Maybe POSIX
a} :: TextTranslationJobProperties) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The input configuration properties that were specified when the job was
-- requested.
textTranslationJobProperties_inputDataConfig :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe InputDataConfig)
textTranslationJobProperties_inputDataConfig :: Lens' TextTranslationJobProperties (Maybe InputDataConfig)
textTranslationJobProperties_inputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe InputDataConfig
inputDataConfig :: Maybe InputDataConfig
$sel:inputDataConfig:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe InputDataConfig
inputDataConfig} -> Maybe InputDataConfig
inputDataConfig) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe InputDataConfig
a -> TextTranslationJobProperties
s {$sel:inputDataConfig:TextTranslationJobProperties' :: Maybe InputDataConfig
inputDataConfig = Maybe InputDataConfig
a} :: TextTranslationJobProperties)

-- | The number of documents successfully and unsuccessfully processed during
-- the translation job.
textTranslationJobProperties_jobDetails :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe JobDetails)
textTranslationJobProperties_jobDetails :: Lens' TextTranslationJobProperties (Maybe JobDetails)
textTranslationJobProperties_jobDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe JobDetails
jobDetails :: Maybe JobDetails
$sel:jobDetails:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe JobDetails
jobDetails} -> Maybe JobDetails
jobDetails) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe JobDetails
a -> TextTranslationJobProperties
s {$sel:jobDetails:TextTranslationJobProperties' :: Maybe JobDetails
jobDetails = Maybe JobDetails
a} :: TextTranslationJobProperties)

-- | The ID of the translation job.
textTranslationJobProperties_jobId :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe Prelude.Text)
textTranslationJobProperties_jobId :: Lens' TextTranslationJobProperties (Maybe Text)
textTranslationJobProperties_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe Text
jobId :: Maybe Text
$sel:jobId:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe Text
a -> TextTranslationJobProperties
s {$sel:jobId:TextTranslationJobProperties' :: Maybe Text
jobId = Maybe Text
a} :: TextTranslationJobProperties)

-- | The user-defined name of the translation job.
textTranslationJobProperties_jobName :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe Prelude.Text)
textTranslationJobProperties_jobName :: Lens' TextTranslationJobProperties (Maybe Text)
textTranslationJobProperties_jobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe Text
jobName :: Maybe Text
$sel:jobName:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
jobName} -> Maybe Text
jobName) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe Text
a -> TextTranslationJobProperties
s {$sel:jobName:TextTranslationJobProperties' :: Maybe Text
jobName = Maybe Text
a} :: TextTranslationJobProperties)

-- | The status of the translation job.
textTranslationJobProperties_jobStatus :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe JobStatus)
textTranslationJobProperties_jobStatus :: Lens' TextTranslationJobProperties (Maybe JobStatus)
textTranslationJobProperties_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe JobStatus
a -> TextTranslationJobProperties
s {$sel:jobStatus:TextTranslationJobProperties' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: TextTranslationJobProperties)

-- | An explanation of any errors that may have occurred during the
-- translation job.
textTranslationJobProperties_message :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe Prelude.Text)
textTranslationJobProperties_message :: Lens' TextTranslationJobProperties (Maybe Text)
textTranslationJobProperties_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe Text
message :: Maybe Text
$sel:message:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
message} -> Maybe Text
message) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe Text
a -> TextTranslationJobProperties
s {$sel:message:TextTranslationJobProperties' :: Maybe Text
message = Maybe Text
a} :: TextTranslationJobProperties)

-- | The output configuration properties that were specified when the job was
-- requested.
textTranslationJobProperties_outputDataConfig :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe OutputDataConfig)
textTranslationJobProperties_outputDataConfig :: Lens' TextTranslationJobProperties (Maybe OutputDataConfig)
textTranslationJobProperties_outputDataConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe OutputDataConfig
outputDataConfig :: Maybe OutputDataConfig
$sel:outputDataConfig:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe OutputDataConfig
outputDataConfig} -> Maybe OutputDataConfig
outputDataConfig) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe OutputDataConfig
a -> TextTranslationJobProperties
s {$sel:outputDataConfig:TextTranslationJobProperties' :: Maybe OutputDataConfig
outputDataConfig = Maybe OutputDataConfig
a} :: TextTranslationJobProperties)

-- | A list containing the names of the parallel data resources applied to
-- the translation job.
textTranslationJobProperties_parallelDataNames :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe [Prelude.Text])
textTranslationJobProperties_parallelDataNames :: Lens' TextTranslationJobProperties (Maybe [Text])
textTranslationJobProperties_parallelDataNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe [Text]
parallelDataNames :: Maybe [Text]
$sel:parallelDataNames:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe [Text]
parallelDataNames} -> Maybe [Text]
parallelDataNames) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe [Text]
a -> TextTranslationJobProperties
s {$sel:parallelDataNames:TextTranslationJobProperties' :: Maybe [Text]
parallelDataNames = Maybe [Text]
a} :: TextTranslationJobProperties) 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 that configure the translation output.
textTranslationJobProperties_settings :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe TranslationSettings)
textTranslationJobProperties_settings :: Lens' TextTranslationJobProperties (Maybe TranslationSettings)
textTranslationJobProperties_settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe TranslationSettings
settings :: Maybe TranslationSettings
$sel:settings:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe TranslationSettings
settings} -> Maybe TranslationSettings
settings) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe TranslationSettings
a -> TextTranslationJobProperties
s {$sel:settings:TextTranslationJobProperties' :: Maybe TranslationSettings
settings = Maybe TranslationSettings
a} :: TextTranslationJobProperties)

-- | The language code of the language of the source text. The language must
-- be a language supported by Amazon Translate.
textTranslationJobProperties_sourceLanguageCode :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe Prelude.Text)
textTranslationJobProperties_sourceLanguageCode :: Lens' TextTranslationJobProperties (Maybe Text)
textTranslationJobProperties_sourceLanguageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe Text
sourceLanguageCode :: Maybe Text
$sel:sourceLanguageCode:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
sourceLanguageCode} -> Maybe Text
sourceLanguageCode) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe Text
a -> TextTranslationJobProperties
s {$sel:sourceLanguageCode:TextTranslationJobProperties' :: Maybe Text
sourceLanguageCode = Maybe Text
a} :: TextTranslationJobProperties)

-- | The time at which the translation job was submitted.
textTranslationJobProperties_submittedTime :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe Prelude.UTCTime)
textTranslationJobProperties_submittedTime :: Lens' TextTranslationJobProperties (Maybe UTCTime)
textTranslationJobProperties_submittedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe POSIX
submittedTime :: Maybe POSIX
$sel:submittedTime:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe POSIX
submittedTime} -> Maybe POSIX
submittedTime) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe POSIX
a -> TextTranslationJobProperties
s {$sel:submittedTime:TextTranslationJobProperties' :: Maybe POSIX
submittedTime = Maybe POSIX
a} :: TextTranslationJobProperties) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The language code of the language of the target text. The language must
-- be a language supported by Amazon Translate.
textTranslationJobProperties_targetLanguageCodes :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
textTranslationJobProperties_targetLanguageCodes :: Lens' TextTranslationJobProperties (Maybe (NonEmpty Text))
textTranslationJobProperties_targetLanguageCodes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe (NonEmpty Text)
targetLanguageCodes :: Maybe (NonEmpty Text)
$sel:targetLanguageCodes:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe (NonEmpty Text)
targetLanguageCodes} -> Maybe (NonEmpty Text)
targetLanguageCodes) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe (NonEmpty Text)
a -> TextTranslationJobProperties
s {$sel:targetLanguageCodes:TextTranslationJobProperties' :: Maybe (NonEmpty Text)
targetLanguageCodes = Maybe (NonEmpty Text)
a} :: TextTranslationJobProperties) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list containing the names of the terminologies applied to a
-- translation job. Only one terminology can be applied per
-- StartTextTranslationJob request at this time.
textTranslationJobProperties_terminologyNames :: Lens.Lens' TextTranslationJobProperties (Prelude.Maybe [Prelude.Text])
textTranslationJobProperties_terminologyNames :: Lens' TextTranslationJobProperties (Maybe [Text])
textTranslationJobProperties_terminologyNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TextTranslationJobProperties' {Maybe [Text]
terminologyNames :: Maybe [Text]
$sel:terminologyNames:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe [Text]
terminologyNames} -> Maybe [Text]
terminologyNames) (\s :: TextTranslationJobProperties
s@TextTranslationJobProperties' {} Maybe [Text]
a -> TextTranslationJobProperties
s {$sel:terminologyNames:TextTranslationJobProperties' :: Maybe [Text]
terminologyNames = Maybe [Text]
a} :: TextTranslationJobProperties) 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

instance Data.FromJSON TextTranslationJobProperties where
  parseJSON :: Value -> Parser TextTranslationJobProperties
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"TextTranslationJobProperties"
      ( \Object
x ->
          Maybe Text
-> Maybe POSIX
-> Maybe InputDataConfig
-> Maybe JobDetails
-> Maybe Text
-> Maybe Text
-> Maybe JobStatus
-> Maybe Text
-> Maybe OutputDataConfig
-> Maybe [Text]
-> Maybe TranslationSettings
-> Maybe Text
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> Maybe [Text]
-> TextTranslationJobProperties
TextTranslationJobProperties'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"DataAccessRoleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"EndTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InputDataConfig")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"JobDetails")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (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 -> Parser (Maybe a)
Data..:? Key
"JobName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"JobStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Message")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OutputDataConfig")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ParallelDataNames"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Settings")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SourceLanguageCode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SubmittedTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TargetLanguageCodes")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"TerminologyNames"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance
  Prelude.Hashable
    TextTranslationJobProperties
  where
  hashWithSalt :: Int -> TextTranslationJobProperties -> Int
hashWithSalt Int
_salt TextTranslationJobProperties' {Maybe [Text]
Maybe (NonEmpty Text)
Maybe Text
Maybe POSIX
Maybe InputDataConfig
Maybe JobDetails
Maybe JobStatus
Maybe OutputDataConfig
Maybe TranslationSettings
terminologyNames :: Maybe [Text]
targetLanguageCodes :: Maybe (NonEmpty Text)
submittedTime :: Maybe POSIX
sourceLanguageCode :: Maybe Text
settings :: Maybe TranslationSettings
parallelDataNames :: Maybe [Text]
outputDataConfig :: Maybe OutputDataConfig
message :: Maybe Text
jobStatus :: Maybe JobStatus
jobName :: Maybe Text
jobId :: Maybe Text
jobDetails :: Maybe JobDetails
inputDataConfig :: Maybe InputDataConfig
endTime :: Maybe POSIX
dataAccessRoleArn :: Maybe Text
$sel:terminologyNames:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe [Text]
$sel:targetLanguageCodes:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe (NonEmpty Text)
$sel:submittedTime:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe POSIX
$sel:sourceLanguageCode:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
$sel:settings:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe TranslationSettings
$sel:parallelDataNames:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe [Text]
$sel:outputDataConfig:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe OutputDataConfig
$sel:message:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
$sel:jobStatus:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe JobStatus
$sel:jobName:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
$sel:jobId:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
$sel:jobDetails:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe JobDetails
$sel:inputDataConfig:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe InputDataConfig
$sel:endTime:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe POSIX
$sel:dataAccessRoleArn:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dataAccessRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
endTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputDataConfig
inputDataConfig
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobDetails
jobDetails
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobStatus
jobStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OutputDataConfig
outputDataConfig
      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
sourceLanguageCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
submittedTime
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
targetLanguageCodes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
terminologyNames

instance Prelude.NFData TextTranslationJobProperties where
  rnf :: TextTranslationJobProperties -> ()
rnf TextTranslationJobProperties' {Maybe [Text]
Maybe (NonEmpty Text)
Maybe Text
Maybe POSIX
Maybe InputDataConfig
Maybe JobDetails
Maybe JobStatus
Maybe OutputDataConfig
Maybe TranslationSettings
terminologyNames :: Maybe [Text]
targetLanguageCodes :: Maybe (NonEmpty Text)
submittedTime :: Maybe POSIX
sourceLanguageCode :: Maybe Text
settings :: Maybe TranslationSettings
parallelDataNames :: Maybe [Text]
outputDataConfig :: Maybe OutputDataConfig
message :: Maybe Text
jobStatus :: Maybe JobStatus
jobName :: Maybe Text
jobId :: Maybe Text
jobDetails :: Maybe JobDetails
inputDataConfig :: Maybe InputDataConfig
endTime :: Maybe POSIX
dataAccessRoleArn :: Maybe Text
$sel:terminologyNames:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe [Text]
$sel:targetLanguageCodes:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe (NonEmpty Text)
$sel:submittedTime:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe POSIX
$sel:sourceLanguageCode:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
$sel:settings:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe TranslationSettings
$sel:parallelDataNames:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe [Text]
$sel:outputDataConfig:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe OutputDataConfig
$sel:message:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
$sel:jobStatus:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe JobStatus
$sel:jobName:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
$sel:jobId:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
$sel:jobDetails:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe JobDetails
$sel:inputDataConfig:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe InputDataConfig
$sel:endTime:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe POSIX
$sel:dataAccessRoleArn:TextTranslationJobProperties' :: TextTranslationJobProperties -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dataAccessRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
endTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputDataConfig
inputDataConfig
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobDetails
jobDetails
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
jobName
      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 Maybe Text
message
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OutputDataConfig
outputDataConfig
      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
sourceLanguageCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
submittedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
targetLanguageCodes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
terminologyNames