Skip to content

Commit 90a8403

Browse files
fix: better support for fallback mode (#19)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: googleapis/googleapis@873ab45 Source-Link: googleapis/googleapis-gen@cb6f37a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9
1 parent e495015 commit 90a8403

16 files changed

+262
-177
lines changed

packages/google-cloud-run/samples/generated/v2/revisions.delete_revision.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(name) {
2424
// [START run_v2_generated_Revisions_DeleteRevision_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/revisions.get_revision.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(name) {
2424
// [START run_v2_generated_Revisions_GetRevision_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/revisions.list_revisions.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(parent) {
2424
// [START run_v2_generated_Revisions_ListRevisions_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/services.create_service.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(parent, service, serviceId) {
2424
// [START run_v2_generated_Services_CreateService_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/services.delete_service.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(name) {
2424
// [START run_v2_generated_Services_DeleteService_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/services.get_iam_policy.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(resource) {
2424
// [START run_v2_generated_Services_GetIamPolicy_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/services.get_service.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(name) {
2424
// [START run_v2_generated_Services_GetService_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/services.list_services.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(parent) {
2424
// [START run_v2_generated_Services_ListServices_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/services.set_iam_policy.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(resource, policy) {
2424
// [START run_v2_generated_Services_SetIamPolicy_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/services.test_iam_permissions.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(resource, permissions) {
2424
// [START run_v2_generated_Services_TestIamPermissions_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/services.update_service.js

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
function main(service) {
2424
// [START run_v2_generated_Services_UpdateService_async]
2525
/**
26+
* This snippet has been automatically generated and should be regarded as a code template only.
27+
* It will require modifications to work.
28+
* It may require correct/in-range values for request initialization.
2629
* TODO(developer): Uncomment these variables before running the sample.
2730
*/
2831
/**

packages/google-cloud-run/samples/generated/v2/snippet_metadata.google.cloud.run.v2.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"segments": [
2323
{
2424
"start": 25,
25-
"end": 52,
25+
"end": 55,
2626
"type": "FULL"
2727
}
2828
],
@@ -62,7 +62,7 @@
6262
"segments": [
6363
{
6464
"start": 25,
65-
"end": 68,
65+
"end": 71,
6666
"type": "FULL"
6767
}
6868
],
@@ -114,7 +114,7 @@
114114
"segments": [
115115
{
116116
"start": 25,
117-
"end": 63,
117+
"end": 66,
118118
"type": "FULL"
119119
}
120120
],
@@ -162,7 +162,7 @@
162162
"segments": [
163163
{
164164
"start": 25,
165-
"end": 68,
165+
"end": 71,
166166
"type": "FULL"
167167
}
168168
],
@@ -214,7 +214,7 @@
214214
"segments": [
215215
{
216216
"start": 25,
217-
"end": 51,
217+
"end": 54,
218218
"type": "FULL"
219219
}
220220
],
@@ -254,7 +254,7 @@
254254
"segments": [
255255
{
256256
"start": 25,
257-
"end": 67,
257+
"end": 70,
258258
"type": "FULL"
259259
}
260260
],
@@ -306,7 +306,7 @@
306306
"segments": [
307307
{
308308
"start": 25,
309-
"end": 62,
309+
"end": 65,
310310
"type": "FULL"
311311
}
312312
],
@@ -354,7 +354,7 @@
354354
"segments": [
355355
{
356356
"start": 25,
357-
"end": 62,
357+
"end": 65,
358358
"type": "FULL"
359359
}
360360
],
@@ -402,7 +402,7 @@
402402
"segments": [
403403
{
404404
"start": 25,
405-
"end": 56,
405+
"end": 59,
406406
"type": "FULL"
407407
}
408408
],
@@ -446,7 +446,7 @@
446446
"segments": [
447447
{
448448
"start": 25,
449-
"end": 66,
449+
"end": 69,
450450
"type": "FULL"
451451
}
452452
],
@@ -494,7 +494,7 @@
494494
"segments": [
495495
{
496496
"start": 25,
497-
"end": 59,
497+
"end": 62,
498498
"type": "FULL"
499499
}
500500
],

packages/google-cloud-run/src/v2/revisions_client.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030
} from 'google-gax';
3131

3232
import {Transform} from 'stream';
33-
import {RequestType} from 'google-gax/build/src/apitypes';
3433
import * as protos from '../../protos/protos';
3534
import jsonProtos = require('../../protos/protos.json');
3635
/**
@@ -313,7 +312,8 @@ export class RevisionsClient {
313312
const apiCall = this._gaxModule.createApiCall(
314313
callPromise,
315314
this._defaults[methodName],
316-
descriptor
315+
descriptor,
316+
this._opts.fallback
317317
);
318318

319319
this.innerApiCalls[methodName] = apiCall;
@@ -621,7 +621,7 @@ export class RevisionsClient {
621621
const decodeOperation = new gax.Operation(
622622
operation,
623623
this.descriptors.longrunning.deleteRevision,
624-
gax.createDefaultBackoffSettings()
624+
this._gaxModule.createDefaultBackoffSettings()
625625
);
626626
return decodeOperation as LROperation<
627627
protos.google.cloud.run.v2.Revision,
@@ -791,7 +791,7 @@ export class RevisionsClient {
791791
const callSettings = defaultCallSettings.merge(options);
792792
this.initialize();
793793
return this.descriptors.page.listRevisions.createStream(
794-
this.innerApiCalls.listRevisions as gax.GaxCall,
794+
this.innerApiCalls.listRevisions as GaxCall,
795795
request,
796796
callSettings
797797
);
@@ -856,7 +856,7 @@ export class RevisionsClient {
856856
this.initialize();
857857
return this.descriptors.page.listRevisions.asyncIterate(
858858
this.innerApiCalls['listRevisions'] as GaxCall,
859-
request as unknown as RequestType,
859+
request as {},
860860
callSettings
861861
) as AsyncIterable<protos.google.cloud.run.v2.IRevision>;
862862
}

packages/google-cloud-run/src/v2/services_client.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import {
3030
} from 'google-gax';
3131

3232
import {Transform} from 'stream';
33-
import {RequestType} from 'google-gax/build/src/apitypes';
3433
import * as protos from '../../protos/protos';
3534
import jsonProtos = require('../../protos/protos.json');
3635
/**
@@ -337,7 +336,8 @@ export class ServicesClient {
337336
const apiCall = this._gaxModule.createApiCall(
338337
callPromise,
339338
this._defaults[methodName],
340-
descriptor
339+
descriptor,
340+
this._opts.fallback
341341
);
342342

343343
this.innerApiCalls[methodName] = apiCall;
@@ -920,7 +920,7 @@ export class ServicesClient {
920920
const decodeOperation = new gax.Operation(
921921
operation,
922922
this.descriptors.longrunning.createService,
923-
gax.createDefaultBackoffSettings()
923+
this._gaxModule.createDefaultBackoffSettings()
924924
);
925925
return decodeOperation as LROperation<
926926
protos.google.cloud.run.v2.Service,
@@ -1075,7 +1075,7 @@ export class ServicesClient {
10751075
const decodeOperation = new gax.Operation(
10761076
operation,
10771077
this.descriptors.longrunning.updateService,
1078-
gax.createDefaultBackoffSettings()
1078+
this._gaxModule.createDefaultBackoffSettings()
10791079
);
10801080
return decodeOperation as LROperation<
10811081
protos.google.cloud.run.v2.Service,
@@ -1232,7 +1232,7 @@ export class ServicesClient {
12321232
const decodeOperation = new gax.Operation(
12331233
operation,
12341234
this.descriptors.longrunning.deleteService,
1235-
gax.createDefaultBackoffSettings()
1235+
this._gaxModule.createDefaultBackoffSettings()
12361236
);
12371237
return decodeOperation as LROperation<
12381238
protos.google.cloud.run.v2.Service,
@@ -1400,7 +1400,7 @@ export class ServicesClient {
14001400
const callSettings = defaultCallSettings.merge(options);
14011401
this.initialize();
14021402
return this.descriptors.page.listServices.createStream(
1403-
this.innerApiCalls.listServices as gax.GaxCall,
1403+
this.innerApiCalls.listServices as GaxCall,
14041404
request,
14051405
callSettings
14061406
);
@@ -1464,7 +1464,7 @@ export class ServicesClient {
14641464
this.initialize();
14651465
return this.descriptors.page.listServices.asyncIterate(
14661466
this.innerApiCalls['listServices'] as GaxCall,
1467-
request as unknown as RequestType,
1467+
request as {},
14681468
callSettings
14691469
) as AsyncIterable<protos.google.cloud.run.v2.IService>;
14701470
}

0 commit comments

Comments
 (0)