{-# 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.APIGateway.DeleteMethod
(
deleteMethod
, DeleteMethod
, dmmRestAPIId
, dmmResourceId
, dmmHttpMethod
, deleteMethodResponse'
, DeleteMethodResponse'
) where
import Network.AWS.APIGateway.Types
import Network.AWS.APIGateway.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteMethod = DeleteMethod'
{ _dmmRestAPIId :: !Text
, _dmmResourceId :: !Text
, _dmmHttpMethod :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteMethod
:: Text
-> Text
-> Text
-> DeleteMethod
deleteMethod pRestAPIId_ pResourceId_ pHttpMethod_ =
DeleteMethod'
{ _dmmRestAPIId = pRestAPIId_
, _dmmResourceId = pResourceId_
, _dmmHttpMethod = pHttpMethod_
}
dmmRestAPIId :: Lens' DeleteMethod Text
dmmRestAPIId = lens _dmmRestAPIId (\ s a -> s{_dmmRestAPIId = a});
dmmResourceId :: Lens' DeleteMethod Text
dmmResourceId = lens _dmmResourceId (\ s a -> s{_dmmResourceId = a});
dmmHttpMethod :: Lens' DeleteMethod Text
dmmHttpMethod = lens _dmmHttpMethod (\ s a -> s{_dmmHttpMethod = a});
instance AWSRequest DeleteMethod where
type Rs DeleteMethod = DeleteMethodResponse'
request = delete apiGateway
response = receiveNull DeleteMethodResponse''
instance Hashable DeleteMethod
instance NFData DeleteMethod
instance ToHeaders DeleteMethod where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath DeleteMethod where
toPath DeleteMethod'{..}
= mconcat
["/restapis/", toBS _dmmRestAPIId, "/resources/",
toBS _dmmResourceId, "/methods/",
toBS _dmmHttpMethod]
instance ToQuery DeleteMethod where
toQuery = const mempty
data DeleteMethodResponse' =
DeleteMethodResponse''
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteMethodResponse'
:: DeleteMethodResponse'
deleteMethodResponse' = DeleteMethodResponse''
instance NFData DeleteMethodResponse'