Skip to content

Commit

Permalink
feat: add update_mask to UpdateBuildTriggerRequest proto (#6515)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 552479161
Source-Link: googleapis/googleapis@f8415bd
Source-Link: googleapis/googleapis-gen@4ac7667
Copy-Tag: eyJwIjoiQnVpbGQvLk93bEJvdC55YW1sIiwiaCI6IjRhYzc2NjdjN2RlYTM4NzM4ZDllMjE3NjMwNWE4MDRkZTIyNThiZTEifQ==
  • Loading branch information
gcf-owl-bot[bot] authored Jul 31, 2023
1 parent 767e8f2 commit f081688
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
Binary file modified Build/metadata/V1/Cloudbuild.php
Binary file not shown.
8 changes: 8 additions & 0 deletions Build/src/V1/Gapic/CloudBuildGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -2014,6 +2014,10 @@ public function runBuildTrigger($projectId, $triggerId, array $optionalArgs = []
* @param array $optionalArgs {
* Optional.
*
* @type FieldMask $updateMask
* Update mask for the resource. If this is set,
* the server will only update the fields specified in the field mask.
* Otherwise, a full update of the mutable resource fields will be performed.
* @type RetrySettings|array $retrySettings
* Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
* associative array of retry settings parameters. See the documentation on
Expand All @@ -2032,6 +2036,10 @@ public function updateBuildTrigger($projectId, $triggerId, $trigger, array $opti
$request->setTriggerId($triggerId);
$request->setTrigger($trigger);
$requestParamHeaders['location'] = $trigger->getResourceName();
if (isset($optionalArgs['updateMask'])) {
$request->setUpdateMask($optionalArgs['updateMask']);
}

$requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
$optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
return $this->startCall('UpdateBuildTrigger', BuildTrigger::class, $optionalArgs, $request)->wait();
Expand Down
52 changes: 52 additions & 0 deletions Build/src/V1/UpdateBuildTriggerRequest.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f081688

Please sign in to comment.