module Network.AWS.APIGateway.GetMethod
(
getMethod
, GetMethod
, gmmRestAPIId
, gmmResourceId
, gmmHttpMethod
, method
, Method
, mMethodResponses
, mHttpMethod
, mRequestValidatorId
, mRequestModels
, mRequestParameters
, mAuthorizerId
, mOperationName
, mAuthorizationType
, mApiKeyRequired
, mMethodIntegration
) 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 GetMethod = GetMethod'
{ _gmmRestAPIId :: !Text
, _gmmResourceId :: !Text
, _gmmHttpMethod :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getMethod
:: Text
-> Text
-> Text
-> GetMethod
getMethod pRestAPIId_ pResourceId_ pHttpMethod_ =
GetMethod'
{ _gmmRestAPIId = pRestAPIId_
, _gmmResourceId = pResourceId_
, _gmmHttpMethod = pHttpMethod_
}
gmmRestAPIId :: Lens' GetMethod Text
gmmRestAPIId = lens _gmmRestAPIId (\ s a -> s{_gmmRestAPIId = a});
gmmResourceId :: Lens' GetMethod Text
gmmResourceId = lens _gmmResourceId (\ s a -> s{_gmmResourceId = a});
gmmHttpMethod :: Lens' GetMethod Text
gmmHttpMethod = lens _gmmHttpMethod (\ s a -> s{_gmmHttpMethod = a});
instance AWSRequest GetMethod where
type Rs GetMethod = Method
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetMethod where
instance NFData GetMethod where
instance ToHeaders GetMethod where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetMethod where
toPath GetMethod'{..}
= mconcat
["/restapis/", toBS _gmmRestAPIId, "/resources/",
toBS _gmmResourceId, "/methods/",
toBS _gmmHttpMethod]
instance ToQuery GetMethod where
toQuery = const mempty