{-# 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.DeleteVocabularyFilter
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes a custom vocabulary filter. To use this operation, specify the
-- name of the custom vocabulary filter you want to delete using
-- @VocabularyFilterName@. Custom vocabulary filter names are case
-- sensitive.
module Amazonka.Transcribe.DeleteVocabularyFilter
  ( -- * Creating a Request
    DeleteVocabularyFilter (..),
    newDeleteVocabularyFilter,

    -- * Request Lenses
    deleteVocabularyFilter_vocabularyFilterName,

    -- * Destructuring the Response
    DeleteVocabularyFilterResponse (..),
    newDeleteVocabularyFilterResponse,
  )
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:/ 'newDeleteVocabularyFilter' smart constructor.
data DeleteVocabularyFilter = DeleteVocabularyFilter'
  { -- | The name of the custom vocabulary filter you want to delete. Custom
    -- vocabulary filter names are case sensitive.
    DeleteVocabularyFilter -> Text
vocabularyFilterName :: Prelude.Text
  }
  deriving (DeleteVocabularyFilter -> DeleteVocabularyFilter -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVocabularyFilter -> DeleteVocabularyFilter -> Bool
$c/= :: DeleteVocabularyFilter -> DeleteVocabularyFilter -> Bool
== :: DeleteVocabularyFilter -> DeleteVocabularyFilter -> Bool
$c== :: DeleteVocabularyFilter -> DeleteVocabularyFilter -> Bool
Prelude.Eq, ReadPrec [DeleteVocabularyFilter]
ReadPrec DeleteVocabularyFilter
Int -> ReadS DeleteVocabularyFilter
ReadS [DeleteVocabularyFilter]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVocabularyFilter]
$creadListPrec :: ReadPrec [DeleteVocabularyFilter]
readPrec :: ReadPrec DeleteVocabularyFilter
$creadPrec :: ReadPrec DeleteVocabularyFilter
readList :: ReadS [DeleteVocabularyFilter]
$creadList :: ReadS [DeleteVocabularyFilter]
readsPrec :: Int -> ReadS DeleteVocabularyFilter
$creadsPrec :: Int -> ReadS DeleteVocabularyFilter
Prelude.Read, Int -> DeleteVocabularyFilter -> ShowS
[DeleteVocabularyFilter] -> ShowS
DeleteVocabularyFilter -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVocabularyFilter] -> ShowS
$cshowList :: [DeleteVocabularyFilter] -> ShowS
show :: DeleteVocabularyFilter -> String
$cshow :: DeleteVocabularyFilter -> String
showsPrec :: Int -> DeleteVocabularyFilter -> ShowS
$cshowsPrec :: Int -> DeleteVocabularyFilter -> ShowS
Prelude.Show, forall x. Rep DeleteVocabularyFilter x -> DeleteVocabularyFilter
forall x. DeleteVocabularyFilter -> Rep DeleteVocabularyFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteVocabularyFilter x -> DeleteVocabularyFilter
$cfrom :: forall x. DeleteVocabularyFilter -> Rep DeleteVocabularyFilter x
Prelude.Generic)

-- |
-- Create a value of 'DeleteVocabularyFilter' 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:
--
-- 'vocabularyFilterName', 'deleteVocabularyFilter_vocabularyFilterName' - The name of the custom vocabulary filter you want to delete. Custom
-- vocabulary filter names are case sensitive.
newDeleteVocabularyFilter ::
  -- | 'vocabularyFilterName'
  Prelude.Text ->
  DeleteVocabularyFilter
newDeleteVocabularyFilter :: Text -> DeleteVocabularyFilter
newDeleteVocabularyFilter Text
pVocabularyFilterName_ =
  DeleteVocabularyFilter'
    { $sel:vocabularyFilterName:DeleteVocabularyFilter' :: Text
vocabularyFilterName =
        Text
pVocabularyFilterName_
    }

-- | The name of the custom vocabulary filter you want to delete. Custom
-- vocabulary filter names are case sensitive.
deleteVocabularyFilter_vocabularyFilterName :: Lens.Lens' DeleteVocabularyFilter Prelude.Text
deleteVocabularyFilter_vocabularyFilterName :: Lens' DeleteVocabularyFilter Text
deleteVocabularyFilter_vocabularyFilterName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVocabularyFilter' {Text
vocabularyFilterName :: Text
$sel:vocabularyFilterName:DeleteVocabularyFilter' :: DeleteVocabularyFilter -> Text
vocabularyFilterName} -> Text
vocabularyFilterName) (\s :: DeleteVocabularyFilter
s@DeleteVocabularyFilter' {} Text
a -> DeleteVocabularyFilter
s {$sel:vocabularyFilterName:DeleteVocabularyFilter' :: Text
vocabularyFilterName = Text
a} :: DeleteVocabularyFilter)

instance Core.AWSRequest DeleteVocabularyFilter where
  type
    AWSResponse DeleteVocabularyFilter =
      DeleteVocabularyFilterResponse
  request :: (Service -> Service)
-> DeleteVocabularyFilter -> Request DeleteVocabularyFilter
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 DeleteVocabularyFilter
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteVocabularyFilter)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      DeleteVocabularyFilterResponse
DeleteVocabularyFilterResponse'

instance Prelude.Hashable DeleteVocabularyFilter where
  hashWithSalt :: Int -> DeleteVocabularyFilter -> Int
hashWithSalt Int
_salt DeleteVocabularyFilter' {Text
vocabularyFilterName :: Text
$sel:vocabularyFilterName:DeleteVocabularyFilter' :: DeleteVocabularyFilter -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vocabularyFilterName

instance Prelude.NFData DeleteVocabularyFilter where
  rnf :: DeleteVocabularyFilter -> ()
rnf DeleteVocabularyFilter' {Text
vocabularyFilterName :: Text
$sel:vocabularyFilterName:DeleteVocabularyFilter' :: DeleteVocabularyFilter -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
vocabularyFilterName

instance Data.ToHeaders DeleteVocabularyFilter where
  toHeaders :: DeleteVocabularyFilter -> [Header]
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 -> [Header]
Data.=# ( ByteString
"Transcribe.DeleteVocabularyFilter" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON DeleteVocabularyFilter where
  toJSON :: DeleteVocabularyFilter -> Value
toJSON DeleteVocabularyFilter' {Text
vocabularyFilterName :: Text
$sel:vocabularyFilterName:DeleteVocabularyFilter' :: DeleteVocabularyFilter -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              ( Key
"VocabularyFilterName"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
vocabularyFilterName
              )
          ]
      )

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

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

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

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

instance
  Prelude.NFData
    DeleteVocabularyFilterResponse
  where
  rnf :: DeleteVocabularyFilterResponse -> ()
rnf DeleteVocabularyFilterResponse
_ = ()