{-# 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.Polly.DeleteLexicon
(
deleteLexicon
, DeleteLexicon
, dlName
, deleteLexiconResponse
, DeleteLexiconResponse
, dlrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Polly.Types
import Network.AWS.Polly.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteLexicon = DeleteLexicon'
{ _dlName :: Sensitive Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteLexicon
:: Text
-> DeleteLexicon
deleteLexicon pName_ =
DeleteLexicon'
{ _dlName = _Sensitive # pName_
}
dlName :: Lens' DeleteLexicon Text
dlName = lens _dlName (\ s a -> s{_dlName = a}) . _Sensitive;
instance AWSRequest DeleteLexicon where
type Rs DeleteLexicon = DeleteLexiconResponse
request = delete polly
response
= receiveEmpty
(\ s h x ->
DeleteLexiconResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteLexicon
instance NFData DeleteLexicon
instance ToHeaders DeleteLexicon where
toHeaders = const mempty
instance ToPath DeleteLexicon where
toPath DeleteLexicon'{..}
= mconcat ["/v1/lexicons/", toBS _dlName]
instance ToQuery DeleteLexicon where
toQuery = const mempty
newtype DeleteLexiconResponse = DeleteLexiconResponse'
{ _dlrsResponseStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteLexiconResponse
:: Int
-> DeleteLexiconResponse
deleteLexiconResponse pResponseStatus_ =
DeleteLexiconResponse'
{ _dlrsResponseStatus = pResponseStatus_
}
dlrsResponseStatus :: Lens' DeleteLexiconResponse Int
dlrsResponseStatus = lens _dlrsResponseStatus (\ s a -> s{_dlrsResponseStatus = a});
instance NFData DeleteLexiconResponse