Skip to content

Commit 9705750

Browse files
feat: await/catch promises, and update listOperationsAsync return type
PiperOrigin-RevId: 738212310 Source-Link: googleapis/googleapis@803b234 Source-Link: googleapis/googleapis-gen@4f44bd2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGY0NGJkMmJhYThkZDVhNzFjYTBjZWJkYjE2NGMzYzM0MzQxZWQ4NyJ9
1 parent 10188e6 commit 9705750

File tree

7 files changed

+269
-269
lines changed

7 files changed

+269
-269
lines changed

owl-bot-staging/v1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"test": "c8 mocha build/test"
3838
},
3939
"dependencies": {
40-
"google-gax": "^5.0.0-rc.3"
40+
"google-gax": "^5.0.1-rc.0"
4141
},
4242
"devDependencies": {
4343
"@types/mocha": "^10.0.7",

owl-bot-staging/v1/src/v1/publisher_client.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ export class PublisherClient {
479479
] = this._gaxModule.routingHeader.fromParams({
480480
'name': request.name ?? '',
481481
});
482-
this.initialize();
482+
this.initialize().catch(err => {throw err});
483483
this._log.info('createTopic request %j', request);
484484
const wrappedCallback: Callback<
485485
protos.google.pubsub.v1.ITopic,
@@ -572,7 +572,7 @@ export class PublisherClient {
572572
] = this._gaxModule.routingHeader.fromParams({
573573
'topic.name': request.topic!.name ?? '',
574574
});
575-
this.initialize();
575+
this.initialize().catch(err => {throw err});
576576
this._log.info('updateTopic request %j', request);
577577
const wrappedCallback: Callback<
578578
protos.google.pubsub.v1.ITopic,
@@ -662,7 +662,7 @@ export class PublisherClient {
662662
] = this._gaxModule.routingHeader.fromParams({
663663
'topic': request.topic ?? '',
664664
});
665-
this.initialize();
665+
this.initialize().catch(err => {throw err});
666666
this._log.info('publish request %j', request);
667667
const wrappedCallback: Callback<
668668
protos.google.pubsub.v1.IPublishResponse,
@@ -749,7 +749,7 @@ export class PublisherClient {
749749
] = this._gaxModule.routingHeader.fromParams({
750750
'topic': request.topic ?? '',
751751
});
752-
this.initialize();
752+
this.initialize().catch(err => {throw err});
753753
this._log.info('getTopic request %j', request);
754754
const wrappedCallback: Callback<
755755
protos.google.pubsub.v1.ITopic,
@@ -840,7 +840,7 @@ export class PublisherClient {
840840
] = this._gaxModule.routingHeader.fromParams({
841841
'topic': request.topic ?? '',
842842
});
843-
this.initialize();
843+
this.initialize().catch(err => {throw err});
844844
this._log.info('deleteTopic request %j', request);
845845
const wrappedCallback: Callback<
846846
protos.google.protobuf.IEmpty,
@@ -930,7 +930,7 @@ export class PublisherClient {
930930
] = this._gaxModule.routingHeader.fromParams({
931931
'subscription': request.subscription ?? '',
932932
});
933-
this.initialize();
933+
this.initialize().catch(err => {throw err});
934934
this._log.info('detachSubscription request %j', request);
935935
const wrappedCallback: Callback<
936936
protos.google.pubsub.v1.IDetachSubscriptionResponse,
@@ -1031,7 +1031,7 @@ export class PublisherClient {
10311031
] = this._gaxModule.routingHeader.fromParams({
10321032
'project': request.project ?? '',
10331033
});
1034-
this.initialize();
1034+
this.initialize().catch(err => {throw err});
10351035
const wrappedCallback: PaginationCallback<
10361036
protos.google.pubsub.v1.IListTopicsRequest,
10371037
protos.google.pubsub.v1.IListTopicsResponse|null|undefined,
@@ -1093,7 +1093,7 @@ export class PublisherClient {
10931093
});
10941094
const defaultCallSettings = this._defaults['listTopics'];
10951095
const callSettings = defaultCallSettings.merge(options);
1096-
this.initialize();
1096+
this.initialize().catch(err => {throw err});
10971097
this._log.info('listTopics stream %j', request);
10981098
return this.descriptors.page.listTopics.createStream(
10991099
this.innerApiCalls.listTopics as GaxCall,
@@ -1142,7 +1142,7 @@ export class PublisherClient {
11421142
});
11431143
const defaultCallSettings = this._defaults['listTopics'];
11441144
const callSettings = defaultCallSettings.merge(options);
1145-
this.initialize();
1145+
this.initialize().catch(err => {throw err});
11461146
this._log.info('listTopics iterate %j', request);
11471147
return this.descriptors.page.listTopics.asyncIterate(
11481148
this.innerApiCalls['listTopics'] as GaxCall,
@@ -1229,7 +1229,7 @@ export class PublisherClient {
12291229
] = this._gaxModule.routingHeader.fromParams({
12301230
'topic': request.topic ?? '',
12311231
});
1232-
this.initialize();
1232+
this.initialize().catch(err => {throw err});
12331233
const wrappedCallback: PaginationCallback<
12341234
protos.google.pubsub.v1.IListTopicSubscriptionsRequest,
12351235
protos.google.pubsub.v1.IListTopicSubscriptionsResponse|null|undefined,
@@ -1291,7 +1291,7 @@ export class PublisherClient {
12911291
});
12921292
const defaultCallSettings = this._defaults['listTopicSubscriptions'];
12931293
const callSettings = defaultCallSettings.merge(options);
1294-
this.initialize();
1294+
this.initialize().catch(err => {throw err});
12951295
this._log.info('listTopicSubscriptions stream %j', request);
12961296
return this.descriptors.page.listTopicSubscriptions.createStream(
12971297
this.innerApiCalls.listTopicSubscriptions as GaxCall,
@@ -1340,7 +1340,7 @@ export class PublisherClient {
13401340
});
13411341
const defaultCallSettings = this._defaults['listTopicSubscriptions'];
13421342
const callSettings = defaultCallSettings.merge(options);
1343-
this.initialize();
1343+
this.initialize().catch(err => {throw err});
13441344
this._log.info('listTopicSubscriptions iterate %j', request);
13451345
return this.descriptors.page.listTopicSubscriptions.asyncIterate(
13461346
this.innerApiCalls['listTopicSubscriptions'] as GaxCall,
@@ -1431,7 +1431,7 @@ export class PublisherClient {
14311431
] = this._gaxModule.routingHeader.fromParams({
14321432
'topic': request.topic ?? '',
14331433
});
1434-
this.initialize();
1434+
this.initialize().catch(err => {throw err});
14351435
const wrappedCallback: PaginationCallback<
14361436
protos.google.pubsub.v1.IListTopicSnapshotsRequest,
14371437
protos.google.pubsub.v1.IListTopicSnapshotsResponse|null|undefined,
@@ -1493,7 +1493,7 @@ export class PublisherClient {
14931493
});
14941494
const defaultCallSettings = this._defaults['listTopicSnapshots'];
14951495
const callSettings = defaultCallSettings.merge(options);
1496-
this.initialize();
1496+
this.initialize().catch(err => {throw err});
14971497
this._log.info('listTopicSnapshots stream %j', request);
14981498
return this.descriptors.page.listTopicSnapshots.createStream(
14991499
this.innerApiCalls.listTopicSnapshots as GaxCall,
@@ -1542,7 +1542,7 @@ export class PublisherClient {
15421542
});
15431543
const defaultCallSettings = this._defaults['listTopicSnapshots'];
15441544
const callSettings = defaultCallSettings.merge(options);
1545-
this.initialize();
1545+
this.initialize().catch(err => {throw err});
15461546
this._log.info('listTopicSnapshots iterate %j', request);
15471547
return this.descriptors.page.listTopicSnapshots.asyncIterate(
15481548
this.innerApiCalls['listTopicSnapshots'] as GaxCall,

owl-bot-staging/v1/src/v1/schema_service_client.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ export class SchemaServiceClient {
432432
] = this._gaxModule.routingHeader.fromParams({
433433
'parent': request.parent ?? '',
434434
});
435-
this.initialize();
435+
this.initialize().catch(err => {throw err});
436436
this._log.info('createSchema request %j', request);
437437
const wrappedCallback: Callback<
438438
protos.google.pubsub.v1.ISchema,
@@ -522,7 +522,7 @@ export class SchemaServiceClient {
522522
] = this._gaxModule.routingHeader.fromParams({
523523
'name': request.name ?? '',
524524
});
525-
this.initialize();
525+
this.initialize().catch(err => {throw err});
526526
this._log.info('getSchema request %j', request);
527527
const wrappedCallback: Callback<
528528
protos.google.pubsub.v1.ISchema,
@@ -611,7 +611,7 @@ export class SchemaServiceClient {
611611
] = this._gaxModule.routingHeader.fromParams({
612612
'name': request.name ?? '',
613613
});
614-
this.initialize();
614+
this.initialize().catch(err => {throw err});
615615
this._log.info('commitSchema request %j', request);
616616
const wrappedCallback: Callback<
617617
protos.google.pubsub.v1.ISchema,
@@ -702,7 +702,7 @@ export class SchemaServiceClient {
702702
] = this._gaxModule.routingHeader.fromParams({
703703
'name': request.name ?? '',
704704
});
705-
this.initialize();
705+
this.initialize().catch(err => {throw err});
706706
this._log.info('rollbackSchema request %j', request);
707707
const wrappedCallback: Callback<
708708
protos.google.pubsub.v1.ISchema,
@@ -795,7 +795,7 @@ export class SchemaServiceClient {
795795
] = this._gaxModule.routingHeader.fromParams({
796796
'name': request.name ?? '',
797797
});
798-
this.initialize();
798+
this.initialize().catch(err => {throw err});
799799
this._log.info('deleteSchemaRevision request %j', request);
800800
const wrappedCallback: Callback<
801801
protos.google.pubsub.v1.ISchema,
@@ -882,7 +882,7 @@ export class SchemaServiceClient {
882882
] = this._gaxModule.routingHeader.fromParams({
883883
'name': request.name ?? '',
884884
});
885-
this.initialize();
885+
this.initialize().catch(err => {throw err});
886886
this._log.info('deleteSchema request %j', request);
887887
const wrappedCallback: Callback<
888888
protos.google.protobuf.IEmpty,
@@ -971,7 +971,7 @@ export class SchemaServiceClient {
971971
] = this._gaxModule.routingHeader.fromParams({
972972
'parent': request.parent ?? '',
973973
});
974-
this.initialize();
974+
this.initialize().catch(err => {throw err});
975975
this._log.info('validateSchema request %j', request);
976976
const wrappedCallback: Callback<
977977
protos.google.pubsub.v1.IValidateSchemaResponse,
@@ -1068,7 +1068,7 @@ export class SchemaServiceClient {
10681068
] = this._gaxModule.routingHeader.fromParams({
10691069
'parent': request.parent ?? '',
10701070
});
1071-
this.initialize();
1071+
this.initialize().catch(err => {throw err});
10721072
this._log.info('validateMessage request %j', request);
10731073
const wrappedCallback: Callback<
10741074
protos.google.pubsub.v1.IValidateMessageResponse,
@@ -1173,7 +1173,7 @@ export class SchemaServiceClient {
11731173
] = this._gaxModule.routingHeader.fromParams({
11741174
'parent': request.parent ?? '',
11751175
});
1176-
this.initialize();
1176+
this.initialize().catch(err => {throw err});
11771177
const wrappedCallback: PaginationCallback<
11781178
protos.google.pubsub.v1.IListSchemasRequest,
11791179
protos.google.pubsub.v1.IListSchemasResponse|null|undefined,
@@ -1239,7 +1239,7 @@ export class SchemaServiceClient {
12391239
});
12401240
const defaultCallSettings = this._defaults['listSchemas'];
12411241
const callSettings = defaultCallSettings.merge(options);
1242-
this.initialize();
1242+
this.initialize().catch(err => {throw err});
12431243
this._log.info('listSchemas stream %j', request);
12441244
return this.descriptors.page.listSchemas.createStream(
12451245
this.innerApiCalls.listSchemas as GaxCall,
@@ -1292,7 +1292,7 @@ export class SchemaServiceClient {
12921292
});
12931293
const defaultCallSettings = this._defaults['listSchemas'];
12941294
const callSettings = defaultCallSettings.merge(options);
1295-
this.initialize();
1295+
this.initialize().catch(err => {throw err});
12961296
this._log.info('listSchemas iterate %j', request);
12971297
return this.descriptors.page.listSchemas.asyncIterate(
12981298
this.innerApiCalls['listSchemas'] as GaxCall,
@@ -1381,7 +1381,7 @@ export class SchemaServiceClient {
13811381
] = this._gaxModule.routingHeader.fromParams({
13821382
'name': request.name ?? '',
13831383
});
1384-
this.initialize();
1384+
this.initialize().catch(err => {throw err});
13851385
const wrappedCallback: PaginationCallback<
13861386
protos.google.pubsub.v1.IListSchemaRevisionsRequest,
13871387
protos.google.pubsub.v1.IListSchemaRevisionsResponse|null|undefined,
@@ -1445,7 +1445,7 @@ export class SchemaServiceClient {
14451445
});
14461446
const defaultCallSettings = this._defaults['listSchemaRevisions'];
14471447
const callSettings = defaultCallSettings.merge(options);
1448-
this.initialize();
1448+
this.initialize().catch(err => {throw err});
14491449
this._log.info('listSchemaRevisions stream %j', request);
14501450
return this.descriptors.page.listSchemaRevisions.createStream(
14511451
this.innerApiCalls.listSchemaRevisions as GaxCall,
@@ -1496,7 +1496,7 @@ export class SchemaServiceClient {
14961496
});
14971497
const defaultCallSettings = this._defaults['listSchemaRevisions'];
14981498
const callSettings = defaultCallSettings.merge(options);
1499-
this.initialize();
1499+
this.initialize().catch(err => {throw err});
15001500
this._log.info('listSchemaRevisions iterate %j', request);
15011501
return this.descriptors.page.listSchemaRevisions.asyncIterate(
15021502
this.innerApiCalls['listSchemaRevisions'] as GaxCall,

0 commit comments

Comments
 (0)