{-# 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.Blobs.BatchUpdate
(
BlobsBatchUpdateResource
, blobsBatchUpdate
, BlobsBatchUpdate
, bbuXgafv
, bbuUploadProtocol
, bbuAccessToken
, bbuUploadType
, bbuPayload
, bbuInstanceName
, bbuCallback
) where
import Network.Google.Prelude
import Network.Google.RemoteBuildExecution.Types
type BlobsBatchUpdateResource =
"v2" :>
Capture "instanceName" Text :>
"blobs:batchUpdate" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest
:>
Post '[JSON]
BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse
data BlobsBatchUpdate = BlobsBatchUpdate'
{ _bbuXgafv :: !(Maybe Xgafv)
, _bbuUploadProtocol :: !(Maybe Text)
, _bbuAccessToken :: !(Maybe Text)
, _bbuUploadType :: !(Maybe Text)
, _bbuPayload :: !BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest
, _bbuInstanceName :: !Text
, _bbuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
blobsBatchUpdate
:: BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest
-> Text
-> BlobsBatchUpdate
blobsBatchUpdate pBbuPayload_ pBbuInstanceName_ =
BlobsBatchUpdate'
{ _bbuXgafv = Nothing
, _bbuUploadProtocol = Nothing
, _bbuAccessToken = Nothing
, _bbuUploadType = Nothing
, _bbuPayload = pBbuPayload_
, _bbuInstanceName = pBbuInstanceName_
, _bbuCallback = Nothing
}
bbuXgafv :: Lens' BlobsBatchUpdate (Maybe Xgafv)
bbuXgafv = lens _bbuXgafv (\ s a -> s{_bbuXgafv = a})
bbuUploadProtocol :: Lens' BlobsBatchUpdate (Maybe Text)
bbuUploadProtocol
= lens _bbuUploadProtocol
(\ s a -> s{_bbuUploadProtocol = a})
bbuAccessToken :: Lens' BlobsBatchUpdate (Maybe Text)
bbuAccessToken
= lens _bbuAccessToken
(\ s a -> s{_bbuAccessToken = a})
bbuUploadType :: Lens' BlobsBatchUpdate (Maybe Text)
bbuUploadType
= lens _bbuUploadType
(\ s a -> s{_bbuUploadType = a})
bbuPayload :: Lens' BlobsBatchUpdate BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest
bbuPayload
= lens _bbuPayload (\ s a -> s{_bbuPayload = a})
bbuInstanceName :: Lens' BlobsBatchUpdate Text
bbuInstanceName
= lens _bbuInstanceName
(\ s a -> s{_bbuInstanceName = a})
bbuCallback :: Lens' BlobsBatchUpdate (Maybe Text)
bbuCallback
= lens _bbuCallback (\ s a -> s{_bbuCallback = a})
instance GoogleRequest BlobsBatchUpdate where
type Rs BlobsBatchUpdate =
BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse
type Scopes BlobsBatchUpdate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient BlobsBatchUpdate'{..}
= go _bbuInstanceName _bbuXgafv _bbuUploadProtocol
_bbuAccessToken
_bbuUploadType
_bbuCallback
(Just AltJSON)
_bbuPayload
remoteBuildExecutionService
where go
= buildClient
(Proxy :: Proxy BlobsBatchUpdateResource)
mempty