{-# 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.UpdateMedicalVocabulary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates an existing custom medical vocabulary with new values. This
-- operation overwrites all existing information with your new values; you
-- cannot append new terms onto an existing custom vocabulary.
module Amazonka.Transcribe.UpdateMedicalVocabulary
  ( -- * Creating a Request
    UpdateMedicalVocabulary (..),
    newUpdateMedicalVocabulary,

    -- * Request Lenses
    updateMedicalVocabulary_vocabularyName,
    updateMedicalVocabulary_languageCode,
    updateMedicalVocabulary_vocabularyFileUri,

    -- * Destructuring the Response
    UpdateMedicalVocabularyResponse (..),
    newUpdateMedicalVocabularyResponse,

    -- * Response Lenses
    updateMedicalVocabularyResponse_languageCode,
    updateMedicalVocabularyResponse_lastModifiedTime,
    updateMedicalVocabularyResponse_vocabularyName,
    updateMedicalVocabularyResponse_vocabularyState,
    updateMedicalVocabularyResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateMedicalVocabulary' smart constructor.
data UpdateMedicalVocabulary = UpdateMedicalVocabulary'
  { -- | The name of the custom medical vocabulary you want to update. Custom
    -- medical vocabulary names are case sensitive.
    UpdateMedicalVocabulary -> Text
vocabularyName :: Prelude.Text,
    -- | The language code that represents the language of the entries in the
    -- custom vocabulary you want to update. US English (@en-US@) is the only
    -- language supported with Amazon Transcribe Medical.
    UpdateMedicalVocabulary -> LanguageCode
languageCode :: LanguageCode,
    -- | The Amazon S3 location of the text file that contains your custom
    -- medical vocabulary. The URI must be located in the same Amazon Web
    -- Services Region as the resource you\'re calling.
    --
    -- Here\'s an example URI path:
    -- @s3:\/\/DOC-EXAMPLE-BUCKET\/my-vocab-file.txt@
    UpdateMedicalVocabulary -> Text
vocabularyFileUri :: Prelude.Text
  }
  deriving (UpdateMedicalVocabulary -> UpdateMedicalVocabulary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMedicalVocabulary -> UpdateMedicalVocabulary -> Bool
$c/= :: UpdateMedicalVocabulary -> UpdateMedicalVocabulary -> Bool
== :: UpdateMedicalVocabulary -> UpdateMedicalVocabulary -> Bool
$c== :: UpdateMedicalVocabulary -> UpdateMedicalVocabulary -> Bool
Prelude.Eq, ReadPrec [UpdateMedicalVocabulary]
ReadPrec UpdateMedicalVocabulary
Int -> ReadS UpdateMedicalVocabulary
ReadS [UpdateMedicalVocabulary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMedicalVocabulary]
$creadListPrec :: ReadPrec [UpdateMedicalVocabulary]
readPrec :: ReadPrec UpdateMedicalVocabulary
$creadPrec :: ReadPrec UpdateMedicalVocabulary
readList :: ReadS [UpdateMedicalVocabulary]
$creadList :: ReadS [UpdateMedicalVocabulary]
readsPrec :: Int -> ReadS UpdateMedicalVocabulary
$creadsPrec :: Int -> ReadS UpdateMedicalVocabulary
Prelude.Read, Int -> UpdateMedicalVocabulary -> ShowS
[UpdateMedicalVocabulary] -> ShowS
UpdateMedicalVocabulary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMedicalVocabulary] -> ShowS
$cshowList :: [UpdateMedicalVocabulary] -> ShowS
show :: UpdateMedicalVocabulary -> String
$cshow :: UpdateMedicalVocabulary -> String
showsPrec :: Int -> UpdateMedicalVocabulary -> ShowS
$cshowsPrec :: Int -> UpdateMedicalVocabulary -> ShowS
Prelude.Show, forall x. Rep UpdateMedicalVocabulary x -> UpdateMedicalVocabulary
forall x. UpdateMedicalVocabulary -> Rep UpdateMedicalVocabulary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateMedicalVocabulary x -> UpdateMedicalVocabulary
$cfrom :: forall x. UpdateMedicalVocabulary -> Rep UpdateMedicalVocabulary x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMedicalVocabulary' 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:
--
-- 'vocabularyName', 'updateMedicalVocabulary_vocabularyName' - The name of the custom medical vocabulary you want to update. Custom
-- medical vocabulary names are case sensitive.
--
-- 'languageCode', 'updateMedicalVocabulary_languageCode' - The language code that represents the language of the entries in the
-- custom vocabulary you want to update. US English (@en-US@) is the only
-- language supported with Amazon Transcribe Medical.
--
-- 'vocabularyFileUri', 'updateMedicalVocabulary_vocabularyFileUri' - The Amazon S3 location of the text file that contains your custom
-- medical vocabulary. The URI must be located in the same Amazon Web
-- Services Region as the resource you\'re calling.
--
-- Here\'s an example URI path:
-- @s3:\/\/DOC-EXAMPLE-BUCKET\/my-vocab-file.txt@
newUpdateMedicalVocabulary ::
  -- | 'vocabularyName'
  Prelude.Text ->
  -- | 'languageCode'
  LanguageCode ->
  -- | 'vocabularyFileUri'
  Prelude.Text ->
  UpdateMedicalVocabulary
newUpdateMedicalVocabulary :: Text -> LanguageCode -> Text -> UpdateMedicalVocabulary
newUpdateMedicalVocabulary
  Text
pVocabularyName_
  LanguageCode
pLanguageCode_
  Text
pVocabularyFileUri_ =
    UpdateMedicalVocabulary'
      { $sel:vocabularyName:UpdateMedicalVocabulary' :: Text
vocabularyName =
          Text
pVocabularyName_,
        $sel:languageCode:UpdateMedicalVocabulary' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_,
        $sel:vocabularyFileUri:UpdateMedicalVocabulary' :: Text
vocabularyFileUri = Text
pVocabularyFileUri_
      }

-- | The name of the custom medical vocabulary you want to update. Custom
-- medical vocabulary names are case sensitive.
updateMedicalVocabulary_vocabularyName :: Lens.Lens' UpdateMedicalVocabulary Prelude.Text
updateMedicalVocabulary_vocabularyName :: Lens' UpdateMedicalVocabulary Text
updateMedicalVocabulary_vocabularyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMedicalVocabulary' {Text
vocabularyName :: Text
$sel:vocabularyName:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Text
vocabularyName} -> Text
vocabularyName) (\s :: UpdateMedicalVocabulary
s@UpdateMedicalVocabulary' {} Text
a -> UpdateMedicalVocabulary
s {$sel:vocabularyName:UpdateMedicalVocabulary' :: Text
vocabularyName = Text
a} :: UpdateMedicalVocabulary)

-- | The language code that represents the language of the entries in the
-- custom vocabulary you want to update. US English (@en-US@) is the only
-- language supported with Amazon Transcribe Medical.
updateMedicalVocabulary_languageCode :: Lens.Lens' UpdateMedicalVocabulary LanguageCode
updateMedicalVocabulary_languageCode :: Lens' UpdateMedicalVocabulary LanguageCode
updateMedicalVocabulary_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMedicalVocabulary' {LanguageCode
languageCode :: LanguageCode
$sel:languageCode:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> LanguageCode
languageCode} -> LanguageCode
languageCode) (\s :: UpdateMedicalVocabulary
s@UpdateMedicalVocabulary' {} LanguageCode
a -> UpdateMedicalVocabulary
s {$sel:languageCode:UpdateMedicalVocabulary' :: LanguageCode
languageCode = LanguageCode
a} :: UpdateMedicalVocabulary)

-- | The Amazon S3 location of the text file that contains your custom
-- medical vocabulary. The URI must be located in the same Amazon Web
-- Services Region as the resource you\'re calling.
--
-- Here\'s an example URI path:
-- @s3:\/\/DOC-EXAMPLE-BUCKET\/my-vocab-file.txt@
updateMedicalVocabulary_vocabularyFileUri :: Lens.Lens' UpdateMedicalVocabulary Prelude.Text
updateMedicalVocabulary_vocabularyFileUri :: Lens' UpdateMedicalVocabulary Text
updateMedicalVocabulary_vocabularyFileUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMedicalVocabulary' {Text
vocabularyFileUri :: Text
$sel:vocabularyFileUri:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Text
vocabularyFileUri} -> Text
vocabularyFileUri) (\s :: UpdateMedicalVocabulary
s@UpdateMedicalVocabulary' {} Text
a -> UpdateMedicalVocabulary
s {$sel:vocabularyFileUri:UpdateMedicalVocabulary' :: Text
vocabularyFileUri = Text
a} :: UpdateMedicalVocabulary)

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

instance Prelude.Hashable UpdateMedicalVocabulary where
  hashWithSalt :: Int -> UpdateMedicalVocabulary -> Int
hashWithSalt Int
_salt UpdateMedicalVocabulary' {Text
LanguageCode
vocabularyFileUri :: Text
languageCode :: LanguageCode
vocabularyName :: Text
$sel:vocabularyFileUri:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Text
$sel:languageCode:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> LanguageCode
$sel:vocabularyName:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vocabularyName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` LanguageCode
languageCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vocabularyFileUri

instance Prelude.NFData UpdateMedicalVocabulary where
  rnf :: UpdateMedicalVocabulary -> ()
rnf UpdateMedicalVocabulary' {Text
LanguageCode
vocabularyFileUri :: Text
languageCode :: LanguageCode
vocabularyName :: Text
$sel:vocabularyFileUri:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Text
$sel:languageCode:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> LanguageCode
$sel:vocabularyName:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
vocabularyName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf LanguageCode
languageCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vocabularyFileUri

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

instance Data.ToJSON UpdateMedicalVocabulary where
  toJSON :: UpdateMedicalVocabulary -> Value
toJSON UpdateMedicalVocabulary' {Text
LanguageCode
vocabularyFileUri :: Text
languageCode :: LanguageCode
vocabularyName :: Text
$sel:vocabularyFileUri:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Text
$sel:languageCode:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> LanguageCode
$sel:vocabularyName:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              (Key
"VocabularyName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
vocabularyName),
            forall a. a -> Maybe a
Prelude.Just (Key
"LanguageCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= LanguageCode
languageCode),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"VocabularyFileUri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
vocabularyFileUri)
          ]
      )

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

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

-- | /See:/ 'newUpdateMedicalVocabularyResponse' smart constructor.
data UpdateMedicalVocabularyResponse = UpdateMedicalVocabularyResponse'
  { -- | The language code you selected for your custom medical vocabulary. US
    -- English (@en-US@) is the only language supported with Amazon Transcribe
    -- Medical.
    UpdateMedicalVocabularyResponse -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
    -- | The date and time the specified custom medical vocabulary was last
    -- updated.
    --
    -- Timestamps are in the format @YYYY-MM-DD\'T\'HH:MM:SS.SSSSSS-UTC@. For
    -- example, @2022-05-04T12:32:58.761000-07:00@ represents 12:32 PM UTC-7 on
    -- May 4, 2022.
    UpdateMedicalVocabularyResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
    -- | The name of the updated custom medical vocabulary.
    UpdateMedicalVocabularyResponse -> Maybe Text
vocabularyName :: Prelude.Maybe Prelude.Text,
    -- | The processing state of your custom medical vocabulary. If the state is
    -- @READY@, you can use the custom vocabulary in a
    -- @StartMedicalTranscriptionJob@ request.
    UpdateMedicalVocabularyResponse -> Maybe VocabularyState
vocabularyState :: Prelude.Maybe VocabularyState,
    -- | The response's http status code.
    UpdateMedicalVocabularyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateMedicalVocabularyResponse
-> UpdateMedicalVocabularyResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMedicalVocabularyResponse
-> UpdateMedicalVocabularyResponse -> Bool
$c/= :: UpdateMedicalVocabularyResponse
-> UpdateMedicalVocabularyResponse -> Bool
== :: UpdateMedicalVocabularyResponse
-> UpdateMedicalVocabularyResponse -> Bool
$c== :: UpdateMedicalVocabularyResponse
-> UpdateMedicalVocabularyResponse -> Bool
Prelude.Eq, ReadPrec [UpdateMedicalVocabularyResponse]
ReadPrec UpdateMedicalVocabularyResponse
Int -> ReadS UpdateMedicalVocabularyResponse
ReadS [UpdateMedicalVocabularyResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateMedicalVocabularyResponse]
$creadListPrec :: ReadPrec [UpdateMedicalVocabularyResponse]
readPrec :: ReadPrec UpdateMedicalVocabularyResponse
$creadPrec :: ReadPrec UpdateMedicalVocabularyResponse
readList :: ReadS [UpdateMedicalVocabularyResponse]
$creadList :: ReadS [UpdateMedicalVocabularyResponse]
readsPrec :: Int -> ReadS UpdateMedicalVocabularyResponse
$creadsPrec :: Int -> ReadS UpdateMedicalVocabularyResponse
Prelude.Read, Int -> UpdateMedicalVocabularyResponse -> ShowS
[UpdateMedicalVocabularyResponse] -> ShowS
UpdateMedicalVocabularyResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMedicalVocabularyResponse] -> ShowS
$cshowList :: [UpdateMedicalVocabularyResponse] -> ShowS
show :: UpdateMedicalVocabularyResponse -> String
$cshow :: UpdateMedicalVocabularyResponse -> String
showsPrec :: Int -> UpdateMedicalVocabularyResponse -> ShowS
$cshowsPrec :: Int -> UpdateMedicalVocabularyResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateMedicalVocabularyResponse x
-> UpdateMedicalVocabularyResponse
forall x.
UpdateMedicalVocabularyResponse
-> Rep UpdateMedicalVocabularyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateMedicalVocabularyResponse x
-> UpdateMedicalVocabularyResponse
$cfrom :: forall x.
UpdateMedicalVocabularyResponse
-> Rep UpdateMedicalVocabularyResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMedicalVocabularyResponse' 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:
--
-- 'languageCode', 'updateMedicalVocabularyResponse_languageCode' - The language code you selected for your custom medical vocabulary. US
-- English (@en-US@) is the only language supported with Amazon Transcribe
-- Medical.
--
-- 'lastModifiedTime', 'updateMedicalVocabularyResponse_lastModifiedTime' - The date and time the specified custom medical vocabulary was last
-- updated.
--
-- Timestamps are in the format @YYYY-MM-DD\'T\'HH:MM:SS.SSSSSS-UTC@. For
-- example, @2022-05-04T12:32:58.761000-07:00@ represents 12:32 PM UTC-7 on
-- May 4, 2022.
--
-- 'vocabularyName', 'updateMedicalVocabularyResponse_vocabularyName' - The name of the updated custom medical vocabulary.
--
-- 'vocabularyState', 'updateMedicalVocabularyResponse_vocabularyState' - The processing state of your custom medical vocabulary. If the state is
-- @READY@, you can use the custom vocabulary in a
-- @StartMedicalTranscriptionJob@ request.
--
-- 'httpStatus', 'updateMedicalVocabularyResponse_httpStatus' - The response's http status code.
newUpdateMedicalVocabularyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateMedicalVocabularyResponse
newUpdateMedicalVocabularyResponse :: Int -> UpdateMedicalVocabularyResponse
newUpdateMedicalVocabularyResponse Int
pHttpStatus_ =
  UpdateMedicalVocabularyResponse'
    { $sel:languageCode:UpdateMedicalVocabularyResponse' :: Maybe LanguageCode
languageCode =
        forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:UpdateMedicalVocabularyResponse' :: Maybe POSIX
lastModifiedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyName:UpdateMedicalVocabularyResponse' :: Maybe Text
vocabularyName = forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyState:UpdateMedicalVocabularyResponse' :: Maybe VocabularyState
vocabularyState = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateMedicalVocabularyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The language code you selected for your custom medical vocabulary. US
-- English (@en-US@) is the only language supported with Amazon Transcribe
-- Medical.
updateMedicalVocabularyResponse_languageCode :: Lens.Lens' UpdateMedicalVocabularyResponse (Prelude.Maybe LanguageCode)
updateMedicalVocabularyResponse_languageCode :: Lens' UpdateMedicalVocabularyResponse (Maybe LanguageCode)
updateMedicalVocabularyResponse_languageCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMedicalVocabularyResponse' {Maybe LanguageCode
languageCode :: Maybe LanguageCode
$sel:languageCode:UpdateMedicalVocabularyResponse' :: UpdateMedicalVocabularyResponse -> Maybe LanguageCode
languageCode} -> Maybe LanguageCode
languageCode) (\s :: UpdateMedicalVocabularyResponse
s@UpdateMedicalVocabularyResponse' {} Maybe LanguageCode
a -> UpdateMedicalVocabularyResponse
s {$sel:languageCode:UpdateMedicalVocabularyResponse' :: Maybe LanguageCode
languageCode = Maybe LanguageCode
a} :: UpdateMedicalVocabularyResponse)

-- | The date and time the specified custom medical vocabulary was last
-- updated.
--
-- Timestamps are in the format @YYYY-MM-DD\'T\'HH:MM:SS.SSSSSS-UTC@. For
-- example, @2022-05-04T12:32:58.761000-07:00@ represents 12:32 PM UTC-7 on
-- May 4, 2022.
updateMedicalVocabularyResponse_lastModifiedTime :: Lens.Lens' UpdateMedicalVocabularyResponse (Prelude.Maybe Prelude.UTCTime)
updateMedicalVocabularyResponse_lastModifiedTime :: Lens' UpdateMedicalVocabularyResponse (Maybe UTCTime)
updateMedicalVocabularyResponse_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMedicalVocabularyResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:UpdateMedicalVocabularyResponse' :: UpdateMedicalVocabularyResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: UpdateMedicalVocabularyResponse
s@UpdateMedicalVocabularyResponse' {} Maybe POSIX
a -> UpdateMedicalVocabularyResponse
s {$sel:lastModifiedTime:UpdateMedicalVocabularyResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: UpdateMedicalVocabularyResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The name of the updated custom medical vocabulary.
updateMedicalVocabularyResponse_vocabularyName :: Lens.Lens' UpdateMedicalVocabularyResponse (Prelude.Maybe Prelude.Text)
updateMedicalVocabularyResponse_vocabularyName :: Lens' UpdateMedicalVocabularyResponse (Maybe Text)
updateMedicalVocabularyResponse_vocabularyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMedicalVocabularyResponse' {Maybe Text
vocabularyName :: Maybe Text
$sel:vocabularyName:UpdateMedicalVocabularyResponse' :: UpdateMedicalVocabularyResponse -> Maybe Text
vocabularyName} -> Maybe Text
vocabularyName) (\s :: UpdateMedicalVocabularyResponse
s@UpdateMedicalVocabularyResponse' {} Maybe Text
a -> UpdateMedicalVocabularyResponse
s {$sel:vocabularyName:UpdateMedicalVocabularyResponse' :: Maybe Text
vocabularyName = Maybe Text
a} :: UpdateMedicalVocabularyResponse)

-- | The processing state of your custom medical vocabulary. If the state is
-- @READY@, you can use the custom vocabulary in a
-- @StartMedicalTranscriptionJob@ request.
updateMedicalVocabularyResponse_vocabularyState :: Lens.Lens' UpdateMedicalVocabularyResponse (Prelude.Maybe VocabularyState)
updateMedicalVocabularyResponse_vocabularyState :: Lens' UpdateMedicalVocabularyResponse (Maybe VocabularyState)
updateMedicalVocabularyResponse_vocabularyState = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMedicalVocabularyResponse' {Maybe VocabularyState
vocabularyState :: Maybe VocabularyState
$sel:vocabularyState:UpdateMedicalVocabularyResponse' :: UpdateMedicalVocabularyResponse -> Maybe VocabularyState
vocabularyState} -> Maybe VocabularyState
vocabularyState) (\s :: UpdateMedicalVocabularyResponse
s@UpdateMedicalVocabularyResponse' {} Maybe VocabularyState
a -> UpdateMedicalVocabularyResponse
s {$sel:vocabularyState:UpdateMedicalVocabularyResponse' :: Maybe VocabularyState
vocabularyState = Maybe VocabularyState
a} :: UpdateMedicalVocabularyResponse)

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

instance
  Prelude.NFData
    UpdateMedicalVocabularyResponse
  where
  rnf :: UpdateMedicalVocabularyResponse -> ()
rnf UpdateMedicalVocabularyResponse' {Int
Maybe Text
Maybe POSIX
Maybe LanguageCode
Maybe VocabularyState
httpStatus :: Int
vocabularyState :: Maybe VocabularyState
vocabularyName :: Maybe Text
lastModifiedTime :: Maybe POSIX
languageCode :: Maybe LanguageCode
$sel:httpStatus:UpdateMedicalVocabularyResponse' :: UpdateMedicalVocabularyResponse -> Int
$sel:vocabularyState:UpdateMedicalVocabularyResponse' :: UpdateMedicalVocabularyResponse -> Maybe VocabularyState
$sel:vocabularyName:UpdateMedicalVocabularyResponse' :: UpdateMedicalVocabularyResponse -> Maybe Text
$sel:lastModifiedTime:UpdateMedicalVocabularyResponse' :: UpdateMedicalVocabularyResponse -> Maybe POSIX
$sel:languageCode:UpdateMedicalVocabularyResponse' :: UpdateMedicalVocabularyResponse -> Maybe LanguageCode
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe LanguageCode
languageCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vocabularyName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VocabularyState
vocabularyState
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus