Skip to content

Commit 5b3e6d1

Browse files
fix: make request optional in all cases (#687)
... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0 Committer: @miraleung PiperOrigin-RevId: 380641501 Source-Link: googleapis/googleapis@076f7e9 Source-Link: googleapis/googleapis-gen@27e4c88
1 parent a919f72 commit 5b3e6d1

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed

packages/google-cloud-translate/src/v3/translation_service_client.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export class TranslationServiceClient {
366366
// -- Service calls --
367367
// -------------------
368368
translateText(
369-
request: protos.google.cloud.translation.v3.ITranslateTextRequest,
369+
request?: protos.google.cloud.translation.v3.ITranslateTextRequest,
370370
options?: CallOptions
371371
): Promise<
372372
[
@@ -474,7 +474,7 @@ export class TranslationServiceClient {
474474
* const [response] = await client.translateText(request);
475475
*/
476476
translateText(
477-
request: protos.google.cloud.translation.v3.ITranslateTextRequest,
477+
request?: protos.google.cloud.translation.v3.ITranslateTextRequest,
478478
optionsOrCallback?:
479479
| CallOptions
480480
| Callback<
@@ -517,7 +517,7 @@ export class TranslationServiceClient {
517517
return this.innerApiCalls.translateText(request, options, callback);
518518
}
519519
detectLanguage(
520-
request: protos.google.cloud.translation.v3.IDetectLanguageRequest,
520+
request?: protos.google.cloud.translation.v3.IDetectLanguageRequest,
521521
options?: CallOptions
522522
): Promise<
523523
[
@@ -599,7 +599,7 @@ export class TranslationServiceClient {
599599
* const [response] = await client.detectLanguage(request);
600600
*/
601601
detectLanguage(
602-
request: protos.google.cloud.translation.v3.IDetectLanguageRequest,
602+
request?: protos.google.cloud.translation.v3.IDetectLanguageRequest,
603603
optionsOrCallback?:
604604
| CallOptions
605605
| Callback<
@@ -642,7 +642,7 @@ export class TranslationServiceClient {
642642
return this.innerApiCalls.detectLanguage(request, options, callback);
643643
}
644644
getSupportedLanguages(
645-
request: protos.google.cloud.translation.v3.IGetSupportedLanguagesRequest,
645+
request?: protos.google.cloud.translation.v3.IGetSupportedLanguagesRequest,
646646
options?: CallOptions
647647
): Promise<
648648
[
@@ -724,7 +724,7 @@ export class TranslationServiceClient {
724724
* const [response] = await client.getSupportedLanguages(request);
725725
*/
726726
getSupportedLanguages(
727-
request: protos.google.cloud.translation.v3.IGetSupportedLanguagesRequest,
727+
request?: protos.google.cloud.translation.v3.IGetSupportedLanguagesRequest,
728728
optionsOrCallback?:
729729
| CallOptions
730730
| Callback<
@@ -770,7 +770,7 @@ export class TranslationServiceClient {
770770
return this.innerApiCalls.getSupportedLanguages(request, options, callback);
771771
}
772772
getGlossary(
773-
request: protos.google.cloud.translation.v3.IGetGlossaryRequest,
773+
request?: protos.google.cloud.translation.v3.IGetGlossaryRequest,
774774
options?: CallOptions
775775
): Promise<
776776
[
@@ -815,7 +815,7 @@ export class TranslationServiceClient {
815815
* const [response] = await client.getGlossary(request);
816816
*/
817817
getGlossary(
818-
request: protos.google.cloud.translation.v3.IGetGlossaryRequest,
818+
request?: protos.google.cloud.translation.v3.IGetGlossaryRequest,
819819
optionsOrCallback?:
820820
| CallOptions
821821
| Callback<
@@ -857,7 +857,7 @@ export class TranslationServiceClient {
857857
}
858858

859859
batchTranslateText(
860-
request: protos.google.cloud.translation.v3.IBatchTranslateTextRequest,
860+
request?: protos.google.cloud.translation.v3.IBatchTranslateTextRequest,
861861
options?: CallOptions
862862
): Promise<
863863
[
@@ -969,7 +969,7 @@ export class TranslationServiceClient {
969969
* const [response] = await operation.promise();
970970
*/
971971
batchTranslateText(
972-
request: protos.google.cloud.translation.v3.IBatchTranslateTextRequest,
972+
request?: protos.google.cloud.translation.v3.IBatchTranslateTextRequest,
973973
optionsOrCallback?:
974974
| CallOptions
975975
| Callback<
@@ -1054,7 +1054,7 @@ export class TranslationServiceClient {
10541054
>;
10551055
}
10561056
createGlossary(
1057-
request: protos.google.cloud.translation.v3.ICreateGlossaryRequest,
1057+
request?: protos.google.cloud.translation.v3.ICreateGlossaryRequest,
10581058
options?: CallOptions
10591059
): Promise<
10601060
[
@@ -1113,7 +1113,7 @@ export class TranslationServiceClient {
11131113
* const [response] = await operation.promise();
11141114
*/
11151115
createGlossary(
1116-
request: protos.google.cloud.translation.v3.ICreateGlossaryRequest,
1116+
request?: protos.google.cloud.translation.v3.ICreateGlossaryRequest,
11171117
optionsOrCallback?:
11181118
| CallOptions
11191119
| Callback<
@@ -1198,7 +1198,7 @@ export class TranslationServiceClient {
11981198
>;
11991199
}
12001200
deleteGlossary(
1201-
request: protos.google.cloud.translation.v3.IDeleteGlossaryRequest,
1201+
request?: protos.google.cloud.translation.v3.IDeleteGlossaryRequest,
12021202
options?: CallOptions
12031203
): Promise<
12041204
[
@@ -1256,7 +1256,7 @@ export class TranslationServiceClient {
12561256
* const [response] = await operation.promise();
12571257
*/
12581258
deleteGlossary(
1259-
request: protos.google.cloud.translation.v3.IDeleteGlossaryRequest,
1259+
request?: protos.google.cloud.translation.v3.IDeleteGlossaryRequest,
12601260
optionsOrCallback?:
12611261
| CallOptions
12621262
| Callback<
@@ -1341,7 +1341,7 @@ export class TranslationServiceClient {
13411341
>;
13421342
}
13431343
listGlossaries(
1344-
request: protos.google.cloud.translation.v3.IListGlossariesRequest,
1344+
request?: protos.google.cloud.translation.v3.IListGlossariesRequest,
13451345
options?: CallOptions
13461346
): Promise<
13471347
[
@@ -1405,7 +1405,7 @@ export class TranslationServiceClient {
14051405
* for more details and examples.
14061406
*/
14071407
listGlossaries(
1408-
request: protos.google.cloud.translation.v3.IListGlossariesRequest,
1408+
request?: protos.google.cloud.translation.v3.IListGlossariesRequest,
14091409
optionsOrCallback?:
14101410
| CallOptions
14111411
| PaginationCallback<

packages/google-cloud-translate/src/v3beta1/translation_service_client.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ export class TranslationServiceClient {
384384
// -- Service calls --
385385
// -------------------
386386
translateText(
387-
request: protos.google.cloud.translation.v3beta1.ITranslateTextRequest,
387+
request?: protos.google.cloud.translation.v3beta1.ITranslateTextRequest,
388388
options?: CallOptions
389389
): Promise<
390390
[
@@ -493,7 +493,7 @@ export class TranslationServiceClient {
493493
* const [response] = await client.translateText(request);
494494
*/
495495
translateText(
496-
request: protos.google.cloud.translation.v3beta1.ITranslateTextRequest,
496+
request?: protos.google.cloud.translation.v3beta1.ITranslateTextRequest,
497497
optionsOrCallback?:
498498
| CallOptions
499499
| Callback<
@@ -536,7 +536,7 @@ export class TranslationServiceClient {
536536
return this.innerApiCalls.translateText(request, options, callback);
537537
}
538538
detectLanguage(
539-
request: protos.google.cloud.translation.v3beta1.IDetectLanguageRequest,
539+
request?: protos.google.cloud.translation.v3beta1.IDetectLanguageRequest,
540540
options?: CallOptions
541541
): Promise<
542542
[
@@ -621,7 +621,7 @@ export class TranslationServiceClient {
621621
* const [response] = await client.detectLanguage(request);
622622
*/
623623
detectLanguage(
624-
request: protos.google.cloud.translation.v3beta1.IDetectLanguageRequest,
624+
request?: protos.google.cloud.translation.v3beta1.IDetectLanguageRequest,
625625
optionsOrCallback?:
626626
| CallOptions
627627
| Callback<
@@ -667,7 +667,7 @@ export class TranslationServiceClient {
667667
return this.innerApiCalls.detectLanguage(request, options, callback);
668668
}
669669
getSupportedLanguages(
670-
request: protos.google.cloud.translation.v3beta1.IGetSupportedLanguagesRequest,
670+
request?: protos.google.cloud.translation.v3beta1.IGetSupportedLanguagesRequest,
671671
options?: CallOptions
672672
): Promise<
673673
[
@@ -749,7 +749,7 @@ export class TranslationServiceClient {
749749
* const [response] = await client.getSupportedLanguages(request);
750750
*/
751751
getSupportedLanguages(
752-
request: protos.google.cloud.translation.v3beta1.IGetSupportedLanguagesRequest,
752+
request?: protos.google.cloud.translation.v3beta1.IGetSupportedLanguagesRequest,
753753
optionsOrCallback?:
754754
| CallOptions
755755
| Callback<
@@ -795,7 +795,7 @@ export class TranslationServiceClient {
795795
return this.innerApiCalls.getSupportedLanguages(request, options, callback);
796796
}
797797
translateDocument(
798-
request: protos.google.cloud.translation.v3beta1.ITranslateDocumentRequest,
798+
request?: protos.google.cloud.translation.v3beta1.ITranslateDocumentRequest,
799799
options?: CallOptions
800800
): Promise<
801801
[
@@ -904,7 +904,7 @@ export class TranslationServiceClient {
904904
* const [response] = await client.translateDocument(request);
905905
*/
906906
translateDocument(
907-
request: protos.google.cloud.translation.v3beta1.ITranslateDocumentRequest,
907+
request?: protos.google.cloud.translation.v3beta1.ITranslateDocumentRequest,
908908
optionsOrCallback?:
909909
| CallOptions
910910
| Callback<
@@ -950,7 +950,7 @@ export class TranslationServiceClient {
950950
return this.innerApiCalls.translateDocument(request, options, callback);
951951
}
952952
getGlossary(
953-
request: protos.google.cloud.translation.v3beta1.IGetGlossaryRequest,
953+
request?: protos.google.cloud.translation.v3beta1.IGetGlossaryRequest,
954954
options?: CallOptions
955955
): Promise<
956956
[
@@ -999,7 +999,7 @@ export class TranslationServiceClient {
999999
* const [response] = await client.getGlossary(request);
10001000
*/
10011001
getGlossary(
1002-
request: protos.google.cloud.translation.v3beta1.IGetGlossaryRequest,
1002+
request?: protos.google.cloud.translation.v3beta1.IGetGlossaryRequest,
10031003
optionsOrCallback?:
10041004
| CallOptions
10051005
| Callback<
@@ -1043,7 +1043,7 @@ export class TranslationServiceClient {
10431043
}
10441044

10451045
batchTranslateText(
1046-
request: protos.google.cloud.translation.v3beta1.IBatchTranslateTextRequest,
1046+
request?: protos.google.cloud.translation.v3beta1.IBatchTranslateTextRequest,
10471047
options?: CallOptions
10481048
): Promise<
10491049
[
@@ -1155,7 +1155,7 @@ export class TranslationServiceClient {
11551155
* const [response] = await operation.promise();
11561156
*/
11571157
batchTranslateText(
1158-
request: protos.google.cloud.translation.v3beta1.IBatchTranslateTextRequest,
1158+
request?: protos.google.cloud.translation.v3beta1.IBatchTranslateTextRequest,
11591159
optionsOrCallback?:
11601160
| CallOptions
11611161
| Callback<
@@ -1240,7 +1240,7 @@ export class TranslationServiceClient {
12401240
>;
12411241
}
12421242
batchTranslateDocument(
1243-
request: protos.google.cloud.translation.v3beta1.IBatchTranslateDocumentRequest,
1243+
request?: protos.google.cloud.translation.v3beta1.IBatchTranslateDocumentRequest,
12441244
options?: CallOptions
12451245
): Promise<
12461246
[
@@ -1345,7 +1345,7 @@ export class TranslationServiceClient {
13451345
* const [response] = await operation.promise();
13461346
*/
13471347
batchTranslateDocument(
1348-
request: protos.google.cloud.translation.v3beta1.IBatchTranslateDocumentRequest,
1348+
request?: protos.google.cloud.translation.v3beta1.IBatchTranslateDocumentRequest,
13491349
optionsOrCallback?:
13501350
| CallOptions
13511351
| Callback<
@@ -1434,7 +1434,7 @@ export class TranslationServiceClient {
14341434
>;
14351435
}
14361436
createGlossary(
1437-
request: protos.google.cloud.translation.v3beta1.ICreateGlossaryRequest,
1437+
request?: protos.google.cloud.translation.v3beta1.ICreateGlossaryRequest,
14381438
options?: CallOptions
14391439
): Promise<
14401440
[
@@ -1493,7 +1493,7 @@ export class TranslationServiceClient {
14931493
* const [response] = await operation.promise();
14941494
*/
14951495
createGlossary(
1496-
request: protos.google.cloud.translation.v3beta1.ICreateGlossaryRequest,
1496+
request?: protos.google.cloud.translation.v3beta1.ICreateGlossaryRequest,
14971497
optionsOrCallback?:
14981498
| CallOptions
14991499
| Callback<
@@ -1578,7 +1578,7 @@ export class TranslationServiceClient {
15781578
>;
15791579
}
15801580
deleteGlossary(
1581-
request: protos.google.cloud.translation.v3beta1.IDeleteGlossaryRequest,
1581+
request?: protos.google.cloud.translation.v3beta1.IDeleteGlossaryRequest,
15821582
options?: CallOptions
15831583
): Promise<
15841584
[
@@ -1636,7 +1636,7 @@ export class TranslationServiceClient {
16361636
* const [response] = await operation.promise();
16371637
*/
16381638
deleteGlossary(
1639-
request: protos.google.cloud.translation.v3beta1.IDeleteGlossaryRequest,
1639+
request?: protos.google.cloud.translation.v3beta1.IDeleteGlossaryRequest,
16401640
optionsOrCallback?:
16411641
| CallOptions
16421642
| Callback<
@@ -1721,7 +1721,7 @@ export class TranslationServiceClient {
17211721
>;
17221722
}
17231723
listGlossaries(
1724-
request: protos.google.cloud.translation.v3beta1.IListGlossariesRequest,
1724+
request?: protos.google.cloud.translation.v3beta1.IListGlossariesRequest,
17251725
options?: CallOptions
17261726
): Promise<
17271727
[
@@ -1798,7 +1798,7 @@ export class TranslationServiceClient {
17981798
* for more details and examples.
17991799
*/
18001800
listGlossaries(
1801-
request: protos.google.cloud.translation.v3beta1.IListGlossariesRequest,
1801+
request?: protos.google.cloud.translation.v3beta1.IListGlossariesRequest,
18021802
optionsOrCallback?:
18031803
| CallOptions
18041804
| PaginationCallback<

0 commit comments

Comments
 (0)