Skip to content

Commit b33692d

Browse files
fix: [Many APIs] await/catch promises, and update listOperationsAsync return type (#6187)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 738212310 Source-Link: https://togithub.com/googleapis/googleapis/commit/803b23488149d2d00725edc52d8a6498b6ab0fec Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4f44bd2baa8dd5a71ca0cebdb164c3c34341ed87 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmtzZXJ2aWNlcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5vdGVib29rcy8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yYWNsZWRhdGFiYXNlLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yY2hlc3RyYXRpb24tYWlyZmxvdy1zZXJ2aWNlLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yZ3BvbGljeS8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9 Copy-Tag: eyJwIjoicGFja2FnZXM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kODcifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlZGlzLy5Pd2xCb3QueWFtbCIsImgiOiI0ZjQ0YmQyYmFhOGRkNWE3MWNhMGNlYmRiMTY0YzNjMzQzNDFlZDg3In0=
1 parent c9adc61 commit b33692d

143 files changed

Lines changed: 5294 additions & 3950 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-networkservices/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"prelint": "cd samples; npm link ../; npm i"
4646
},
4747
"dependencies": {
48-
"google-gax": "^5.0.0-rc.0"
48+
"google-gax": "^5.0.1-rc.0"
4949
},
5050
"devDependencies": {
5151
"@types/mocha": "^10.0.10",

packages/google-cloud-networkservices/samples/generated/v1/snippet_metadata_google.cloud.networkservices.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clientLibrary": {
33
"name": "nodejs-networkservices",
4-
"version": "0.7.1",
4+
"version": "0.8.0",
55
"language": "TYPESCRIPT",
66
"apis": [
77
{

packages/google-cloud-networkservices/samples/generated/v1beta1/snippet_metadata_google.cloud.networkservices.v1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"clientLibrary": {
33
"name": "nodejs-networkservices",
4-
"version": "0.7.1",
4+
"version": "0.8.0",
55
"language": "TYPESCRIPT",
66
"apis": [
77
{

packages/google-cloud-networkservices/src/v1/dep_service_client.ts

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,9 @@ export class DepServiceClient {
764764
this._gaxModule.routingHeader.fromParams({
765765
name: request.name ?? '',
766766
});
767-
this.initialize();
767+
this.initialize().catch(err => {
768+
throw err;
769+
});
768770
this._log.info('getLbTrafficExtension request %j', request);
769771
const wrappedCallback:
770772
| Callback<
@@ -891,7 +893,9 @@ export class DepServiceClient {
891893
this._gaxModule.routingHeader.fromParams({
892894
name: request.name ?? '',
893895
});
894-
this.initialize();
896+
this.initialize().catch(err => {
897+
throw err;
898+
});
895899
this._log.info('getLbRouteExtension request %j', request);
896900
const wrappedCallback:
897901
| Callback<
@@ -1044,7 +1048,9 @@ export class DepServiceClient {
10441048
this._gaxModule.routingHeader.fromParams({
10451049
parent: request.parent ?? '',
10461050
});
1047-
this.initialize();
1051+
this.initialize().catch(err => {
1052+
throw err;
1053+
});
10481054
const wrappedCallback:
10491055
| Callback<
10501056
LROperation<
@@ -1231,7 +1237,9 @@ export class DepServiceClient {
12311237
this._gaxModule.routingHeader.fromParams({
12321238
'lb_traffic_extension.name': request.lbTrafficExtension!.name ?? '',
12331239
});
1234-
this.initialize();
1240+
this.initialize().catch(err => {
1241+
throw err;
1242+
});
12351243
const wrappedCallback:
12361244
| Callback<
12371245
LROperation<
@@ -1414,7 +1422,9 @@ export class DepServiceClient {
14141422
this._gaxModule.routingHeader.fromParams({
14151423
name: request.name ?? '',
14161424
});
1417-
this.initialize();
1425+
this.initialize().catch(err => {
1426+
throw err;
1427+
});
14181428
const wrappedCallback:
14191429
| Callback<
14201430
LROperation<
@@ -1601,7 +1611,9 @@ export class DepServiceClient {
16011611
this._gaxModule.routingHeader.fromParams({
16021612
parent: request.parent ?? '',
16031613
});
1604-
this.initialize();
1614+
this.initialize().catch(err => {
1615+
throw err;
1616+
});
16051617
const wrappedCallback:
16061618
| Callback<
16071619
LROperation<
@@ -1788,7 +1800,9 @@ export class DepServiceClient {
17881800
this._gaxModule.routingHeader.fromParams({
17891801
'lb_route_extension.name': request.lbRouteExtension!.name ?? '',
17901802
});
1791-
this.initialize();
1803+
this.initialize().catch(err => {
1804+
throw err;
1805+
});
17921806
const wrappedCallback:
17931807
| Callback<
17941808
LROperation<
@@ -1971,7 +1985,9 @@ export class DepServiceClient {
19711985
this._gaxModule.routingHeader.fromParams({
19721986
name: request.name ?? '',
19731987
});
1974-
this.initialize();
1988+
this.initialize().catch(err => {
1989+
throw err;
1990+
});
19751991
const wrappedCallback:
19761992
| Callback<
19771993
LROperation<
@@ -2140,7 +2156,9 @@ export class DepServiceClient {
21402156
this._gaxModule.routingHeader.fromParams({
21412157
parent: request.parent ?? '',
21422158
});
2143-
this.initialize();
2159+
this.initialize().catch(err => {
2160+
throw err;
2161+
});
21442162
const wrappedCallback:
21452163
| PaginationCallback<
21462164
protos.google.cloud.networkservices.v1.IListLbTrafficExtensionsRequest,
@@ -2212,7 +2230,9 @@ export class DepServiceClient {
22122230
});
22132231
const defaultCallSettings = this._defaults['listLbTrafficExtensions'];
22142232
const callSettings = defaultCallSettings.merge(options);
2215-
this.initialize();
2233+
this.initialize().catch(err => {
2234+
throw err;
2235+
});
22162236
this._log.info('listLbTrafficExtensions stream %j', request);
22172237
return this.descriptors.page.listLbTrafficExtensions.createStream(
22182238
this.innerApiCalls.listLbTrafficExtensions as GaxCall,
@@ -2266,7 +2286,9 @@ export class DepServiceClient {
22662286
});
22672287
const defaultCallSettings = this._defaults['listLbTrafficExtensions'];
22682288
const callSettings = defaultCallSettings.merge(options);
2269-
this.initialize();
2289+
this.initialize().catch(err => {
2290+
throw err;
2291+
});
22702292
this._log.info('listLbTrafficExtensions iterate %j', request);
22712293
return this.descriptors.page.listLbTrafficExtensions.asyncIterate(
22722294
this.innerApiCalls['listLbTrafficExtensions'] as GaxCall,
@@ -2375,7 +2397,9 @@ export class DepServiceClient {
23752397
this._gaxModule.routingHeader.fromParams({
23762398
parent: request.parent ?? '',
23772399
});
2378-
this.initialize();
2400+
this.initialize().catch(err => {
2401+
throw err;
2402+
});
23792403
const wrappedCallback:
23802404
| PaginationCallback<
23812405
protos.google.cloud.networkservices.v1.IListLbRouteExtensionsRequest,
@@ -2447,7 +2471,9 @@ export class DepServiceClient {
24472471
});
24482472
const defaultCallSettings = this._defaults['listLbRouteExtensions'];
24492473
const callSettings = defaultCallSettings.merge(options);
2450-
this.initialize();
2474+
this.initialize().catch(err => {
2475+
throw err;
2476+
});
24512477
this._log.info('listLbRouteExtensions stream %j', request);
24522478
return this.descriptors.page.listLbRouteExtensions.createStream(
24532479
this.innerApiCalls.listLbRouteExtensions as GaxCall,
@@ -2501,7 +2527,9 @@ export class DepServiceClient {
25012527
});
25022528
const defaultCallSettings = this._defaults['listLbRouteExtensions'];
25032529
const callSettings = defaultCallSettings.merge(options);
2504-
this.initialize();
2530+
this.initialize().catch(err => {
2531+
throw err;
2532+
});
25052533
this._log.info('listLbRouteExtensions iterate %j', request);
25062534
return this.descriptors.page.listLbRouteExtensions.asyncIterate(
25072535
this.innerApiCalls['listLbRouteExtensions'] as GaxCall,
@@ -2819,7 +2847,7 @@ export class DepServiceClient {
28192847
listOperationsAsync(
28202848
request: protos.google.longrunning.ListOperationsRequest,
28212849
options?: gax.CallOptions
2822-
): AsyncIterable<protos.google.longrunning.ListOperationsResponse> {
2850+
): AsyncIterable<protos.google.longrunning.IOperation> {
28232851
options = options || {};
28242852
options.otherArgs = options.otherArgs || {};
28252853
options.otherArgs.headers = options.otherArgs.headers || {};

0 commit comments

Comments
 (0)