Skip to content

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#344)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 474338479

Source-Link: googleapis/googleapis@d5d35e0

Source-Link: googleapis/googleapis-gen@efcd3f9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9
  • Loading branch information
gcf-owl-bot[bot] authored Sep 14, 2022
1 parent efcfa13 commit ee2a454
Show file tree
Hide file tree
Showing 2 changed files with 1,344 additions and 1,091 deletions.
96 changes: 48 additions & 48 deletions packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,9 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
id: request.id || '',
name: request.name || '',
project_id: request.projectId ?? '',
id: request.id ?? '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getBuild(request, options, callback);
Expand Down Expand Up @@ -699,9 +699,9 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
id: request.id || '',
name: request.name || '',
project_id: request.projectId ?? '',
id: request.id ?? '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.cancelBuild(request, options, callback);
Expand Down Expand Up @@ -805,8 +805,8 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
parent: request.parent || '',
project_id: request.projectId ?? '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.createBuildTrigger(request, options, callback);
Expand Down Expand Up @@ -904,9 +904,9 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
trigger_id: request.triggerId || '',
name: request.name || '',
project_id: request.projectId ?? '',
trigger_id: request.triggerId ?? '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getBuildTrigger(request, options, callback);
Expand Down Expand Up @@ -1010,9 +1010,9 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
trigger_id: request.triggerId || '',
name: request.name || '',
project_id: request.projectId ?? '',
trigger_id: request.triggerId ?? '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.deleteBuildTrigger(request, options, callback);
Expand Down Expand Up @@ -1115,9 +1115,9 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
trigger_id: request.triggerId || '',
'trigger.resource_name': request.trigger!.resourceName || '',
project_id: request.projectId ?? '',
trigger_id: request.triggerId ?? '',
'trigger.resource_name': request.trigger!.resourceName ?? '',
});
this.initialize();
return this.innerApiCalls.updateBuildTrigger(request, options, callback);
Expand Down Expand Up @@ -1224,9 +1224,9 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
trigger: request.trigger || '',
name: request.name || '',
project_id: request.projectId ?? '',
trigger: request.trigger ?? '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.receiveTriggerWebhook(request, options, callback);
Expand Down Expand Up @@ -1318,7 +1318,7 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.getWorkerPool(request, options, callback);
Expand Down Expand Up @@ -1431,8 +1431,8 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
parent: request.parent || '',
project_id: request.projectId ?? '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.createBuild(request, options, callback);
Expand Down Expand Up @@ -1601,9 +1601,9 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
id: request.id || '',
name: request.name || '',
project_id: request.projectId ?? '',
id: request.id ?? '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.retryBuild(request, options, callback);
Expand Down Expand Up @@ -1749,7 +1749,7 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.approveBuild(request, options, callback);
Expand Down Expand Up @@ -1894,9 +1894,9 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
trigger_id: request.triggerId || '',
name: request.name || '',
project_id: request.projectId ?? '',
trigger_id: request.triggerId ?? '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.runBuildTrigger(request, options, callback);
Expand Down Expand Up @@ -2046,7 +2046,7 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.createWorkerPool(request, options, callback);
Expand Down Expand Up @@ -2195,7 +2195,7 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
name: request.name || '',
name: request.name ?? '',
});
this.initialize();
return this.innerApiCalls.deleteWorkerPool(request, options, callback);
Expand Down Expand Up @@ -2341,7 +2341,7 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'worker_pool.name': request.workerPool!.name || '',
'worker_pool.name': request.workerPool!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateWorkerPool(request, options, callback);
Expand Down Expand Up @@ -2490,8 +2490,8 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
parent: request.parent || '',
project_id: request.projectId ?? '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listBuilds(request, options, callback);
Expand Down Expand Up @@ -2542,8 +2542,8 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
parent: request.parent || '',
project_id: request.projectId ?? '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listBuilds'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2603,8 +2603,8 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
parent: request.parent || '',
project_id: request.projectId ?? '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listBuilds'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2713,8 +2713,8 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
parent: request.parent || '',
project_id: request.projectId ?? '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listBuildTriggers(request, options, callback);
Expand Down Expand Up @@ -2755,8 +2755,8 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
parent: request.parent || '',
project_id: request.projectId ?? '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listBuildTriggers'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2806,8 +2806,8 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
project_id: request.projectId || '',
parent: request.parent || '',
project_id: request.projectId ?? '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listBuildTriggers'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2914,7 +2914,7 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
this.initialize();
return this.innerApiCalls.listWorkerPools(request, options, callback);
Expand Down Expand Up @@ -2955,7 +2955,7 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listWorkerPools'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3005,7 +3005,7 @@ export class CloudBuildClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
parent: request.parent || '',
parent: request.parent ?? '',
});
const defaultCallSettings = this._defaults['listWorkerPools'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading

0 comments on commit ee2a454

Please sign in to comment.