{-# 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.ServiceUsage.Services.Get
(
ServicesGetResource
, servicesGet
, ServicesGet
, sgXgafv
, sgUploadProtocol
, sgAccessToken
, sgUploadType
, sgName
, sgCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceUsage.Types
type ServicesGetResource =
"v1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] GoogleAPIServiceusageV1Service
data ServicesGet = ServicesGet'
{ _sgXgafv :: !(Maybe Xgafv)
, _sgUploadProtocol :: !(Maybe Text)
, _sgAccessToken :: !(Maybe Text)
, _sgUploadType :: !(Maybe Text)
, _sgName :: !Text
, _sgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesGet
:: Text
-> ServicesGet
servicesGet pSgName_ =
ServicesGet'
{ _sgXgafv = Nothing
, _sgUploadProtocol = Nothing
, _sgAccessToken = Nothing
, _sgUploadType = Nothing
, _sgName = pSgName_
, _sgCallback = Nothing
}
sgXgafv :: Lens' ServicesGet (Maybe Xgafv)
sgXgafv = lens _sgXgafv (\ s a -> s{_sgXgafv = a})
sgUploadProtocol :: Lens' ServicesGet (Maybe Text)
sgUploadProtocol
= lens _sgUploadProtocol
(\ s a -> s{_sgUploadProtocol = a})
sgAccessToken :: Lens' ServicesGet (Maybe Text)
sgAccessToken
= lens _sgAccessToken
(\ s a -> s{_sgAccessToken = a})
sgUploadType :: Lens' ServicesGet (Maybe Text)
sgUploadType
= lens _sgUploadType (\ s a -> s{_sgUploadType = a})
sgName :: Lens' ServicesGet Text
sgName = lens _sgName (\ s a -> s{_sgName = a})
sgCallback :: Lens' ServicesGet (Maybe Text)
sgCallback
= lens _sgCallback (\ s a -> s{_sgCallback = a})
instance GoogleRequest ServicesGet where
type Rs ServicesGet = GoogleAPIServiceusageV1Service
type Scopes ServicesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient ServicesGet'{..}
= go _sgName _sgXgafv _sgUploadProtocol
_sgAccessToken
_sgUploadType
_sgCallback
(Just AltJSON)
serviceUsageService
where go
= buildClient (Proxy :: Proxy ServicesGetResource)
mempty