{-# 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.Glue.DeleteDevEndpoint
(
deleteDevEndpoint
, DeleteDevEndpoint
, ddeEndpointName
, deleteDevEndpointResponse
, DeleteDevEndpointResponse
, ddersResponseStatus
) where
import Network.AWS.Glue.Types
import Network.AWS.Glue.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteDevEndpoint = DeleteDevEndpoint'
{ _ddeEndpointName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDevEndpoint
:: Text
-> DeleteDevEndpoint
deleteDevEndpoint pEndpointName_ =
DeleteDevEndpoint' {_ddeEndpointName = pEndpointName_}
ddeEndpointName :: Lens' DeleteDevEndpoint Text
ddeEndpointName = lens _ddeEndpointName (\ s a -> s{_ddeEndpointName = a})
instance AWSRequest DeleteDevEndpoint where
type Rs DeleteDevEndpoint = DeleteDevEndpointResponse
request = postJSON glue
response
= receiveEmpty
(\ s h x ->
DeleteDevEndpointResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteDevEndpoint where
instance NFData DeleteDevEndpoint where
instance ToHeaders DeleteDevEndpoint where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSGlue.DeleteDevEndpoint" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteDevEndpoint where
toJSON DeleteDevEndpoint'{..}
= object
(catMaybes
[Just ("EndpointName" .= _ddeEndpointName)])
instance ToPath DeleteDevEndpoint where
toPath = const "/"
instance ToQuery DeleteDevEndpoint where
toQuery = const mempty
newtype DeleteDevEndpointResponse = DeleteDevEndpointResponse'
{ _ddersResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDevEndpointResponse
:: Int
-> DeleteDevEndpointResponse
deleteDevEndpointResponse pResponseStatus_ =
DeleteDevEndpointResponse' {_ddersResponseStatus = pResponseStatus_}
ddersResponseStatus :: Lens' DeleteDevEndpointResponse Int
ddersResponseStatus = lens _ddersResponseStatus (\ s a -> s{_ddersResponseStatus = a})
instance NFData DeleteDevEndpointResponse where