Skip to content

Commit c55ee09

Browse files
fix!: BatchAnnotateImagesRequest.requests is required (#1011)
PiperOrigin-RevId: 446836546 Source-Link: googleapis/googleapis@ca17771 Source-Link: googleapis/googleapis-gen@2957b3d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjk1N2IzZDc4ZmMyNDM1NGIzMDg5NjkwN2RlMTM1NDEzYjhlN2E0OSJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md fix!: Product search related messages and enums changed in an incompatible way fix!: NormalizedBoundingPoly message removed PiperOrigin-RevId: 446837836 Source-Link: googleapis/googleapis@4c8ac5c Source-Link: googleapis/googleapis-gen@8f7398f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGY3Mzk4ZmJkNzlhNGZiNmE0YWIxZjZhMTQ1NDc4NTIxMjE5ODZmZCJ9
1 parent 7499bde commit c55ee09

16 files changed

+951
-1447
lines changed

packages/google-cloud-vision/protos/google/cloud/vision/v1/geometry.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-cloud-vision/protos/google/cloud/vision/v1/image_annotator.proto

+33-65
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -46,8 +46,7 @@ service ImageAnnotator {
4646
"https://www.googleapis.com/auth/cloud-vision";
4747

4848
// Run image detection and annotation for a batch of images.
49-
rpc BatchAnnotateImages(BatchAnnotateImagesRequest)
50-
returns (BatchAnnotateImagesResponse) {
49+
rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) {
5150
option (google.api.http) = {
5251
post: "/v1/images:annotate"
5352
body: "*"
@@ -70,8 +69,7 @@ service ImageAnnotator {
7069
// AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
7170
// file provided and perform detection and annotation for each image
7271
// extracted.
73-
rpc BatchAnnotateFiles(BatchAnnotateFilesRequest)
74-
returns (BatchAnnotateFilesResponse) {
72+
rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) returns (BatchAnnotateFilesResponse) {
7573
option (google.api.http) = {
7674
post: "/v1/files:annotate"
7775
body: "*"
@@ -96,8 +94,7 @@ service ImageAnnotator {
9694
//
9795
// This service will write image annotation outputs to json files in customer
9896
// GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
99-
rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest)
100-
returns (google.longrunning.Operation) {
97+
rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) returns (google.longrunning.Operation) {
10198
option (google.api.http) = {
10299
post: "/v1/images:asyncBatchAnnotate"
103100
body: "*"
@@ -123,8 +120,7 @@ service ImageAnnotator {
123120
// `google.longrunning.Operations` interface.
124121
// `Operation.metadata` contains `OperationMetadata` (metadata).
125122
// `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
126-
rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest)
127-
returns (google.longrunning.Operation) {
123+
rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) {
128124
option (google.api.http) = {
129125
post: "/v1/files:asyncBatchAnnotate"
130126
body: "*"
@@ -145,6 +141,28 @@ service ImageAnnotator {
145141
}
146142
}
147143

144+
// A bucketized representation of likelihood, which is intended to give clients
145+
// highly stable results across model upgrades.
146+
enum Likelihood {
147+
// Unknown likelihood.
148+
UNKNOWN = 0;
149+
150+
// It is very unlikely.
151+
VERY_UNLIKELY = 1;
152+
153+
// It is unlikely.
154+
UNLIKELY = 2;
155+
156+
// It is possible.
157+
POSSIBLE = 3;
158+
159+
// It is likely.
160+
LIKELY = 4;
161+
162+
// It is very likely.
163+
VERY_LIKELY = 5;
164+
}
165+
148166
// The type of Google Cloud Vision API detection to perform, and the maximum
149167
// number of results to return for that type. Multiple `Feature` objects can
150168
// be specified in the `features` list.
@@ -255,28 +273,6 @@ message Image {
255273
ImageSource source = 2;
256274
}
257275

258-
// A bucketized representation of likelihood, which is intended to give clients
259-
// highly stable results across model upgrades.
260-
enum Likelihood {
261-
// Unknown likelihood.
262-
UNKNOWN = 0;
263-
264-
// It is very unlikely.
265-
VERY_UNLIKELY = 1;
266-
267-
// It is unlikely.
268-
UNLIKELY = 2;
269-
270-
// It is possible.
271-
POSSIBLE = 3;
272-
273-
// It is likely.
274-
LIKELY = 4;
275-
276-
// It is very likely.
277-
VERY_LIKELY = 5;
278-
}
279-
280276
// A face annotation object contains the results of face detection.
281277
message FaceAnnotation {
282278
// A face-specific landmark (for example, a face feature).
@@ -577,30 +573,6 @@ message SafeSearchAnnotation {
577573
// covered nudity, lewd or provocative poses, or close-ups of sensitive
578574
// body areas.
579575
Likelihood racy = 9;
580-
581-
// Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
582-
// very confident.
583-
float adult_confidence = 16 [deprecated = true];
584-
585-
// Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
586-
// very confident.
587-
float spoof_confidence = 18 [deprecated = true];
588-
589-
// Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
590-
// very confident.
591-
float medical_confidence = 20 [deprecated = true];
592-
593-
// Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
594-
// very confident.
595-
float violence_confidence = 22 [deprecated = true];
596-
597-
// Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
598-
// confident.
599-
float racy_confidence = 24 [deprecated = true];
600-
601-
// Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
602-
// confident.
603-
float nsfw_confidence = 26 [deprecated = true];
604576
}
605577

606578
// Rectangle determined by min and max `LatLng` pairs.
@@ -791,8 +763,7 @@ message AnnotateImageResponse {
791763
// Multiple image annotation requests are batched into a single service call.
792764
message BatchAnnotateImagesRequest {
793765
// Required. Individual image annotation requests for this batch.
794-
repeated AnnotateImageRequest requests = 1
795-
[(google.api.field_behavior) = REQUIRED];
766+
repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
796767

797768
// Optional. Target project and location to make a call.
798769
//
@@ -863,10 +834,9 @@ message AnnotateFileResponse {
863834

864835
// A list of requests to annotate files using the BatchAnnotateFiles API.
865836
message BatchAnnotateFilesRequest {
866-
// Required. The list of file annotation requests. Right now we support only
867-
// one AnnotateFileRequest in BatchAnnotateFilesRequest.
868-
repeated AnnotateFileRequest requests = 1
869-
[(google.api.field_behavior) = REQUIRED];
837+
// Required. The list of file annotation requests. Right now we support only one
838+
// AnnotateFileRequest in BatchAnnotateFilesRequest.
839+
repeated AnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
870840

871841
// Optional. Target project and location to make a call.
872842
//
@@ -914,8 +884,7 @@ message AsyncAnnotateFileResponse {
914884
// Request for async image annotation for a list of images.
915885
message AsyncBatchAnnotateImagesRequest {
916886
// Required. Individual image annotation requests for this batch.
917-
repeated AnnotateImageRequest requests = 1
918-
[(google.api.field_behavior) = REQUIRED];
887+
repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
919888

920889
// Required. The desired output location and metadata (e.g. format).
921890
OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED];
@@ -945,8 +914,7 @@ message AsyncBatchAnnotateImagesResponse {
945914
// call.
946915
message AsyncBatchAnnotateFilesRequest {
947916
// Required. Individual async file annotation requests for this batch.
948-
repeated AsyncAnnotateFileRequest requests = 1
949-
[(google.api.field_behavior) = REQUIRED];
917+
repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
950918

951919
// Optional. Target project and location to make a call.
952920
//

packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-cloud-vision/protos/google/cloud/vision/v1/product_search_service.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-cloud-vision/protos/google/cloud/vision/v1/text_annotation.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-cloud-vision/protos/google/cloud/vision/v1/web_detection.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-cloud-vision/protos/google/cloud/vision/v1p3beta1/geometry.proto

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018 Google Inc.
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -16,13 +16,12 @@ syntax = "proto3";
1616

1717
package google.cloud.vision.v1p3beta1;
1818

19-
import "google/api/annotations.proto";
20-
2119
option cc_enable_arenas = true;
2220
option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
2321
option java_multiple_files = true;
2422
option java_outer_classname = "GeometryProto";
2523
option java_package = "com.google.cloud.vision.v1p3beta1";
24+
option objc_class_prefix = "GCVN";
2625

2726
// A vertex represents a 2D point in the image.
2827
// NOTE: the vertex coordinates are in the same scale as the original image.
@@ -54,12 +53,6 @@ message BoundingPoly {
5453
repeated NormalizedVertex normalized_vertices = 2;
5554
}
5655

57-
// A normalized bounding polygon around a portion of an image.
58-
message NormalizedBoundingPoly {
59-
// Normalized vertices of the bounding polygon.
60-
repeated NormalizedVertex vertices = 1;
61-
}
62-
6356
// A 3D position in the image, used primarily for Face detection landmarks.
6457
// A valid Position must have both x and y coordinates.
6558
// The position coordinates are in the same scale as the original image.

packages/google-cloud-vision/protos/google/cloud/vision/v1p3beta1/image_annotator.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ message AnnotateFileResponse {
677677
// Multiple image annotation requests are batched into a single service call.
678678
message BatchAnnotateImagesRequest {
679679
// Individual image annotation requests for this batch.
680-
repeated AnnotateImageRequest requests = 1;
680+
repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
681681
}
682682

683683
// Response to a batch image annotation request.

0 commit comments

Comments
 (0)