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

Commit

Permalink
fix: preserve default values in x-goog-request-params header (#979)
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: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9
  • Loading branch information
gcf-owl-bot[bot] authored Sep 14, 2022
1 parent 6c7ec11 commit 2492264
Show file tree
Hide file tree
Showing 64 changed files with 11,319 additions and 10,111 deletions.
22 changes: 11 additions & 11 deletions src/v2/agents_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ export class AgentsClient {
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.getAgent(request, options, callback);
Expand Down Expand Up @@ -747,7 +747,7 @@ export class AgentsClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'agent.parent': request.agent!.parent || '',
'agent.parent': request.agent!.parent ?? '',
});
this.initialize();
return this.innerApiCalls.setAgent(request, options, callback);
Expand Down Expand Up @@ -833,7 +833,7 @@ export class AgentsClient {
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.deleteAgent(request, options, callback);
Expand Down Expand Up @@ -932,7 +932,7 @@ export class AgentsClient {
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.getValidationResult(request, options, callback);
Expand Down Expand Up @@ -1050,7 +1050,7 @@ export class AgentsClient {
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.trainAgent(request, options, callback);
Expand Down Expand Up @@ -1205,7 +1205,7 @@ export class AgentsClient {
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.exportAgent(request, options, callback);
Expand Down Expand Up @@ -1379,7 +1379,7 @@ export class AgentsClient {
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.importAgent(request, options, callback);
Expand Down Expand Up @@ -1549,7 +1549,7 @@ export class AgentsClient {
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.restoreAgent(request, options, callback);
Expand Down Expand Up @@ -1687,7 +1687,7 @@ export class AgentsClient {
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.searchAgents(request, options, callback);
Expand Down Expand Up @@ -1727,7 +1727,7 @@ export class AgentsClient {
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['searchAgents'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1776,7 +1776,7 @@ export class AgentsClient {
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['searchAgents'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
8 changes: 4 additions & 4 deletions src/v2/answer_records_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ export class AnswerRecordsClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'answer_record.name': request.answerRecord!.name || '',
'answer_record.name': request.answerRecord!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateAnswerRecord(request, options, callback);
Expand Down Expand Up @@ -725,7 +725,7 @@ export class AnswerRecordsClient {
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.listAnswerRecords(request, options, callback);
Expand Down Expand Up @@ -777,7 +777,7 @@ export class AnswerRecordsClient {
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['listAnswerRecords'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -838,7 +838,7 @@ export class AnswerRecordsClient {
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['listAnswerRecords'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
16 changes: 8 additions & 8 deletions src/v2/contexts_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ export class ContextsClient {
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.getContext(request, options, callback);
Expand Down Expand Up @@ -715,7 +715,7 @@ export class ContextsClient {
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.createContext(request, options, callback);
Expand Down Expand Up @@ -808,7 +808,7 @@ export class ContextsClient {
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
this._gaxModule.routingHeader.fromParams({
'context.name': request.context!.name || '',
'context.name': request.context!.name ?? '',
});
this.initialize();
return this.innerApiCalls.updateContext(request, options, callback);
Expand Down Expand Up @@ -904,7 +904,7 @@ export class ContextsClient {
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.deleteContext(request, options, callback);
Expand Down Expand Up @@ -1000,7 +1000,7 @@ export class ContextsClient {
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.deleteAllContexts(request, options, callback);
Expand Down Expand Up @@ -1105,7 +1105,7 @@ export class ContextsClient {
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.listContexts(request, options, callback);
Expand Down Expand Up @@ -1149,7 +1149,7 @@ export class ContextsClient {
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['listContexts'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1202,7 +1202,7 @@ export class ContextsClient {
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['listContexts'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
14 changes: 7 additions & 7 deletions src/v2/conversation_datasets_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ export class ConversationDatasetsClient {
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.getConversationDataset(
Expand Down Expand Up @@ -794,7 +794,7 @@ export class ConversationDatasetsClient {
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.createConversationDataset(
Expand Down Expand Up @@ -946,7 +946,7 @@ export class ConversationDatasetsClient {
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.deleteConversationDataset(
Expand Down Expand Up @@ -1101,7 +1101,7 @@ export class ConversationDatasetsClient {
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.importConversationData(
Expand Down Expand Up @@ -1241,7 +1241,7 @@ export class ConversationDatasetsClient {
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.listConversationDatasets(
Expand Down Expand Up @@ -1285,7 +1285,7 @@ export class ConversationDatasetsClient {
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['listConversationDatasets'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1334,7 +1334,7 @@ export class ConversationDatasetsClient {
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['listConversationDatasets'];
const callSettings = defaultCallSettings.merge(options);
Expand Down
26 changes: 13 additions & 13 deletions src/v2/conversation_models_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ export class ConversationModelsClient {
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.getConversationModel(request, options, callback);
Expand Down Expand Up @@ -808,7 +808,7 @@ export class ConversationModelsClient {
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.getConversationModelEvaluation(
Expand Down Expand Up @@ -926,7 +926,7 @@ export class ConversationModelsClient {
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.createConversationModel(
Expand Down Expand Up @@ -1077,7 +1077,7 @@ export class ConversationModelsClient {
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.deleteConversationModel(
Expand Down Expand Up @@ -1231,7 +1231,7 @@ export class ConversationModelsClient {
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.deployConversationModel(
Expand Down Expand Up @@ -1385,7 +1385,7 @@ export class ConversationModelsClient {
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.undeployConversationModel(
Expand Down Expand Up @@ -1531,7 +1531,7 @@ export class ConversationModelsClient {
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.createConversationModelEvaluation(
Expand Down Expand Up @@ -1670,7 +1670,7 @@ export class ConversationModelsClient {
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.listConversationModels(
Expand Down Expand Up @@ -1714,7 +1714,7 @@ export class ConversationModelsClient {
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['listConversationModels'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1763,7 +1763,7 @@ export class ConversationModelsClient {
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['listConversationModels'];
const callSettings = defaultCallSettings.merge(options);
Expand Down Expand Up @@ -1869,7 +1869,7 @@ export class ConversationModelsClient {
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.listConversationModelEvaluations(
Expand Down Expand Up @@ -1913,7 +1913,7 @@ export class ConversationModelsClient {
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['listConversationModelEvaluations'];
Expand Down Expand Up @@ -1963,7 +1963,7 @@ export class ConversationModelsClient {
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['listConversationModelEvaluations'];
Expand Down
Loading

0 comments on commit 2492264

Please sign in to comment.