{-# 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.GetBasePathMapping
(
getBasePathMapping
, GetBasePathMapping
, gbpmDomainName
, gbpmBasePath
, basePathMapping
, BasePathMapping
, bpmStage
, bpmBasePath
, bpmRestAPIId
) 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 GetBasePathMapping = GetBasePathMapping'
{ _gbpmDomainName :: !Text
, _gbpmBasePath :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getBasePathMapping
:: Text
-> Text
-> GetBasePathMapping
getBasePathMapping pDomainName_ pBasePath_ =
GetBasePathMapping'
{ _gbpmDomainName = pDomainName_
, _gbpmBasePath = pBasePath_
}
gbpmDomainName :: Lens' GetBasePathMapping Text
gbpmDomainName = lens _gbpmDomainName (\ s a -> s{_gbpmDomainName = a});
gbpmBasePath :: Lens' GetBasePathMapping Text
gbpmBasePath = lens _gbpmBasePath (\ s a -> s{_gbpmBasePath = a});
instance AWSRequest GetBasePathMapping where
type Rs GetBasePathMapping = BasePathMapping
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetBasePathMapping
instance NFData GetBasePathMapping
instance ToHeaders GetBasePathMapping where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetBasePathMapping where
toPath GetBasePathMapping'{..}
= mconcat
["/domainnames/", toBS _gbpmDomainName,
"/basepathmappings/", toBS _gbpmBasePath]
instance ToQuery GetBasePathMapping where
toQuery = const mempty