Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f0d6cc8

Browse filesBrowse files
docs: [vision] update comments for image annotator OCR models (#8388)
* docs: update comments for image annotator OCR models PiperOrigin-RevId: 474070246 Source-Link: googleapis/googleapis@346e2f2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/50b34515fa89525989021be4b6989d49059d8d26 Copy-Tag: eyJwIjoiamF2YS12aXNpb24vLk93bEJvdC55YW1sIiwiaCI6IjUwYjM0NTE1ZmE4OTUyNTk4OTAyMWJlNGI2OTg5ZDQ5MDU5ZDhkMjYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent f5953b7 commit f0d6cc8
Copy full SHA for f0d6cc8

File tree

Expand file treeCollapse file tree

411 files changed

+4185
-2170
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

411 files changed

+4185
-2170
lines changed

‎java-vision/README.md

Copy file name to clipboardExpand all lines: java-vision/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>libraries-bom</artifactId>
22-
<version>26.0.0</version>
22+
<version>26.1.1</version>
2323
<type>pom</type>
2424
<scope>import</scope>
2525
</dependency>
@@ -50,7 +50,7 @@ If you are using Maven without BOM, add this to your dependencies:
5050
If you are using Gradle 5.x or later, add this to your dependencies:
5151

5252
```Groovy
53-
implementation platform('com.google.cloud:libraries-bom:26.1.0')
53+
implementation platform('com.google.cloud:libraries-bom:26.1.1')
5454
5555
implementation 'com.google.cloud:google-cloud-vision'
5656
```

‎java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorClient.java
+90-36Lines changed: 90 additions & 36 deletions
Large diffs are not rendered by default.

‎java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ImageAnnotatorSettings.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,11 @@
5252
* <p>For example, to set the total timeout of batchAnnotateImages to 30 seconds:
5353
*
5454
* <pre>{@code
55-
* // This snippet has been automatically generated for illustrative purposes only.
56-
* // It may require modifications to work in your environment.
55+
* // This snippet has been automatically generated and should be regarded as a code template only.
56+
* // It will require modifications to work:
57+
* // - It may require correct/in-range values for request initialization.
58+
* // - It may require specifying regional endpoints when creating the service client as shown in
59+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5760
* ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
5861
* ImageAnnotatorSettings.newBuilder();
5962
* imageAnnotatorSettingsBuilder

‎java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchClient.java
+440-176Lines changed: 440 additions & 176 deletions
Large diffs are not rendered by default.

‎java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/ProductSearchSettings.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@
5959
* <p>For example, to set the total timeout of createProductSet to 30 seconds:
6060
*
6161
* <pre>{@code
62-
* // This snippet has been automatically generated for illustrative purposes only.
63-
* // It may require modifications to work in your environment.
62+
* // This snippet has been automatically generated and should be regarded as a code template only.
63+
* // It will require modifications to work:
64+
* // - It may require correct/in-range values for request initialization.
65+
* // - It may require specifying regional endpoints when creating the service client as shown in
66+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6467
* ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
6568
* productSearchSettingsBuilder
6669
* .createProductSetSettings()
6770
* .setRetrySettings(
68-
* productSearchSettingsBuilder
69-
* .createProductSetSettings()
70-
* .getRetrySettings()
71-
* .toBuilder()
71+
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
7272
* .setTotalTimeout(Duration.ofSeconds(30))
7373
* .build());
7474
* ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();

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

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/package-info.java
+10-4Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@
2828
* <p>Sample for ImageAnnotatorClient:
2929
*
3030
* <pre>{@code
31-
* // This snippet has been automatically generated for illustrative purposes only.
32-
* // It may require modifications to work in your environment.
31+
* // This snippet has been automatically generated and should be regarded as a code template only.
32+
* // It will require modifications to work:
33+
* // - It may require correct/in-range values for request initialization.
34+
* // - It may require specifying regional endpoints when creating the service client as shown in
35+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3336
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
3437
* List<AnnotateImageRequest> requests = new ArrayList<>();
3538
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -57,8 +60,11 @@
5760
* <p>Sample for ProductSearchClient:
5861
*
5962
* <pre>{@code
60-
* // This snippet has been automatically generated for illustrative purposes only.
61-
* // It may require modifications to work in your environment.
63+
* // This snippet has been automatically generated and should be regarded as a code template only.
64+
* // It will require modifications to work:
65+
* // - It may require correct/in-range values for request initialization.
66+
* // - It may require specifying regional endpoints when creating the service client as shown in
67+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
6268
* try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
6369
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
6470
* ProductSet productSet = ProductSet.newBuilder().build();

‎java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonImageAnnotatorStub.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
9696
.setRequestBodyExtractor(
9797
request ->
9898
ProtoRestSerializer.create()
99-
.toBody("*", request.toBuilder().clearParent().build()))
99+
.toBody("*", request.toBuilder().clearParent().build(), false))
100100
.build())
101101
.setResponseParser(
102102
ProtoMessageResponseParser.<BatchAnnotateImagesResponse>newBuilder()
@@ -135,7 +135,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
135135
.setRequestBodyExtractor(
136136
request ->
137137
ProtoRestSerializer.create()
138-
.toBody("*", request.toBuilder().clearParent().build()))
138+
.toBody("*", request.toBuilder().clearParent().build(), false))
139139
.build())
140140
.setResponseParser(
141141
ProtoMessageResponseParser.<BatchAnnotateFilesResponse>newBuilder()
@@ -174,7 +174,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
174174
.setRequestBodyExtractor(
175175
request ->
176176
ProtoRestSerializer.create()
177-
.toBody("*", request.toBuilder().clearParent().build()))
177+
.toBody("*", request.toBuilder().clearParent().build(), false))
178178
.build())
179179
.setResponseParser(
180180
ProtoMessageResponseParser.<Operation>newBuilder()
@@ -216,7 +216,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
216216
.setRequestBodyExtractor(
217217
request ->
218218
ProtoRestSerializer.create()
219-
.toBody("*", request.toBuilder().clearParent().build()))
219+
.toBody("*", request.toBuilder().clearParent().build(), false))
220220
.build())
221221
.setResponseParser(
222222
ProtoMessageResponseParser.<Operation>newBuilder()

‎java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/HttpJsonProductSearchStub.java
+11-9Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
120120
.setRequestBodyExtractor(
121121
request ->
122122
ProtoRestSerializer.create()
123-
.toBody("productSet", request.getProductSet()))
123+
.toBody("productSet", request.getProductSet(), false))
124124
.build())
125125
.setResponseParser(
126126
ProtoMessageResponseParser.<ProductSet>newBuilder()
@@ -226,7 +226,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
226226
.setRequestBodyExtractor(
227227
request ->
228228
ProtoRestSerializer.create()
229-
.toBody("productSet", request.getProductSet()))
229+
.toBody("productSet", request.getProductSet(), false))
230230
.build())
231231
.setResponseParser(
232232
ProtoMessageResponseParser.<ProductSet>newBuilder()
@@ -295,7 +295,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
295295
})
296296
.setRequestBodyExtractor(
297297
request ->
298-
ProtoRestSerializer.create().toBody("product", request.getProduct()))
298+
ProtoRestSerializer.create()
299+
.toBody("product", request.getProduct(), false))
299300
.build())
300301
.setResponseParser(
301302
ProtoMessageResponseParser.<Product>newBuilder()
@@ -399,7 +400,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
399400
})
400401
.setRequestBodyExtractor(
401402
request ->
402-
ProtoRestSerializer.create().toBody("product", request.getProduct()))
403+
ProtoRestSerializer.create()
404+
.toBody("product", request.getProduct(), false))
403405
.build())
404406
.setResponseParser(
405407
ProtoMessageResponseParser.<Product>newBuilder()
@@ -470,7 +472,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
470472
.setRequestBodyExtractor(
471473
request ->
472474
ProtoRestSerializer.create()
473-
.toBody("referenceImage", request.getReferenceImage()))
475+
.toBody("referenceImage", request.getReferenceImage(), false))
474476
.build())
475477
.setResponseParser(
476478
ProtoMessageResponseParser.<ReferenceImage>newBuilder()
@@ -607,7 +609,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
607609
.setRequestBodyExtractor(
608610
request ->
609611
ProtoRestSerializer.create()
610-
.toBody("*", request.toBuilder().clearName().build()))
612+
.toBody("*", request.toBuilder().clearName().build(), false))
611613
.build())
612614
.setResponseParser(
613615
ProtoMessageResponseParser.<Empty>newBuilder()
@@ -643,7 +645,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
643645
.setRequestBodyExtractor(
644646
request ->
645647
ProtoRestSerializer.create()
646-
.toBody("*", request.toBuilder().clearName().build()))
648+
.toBody("*", request.toBuilder().clearName().build(), false))
647649
.build())
648650
.setResponseParser(
649651
ProtoMessageResponseParser.<Empty>newBuilder()
@@ -716,7 +718,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
716718
.setRequestBodyExtractor(
717719
request ->
718720
ProtoRestSerializer.create()
719-
.toBody("*", request.toBuilder().clearParent().build()))
721+
.toBody("*", request.toBuilder().clearParent().build(), false))
720722
.build())
721723
.setResponseParser(
722724
ProtoMessageResponseParser.<Operation>newBuilder()
@@ -755,7 +757,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
755757
.setRequestBodyExtractor(
756758
request ->
757759
ProtoRestSerializer.create()
758-
.toBody("*", request.toBuilder().clearParent().build()))
760+
.toBody("*", request.toBuilder().clearParent().build(), false))
759761
.build())
760762
.setResponseParser(
761763
ProtoMessageResponseParser.<Operation>newBuilder()

‎java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ImageAnnotatorStubSettings.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@
7575
* <p>For example, to set the total timeout of batchAnnotateImages to 30 seconds:
7676
*
7777
* <pre>{@code
78-
* // This snippet has been automatically generated for illustrative purposes only.
79-
* // It may require modifications to work in your environment.
78+
* // This snippet has been automatically generated and should be regarded as a code template only.
79+
* // It will require modifications to work:
80+
* // - It may require correct/in-range values for request initialization.
81+
* // - It may require specifying regional endpoints when creating the service client as shown in
82+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
8083
* ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
8184
* ImageAnnotatorStubSettings.newBuilder();
8285
* imageAnnotatorSettingsBuilder

‎java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1/stub/ProductSearchStubSettings.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,17 @@
107107
* <p>For example, to set the total timeout of createProductSet to 30 seconds:
108108
*
109109
* <pre>{@code
110-
* // This snippet has been automatically generated for illustrative purposes only.
111-
* // 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
112115
* ProductSearchStubSettings.Builder productSearchSettingsBuilder =
113116
* ProductSearchStubSettings.newBuilder();
114117
* productSearchSettingsBuilder
115118
* .createProductSetSettings()
116119
* .setRetrySettings(
117-
* productSearchSettingsBuilder
118-
* .createProductSetSettings()
119-
* .getRetrySettings()
120-
* .toBuilder()
120+
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
121121
* .setTotalTimeout(Duration.ofSeconds(30))
122122
* .build());
123123
* ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();

‎java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java

Copy file name to clipboardExpand all lines: java-vision/google-cloud-vision/src/main/java/com/google/cloud/vision/v1p1beta1/ImageAnnotatorClient.java
+35-14Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@
3636
* calls that map to API methods. Sample code to get started:
3737
*
3838
* <pre>{@code
39-
* // This snippet has been automatically generated for illustrative purposes only.
40-
* // It may require modifications to work in your environment.
39+
* // This snippet has been automatically generated and should be regarded as a code template only.
40+
* // It will require modifications to work:
41+
* // - It may require correct/in-range values for request initialization.
42+
* // - It may require specifying regional endpoints when creating the service client as shown in
43+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4144
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
4245
* List<AnnotateImageRequest> requests = new ArrayList<>();
4346
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -73,8 +76,11 @@
7376
* <p>To customize credentials:
7477
*
7578
* <pre>{@code
76-
* // This snippet has been automatically generated for illustrative purposes only.
77-
* // It may require modifications to work in your environment.
79+
* // This snippet has been automatically generated and should be regarded as a code template only.
80+
* // It will require modifications to work:
81+
* // - It may require correct/in-range values for request initialization.
82+
* // - It may require specifying regional endpoints when creating the service client as shown in
83+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
7884
* ImageAnnotatorSettings imageAnnotatorSettings =
7985
* ImageAnnotatorSettings.newBuilder()
8086
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -85,8 +91,11 @@
8591
* <p>To customize the endpoint:
8692
*
8793
* <pre>{@code
88-
* // This snippet has been automatically generated for illustrative purposes only.
89-
* // It may require modifications to work in your environment.
94+
* // This snippet has been automatically generated and should be regarded as a code template only.
95+
* // It will require modifications to work:
96+
* // - It may require correct/in-range values for request initialization.
97+
* // - It may require specifying regional endpoints when creating the service client as shown in
98+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
9099
* ImageAnnotatorSettings imageAnnotatorSettings =
91100
* ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
92101
* ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
@@ -96,8 +105,11 @@
96105
* the wire:
97106
*
98107
* <pre>{@code
99-
* // This snippet has been automatically generated for illustrative purposes only.
100-
* // It may require modifications to work in your environment.
108+
* // This snippet has been automatically generated and should be regarded as a code template only.
109+
* // It will require modifications to work:
110+
* // - It may require correct/in-range values for request initialization.
111+
* // - It may require specifying regional endpoints when creating the service client as shown in
112+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
101113
* ImageAnnotatorSettings imageAnnotatorSettings =
102114
* ImageAnnotatorSettings.newBuilder()
103115
* .setTransportChannelProvider(
@@ -166,8 +178,11 @@ public ImageAnnotatorStub getStub() {
166178
* <p>Sample code:
167179
*
168180
* <pre>{@code
169-
* // This snippet has been automatically generated for illustrative purposes only.
170-
* // It may require modifications to work in your environment.
181+
* // This snippet has been automatically generated and should be regarded as a code template only.
182+
* // It will require modifications to work:
183+
* // - It may require correct/in-range values for request initialization.
184+
* // - It may require specifying regional endpoints when creating the service client as shown in
185+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
171186
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
172187
* List<AnnotateImageRequest> requests = new ArrayList<>();
173188
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
@@ -191,8 +206,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(
191206
* <p>Sample code:
192207
*
193208
* <pre>{@code
194-
* // This snippet has been automatically generated for illustrative purposes only.
195-
* // It may require modifications to work in your environment.
209+
* // This snippet has been automatically generated and should be regarded as a code template only.
210+
* // It will require modifications to work:
211+
* // - It may require correct/in-range values for request initialization.
212+
* // - It may require specifying regional endpoints when creating the service client as shown in
213+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
196214
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
197215
* BatchAnnotateImagesRequest request =
198216
* BatchAnnotateImagesRequest.newBuilder()
@@ -216,8 +234,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
216234
* <p>Sample code:
217235
*
218236
* <pre>{@code
219-
* // This snippet has been automatically generated for illustrative purposes only.
220-
* // 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
221242
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
222243
* BatchAnnotateImagesRequest request =
223244
* BatchAnnotateImagesRequest.newBuilder()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.