{-# 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.DeleteModel
(
deleteModel
, DeleteModel
, dRestAPIId
, dModelName
, deleteModelResponse
, DeleteModelResponse
) 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 DeleteModel = DeleteModel'
{ _dRestAPIId :: !Text
, _dModelName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteModel
:: Text
-> Text
-> DeleteModel
deleteModel pRestAPIId_ pModelName_ =
DeleteModel'
{ _dRestAPIId = pRestAPIId_
, _dModelName = pModelName_
}
dRestAPIId :: Lens' DeleteModel Text
dRestAPIId = lens _dRestAPIId (\ s a -> s{_dRestAPIId = a});
dModelName :: Lens' DeleteModel Text
dModelName = lens _dModelName (\ s a -> s{_dModelName = a});
instance AWSRequest DeleteModel where
type Rs DeleteModel = DeleteModelResponse
request = delete apiGateway
response = receiveNull DeleteModelResponse'
instance Hashable DeleteModel
instance NFData DeleteModel
instance ToHeaders DeleteModel where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath DeleteModel where
toPath DeleteModel'{..}
= mconcat
["/restapis/", toBS _dRestAPIId, "/models/",
toBS _dModelName]
instance ToQuery DeleteModel where
toQuery = const mempty
data DeleteModelResponse =
DeleteModelResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteModelResponse
:: DeleteModelResponse
deleteModelResponse = DeleteModelResponse'
instance NFData DeleteModelResponse