{-# 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.Operations.WaitExecution
(
OperationsWaitExecutionResource
, operationsWaitExecution
, OperationsWaitExecution
, oweXgafv
, oweUploadProtocol
, oweAccessToken
, oweUploadType
, owePayload
, oweName
, oweCallback
) where
import Network.Google.Prelude
import Network.Google.RemoteBuildExecution.Types
type OperationsWaitExecutionResource =
"v2" :>
CaptureMode "name" "waitExecution" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
BuildBazelRemoteExecutionV2WaitExecutionRequest
:> Post '[JSON] GoogleLongrunningOperation
data OperationsWaitExecution = OperationsWaitExecution'
{ _oweXgafv :: !(Maybe Xgafv)
, _oweUploadProtocol :: !(Maybe Text)
, _oweAccessToken :: !(Maybe Text)
, _oweUploadType :: !(Maybe Text)
, _owePayload :: !BuildBazelRemoteExecutionV2WaitExecutionRequest
, _oweName :: !Text
, _oweCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
operationsWaitExecution
:: BuildBazelRemoteExecutionV2WaitExecutionRequest
-> Text
-> OperationsWaitExecution
operationsWaitExecution pOwePayload_ pOweName_ =
OperationsWaitExecution'
{ _oweXgafv = Nothing
, _oweUploadProtocol = Nothing
, _oweAccessToken = Nothing
, _oweUploadType = Nothing
, _owePayload = pOwePayload_
, _oweName = pOweName_
, _oweCallback = Nothing
}
oweXgafv :: Lens' OperationsWaitExecution (Maybe Xgafv)
oweXgafv = lens _oweXgafv (\ s a -> s{_oweXgafv = a})
oweUploadProtocol :: Lens' OperationsWaitExecution (Maybe Text)
oweUploadProtocol
= lens _oweUploadProtocol
(\ s a -> s{_oweUploadProtocol = a})
oweAccessToken :: Lens' OperationsWaitExecution (Maybe Text)
oweAccessToken
= lens _oweAccessToken
(\ s a -> s{_oweAccessToken = a})
oweUploadType :: Lens' OperationsWaitExecution (Maybe Text)
oweUploadType
= lens _oweUploadType
(\ s a -> s{_oweUploadType = a})
owePayload :: Lens' OperationsWaitExecution BuildBazelRemoteExecutionV2WaitExecutionRequest
owePayload
= lens _owePayload (\ s a -> s{_owePayload = a})
oweName :: Lens' OperationsWaitExecution Text
oweName = lens _oweName (\ s a -> s{_oweName = a})
oweCallback :: Lens' OperationsWaitExecution (Maybe Text)
oweCallback
= lens _oweCallback (\ s a -> s{_oweCallback = a})
instance GoogleRequest OperationsWaitExecution where
type Rs OperationsWaitExecution =
GoogleLongrunningOperation
type Scopes OperationsWaitExecution =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient OperationsWaitExecution'{..}
= go _oweName _oweXgafv _oweUploadProtocol
_oweAccessToken
_oweUploadType
_oweCallback
(Just AltJSON)
_owePayload
remoteBuildExecutionService
where go
= buildClient
(Proxy :: Proxy OperationsWaitExecutionResource)
mempty