{-# 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.DeleteUsagePlan
(
deleteUsagePlan
, DeleteUsagePlan
, dupUsagePlanId
, deleteUsagePlanResponse
, DeleteUsagePlanResponse
) 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 DeleteUsagePlan = DeleteUsagePlan'
{ _dupUsagePlanId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteUsagePlan
:: Text
-> DeleteUsagePlan
deleteUsagePlan pUsagePlanId_ =
DeleteUsagePlan'
{ _dupUsagePlanId = pUsagePlanId_
}
dupUsagePlanId :: Lens' DeleteUsagePlan Text
dupUsagePlanId = lens _dupUsagePlanId (\ s a -> s{_dupUsagePlanId = a});
instance AWSRequest DeleteUsagePlan where
type Rs DeleteUsagePlan = DeleteUsagePlanResponse
request = delete apiGateway
response = receiveNull DeleteUsagePlanResponse'
instance Hashable DeleteUsagePlan
instance NFData DeleteUsagePlan
instance ToHeaders DeleteUsagePlan where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath DeleteUsagePlan where
toPath DeleteUsagePlan'{..}
= mconcat ["/usageplans/", toBS _dupUsagePlanId]
instance ToQuery DeleteUsagePlan where
toQuery = const mempty
data DeleteUsagePlanResponse =
DeleteUsagePlanResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteUsagePlanResponse
:: DeleteUsagePlanResponse
deleteUsagePlanResponse = DeleteUsagePlanResponse'
instance NFData DeleteUsagePlanResponse