Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions java-vision/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.0.0</version>
<version>26.1.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -50,7 +50,7 @@ If you are using Maven without BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.1.0')
implementation platform('com.google.cloud:libraries-bom:26.1.1')
implementation 'com.google.cloud:google-cloud-vision'
```
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@
* <p>For example, to set the total timeout of batchAnnotateImages to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* ImageAnnotatorSettings.Builder imageAnnotatorSettingsBuilder =
* ImageAnnotatorSettings.newBuilder();
* imageAnnotatorSettingsBuilder
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
* <p>For example, to set the total timeout of createProductSet to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* ProductSearchSettings.Builder productSearchSettingsBuilder = ProductSearchSettings.newBuilder();
* productSearchSettingsBuilder
* .createProductSetSettings()
* .setRetrySettings(
* productSearchSettingsBuilder
* .createProductSetSettings()
* .getRetrySettings()
* .toBuilder()
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ProductSearchSettings productSearchSettings = productSearchSettingsBuilder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
* <p>Sample for ImageAnnotatorClient:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* List<AnnotateImageRequest> requests = new ArrayList<>();
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
Expand Down Expand Up @@ -57,8 +60,11 @@
* <p>Sample for ProductSearchClient:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ProductSearchClient productSearchClient = ProductSearchClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* ProductSet productSet = ProductSet.newBuilder().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build()))
.toBody("*", request.toBuilder().clearParent().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<BatchAnnotateImagesResponse>newBuilder()
Expand Down Expand Up @@ -135,7 +135,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build()))
.toBody("*", request.toBuilder().clearParent().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<BatchAnnotateFilesResponse>newBuilder()
Expand Down Expand Up @@ -174,7 +174,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build()))
.toBody("*", request.toBuilder().clearParent().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Operation>newBuilder()
Expand Down Expand Up @@ -216,7 +216,7 @@ public class HttpJsonImageAnnotatorStub extends ImageAnnotatorStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build()))
.toBody("*", request.toBuilder().clearParent().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Operation>newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("productSet", request.getProductSet()))
.toBody("productSet", request.getProductSet(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<ProductSet>newBuilder()
Expand Down Expand Up @@ -226,7 +226,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("productSet", request.getProductSet()))
.toBody("productSet", request.getProductSet(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<ProductSet>newBuilder()
Expand Down Expand Up @@ -295,7 +295,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create().toBody("product", request.getProduct()))
ProtoRestSerializer.create()
.toBody("product", request.getProduct(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Product>newBuilder()
Expand Down Expand Up @@ -399,7 +400,8 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
})
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create().toBody("product", request.getProduct()))
ProtoRestSerializer.create()
.toBody("product", request.getProduct(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Product>newBuilder()
Expand Down Expand Up @@ -470,7 +472,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("referenceImage", request.getReferenceImage()))
.toBody("referenceImage", request.getReferenceImage(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<ReferenceImage>newBuilder()
Expand Down Expand Up @@ -607,7 +609,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearName().build()))
.toBody("*", request.toBuilder().clearName().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Empty>newBuilder()
Expand Down Expand Up @@ -643,7 +645,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearName().build()))
.toBody("*", request.toBuilder().clearName().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Empty>newBuilder()
Expand Down Expand Up @@ -716,7 +718,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build()))
.toBody("*", request.toBuilder().clearParent().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Operation>newBuilder()
Expand Down Expand Up @@ -755,7 +757,7 @@ public class HttpJsonProductSearchStub extends ProductSearchStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build()))
.toBody("*", request.toBuilder().clearParent().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Operation>newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@
* <p>For example, to set the total timeout of batchAnnotateImages to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* ImageAnnotatorStubSettings.Builder imageAnnotatorSettingsBuilder =
* ImageAnnotatorStubSettings.newBuilder();
* imageAnnotatorSettingsBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,17 @@
* <p>For example, to set the total timeout of createProductSet to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* ProductSearchStubSettings.Builder productSearchSettingsBuilder =
* ProductSearchStubSettings.newBuilder();
* productSearchSettingsBuilder
* .createProductSetSettings()
* .setRetrySettings(
* productSearchSettingsBuilder
* .createProductSetSettings()
* .getRetrySettings()
* .toBuilder()
* productSearchSettingsBuilder.createProductSetSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ProductSearchStubSettings productSearchSettings = productSearchSettingsBuilder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@
* calls that map to API methods. Sample code to get started:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* List<AnnotateImageRequest> requests = new ArrayList<>();
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
Expand Down Expand Up @@ -73,8 +76,11 @@
* <p>To customize credentials:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* ImageAnnotatorSettings imageAnnotatorSettings =
* ImageAnnotatorSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
Expand All @@ -85,8 +91,11 @@
* <p>To customize the endpoint:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* ImageAnnotatorSettings imageAnnotatorSettings =
* ImageAnnotatorSettings.newBuilder().setEndpoint(myEndpoint).build();
* ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create(imageAnnotatorSettings);
Expand All @@ -96,8 +105,11 @@
* the wire:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* ImageAnnotatorSettings imageAnnotatorSettings =
* ImageAnnotatorSettings.newBuilder()
* .setTransportChannelProvider(
Expand Down Expand Up @@ -166,8 +178,11 @@ public ImageAnnotatorStub getStub() {
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* List<AnnotateImageRequest> requests = new ArrayList<>();
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
Expand All @@ -191,8 +206,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* BatchAnnotateImagesRequest request =
* BatchAnnotateImagesRequest.newBuilder()
Expand All @@ -216,8 +234,11 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* BatchAnnotateImagesRequest request =
* BatchAnnotateImagesRequest.newBuilder()
Expand Down
Loading