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

Commit b966ca5

Browse files
feat(v1p3beta1,v1p4beta): breaking resource name changes (#133)
* chore!: enable gapicv2 for vision/v1p3beta API BREAKING CHANGE: The breaking changes are as follows. After discussion please see this PR, these seem to be acceptable given that this is a beta API. com.google.cloud.vision.v1p4beta1.ProductSearchClient: Parameter 2 of 'public void addProductToProductSet(com.google.cloud.vision.v1p4beta1.ProductSetName, java.lang.String)' has changed its type to com.google.cloud.vision.v1p4beta1.ProductName com.google.cloud.vision.v1p4beta1.ProductSearchClient: Parameter 2 of 'public void removeProductFromProductSet(com.google.cloud.vision.v1p4beta1.ProductSetName, java.lang.String)' has changed its type to com.google.cloud.vision.v1p4beta1.ProductName Committer: @miraleung PiperOrigin-RevId: 309787157 Source-Author: Google APIs <noreply@google.com> Source-Date: Mon May 4 11:38:06 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: ab3468cf63abc521be76c9eceb620d61c5ddd76a Source-Link: googleapis/googleapis@ab3468c * chore!: enable gapicv2 for vision/v1p4beta API BREAKING CHANGE: The breaking changes are as follows. After discussion please see [this PR](googleapis/gapic-generator#3177), these seem to be acceptable given that this is a beta API. com.google.cloud.vision.v1p4beta1.ProductSearchClient: Method 'public com.google.longrunning.Operation purgeProducts(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest)' has been removed - This is because this method was not generating with the same LRO interface that all other configured RPCs receive. com.google.cloud.vision.v1p4beta1.ProductSearchClient: Parameter 2 of 'public void addProductToProductSet(com.google.cloud.vision.v1p4beta1.ProductSetName, java.lang.String)' has changed its type to com.google.cloud.vision.v1p4beta1.ProductName com.google.cloud.vision.v1p4beta1.ProductSearchClient: Parameter 2 of 'public void removeProductFromProductSet(com.google.cloud.vision.v1p4beta1.ProductSetName, java.lang.String)' has changed its type to com.google.cloud.vision.v1p4beta1.ProductName Committer: @miraleung PiperOrigin-RevId: 309788146 Source-Author: Google APIs <noreply@google.com> Source-Date: Mon May 4 11:42:36 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: a737a68e214d1cf927457c996b73e2600b14a949 Source-Link: googleapis/googleapis@a737a68 * chore: allow breaking resource names to beta clients Co-authored-by: Jeff Ching <chingor@google.com>
1 parent 0903c75 commit b966ca5

18 files changed

Lines changed: 2604 additions & 2394 deletions
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
3+
<differences>
4+
<difference>
5+
<differenceType>7005</differenceType>
6+
<className>com/google/cloud/vision/v1p3beta1/ProductSearchClient</className>
7+
<method>void *ProductSet(com.google.cloud.vision.v1p3beta1.ProductSetName, java.lang.String)</method>
8+
<to>void *ProductSet(com.google.cloud.vision.v1p3beta1.ProductSetName, com.google.cloud.vision.v1p3beta1.ProductName)</to>
9+
</difference>
10+
<difference>
11+
<differenceType>7005</differenceType>
12+
<className>com/google/cloud/vision/v1p4beta1/ProductSearchClient</className>
13+
<method>void *ProductSet(com.google.cloud.vision.v1p4beta1.ProductSetName, java.lang.String)</method>
14+
<to>void *ProductSet(com.google.cloud.vision.v1p4beta1.ProductSetName, com.google.cloud.vision.v1p4beta1.ProductName)</to>
15+
</difference>
16+
<difference>
17+
<differenceType>7002</differenceType>
18+
<className>com/google/cloud/vision/v1p4beta1/ProductSearchClient</className>
19+
<method>com.google.longrunning.Operation purgeProducts(com.google.cloud.vision.v1p4beta1.PurgeProductsRequest)</method>
20+
</difference>
21+
</differences>

google-cloud-vision/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotatorClient.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,7 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(
195195
*
196196
* <pre><code>
197197
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
198-
* List&lt;AnnotateImageRequest&gt; requests = new ArrayList&lt;&gt;();
199-
* BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder()
200-
* .addAllRequests(requests)
201-
* .build();
198+
* BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder().build();
202199
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
203200
* }
204201
* </code></pre>
@@ -218,10 +215,7 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
218215
*
219216
* <pre><code>
220217
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
221-
* List&lt;AnnotateImageRequest&gt; requests = new ArrayList&lt;&gt;();
222-
* BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder()
223-
* .addAllRequests(requests)
224-
* .build();
218+
* BatchAnnotateImagesRequest request = BatchAnnotateImagesRequest.newBuilder().build();
225219
* ApiFuture&lt;BatchAnnotateImagesResponse&gt; future = imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
226220
* // Do something
227221
* BatchAnnotateImagesResponse response = future.get();

0 commit comments

Comments
 (0)