Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
fix!: BatchAnnotateImagesRequest.requests is required (#1011)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 446836546
Source-Link: googleapis/googleapis@ca17771
Source-Link: https://github.com/googleapis/googleapis-gen/commit/2957b3d78fc24354b30896907de135413b8e7a49
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: https://github.com/googleapis/googleapis-gen/commit/8f7398fbd79a4fb6a4ab1f6a14547852121986fd
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGY3Mzk4ZmJkNzlhNGZiNmE0YWIxZjZhMTQ1NDc4NTIxMjE5ODZmZCJ9
  • Loading branch information
gcf-owl-bot[bot] authored May 9, 2022
1 parent bd45df5 commit 574f43e
Show file tree
Hide file tree
Showing 16 changed files with 951 additions and 1,447 deletions.
2 changes: 1 addition & 1 deletion protos/google/cloud/vision/v1/geometry.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
98 changes: 33 additions & 65 deletions protos/google/cloud/vision/v1/image_annotator.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -46,8 +46,7 @@ service ImageAnnotator {
"https://www.googleapis.com/auth/cloud-vision";

// Run image detection and annotation for a batch of images.
rpc BatchAnnotateImages(BatchAnnotateImagesRequest)
returns (BatchAnnotateImagesResponse) {
rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) {
option (google.api.http) = {
post: "/v1/images:annotate"
body: "*"
Expand All @@ -70,8 +69,7 @@ service ImageAnnotator {
// AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
// file provided and perform detection and annotation for each image
// extracted.
rpc BatchAnnotateFiles(BatchAnnotateFilesRequest)
returns (BatchAnnotateFilesResponse) {
rpc BatchAnnotateFiles(BatchAnnotateFilesRequest) returns (BatchAnnotateFilesResponse) {
option (google.api.http) = {
post: "/v1/files:annotate"
body: "*"
Expand All @@ -96,8 +94,7 @@ service ImageAnnotator {
//
// This service will write image annotation outputs to json files in customer
// GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest)
returns (google.longrunning.Operation) {
rpc AsyncBatchAnnotateImages(AsyncBatchAnnotateImagesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/images:asyncBatchAnnotate"
body: "*"
Expand All @@ -123,8 +120,7 @@ service ImageAnnotator {
// `google.longrunning.Operations` interface.
// `Operation.metadata` contains `OperationMetadata` (metadata).
// `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest)
returns (google.longrunning.Operation) {
rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/files:asyncBatchAnnotate"
body: "*"
Expand All @@ -145,6 +141,28 @@ service ImageAnnotator {
}
}

// A bucketized representation of likelihood, which is intended to give clients
// highly stable results across model upgrades.
enum Likelihood {
// Unknown likelihood.
UNKNOWN = 0;

// It is very unlikely.
VERY_UNLIKELY = 1;

// It is unlikely.
UNLIKELY = 2;

// It is possible.
POSSIBLE = 3;

// It is likely.
LIKELY = 4;

// It is very likely.
VERY_LIKELY = 5;
}

// The type of Google Cloud Vision API detection to perform, and the maximum
// number of results to return for that type. Multiple `Feature` objects can
// be specified in the `features` list.
Expand Down Expand Up @@ -255,28 +273,6 @@ message Image {
ImageSource source = 2;
}

// A bucketized representation of likelihood, which is intended to give clients
// highly stable results across model upgrades.
enum Likelihood {
// Unknown likelihood.
UNKNOWN = 0;

// It is very unlikely.
VERY_UNLIKELY = 1;

// It is unlikely.
UNLIKELY = 2;

// It is possible.
POSSIBLE = 3;

// It is likely.
LIKELY = 4;

// It is very likely.
VERY_LIKELY = 5;
}

// A face annotation object contains the results of face detection.
message FaceAnnotation {
// A face-specific landmark (for example, a face feature).
Expand Down Expand Up @@ -577,30 +573,6 @@ message SafeSearchAnnotation {
// covered nudity, lewd or provocative poses, or close-ups of sensitive
// body areas.
Likelihood racy = 9;

// Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
// very confident.
float adult_confidence = 16 [deprecated = true];

// Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
// very confident.
float spoof_confidence = 18 [deprecated = true];

// Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
// very confident.
float medical_confidence = 20 [deprecated = true];

// Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
// very confident.
float violence_confidence = 22 [deprecated = true];

// Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
// confident.
float racy_confidence = 24 [deprecated = true];

// Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
// confident.
float nsfw_confidence = 26 [deprecated = true];
}

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

// Optional. Target project and location to make a call.
//
Expand Down Expand Up @@ -863,10 +834,9 @@ message AnnotateFileResponse {

// A list of requests to annotate files using the BatchAnnotateFiles API.
message BatchAnnotateFilesRequest {
// Required. The list of file annotation requests. Right now we support only
// one AnnotateFileRequest in BatchAnnotateFilesRequest.
repeated AnnotateFileRequest requests = 1
[(google.api.field_behavior) = REQUIRED];
// Required. The list of file annotation requests. Right now we support only one
// AnnotateFileRequest in BatchAnnotateFilesRequest.
repeated AnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED];

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

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

// Optional. Target project and location to make a call.
//
Expand Down
2 changes: 1 addition & 1 deletion protos/google/cloud/vision/v1/product_search.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion protos/google/cloud/vision/v1/product_search_service.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion protos/google/cloud/vision/v1/text_annotation.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion protos/google/cloud/vision/v1/web_detection.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
11 changes: 2 additions & 9 deletions protos/google/cloud/vision/v1p3beta1/geometry.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 Google Inc.
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -16,13 +16,12 @@ syntax = "proto3";

package google.cloud.vision.v1p3beta1;

import "google/api/annotations.proto";

option cc_enable_arenas = true;
option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision";
option java_multiple_files = true;
option java_outer_classname = "GeometryProto";
option java_package = "com.google.cloud.vision.v1p3beta1";
option objc_class_prefix = "GCVN";

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

// A normalized bounding polygon around a portion of an image.
message NormalizedBoundingPoly {
// Normalized vertices of the bounding polygon.
repeated NormalizedVertex vertices = 1;
}

// A 3D position in the image, used primarily for Face detection landmarks.
// A valid Position must have both x and y coordinates.
// The position coordinates are in the same scale as the original image.
Expand Down
2 changes: 1 addition & 1 deletion protos/google/cloud/vision/v1p3beta1/image_annotator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ message AnnotateFileResponse {
// Multiple image annotation requests are batched into a single service call.
message BatchAnnotateImagesRequest {
// Individual image annotation requests for this batch.
repeated AnnotateImageRequest requests = 1;
repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED];
}

// Response to a batch image annotation request.
Expand Down
Loading

0 comments on commit 574f43e

Please sign in to comment.