{-# 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-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)
--
-- Updates a vocabulary with new values that you provide in a different
-- text file from the one you used to create the vocabulary. The
-- @UpdateMedicalVocabulary@ operation overwrites all of the existing
-- information with the values that you provide in the request.
module Amazonka.Transcribe.UpdateMedicalVocabulary
  ( -- * Creating a Request
    UpdateMedicalVocabulary (..),
    newUpdateMedicalVocabulary,

    -- * Request Lenses
    updateMedicalVocabulary_vocabularyFileUri,
    updateMedicalVocabulary_vocabularyName,
    updateMedicalVocabulary_languageCode,

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

    -- * Response Lenses
    updateMedicalVocabularyResponse_languageCode,
    updateMedicalVocabularyResponse_vocabularyName,
    updateMedicalVocabularyResponse_lastModifiedTime,
    updateMedicalVocabularyResponse_vocabularyState,
    updateMedicalVocabularyResponse_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:/ 'newUpdateMedicalVocabulary' smart constructor.
data UpdateMedicalVocabulary = UpdateMedicalVocabulary'
  { -- | The location in Amazon S3 of the text file that contains your custom
    -- vocabulary. The URI must be in the same Amazon Web Services Region as
    -- the resource that you are calling. The following is the format for a
    -- URI:
    --
    -- @ https:\/\/s3.\<aws-region>.amazonaws.com\/\<bucket-name>\/\<keyprefix>\/\<objectkey> @
    --
    -- For example:
    --
    -- @https:\/\/s3.us-east-1.amazonaws.com\/AWSDOC-EXAMPLE-BUCKET\/vocab.txt@
    --
    -- For more information about Amazon S3 object names, see
    -- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys Object Keys>
    -- in the /Amazon S3 Developer Guide/.
    --
    -- For more information about custom vocabularies in Amazon Transcribe
    -- Medical, see
    -- <https://docs.aws.amazon.com/transcribe/latest/dg/how-it-works.html#how-vocabulary Medical Custom Vocabularies>.
    UpdateMedicalVocabulary -> Maybe Text
vocabularyFileUri :: Prelude.Maybe Prelude.Text,
    -- | The name of the vocabulary to update. The name is case sensitive. If you
    -- try to update a vocabulary with the same name as a vocabulary you\'ve
    -- already made, you get a @ConflictException@ error.
    UpdateMedicalVocabulary -> Text
vocabularyName :: Prelude.Text,
    -- | The language code of the language used for the entries in the updated
    -- vocabulary. US English (en-US) is the only valid language code in Amazon
    -- Transcribe Medical.
    UpdateMedicalVocabulary -> LanguageCode
languageCode :: LanguageCode
  }
  deriving (UpdateMedicalVocabulary -> UpdateMedicalVocabulary -> Bool
(UpdateMedicalVocabulary -> UpdateMedicalVocabulary -> Bool)
-> (UpdateMedicalVocabulary -> UpdateMedicalVocabulary -> Bool)
-> Eq UpdateMedicalVocabulary
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]
(Int -> ReadS UpdateMedicalVocabulary)
-> ReadS [UpdateMedicalVocabulary]
-> ReadPrec UpdateMedicalVocabulary
-> ReadPrec [UpdateMedicalVocabulary]
-> Read 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
(Int -> UpdateMedicalVocabulary -> ShowS)
-> (UpdateMedicalVocabulary -> String)
-> ([UpdateMedicalVocabulary] -> ShowS)
-> Show UpdateMedicalVocabulary
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.
 UpdateMedicalVocabulary -> Rep UpdateMedicalVocabulary x)
-> (forall x.
    Rep UpdateMedicalVocabulary x -> UpdateMedicalVocabulary)
-> Generic UpdateMedicalVocabulary
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:
--
-- 'vocabularyFileUri', 'updateMedicalVocabulary_vocabularyFileUri' - The location in Amazon S3 of the text file that contains your custom
-- vocabulary. The URI must be in the same Amazon Web Services Region as
-- the resource that you are calling. The following is the format for a
-- URI:
--
-- @ https:\/\/s3.\<aws-region>.amazonaws.com\/\<bucket-name>\/\<keyprefix>\/\<objectkey> @
--
-- For example:
--
-- @https:\/\/s3.us-east-1.amazonaws.com\/AWSDOC-EXAMPLE-BUCKET\/vocab.txt@
--
-- For more information about Amazon S3 object names, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys Object Keys>
-- in the /Amazon S3 Developer Guide/.
--
-- For more information about custom vocabularies in Amazon Transcribe
-- Medical, see
-- <https://docs.aws.amazon.com/transcribe/latest/dg/how-it-works.html#how-vocabulary Medical Custom Vocabularies>.
--
-- 'vocabularyName', 'updateMedicalVocabulary_vocabularyName' - The name of the vocabulary to update. The name is case sensitive. If you
-- try to update a vocabulary with the same name as a vocabulary you\'ve
-- already made, you get a @ConflictException@ error.
--
-- 'languageCode', 'updateMedicalVocabulary_languageCode' - The language code of the language used for the entries in the updated
-- vocabulary. US English (en-US) is the only valid language code in Amazon
-- Transcribe Medical.
newUpdateMedicalVocabulary ::
  -- | 'vocabularyName'
  Prelude.Text ->
  -- | 'languageCode'
  LanguageCode ->
  UpdateMedicalVocabulary
newUpdateMedicalVocabulary :: Text -> LanguageCode -> UpdateMedicalVocabulary
newUpdateMedicalVocabulary
  Text
pVocabularyName_
  LanguageCode
pLanguageCode_ =
    UpdateMedicalVocabulary' :: Maybe Text -> Text -> LanguageCode -> UpdateMedicalVocabulary
UpdateMedicalVocabulary'
      { $sel:vocabularyFileUri:UpdateMedicalVocabulary' :: Maybe Text
vocabularyFileUri =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:vocabularyName:UpdateMedicalVocabulary' :: Text
vocabularyName = Text
pVocabularyName_,
        $sel:languageCode:UpdateMedicalVocabulary' :: LanguageCode
languageCode = LanguageCode
pLanguageCode_
      }

-- | The location in Amazon S3 of the text file that contains your custom
-- vocabulary. The URI must be in the same Amazon Web Services Region as
-- the resource that you are calling. The following is the format for a
-- URI:
--
-- @ https:\/\/s3.\<aws-region>.amazonaws.com\/\<bucket-name>\/\<keyprefix>\/\<objectkey> @
--
-- For example:
--
-- @https:\/\/s3.us-east-1.amazonaws.com\/AWSDOC-EXAMPLE-BUCKET\/vocab.txt@
--
-- For more information about Amazon S3 object names, see
-- <https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys Object Keys>
-- in the /Amazon S3 Developer Guide/.
--
-- For more information about custom vocabularies in Amazon Transcribe
-- Medical, see
-- <https://docs.aws.amazon.com/transcribe/latest/dg/how-it-works.html#how-vocabulary Medical Custom Vocabularies>.
updateMedicalVocabulary_vocabularyFileUri :: Lens.Lens' UpdateMedicalVocabulary (Prelude.Maybe Prelude.Text)
updateMedicalVocabulary_vocabularyFileUri :: (Maybe Text -> f (Maybe Text))
-> UpdateMedicalVocabulary -> f UpdateMedicalVocabulary
updateMedicalVocabulary_vocabularyFileUri = (UpdateMedicalVocabulary -> Maybe Text)
-> (UpdateMedicalVocabulary
    -> Maybe Text -> UpdateMedicalVocabulary)
-> Lens
     UpdateMedicalVocabulary
     UpdateMedicalVocabulary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMedicalVocabulary' {Maybe Text
vocabularyFileUri :: Maybe Text
$sel:vocabularyFileUri:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Maybe Text
vocabularyFileUri} -> Maybe Text
vocabularyFileUri) (\s :: UpdateMedicalVocabulary
s@UpdateMedicalVocabulary' {} Maybe Text
a -> UpdateMedicalVocabulary
s {$sel:vocabularyFileUri:UpdateMedicalVocabulary' :: Maybe Text
vocabularyFileUri = Maybe Text
a} :: UpdateMedicalVocabulary)

-- | The name of the vocabulary to update. The name is case sensitive. If you
-- try to update a vocabulary with the same name as a vocabulary you\'ve
-- already made, you get a @ConflictException@ error.
updateMedicalVocabulary_vocabularyName :: Lens.Lens' UpdateMedicalVocabulary Prelude.Text
updateMedicalVocabulary_vocabularyName :: (Text -> f Text)
-> UpdateMedicalVocabulary -> f UpdateMedicalVocabulary
updateMedicalVocabulary_vocabularyName = (UpdateMedicalVocabulary -> Text)
-> (UpdateMedicalVocabulary -> Text -> UpdateMedicalVocabulary)
-> Lens UpdateMedicalVocabulary UpdateMedicalVocabulary Text Text
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 of the language used for the entries in the updated
-- vocabulary. US English (en-US) is the only valid language code in Amazon
-- Transcribe Medical.
updateMedicalVocabulary_languageCode :: Lens.Lens' UpdateMedicalVocabulary LanguageCode
updateMedicalVocabulary_languageCode :: (LanguageCode -> f LanguageCode)
-> UpdateMedicalVocabulary -> f UpdateMedicalVocabulary
updateMedicalVocabulary_languageCode = (UpdateMedicalVocabulary -> LanguageCode)
-> (UpdateMedicalVocabulary
    -> LanguageCode -> UpdateMedicalVocabulary)
-> Lens
     UpdateMedicalVocabulary
     UpdateMedicalVocabulary
     LanguageCode
     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)

instance Core.AWSRequest UpdateMedicalVocabulary where
  type
    AWSResponse UpdateMedicalVocabulary =
      UpdateMedicalVocabularyResponse
  request :: UpdateMedicalVocabulary -> Request UpdateMedicalVocabulary
request = Service
-> UpdateMedicalVocabulary -> Request UpdateMedicalVocabulary
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateMedicalVocabulary
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateMedicalVocabulary)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateMedicalVocabulary))
-> Logger
-> Service
-> Proxy UpdateMedicalVocabulary
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateMedicalVocabulary)))
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 LanguageCode
-> Maybe Text
-> Maybe POSIX
-> Maybe VocabularyState
-> Int
-> UpdateMedicalVocabularyResponse
UpdateMedicalVocabularyResponse'
            (Maybe LanguageCode
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe VocabularyState
 -> Int
 -> UpdateMedicalVocabularyResponse)
-> Either String (Maybe LanguageCode)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe VocabularyState
      -> Int
      -> UpdateMedicalVocabularyResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe LanguageCode)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LanguageCode")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe VocabularyState
   -> Int
   -> UpdateMedicalVocabularyResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe VocabularyState -> Int -> UpdateMedicalVocabularyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VocabularyName")
            Either
  String
  (Maybe POSIX
   -> Maybe VocabularyState -> Int -> UpdateMedicalVocabularyResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe VocabularyState -> Int -> UpdateMedicalVocabularyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedTime")
            Either
  String
  (Maybe VocabularyState -> Int -> UpdateMedicalVocabularyResponse)
-> Either String (Maybe VocabularyState)
-> Either String (Int -> UpdateMedicalVocabularyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe VocabularyState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VocabularyState")
            Either String (Int -> UpdateMedicalVocabularyResponse)
-> Either String Int
-> Either String UpdateMedicalVocabularyResponse
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 UpdateMedicalVocabulary

instance Prelude.NFData UpdateMedicalVocabulary

instance Core.ToHeaders UpdateMedicalVocabulary where
  toHeaders :: UpdateMedicalVocabulary -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateMedicalVocabulary -> 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.UpdateMedicalVocabulary" ::
                          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 UpdateMedicalVocabulary where
  toJSON :: UpdateMedicalVocabulary -> Value
toJSON UpdateMedicalVocabulary' {Maybe Text
Text
LanguageCode
languageCode :: LanguageCode
vocabularyName :: Text
vocabularyFileUri :: Maybe Text
$sel:languageCode:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> LanguageCode
$sel:vocabularyName:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Text
$sel:vocabularyFileUri:UpdateMedicalVocabulary' :: UpdateMedicalVocabulary -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"VocabularyFileUri" 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
vocabularyFileUri,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"VocabularyName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vocabularyName),
            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)
          ]
      )

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

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

-- | /See:/ 'newUpdateMedicalVocabularyResponse' smart constructor.
data UpdateMedicalVocabularyResponse = UpdateMedicalVocabularyResponse'
  { -- | The language code for the language of the text file used to update the
    -- custom vocabulary. US English (en-US) is the only language supported in
    -- Amazon Transcribe Medical.
    UpdateMedicalVocabularyResponse -> Maybe LanguageCode
languageCode :: Prelude.Maybe LanguageCode,
    -- | The name of the updated vocabulary.
    UpdateMedicalVocabularyResponse -> Maybe Text
vocabularyName :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the vocabulary was updated.
    UpdateMedicalVocabularyResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The processing state of the update to the vocabulary. When the
    -- @VocabularyState@ field is @READY@, the vocabulary is ready to be used
    -- 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
(UpdateMedicalVocabularyResponse
 -> UpdateMedicalVocabularyResponse -> Bool)
-> (UpdateMedicalVocabularyResponse
    -> UpdateMedicalVocabularyResponse -> Bool)
-> Eq UpdateMedicalVocabularyResponse
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]
(Int -> ReadS UpdateMedicalVocabularyResponse)
-> ReadS [UpdateMedicalVocabularyResponse]
-> ReadPrec UpdateMedicalVocabularyResponse
-> ReadPrec [UpdateMedicalVocabularyResponse]
-> Read 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
(Int -> UpdateMedicalVocabularyResponse -> ShowS)
-> (UpdateMedicalVocabularyResponse -> String)
-> ([UpdateMedicalVocabularyResponse] -> ShowS)
-> Show UpdateMedicalVocabularyResponse
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.
 UpdateMedicalVocabularyResponse
 -> Rep UpdateMedicalVocabularyResponse x)
-> (forall x.
    Rep UpdateMedicalVocabularyResponse x
    -> UpdateMedicalVocabularyResponse)
-> Generic UpdateMedicalVocabularyResponse
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 for the language of the text file used to update the
-- custom vocabulary. US English (en-US) is the only language supported in
-- Amazon Transcribe Medical.
--
-- 'vocabularyName', 'updateMedicalVocabularyResponse_vocabularyName' - The name of the updated vocabulary.
--
-- 'lastModifiedTime', 'updateMedicalVocabularyResponse_lastModifiedTime' - The date and time that the vocabulary was updated.
--
-- 'vocabularyState', 'updateMedicalVocabularyResponse_vocabularyState' - The processing state of the update to the vocabulary. When the
-- @VocabularyState@ field is @READY@, the vocabulary is ready to be used
-- 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' :: Maybe LanguageCode
-> Maybe Text
-> Maybe POSIX
-> Maybe VocabularyState
-> Int
-> UpdateMedicalVocabularyResponse
UpdateMedicalVocabularyResponse'
    { $sel:languageCode:UpdateMedicalVocabularyResponse' :: Maybe LanguageCode
languageCode =
        Maybe LanguageCode
forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyName:UpdateMedicalVocabularyResponse' :: Maybe Text
vocabularyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:UpdateMedicalVocabularyResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:vocabularyState:UpdateMedicalVocabularyResponse' :: Maybe VocabularyState
vocabularyState = Maybe VocabularyState
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateMedicalVocabularyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The language code for the language of the text file used to update the
-- custom vocabulary. US English (en-US) is the only language supported in
-- Amazon Transcribe Medical.
updateMedicalVocabularyResponse_languageCode :: Lens.Lens' UpdateMedicalVocabularyResponse (Prelude.Maybe LanguageCode)
updateMedicalVocabularyResponse_languageCode :: (Maybe LanguageCode -> f (Maybe LanguageCode))
-> UpdateMedicalVocabularyResponse
-> f UpdateMedicalVocabularyResponse
updateMedicalVocabularyResponse_languageCode = (UpdateMedicalVocabularyResponse -> Maybe LanguageCode)
-> (UpdateMedicalVocabularyResponse
    -> Maybe LanguageCode -> UpdateMedicalVocabularyResponse)
-> Lens
     UpdateMedicalVocabularyResponse
     UpdateMedicalVocabularyResponse
     (Maybe LanguageCode)
     (Maybe 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 name of the updated vocabulary.
updateMedicalVocabularyResponse_vocabularyName :: Lens.Lens' UpdateMedicalVocabularyResponse (Prelude.Maybe Prelude.Text)
updateMedicalVocabularyResponse_vocabularyName :: (Maybe Text -> f (Maybe Text))
-> UpdateMedicalVocabularyResponse
-> f UpdateMedicalVocabularyResponse
updateMedicalVocabularyResponse_vocabularyName = (UpdateMedicalVocabularyResponse -> Maybe Text)
-> (UpdateMedicalVocabularyResponse
    -> Maybe Text -> UpdateMedicalVocabularyResponse)
-> Lens
     UpdateMedicalVocabularyResponse
     UpdateMedicalVocabularyResponse
     (Maybe Text)
     (Maybe Text)
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 date and time that the vocabulary was updated.
updateMedicalVocabularyResponse_lastModifiedTime :: Lens.Lens' UpdateMedicalVocabularyResponse (Prelude.Maybe Prelude.UTCTime)
updateMedicalVocabularyResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateMedicalVocabularyResponse
-> f UpdateMedicalVocabularyResponse
updateMedicalVocabularyResponse_lastModifiedTime = (UpdateMedicalVocabularyResponse -> Maybe POSIX)
-> (UpdateMedicalVocabularyResponse
    -> Maybe POSIX -> UpdateMedicalVocabularyResponse)
-> Lens
     UpdateMedicalVocabularyResponse
     UpdateMedicalVocabularyResponse
     (Maybe POSIX)
     (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateMedicalVocabularyResponse
 -> f UpdateMedicalVocabularyResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateMedicalVocabularyResponse
-> f UpdateMedicalVocabularyResponse
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

-- | The processing state of the update to the vocabulary. When the
-- @VocabularyState@ field is @READY@, the vocabulary is ready to be used
-- in a @StartMedicalTranscriptionJob@ request.
updateMedicalVocabularyResponse_vocabularyState :: Lens.Lens' UpdateMedicalVocabularyResponse (Prelude.Maybe VocabularyState)
updateMedicalVocabularyResponse_vocabularyState :: (Maybe VocabularyState -> f (Maybe VocabularyState))
-> UpdateMedicalVocabularyResponse
-> f UpdateMedicalVocabularyResponse
updateMedicalVocabularyResponse_vocabularyState = (UpdateMedicalVocabularyResponse -> Maybe VocabularyState)
-> (UpdateMedicalVocabularyResponse
    -> Maybe VocabularyState -> UpdateMedicalVocabularyResponse)
-> Lens
     UpdateMedicalVocabularyResponse
     UpdateMedicalVocabularyResponse
     (Maybe VocabularyState)
     (Maybe 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 :: (Int -> f Int)
-> UpdateMedicalVocabularyResponse
-> f UpdateMedicalVocabularyResponse
updateMedicalVocabularyResponse_httpStatus = (UpdateMedicalVocabularyResponse -> Int)
-> (UpdateMedicalVocabularyResponse
    -> Int -> UpdateMedicalVocabularyResponse)
-> Lens
     UpdateMedicalVocabularyResponse
     UpdateMedicalVocabularyResponse
     Int
     Int
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