{-# 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.APIGateway.GetIntegrationResponse
(
getIntegrationResponse
, GetIntegrationResponse
, giiRestAPIId
, giiResourceId
, giiHttpMethod
, giiStatusCode
, integrationResponse
, IntegrationResponse
, intContentHandling
, intResponseTemplates
, intSelectionPattern
, intStatusCode
, intResponseParameters
) 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'
{ _giiRestAPIId :: !Text
, _giiResourceId :: !Text
, _giiHttpMethod :: !Text
, _giiStatusCode :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getIntegrationResponse
:: Text
-> Text
-> Text
-> Text
-> GetIntegrationResponse
getIntegrationResponse pRestAPIId_ pResourceId_ pHttpMethod_ pStatusCode_ =
GetIntegrationResponse'
{ _giiRestAPIId = pRestAPIId_
, _giiResourceId = pResourceId_
, _giiHttpMethod = pHttpMethod_
, _giiStatusCode = pStatusCode_
}
giiRestAPIId :: Lens' GetIntegrationResponse Text
giiRestAPIId = lens _giiRestAPIId (\ s a -> s{_giiRestAPIId = a})
giiResourceId :: Lens' GetIntegrationResponse Text
giiResourceId = lens _giiResourceId (\ s a -> s{_giiResourceId = a})
giiHttpMethod :: Lens' GetIntegrationResponse Text
giiHttpMethod = lens _giiHttpMethod (\ s a -> s{_giiHttpMethod = a})
giiStatusCode :: Lens' GetIntegrationResponse Text
giiStatusCode = lens _giiStatusCode (\ s a -> s{_giiStatusCode = a})
instance AWSRequest GetIntegrationResponse where
type Rs GetIntegrationResponse = IntegrationResponse
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetIntegrationResponse where
instance NFData GetIntegrationResponse where
instance ToHeaders GetIntegrationResponse where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetIntegrationResponse where
toPath GetIntegrationResponse'{..}
= mconcat
["/restapis/", toBS _giiRestAPIId, "/resources/",
toBS _giiResourceId, "/methods/",
toBS _giiHttpMethod, "/integration/responses/",
toBS _giiStatusCode]
instance ToQuery GetIntegrationResponse where
toQuery = const mempty