{-# 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.RemoteBuildExecution.GetCapabilities
(
GetCapabilitiesResource
, getCapabilities
, GetCapabilities
, gcXgafv
, gcUploadProtocol
, gcAccessToken
, gcUploadType
, gcInstanceName
, gcCallback
) where
import Network.Google.Prelude
import Network.Google.RemoteBuildExecution.Types
type GetCapabilitiesResource =
"v2" :>
Capture "instanceName" Text :>
"capabilities" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON]
BuildBazelRemoteExecutionV2ServerCapabilities
data GetCapabilities = GetCapabilities'
{ _gcXgafv :: !(Maybe Xgafv)
, _gcUploadProtocol :: !(Maybe Text)
, _gcAccessToken :: !(Maybe Text)
, _gcUploadType :: !(Maybe Text)
, _gcInstanceName :: !Text
, _gcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
getCapabilities
:: Text
-> GetCapabilities
getCapabilities pGcInstanceName_ =
GetCapabilities'
{ _gcXgafv = Nothing
, _gcUploadProtocol = Nothing
, _gcAccessToken = Nothing
, _gcUploadType = Nothing
, _gcInstanceName = pGcInstanceName_
, _gcCallback = Nothing
}
gcXgafv :: Lens' GetCapabilities (Maybe Xgafv)
gcXgafv = lens _gcXgafv (\ s a -> s{_gcXgafv = a})
gcUploadProtocol :: Lens' GetCapabilities (Maybe Text)
gcUploadProtocol
= lens _gcUploadProtocol
(\ s a -> s{_gcUploadProtocol = a})
gcAccessToken :: Lens' GetCapabilities (Maybe Text)
gcAccessToken
= lens _gcAccessToken
(\ s a -> s{_gcAccessToken = a})
gcUploadType :: Lens' GetCapabilities (Maybe Text)
gcUploadType
= lens _gcUploadType (\ s a -> s{_gcUploadType = a})
gcInstanceName :: Lens' GetCapabilities Text
gcInstanceName
= lens _gcInstanceName
(\ s a -> s{_gcInstanceName = a})
gcCallback :: Lens' GetCapabilities (Maybe Text)
gcCallback
= lens _gcCallback (\ s a -> s{_gcCallback = a})
instance GoogleRequest GetCapabilities where
type Rs GetCapabilities =
BuildBazelRemoteExecutionV2ServerCapabilities
type Scopes GetCapabilities =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient GetCapabilities'{..}
= go _gcInstanceName _gcXgafv _gcUploadProtocol
_gcAccessToken
_gcUploadType
_gcCallback
(Just AltJSON)
remoteBuildExecutionService
where go
= buildClient
(Proxy :: Proxy GetCapabilitiesResource)
mempty