{-# 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.ActionResults.Update
(
ActionResultsUpdateResource
, actionResultsUpdate
, ActionResultsUpdate
, aruSizeBytes
, aruXgafv
, aruHash
, aruUploadProtocol
, aruAccessToken
, aruUploadType
, aruPayload
, aruResultsCachePolicyPriority
, aruInstanceName
, aruCallback
) where
import Network.Google.Prelude
import Network.Google.RemoteBuildExecution.Types
type ActionResultsUpdateResource =
"v2" :>
Capture "instanceName" Text :>
"actionResults" :>
Capture "hash" Text :>
Capture "sizeBytes" (Textual Int64) :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "resultsCachePolicy.priority"
(Textual Int32)
:>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
BuildBazelRemoteExecutionV2ActionResult
:>
Put '[JSON]
BuildBazelRemoteExecutionV2ActionResult
data ActionResultsUpdate = ActionResultsUpdate'
{ _aruSizeBytes :: !(Textual Int64)
, _aruXgafv :: !(Maybe Xgafv)
, _aruHash :: !Text
, _aruUploadProtocol :: !(Maybe Text)
, _aruAccessToken :: !(Maybe Text)
, _aruUploadType :: !(Maybe Text)
, _aruPayload :: !BuildBazelRemoteExecutionV2ActionResult
, _aruResultsCachePolicyPriority :: !(Maybe (Textual Int32))
, _aruInstanceName :: !Text
, _aruCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
actionResultsUpdate
:: Int64
-> Text
-> BuildBazelRemoteExecutionV2ActionResult
-> Text
-> ActionResultsUpdate
actionResultsUpdate pAruSizeBytes_ pAruHash_ pAruPayload_ pAruInstanceName_ =
ActionResultsUpdate'
{ _aruSizeBytes = _Coerce # pAruSizeBytes_
, _aruXgafv = Nothing
, _aruHash = pAruHash_
, _aruUploadProtocol = Nothing
, _aruAccessToken = Nothing
, _aruUploadType = Nothing
, _aruPayload = pAruPayload_
, _aruResultsCachePolicyPriority = Nothing
, _aruInstanceName = pAruInstanceName_
, _aruCallback = Nothing
}
aruSizeBytes :: Lens' ActionResultsUpdate Int64
aruSizeBytes
= lens _aruSizeBytes (\ s a -> s{_aruSizeBytes = a})
. _Coerce
aruXgafv :: Lens' ActionResultsUpdate (Maybe Xgafv)
aruXgafv = lens _aruXgafv (\ s a -> s{_aruXgafv = a})
aruHash :: Lens' ActionResultsUpdate Text
aruHash = lens _aruHash (\ s a -> s{_aruHash = a})
aruUploadProtocol :: Lens' ActionResultsUpdate (Maybe Text)
aruUploadProtocol
= lens _aruUploadProtocol
(\ s a -> s{_aruUploadProtocol = a})
aruAccessToken :: Lens' ActionResultsUpdate (Maybe Text)
aruAccessToken
= lens _aruAccessToken
(\ s a -> s{_aruAccessToken = a})
aruUploadType :: Lens' ActionResultsUpdate (Maybe Text)
aruUploadType
= lens _aruUploadType
(\ s a -> s{_aruUploadType = a})
aruPayload :: Lens' ActionResultsUpdate BuildBazelRemoteExecutionV2ActionResult
aruPayload
= lens _aruPayload (\ s a -> s{_aruPayload = a})
aruResultsCachePolicyPriority :: Lens' ActionResultsUpdate (Maybe Int32)
aruResultsCachePolicyPriority
= lens _aruResultsCachePolicyPriority
(\ s a -> s{_aruResultsCachePolicyPriority = a})
. mapping _Coerce
aruInstanceName :: Lens' ActionResultsUpdate Text
aruInstanceName
= lens _aruInstanceName
(\ s a -> s{_aruInstanceName = a})
aruCallback :: Lens' ActionResultsUpdate (Maybe Text)
aruCallback
= lens _aruCallback (\ s a -> s{_aruCallback = a})
instance GoogleRequest ActionResultsUpdate where
type Rs ActionResultsUpdate =
BuildBazelRemoteExecutionV2ActionResult
type Scopes ActionResultsUpdate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ActionResultsUpdate'{..}
= go _aruInstanceName _aruHash _aruSizeBytes
_aruXgafv
_aruUploadProtocol
_aruAccessToken
_aruUploadType
_aruResultsCachePolicyPriority
_aruCallback
(Just AltJSON)
_aruPayload
remoteBuildExecutionService
where go
= buildClient
(Proxy :: Proxy ActionResultsUpdateResource)
mempty