{-# 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.DeleteMedicalTranscriptionJob
-- 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)
--
-- Deletes a transcription job generated by Amazon Transcribe Medical and
-- any related information.
module Amazonka.Transcribe.DeleteMedicalTranscriptionJob
  ( -- * Creating a Request
    DeleteMedicalTranscriptionJob (..),
    newDeleteMedicalTranscriptionJob,

    -- * Request Lenses
    deleteMedicalTranscriptionJob_medicalTranscriptionJobName,

    -- * Destructuring the Response
    DeleteMedicalTranscriptionJobResponse (..),
    newDeleteMedicalTranscriptionJobResponse,
  )
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:/ 'newDeleteMedicalTranscriptionJob' smart constructor.
data DeleteMedicalTranscriptionJob = DeleteMedicalTranscriptionJob'
  { -- | The name you provide to the @DeleteMedicalTranscriptionJob@ object to
    -- delete a transcription job.
    DeleteMedicalTranscriptionJob -> Text
medicalTranscriptionJobName :: Prelude.Text
  }
  deriving (DeleteMedicalTranscriptionJob
-> DeleteMedicalTranscriptionJob -> Bool
(DeleteMedicalTranscriptionJob
 -> DeleteMedicalTranscriptionJob -> Bool)
-> (DeleteMedicalTranscriptionJob
    -> DeleteMedicalTranscriptionJob -> Bool)
-> Eq DeleteMedicalTranscriptionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMedicalTranscriptionJob
-> DeleteMedicalTranscriptionJob -> Bool
$c/= :: DeleteMedicalTranscriptionJob
-> DeleteMedicalTranscriptionJob -> Bool
== :: DeleteMedicalTranscriptionJob
-> DeleteMedicalTranscriptionJob -> Bool
$c== :: DeleteMedicalTranscriptionJob
-> DeleteMedicalTranscriptionJob -> Bool
Prelude.Eq, ReadPrec [DeleteMedicalTranscriptionJob]
ReadPrec DeleteMedicalTranscriptionJob
Int -> ReadS DeleteMedicalTranscriptionJob
ReadS [DeleteMedicalTranscriptionJob]
(Int -> ReadS DeleteMedicalTranscriptionJob)
-> ReadS [DeleteMedicalTranscriptionJob]
-> ReadPrec DeleteMedicalTranscriptionJob
-> ReadPrec [DeleteMedicalTranscriptionJob]
-> Read DeleteMedicalTranscriptionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMedicalTranscriptionJob]
$creadListPrec :: ReadPrec [DeleteMedicalTranscriptionJob]
readPrec :: ReadPrec DeleteMedicalTranscriptionJob
$creadPrec :: ReadPrec DeleteMedicalTranscriptionJob
readList :: ReadS [DeleteMedicalTranscriptionJob]
$creadList :: ReadS [DeleteMedicalTranscriptionJob]
readsPrec :: Int -> ReadS DeleteMedicalTranscriptionJob
$creadsPrec :: Int -> ReadS DeleteMedicalTranscriptionJob
Prelude.Read, Int -> DeleteMedicalTranscriptionJob -> ShowS
[DeleteMedicalTranscriptionJob] -> ShowS
DeleteMedicalTranscriptionJob -> String
(Int -> DeleteMedicalTranscriptionJob -> ShowS)
-> (DeleteMedicalTranscriptionJob -> String)
-> ([DeleteMedicalTranscriptionJob] -> ShowS)
-> Show DeleteMedicalTranscriptionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMedicalTranscriptionJob] -> ShowS
$cshowList :: [DeleteMedicalTranscriptionJob] -> ShowS
show :: DeleteMedicalTranscriptionJob -> String
$cshow :: DeleteMedicalTranscriptionJob -> String
showsPrec :: Int -> DeleteMedicalTranscriptionJob -> ShowS
$cshowsPrec :: Int -> DeleteMedicalTranscriptionJob -> ShowS
Prelude.Show, (forall x.
 DeleteMedicalTranscriptionJob
 -> Rep DeleteMedicalTranscriptionJob x)
-> (forall x.
    Rep DeleteMedicalTranscriptionJob x
    -> DeleteMedicalTranscriptionJob)
-> Generic DeleteMedicalTranscriptionJob
forall x.
Rep DeleteMedicalTranscriptionJob x
-> DeleteMedicalTranscriptionJob
forall x.
DeleteMedicalTranscriptionJob
-> Rep DeleteMedicalTranscriptionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteMedicalTranscriptionJob x
-> DeleteMedicalTranscriptionJob
$cfrom :: forall x.
DeleteMedicalTranscriptionJob
-> Rep DeleteMedicalTranscriptionJob x
Prelude.Generic)

-- |
-- Create a value of 'DeleteMedicalTranscriptionJob' 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:
--
-- 'medicalTranscriptionJobName', 'deleteMedicalTranscriptionJob_medicalTranscriptionJobName' - The name you provide to the @DeleteMedicalTranscriptionJob@ object to
-- delete a transcription job.
newDeleteMedicalTranscriptionJob ::
  -- | 'medicalTranscriptionJobName'
  Prelude.Text ->
  DeleteMedicalTranscriptionJob
newDeleteMedicalTranscriptionJob :: Text -> DeleteMedicalTranscriptionJob
newDeleteMedicalTranscriptionJob
  Text
pMedicalTranscriptionJobName_ =
    DeleteMedicalTranscriptionJob' :: Text -> DeleteMedicalTranscriptionJob
DeleteMedicalTranscriptionJob'
      { $sel:medicalTranscriptionJobName:DeleteMedicalTranscriptionJob' :: Text
medicalTranscriptionJobName =
          Text
pMedicalTranscriptionJobName_
      }

-- | The name you provide to the @DeleteMedicalTranscriptionJob@ object to
-- delete a transcription job.
deleteMedicalTranscriptionJob_medicalTranscriptionJobName :: Lens.Lens' DeleteMedicalTranscriptionJob Prelude.Text
deleteMedicalTranscriptionJob_medicalTranscriptionJobName :: (Text -> f Text)
-> DeleteMedicalTranscriptionJob -> f DeleteMedicalTranscriptionJob
deleteMedicalTranscriptionJob_medicalTranscriptionJobName = (DeleteMedicalTranscriptionJob -> Text)
-> (DeleteMedicalTranscriptionJob
    -> Text -> DeleteMedicalTranscriptionJob)
-> Lens
     DeleteMedicalTranscriptionJob
     DeleteMedicalTranscriptionJob
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMedicalTranscriptionJob' {Text
medicalTranscriptionJobName :: Text
$sel:medicalTranscriptionJobName:DeleteMedicalTranscriptionJob' :: DeleteMedicalTranscriptionJob -> Text
medicalTranscriptionJobName} -> Text
medicalTranscriptionJobName) (\s :: DeleteMedicalTranscriptionJob
s@DeleteMedicalTranscriptionJob' {} Text
a -> DeleteMedicalTranscriptionJob
s {$sel:medicalTranscriptionJobName:DeleteMedicalTranscriptionJob' :: Text
medicalTranscriptionJobName = Text
a} :: DeleteMedicalTranscriptionJob)

instance
  Core.AWSRequest
    DeleteMedicalTranscriptionJob
  where
  type
    AWSResponse DeleteMedicalTranscriptionJob =
      DeleteMedicalTranscriptionJobResponse
  request :: DeleteMedicalTranscriptionJob
-> Request DeleteMedicalTranscriptionJob
request = Service
-> DeleteMedicalTranscriptionJob
-> Request DeleteMedicalTranscriptionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteMedicalTranscriptionJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteMedicalTranscriptionJob)))
response =
    AWSResponse DeleteMedicalTranscriptionJob
-> Logger
-> Service
-> Proxy DeleteMedicalTranscriptionJob
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteMedicalTranscriptionJob)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse DeleteMedicalTranscriptionJob
DeleteMedicalTranscriptionJobResponse
DeleteMedicalTranscriptionJobResponse'

instance
  Prelude.Hashable
    DeleteMedicalTranscriptionJob

instance Prelude.NFData DeleteMedicalTranscriptionJob

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

instance Core.ToJSON DeleteMedicalTranscriptionJob where
  toJSON :: DeleteMedicalTranscriptionJob -> Value
toJSON DeleteMedicalTranscriptionJob' {Text
medicalTranscriptionJobName :: Text
$sel:medicalTranscriptionJobName:DeleteMedicalTranscriptionJob' :: DeleteMedicalTranscriptionJob -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ 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
              )
          ]
      )

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

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

-- | /See:/ 'newDeleteMedicalTranscriptionJobResponse' smart constructor.
data DeleteMedicalTranscriptionJobResponse = DeleteMedicalTranscriptionJobResponse'
  {
  }
  deriving (DeleteMedicalTranscriptionJobResponse
-> DeleteMedicalTranscriptionJobResponse -> Bool
(DeleteMedicalTranscriptionJobResponse
 -> DeleteMedicalTranscriptionJobResponse -> Bool)
-> (DeleteMedicalTranscriptionJobResponse
    -> DeleteMedicalTranscriptionJobResponse -> Bool)
-> Eq DeleteMedicalTranscriptionJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMedicalTranscriptionJobResponse
-> DeleteMedicalTranscriptionJobResponse -> Bool
$c/= :: DeleteMedicalTranscriptionJobResponse
-> DeleteMedicalTranscriptionJobResponse -> Bool
== :: DeleteMedicalTranscriptionJobResponse
-> DeleteMedicalTranscriptionJobResponse -> Bool
$c== :: DeleteMedicalTranscriptionJobResponse
-> DeleteMedicalTranscriptionJobResponse -> Bool
Prelude.Eq, ReadPrec [DeleteMedicalTranscriptionJobResponse]
ReadPrec DeleteMedicalTranscriptionJobResponse
Int -> ReadS DeleteMedicalTranscriptionJobResponse
ReadS [DeleteMedicalTranscriptionJobResponse]
(Int -> ReadS DeleteMedicalTranscriptionJobResponse)
-> ReadS [DeleteMedicalTranscriptionJobResponse]
-> ReadPrec DeleteMedicalTranscriptionJobResponse
-> ReadPrec [DeleteMedicalTranscriptionJobResponse]
-> Read DeleteMedicalTranscriptionJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMedicalTranscriptionJobResponse]
$creadListPrec :: ReadPrec [DeleteMedicalTranscriptionJobResponse]
readPrec :: ReadPrec DeleteMedicalTranscriptionJobResponse
$creadPrec :: ReadPrec DeleteMedicalTranscriptionJobResponse
readList :: ReadS [DeleteMedicalTranscriptionJobResponse]
$creadList :: ReadS [DeleteMedicalTranscriptionJobResponse]
readsPrec :: Int -> ReadS DeleteMedicalTranscriptionJobResponse
$creadsPrec :: Int -> ReadS DeleteMedicalTranscriptionJobResponse
Prelude.Read, Int -> DeleteMedicalTranscriptionJobResponse -> ShowS
[DeleteMedicalTranscriptionJobResponse] -> ShowS
DeleteMedicalTranscriptionJobResponse -> String
(Int -> DeleteMedicalTranscriptionJobResponse -> ShowS)
-> (DeleteMedicalTranscriptionJobResponse -> String)
-> ([DeleteMedicalTranscriptionJobResponse] -> ShowS)
-> Show DeleteMedicalTranscriptionJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMedicalTranscriptionJobResponse] -> ShowS
$cshowList :: [DeleteMedicalTranscriptionJobResponse] -> ShowS
show :: DeleteMedicalTranscriptionJobResponse -> String
$cshow :: DeleteMedicalTranscriptionJobResponse -> String
showsPrec :: Int -> DeleteMedicalTranscriptionJobResponse -> ShowS
$cshowsPrec :: Int -> DeleteMedicalTranscriptionJobResponse -> ShowS
Prelude.Show, (forall x.
 DeleteMedicalTranscriptionJobResponse
 -> Rep DeleteMedicalTranscriptionJobResponse x)
-> (forall x.
    Rep DeleteMedicalTranscriptionJobResponse x
    -> DeleteMedicalTranscriptionJobResponse)
-> Generic DeleteMedicalTranscriptionJobResponse
forall x.
Rep DeleteMedicalTranscriptionJobResponse x
-> DeleteMedicalTranscriptionJobResponse
forall x.
DeleteMedicalTranscriptionJobResponse
-> Rep DeleteMedicalTranscriptionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteMedicalTranscriptionJobResponse x
-> DeleteMedicalTranscriptionJobResponse
$cfrom :: forall x.
DeleteMedicalTranscriptionJobResponse
-> Rep DeleteMedicalTranscriptionJobResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteMedicalTranscriptionJobResponse' 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.
newDeleteMedicalTranscriptionJobResponse ::
  DeleteMedicalTranscriptionJobResponse
newDeleteMedicalTranscriptionJobResponse :: DeleteMedicalTranscriptionJobResponse
newDeleteMedicalTranscriptionJobResponse =
  DeleteMedicalTranscriptionJobResponse
DeleteMedicalTranscriptionJobResponse'

instance
  Prelude.NFData
    DeleteMedicalTranscriptionJobResponse