module Network.AWS.APIGateway.GetMethodResponse
(
getMethodResponse
, GetMethodResponse
, gmRestAPIId
, gmResourceId
, gmHttpMethod
, gmStatusCode
, methodResponse
, MethodResponse
, mResponseModels
, mStatusCode
, mResponseParameters
) 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 GetMethodResponse = GetMethodResponse'
{ _gmRestAPIId :: !Text
, _gmResourceId :: !Text
, _gmHttpMethod :: !Text
, _gmStatusCode :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getMethodResponse
:: Text
-> Text
-> Text
-> Text
-> GetMethodResponse
getMethodResponse pRestAPIId_ pResourceId_ pHttpMethod_ pStatusCode_ =
GetMethodResponse'
{ _gmRestAPIId = pRestAPIId_
, _gmResourceId = pResourceId_
, _gmHttpMethod = pHttpMethod_
, _gmStatusCode = pStatusCode_
}
gmRestAPIId :: Lens' GetMethodResponse Text
gmRestAPIId = lens _gmRestAPIId (\ s a -> s{_gmRestAPIId = a});
gmResourceId :: Lens' GetMethodResponse Text
gmResourceId = lens _gmResourceId (\ s a -> s{_gmResourceId = a});
gmHttpMethod :: Lens' GetMethodResponse Text
gmHttpMethod = lens _gmHttpMethod (\ s a -> s{_gmHttpMethod = a});
gmStatusCode :: Lens' GetMethodResponse Text
gmStatusCode = lens _gmStatusCode (\ s a -> s{_gmStatusCode = a});
instance AWSRequest GetMethodResponse where
type Rs GetMethodResponse = MethodResponse
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetMethodResponse
instance ToHeaders GetMethodResponse where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetMethodResponse where
toPath GetMethodResponse'{..}
= mconcat
["/restapis/", toBS _gmRestAPIId, "/resources/",
toBS _gmResourceId, "/methods/", toBS _gmHttpMethod,
"/responses/", toBS _gmStatusCode]
instance ToQuery GetMethodResponse where
toQuery = const mempty