{-# 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.BatchRead
(
BlobsBatchReadResource
, blobsBatchRead
, BlobsBatchRead
, bbrXgafv
, bbrUploadProtocol
, bbrAccessToken
, bbrUploadType
, bbrPayload
, bbrInstanceName
, bbrCallback
) where
import Network.Google.Prelude
import Network.Google.RemoteBuildExecution.Types
type BlobsBatchReadResource =
"v2" :>
Capture "instanceName" Text :>
"blobs:batchRead" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
BuildBazelRemoteExecutionV2BatchReadBlobsRequest
:>
Post '[JSON]
BuildBazelRemoteExecutionV2BatchReadBlobsResponse
data BlobsBatchRead = BlobsBatchRead'
{ _bbrXgafv :: !(Maybe Xgafv)
, _bbrUploadProtocol :: !(Maybe Text)
, _bbrAccessToken :: !(Maybe Text)
, _bbrUploadType :: !(Maybe Text)
, _bbrPayload :: !BuildBazelRemoteExecutionV2BatchReadBlobsRequest
, _bbrInstanceName :: !Text
, _bbrCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
blobsBatchRead
:: BuildBazelRemoteExecutionV2BatchReadBlobsRequest
-> Text
-> BlobsBatchRead
blobsBatchRead pBbrPayload_ pBbrInstanceName_ =
BlobsBatchRead'
{ _bbrXgafv = Nothing
, _bbrUploadProtocol = Nothing
, _bbrAccessToken = Nothing
, _bbrUploadType = Nothing
, _bbrPayload = pBbrPayload_
, _bbrInstanceName = pBbrInstanceName_
, _bbrCallback = Nothing
}
bbrXgafv :: Lens' BlobsBatchRead (Maybe Xgafv)
bbrXgafv = lens _bbrXgafv (\ s a -> s{_bbrXgafv = a})
bbrUploadProtocol :: Lens' BlobsBatchRead (Maybe Text)
bbrUploadProtocol
= lens _bbrUploadProtocol
(\ s a -> s{_bbrUploadProtocol = a})
bbrAccessToken :: Lens' BlobsBatchRead (Maybe Text)
bbrAccessToken
= lens _bbrAccessToken
(\ s a -> s{_bbrAccessToken = a})
bbrUploadType :: Lens' BlobsBatchRead (Maybe Text)
bbrUploadType
= lens _bbrUploadType
(\ s a -> s{_bbrUploadType = a})
bbrPayload :: Lens' BlobsBatchRead BuildBazelRemoteExecutionV2BatchReadBlobsRequest
bbrPayload
= lens _bbrPayload (\ s a -> s{_bbrPayload = a})
bbrInstanceName :: Lens' BlobsBatchRead Text
bbrInstanceName
= lens _bbrInstanceName
(\ s a -> s{_bbrInstanceName = a})
bbrCallback :: Lens' BlobsBatchRead (Maybe Text)
bbrCallback
= lens _bbrCallback (\ s a -> s{_bbrCallback = a})
instance GoogleRequest BlobsBatchRead where
type Rs BlobsBatchRead =
BuildBazelRemoteExecutionV2BatchReadBlobsResponse
type Scopes BlobsBatchRead =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient BlobsBatchRead'{..}
= go _bbrInstanceName _bbrXgafv _bbrUploadProtocol
_bbrAccessToken
_bbrUploadType
_bbrCallback
(Just AltJSON)
_bbrPayload
remoteBuildExecutionService
where go
= buildClient (Proxy :: Proxy BlobsBatchReadResource)
mempty