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

Commit f6432cb

Browse files
fix: fixes for dynamic routing and streaming descriptors (#68)
- [ ] Regenerate this pull request now. Use gapic-generator-typescript v2.14.5. PiperOrigin-RevId: 450616838 Source-Link: googleapis/googleapis@7a47b72 Source-Link: https://github.com/googleapis/googleapis-gen/commit/42cc6331bae0b99f61b8e01ae15b05211716c4f9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDJjYzYzMzFiYWUwYjk5ZjYxYjhlMDFhZTE1YjA1MjExNzE2YzRmOSJ9
1 parent a515a4a commit f6432cb

12 files changed

Lines changed: 246 additions & 64 deletions

src/v1beta3/flex_templates_service_client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ export class FlexTemplatesServiceClient {
382382
options.otherArgs.headers['x-goog-request-params'] =
383383
gax.routingHeader.fromParams({
384384
project_id: request.projectId || '',
385+
location: request.location || '',
385386
});
386387
this.initialize();
387388
return this.innerApiCalls.launchFlexTemplate(request, options, callback);

src/v1beta3/jobs_v1_beta3_client.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ export class JobsV1Beta3Client {
415415
options.otherArgs.headers['x-goog-request-params'] =
416416
gax.routingHeader.fromParams({
417417
project_id: request.projectId || '',
418+
location: request.location || '',
418419
});
419420
this.initialize();
420421
return this.innerApiCalls.createJob(request, options, callback);
@@ -512,6 +513,8 @@ export class JobsV1Beta3Client {
512513
options.otherArgs.headers['x-goog-request-params'] =
513514
gax.routingHeader.fromParams({
514515
project_id: request.projectId || '',
516+
location: request.location || '',
517+
job_id: request.jobId || '',
515518
});
516519
this.initialize();
517520
return this.innerApiCalls.getJob(request, options, callback);
@@ -610,6 +613,8 @@ export class JobsV1Beta3Client {
610613
options.otherArgs.headers['x-goog-request-params'] =
611614
gax.routingHeader.fromParams({
612615
project_id: request.projectId || '',
616+
location: request.location || '',
617+
job_id: request.jobId || '',
613618
});
614619
this.initialize();
615620
return this.innerApiCalls.updateJob(request, options, callback);
@@ -784,6 +789,8 @@ export class JobsV1Beta3Client {
784789
options.otherArgs.headers['x-goog-request-params'] =
785790
gax.routingHeader.fromParams({
786791
project_id: request.projectId || '',
792+
location: request.location || '',
793+
job_id: request.jobId || '',
787794
});
788795
this.initialize();
789796
return this.innerApiCalls.snapshotJob(request, options, callback);
@@ -894,6 +901,7 @@ export class JobsV1Beta3Client {
894901
options.otherArgs.headers['x-goog-request-params'] =
895902
gax.routingHeader.fromParams({
896903
project_id: request.projectId || '',
904+
location: request.location || '',
897905
});
898906
this.initialize();
899907
return this.innerApiCalls.listJobs(request, options, callback);
@@ -944,6 +952,7 @@ export class JobsV1Beta3Client {
944952
options.otherArgs.headers['x-goog-request-params'] =
945953
gax.routingHeader.fromParams({
946954
project_id: request.projectId || '',
955+
location: request.location || '',
947956
});
948957
const defaultCallSettings = this._defaults['listJobs'];
949958
const callSettings = defaultCallSettings.merge(options);
@@ -1003,6 +1012,7 @@ export class JobsV1Beta3Client {
10031012
options.otherArgs.headers['x-goog-request-params'] =
10041013
gax.routingHeader.fromParams({
10051014
project_id: request.projectId || '',
1015+
location: request.location || '',
10061016
});
10071017
const defaultCallSettings = this._defaults['listJobs'];
10081018
const callSettings = defaultCallSettings.merge(options);

src/v1beta3/messages_v1_beta3_client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,8 @@ export class MessagesV1Beta3Client {
426426
options.otherArgs.headers['x-goog-request-params'] =
427427
gax.routingHeader.fromParams({
428428
project_id: request.projectId || '',
429+
location: request.location || '',
430+
job_id: request.jobId || '',
429431
});
430432
this.initialize();
431433
return this.innerApiCalls.listJobMessages(request, options, callback);
@@ -482,6 +484,8 @@ export class MessagesV1Beta3Client {
482484
options.otherArgs.headers['x-goog-request-params'] =
483485
gax.routingHeader.fromParams({
484486
project_id: request.projectId || '',
487+
location: request.location || '',
488+
job_id: request.jobId || '',
485489
});
486490
const defaultCallSettings = this._defaults['listJobMessages'];
487491
const callSettings = defaultCallSettings.merge(options);
@@ -547,6 +551,8 @@ export class MessagesV1Beta3Client {
547551
options.otherArgs.headers['x-goog-request-params'] =
548552
gax.routingHeader.fromParams({
549553
project_id: request.projectId || '',
554+
location: request.location || '',
555+
job_id: request.jobId || '',
550556
});
551557
const defaultCallSettings = this._defaults['listJobMessages'];
552558
const callSettings = defaultCallSettings.merge(options);

src/v1beta3/metrics_v1_beta3_client.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@ export class MetricsV1Beta3Client {
412412
options.otherArgs.headers['x-goog-request-params'] =
413413
gax.routingHeader.fromParams({
414414
project_id: request.projectId || '',
415+
location: request.location || '',
416+
job_id: request.jobId || '',
415417
});
416418
this.initialize();
417419
return this.innerApiCalls.getJobMetrics(request, options, callback);
@@ -517,6 +519,8 @@ export class MetricsV1Beta3Client {
517519
options.otherArgs.headers['x-goog-request-params'] =
518520
gax.routingHeader.fromParams({
519521
project_id: request.projectId || '',
522+
location: request.location || '',
523+
job_id: request.jobId || '',
520524
});
521525
this.initialize();
522526
return this.innerApiCalls.getJobExecutionDetails(
@@ -569,6 +573,8 @@ export class MetricsV1Beta3Client {
569573
options.otherArgs.headers['x-goog-request-params'] =
570574
gax.routingHeader.fromParams({
571575
project_id: request.projectId || '',
576+
location: request.location || '',
577+
job_id: request.jobId || '',
572578
});
573579
const defaultCallSettings = this._defaults['getJobExecutionDetails'];
574580
const callSettings = defaultCallSettings.merge(options);
@@ -626,6 +632,8 @@ export class MetricsV1Beta3Client {
626632
options.otherArgs.headers['x-goog-request-params'] =
627633
gax.routingHeader.fromParams({
628634
project_id: request.projectId || '',
635+
location: request.location || '',
636+
job_id: request.jobId || '',
629637
});
630638
const defaultCallSettings = this._defaults['getJobExecutionDetails'];
631639
const callSettings = defaultCallSettings.merge(options);
@@ -743,6 +751,9 @@ export class MetricsV1Beta3Client {
743751
options.otherArgs.headers['x-goog-request-params'] =
744752
gax.routingHeader.fromParams({
745753
project_id: request.projectId || '',
754+
location: request.location || '',
755+
job_id: request.jobId || '',
756+
stage_id: request.stageId || '',
746757
});
747758
this.initialize();
748759
return this.innerApiCalls.getStageExecutionDetails(
@@ -801,6 +812,9 @@ export class MetricsV1Beta3Client {
801812
options.otherArgs.headers['x-goog-request-params'] =
802813
gax.routingHeader.fromParams({
803814
project_id: request.projectId || '',
815+
location: request.location || '',
816+
job_id: request.jobId || '',
817+
stage_id: request.stageId || '',
804818
});
805819
const defaultCallSettings = this._defaults['getStageExecutionDetails'];
806820
const callSettings = defaultCallSettings.merge(options);
@@ -864,6 +878,9 @@ export class MetricsV1Beta3Client {
864878
options.otherArgs.headers['x-goog-request-params'] =
865879
gax.routingHeader.fromParams({
866880
project_id: request.projectId || '',
881+
location: request.location || '',
882+
job_id: request.jobId || '',
883+
stage_id: request.stageId || '',
867884
});
868885
const defaultCallSettings = this._defaults['getStageExecutionDetails'];
869886
const callSettings = defaultCallSettings.merge(options);

src/v1beta3/snapshots_v1_beta3_client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ export class SnapshotsV1Beta3Client {
373373
options.otherArgs.headers['x-goog-request-params'] =
374374
gax.routingHeader.fromParams({
375375
project_id: request.projectId || '',
376+
location: request.location || '',
377+
snapshot_id: request.snapshotId || '',
376378
});
377379
this.initialize();
378380
return this.innerApiCalls.getSnapshot(request, options, callback);
@@ -462,6 +464,8 @@ export class SnapshotsV1Beta3Client {
462464
options.otherArgs.headers['x-goog-request-params'] =
463465
gax.routingHeader.fromParams({
464466
project_id: request.projectId || '',
467+
location: request.location || '',
468+
snapshot_id: request.snapshotId || '',
465469
});
466470
this.initialize();
467471
return this.innerApiCalls.deleteSnapshot(request, options, callback);
@@ -551,6 +555,8 @@ export class SnapshotsV1Beta3Client {
551555
options.otherArgs.headers['x-goog-request-params'] =
552556
gax.routingHeader.fromParams({
553557
project_id: request.projectId || '',
558+
location: request.location || '',
559+
job_id: request.jobId || '',
554560
});
555561
this.initialize();
556562
return this.innerApiCalls.listSnapshots(request, options, callback);

src/v1beta3/templates_service_client.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ export class TemplatesServiceClient {
391391
options.otherArgs.headers['x-goog-request-params'] =
392392
gax.routingHeader.fromParams({
393393
project_id: request.projectId || '',
394+
location: request.location || '',
394395
});
395396
this.initialize();
396397
return this.innerApiCalls.createJobFromTemplate(request, options, callback);
@@ -492,6 +493,7 @@ export class TemplatesServiceClient {
492493
options.otherArgs.headers['x-goog-request-params'] =
493494
gax.routingHeader.fromParams({
494495
project_id: request.projectId || '',
496+
location: request.location || '',
495497
});
496498
this.initialize();
497499
return this.innerApiCalls.launchTemplate(request, options, callback);
@@ -585,6 +587,7 @@ export class TemplatesServiceClient {
585587
options.otherArgs.headers['x-goog-request-params'] =
586588
gax.routingHeader.fromParams({
587589
project_id: request.projectId || '',
590+
location: request.location || '',
588591
});
589592
this.initialize();
590593
return this.innerApiCalls.getTemplate(request, options, callback);

test/gapic_flex_templates_service_v1beta3.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ describe('v1beta3.FlexTemplatesServiceClient', () => {
167167
new protos.google.dataflow.v1beta3.LaunchFlexTemplateRequest()
168168
);
169169
request.projectId = '';
170-
const expectedHeaderRequestParams = 'project_id=';
170+
request.location = '';
171+
const expectedHeaderRequestParams = 'project_id=&location=';
171172
const expectedOptions = {
172173
otherArgs: {
173174
headers: {
@@ -200,7 +201,8 @@ describe('v1beta3.FlexTemplatesServiceClient', () => {
200201
new protos.google.dataflow.v1beta3.LaunchFlexTemplateRequest()
201202
);
202203
request.projectId = '';
203-
const expectedHeaderRequestParams = 'project_id=';
204+
request.location = '';
205+
const expectedHeaderRequestParams = 'project_id=&location=';
204206
const expectedOptions = {
205207
otherArgs: {
206208
headers: {
@@ -248,7 +250,8 @@ describe('v1beta3.FlexTemplatesServiceClient', () => {
248250
new protos.google.dataflow.v1beta3.LaunchFlexTemplateRequest()
249251
);
250252
request.projectId = '';
251-
const expectedHeaderRequestParams = 'project_id=';
253+
request.location = '';
254+
const expectedHeaderRequestParams = 'project_id=&location=';
252255
const expectedOptions = {
253256
otherArgs: {
254257
headers: {
@@ -280,6 +283,7 @@ describe('v1beta3.FlexTemplatesServiceClient', () => {
280283
new protos.google.dataflow.v1beta3.LaunchFlexTemplateRequest()
281284
);
282285
request.projectId = '';
286+
request.location = '';
283287
const expectedError = new Error('The client has already been closed.');
284288
client.close();
285289
await assert.rejects(client.launchFlexTemplate(request), expectedError);

0 commit comments

Comments
 (0)