module Network.AWS.APIGateway.GetIntegrationResponse
(
getIntegrationResponse
, GetIntegrationResponse
, getRestAPIId
, getResourceId
, getHttpMethod
, getStatusCode
, integrationResponse
, IntegrationResponse
, iResponseTemplates
, iSelectionPattern
, iStatusCode
, iResponseParameters
) 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 GetIntegrationResponse = GetIntegrationResponse'
{ _getRestAPIId :: !Text
, _getResourceId :: !Text
, _getHttpMethod :: !Text
, _getStatusCode :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getIntegrationResponse
:: Text
-> Text
-> Text
-> Text
-> GetIntegrationResponse
getIntegrationResponse pRestAPIId_ pResourceId_ pHttpMethod_ pStatusCode_ =
GetIntegrationResponse'
{ _getRestAPIId = pRestAPIId_
, _getResourceId = pResourceId_
, _getHttpMethod = pHttpMethod_
, _getStatusCode = pStatusCode_
}
getRestAPIId :: Lens' GetIntegrationResponse Text
getRestAPIId = lens _getRestAPIId (\ s a -> s{_getRestAPIId = a});
getResourceId :: Lens' GetIntegrationResponse Text
getResourceId = lens _getResourceId (\ s a -> s{_getResourceId = a});
getHttpMethod :: Lens' GetIntegrationResponse Text
getHttpMethod = lens _getHttpMethod (\ s a -> s{_getHttpMethod = a});
getStatusCode :: Lens' GetIntegrationResponse Text
getStatusCode = lens _getStatusCode (\ s a -> s{_getStatusCode = a});
instance AWSRequest GetIntegrationResponse where
type Rs GetIntegrationResponse = IntegrationResponse
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetIntegrationResponse
instance NFData GetIntegrationResponse
instance ToHeaders GetIntegrationResponse where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetIntegrationResponse where
toPath GetIntegrationResponse'{..}
= mconcat
["/restapis/", toBS _getRestAPIId, "/resources/",
toBS _getResourceId, "/methods/",
toBS _getHttpMethod, "/integration/responses/",
toBS _getStatusCode]
instance ToQuery GetIntegrationResponse where
toQuery = const mempty