{-# 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.GetRequestValidator
(
getRequestValidator
, GetRequestValidator
, grvrRestAPIId
, grvrRequestValidatorId
, requestValidator
, RequestValidator
, rvValidateRequestParameters
, rvName
, rvValidateRequestBody
, rvId
) 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 GetRequestValidator = GetRequestValidator'
{ _grvrRestAPIId :: !Text
, _grvrRequestValidatorId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getRequestValidator
:: Text
-> Text
-> GetRequestValidator
getRequestValidator pRestAPIId_ pRequestValidatorId_ =
GetRequestValidator'
{ _grvrRestAPIId = pRestAPIId_
, _grvrRequestValidatorId = pRequestValidatorId_
}
grvrRestAPIId :: Lens' GetRequestValidator Text
grvrRestAPIId = lens _grvrRestAPIId (\ s a -> s{_grvrRestAPIId = a})
grvrRequestValidatorId :: Lens' GetRequestValidator Text
grvrRequestValidatorId = lens _grvrRequestValidatorId (\ s a -> s{_grvrRequestValidatorId = a})
instance AWSRequest GetRequestValidator where
type Rs GetRequestValidator = RequestValidator
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetRequestValidator where
instance NFData GetRequestValidator where
instance ToHeaders GetRequestValidator where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetRequestValidator where
toPath GetRequestValidator'{..}
= mconcat
["/restapis/", toBS _grvrRestAPIId,
"/requestvalidators/", toBS _grvrRequestValidatorId]
instance ToQuery GetRequestValidator where
toQuery = const mempty