{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Transcribe.StartMedicalTranscriptionJob
-- 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)
--
-- Starts a batch job to transcribe medical speech to text.
module Amazonka.Transcribe.StartMedicalTranscriptionJob
  ( -- * Creating a Request
    StartMedicalTranscriptionJob (..),
    newStartMedicalTranscriptionJob,

    -- * Request Lenses
    startMedicalTranscriptionJob_settings,
    startMedicalTranscriptionJob_mediaFormat,
    startMedicalTranscriptionJob_outputEncryptionKMSKeyId,
    startMedicalTranscriptionJob_kmsEncryptionContext,
    startMedicalTranscriptionJob_outputKey,
    startMedicalTranscriptionJob_contentIdentificationType,
    startMedicalTranscriptionJob_tags,
    startMedicalTranscriptionJob_mediaSampleRateHertz,
    startMedicalTranscriptionJob_medicalTranscriptionJobName,
    startMedicalTranscriptionJob_languageCode,
    startMedicalTranscriptionJob_media,
    startMedicalTranscriptionJob_outputBucketName,
    startMedicalTranscriptionJob_specialty,
    startMedicalTranscriptionJob_type,

    -- * Destructuring the Response
    StartMedicalTranscriptionJobResponse (..),
    newStartMedicalTranscriptionJobResponse,

    -- * Response Lenses
    startMedicalTranscriptionJobResponse_medicalTranscriptionJob,
    startMedicalTranscriptionJobResponse_httpStatus,
  )
where

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

-- | /See:/ 'newStartMedicalTranscriptionJob' smart constructor.
data StartMedicalTranscriptionJob = StartMedicalTranscriptionJob'
  { -- | Optional settings for the medical transcription job.
    StartMedicalTranscriptionJob -> Maybe MedicalTranscriptionSetting
settings :: Prelude.Maybe MedicalTranscriptionSetting,
    -- | The audio format of the input media file.
    StartMedicalTranscriptionJob -> Maybe MediaFormat
mediaFormat :: Prelude.Maybe MediaFormat,
    -- | The Amazon Resource Name (ARN) of the Amazon Web Services Key Management
    -- Service (KMS) key used to encrypt the output of the transcription job.
    -- The user calling the StartMedicalTranscriptionJob operation must have
    -- permission to use the specified KMS key.
    --
    -- You use either of the following to identify a KMS key in the current
    -- account:
    --
    -- -   KMS Key ID: \"1234abcd-12ab-34cd-56ef-1234567890ab\"
    --
    -- -   KMS Key Alias: \"alias\/ExampleAlias\"
    --
    -- You can use either of the following to identify a KMS key in the current
    -- account or another account:
    --
    -- -   Amazon Resource Name (ARN) of a KMS key in the current account or
    --     another account: \"arn:aws:kms:region:account
    --     ID:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"
    --
    -- -   ARN of a KMS Key Alias: \"arn:aws:kms:region:account
    --     ID:alias\/ExampleAlias\"
    --
    -- If you don\'t specify an encryption key, the output of the medical
    -- transcription job is encrypted with the default Amazon S3 key (SSE-S3).
    --
    -- If you specify a KMS key to encrypt your output, you must also specify
    -- an output location in the @OutputBucketName@ parameter.
    StartMedicalTranscriptionJob -> Maybe Text
outputEncryptionKMSKeyId :: Prelude.Maybe Prelude.Text,
    -- | A map of plain text, non-secret key:value pairs, known as encryption
    -- context pairs, that provide an added layer of security for your data.
    StartMedicalTranscriptionJob -> Maybe (HashMap Text Text)
kmsEncryptionContext :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | You can specify a location in an Amazon S3 bucket to store the output of
    -- your medical transcription job.
    --
    -- If you don\'t specify an output key, Amazon Transcribe Medical stores
    -- the output of your transcription job in the Amazon S3 bucket you
    -- specified. By default, the object key is
    -- \"your-transcription-job-name.json\".
    --
    -- You can use output keys to specify the Amazon S3 prefix and file name of
    -- the transcription output. For example, specifying the Amazon S3 prefix,
    -- \"folder1\/folder2\/\", as an output key would lead to the output being
    -- stored as \"folder1\/folder2\/your-transcription-job-name.json\". If you
    -- specify \"my-other-job-name.json\" as the output key, the object key is
    -- changed to \"my-other-job-name.json\". You can use an output key to
    -- change both the prefix and the file name, for example
    -- \"folder\/my-other-job-name.json\".
    --
    -- If you specify an output key, you must also specify an S3 bucket in the
    -- @OutputBucketName@ parameter.
    StartMedicalTranscriptionJob -> Maybe Text
outputKey :: Prelude.Maybe Prelude.Text,
    -- | You can configure Amazon Transcribe Medical to label content in the
    -- transcription output. If you specify @PHI@, Amazon Transcribe Medical
    -- labels the personal health information (PHI) that it identifies in the
    -- transcription output.
    StartMedicalTranscriptionJob
-> Maybe MedicalContentIdentificationType
contentIdentificationType :: Prelude.Maybe MedicalContentIdentificationType,
    -- | Add tags to an Amazon Transcribe medical transcription job.
    StartMedicalTranscriptionJob -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The sample rate, in Hertz, of the audio track in the input media file.
    --
    -- If you do not specify the media sample rate, Amazon Transcribe Medical
    -- determines the sample rate. If you specify the sample rate, it must
    -- match the rate detected by Amazon Transcribe Medical. In most cases, you
    -- should leave the @MediaSampleRateHertz@ field blank and let Amazon
    -- Transcribe Medical determine the sample rate.
    StartMedicalTranscriptionJob -> Maybe Natural
mediaSampleRateHertz :: Prelude.Maybe Prelude.Natural,
    -- | The name of the medical transcription job. You can\'t use the strings
    -- \"@.@\" or \"@..@\" by themselves as the job name. The name must also be
    -- unique within an Amazon Web Services account. If you try to create a
    -- medical transcription job with the same name as a previous medical
    -- transcription job, you get a @ConflictException@ error.
    StartMedicalTranscriptionJob -> Text
medicalTranscriptionJobName :: Prelude.Text,
    -- | The language code for the language spoken in the input media file. US
    -- English (en-US) is the valid value for medical transcription jobs. Any
    -- other value you enter for language code results in a
    -- @BadRequestException@ error.
    StartMedicalTranscriptionJob -> LanguageCode
languageCode :: LanguageCode,
    StartMedicalTranscriptionJob -> Media
media :: Media,
    -- | The Amazon S3 location where the transcription is stored.
    --
    -- You must set @OutputBucketName@ for Amazon Transcribe Medical to store
    -- the transcription results. Your transcript appears in the S3 location
    -- you specify. When you call the GetMedicalTranscriptionJob, the operation
    -- returns this location in the @TranscriptFileUri@ field. The S3 bucket
    -- must have permissions that allow Amazon Transcribe Medical to put files
    -- in the bucket. For more information, see
    -- <https://docs.aws.amazon.com/transcribe/latest/dg/security_iam_id-based-policy-examples.html#auth-role-iam-user Permissions Required for IAM User Roles>.
    --
    -- You can specify an Amazon Web Services Key Management Service (KMS) key
    -- to encrypt the output of your transcription using the
    -- @OutputEncryptionKMSKeyId@ parameter. If you don\'t specify a KMS key,
    -- Amazon Transcribe Medical uses the default Amazon S3 key for server-side
    -- encryption of transcripts that are placed in your S3 bucket.
    StartMedicalTranscriptionJob -> Text
outputBucketName :: Prelude.Text,
    -- | The medical specialty of any clinician speaking in the input media.
    StartMedicalTranscriptionJob -> Specialty
specialty :: Specialty,
    -- | The type of speech in the input audio. @CONVERSATION@ refers to
    -- conversations between two or more speakers, e.g., a conversations
    -- between doctors and patients. @DICTATION@ refers to single-speaker
    -- dictated speech, such as clinical notes.
    StartMedicalTranscriptionJob -> Type
type' :: Type
  }
  deriving (StartMedicalTranscriptionJob
-> StartMedicalTranscriptionJob -> Bool
(StartMedicalTranscriptionJob
 -> StartMedicalTranscriptionJob -> Bool)
-> (StartMedicalTranscriptionJob
    -> StartMedicalTranscriptionJob -> Bool)
-> Eq StartMedicalTranscriptionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartMedicalTranscriptionJob
-> StartMedicalTranscriptionJob -> Bool
$c/= :: StartMedicalTranscriptionJob
-> StartMedicalTranscriptionJob -> Bool
== :: StartMedicalTranscriptionJob
-> StartMedicalTranscriptionJob -> Bool
$c== :: StartMedicalTranscriptionJob
-> StartMedicalTranscriptionJob -> Bool
Prelude.Eq, ReadPrec [StartMedicalTranscriptionJob]
ReadPrec StartMedicalTranscriptionJob
Int -> ReadS StartMedicalTranscriptionJob
ReadS [StartMedicalTranscriptionJob]
(Int -> ReadS StartMedicalTranscriptionJob)
-> ReadS [StartMedicalTranscriptionJob]
-> ReadPrec StartMedicalTranscriptionJob
-> ReadPrec [StartMedicalTranscriptionJob]
-> Read StartMedicalTranscriptionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartMedicalTranscriptionJob]
$creadListPrec :: ReadPrec [StartMedicalTranscriptionJob]
readPrec :: ReadPrec StartMedicalTranscriptionJob
$creadPrec :: ReadPrec StartMedicalTranscriptionJob
readList :: ReadS [StartMedicalTranscriptionJob]
$creadList :: ReadS [StartMedicalTranscriptionJob]
readsPrec :: Int -> ReadS StartMedicalTranscriptionJob
$creadsPrec :: Int -> ReadS StartMedicalTranscriptionJob
Prelude.Read, Int -> StartMedicalTranscriptionJob -> ShowS
[StartMedicalTranscriptionJob] -> ShowS
StartMedicalTranscriptionJob -> String
(Int -> StartMedicalTranscriptionJob -> ShowS)
-> (StartMedicalTranscriptionJob -> String)
-> ([StartMedicalTranscriptionJob] -> ShowS)
-> Show StartMedicalTranscriptionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartMedicalTranscriptionJob] -> ShowS
$cshowList :: [StartMedicalTranscriptionJob] -> ShowS
show :: StartMedicalTranscriptionJob -> String
$cshow :: StartMedicalTranscriptionJob -> String
showsPrec :: Int -> StartMedicalTranscriptionJob -> ShowS
$cshowsPrec :: Int -> StartMedicalTranscriptionJob -> ShowS
Prelude.Show, (forall x.
 StartMedicalTranscriptionJob -> Rep StartMedicalTranscriptionJob x)
-> (forall x.
    Rep StartMedicalTranscriptionJob x -> StartMedicalTranscriptionJob)
-> Generic StartMedicalTranscriptionJob
forall x.
Rep StartMedicalTranscriptionJob x -> StartMedicalTranscriptionJob
forall x.
StartMedicalTranscriptionJob -> Rep StartMedicalTranscriptionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartMedicalTranscriptionJob x -> StartMedicalTranscriptionJob
$cfrom :: forall x.
StartMedicalTranscriptionJob -> Rep StartMedicalTranscriptionJob x
Prelude.Generic)

-- |
-- Create a value of 'StartMedicalTranscriptionJob' 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:
--
-- 'settings', 'startMedicalTranscriptionJob_settings' - Optional settings for the medical transcription job.
--
-- 'mediaFormat', 'startMedicalTranscriptionJob_mediaFormat' - The audio format of the input media file.
--
-- 'outputEncryptionKMSKeyId', 'startMedicalTranscriptionJob_outputEncryptionKMSKeyId' - The Amazon Resource Name (ARN) of the Amazon Web Services Key Management
-- Service (KMS) key used to encrypt the output of the transcription job.
-- The user calling the StartMedicalTranscriptionJob operation must have
-- permission to use the specified KMS key.
--
-- You use either of the following to identify a KMS key in the current
-- account:
--
-- -   KMS Key ID: \"1234abcd-12ab-34cd-56ef-1234567890ab\"
--
-- -   KMS Key Alias: \"alias\/ExampleAlias\"
--
-- You can use either of the following to identify a KMS key in the current
-- account or another account:
--
-- -   Amazon Resource Name (ARN) of a KMS key in the current account or
--     another account: \"arn:aws:kms:region:account
--     ID:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"
--
-- -   ARN of a KMS Key Alias: \"arn:aws:kms:region:account
--     ID:alias\/ExampleAlias\"
--
-- If you don\'t specify an encryption key, the output of the medical
-- transcription job is encrypted with the default Amazon S3 key (SSE-S3).
--
-- If you specify a KMS key to encrypt your output, you must also specify
-- an output location in the @OutputBucketName@ parameter.
--
-- 'kmsEncryptionContext', 'startMedicalTranscriptionJob_kmsEncryptionContext' - A map of plain text, non-secret key:value pairs, known as encryption
-- context pairs, that provide an added layer of security for your data.
--
-- 'outputKey', 'startMedicalTranscriptionJob_outputKey' - You can specify a location in an Amazon S3 bucket to store the output of
-- your medical transcription job.
--
-- If you don\'t specify an output key, Amazon Transcribe Medical stores
-- the output of your transcription job in the Amazon S3 bucket you
-- specified. By default, the object key is
-- \"your-transcription-job-name.json\".
--
-- You can use output keys to specify the Amazon S3 prefix and file name of
-- the transcription output. For example, specifying the Amazon S3 prefix,
-- \"folder1\/folder2\/\", as an output key would lead to the output being
-- stored as \"folder1\/folder2\/your-transcription-job-name.json\". If you
-- specify \"my-other-job-name.json\" as the output key, the object key is
-- changed to \"my-other-job-name.json\". You can use an output key to
-- change both the prefix and the file name, for example
-- \"folder\/my-other-job-name.json\".
--
-- If you specify an output key, you must also specify an S3 bucket in the
-- @OutputBucketName@ parameter.
--
-- 'contentIdentificationType', 'startMedicalTranscriptionJob_contentIdentificationType' - You can configure Amazon Transcribe Medical to label content in the
-- transcription output. If you specify @PHI@, Amazon Transcribe Medical
-- labels the personal health information (PHI) that it identifies in the
-- transcription output.
--
-- 'tags', 'startMedicalTranscriptionJob_tags' - Add tags to an Amazon Transcribe medical transcription job.
--
-- 'mediaSampleRateHertz', 'startMedicalTranscriptionJob_mediaSampleRateHertz' - The sample rate, in Hertz, of the audio track in the input media file.
--
-- If you do not specify the media sample rate, Amazon Transcribe Medical
-- determines the sample rate. If you specify the sample rate, it must
-- match the rate detected by Amazon Transcribe Medical. In most cases, you
-- should leave the @MediaSampleRateHertz@ field blank and let Amazon
-- Transcribe Medical determine the sample rate.
--
-- 'medicalTranscriptionJobName', 'startMedicalTranscriptionJob_medicalTranscriptionJobName' - The name of the medical transcription job. You can\'t use the strings
-- \"@.@\" or \"@..@\" by themselves as the job name. The name must also be
-- unique within an Amazon Web Services account. If you try to create a
-- medical transcription job with the same name as a previous medical
-- transcription job, you get a @ConflictException@ error.
--
-- 'languageCode', 'startMedicalTranscriptionJob_languageCode' - The language code for the language spoken in the input media file. US
-- English (en-US) is the valid value for medical transcription jobs. Any
-- other value you enter for language code results in a
-- @BadRequestException@ error.
--
-- 'media', 'startMedicalTranscriptionJob_media' - Undocumented member.
--
-- 'outputBucketName', 'startMedicalTranscriptionJob_outputBucketName' - The Amazon S3 location where the transcription is stored.
--
-- You must set @OutputBucketName@ for Amazon Transcribe Medical to store
-- the transcription results. Your transcript appears in the S3 location
-- you specify. When you call the GetMedicalTranscriptionJob, the operation
-- returns this location in the @TranscriptFileUri@ field. The S3 bucket
-- must have permissions that allow Amazon Transcribe Medical to put files
-- in the bucket. For more information, see
-- <https://docs.aws.amazon.com/transcribe/latest/dg/security_iam_id-based-policy-examples.html#auth-role-iam-user Permissions Required for IAM User Roles>.
--
-- You can specify an Amazon Web Services Key Management Service (KMS) key
-- to encrypt the output of your transcription using the
-- @OutputEncryptionKMSKeyId@ parameter. If you don\'t specify a KMS key,
-- Amazon Transcribe Medical uses the default Amazon S3 key for server-side
-- encryption of transcripts that are placed in your S3 bucket.
--
-- 'specialty', 'startMedicalTranscriptionJob_specialty' - The medical specialty of any clinician speaking in the input media.
--
-- 'type'', 'startMedicalTranscriptionJob_type' - The type of speech in the input audio. @CONVERSATION@ refers to
-- conversations between two or more speakers, e.g., a conversations
-- between doctors and patients. @DICTATION@ refers to single-speaker
-- dictated speech, such as clinical notes.
newStartMedicalTranscriptionJob ::
  -- | 'medicalTranscriptionJobName'
  Prelude.Text ->
  -- | 'languageCode'
  LanguageCode ->
  -- | 'media'
  Media ->
  -- | 'outputBucketName'
  Prelude.Text ->
  -- | 'specialty'
  Specialty ->
  -- | 'type''
  Type ->
  StartMedicalTranscriptionJob
newStartMedicalTranscriptionJob :: Text
-> LanguageCode
-> Media
-> Text
-> Specialty
-> Type
-> StartMedicalTranscriptionJob
newStartMedicalTranscriptionJob
  Text
pMedicalTranscriptionJobName_
  LanguageCode
pLanguageCode_
  Media
pMedia_
  Text
pOutputBucketName_
  Specialty
pSpecialty_
  Type
pType_ =
    StartMedicalTranscriptionJob' :: Maybe MedicalTranscriptionSetting
-> Maybe MediaFormat
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe MedicalContentIdentificationType
-> Maybe (NonEmpty Tag)
-> Maybe Natural
-> Text
-> LanguageCode
-> Media
-> Text
-> Specialty
-> Type
-> StartMedicalTranscriptionJob
StartMedicalTranscriptionJob'
      { $sel:settings:StartMedicalTranscriptionJob' :: Maybe MedicalTranscriptionSetting
settings =
          Maybe MedicalTranscriptionSetting
forall a. Maybe a
Prelude.Nothing,
        $sel:mediaFormat:StartMedicalTranscriptionJob' :: Maybe MediaFormat
mediaFormat = Maybe MediaFormat
forall a. Maybe a
Prelude.Nothing,
        $sel:outputEncryptionKMSKeyId:StartMedicalTranscriptionJob' :: Maybe Text
outputEncryptionKMSKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsEncryptionContext:StartMedicalTranscriptionJob' :: Maybe (HashMap Text Text)
kmsEncryptionContext = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:outputKey:StartMedicalTranscriptionJob' :: Maybe Text
outputKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:contentIdentificationType:StartMedicalTranscriptionJob' :: Maybe MedicalContentIdentificationType
contentIdentificationType = Maybe MedicalContentIdentificationType
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:StartMedicalTranscriptionJob' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
forall a. Maybe a
Prelude.Nothing,
        $sel:mediaSampleRateHertz:StartMedicalTranscriptionJob' :: Maybe Natural
mediaSampleRateHertz = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:medicalTranscriptionJobName:StartMedicalTranscriptionJob' :: Text
medicalTranscriptionJobName =
          Text
pMedicalTranscriptionJobName_,
        $sel:languageCode:StartMedicalTranscriptionJob' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_,
        $sel:media:StartMedicalTranscriptionJob' :: Media
media = Media
pMedia_,
        $sel:outputBucketName:StartMedicalTranscriptionJob' :: Text
outputBucketName = Text
pOutputBucketName_,
        $sel:specialty:StartMedicalTranscriptionJob' :: Specialty
specialty = Specialty
pSpecialty_,
        $sel:type':StartMedicalTranscriptionJob' :: Type
type' = Type
pType_
      }

-- | Optional settings for the medical transcription job.
startMedicalTranscriptionJob_settings :: Lens.Lens' StartMedicalTranscriptionJob (Prelude.Maybe MedicalTranscriptionSetting)
startMedicalTranscriptionJob_settings :: (Maybe MedicalTranscriptionSetting
 -> f (Maybe MedicalTranscriptionSetting))
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_settings = (StartMedicalTranscriptionJob -> Maybe MedicalTranscriptionSetting)
-> (StartMedicalTranscriptionJob
    -> Maybe MedicalTranscriptionSetting
    -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     (Maybe MedicalTranscriptionSetting)
     (Maybe MedicalTranscriptionSetting)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Maybe MedicalTranscriptionSetting
settings :: Maybe MedicalTranscriptionSetting
$sel:settings:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe MedicalTranscriptionSetting
settings} -> Maybe MedicalTranscriptionSetting
settings) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Maybe MedicalTranscriptionSetting
a -> StartMedicalTranscriptionJob
s {$sel:settings:StartMedicalTranscriptionJob' :: Maybe MedicalTranscriptionSetting
settings = Maybe MedicalTranscriptionSetting
a} :: StartMedicalTranscriptionJob)

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

-- | The Amazon Resource Name (ARN) of the Amazon Web Services Key Management
-- Service (KMS) key used to encrypt the output of the transcription job.
-- The user calling the StartMedicalTranscriptionJob operation must have
-- permission to use the specified KMS key.
--
-- You use either of the following to identify a KMS key in the current
-- account:
--
-- -   KMS Key ID: \"1234abcd-12ab-34cd-56ef-1234567890ab\"
--
-- -   KMS Key Alias: \"alias\/ExampleAlias\"
--
-- You can use either of the following to identify a KMS key in the current
-- account or another account:
--
-- -   Amazon Resource Name (ARN) of a KMS key in the current account or
--     another account: \"arn:aws:kms:region:account
--     ID:key\/1234abcd-12ab-34cd-56ef-1234567890ab\"
--
-- -   ARN of a KMS Key Alias: \"arn:aws:kms:region:account
--     ID:alias\/ExampleAlias\"
--
-- If you don\'t specify an encryption key, the output of the medical
-- transcription job is encrypted with the default Amazon S3 key (SSE-S3).
--
-- If you specify a KMS key to encrypt your output, you must also specify
-- an output location in the @OutputBucketName@ parameter.
startMedicalTranscriptionJob_outputEncryptionKMSKeyId :: Lens.Lens' StartMedicalTranscriptionJob (Prelude.Maybe Prelude.Text)
startMedicalTranscriptionJob_outputEncryptionKMSKeyId :: (Maybe Text -> f (Maybe Text))
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_outputEncryptionKMSKeyId = (StartMedicalTranscriptionJob -> Maybe Text)
-> (StartMedicalTranscriptionJob
    -> Maybe Text -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Maybe Text
outputEncryptionKMSKeyId :: Maybe Text
$sel:outputEncryptionKMSKeyId:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe Text
outputEncryptionKMSKeyId} -> Maybe Text
outputEncryptionKMSKeyId) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Maybe Text
a -> StartMedicalTranscriptionJob
s {$sel:outputEncryptionKMSKeyId:StartMedicalTranscriptionJob' :: Maybe Text
outputEncryptionKMSKeyId = Maybe Text
a} :: StartMedicalTranscriptionJob)

-- | A map of plain text, non-secret key:value pairs, known as encryption
-- context pairs, that provide an added layer of security for your data.
startMedicalTranscriptionJob_kmsEncryptionContext :: Lens.Lens' StartMedicalTranscriptionJob (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startMedicalTranscriptionJob_kmsEncryptionContext :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_kmsEncryptionContext = (StartMedicalTranscriptionJob -> Maybe (HashMap Text Text))
-> (StartMedicalTranscriptionJob
    -> Maybe (HashMap Text Text) -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Maybe (HashMap Text Text)
kmsEncryptionContext :: Maybe (HashMap Text Text)
$sel:kmsEncryptionContext:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe (HashMap Text Text)
kmsEncryptionContext} -> Maybe (HashMap Text Text)
kmsEncryptionContext) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Maybe (HashMap Text Text)
a -> StartMedicalTranscriptionJob
s {$sel:kmsEncryptionContext:StartMedicalTranscriptionJob' :: Maybe (HashMap Text Text)
kmsEncryptionContext = Maybe (HashMap Text Text)
a} :: StartMedicalTranscriptionJob) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StartMedicalTranscriptionJob
-> f StartMedicalTranscriptionJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | You can specify a location in an Amazon S3 bucket to store the output of
-- your medical transcription job.
--
-- If you don\'t specify an output key, Amazon Transcribe Medical stores
-- the output of your transcription job in the Amazon S3 bucket you
-- specified. By default, the object key is
-- \"your-transcription-job-name.json\".
--
-- You can use output keys to specify the Amazon S3 prefix and file name of
-- the transcription output. For example, specifying the Amazon S3 prefix,
-- \"folder1\/folder2\/\", as an output key would lead to the output being
-- stored as \"folder1\/folder2\/your-transcription-job-name.json\". If you
-- specify \"my-other-job-name.json\" as the output key, the object key is
-- changed to \"my-other-job-name.json\". You can use an output key to
-- change both the prefix and the file name, for example
-- \"folder\/my-other-job-name.json\".
--
-- If you specify an output key, you must also specify an S3 bucket in the
-- @OutputBucketName@ parameter.
startMedicalTranscriptionJob_outputKey :: Lens.Lens' StartMedicalTranscriptionJob (Prelude.Maybe Prelude.Text)
startMedicalTranscriptionJob_outputKey :: (Maybe Text -> f (Maybe Text))
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_outputKey = (StartMedicalTranscriptionJob -> Maybe Text)
-> (StartMedicalTranscriptionJob
    -> Maybe Text -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Maybe Text
outputKey :: Maybe Text
$sel:outputKey:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe Text
outputKey} -> Maybe Text
outputKey) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Maybe Text
a -> StartMedicalTranscriptionJob
s {$sel:outputKey:StartMedicalTranscriptionJob' :: Maybe Text
outputKey = Maybe Text
a} :: StartMedicalTranscriptionJob)

-- | You can configure Amazon Transcribe Medical to label content in the
-- transcription output. If you specify @PHI@, Amazon Transcribe Medical
-- labels the personal health information (PHI) that it identifies in the
-- transcription output.
startMedicalTranscriptionJob_contentIdentificationType :: Lens.Lens' StartMedicalTranscriptionJob (Prelude.Maybe MedicalContentIdentificationType)
startMedicalTranscriptionJob_contentIdentificationType :: (Maybe MedicalContentIdentificationType
 -> f (Maybe MedicalContentIdentificationType))
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_contentIdentificationType = (StartMedicalTranscriptionJob
 -> Maybe MedicalContentIdentificationType)
-> (StartMedicalTranscriptionJob
    -> Maybe MedicalContentIdentificationType
    -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     (Maybe MedicalContentIdentificationType)
     (Maybe MedicalContentIdentificationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Maybe MedicalContentIdentificationType
contentIdentificationType :: Maybe MedicalContentIdentificationType
$sel:contentIdentificationType:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob
-> Maybe MedicalContentIdentificationType
contentIdentificationType} -> Maybe MedicalContentIdentificationType
contentIdentificationType) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Maybe MedicalContentIdentificationType
a -> StartMedicalTranscriptionJob
s {$sel:contentIdentificationType:StartMedicalTranscriptionJob' :: Maybe MedicalContentIdentificationType
contentIdentificationType = Maybe MedicalContentIdentificationType
a} :: StartMedicalTranscriptionJob)

-- | Add tags to an Amazon Transcribe medical transcription job.
startMedicalTranscriptionJob_tags :: Lens.Lens' StartMedicalTranscriptionJob (Prelude.Maybe (Prelude.NonEmpty Tag))
startMedicalTranscriptionJob_tags :: (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_tags = (StartMedicalTranscriptionJob -> Maybe (NonEmpty Tag))
-> (StartMedicalTranscriptionJob
    -> Maybe (NonEmpty Tag) -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     (Maybe (NonEmpty Tag))
     (Maybe (NonEmpty Tag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Maybe (NonEmpty Tag)
a -> StartMedicalTranscriptionJob
s {$sel:tags:StartMedicalTranscriptionJob' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: StartMedicalTranscriptionJob) ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
 -> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob)
-> ((Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
    -> Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> (Maybe (NonEmpty Tag) -> f (Maybe (NonEmpty Tag)))
-> StartMedicalTranscriptionJob
-> f StartMedicalTranscriptionJob
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.
--
-- If you do not specify the media sample rate, Amazon Transcribe Medical
-- determines the sample rate. If you specify the sample rate, it must
-- match the rate detected by Amazon Transcribe Medical. In most cases, you
-- should leave the @MediaSampleRateHertz@ field blank and let Amazon
-- Transcribe Medical determine the sample rate.
startMedicalTranscriptionJob_mediaSampleRateHertz :: Lens.Lens' StartMedicalTranscriptionJob (Prelude.Maybe Prelude.Natural)
startMedicalTranscriptionJob_mediaSampleRateHertz :: (Maybe Natural -> f (Maybe Natural))
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_mediaSampleRateHertz = (StartMedicalTranscriptionJob -> Maybe Natural)
-> (StartMedicalTranscriptionJob
    -> Maybe Natural -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Maybe Natural
mediaSampleRateHertz :: Maybe Natural
$sel:mediaSampleRateHertz:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe Natural
mediaSampleRateHertz} -> Maybe Natural
mediaSampleRateHertz) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Maybe Natural
a -> StartMedicalTranscriptionJob
s {$sel:mediaSampleRateHertz:StartMedicalTranscriptionJob' :: Maybe Natural
mediaSampleRateHertz = Maybe Natural
a} :: StartMedicalTranscriptionJob)

-- | The name of the medical transcription job. You can\'t use the strings
-- \"@.@\" or \"@..@\" by themselves as the job name. The name must also be
-- unique within an Amazon Web Services account. If you try to create a
-- medical transcription job with the same name as a previous medical
-- transcription job, you get a @ConflictException@ error.
startMedicalTranscriptionJob_medicalTranscriptionJobName :: Lens.Lens' StartMedicalTranscriptionJob Prelude.Text
startMedicalTranscriptionJob_medicalTranscriptionJobName :: (Text -> f Text)
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_medicalTranscriptionJobName = (StartMedicalTranscriptionJob -> Text)
-> (StartMedicalTranscriptionJob
    -> Text -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob StartMedicalTranscriptionJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Text
medicalTranscriptionJobName :: Text
$sel:medicalTranscriptionJobName:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Text
medicalTranscriptionJobName} -> Text
medicalTranscriptionJobName) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Text
a -> StartMedicalTranscriptionJob
s {$sel:medicalTranscriptionJobName:StartMedicalTranscriptionJob' :: Text
medicalTranscriptionJobName = Text
a} :: StartMedicalTranscriptionJob)

-- | The language code for the language spoken in the input media file. US
-- English (en-US) is the valid value for medical transcription jobs. Any
-- other value you enter for language code results in a
-- @BadRequestException@ error.
startMedicalTranscriptionJob_languageCode :: Lens.Lens' StartMedicalTranscriptionJob LanguageCode
startMedicalTranscriptionJob_languageCode :: (LanguageCode -> f LanguageCode)
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_languageCode = (StartMedicalTranscriptionJob -> LanguageCode)
-> (StartMedicalTranscriptionJob
    -> LanguageCode -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     LanguageCode
     LanguageCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} LanguageCode
a -> StartMedicalTranscriptionJob
s {$sel:languageCode:StartMedicalTranscriptionJob' :: LanguageCode
languageCode = LanguageCode
a} :: StartMedicalTranscriptionJob)

-- | Undocumented member.
startMedicalTranscriptionJob_media :: Lens.Lens' StartMedicalTranscriptionJob Media
startMedicalTranscriptionJob_media :: (Media -> f Media)
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_media = (StartMedicalTranscriptionJob -> Media)
-> (StartMedicalTranscriptionJob
    -> Media -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     Media
     Media
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Media
media :: Media
$sel:media:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Media
media} -> Media
media) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Media
a -> StartMedicalTranscriptionJob
s {$sel:media:StartMedicalTranscriptionJob' :: Media
media = Media
a} :: StartMedicalTranscriptionJob)

-- | The Amazon S3 location where the transcription is stored.
--
-- You must set @OutputBucketName@ for Amazon Transcribe Medical to store
-- the transcription results. Your transcript appears in the S3 location
-- you specify. When you call the GetMedicalTranscriptionJob, the operation
-- returns this location in the @TranscriptFileUri@ field. The S3 bucket
-- must have permissions that allow Amazon Transcribe Medical to put files
-- in the bucket. For more information, see
-- <https://docs.aws.amazon.com/transcribe/latest/dg/security_iam_id-based-policy-examples.html#auth-role-iam-user Permissions Required for IAM User Roles>.
--
-- You can specify an Amazon Web Services Key Management Service (KMS) key
-- to encrypt the output of your transcription using the
-- @OutputEncryptionKMSKeyId@ parameter. If you don\'t specify a KMS key,
-- Amazon Transcribe Medical uses the default Amazon S3 key for server-side
-- encryption of transcripts that are placed in your S3 bucket.
startMedicalTranscriptionJob_outputBucketName :: Lens.Lens' StartMedicalTranscriptionJob Prelude.Text
startMedicalTranscriptionJob_outputBucketName :: (Text -> f Text)
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_outputBucketName = (StartMedicalTranscriptionJob -> Text)
-> (StartMedicalTranscriptionJob
    -> Text -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob StartMedicalTranscriptionJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Text
outputBucketName :: Text
$sel:outputBucketName:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Text
outputBucketName} -> Text
outputBucketName) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Text
a -> StartMedicalTranscriptionJob
s {$sel:outputBucketName:StartMedicalTranscriptionJob' :: Text
outputBucketName = Text
a} :: StartMedicalTranscriptionJob)

-- | The medical specialty of any clinician speaking in the input media.
startMedicalTranscriptionJob_specialty :: Lens.Lens' StartMedicalTranscriptionJob Specialty
startMedicalTranscriptionJob_specialty :: (Specialty -> f Specialty)
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_specialty = (StartMedicalTranscriptionJob -> Specialty)
-> (StartMedicalTranscriptionJob
    -> Specialty -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob
     StartMedicalTranscriptionJob
     Specialty
     Specialty
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Specialty
specialty :: Specialty
$sel:specialty:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Specialty
specialty} -> Specialty
specialty) (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Specialty
a -> StartMedicalTranscriptionJob
s {$sel:specialty:StartMedicalTranscriptionJob' :: Specialty
specialty = Specialty
a} :: StartMedicalTranscriptionJob)

-- | The type of speech in the input audio. @CONVERSATION@ refers to
-- conversations between two or more speakers, e.g., a conversations
-- between doctors and patients. @DICTATION@ refers to single-speaker
-- dictated speech, such as clinical notes.
startMedicalTranscriptionJob_type :: Lens.Lens' StartMedicalTranscriptionJob Type
startMedicalTranscriptionJob_type :: (Type -> f Type)
-> StartMedicalTranscriptionJob -> f StartMedicalTranscriptionJob
startMedicalTranscriptionJob_type = (StartMedicalTranscriptionJob -> Type)
-> (StartMedicalTranscriptionJob
    -> Type -> StartMedicalTranscriptionJob)
-> Lens
     StartMedicalTranscriptionJob StartMedicalTranscriptionJob Type Type
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJob' {Type
type' :: Type
$sel:type':StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Type
type'} -> Type
type') (\s :: StartMedicalTranscriptionJob
s@StartMedicalTranscriptionJob' {} Type
a -> StartMedicalTranscriptionJob
s {$sel:type':StartMedicalTranscriptionJob' :: Type
type' = Type
a} :: StartMedicalTranscriptionJob)

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

instance
  Prelude.Hashable
    StartMedicalTranscriptionJob

instance Prelude.NFData StartMedicalTranscriptionJob

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

instance Core.ToJSON StartMedicalTranscriptionJob where
  toJSON :: StartMedicalTranscriptionJob -> Value
toJSON StartMedicalTranscriptionJob' {Maybe Natural
Maybe (NonEmpty Tag)
Maybe Text
Maybe (HashMap Text Text)
Maybe MediaFormat
Maybe MedicalContentIdentificationType
Maybe MedicalTranscriptionSetting
Text
LanguageCode
Media
Specialty
Type
type' :: Type
specialty :: Specialty
outputBucketName :: Text
media :: Media
languageCode :: LanguageCode
medicalTranscriptionJobName :: Text
mediaSampleRateHertz :: Maybe Natural
tags :: Maybe (NonEmpty Tag)
contentIdentificationType :: Maybe MedicalContentIdentificationType
outputKey :: Maybe Text
kmsEncryptionContext :: Maybe (HashMap Text Text)
outputEncryptionKMSKeyId :: Maybe Text
mediaFormat :: Maybe MediaFormat
settings :: Maybe MedicalTranscriptionSetting
$sel:type':StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Type
$sel:specialty:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Specialty
$sel:outputBucketName:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Text
$sel:media:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Media
$sel:languageCode:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> LanguageCode
$sel:medicalTranscriptionJobName:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Text
$sel:mediaSampleRateHertz:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe Natural
$sel:tags:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe (NonEmpty Tag)
$sel:contentIdentificationType:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob
-> Maybe MedicalContentIdentificationType
$sel:outputKey:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe Text
$sel:kmsEncryptionContext:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe (HashMap Text Text)
$sel:outputEncryptionKMSKeyId:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe Text
$sel:mediaFormat:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe MediaFormat
$sel:settings:StartMedicalTranscriptionJob' :: StartMedicalTranscriptionJob -> Maybe MedicalTranscriptionSetting
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Settings" Text -> MedicalTranscriptionSetting -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MedicalTranscriptionSetting -> Pair)
-> Maybe MedicalTranscriptionSetting -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MedicalTranscriptionSetting
settings,
            (Text
"MediaFormat" Text -> MediaFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MediaFormat -> Pair) -> Maybe MediaFormat -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MediaFormat
mediaFormat,
            (Text
"OutputEncryptionKMSKeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
outputEncryptionKMSKeyId,
            (Text
"KMSEncryptionContext" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
kmsEncryptionContext,
            (Text
"OutputKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
outputKey,
            (Text
"ContentIdentificationType" Text -> MedicalContentIdentificationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MedicalContentIdentificationType -> Pair)
-> Maybe MedicalContentIdentificationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MedicalContentIdentificationType
contentIdentificationType,
            (Text
"Tags" Text -> NonEmpty Tag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Tag -> Pair) -> Maybe (NonEmpty Tag) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Tag)
tags,
            (Text
"MediaSampleRateHertz" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
mediaSampleRateHertz,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"MedicalTranscriptionJobName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
medicalTranscriptionJobName
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"LanguageCode" Text -> LanguageCode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= LanguageCode
languageCode),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Media" Text -> Media -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Media
media),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"OutputBucketName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
outputBucketName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Specialty" Text -> Specialty -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Specialty
specialty),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Type" Text -> Type -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Type
type')
          ]
      )

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

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

-- | /See:/ 'newStartMedicalTranscriptionJobResponse' smart constructor.
data StartMedicalTranscriptionJobResponse = StartMedicalTranscriptionJobResponse'
  { -- | A batch job submitted to transcribe medical speech to text.
    StartMedicalTranscriptionJobResponse
-> Maybe MedicalTranscriptionJob
medicalTranscriptionJob :: Prelude.Maybe MedicalTranscriptionJob,
    -- | The response's http status code.
    StartMedicalTranscriptionJobResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartMedicalTranscriptionJobResponse
-> StartMedicalTranscriptionJobResponse -> Bool
(StartMedicalTranscriptionJobResponse
 -> StartMedicalTranscriptionJobResponse -> Bool)
-> (StartMedicalTranscriptionJobResponse
    -> StartMedicalTranscriptionJobResponse -> Bool)
-> Eq StartMedicalTranscriptionJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartMedicalTranscriptionJobResponse
-> StartMedicalTranscriptionJobResponse -> Bool
$c/= :: StartMedicalTranscriptionJobResponse
-> StartMedicalTranscriptionJobResponse -> Bool
== :: StartMedicalTranscriptionJobResponse
-> StartMedicalTranscriptionJobResponse -> Bool
$c== :: StartMedicalTranscriptionJobResponse
-> StartMedicalTranscriptionJobResponse -> Bool
Prelude.Eq, ReadPrec [StartMedicalTranscriptionJobResponse]
ReadPrec StartMedicalTranscriptionJobResponse
Int -> ReadS StartMedicalTranscriptionJobResponse
ReadS [StartMedicalTranscriptionJobResponse]
(Int -> ReadS StartMedicalTranscriptionJobResponse)
-> ReadS [StartMedicalTranscriptionJobResponse]
-> ReadPrec StartMedicalTranscriptionJobResponse
-> ReadPrec [StartMedicalTranscriptionJobResponse]
-> Read StartMedicalTranscriptionJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartMedicalTranscriptionJobResponse]
$creadListPrec :: ReadPrec [StartMedicalTranscriptionJobResponse]
readPrec :: ReadPrec StartMedicalTranscriptionJobResponse
$creadPrec :: ReadPrec StartMedicalTranscriptionJobResponse
readList :: ReadS [StartMedicalTranscriptionJobResponse]
$creadList :: ReadS [StartMedicalTranscriptionJobResponse]
readsPrec :: Int -> ReadS StartMedicalTranscriptionJobResponse
$creadsPrec :: Int -> ReadS StartMedicalTranscriptionJobResponse
Prelude.Read, Int -> StartMedicalTranscriptionJobResponse -> ShowS
[StartMedicalTranscriptionJobResponse] -> ShowS
StartMedicalTranscriptionJobResponse -> String
(Int -> StartMedicalTranscriptionJobResponse -> ShowS)
-> (StartMedicalTranscriptionJobResponse -> String)
-> ([StartMedicalTranscriptionJobResponse] -> ShowS)
-> Show StartMedicalTranscriptionJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartMedicalTranscriptionJobResponse] -> ShowS
$cshowList :: [StartMedicalTranscriptionJobResponse] -> ShowS
show :: StartMedicalTranscriptionJobResponse -> String
$cshow :: StartMedicalTranscriptionJobResponse -> String
showsPrec :: Int -> StartMedicalTranscriptionJobResponse -> ShowS
$cshowsPrec :: Int -> StartMedicalTranscriptionJobResponse -> ShowS
Prelude.Show, (forall x.
 StartMedicalTranscriptionJobResponse
 -> Rep StartMedicalTranscriptionJobResponse x)
-> (forall x.
    Rep StartMedicalTranscriptionJobResponse x
    -> StartMedicalTranscriptionJobResponse)
-> Generic StartMedicalTranscriptionJobResponse
forall x.
Rep StartMedicalTranscriptionJobResponse x
-> StartMedicalTranscriptionJobResponse
forall x.
StartMedicalTranscriptionJobResponse
-> Rep StartMedicalTranscriptionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartMedicalTranscriptionJobResponse x
-> StartMedicalTranscriptionJobResponse
$cfrom :: forall x.
StartMedicalTranscriptionJobResponse
-> Rep StartMedicalTranscriptionJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartMedicalTranscriptionJobResponse' 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:
--
-- 'medicalTranscriptionJob', 'startMedicalTranscriptionJobResponse_medicalTranscriptionJob' - A batch job submitted to transcribe medical speech to text.
--
-- 'httpStatus', 'startMedicalTranscriptionJobResponse_httpStatus' - The response's http status code.
newStartMedicalTranscriptionJobResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartMedicalTranscriptionJobResponse
newStartMedicalTranscriptionJobResponse :: Int -> StartMedicalTranscriptionJobResponse
newStartMedicalTranscriptionJobResponse Int
pHttpStatus_ =
  StartMedicalTranscriptionJobResponse' :: Maybe MedicalTranscriptionJob
-> Int -> StartMedicalTranscriptionJobResponse
StartMedicalTranscriptionJobResponse'
    { $sel:medicalTranscriptionJob:StartMedicalTranscriptionJobResponse' :: Maybe MedicalTranscriptionJob
medicalTranscriptionJob =
        Maybe MedicalTranscriptionJob
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartMedicalTranscriptionJobResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A batch job submitted to transcribe medical speech to text.
startMedicalTranscriptionJobResponse_medicalTranscriptionJob :: Lens.Lens' StartMedicalTranscriptionJobResponse (Prelude.Maybe MedicalTranscriptionJob)
startMedicalTranscriptionJobResponse_medicalTranscriptionJob :: (Maybe MedicalTranscriptionJob
 -> f (Maybe MedicalTranscriptionJob))
-> StartMedicalTranscriptionJobResponse
-> f StartMedicalTranscriptionJobResponse
startMedicalTranscriptionJobResponse_medicalTranscriptionJob = (StartMedicalTranscriptionJobResponse
 -> Maybe MedicalTranscriptionJob)
-> (StartMedicalTranscriptionJobResponse
    -> Maybe MedicalTranscriptionJob
    -> StartMedicalTranscriptionJobResponse)
-> Lens
     StartMedicalTranscriptionJobResponse
     StartMedicalTranscriptionJobResponse
     (Maybe MedicalTranscriptionJob)
     (Maybe MedicalTranscriptionJob)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartMedicalTranscriptionJobResponse' {Maybe MedicalTranscriptionJob
medicalTranscriptionJob :: Maybe MedicalTranscriptionJob
$sel:medicalTranscriptionJob:StartMedicalTranscriptionJobResponse' :: StartMedicalTranscriptionJobResponse
-> Maybe MedicalTranscriptionJob
medicalTranscriptionJob} -> Maybe MedicalTranscriptionJob
medicalTranscriptionJob) (\s :: StartMedicalTranscriptionJobResponse
s@StartMedicalTranscriptionJobResponse' {} Maybe MedicalTranscriptionJob
a -> StartMedicalTranscriptionJobResponse
s {$sel:medicalTranscriptionJob:StartMedicalTranscriptionJobResponse' :: Maybe MedicalTranscriptionJob
medicalTranscriptionJob = Maybe MedicalTranscriptionJob
a} :: StartMedicalTranscriptionJobResponse)

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

instance
  Prelude.NFData
    StartMedicalTranscriptionJobResponse