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

Commit 9f70803

Browse files
chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions (#945)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 472750037 Source-Link: googleapis/googleapis@88f2ea3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9
1 parent 5403f19 commit 9f70803

File tree

134 files changed

+1232
-556
lines changed

Some content is hidden

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

134 files changed

+1232
-556
lines changed

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/AdaptationClient.java

Lines changed: 220 additions & 88 deletions
Large diffs are not rendered by default.

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/AdaptationSettings.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@
5555
* <p>For example, to set the total timeout of createPhraseSet to 30 seconds:
5656
*
5757
* <pre>{@code
58-
* // This snippet has been automatically generated for illustrative purposes only.
59-
* // It may require modifications to work in your environment.
58+
* // This snippet has been automatically generated and should be regarded as a code template only.
59+
* // It will require modifications to work:
60+
* // - It may require correct/in-range values for request initialization.
61+
* // - It may require specifying regional endpoints when creating the service client as shown in
62+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6063
* AdaptationSettings.Builder adaptationSettingsBuilder = AdaptationSettings.newBuilder();
6164
* adaptationSettingsBuilder
6265
* .createPhraseSetSettings()
6366
* .setRetrySettings(
64-
* adaptationSettingsBuilder
65-
* .createPhraseSetSettings()
66-
* .getRetrySettings()
67-
* .toBuilder()
67+
* adaptationSettingsBuilder.createPhraseSetSettings().getRetrySettings().toBuilder()
6868
* .setTotalTimeout(Duration.ofSeconds(30))
6969
* .build());
7070
* AdaptationSettings adaptationSettings = adaptationSettingsBuilder.build();

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/SpeechClient.java

Lines changed: 60 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@
3838
* calls that map to API methods. Sample code to get started:
3939
*
4040
* <pre>{@code
41-
* // This snippet has been automatically generated for illustrative purposes only.
42-
* // It may require modifications to work in your environment.
41+
* // This snippet has been automatically generated and should be regarded as a code template only.
42+
* // It will require modifications to work:
43+
* // - It may require correct/in-range values for request initialization.
44+
* // - It may require specifying regional endpoints when creating the service client as shown in
45+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4346
* try (SpeechClient speechClient = SpeechClient.create()) {
4447
* RecognitionConfig config = RecognitionConfig.newBuilder().build();
4548
* RecognitionAudio audio = RecognitionAudio.newBuilder().build();
@@ -76,8 +79,11 @@
7679
* <p>To customize credentials:
7780
*
7881
* <pre>{@code
79-
* // This snippet has been automatically generated for illustrative purposes only.
80-
* // It may require modifications to work in your environment.
82+
* // This snippet has been automatically generated and should be regarded as a code template only.
83+
* // It will require modifications to work:
84+
* // - It may require correct/in-range values for request initialization.
85+
* // - It may require specifying regional endpoints when creating the service client as shown in
86+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
8187
* SpeechSettings speechSettings =
8288
* SpeechSettings.newBuilder()
8389
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -88,8 +94,11 @@
8894
* <p>To customize the endpoint:
8995
*
9096
* <pre>{@code
91-
* // This snippet has been automatically generated for illustrative purposes only.
92-
* // It may require modifications to work in your environment.
97+
* // This snippet has been automatically generated and should be regarded as a code template only.
98+
* // It will require modifications to work:
99+
* // - It may require correct/in-range values for request initialization.
100+
* // - It may require specifying regional endpoints when creating the service client as shown in
101+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
93102
* SpeechSettings speechSettings = SpeechSettings.newBuilder().setEndpoint(myEndpoint).build();
94103
* SpeechClient speechClient = SpeechClient.create(speechSettings);
95104
* }</pre>
@@ -98,8 +107,11 @@
98107
* the wire:
99108
*
100109
* <pre>{@code
101-
* // This snippet has been automatically generated for illustrative purposes only.
102-
* // It may require modifications to work in your environment.
110+
* // This snippet has been automatically generated and should be regarded as a code template only.
111+
* // It will require modifications to work:
112+
* // - It may require correct/in-range values for request initialization.
113+
* // - It may require specifying regional endpoints when creating the service client as shown in
114+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
103115
* SpeechSettings speechSettings =
104116
* SpeechSettings.newBuilder()
105117
* .setTransportChannelProvider(
@@ -191,8 +203,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
191203
* <p>Sample code:
192204
*
193205
* <pre>{@code
194-
* // This snippet has been automatically generated for illustrative purposes only.
195-
* // It may require modifications to work in your environment.
206+
* // This snippet has been automatically generated and should be regarded as a code template only.
207+
* // It will require modifications to work:
208+
* // - It may require correct/in-range values for request initialization.
209+
* // - It may require specifying regional endpoints when creating the service client as shown in
210+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
196211
* try (SpeechClient speechClient = SpeechClient.create()) {
197212
* RecognitionConfig config = RecognitionConfig.newBuilder().build();
198213
* RecognitionAudio audio = RecognitionAudio.newBuilder().build();
@@ -219,8 +234,11 @@ public final RecognizeResponse recognize(RecognitionConfig config, RecognitionAu
219234
* <p>Sample code:
220235
*
221236
* <pre>{@code
222-
* // This snippet has been automatically generated for illustrative purposes only.
223-
* // It may require modifications to work in your environment.
237+
* // This snippet has been automatically generated and should be regarded as a code template only.
238+
* // It will require modifications to work:
239+
* // - It may require correct/in-range values for request initialization.
240+
* // - It may require specifying regional endpoints when creating the service client as shown in
241+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
224242
* try (SpeechClient speechClient = SpeechClient.create()) {
225243
* RecognizeRequest request =
226244
* RecognizeRequest.newBuilder()
@@ -246,8 +264,11 @@ public final RecognizeResponse recognize(RecognizeRequest request) {
246264
* <p>Sample code:
247265
*
248266
* <pre>{@code
249-
* // This snippet has been automatically generated for illustrative purposes only.
250-
* // It may require modifications to work in your environment.
267+
* // This snippet has been automatically generated and should be regarded as a code template only.
268+
* // It will require modifications to work:
269+
* // - It may require correct/in-range values for request initialization.
270+
* // - It may require specifying regional endpoints when creating the service client as shown in
271+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
251272
* try (SpeechClient speechClient = SpeechClient.create()) {
252273
* RecognizeRequest request =
253274
* RecognizeRequest.newBuilder()
@@ -274,8 +295,11 @@ public final UnaryCallable<RecognizeRequest, RecognizeResponse> recognizeCallabl
274295
* <p>Sample code:
275296
*
276297
* <pre>{@code
277-
* // This snippet has been automatically generated for illustrative purposes only.
278-
* // It may require modifications to work in your environment.
298+
* // This snippet has been automatically generated and should be regarded as a code template only.
299+
* // It will require modifications to work:
300+
* // - It may require correct/in-range values for request initialization.
301+
* // - It may require specifying regional endpoints when creating the service client as shown in
302+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
279303
* try (SpeechClient speechClient = SpeechClient.create()) {
280304
* RecognitionConfig config = RecognitionConfig.newBuilder().build();
281305
* RecognitionAudio audio = RecognitionAudio.newBuilder().build();
@@ -306,8 +330,11 @@ public final UnaryCallable<RecognizeRequest, RecognizeResponse> recognizeCallabl
306330
* <p>Sample code:
307331
*
308332
* <pre>{@code
309-
* // This snippet has been automatically generated for illustrative purposes only.
310-
* // It may require modifications to work in your environment.
333+
* // This snippet has been automatically generated and should be regarded as a code template only.
334+
* // It will require modifications to work:
335+
* // - It may require correct/in-range values for request initialization.
336+
* // - It may require specifying regional endpoints when creating the service client as shown in
337+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
311338
* try (SpeechClient speechClient = SpeechClient.create()) {
312339
* LongRunningRecognizeRequest request =
313340
* LongRunningRecognizeRequest.newBuilder()
@@ -337,8 +364,11 @@ public final UnaryCallable<RecognizeRequest, RecognizeResponse> recognizeCallabl
337364
* <p>Sample code:
338365
*
339366
* <pre>{@code
340-
* // This snippet has been automatically generated for illustrative purposes only.
341-
* // It may require modifications to work in your environment.
367+
* // This snippet has been automatically generated and should be regarded as a code template only.
368+
* // It will require modifications to work:
369+
* // - It may require correct/in-range values for request initialization.
370+
* // - It may require specifying regional endpoints when creating the service client as shown in
371+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
342372
* try (SpeechClient speechClient = SpeechClient.create()) {
343373
* LongRunningRecognizeRequest request =
344374
* LongRunningRecognizeRequest.newBuilder()
@@ -369,8 +399,11 @@ public final UnaryCallable<RecognizeRequest, RecognizeResponse> recognizeCallabl
369399
* <p>Sample code:
370400
*
371401
* <pre>{@code
372-
* // This snippet has been automatically generated for illustrative purposes only.
373-
* // It may require modifications to work in your environment.
402+
* // This snippet has been automatically generated and should be regarded as a code template only.
403+
* // It will require modifications to work:
404+
* // - It may require correct/in-range values for request initialization.
405+
* // - It may require specifying regional endpoints when creating the service client as shown in
406+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
374407
* try (SpeechClient speechClient = SpeechClient.create()) {
375408
* LongRunningRecognizeRequest request =
376409
* LongRunningRecognizeRequest.newBuilder()
@@ -397,8 +430,11 @@ public final UnaryCallable<RecognizeRequest, RecognizeResponse> recognizeCallabl
397430
* <p>Sample code:
398431
*
399432
* <pre>{@code
400-
* // This snippet has been automatically generated for illustrative purposes only.
401-
* // It may require modifications to work in your environment.
433+
* // This snippet has been automatically generated and should be regarded as a code template only.
434+
* // It will require modifications to work:
435+
* // - It may require correct/in-range values for request initialization.
436+
* // - It may require specifying regional endpoints when creating the service client as shown in
437+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
402438
* try (SpeechClient speechClient = SpeechClient.create()) {
403439
* BidiStream<StreamingRecognizeRequest, StreamingRecognizeResponse> bidiStream =
404440
* speechClient.streamingRecognizeCallable().call();

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/SpeechSettings.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@
5353
* <p>For example, to set the total timeout of recognize to 30 seconds:
5454
*
5555
* <pre>{@code
56-
* // This snippet has been automatically generated for illustrative purposes only.
57-
* // It may require modifications to work in your environment.
56+
* // This snippet has been automatically generated and should be regarded as a code template only.
57+
* // It will require modifications to work:
58+
* // - It may require correct/in-range values for request initialization.
59+
* // - It may require specifying regional endpoints when creating the service client as shown in
60+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5861
* SpeechSettings.Builder speechSettingsBuilder = SpeechSettings.newBuilder();
5962
* speechSettingsBuilder
6063
* .recognizeSettings()
6164
* .setRetrySettings(
62-
* speechSettingsBuilder
63-
* .recognizeSettings()
64-
* .getRetrySettings()
65-
* .toBuilder()
65+
* speechSettingsBuilder.recognizeSettings().getRetrySettings().toBuilder()
6666
* .setTotalTimeout(Duration.ofSeconds(30))
6767
* .build());
6868
* SpeechSettings speechSettings = speechSettingsBuilder.build();

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/package-info.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@
2626
* <p>Sample for SpeechClient:
2727
*
2828
* <pre>{@code
29-
* // This snippet has been automatically generated for illustrative purposes only.
30-
* // It may require modifications to work in your environment.
29+
* // This snippet has been automatically generated and should be regarded as a code template only.
30+
* // It will require modifications to work:
31+
* // - It may require correct/in-range values for request initialization.
32+
* // - It may require specifying regional endpoints when creating the service client as shown in
33+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3134
* try (SpeechClient speechClient = SpeechClient.create()) {
3235
* RecognitionConfig config = RecognitionConfig.newBuilder().build();
3336
* RecognitionAudio audio = RecognitionAudio.newBuilder().build();
@@ -42,8 +45,11 @@
4245
* <p>Sample for AdaptationClient:
4346
*
4447
* <pre>{@code
45-
* // This snippet has been automatically generated for illustrative purposes only.
46-
* // It may require modifications to work in your environment.
48+
* // This snippet has been automatically generated and should be regarded as a code template only.
49+
* // It will require modifications to work:
50+
* // - It may require correct/in-range values for request initialization.
51+
* // - It may require specifying regional endpoints when creating the service client as shown in
52+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4753
* try (AdaptationClient adaptationClient = AdaptationClient.create()) {
4854
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
4955
* PhraseSet phraseSet = PhraseSet.newBuilder().build();

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/stub/AdaptationStubSettings.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,16 @@
8585
* <p>For example, to set the total timeout of createPhraseSet to 30 seconds:
8686
*
8787
* <pre>{@code
88-
* // This snippet has been automatically generated for illustrative purposes only.
89-
* // It may require modifications to work in your environment.
88+
* // This snippet has been automatically generated and should be regarded as a code template only.
89+
* // It will require modifications to work:
90+
* // - It may require correct/in-range values for request initialization.
91+
* // - It may require specifying regional endpoints when creating the service client as shown in
92+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
9093
* AdaptationStubSettings.Builder adaptationSettingsBuilder = AdaptationStubSettings.newBuilder();
9194
* adaptationSettingsBuilder
9295
* .createPhraseSetSettings()
9396
* .setRetrySettings(
94-
* adaptationSettingsBuilder
95-
* .createPhraseSetSettings()
96-
* .getRetrySettings()
97-
* .toBuilder()
97+
* adaptationSettingsBuilder.createPhraseSetSettings().getRetrySettings().toBuilder()
9898
* .setTotalTimeout(Duration.ofSeconds(30))
9999
* .build());
100100
* AdaptationStubSettings adaptationSettings = adaptationSettingsBuilder.build();

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/stub/HttpJsonAdaptationStub.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public class HttpJsonAdaptationStub extends AdaptationStub {
9393
.setRequestBodyExtractor(
9494
request ->
9595
ProtoRestSerializer.create()
96-
.toBody("*", request.toBuilder().clearParent().build()))
96+
.toBody("*", request.toBuilder().clearParent().build(), false))
9797
.build())
9898
.setResponseParser(
9999
ProtoMessageResponseParser.<PhraseSet>newBuilder()
@@ -199,7 +199,7 @@ public class HttpJsonAdaptationStub extends AdaptationStub {
199199
.setRequestBodyExtractor(
200200
request ->
201201
ProtoRestSerializer.create()
202-
.toBody("phraseSet", request.getPhraseSet()))
202+
.toBody("phraseSet", request.getPhraseSet(), false))
203203
.build())
204204
.setResponseParser(
205205
ProtoMessageResponseParser.<PhraseSet>newBuilder()
@@ -268,7 +268,7 @@ public class HttpJsonAdaptationStub extends AdaptationStub {
268268
.setRequestBodyExtractor(
269269
request ->
270270
ProtoRestSerializer.create()
271-
.toBody("*", request.toBuilder().clearParent().build()))
271+
.toBody("*", request.toBuilder().clearParent().build(), false))
272272
.build())
273273
.setResponseParser(
274274
ProtoMessageResponseParser.<CustomClass>newBuilder()
@@ -374,7 +374,7 @@ public class HttpJsonAdaptationStub extends AdaptationStub {
374374
.setRequestBodyExtractor(
375375
request ->
376376
ProtoRestSerializer.create()
377-
.toBody("customClass", request.getCustomClass()))
377+
.toBody("customClass", request.getCustomClass(), false))
378378
.build())
379379
.setResponseParser(
380380
ProtoMessageResponseParser.<CustomClass>newBuilder()

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/stub/HttpJsonSpeechStub.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ public class HttpJsonSpeechStub extends SpeechStub {
8686
})
8787
.setRequestBodyExtractor(
8888
request ->
89-
ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
89+
ProtoRestSerializer.create()
90+
.toBody("*", request.toBuilder().build(), false))
9091
.build())
9192
.setResponseParser(
9293
ProtoMessageResponseParser.<RecognizeResponse>newBuilder()
@@ -120,7 +121,8 @@ public class HttpJsonSpeechStub extends SpeechStub {
120121
})
121122
.setRequestBodyExtractor(
122123
request ->
123-
ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
124+
ProtoRestSerializer.create()
125+
.toBody("*", request.toBuilder().build(), false))
124126
.build())
125127
.setResponseParser(
126128
ProtoMessageResponseParser.<Operation>newBuilder()

google-cloud-speech/src/main/java/com/google/cloud/speech/v1/stub/SpeechStubSettings.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@
7474
* <p>For example, to set the total timeout of recognize to 30 seconds:
7575
*
7676
* <pre>{@code
77-
* // This snippet has been automatically generated for illustrative purposes only.
78-
* // It may require modifications to work in your environment.
77+
* // This snippet has been automatically generated and should be regarded as a code template only.
78+
* // It will require modifications to work:
79+
* // - It may require correct/in-range values for request initialization.
80+
* // - It may require specifying regional endpoints when creating the service client as shown in
81+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7982
* SpeechStubSettings.Builder speechSettingsBuilder = SpeechStubSettings.newBuilder();
8083
* speechSettingsBuilder
8184
* .recognizeSettings()
8285
* .setRetrySettings(
83-
* speechSettingsBuilder
84-
* .recognizeSettings()
85-
* .getRetrySettings()
86-
* .toBuilder()
86+
* speechSettingsBuilder.recognizeSettings().getRetrySettings().toBuilder()
8787
* .setTotalTimeout(Duration.ofSeconds(30))
8888
* .build());
8989
* SpeechStubSettings speechSettings = speechSettingsBuilder.build();

0 commit comments

Comments
 (0)