{-# 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.GetDocumentationVersion
(
getDocumentationVersion
, GetDocumentationVersion
, gdvdRestAPIId
, gdvdDocumentationVersion
, documentationVersion
, DocumentationVersion
, dvCreatedDate
, dvVersion
, dvDescription
) 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 GetDocumentationVersion = GetDocumentationVersion'
{ _gdvdRestAPIId :: !Text
, _gdvdDocumentationVersion :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getDocumentationVersion
:: Text
-> Text
-> GetDocumentationVersion
getDocumentationVersion pRestAPIId_ pDocumentationVersion_ =
GetDocumentationVersion'
{ _gdvdRestAPIId = pRestAPIId_
, _gdvdDocumentationVersion = pDocumentationVersion_
}
gdvdRestAPIId :: Lens' GetDocumentationVersion Text
gdvdRestAPIId = lens _gdvdRestAPIId (\ s a -> s{_gdvdRestAPIId = a})
gdvdDocumentationVersion :: Lens' GetDocumentationVersion Text
gdvdDocumentationVersion = lens _gdvdDocumentationVersion (\ s a -> s{_gdvdDocumentationVersion = a})
instance AWSRequest GetDocumentationVersion where
type Rs GetDocumentationVersion =
DocumentationVersion
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetDocumentationVersion where
instance NFData GetDocumentationVersion where
instance ToHeaders GetDocumentationVersion where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetDocumentationVersion where
toPath GetDocumentationVersion'{..}
= mconcat
["/restapis/", toBS _gdvdRestAPIId,
"/documentation/versions/",
toBS _gdvdDocumentationVersion]
instance ToQuery GetDocumentationVersion where
toQuery = const mempty