{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.Transcribe.DeleteVocabulary
(
deleteVocabulary
, DeleteVocabulary
, dvVocabularyName
, deleteVocabularyResponse
, DeleteVocabularyResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Transcribe.Types
import Network.AWS.Transcribe.Types.Product
newtype DeleteVocabulary = DeleteVocabulary'
{ _dvVocabularyName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVocabulary
:: Text
-> DeleteVocabulary
deleteVocabulary pVocabularyName_ =
DeleteVocabulary' {_dvVocabularyName = pVocabularyName_}
dvVocabularyName :: Lens' DeleteVocabulary Text
dvVocabularyName = lens _dvVocabularyName (\ s a -> s{_dvVocabularyName = a})
instance AWSRequest DeleteVocabulary where
type Rs DeleteVocabulary = DeleteVocabularyResponse
request = postJSON transcribe
response = receiveNull DeleteVocabularyResponse'
instance Hashable DeleteVocabulary where
instance NFData DeleteVocabulary where
instance ToHeaders DeleteVocabulary where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Transcribe.DeleteVocabulary" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteVocabulary where
toJSON DeleteVocabulary'{..}
= object
(catMaybes
[Just ("VocabularyName" .= _dvVocabularyName)])
instance ToPath DeleteVocabulary where
toPath = const "/"
instance ToQuery DeleteVocabulary where
toQuery = const mempty
data DeleteVocabularyResponse =
DeleteVocabularyResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVocabularyResponse
:: DeleteVocabularyResponse
deleteVocabularyResponse = DeleteVocabularyResponse'
instance NFData DeleteVocabularyResponse where