Skip to content

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#1337)
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 d970880 commit 87c8d1f
Show file tree
Hide file tree
Showing 6 changed files with 1,616 additions and 1,648 deletions.
66 changes: 33 additions & 33 deletions src/v2/config_service_v2_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 630,7 @@ export class ConfigServiceV2Client {
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.getBucket(request, options, callback);
Expand Down Expand Up @@ -728,7 728,7 @@ export class ConfigServiceV2Client {
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.createBucket(request, options, callback);
Expand Down Expand Up @@ -840,7 840,7 @@ export class ConfigServiceV2Client {
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.updateBucket(request, options, callback);
Expand Down Expand Up @@ -936,7 936,7 @@ export class ConfigServiceV2Client {
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.deleteBucket(request, options, callback);
Expand Down Expand Up @@ -1029,7 1029,7 @@ export class ConfigServiceV2Client {
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.undeleteBucket(request, options, callback);
Expand Down Expand Up @@ -1118,7 1118,7 @@ export class ConfigServiceV2Client {
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.getView(request, options, callback);
Expand Down Expand Up @@ -1212,7 1212,7 @@ export class ConfigServiceV2Client {
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.createView(request, options, callback);
Expand Down Expand Up @@ -1316,7 1316,7 @@ export class ConfigServiceV2Client {
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.updateView(request, options, callback);
Expand Down Expand Up @@ -1408,7 1408,7 @@ export class ConfigServiceV2Client {
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.deleteView(request, options, callback);
Expand Down Expand Up @@ -1500,7 1500,7 @@ export class ConfigServiceV2Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
sink_name: request.sinkName || '',
sink_name: request.sinkName ?? '',
});
this.initialize();
return this.innerApiCalls.getSink(request, options, callback);
Expand Down Expand Up @@ -1611,7 1611,7 @@ export class ConfigServiceV2Client {
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.createSink(request, options, callback);
Expand Down Expand Up @@ -1740,7 1740,7 @@ export class ConfigServiceV2Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
sink_name: request.sinkName || '',
sink_name: request.sinkName ?? '',
});
this.initialize();
return this.innerApiCalls.updateSink(request, options, callback);
Expand Down Expand Up @@ -1834,7 1834,7 @@ export class ConfigServiceV2Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
sink_name: request.sinkName || '',
sink_name: request.sinkName ?? '',
});
this.initialize();
return this.innerApiCalls.deleteSink(request, options, callback);
Expand Down Expand Up @@ -1926,7 1926,7 @@ export class ConfigServiceV2Client {
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.getExclusion(request, options, callback);
Expand Down Expand Up @@ -2024,7 2024,7 @@ export class ConfigServiceV2Client {
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.createExclusion(request, options, callback);
Expand Down Expand Up @@ -2128,7 2128,7 @@ export class ConfigServiceV2Client {
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.updateExclusion(request, options, callback);
Expand Down Expand Up @@ -2220,7 2220,7 @@ export class ConfigServiceV2Client {
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.deleteExclusion(request, options, callback);
Expand Down Expand Up @@ -2326,7 2326,7 @@ export class ConfigServiceV2Client {
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.getCmekSettings(request, options, callback);
Expand Down Expand Up @@ -2452,7 2452,7 @@ export class ConfigServiceV2Client {
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.updateCmekSettings(request, options, callback);
Expand Down Expand Up @@ -2558,7 2558,7 @@ export class ConfigServiceV2Client {
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.getSettings(request, options, callback);
Expand Down Expand Up @@ -2680,7 2680,7 @@ export class ConfigServiceV2Client {
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.updateSettings(request, options, callback);
Expand Down Expand Up @@ -2928,7 2928,7 @@ export class ConfigServiceV2Client {
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.listBuckets(request, options, callback);
Expand Down Expand Up @@ -2980,7 2980,7 @@ export class ConfigServiceV2Client {
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['listBuckets'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3041,7 3041,7 @@ export class ConfigServiceV2Client {
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['listBuckets'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3145,7 3145,7 @@ export class ConfigServiceV2Client {
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.listViews(request, options, callback);
Expand Down Expand Up @@ -3191,7 3191,7 @@ export class ConfigServiceV2Client {
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['listViews'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3246,7 3246,7 @@ export class ConfigServiceV2Client {
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['listViews'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3352,7 3352,7 @@ export class ConfigServiceV2Client {
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.listSinks(request, options, callback);
Expand Down Expand Up @@ -3400,7 3400,7 @@ export class ConfigServiceV2Client {
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['listSinks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3457,7 3457,7 @@ export class ConfigServiceV2Client {
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['listSinks'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3563,7 3563,7 @@ export class ConfigServiceV2Client {
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.listExclusions(request, options, callback);
Expand Down Expand Up @@ -3611,7 3611,7 @@ export class ConfigServiceV2Client {
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['listExclusions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3668,7 3668,7 @@ export class ConfigServiceV2Client {
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['listExclusions'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
8 changes: 4 additions & 4 deletions src/v2/logging_service_v2_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 570,7 @@ export class LoggingServiceV2Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
log_name: request.logName || '',
log_name: request.logName ?? '',
});
this.initialize();
return this.innerApiCalls.deleteLog(request, options, callback);
Expand Down Expand Up @@ -1329,7 1329,7 @@ export class LoggingServiceV2Client {
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.listLogs(request, options, callback);
Expand Down Expand Up @@ -1391,7 1391,7 @@ export class LoggingServiceV2Client {
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['listLogs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1462,7 1462,7 @@ export class LoggingServiceV2Client {
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['listLogs'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
14 changes: 7 additions & 7 deletions src/v2/metrics_service_v2_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 505,7 @@ export class MetricsServiceV2Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
metric_name: request.metricName || '',
metric_name: request.metricName ?? '',
});
this.initialize();
return this.innerApiCalls.getLogMetric(request, options, callback);
Expand Down Expand Up @@ -595,7 595,7 @@ export class MetricsServiceV2Client {
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.createLogMetric(request, options, callback);
Expand Down Expand Up @@ -686,7 686,7 @@ export class MetricsServiceV2Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
metric_name: request.metricName || '',
metric_name: request.metricName ?? '',
});
this.initialize();
return this.innerApiCalls.updateLogMetric(request, options, callback);
Expand Down Expand Up @@ -771,7 771,7 @@ export class MetricsServiceV2Client {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
metric_name: request.metricName || '',
metric_name: request.metricName ?? '',
});
this.initialize();
return this.innerApiCalls.deleteLogMetric(request, options, callback);
Expand Down Expand Up @@ -869,7 869,7 @@ export class MetricsServiceV2Client {
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.listLogMetrics(request, options, callback);
Expand Down Expand Up @@ -914,7 914,7 @@ export class MetricsServiceV2Client {
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['listLogMetrics'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -968,7 968,7 @@ export class MetricsServiceV2Client {
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['listLogMetrics'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
Loading

0 comments on commit 87c8d1f

Please sign in to comment.