{-# 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.Transcribe.Types.TranscriptionJob
-- 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)
module Amazonka.Transcribe.Types.TranscriptionJob where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Transcribe.Types.ContentRedaction
import Amazonka.Transcribe.Types.JobExecutionSettings
import Amazonka.Transcribe.Types.LanguageCode
import Amazonka.Transcribe.Types.Media
import Amazonka.Transcribe.Types.MediaFormat
import Amazonka.Transcribe.Types.ModelSettings
import Amazonka.Transcribe.Types.Settings
import Amazonka.Transcribe.Types.SubtitlesOutput
import Amazonka.Transcribe.Types.Tag
import Amazonka.Transcribe.Types.Transcript
import Amazonka.Transcribe.Types.TranscriptionJobStatus

-- | Describes an asynchronous transcription job that was created with the
-- @StartTranscriptionJob@ operation.
--
-- /See:/ 'newTranscriptionJob' smart constructor.
data TranscriptionJob = TranscriptionJob'
  { -- | A timestamp that shows when the job was created.
    TranscriptionJob -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | If the @TranscriptionJobStatus@ field is @FAILED@, this field contains
    -- information about why the job failed.
    --
    -- The @FailureReason@ field can contain one of the following values:
    --
    -- -   @Unsupported media format@ - The media format specified in the
    --     @MediaFormat@ field of the request isn\'t valid. See the description
    --     of the @MediaFormat@ field for a list of valid values.
    --
    -- -   @The media format provided does not match the detected media format@
    --     - The media format of the audio file doesn\'t match the format
    --     specified in the @MediaFormat@ field in the request. Check the media
    --     format of your media file and make sure that the two values match.
    --
    -- -   @Invalid sample rate for audio file@ - The sample rate specified in
    --     the @MediaSampleRateHertz@ of the request isn\'t valid. The sample
    --     rate must be between 8,000 and 48,000 Hertz.
    --
    -- -   @The sample rate provided does not match the detected sample rate@ -
    --     The sample rate in the audio file doesn\'t match the sample rate
    --     specified in the @MediaSampleRateHertz@ field in the request. Check
    --     the sample rate of your media file and make sure that the two values
    --     match.
    --
    -- -   @Invalid file size: file size too large@ - The size of your audio
    --     file is larger than Amazon Transcribe can process. For more
    --     information, see
    --     <https://docs.aws.amazon.com/transcribe/latest/dg/limits-guidelines.html#limits Limits>
    --     in the /Amazon Transcribe Developer Guide/.
    --
    -- -   @Invalid number of channels: number of channels too large@ - Your
    --     audio contains more channels than Amazon Transcribe is configured to
    --     process. To request additional channels, see
    --     <https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits-amazon-transcribe Amazon Transcribe Limits>
    --     in the /Amazon Web Services General Reference/.
    TranscriptionJob -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | An object that describes content redaction settings for the
    -- transcription job.
    TranscriptionJob -> Maybe ContentRedaction
contentRedaction :: Prelude.Maybe ContentRedaction,
    -- | A value between zero and one that Amazon Transcribe assigned to the
    -- language that it identified in the source audio. Larger values indicate
    -- that Amazon Transcribe has higher confidence in the language it
    -- identified.
    TranscriptionJob -> Maybe Double
identifiedLanguageScore :: Prelude.Maybe Prelude.Double,
    -- | Generate subtitles for your batch transcription job.
    TranscriptionJob -> Maybe SubtitlesOutput
subtitles :: Prelude.Maybe SubtitlesOutput,
    -- | The language code for the input speech.
    TranscriptionJob -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
    -- | An object that shows the optional array of languages inputted for
    -- transcription jobs with automatic language identification enabled.
    TranscriptionJob -> Maybe (NonEmpty LanguageCode)
languageOptions :: Prelude.Maybe (Prelude.NonEmpty LanguageCode),
    -- | Optional settings for the transcription job. Use these settings to turn
    -- on speaker recognition, to set the maximum number of speakers that
    -- should be identified and to specify a custom vocabulary to use when
    -- processing the transcription job.
    TranscriptionJob -> Maybe Settings
settings :: Prelude.Maybe Settings,
    -- | A timestamp that shows when the job started processing.
    TranscriptionJob -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | A timestamp that shows when the job completed.
    TranscriptionJob -> Maybe POSIX
completionTime :: Prelude.Maybe Core.POSIX,
    -- | An object that describes the input media for the transcription job.
    TranscriptionJob -> Maybe Media
media :: Prelude.Maybe Media,
    -- | The format of the input media file.
    TranscriptionJob -> Maybe MediaFormat
mediaFormat :: Prelude.Maybe MediaFormat,
    -- | An object containing the details of your custom language model.
    TranscriptionJob -> Maybe ModelSettings
modelSettings :: Prelude.Maybe ModelSettings,
    -- | The status of the transcription job.
    TranscriptionJob -> Maybe TranscriptionJobStatus
transcriptionJobStatus :: Prelude.Maybe TranscriptionJobStatus,
    -- | Provides information about how a transcription job is executed.
    TranscriptionJob -> Maybe JobExecutionSettings
jobExecutionSettings :: Prelude.Maybe JobExecutionSettings,
    -- | The name of the transcription job.
    TranscriptionJob -> Maybe Text
transcriptionJobName :: Prelude.Maybe Prelude.Text,
    -- | A value that shows if automatic language identification was enabled for
    -- a transcription job.
    TranscriptionJob -> Maybe Bool
identifyLanguage :: Prelude.Maybe Prelude.Bool,
    -- | An object that describes the output of the transcription job.
    TranscriptionJob -> Maybe Transcript
transcript :: Prelude.Maybe Transcript,
    -- | A key:value pair assigned to a given transcription job.
    TranscriptionJob -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The sample rate, in Hertz, of the audio track in the input media file.
    TranscriptionJob -> Maybe Natural
mediaSampleRateHertz :: Prelude.Maybe Prelude.Natural
  }
  deriving (TranscriptionJob -> TranscriptionJob -> Bool
(TranscriptionJob -> TranscriptionJob -> Bool)
-> (TranscriptionJob -> TranscriptionJob -> Bool)
-> Eq TranscriptionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TranscriptionJob -> TranscriptionJob -> Bool
$c/= :: TranscriptionJob -> TranscriptionJob -> Bool
== :: TranscriptionJob -> TranscriptionJob -> Bool
$c== :: TranscriptionJob -> TranscriptionJob -> Bool
Prelude.Eq, ReadPrec [TranscriptionJob]
ReadPrec TranscriptionJob
Int -> ReadS TranscriptionJob
ReadS [TranscriptionJob]
(Int -> ReadS TranscriptionJob)
-> ReadS [TranscriptionJob]
-> ReadPrec TranscriptionJob
-> ReadPrec [TranscriptionJob]
-> Read TranscriptionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TranscriptionJob]
$creadListPrec :: ReadPrec [TranscriptionJob]
readPrec :: ReadPrec TranscriptionJob
$creadPrec :: ReadPrec TranscriptionJob
readList :: ReadS [TranscriptionJob]
$creadList :: ReadS [TranscriptionJob]
readsPrec :: Int -> ReadS TranscriptionJob
$creadsPrec :: Int -> ReadS TranscriptionJob
Prelude.Read, Int -> TranscriptionJob -> ShowS
[TranscriptionJob] -> ShowS
TranscriptionJob -> String
(Int -> TranscriptionJob -> ShowS)
-> (TranscriptionJob -> String)
-> ([TranscriptionJob] -> ShowS)
-> Show TranscriptionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TranscriptionJob] -> ShowS
$cshowList :: [TranscriptionJob] -> ShowS
show :: TranscriptionJob -> String
$cshow :: TranscriptionJob -> String
showsPrec :: Int -> TranscriptionJob -> ShowS
$cshowsPrec :: Int -> TranscriptionJob -> ShowS
Prelude.Show, (forall x. TranscriptionJob -> Rep TranscriptionJob x)
-> (forall x. Rep TranscriptionJob x -> TranscriptionJob)
-> Generic TranscriptionJob
forall x. Rep TranscriptionJob x -> TranscriptionJob
forall x. TranscriptionJob -> Rep TranscriptionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TranscriptionJob x -> TranscriptionJob
$cfrom :: forall x. TranscriptionJob -> Rep TranscriptionJob x
Prelude.Generic)

-- |
-- Create a value of 'TranscriptionJob' 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:
--
-- 'creationTime', 'transcriptionJob_creationTime' - A timestamp that shows when the job was created.
--
-- 'failureReason', 'transcriptionJob_failureReason' - If the @TranscriptionJobStatus@ field is @FAILED@, this field contains
-- information about why the job failed.
--
-- The @FailureReason@ field can contain one of the following values:
--
-- -   @Unsupported media format@ - The media format specified in the
--     @MediaFormat@ field of the request isn\'t valid. See the description
--     of the @MediaFormat@ field for a list of valid values.
--
-- -   @The media format provided does not match the detected media format@
--     - The media format of the audio file doesn\'t match the format
--     specified in the @MediaFormat@ field in the request. Check the media
--     format of your media file and make sure that the two values match.
--
-- -   @Invalid sample rate for audio file@ - The sample rate specified in
--     the @MediaSampleRateHertz@ of the request isn\'t valid. The sample
--     rate must be between 8,000 and 48,000 Hertz.
--
-- -   @The sample rate provided does not match the detected sample rate@ -
--     The sample rate in the audio file doesn\'t match the sample rate
--     specified in the @MediaSampleRateHertz@ field in the request. Check
--     the sample rate of your media file and make sure that the two values
--     match.
--
-- -   @Invalid file size: file size too large@ - The size of your audio
--     file is larger than Amazon Transcribe can process. For more
--     information, see
--     <https://docs.aws.amazon.com/transcribe/latest/dg/limits-guidelines.html#limits Limits>
--     in the /Amazon Transcribe Developer Guide/.
--
-- -   @Invalid number of channels: number of channels too large@ - Your
--     audio contains more channels than Amazon Transcribe is configured to
--     process. To request additional channels, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits-amazon-transcribe Amazon Transcribe Limits>
--     in the /Amazon Web Services General Reference/.
--
-- 'contentRedaction', 'transcriptionJob_contentRedaction' - An object that describes content redaction settings for the
-- transcription job.
--
-- 'identifiedLanguageScore', 'transcriptionJob_identifiedLanguageScore' - A value between zero and one that Amazon Transcribe assigned to the
-- language that it identified in the source audio. Larger values indicate
-- that Amazon Transcribe has higher confidence in the language it
-- identified.
--
-- 'subtitles', 'transcriptionJob_subtitles' - Generate subtitles for your batch transcription job.
--
-- 'languageCode', 'transcriptionJob_languageCode' - The language code for the input speech.
--
-- 'languageOptions', 'transcriptionJob_languageOptions' - An object that shows the optional array of languages inputted for
-- transcription jobs with automatic language identification enabled.
--
-- 'settings', 'transcriptionJob_settings' - Optional settings for the transcription job. Use these settings to turn
-- on speaker recognition, to set the maximum number of speakers that
-- should be identified and to specify a custom vocabulary to use when
-- processing the transcription job.
--
-- 'startTime', 'transcriptionJob_startTime' - A timestamp that shows when the job started processing.
--
-- 'completionTime', 'transcriptionJob_completionTime' - A timestamp that shows when the job completed.
--
-- 'media', 'transcriptionJob_media' - An object that describes the input media for the transcription job.
--
-- 'mediaFormat', 'transcriptionJob_mediaFormat' - The format of the input media file.
--
-- 'modelSettings', 'transcriptionJob_modelSettings' - An object containing the details of your custom language model.
--
-- 'transcriptionJobStatus', 'transcriptionJob_transcriptionJobStatus' - The status of the transcription job.
--
-- 'jobExecutionSettings', 'transcriptionJob_jobExecutionSettings' - Provides information about how a transcription job is executed.
--
-- 'transcriptionJobName', 'transcriptionJob_transcriptionJobName' - The name of the transcription job.
--
-- 'identifyLanguage', 'transcriptionJob_identifyLanguage' - A value that shows if automatic language identification was enabled for
-- a transcription job.
--
-- 'transcript', 'transcriptionJob_transcript' - An object that describes the output of the transcription job.
--
-- 'tags', 'transcriptionJob_tags' - A key:value pair assigned to a given transcription job.
--
-- 'mediaSampleRateHertz', 'transcriptionJob_mediaSampleRateHertz' - The sample rate, in Hertz, of the audio track in the input media file.
newTranscriptionJob ::
  TranscriptionJob
newTranscriptionJob :: TranscriptionJob
newTranscriptionJob =
  TranscriptionJob' :: Maybe POSIX
-> Maybe Text
-> Maybe ContentRedaction
-> Maybe Double
-> Maybe SubtitlesOutput
-> Maybe LanguageCode
-> Maybe (NonEmpty LanguageCode)
-> Maybe Settings
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Media
-> Maybe MediaFormat
-> Maybe ModelSettings
-> Maybe TranscriptionJobStatus
-> Maybe JobExecutionSettings
-> Maybe Text
-> Maybe Bool
-> Maybe Transcript
-> Maybe (NonEmpty Tag)
-> Maybe Natural
-> TranscriptionJob
TranscriptionJob'
    { $sel:creationTime:TranscriptionJob' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:TranscriptionJob' :: Maybe Text
failureReason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentRedaction:TranscriptionJob' :: Maybe ContentRedaction
contentRedaction = Maybe ContentRedaction
forall a. Maybe a
Prelude.Nothing,
      $sel:identifiedLanguageScore:TranscriptionJob' :: Maybe Double
identifiedLanguageScore = Maybe Double
forall a. Maybe a
Prelude.Nothing,
      $sel:subtitles:TranscriptionJob' :: Maybe SubtitlesOutput
subtitles = Maybe SubtitlesOutput
forall a. Maybe a
Prelude.Nothing,
      $sel:languageCode:TranscriptionJob' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
forall a. Maybe a
Prelude.Nothing,
      $sel:languageOptions:TranscriptionJob' :: Maybe (NonEmpty LanguageCode)
languageOptions = Maybe (NonEmpty LanguageCode)
forall a. Maybe a
Prelude.Nothing,
      $sel:settings:TranscriptionJob' :: Maybe Settings
settings = Maybe Settings
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:TranscriptionJob' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:completionTime:TranscriptionJob' :: Maybe POSIX
completionTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:media:TranscriptionJob' :: Maybe Media
media = Maybe Media
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaFormat:TranscriptionJob' :: Maybe MediaFormat
mediaFormat = Maybe MediaFormat
forall a. Maybe a
Prelude.Nothing,
      $sel:modelSettings:TranscriptionJob' :: Maybe ModelSettings
modelSettings = Maybe ModelSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:transcriptionJobStatus:TranscriptionJob' :: Maybe TranscriptionJobStatus
transcriptionJobStatus = Maybe TranscriptionJobStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:jobExecutionSettings:TranscriptionJob' :: Maybe JobExecutionSettings
jobExecutionSettings = Maybe JobExecutionSettings
forall a. Maybe a
Prelude.Nothing,
      $sel:transcriptionJobName:TranscriptionJob' :: Maybe Text
transcriptionJobName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:identifyLanguage:TranscriptionJob' :: Maybe Bool
identifyLanguage = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:transcript:TranscriptionJob' :: Maybe Transcript
transcript = Maybe Transcript
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:TranscriptionJob' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
      $sel:mediaSampleRateHertz:TranscriptionJob' :: Maybe Natural
mediaSampleRateHertz = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | A timestamp that shows when the job was created.
transcriptionJob_creationTime :: Lens.Lens' TranscriptionJob (Prelude.Maybe Prelude.UTCTime)
transcriptionJob_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_creationTime = (TranscriptionJob -> Maybe POSIX)
-> (TranscriptionJob -> Maybe POSIX -> TranscriptionJob)
-> Lens
     TranscriptionJob TranscriptionJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:TranscriptionJob' :: TranscriptionJob -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe POSIX
a -> TranscriptionJob
s {$sel:creationTime:TranscriptionJob' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: TranscriptionJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> TranscriptionJob -> f TranscriptionJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TranscriptionJob
-> f TranscriptionJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | If the @TranscriptionJobStatus@ field is @FAILED@, this field contains
-- information about why the job failed.
--
-- The @FailureReason@ field can contain one of the following values:
--
-- -   @Unsupported media format@ - The media format specified in the
--     @MediaFormat@ field of the request isn\'t valid. See the description
--     of the @MediaFormat@ field for a list of valid values.
--
-- -   @The media format provided does not match the detected media format@
--     - The media format of the audio file doesn\'t match the format
--     specified in the @MediaFormat@ field in the request. Check the media
--     format of your media file and make sure that the two values match.
--
-- -   @Invalid sample rate for audio file@ - The sample rate specified in
--     the @MediaSampleRateHertz@ of the request isn\'t valid. The sample
--     rate must be between 8,000 and 48,000 Hertz.
--
-- -   @The sample rate provided does not match the detected sample rate@ -
--     The sample rate in the audio file doesn\'t match the sample rate
--     specified in the @MediaSampleRateHertz@ field in the request. Check
--     the sample rate of your media file and make sure that the two values
--     match.
--
-- -   @Invalid file size: file size too large@ - The size of your audio
--     file is larger than Amazon Transcribe can process. For more
--     information, see
--     <https://docs.aws.amazon.com/transcribe/latest/dg/limits-guidelines.html#limits Limits>
--     in the /Amazon Transcribe Developer Guide/.
--
-- -   @Invalid number of channels: number of channels too large@ - Your
--     audio contains more channels than Amazon Transcribe is configured to
--     process. To request additional channels, see
--     <https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits-amazon-transcribe Amazon Transcribe Limits>
--     in the /Amazon Web Services General Reference/.
transcriptionJob_failureReason :: Lens.Lens' TranscriptionJob (Prelude.Maybe Prelude.Text)
transcriptionJob_failureReason :: (Maybe Text -> f (Maybe Text))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_failureReason = (TranscriptionJob -> Maybe Text)
-> (TranscriptionJob -> Maybe Text -> TranscriptionJob)
-> Lens TranscriptionJob TranscriptionJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:TranscriptionJob' :: TranscriptionJob -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe Text
a -> TranscriptionJob
s {$sel:failureReason:TranscriptionJob' :: Maybe Text
failureReason = Maybe Text
a} :: TranscriptionJob)

-- | An object that describes content redaction settings for the
-- transcription job.
transcriptionJob_contentRedaction :: Lens.Lens' TranscriptionJob (Prelude.Maybe ContentRedaction)
transcriptionJob_contentRedaction :: (Maybe ContentRedaction -> f (Maybe ContentRedaction))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_contentRedaction = (TranscriptionJob -> Maybe ContentRedaction)
-> (TranscriptionJob -> Maybe ContentRedaction -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe ContentRedaction)
     (Maybe ContentRedaction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe ContentRedaction
contentRedaction :: Maybe ContentRedaction
$sel:contentRedaction:TranscriptionJob' :: TranscriptionJob -> Maybe ContentRedaction
contentRedaction} -> Maybe ContentRedaction
contentRedaction) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe ContentRedaction
a -> TranscriptionJob
s {$sel:contentRedaction:TranscriptionJob' :: Maybe ContentRedaction
contentRedaction = Maybe ContentRedaction
a} :: TranscriptionJob)

-- | A value between zero and one that Amazon Transcribe assigned to the
-- language that it identified in the source audio. Larger values indicate
-- that Amazon Transcribe has higher confidence in the language it
-- identified.
transcriptionJob_identifiedLanguageScore :: Lens.Lens' TranscriptionJob (Prelude.Maybe Prelude.Double)
transcriptionJob_identifiedLanguageScore :: (Maybe Double -> f (Maybe Double))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_identifiedLanguageScore = (TranscriptionJob -> Maybe Double)
-> (TranscriptionJob -> Maybe Double -> TranscriptionJob)
-> Lens
     TranscriptionJob TranscriptionJob (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe Double
identifiedLanguageScore :: Maybe Double
$sel:identifiedLanguageScore:TranscriptionJob' :: TranscriptionJob -> Maybe Double
identifiedLanguageScore} -> Maybe Double
identifiedLanguageScore) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe Double
a -> TranscriptionJob
s {$sel:identifiedLanguageScore:TranscriptionJob' :: Maybe Double
identifiedLanguageScore = Maybe Double
a} :: TranscriptionJob)

-- | Generate subtitles for your batch transcription job.
transcriptionJob_subtitles :: Lens.Lens' TranscriptionJob (Prelude.Maybe SubtitlesOutput)
transcriptionJob_subtitles :: (Maybe SubtitlesOutput -> f (Maybe SubtitlesOutput))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_subtitles = (TranscriptionJob -> Maybe SubtitlesOutput)
-> (TranscriptionJob -> Maybe SubtitlesOutput -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe SubtitlesOutput)
     (Maybe SubtitlesOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe SubtitlesOutput
subtitles :: Maybe SubtitlesOutput
$sel:subtitles:TranscriptionJob' :: TranscriptionJob -> Maybe SubtitlesOutput
subtitles} -> Maybe SubtitlesOutput
subtitles) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe SubtitlesOutput
a -> TranscriptionJob
s {$sel:subtitles:TranscriptionJob' :: Maybe SubtitlesOutput
subtitles = Maybe SubtitlesOutput
a} :: TranscriptionJob)

-- | The language code for the input speech.
transcriptionJob_languageCode :: Lens.Lens' TranscriptionJob (Prelude.Maybe LanguageCode)
transcriptionJob_languageCode :: (Maybe LanguageCode -> f (Maybe LanguageCode))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_languageCode = (TranscriptionJob -> Maybe LanguageCode)
-> (TranscriptionJob -> Maybe LanguageCode -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe LanguageCode)
     (Maybe LanguageCode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:TranscriptionJob' :: TranscriptionJob -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe LanguageCode
a -> TranscriptionJob
s {$sel:languageCode:TranscriptionJob' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: TranscriptionJob)

-- | An object that shows the optional array of languages inputted for
-- transcription jobs with automatic language identification enabled.
transcriptionJob_languageOptions :: Lens.Lens' TranscriptionJob (Prelude.Maybe (Prelude.NonEmpty LanguageCode))
transcriptionJob_languageOptions :: (Maybe (NonEmpty LanguageCode)
 -> f (Maybe (NonEmpty LanguageCode)))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_languageOptions = (TranscriptionJob -> Maybe (NonEmpty LanguageCode))
-> (TranscriptionJob
    -> Maybe (NonEmpty LanguageCode) -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe (NonEmpty LanguageCode))
     (Maybe (NonEmpty LanguageCode))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe (NonEmpty LanguageCode)
languageOptions :: Maybe (NonEmpty LanguageCode)
$sel:languageOptions:TranscriptionJob' :: TranscriptionJob -> Maybe (NonEmpty LanguageCode)
languageOptions} -> Maybe (NonEmpty LanguageCode)
languageOptions) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe (NonEmpty LanguageCode)
a -> TranscriptionJob
s {$sel:languageOptions:TranscriptionJob' :: Maybe (NonEmpty LanguageCode)
languageOptions = Maybe (NonEmpty LanguageCode)
a} :: TranscriptionJob) ((Maybe (NonEmpty LanguageCode)
  -> f (Maybe (NonEmpty LanguageCode)))
 -> TranscriptionJob -> f TranscriptionJob)
-> ((Maybe (NonEmpty LanguageCode)
     -> f (Maybe (NonEmpty LanguageCode)))
    -> Maybe (NonEmpty LanguageCode)
    -> f (Maybe (NonEmpty LanguageCode)))
-> (Maybe (NonEmpty LanguageCode)
    -> f (Maybe (NonEmpty LanguageCode)))
-> TranscriptionJob
-> f TranscriptionJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty LanguageCode)
  (NonEmpty LanguageCode)
  (NonEmpty LanguageCode)
  (NonEmpty LanguageCode)
-> Iso
     (Maybe (NonEmpty LanguageCode))
     (Maybe (NonEmpty LanguageCode))
     (Maybe (NonEmpty LanguageCode))
     (Maybe (NonEmpty LanguageCode))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (NonEmpty LanguageCode)
  (NonEmpty LanguageCode)
  (NonEmpty LanguageCode)
  (NonEmpty LanguageCode)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Optional settings for the transcription job. Use these settings to turn
-- on speaker recognition, to set the maximum number of speakers that
-- should be identified and to specify a custom vocabulary to use when
-- processing the transcription job.
transcriptionJob_settings :: Lens.Lens' TranscriptionJob (Prelude.Maybe Settings)
transcriptionJob_settings :: (Maybe Settings -> f (Maybe Settings))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_settings = (TranscriptionJob -> Maybe Settings)
-> (TranscriptionJob -> Maybe Settings -> TranscriptionJob)
-> Lens
     TranscriptionJob TranscriptionJob (Maybe Settings) (Maybe Settings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe Settings
settings :: Maybe Settings
$sel:settings:TranscriptionJob' :: TranscriptionJob -> Maybe Settings
settings} -> Maybe Settings
settings) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe Settings
a -> TranscriptionJob
s {$sel:settings:TranscriptionJob' :: Maybe Settings
settings = Maybe Settings
a} :: TranscriptionJob)

-- | A timestamp that shows when the job started processing.
transcriptionJob_startTime :: Lens.Lens' TranscriptionJob (Prelude.Maybe Prelude.UTCTime)
transcriptionJob_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_startTime = (TranscriptionJob -> Maybe POSIX)
-> (TranscriptionJob -> Maybe POSIX -> TranscriptionJob)
-> Lens
     TranscriptionJob TranscriptionJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:TranscriptionJob' :: TranscriptionJob -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe POSIX
a -> TranscriptionJob
s {$sel:startTime:TranscriptionJob' :: Maybe POSIX
startTime = Maybe POSIX
a} :: TranscriptionJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> TranscriptionJob -> f TranscriptionJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TranscriptionJob
-> f TranscriptionJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | A timestamp that shows when the job completed.
transcriptionJob_completionTime :: Lens.Lens' TranscriptionJob (Prelude.Maybe Prelude.UTCTime)
transcriptionJob_completionTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_completionTime = (TranscriptionJob -> Maybe POSIX)
-> (TranscriptionJob -> Maybe POSIX -> TranscriptionJob)
-> Lens
     TranscriptionJob TranscriptionJob (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe POSIX
completionTime :: Maybe POSIX
$sel:completionTime:TranscriptionJob' :: TranscriptionJob -> Maybe POSIX
completionTime} -> Maybe POSIX
completionTime) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe POSIX
a -> TranscriptionJob
s {$sel:completionTime:TranscriptionJob' :: Maybe POSIX
completionTime = Maybe POSIX
a} :: TranscriptionJob) ((Maybe POSIX -> f (Maybe POSIX))
 -> TranscriptionJob -> f TranscriptionJob)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TranscriptionJob
-> f TranscriptionJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | An object that describes the input media for the transcription job.
transcriptionJob_media :: Lens.Lens' TranscriptionJob (Prelude.Maybe Media)
transcriptionJob_media :: (Maybe Media -> f (Maybe Media))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_media = (TranscriptionJob -> Maybe Media)
-> (TranscriptionJob -> Maybe Media -> TranscriptionJob)
-> Lens
     TranscriptionJob TranscriptionJob (Maybe Media) (Maybe Media)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe Media
media :: Maybe Media
$sel:media:TranscriptionJob' :: TranscriptionJob -> Maybe Media
media} -> Maybe Media
media) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe Media
a -> TranscriptionJob
s {$sel:media:TranscriptionJob' :: Maybe Media
media = Maybe Media
a} :: TranscriptionJob)

-- | The format of the input media file.
transcriptionJob_mediaFormat :: Lens.Lens' TranscriptionJob (Prelude.Maybe MediaFormat)
transcriptionJob_mediaFormat :: (Maybe MediaFormat -> f (Maybe MediaFormat))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_mediaFormat = (TranscriptionJob -> Maybe MediaFormat)
-> (TranscriptionJob -> Maybe MediaFormat -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe MediaFormat)
     (Maybe MediaFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe MediaFormat
mediaFormat :: Maybe MediaFormat
$sel:mediaFormat:TranscriptionJob' :: TranscriptionJob -> Maybe MediaFormat
mediaFormat} -> Maybe MediaFormat
mediaFormat) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe MediaFormat
a -> TranscriptionJob
s {$sel:mediaFormat:TranscriptionJob' :: Maybe MediaFormat
mediaFormat = Maybe MediaFormat
a} :: TranscriptionJob)

-- | An object containing the details of your custom language model.
transcriptionJob_modelSettings :: Lens.Lens' TranscriptionJob (Prelude.Maybe ModelSettings)
transcriptionJob_modelSettings :: (Maybe ModelSettings -> f (Maybe ModelSettings))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_modelSettings = (TranscriptionJob -> Maybe ModelSettings)
-> (TranscriptionJob -> Maybe ModelSettings -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe ModelSettings)
     (Maybe ModelSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe ModelSettings
modelSettings :: Maybe ModelSettings
$sel:modelSettings:TranscriptionJob' :: TranscriptionJob -> Maybe ModelSettings
modelSettings} -> Maybe ModelSettings
modelSettings) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe ModelSettings
a -> TranscriptionJob
s {$sel:modelSettings:TranscriptionJob' :: Maybe ModelSettings
modelSettings = Maybe ModelSettings
a} :: TranscriptionJob)

-- | The status of the transcription job.
transcriptionJob_transcriptionJobStatus :: Lens.Lens' TranscriptionJob (Prelude.Maybe TranscriptionJobStatus)
transcriptionJob_transcriptionJobStatus :: (Maybe TranscriptionJobStatus -> f (Maybe TranscriptionJobStatus))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_transcriptionJobStatus = (TranscriptionJob -> Maybe TranscriptionJobStatus)
-> (TranscriptionJob
    -> Maybe TranscriptionJobStatus -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe TranscriptionJobStatus)
     (Maybe TranscriptionJobStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe TranscriptionJobStatus
transcriptionJobStatus :: Maybe TranscriptionJobStatus
$sel:transcriptionJobStatus:TranscriptionJob' :: TranscriptionJob -> Maybe TranscriptionJobStatus
transcriptionJobStatus} -> Maybe TranscriptionJobStatus
transcriptionJobStatus) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe TranscriptionJobStatus
a -> TranscriptionJob
s {$sel:transcriptionJobStatus:TranscriptionJob' :: Maybe TranscriptionJobStatus
transcriptionJobStatus = Maybe TranscriptionJobStatus
a} :: TranscriptionJob)

-- | Provides information about how a transcription job is executed.
transcriptionJob_jobExecutionSettings :: Lens.Lens' TranscriptionJob (Prelude.Maybe JobExecutionSettings)
transcriptionJob_jobExecutionSettings :: (Maybe JobExecutionSettings -> f (Maybe JobExecutionSettings))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_jobExecutionSettings = (TranscriptionJob -> Maybe JobExecutionSettings)
-> (TranscriptionJob
    -> Maybe JobExecutionSettings -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe JobExecutionSettings)
     (Maybe JobExecutionSettings)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe JobExecutionSettings
jobExecutionSettings :: Maybe JobExecutionSettings
$sel:jobExecutionSettings:TranscriptionJob' :: TranscriptionJob -> Maybe JobExecutionSettings
jobExecutionSettings} -> Maybe JobExecutionSettings
jobExecutionSettings) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe JobExecutionSettings
a -> TranscriptionJob
s {$sel:jobExecutionSettings:TranscriptionJob' :: Maybe JobExecutionSettings
jobExecutionSettings = Maybe JobExecutionSettings
a} :: TranscriptionJob)

-- | The name of the transcription job.
transcriptionJob_transcriptionJobName :: Lens.Lens' TranscriptionJob (Prelude.Maybe Prelude.Text)
transcriptionJob_transcriptionJobName :: (Maybe Text -> f (Maybe Text))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_transcriptionJobName = (TranscriptionJob -> Maybe Text)
-> (TranscriptionJob -> Maybe Text -> TranscriptionJob)
-> Lens TranscriptionJob TranscriptionJob (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe Text
transcriptionJobName :: Maybe Text
$sel:transcriptionJobName:TranscriptionJob' :: TranscriptionJob -> Maybe Text
transcriptionJobName} -> Maybe Text
transcriptionJobName) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe Text
a -> TranscriptionJob
s {$sel:transcriptionJobName:TranscriptionJob' :: Maybe Text
transcriptionJobName = Maybe Text
a} :: TranscriptionJob)

-- | A value that shows if automatic language identification was enabled for
-- a transcription job.
transcriptionJob_identifyLanguage :: Lens.Lens' TranscriptionJob (Prelude.Maybe Prelude.Bool)
transcriptionJob_identifyLanguage :: (Maybe Bool -> f (Maybe Bool))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_identifyLanguage = (TranscriptionJob -> Maybe Bool)
-> (TranscriptionJob -> Maybe Bool -> TranscriptionJob)
-> Lens TranscriptionJob TranscriptionJob (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe Bool
identifyLanguage :: Maybe Bool
$sel:identifyLanguage:TranscriptionJob' :: TranscriptionJob -> Maybe Bool
identifyLanguage} -> Maybe Bool
identifyLanguage) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe Bool
a -> TranscriptionJob
s {$sel:identifyLanguage:TranscriptionJob' :: Maybe Bool
identifyLanguage = Maybe Bool
a} :: TranscriptionJob)

-- | An object that describes the output of the transcription job.
transcriptionJob_transcript :: Lens.Lens' TranscriptionJob (Prelude.Maybe Transcript)
transcriptionJob_transcript :: (Maybe Transcript -> f (Maybe Transcript))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_transcript = (TranscriptionJob -> Maybe Transcript)
-> (TranscriptionJob -> Maybe Transcript -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe Transcript)
     (Maybe Transcript)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe Transcript
transcript :: Maybe Transcript
$sel:transcript:TranscriptionJob' :: TranscriptionJob -> Maybe Transcript
transcript} -> Maybe Transcript
transcript) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe Transcript
a -> TranscriptionJob
s {$sel:transcript:TranscriptionJob' :: Maybe Transcript
transcript = Maybe Transcript
a} :: TranscriptionJob)

-- | A key:value pair assigned to a given transcription job.
transcriptionJob_tags :: Lens.Lens' TranscriptionJob (Prelude.Maybe (Prelude.NonEmpty Tag))
transcriptionJob_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_tags = (TranscriptionJob -> Maybe (NonEmpty Tag))
-> (TranscriptionJob -> Maybe (NonEmpty Tag) -> TranscriptionJob)
-> Lens
     TranscriptionJob
     TranscriptionJob
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:TranscriptionJob' :: TranscriptionJob -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe (NonEmpty Tag)
a -> TranscriptionJob
s {$sel:tags:TranscriptionJob' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: TranscriptionJob) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
 -> TranscriptionJob -> f TranscriptionJob)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
    -> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> TranscriptionJob
-> f TranscriptionJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
-> Iso
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag) (NonEmpty Tag)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The sample rate, in Hertz, of the audio track in the input media file.
transcriptionJob_mediaSampleRateHertz :: Lens.Lens' TranscriptionJob (Prelude.Maybe Prelude.Natural)
transcriptionJob_mediaSampleRateHertz :: (Maybe Natural -> f (Maybe Natural))
-> TranscriptionJob -> f TranscriptionJob
transcriptionJob_mediaSampleRateHertz = (TranscriptionJob -> Maybe Natural)
-> (TranscriptionJob -> Maybe Natural -> TranscriptionJob)
-> Lens
     TranscriptionJob TranscriptionJob (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TranscriptionJob' {Maybe Natural
mediaSampleRateHertz :: Maybe Natural
$sel:mediaSampleRateHertz:TranscriptionJob' :: TranscriptionJob -> Maybe Natural
mediaSampleRateHertz} -> Maybe Natural
mediaSampleRateHertz) (\s :: TranscriptionJob
s@TranscriptionJob' {} Maybe Natural
a -> TranscriptionJob
s {$sel:mediaSampleRateHertz:TranscriptionJob' :: Maybe Natural
mediaSampleRateHertz = Maybe Natural
a} :: TranscriptionJob)

instance Core.FromJSON TranscriptionJob where
  parseJSON :: Value -> Parser TranscriptionJob
parseJSON =
    String
-> (Object -> Parser TranscriptionJob)
-> Value
-> Parser TranscriptionJob
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"TranscriptionJob"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe ContentRedaction
-> Maybe Double
-> Maybe SubtitlesOutput
-> Maybe LanguageCode
-> Maybe (NonEmpty LanguageCode)
-> Maybe Settings
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Media
-> Maybe MediaFormat
-> Maybe ModelSettings
-> Maybe TranscriptionJobStatus
-> Maybe JobExecutionSettings
-> Maybe Text
-> Maybe Bool
-> Maybe Transcript
-> Maybe (NonEmpty Tag)
-> Maybe Natural
-> TranscriptionJob
TranscriptionJob'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe ContentRedaction
 -> Maybe Double
 -> Maybe SubtitlesOutput
 -> Maybe LanguageCode
 -> Maybe (NonEmpty LanguageCode)
 -> Maybe Settings
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Media
 -> Maybe MediaFormat
 -> Maybe ModelSettings
 -> Maybe TranscriptionJobStatus
 -> Maybe JobExecutionSettings
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Transcript
 -> Maybe (NonEmpty Tag)
 -> Maybe Natural
 -> TranscriptionJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe ContentRedaction
      -> Maybe Double
      -> Maybe SubtitlesOutput
      -> Maybe LanguageCode
      -> Maybe (NonEmpty LanguageCode)
      -> Maybe Settings
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
            Parser
  (Maybe Text
   -> Maybe ContentRedaction
   -> Maybe Double
   -> Maybe SubtitlesOutput
   -> Maybe LanguageCode
   -> Maybe (NonEmpty LanguageCode)
   -> Maybe Settings
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe ContentRedaction
      -> Maybe Double
      -> Maybe SubtitlesOutput
      -> Maybe LanguageCode
      -> Maybe (NonEmpty LanguageCode)
      -> Maybe Settings
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FailureReason")
            Parser
  (Maybe ContentRedaction
   -> Maybe Double
   -> Maybe SubtitlesOutput
   -> Maybe LanguageCode
   -> Maybe (NonEmpty LanguageCode)
   -> Maybe Settings
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe ContentRedaction)
-> Parser
     (Maybe Double
      -> Maybe SubtitlesOutput
      -> Maybe LanguageCode
      -> Maybe (NonEmpty LanguageCode)
      -> Maybe Settings
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContentRedaction)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ContentRedaction")
            Parser
  (Maybe Double
   -> Maybe SubtitlesOutput
   -> Maybe LanguageCode
   -> Maybe (NonEmpty LanguageCode)
   -> Maybe Settings
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe Double)
-> Parser
     (Maybe SubtitlesOutput
      -> Maybe LanguageCode
      -> Maybe (NonEmpty LanguageCode)
      -> Maybe Settings
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IdentifiedLanguageScore")
            Parser
  (Maybe SubtitlesOutput
   -> Maybe LanguageCode
   -> Maybe (NonEmpty LanguageCode)
   -> Maybe Settings
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe SubtitlesOutput)
-> Parser
     (Maybe LanguageCode
      -> Maybe (NonEmpty LanguageCode)
      -> Maybe Settings
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SubtitlesOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Subtitles")
            Parser
  (Maybe LanguageCode
   -> Maybe (NonEmpty LanguageCode)
   -> Maybe Settings
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe LanguageCode)
-> Parser
     (Maybe (NonEmpty LanguageCode)
      -> Maybe Settings
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LanguageCode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LanguageCode")
            Parser
  (Maybe (NonEmpty LanguageCode)
   -> Maybe Settings
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe (NonEmpty LanguageCode))
-> Parser
     (Maybe Settings
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty LanguageCode))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LanguageOptions")
            Parser
  (Maybe Settings
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe Settings)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Settings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Settings")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StartTime")
            Parser
  (Maybe POSIX
   -> Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Media
      -> Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompletionTime")
            Parser
  (Maybe Media
   -> Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe Media)
-> Parser
     (Maybe MediaFormat
      -> Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Media)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Media")
            Parser
  (Maybe MediaFormat
   -> Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe MediaFormat)
-> Parser
     (Maybe ModelSettings
      -> Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MediaFormat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MediaFormat")
            Parser
  (Maybe ModelSettings
   -> Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe ModelSettings)
-> Parser
     (Maybe TranscriptionJobStatus
      -> Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ModelSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ModelSettings")
            Parser
  (Maybe TranscriptionJobStatus
   -> Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe TranscriptionJobStatus)
-> Parser
     (Maybe JobExecutionSettings
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TranscriptionJobStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TranscriptionJobStatus")
            Parser
  (Maybe JobExecutionSettings
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe JobExecutionSettings)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobExecutionSettings)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"JobExecutionSettings")
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Transcript
      -> Maybe (NonEmpty Tag)
      -> Maybe Natural
      -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TranscriptionJobName")
            Parser
  (Maybe Bool
   -> Maybe Transcript
   -> Maybe (NonEmpty Tag)
   -> Maybe Natural
   -> TranscriptionJob)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Transcript
      -> Maybe (NonEmpty Tag) -> Maybe Natural -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IdentifyLanguage")
            Parser
  (Maybe Transcript
   -> Maybe (NonEmpty Tag) -> Maybe Natural -> TranscriptionJob)
-> Parser (Maybe Transcript)
-> Parser
     (Maybe (NonEmpty Tag) -> Maybe Natural -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Transcript)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Transcript")
            Parser (Maybe (NonEmpty Tag) -> Maybe Natural -> TranscriptionJob)
-> Parser (Maybe (NonEmpty Tag))
-> Parser (Maybe Natural -> TranscriptionJob)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Tag))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags")
            Parser (Maybe Natural -> TranscriptionJob)
-> Parser (Maybe Natural) -> Parser TranscriptionJob
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MediaSampleRateHertz")
      )

instance Prelude.Hashable TranscriptionJob

instance Prelude.NFData TranscriptionJob