{-# 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.DeleteAPIKey
(
deleteAPIKey
, DeleteAPIKey
, dakApiKey
, deleteAPIKeyResponse
, DeleteAPIKeyResponse
) 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 DeleteAPIKey = DeleteAPIKey'
{ _dakApiKey :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteAPIKey
:: Text
-> DeleteAPIKey
deleteAPIKey pApiKey_ =
DeleteAPIKey'
{ _dakApiKey = pApiKey_
}
dakApiKey :: Lens' DeleteAPIKey Text
dakApiKey = lens _dakApiKey (\ s a -> s{_dakApiKey = a});
instance AWSRequest DeleteAPIKey where
type Rs DeleteAPIKey = DeleteAPIKeyResponse
request = delete apiGateway
response = receiveNull DeleteAPIKeyResponse'
instance Hashable DeleteAPIKey
instance NFData DeleteAPIKey
instance ToHeaders DeleteAPIKey where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath DeleteAPIKey where
toPath DeleteAPIKey'{..}
= mconcat ["/apikeys/", toBS _dakApiKey]
instance ToQuery DeleteAPIKey where
toQuery = const mempty
data DeleteAPIKeyResponse =
DeleteAPIKeyResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteAPIKeyResponse
:: DeleteAPIKeyResponse
deleteAPIKeyResponse = DeleteAPIKeyResponse'
instance NFData DeleteAPIKeyResponse