{-# 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.GetDocumentationPart
(
getDocumentationPart
, GetDocumentationPart
, getRestAPIId
, getDocumentationPartId
, documentationPart
, DocumentationPart
, dpLocation
, dpId
, dpProperties
) 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 GetDocumentationPart = GetDocumentationPart'
{ _getRestAPIId :: !Text
, _getDocumentationPartId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getDocumentationPart
:: Text
-> Text
-> GetDocumentationPart
getDocumentationPart pRestAPIId_ pDocumentationPartId_ =
GetDocumentationPart'
{ _getRestAPIId = pRestAPIId_
, _getDocumentationPartId = pDocumentationPartId_
}
getRestAPIId :: Lens' GetDocumentationPart Text
getRestAPIId = lens _getRestAPIId (\ s a -> s{_getRestAPIId = a});
getDocumentationPartId :: Lens' GetDocumentationPart Text
getDocumentationPartId = lens _getDocumentationPartId (\ s a -> s{_getDocumentationPartId = a});
instance AWSRequest GetDocumentationPart where
type Rs GetDocumentationPart = DocumentationPart
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetDocumentationPart
instance NFData GetDocumentationPart
instance ToHeaders GetDocumentationPart where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetDocumentationPart where
toPath GetDocumentationPart'{..}
= mconcat
["/restapis/", toBS _getRestAPIId,
"/documentation/parts/",
toBS _getDocumentationPartId]
instance ToQuery GetDocumentationPart where
toQuery = const mempty