{-# 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.GetDevEndpoint
(
getDevEndpoint
, GetDevEndpoint
, gdeEndpointName
, getDevEndpointResponse
, GetDevEndpointResponse
, gdedrsDevEndpoint
, gdedrsResponseStatus
) 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 GetDevEndpoint = GetDevEndpoint'
{ _gdeEndpointName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getDevEndpoint
:: Text
-> GetDevEndpoint
getDevEndpoint pEndpointName_ =
GetDevEndpoint' {_gdeEndpointName = pEndpointName_}
gdeEndpointName :: Lens' GetDevEndpoint Text
gdeEndpointName = lens _gdeEndpointName (\ s a -> s{_gdeEndpointName = a})
instance AWSRequest GetDevEndpoint where
type Rs GetDevEndpoint = GetDevEndpointResponse
request = postJSON glue
response
= receiveJSON
(\ s h x ->
GetDevEndpointResponse' <$>
(x .?> "DevEndpoint") <*> (pure (fromEnum s)))
instance Hashable GetDevEndpoint where
instance NFData GetDevEndpoint where
instance ToHeaders GetDevEndpoint where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSGlue.GetDevEndpoint" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetDevEndpoint where
toJSON GetDevEndpoint'{..}
= object
(catMaybes
[Just ("EndpointName" .= _gdeEndpointName)])
instance ToPath GetDevEndpoint where
toPath = const "/"
instance ToQuery GetDevEndpoint where
toQuery = const mempty
data GetDevEndpointResponse = GetDevEndpointResponse'
{ _gdedrsDevEndpoint :: !(Maybe DevEndpoint)
, _gdedrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getDevEndpointResponse
:: Int
-> GetDevEndpointResponse
getDevEndpointResponse pResponseStatus_ =
GetDevEndpointResponse'
{_gdedrsDevEndpoint = Nothing, _gdedrsResponseStatus = pResponseStatus_}
gdedrsDevEndpoint :: Lens' GetDevEndpointResponse (Maybe DevEndpoint)
gdedrsDevEndpoint = lens _gdedrsDevEndpoint (\ s a -> s{_gdedrsDevEndpoint = a})
gdedrsResponseStatus :: Lens' GetDevEndpointResponse Int
gdedrsResponseStatus = lens _gdedrsResponseStatus (\ s a -> s{_gdedrsResponseStatus = a})
instance NFData GetDevEndpointResponse where