{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Discovery.APIs.GetRest
(
APIsGetRestResource
, apisGetRest
, APIsGetRest
, agrVersion
, agrAPI
) where
import Network.Google.Discovery.Types
import Network.Google.Prelude
type APIsGetRestResource =
"discovery" :>
"v1" :>
"apis" :>
Capture "api" Text :>
Capture "version" Text :>
"rest" :>
QueryParam "alt" AltJSON :>
Get '[JSON] RestDescription
data APIsGetRest = APIsGetRest'
{ _agrVersion :: !Text
, _agrAPI :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
apisGetRest
:: Text
-> Text
-> APIsGetRest
apisGetRest pAgrVersion_ pAgrAPI_ =
APIsGetRest'
{ _agrVersion = pAgrVersion_
, _agrAPI = pAgrAPI_
}
agrVersion :: Lens' APIsGetRest Text
agrVersion
= lens _agrVersion (\ s a -> s{_agrVersion = a})
agrAPI :: Lens' APIsGetRest Text
agrAPI = lens _agrAPI (\ s a -> s{_agrAPI = a})
instance GoogleRequest APIsGetRest where
type Rs APIsGetRest = RestDescription
type Scopes APIsGetRest = '[]
requestClient APIsGetRest'{..}
= go _agrAPI _agrVersion (Just AltJSON)
discoveryService
where go
= buildClient (Proxy :: Proxy APIsGetRestResource)
mempty