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

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

-- |
-- Module      : Amazonka.Transcribe.Types.MedicalTranscript
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Transcribe.Types.MedicalTranscript where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Identifies the location of a medical transcript.
--
-- /See:/ 'newMedicalTranscript' smart constructor.
data MedicalTranscript = MedicalTranscript'
  { -- | The S3 object location of the medical transcript.
    --
    -- Use this URI to access the medical transcript. This URI points to the S3
    -- bucket you created to store the medical transcript.
    MedicalTranscript -> Maybe Text
transcriptFileUri :: Prelude.Maybe Prelude.Text
  }
  deriving (MedicalTranscript -> MedicalTranscript -> Bool
(MedicalTranscript -> MedicalTranscript -> Bool)
-> (MedicalTranscript -> MedicalTranscript -> Bool)
-> Eq MedicalTranscript
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MedicalTranscript -> MedicalTranscript -> Bool
$c/= :: MedicalTranscript -> MedicalTranscript -> Bool
== :: MedicalTranscript -> MedicalTranscript -> Bool
$c== :: MedicalTranscript -> MedicalTranscript -> Bool
Prelude.Eq, ReadPrec [MedicalTranscript]
ReadPrec MedicalTranscript
Int -> ReadS MedicalTranscript
ReadS [MedicalTranscript]
(Int -> ReadS MedicalTranscript)
-> ReadS [MedicalTranscript]
-> ReadPrec MedicalTranscript
-> ReadPrec [MedicalTranscript]
-> Read MedicalTranscript
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MedicalTranscript]
$creadListPrec :: ReadPrec [MedicalTranscript]
readPrec :: ReadPrec MedicalTranscript
$creadPrec :: ReadPrec MedicalTranscript
readList :: ReadS [MedicalTranscript]
$creadList :: ReadS [MedicalTranscript]
readsPrec :: Int -> ReadS MedicalTranscript
$creadsPrec :: Int -> ReadS MedicalTranscript
Prelude.Read, Int -> MedicalTranscript -> ShowS
[MedicalTranscript] -> ShowS
MedicalTranscript -> String
(Int -> MedicalTranscript -> ShowS)
-> (MedicalTranscript -> String)
-> ([MedicalTranscript] -> ShowS)
-> Show MedicalTranscript
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MedicalTranscript] -> ShowS
$cshowList :: [MedicalTranscript] -> ShowS
show :: MedicalTranscript -> String
$cshow :: MedicalTranscript -> String
showsPrec :: Int -> MedicalTranscript -> ShowS
$cshowsPrec :: Int -> MedicalTranscript -> ShowS
Prelude.Show, (forall x. MedicalTranscript -> Rep MedicalTranscript x)
-> (forall x. Rep MedicalTranscript x -> MedicalTranscript)
-> Generic MedicalTranscript
forall x. Rep MedicalTranscript x -> MedicalTranscript
forall x. MedicalTranscript -> Rep MedicalTranscript x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MedicalTranscript x -> MedicalTranscript
$cfrom :: forall x. MedicalTranscript -> Rep MedicalTranscript x
Prelude.Generic)

-- |
-- Create a value of 'MedicalTranscript' 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:
--
-- 'transcriptFileUri', 'medicalTranscript_transcriptFileUri' - The S3 object location of the medical transcript.
--
-- Use this URI to access the medical transcript. This URI points to the S3
-- bucket you created to store the medical transcript.
newMedicalTranscript ::
  MedicalTranscript
newMedicalTranscript :: MedicalTranscript
newMedicalTranscript =
  MedicalTranscript' :: Maybe Text -> MedicalTranscript
MedicalTranscript'
    { $sel:transcriptFileUri:MedicalTranscript' :: Maybe Text
transcriptFileUri =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The S3 object location of the medical transcript.
--
-- Use this URI to access the medical transcript. This URI points to the S3
-- bucket you created to store the medical transcript.
medicalTranscript_transcriptFileUri :: Lens.Lens' MedicalTranscript (Prelude.Maybe Prelude.Text)
medicalTranscript_transcriptFileUri :: (Maybe Text -> f (Maybe Text))
-> MedicalTranscript -> f MedicalTranscript
medicalTranscript_transcriptFileUri = (MedicalTranscript -> Maybe Text)
-> (MedicalTranscript -> Maybe Text -> MedicalTranscript)
-> Lens
     MedicalTranscript MedicalTranscript (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MedicalTranscript' {Maybe Text
transcriptFileUri :: Maybe Text
$sel:transcriptFileUri:MedicalTranscript' :: MedicalTranscript -> Maybe Text
transcriptFileUri} -> Maybe Text
transcriptFileUri) (\s :: MedicalTranscript
s@MedicalTranscript' {} Maybe Text
a -> MedicalTranscript
s {$sel:transcriptFileUri:MedicalTranscript' :: Maybe Text
transcriptFileUri = Maybe Text
a} :: MedicalTranscript)

instance Core.FromJSON MedicalTranscript where
  parseJSON :: Value -> Parser MedicalTranscript
parseJSON =
    String
-> (Object -> Parser MedicalTranscript)
-> Value
-> Parser MedicalTranscript
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MedicalTranscript"
      ( \Object
x ->
          Maybe Text -> MedicalTranscript
MedicalTranscript'
            (Maybe Text -> MedicalTranscript)
-> Parser (Maybe Text) -> Parser MedicalTranscript
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TranscriptFileUri")
      )

instance Prelude.Hashable MedicalTranscript

instance Prelude.NFData MedicalTranscript