{-# 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.DeleteMedicalVocabulary
-- 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 vocabulary from Amazon Transcribe Medical.
module Amazonka.Transcribe.DeleteMedicalVocabulary
  ( -- * Creating a Request
    DeleteMedicalVocabulary (..),
    newDeleteMedicalVocabulary,

    -- * Request Lenses
    deleteMedicalVocabulary_vocabularyName,

    -- * Destructuring the Response
    DeleteMedicalVocabularyResponse (..),
    newDeleteMedicalVocabularyResponse,
  )
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:/ 'newDeleteMedicalVocabulary' smart constructor.
data DeleteMedicalVocabulary = DeleteMedicalVocabulary'
  { -- | The name of the vocabulary that you want to delete.
    DeleteMedicalVocabulary -> Text
vocabularyName :: Prelude.Text
  }
  deriving (DeleteMedicalVocabulary -> DeleteMedicalVocabulary -> Bool
(DeleteMedicalVocabulary -> DeleteMedicalVocabulary -> Bool)
-> (DeleteMedicalVocabulary -> DeleteMedicalVocabulary -> Bool)
-> Eq DeleteMedicalVocabulary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMedicalVocabulary -> DeleteMedicalVocabulary -> Bool
$c/= :: DeleteMedicalVocabulary -> DeleteMedicalVocabulary -> Bool
== :: DeleteMedicalVocabulary -> DeleteMedicalVocabulary -> Bool
$c== :: DeleteMedicalVocabulary -> DeleteMedicalVocabulary -> Bool
Prelude.Eq, ReadPrec [DeleteMedicalVocabulary]
ReadPrec DeleteMedicalVocabulary
Int -> ReadS DeleteMedicalVocabulary
ReadS [DeleteMedicalVocabulary]
(Int -> ReadS DeleteMedicalVocabulary)
-> ReadS [DeleteMedicalVocabulary]
-> ReadPrec DeleteMedicalVocabulary
-> ReadPrec [DeleteMedicalVocabulary]
-> Read DeleteMedicalVocabulary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMedicalVocabulary]
$creadListPrec :: ReadPrec [DeleteMedicalVocabulary]
readPrec :: ReadPrec DeleteMedicalVocabulary
$creadPrec :: ReadPrec DeleteMedicalVocabulary
readList :: ReadS [DeleteMedicalVocabulary]
$creadList :: ReadS [DeleteMedicalVocabulary]
readsPrec :: Int -> ReadS DeleteMedicalVocabulary
$creadsPrec :: Int -> ReadS DeleteMedicalVocabulary
Prelude.Read, Int -> DeleteMedicalVocabulary -> ShowS
[DeleteMedicalVocabulary] -> ShowS
DeleteMedicalVocabulary -> String
(Int -> DeleteMedicalVocabulary -> ShowS)
-> (DeleteMedicalVocabulary -> String)
-> ([DeleteMedicalVocabulary] -> ShowS)
-> Show DeleteMedicalVocabulary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMedicalVocabulary] -> ShowS
$cshowList :: [DeleteMedicalVocabulary] -> ShowS
show :: DeleteMedicalVocabulary -> String
$cshow :: DeleteMedicalVocabulary -> String
showsPrec :: Int -> DeleteMedicalVocabulary -> ShowS
$cshowsPrec :: Int -> DeleteMedicalVocabulary -> ShowS
Prelude.Show, (forall x.
 DeleteMedicalVocabulary -> Rep DeleteMedicalVocabulary x)
-> (forall x.
    Rep DeleteMedicalVocabulary x -> DeleteMedicalVocabulary)
-> Generic DeleteMedicalVocabulary
forall x. Rep DeleteMedicalVocabulary x -> DeleteMedicalVocabulary
forall x. DeleteMedicalVocabulary -> Rep DeleteMedicalVocabulary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteMedicalVocabulary x -> DeleteMedicalVocabulary
$cfrom :: forall x. DeleteMedicalVocabulary -> Rep DeleteMedicalVocabulary x
Prelude.Generic)

-- |
-- Create a value of 'DeleteMedicalVocabulary' 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', 'deleteMedicalVocabulary_vocabularyName' - The name of the vocabulary that you want to delete.
newDeleteMedicalVocabulary ::
  -- | 'vocabularyName'
  Prelude.Text ->
  DeleteMedicalVocabulary
newDeleteMedicalVocabulary :: Text -> DeleteMedicalVocabulary
newDeleteMedicalVocabulary Text
pVocabularyName_ =
  DeleteMedicalVocabulary' :: Text -> DeleteMedicalVocabulary
DeleteMedicalVocabulary'
    { $sel:vocabularyName:DeleteMedicalVocabulary' :: Text
vocabularyName =
        Text
pVocabularyName_
    }

-- | The name of the vocabulary that you want to delete.
deleteMedicalVocabulary_vocabularyName :: Lens.Lens' DeleteMedicalVocabulary Prelude.Text
deleteMedicalVocabulary_vocabularyName :: (Text -> f Text)
-> DeleteMedicalVocabulary -> f DeleteMedicalVocabulary
deleteMedicalVocabulary_vocabularyName = (DeleteMedicalVocabulary -> Text)
-> (DeleteMedicalVocabulary -> Text -> DeleteMedicalVocabulary)
-> Lens DeleteMedicalVocabulary DeleteMedicalVocabulary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMedicalVocabulary' {Text
vocabularyName :: Text
$sel:vocabularyName:DeleteMedicalVocabulary' :: DeleteMedicalVocabulary -> Text
vocabularyName} -> Text
vocabularyName) (\s :: DeleteMedicalVocabulary
s@DeleteMedicalVocabulary' {} Text
a -> DeleteMedicalVocabulary
s {$sel:vocabularyName:DeleteMedicalVocabulary' :: Text
vocabularyName = Text
a} :: DeleteMedicalVocabulary)

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

instance Prelude.Hashable DeleteMedicalVocabulary

instance Prelude.NFData DeleteMedicalVocabulary

instance Core.ToHeaders DeleteMedicalVocabulary where
  toHeaders :: DeleteMedicalVocabulary -> [Header]
toHeaders =
    [Header] -> DeleteMedicalVocabulary -> [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.DeleteMedicalVocabulary" ::
                          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 DeleteMedicalVocabulary where
  toJSON :: DeleteMedicalVocabulary -> Value
toJSON DeleteMedicalVocabulary' {Text
vocabularyName :: Text
$sel:vocabularyName:DeleteMedicalVocabulary' :: DeleteMedicalVocabulary -> 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
"VocabularyName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
vocabularyName)
          ]
      )

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

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

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

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

instance
  Prelude.NFData
    DeleteMedicalVocabularyResponse