Skip to content

Commit ca17771

Browse files
Google APIscopybara-github
authored andcommitted
fix!: removed fields from SafeSearchAnnotation message
PiperOrigin-RevId: 446836546
1 parent f6bb255 commit ca17771

7 files changed

Lines changed: 56 additions & 86 deletions

File tree

google/cloud/vision/v1/BUILD.bazel

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# This file was automatically generated by BuildFileGenerator
2+
# https://github.com/googleapis/rules_gapic/tree/master/bazel
3+
4+
# Most of the manual changes to this file will be overwritten.
5+
# It's **only** allowed to change the following rule attribute values:
6+
# - names of *_gapic_assembly_* rules
7+
# - certain parameters of *_gapic_library rules, including but not limited to:
8+
# * extra_protoc_parameters
9+
# * extra_protoc_file_parameters
10+
# The complete list of preserved parameters can be found in the source code.
211

312
# This is an API workspace, having public visibility by default makes perfect sense.
413
package(default_visibility = ["//visibility:public"])
@@ -70,11 +79,13 @@ java_gapic_library(
7079
srcs = [":vision_proto_with_info"],
7180
gapic_yaml = "vision_gapic.yaml",
7281
grpc_service_config = "vision_grpc_service_config.json",
82+
service_yaml = "vision_v1.yaml",
7383
test_deps = [
7484
":vision_java_grpc",
7585
],
7686
deps = [
7787
":vision_java_proto",
88+
"//google/api:api_java_proto",
7889
],
7990
)
8091

@@ -128,6 +139,7 @@ go_gapic_library(
128139
srcs = [":vision_proto_with_info"],
129140
grpc_service_config = "vision_grpc_service_config.json",
130141
importpath = "cloud.google.com/go/vision/apiv1;vision",
142+
metadata = True,
131143
service_yaml = "vision_v1.yaml",
132144
deps = [
133145
":vision_go_proto",
@@ -149,6 +161,7 @@ go_gapic_assembly_pkg(
149161
name = "gapi-cloud-vision-v1-go",
150162
deps = [
151163
":vision_go_gapic",
164+
":vision_go_gapic_srcjar-metadata.srcjar",
152165
":vision_go_gapic_srcjar-test.srcjar",
153166
":vision_go_proto",
154167
],
@@ -167,8 +180,10 @@ py_gapic_library(
167180
name = "vision_py_gapic",
168181
srcs = [":vision_proto"],
169182
grpc_service_config = "vision_grpc_service_config.json",
183+
service_yaml = "vision_v1.yaml",
170184
)
171185

186+
# Open Source Packages
172187
py_gapic_assembly_pkg(
173188
name = "vision-v1-py",
174189
deps = [
@@ -201,7 +216,6 @@ php_grpc_library(
201216
php_gapic_library(
202217
name = "vision_php_gapic",
203218
srcs = [":vision_proto_with_info"],
204-
gapic_yaml = "vision_gapic.yaml",
205219
grpc_service_config = "vision_grpc_service_config.json",
206220
service_yaml = "vision_v1.yaml",
207221
deps = [
@@ -275,13 +289,13 @@ ruby_cloud_gapic_library(
275289
name = "vision_ruby_gapic",
276290
srcs = [":vision_proto_with_info"],
277291
extra_protoc_parameters = [
278-
"ruby-cloud-gem-name=google-cloud-vision-v1",
279-
"ruby-cloud-env-prefix=VISION",
280-
"ruby-cloud-product-url=https://cloud.google.com/vision",
281292
"ruby-cloud-api-id=vision.googleapis.com",
282293
"ruby-cloud-api-shortname=vision",
294+
"ruby-cloud-env-prefix=VISION",
295+
"ruby-cloud-gem-name=google-cloud-vision-v1",
283296
"ruby-cloud-generate-standalone-snippets=true",
284297
"ruby-cloud-generate-yardoc-snippets=true",
298+
"ruby-cloud-product-url=https://cloud.google.com/vision",
285299
],
286300
grpc_service_config = "vision_grpc_service_config.json",
287301
ruby_cloud_description = "Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.",
@@ -351,7 +365,6 @@ csharp_gapic_assembly_pkg(
351365
##############################################################################
352366
load(
353367
"@com_google_googleapis_imports//:imports.bzl",
354-
"cc_gapic_library",
355368
"cc_grpc_library",
356369
"cc_proto_library",
357370
)
@@ -364,17 +377,6 @@ cc_proto_library(
364377
cc_grpc_library(
365378
name = "vision_cc_grpc",
366379
srcs = [":vision_proto"],
367-
generate_mocks = True,
368380
grpc_only = True,
369381
deps = [":vision_cc_proto"],
370382
)
371-
372-
cc_gapic_library(
373-
name = "vision_cc_gapic",
374-
src = ":vision_proto_with_info",
375-
package = "google.cloud.vision.v1",
376-
deps = [
377-
":vision_cc_grpc",
378-
":vision_cc_proto",
379-
],
380-
)

google/cloud/vision/v1/geometry.proto

Lines changed: 1 addition & 1 deletion
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.

google/cloud/vision/v1/image_annotator.proto

Lines changed: 33 additions & 65 deletions
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
//

google/cloud/vision/v1/product_search.proto

Lines changed: 1 addition & 1 deletion
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.

google/cloud/vision/v1/product_search_service.proto

Lines changed: 1 addition & 1 deletion
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.

google/cloud/vision/v1/text_annotation.proto

Lines changed: 1 addition & 1 deletion
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.

google/cloud/vision/v1/web_detection.proto

Lines changed: 1 addition & 1 deletion
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.

0 commit comments

Comments
 (0)