module Network.AWS.APIGateway.DeleteRestAPI
(
deleteRestAPI
, DeleteRestAPI
, draRestAPIId
, deleteRestAPIResponse
, DeleteRestAPIResponse
) 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
newtype DeleteRestAPI = DeleteRestAPI'
{ _draRestAPIId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteRestAPI
:: Text
-> DeleteRestAPI
deleteRestAPI pRestAPIId_ = DeleteRestAPI' {_draRestAPIId = pRestAPIId_}
draRestAPIId :: Lens' DeleteRestAPI Text
draRestAPIId = lens _draRestAPIId (\ s a -> s{_draRestAPIId = a});
instance AWSRequest DeleteRestAPI where
type Rs DeleteRestAPI = DeleteRestAPIResponse
request = delete apiGateway
response = receiveNull DeleteRestAPIResponse'
instance Hashable DeleteRestAPI where
instance NFData DeleteRestAPI where
instance ToHeaders DeleteRestAPI where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath DeleteRestAPI where
toPath DeleteRestAPI'{..}
= mconcat ["/restapis/", toBS _draRestAPIId]
instance ToQuery DeleteRestAPI where
toQuery = const mempty
data DeleteRestAPIResponse =
DeleteRestAPIResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteRestAPIResponse
:: DeleteRestAPIResponse
deleteRestAPIResponse = DeleteRestAPIResponse'
instance NFData DeleteRestAPIResponse where