{-# 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.DeleteStage
(
deleteStage
, DeleteStage
, dsRestAPIId
, dsStageName
, deleteStageResponse
, DeleteStageResponse
) 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 DeleteStage = DeleteStage'
{ _dsRestAPIId :: !Text
, _dsStageName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteStage
:: Text
-> Text
-> DeleteStage
deleteStage pRestAPIId_ pStageName_ =
DeleteStage'
{ _dsRestAPIId = pRestAPIId_
, _dsStageName = pStageName_
}
dsRestAPIId :: Lens' DeleteStage Text
dsRestAPIId = lens _dsRestAPIId (\ s a -> s{_dsRestAPIId = a});
dsStageName :: Lens' DeleteStage Text
dsStageName = lens _dsStageName (\ s a -> s{_dsStageName = a});
instance AWSRequest DeleteStage where
type Rs DeleteStage = DeleteStageResponse
request = delete apiGateway
response = receiveNull DeleteStageResponse'
instance Hashable DeleteStage
instance NFData DeleteStage
instance ToHeaders DeleteStage where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath DeleteStage where
toPath DeleteStage'{..}
= mconcat
["/restapis/", toBS _dsRestAPIId, "/stages/",
toBS _dsStageName]
instance ToQuery DeleteStage where
toQuery = const mempty
data DeleteStageResponse =
DeleteStageResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteStageResponse
:: DeleteStageResponse
deleteStageResponse = DeleteStageResponse'
instance NFData DeleteStageResponse