Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#634)
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] committed Sep 14, 2022
1 parent 9060d97 commit 1949bf9
Show file tree
Hide file tree
Showing 8 changed files with 2,516 additions and 2,536 deletions.
48 changes: 24 additions & 24 deletions src/v1/auto_ml_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ export class AutoMlClient {
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.getDataset(request, options, callback);
Expand Down Expand Up @@ -729,7 +729,7 @@ export class AutoMlClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'dataset.name': request.dataset!.name || '',
'dataset.name': request.dataset!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateDataset(request, options, callback);
Expand Down Expand Up @@ -820,7 +820,7 @@ export class AutoMlClient {
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.getAnnotationSpec(request, options, callback);
Expand Down Expand Up @@ -903,7 +903,7 @@ export class AutoMlClient {
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.getModel(request, options, callback);
Expand Down Expand Up @@ -988,7 +988,7 @@ export class AutoMlClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'model.name': request.model!.name || '',
'model.name': request.model!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateModel(request, options, callback);
Expand Down Expand Up @@ -1079,7 +1079,7 @@ export class AutoMlClient {
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.getModelEvaluation(request, options, callback);
Expand Down Expand Up @@ -1185,7 +1185,7 @@ export class AutoMlClient {
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.createDataset(request, options, callback);
Expand Down Expand Up @@ -1327,7 +1327,7 @@ export class AutoMlClient {
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.deleteDataset(request, options, callback);
Expand Down Expand Up @@ -1477,7 +1477,7 @@ export class AutoMlClient {
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.importData(request, options, callback);
Expand Down Expand Up @@ -1619,7 +1619,7 @@ export class AutoMlClient {
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.exportData(request, options, callback);
Expand Down Expand Up @@ -1763,7 +1763,7 @@ export class AutoMlClient {
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.createModel(request, options, callback);
Expand Down Expand Up @@ -1905,7 +1905,7 @@ export class AutoMlClient {
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.deleteModel(request, options, callback);
Expand Down Expand Up @@ -2057,7 +2057,7 @@ export class AutoMlClient {
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.deployModel(request, options, callback);
Expand Down Expand Up @@ -2201,7 +2201,7 @@ export class AutoMlClient {
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.undeployModel(request, options, callback);
Expand Down Expand Up @@ -2347,7 +2347,7 @@ export class AutoMlClient {
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.exportModel(request, options, callback);
Expand Down Expand Up @@ -2486,7 +2486,7 @@ export class AutoMlClient {
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.listDatasets(request, options, callback);
Expand Down Expand Up @@ -2536,7 +2536,7 @@ export class AutoMlClient {
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['listDatasets'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2595,7 +2595,7 @@ export class AutoMlClient {
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['listDatasets'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2704,7 +2704,7 @@ export class AutoMlClient {
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.listModels(request, options, callback);
Expand Down Expand Up @@ -2755,7 +2755,7 @@ export class AutoMlClient {
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['listModels'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2815,7 +2815,7 @@ export class AutoMlClient {
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['listModels'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -2936,7 +2936,7 @@ export class AutoMlClient {
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.listModelEvaluations(request, options, callback);
Expand Down Expand Up @@ -2991,7 +2991,7 @@ export class AutoMlClient {
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['listModelEvaluations'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -3055,7 +3055,7 @@ export class AutoMlClient {
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['listModelEvaluations'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
4 changes: 2 additions & 2 deletions src/v1/prediction_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ export class PredictionServiceClient {
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.predict(request, options, callback);
Expand Down Expand Up @@ -773,7 +773,7 @@ export class PredictionServiceClient {
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.batchPredict(request, options, callback);
Expand Down

0 comments on commit 1949bf9

Please sign in to comment.