google-cloud-vision-v1p4beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +139 -0
  6. data/lib/google/cloud/vision/v1p4beta1/face_pb.rb +35 -0
  7. data/lib/google/cloud/vision/v1p4beta1/geometry_pb.rb +40 -0
  8. data/lib/google/cloud/vision/v1p4beta1/image_annotator/client.rb +629 -0
  9. data/lib/google/cloud/vision/v1p4beta1/image_annotator/credentials.rb +52 -0
  10. data/lib/google/cloud/vision/v1p4beta1/image_annotator/helpers.rb +1228 -0
  11. data/lib/google/cloud/vision/v1p4beta1/image_annotator/operations.rb +664 -0
  12. data/lib/google/cloud/vision/v1p4beta1/image_annotator/paths.rb +52 -0
  13. data/lib/google/cloud/vision/v1p4beta1/image_annotator.rb +52 -0
  14. data/lib/google/cloud/vision/v1p4beta1/image_annotator_pb.rb +343 -0
  15. data/lib/google/cloud/vision/v1p4beta1/image_annotator_services_pb.rb +73 -0
  16. data/lib/google/cloud/vision/v1p4beta1/product_search/client.rb +2106 -0
  17. data/lib/google/cloud/vision/v1p4beta1/product_search/credentials.rb +52 -0
  18. data/lib/google/cloud/vision/v1p4beta1/product_search/operations.rb +664 -0
  19. data/lib/google/cloud/vision/v1p4beta1/product_search/paths.rb +109 -0
  20. data/lib/google/cloud/vision/v1p4beta1/product_search.rb +67 -0
  21. data/lib/google/cloud/vision/v1p4beta1/product_search_pb.rb +55 -0
  22. data/lib/google/cloud/vision/v1p4beta1/product_search_service_pb.rb +208 -0
  23. data/lib/google/cloud/vision/v1p4beta1/product_search_service_services_pb.rb +236 -0
  24. data/lib/google/cloud/vision/v1p4beta1/text_annotation_pb.rb +95 -0
  25. data/lib/google/cloud/vision/v1p4beta1/version.rb +28 -0
  26. data/lib/google/cloud/vision/v1p4beta1/web_detection_pb.rb +52 -0
  27. data/lib/google/cloud/vision/v1p4beta1.rb +39 -0
  28. data/lib/google-cloud-vision-v1p4beta1.rb +21 -0
  29. data/proto_docs/README.md +4 -0
  30. data/proto_docs/google/api/field_behavior.rb +71 -0
  31. data/proto_docs/google/api/resource.rb +283 -0
  32. data/proto_docs/google/cloud/vision/v1p4beta1/face.rb +68 -0
  33. data/proto_docs/google/cloud/vision/v1p4beta1/geometry.rb +82 -0
  34. data/proto_docs/google/cloud/vision/v1p4beta1/image_annotator.rb +989 -0
  35. data/proto_docs/google/cloud/vision/v1p4beta1/product_search.rb +136 -0
  36. data/proto_docs/google/cloud/vision/v1p4beta1/product_search_service.rb +676 -0
  37. data/proto_docs/google/cloud/vision/v1p4beta1/text_annotation.rb +286 -0
  38. data/proto_docs/google/cloud/vision/v1p4beta1/web_detection.rb +121 -0
  39. data/proto_docs/google/longrunning/operations.rb +164 -0
  40. data/proto_docs/google/protobuf/any.rb +141 -0
  41. data/proto_docs/google/protobuf/duration.rb +98 -0
  42. data/proto_docs/google/protobuf/empty.rb +36 -0
  43. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  44. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  45. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  46. data/proto_docs/google/rpc/status.rb +46 -0
  47. data/proto_docs/google/type/color.rb +173 -0
  48. data/proto_docs/google/type/latlng.rb +38 -0
  49. metadata +240 -0
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Vision
23
+ module V1p4beta1
24
+ module ImageAnnotator
25
+ # Path helper methods for the ImageAnnotator API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified ProductSet resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/productSets/{product_set}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param product_set [String]
37
+ #
38
+ # @return [::String]
39
+ def product_set_path project:, location:, product_set:
40
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
42
+
43
+ "projects/#{project}/locations/#{location}/productSets/#{product_set}"
44
+ end
45
+
46
+ extend self
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/vision/v1p4beta1/version"
24
+
25
+ require "google/cloud/vision/v1p4beta1/image_annotator/credentials"
26
+ require "google/cloud/vision/v1p4beta1/image_annotator/paths"
27
+ require "google/cloud/vision/v1p4beta1/image_annotator/operations"
28
+ require "google/cloud/vision/v1p4beta1/image_annotator/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Vision
33
+ module V1p4beta1
34
+ ##
35
+ # Service that performs Google Cloud Vision API detection tasks over client
36
+ # images, such as face, landmark, logo, label, and text detection. The
37
+ # ImageAnnotator service returns detected entities from the images.
38
+ #
39
+ # To load this service and instantiate a client:
40
+ #
41
+ # require "google/cloud/vision/v1p4beta1/image_annotator"
42
+ # client = ::Google::Cloud::Vision::V1p4beta1::ImageAnnotator::Client.new
43
+ #
44
+ module ImageAnnotator
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ helper_path = ::File.join __dir__, "image_annotator", "helpers.rb"
52
+ require "google/cloud/vision/v1p4beta1/image_annotator/helpers" if ::File.file? helper_path
@@ -0,0 +1,343 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/vision/v1p4beta1/image_annotator.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/cloud/vision/v1p4beta1/face_pb'
10
+ require 'google/cloud/vision/v1p4beta1/geometry_pb'
11
+ require 'google/cloud/vision/v1p4beta1/product_search_pb'
12
+ require 'google/cloud/vision/v1p4beta1/text_annotation_pb'
13
+ require 'google/cloud/vision/v1p4beta1/web_detection_pb'
14
+ require 'google/longrunning/operations_pb'
15
+ require 'google/protobuf/field_mask_pb'
16
+ require 'google/protobuf/timestamp_pb'
17
+ require 'google/rpc/status_pb'
18
+ require 'google/type/color_pb'
19
+ require 'google/type/latlng_pb'
20
+ Google::Protobuf::DescriptorPool.generated_pool.build do
21
+ add_file("google/cloud/vision/v1p4beta1/image_annotator.proto", :syntax => :proto3) do
22
+ add_message "google.cloud.vision.v1p4beta1.Feature" do
23
+ optional :type, :enum, 1, "google.cloud.vision.v1p4beta1.Feature.Type"
24
+ optional :max_results, :int32, 2
25
+ optional :model, :string, 3
26
+ end
27
+ add_enum "google.cloud.vision.v1p4beta1.Feature.Type" do
28
+ value :TYPE_UNSPECIFIED, 0
29
+ value :FACE_DETECTION, 1
30
+ value :LANDMARK_DETECTION, 2
31
+ value :LOGO_DETECTION, 3
32
+ value :LABEL_DETECTION, 4
33
+ value :TEXT_DETECTION, 5
34
+ value :DOCUMENT_TEXT_DETECTION, 11
35
+ value :SAFE_SEARCH_DETECTION, 6
36
+ value :IMAGE_PROPERTIES, 7
37
+ value :CROP_HINTS, 9
38
+ value :WEB_DETECTION, 10
39
+ value :PRODUCT_SEARCH, 12
40
+ value :OBJECT_LOCALIZATION, 19
41
+ end
42
+ add_message "google.cloud.vision.v1p4beta1.ImageSource" do
43
+ optional :gcs_image_uri, :string, 1
44
+ optional :image_uri, :string, 2
45
+ end
46
+ add_message "google.cloud.vision.v1p4beta1.Image" do
47
+ optional :content, :bytes, 1
48
+ optional :source, :message, 2, "google.cloud.vision.v1p4beta1.ImageSource"
49
+ end
50
+ add_message "google.cloud.vision.v1p4beta1.FaceAnnotation" do
51
+ optional :bounding_poly, :message, 1, "google.cloud.vision.v1p4beta1.BoundingPoly"
52
+ optional :fd_bounding_poly, :message, 2, "google.cloud.vision.v1p4beta1.BoundingPoly"
53
+ repeated :landmarks, :message, 3, "google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark"
54
+ optional :roll_angle, :float, 4
55
+ optional :pan_angle, :float, 5
56
+ optional :tilt_angle, :float, 6
57
+ optional :detection_confidence, :float, 7
58
+ optional :landmarking_confidence, :float, 8
59
+ optional :joy_likelihood, :enum, 9, "google.cloud.vision.v1p4beta1.Likelihood"
60
+ optional :sorrow_likelihood, :enum, 10, "google.cloud.vision.v1p4beta1.Likelihood"
61
+ optional :anger_likelihood, :enum, 11, "google.cloud.vision.v1p4beta1.Likelihood"
62
+ optional :surprise_likelihood, :enum, 12, "google.cloud.vision.v1p4beta1.Likelihood"
63
+ optional :under_exposed_likelihood, :enum, 13, "google.cloud.vision.v1p4beta1.Likelihood"
64
+ optional :blurred_likelihood, :enum, 14, "google.cloud.vision.v1p4beta1.Likelihood"
65
+ optional :headwear_likelihood, :enum, 15, "google.cloud.vision.v1p4beta1.Likelihood"
66
+ repeated :recognition_result, :message, 16, "google.cloud.vision.v1p4beta1.FaceRecognitionResult"
67
+ end
68
+ add_message "google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark" do
69
+ optional :type, :enum, 3, "google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type"
70
+ optional :position, :message, 4, "google.cloud.vision.v1p4beta1.Position"
71
+ end
72
+ add_enum "google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type" do
73
+ value :UNKNOWN_LANDMARK, 0
74
+ value :LEFT_EYE, 1
75
+ value :RIGHT_EYE, 2
76
+ value :LEFT_OF_LEFT_EYEBROW, 3
77
+ value :RIGHT_OF_LEFT_EYEBROW, 4
78
+ value :LEFT_OF_RIGHT_EYEBROW, 5
79
+ value :RIGHT_OF_RIGHT_EYEBROW, 6
80
+ value :MIDPOINT_BETWEEN_EYES, 7
81
+ value :NOSE_TIP, 8
82
+ value :UPPER_LIP, 9
83
+ value :LOWER_LIP, 10
84
+ value :MOUTH_LEFT, 11
85
+ value :MOUTH_RIGHT, 12
86
+ value :MOUTH_CENTER, 13
87
+ value :NOSE_BOTTOM_RIGHT, 14
88
+ value :NOSE_BOTTOM_LEFT, 15
89
+ value :NOSE_BOTTOM_CENTER, 16
90
+ value :LEFT_EYE_TOP_BOUNDARY, 17
91
+ value :LEFT_EYE_RIGHT_CORNER, 18
92
+ value :LEFT_EYE_BOTTOM_BOUNDARY, 19
93
+ value :LEFT_EYE_LEFT_CORNER, 20
94
+ value :RIGHT_EYE_TOP_BOUNDARY, 21
95
+ value :RIGHT_EYE_RIGHT_CORNER, 22
96
+ value :RIGHT_EYE_BOTTOM_BOUNDARY, 23
97
+ value :RIGHT_EYE_LEFT_CORNER, 24
98
+ value :LEFT_EYEBROW_UPPER_MIDPOINT, 25
99
+ value :RIGHT_EYEBROW_UPPER_MIDPOINT, 26
100
+ value :LEFT_EAR_TRAGION, 27
101
+ value :RIGHT_EAR_TRAGION, 28
102
+ value :LEFT_EYE_PUPIL, 29
103
+ value :RIGHT_EYE_PUPIL, 30
104
+ value :FOREHEAD_GLABELLA, 31
105
+ value :CHIN_GNATHION, 32
106
+ value :CHIN_LEFT_GONION, 33
107
+ value :CHIN_RIGHT_GONION, 34
108
+ end
109
+ add_message "google.cloud.vision.v1p4beta1.LocationInfo" do
110
+ optional :lat_lng, :message, 1, "google.type.LatLng"
111
+ end
112
+ add_message "google.cloud.vision.v1p4beta1.Property" do
113
+ optional :name, :string, 1
114
+ optional :value, :string, 2
115
+ optional :uint64_value, :uint64, 3
116
+ end
117
+ add_message "google.cloud.vision.v1p4beta1.EntityAnnotation" do
118
+ optional :mid, :string, 1
119
+ optional :locale, :string, 2
120
+ optional :description, :string, 3
121
+ optional :score, :float, 4
122
+ optional :confidence, :float, 5
123
+ optional :topicality, :float, 6
124
+ optional :bounding_poly, :message, 7, "google.cloud.vision.v1p4beta1.BoundingPoly"
125
+ repeated :locations, :message, 8, "google.cloud.vision.v1p4beta1.LocationInfo"
126
+ repeated :properties, :message, 9, "google.cloud.vision.v1p4beta1.Property"
127
+ end
128
+ add_message "google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation" do
129
+ optional :mid, :string, 1
130
+ optional :language_code, :string, 2
131
+ optional :name, :string, 3
132
+ optional :score, :float, 4
133
+ optional :bounding_poly, :message, 5, "google.cloud.vision.v1p4beta1.BoundingPoly"
134
+ end
135
+ add_message "google.cloud.vision.v1p4beta1.SafeSearchAnnotation" do
136
+ optional :adult, :enum, 1, "google.cloud.vision.v1p4beta1.Likelihood"
137
+ optional :spoof, :enum, 2, "google.cloud.vision.v1p4beta1.Likelihood"
138
+ optional :medical, :enum, 3, "google.cloud.vision.v1p4beta1.Likelihood"
139
+ optional :violence, :enum, 4, "google.cloud.vision.v1p4beta1.Likelihood"
140
+ optional :racy, :enum, 9, "google.cloud.vision.v1p4beta1.Likelihood"
141
+ end
142
+ add_message "google.cloud.vision.v1p4beta1.LatLongRect" do
143
+ optional :min_lat_lng, :message, 1, "google.type.LatLng"
144
+ optional :max_lat_lng, :message, 2, "google.type.LatLng"
145
+ end
146
+ add_message "google.cloud.vision.v1p4beta1.ColorInfo" do
147
+ optional :color, :message, 1, "google.type.Color"
148
+ optional :score, :float, 2
149
+ optional :pixel_fraction, :float, 3
150
+ end
151
+ add_message "google.cloud.vision.v1p4beta1.DominantColorsAnnotation" do
152
+ repeated :colors, :message, 1, "google.cloud.vision.v1p4beta1.ColorInfo"
153
+ end
154
+ add_message "google.cloud.vision.v1p4beta1.ImageProperties" do
155
+ optional :dominant_colors, :message, 1, "google.cloud.vision.v1p4beta1.DominantColorsAnnotation"
156
+ end
157
+ add_message "google.cloud.vision.v1p4beta1.CropHint" do
158
+ optional :bounding_poly, :message, 1, "google.cloud.vision.v1p4beta1.BoundingPoly"
159
+ optional :confidence, :float, 2
160
+ optional :importance_fraction, :float, 3
161
+ end
162
+ add_message "google.cloud.vision.v1p4beta1.CropHintsAnnotation" do
163
+ repeated :crop_hints, :message, 1, "google.cloud.vision.v1p4beta1.CropHint"
164
+ end
165
+ add_message "google.cloud.vision.v1p4beta1.CropHintsParams" do
166
+ repeated :aspect_ratios, :float, 1
167
+ end
168
+ add_message "google.cloud.vision.v1p4beta1.WebDetectionParams" do
169
+ optional :include_geo_results, :bool, 2
170
+ end
171
+ add_message "google.cloud.vision.v1p4beta1.TextDetectionParams" do
172
+ optional :enable_text_detection_confidence_score, :bool, 9
173
+ end
174
+ add_message "google.cloud.vision.v1p4beta1.ImageContext" do
175
+ optional :lat_long_rect, :message, 1, "google.cloud.vision.v1p4beta1.LatLongRect"
176
+ repeated :language_hints, :string, 2
177
+ optional :crop_hints_params, :message, 4, "google.cloud.vision.v1p4beta1.CropHintsParams"
178
+ optional :face_recognition_params, :message, 10, "google.cloud.vision.v1p4beta1.FaceRecognitionParams"
179
+ optional :product_search_params, :message, 5, "google.cloud.vision.v1p4beta1.ProductSearchParams"
180
+ optional :web_detection_params, :message, 6, "google.cloud.vision.v1p4beta1.WebDetectionParams"
181
+ optional :text_detection_params, :message, 12, "google.cloud.vision.v1p4beta1.TextDetectionParams"
182
+ end
183
+ add_message "google.cloud.vision.v1p4beta1.AnnotateImageRequest" do
184
+ optional :image, :message, 1, "google.cloud.vision.v1p4beta1.Image"
185
+ repeated :features, :message, 2, "google.cloud.vision.v1p4beta1.Feature"
186
+ optional :image_context, :message, 3, "google.cloud.vision.v1p4beta1.ImageContext"
187
+ end
188
+ add_message "google.cloud.vision.v1p4beta1.ImageAnnotationContext" do
189
+ optional :uri, :string, 1
190
+ optional :page_number, :int32, 2
191
+ end
192
+ add_message "google.cloud.vision.v1p4beta1.AnnotateImageResponse" do
193
+ repeated :face_annotations, :message, 1, "google.cloud.vision.v1p4beta1.FaceAnnotation"
194
+ repeated :landmark_annotations, :message, 2, "google.cloud.vision.v1p4beta1.EntityAnnotation"
195
+ repeated :logo_annotations, :message, 3, "google.cloud.vision.v1p4beta1.EntityAnnotation"
196
+ repeated :label_annotations, :message, 4, "google.cloud.vision.v1p4beta1.EntityAnnotation"
197
+ repeated :localized_object_annotations, :message, 22, "google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation"
198
+ repeated :text_annotations, :message, 5, "google.cloud.vision.v1p4beta1.EntityAnnotation"
199
+ optional :full_text_annotation, :message, 12, "google.cloud.vision.v1p4beta1.TextAnnotation"
200
+ optional :safe_search_annotation, :message, 6, "google.cloud.vision.v1p4beta1.SafeSearchAnnotation"
201
+ optional :image_properties_annotation, :message, 8, "google.cloud.vision.v1p4beta1.ImageProperties"
202
+ optional :crop_hints_annotation, :message, 11, "google.cloud.vision.v1p4beta1.CropHintsAnnotation"
203
+ optional :web_detection, :message, 13, "google.cloud.vision.v1p4beta1.WebDetection"
204
+ optional :product_search_results, :message, 14, "google.cloud.vision.v1p4beta1.ProductSearchResults"
205
+ optional :error, :message, 9, "google.rpc.Status"
206
+ optional :context, :message, 21, "google.cloud.vision.v1p4beta1.ImageAnnotationContext"
207
+ end
208
+ add_message "google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest" do
209
+ repeated :requests, :message, 1, "google.cloud.vision.v1p4beta1.AnnotateImageRequest"
210
+ end
211
+ add_message "google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse" do
212
+ repeated :responses, :message, 1, "google.cloud.vision.v1p4beta1.AnnotateImageResponse"
213
+ end
214
+ add_message "google.cloud.vision.v1p4beta1.AnnotateFileRequest" do
215
+ optional :input_config, :message, 1, "google.cloud.vision.v1p4beta1.InputConfig"
216
+ repeated :features, :message, 2, "google.cloud.vision.v1p4beta1.Feature"
217
+ optional :image_context, :message, 3, "google.cloud.vision.v1p4beta1.ImageContext"
218
+ repeated :pages, :int32, 4
219
+ end
220
+ add_message "google.cloud.vision.v1p4beta1.AnnotateFileResponse" do
221
+ optional :input_config, :message, 1, "google.cloud.vision.v1p4beta1.InputConfig"
222
+ repeated :responses, :message, 2, "google.cloud.vision.v1p4beta1.AnnotateImageResponse"
223
+ optional :total_pages, :int32, 3
224
+ optional :error, :message, 4, "google.rpc.Status"
225
+ end
226
+ add_message "google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest" do
227
+ repeated :requests, :message, 1, "google.cloud.vision.v1p4beta1.AnnotateFileRequest"
228
+ end
229
+ add_message "google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse" do
230
+ repeated :responses, :message, 1, "google.cloud.vision.v1p4beta1.AnnotateFileResponse"
231
+ end
232
+ add_message "google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest" do
233
+ optional :input_config, :message, 1, "google.cloud.vision.v1p4beta1.InputConfig"
234
+ repeated :features, :message, 2, "google.cloud.vision.v1p4beta1.Feature"
235
+ optional :image_context, :message, 3, "google.cloud.vision.v1p4beta1.ImageContext"
236
+ optional :output_config, :message, 4, "google.cloud.vision.v1p4beta1.OutputConfig"
237
+ end
238
+ add_message "google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse" do
239
+ optional :output_config, :message, 1, "google.cloud.vision.v1p4beta1.OutputConfig"
240
+ end
241
+ add_message "google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest" do
242
+ repeated :requests, :message, 1, "google.cloud.vision.v1p4beta1.AnnotateImageRequest"
243
+ optional :output_config, :message, 2, "google.cloud.vision.v1p4beta1.OutputConfig"
244
+ end
245
+ add_message "google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse" do
246
+ optional :output_config, :message, 1, "google.cloud.vision.v1p4beta1.OutputConfig"
247
+ end
248
+ add_message "google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest" do
249
+ repeated :requests, :message, 1, "google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest"
250
+ end
251
+ add_message "google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse" do
252
+ repeated :responses, :message, 1, "google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse"
253
+ end
254
+ add_message "google.cloud.vision.v1p4beta1.InputConfig" do
255
+ optional :gcs_source, :message, 1, "google.cloud.vision.v1p4beta1.GcsSource"
256
+ optional :content, :bytes, 3
257
+ optional :mime_type, :string, 2
258
+ end
259
+ add_message "google.cloud.vision.v1p4beta1.OutputConfig" do
260
+ optional :gcs_destination, :message, 1, "google.cloud.vision.v1p4beta1.GcsDestination"
261
+ optional :batch_size, :int32, 2
262
+ end
263
+ add_message "google.cloud.vision.v1p4beta1.GcsSource" do
264
+ optional :uri, :string, 1
265
+ end
266
+ add_message "google.cloud.vision.v1p4beta1.GcsDestination" do
267
+ optional :uri, :string, 1
268
+ end
269
+ add_message "google.cloud.vision.v1p4beta1.OperationMetadata" do
270
+ optional :state, :enum, 1, "google.cloud.vision.v1p4beta1.OperationMetadata.State"
271
+ optional :create_time, :message, 5, "google.protobuf.Timestamp"
272
+ optional :update_time, :message, 6, "google.protobuf.Timestamp"
273
+ end
274
+ add_enum "google.cloud.vision.v1p4beta1.OperationMetadata.State" do
275
+ value :STATE_UNSPECIFIED, 0
276
+ value :CREATED, 1
277
+ value :RUNNING, 2
278
+ value :DONE, 3
279
+ value :CANCELLED, 4
280
+ end
281
+ add_enum "google.cloud.vision.v1p4beta1.Likelihood" do
282
+ value :UNKNOWN, 0
283
+ value :VERY_UNLIKELY, 1
284
+ value :UNLIKELY, 2
285
+ value :POSSIBLE, 3
286
+ value :LIKELY, 4
287
+ value :VERY_LIKELY, 5
288
+ end
289
+ end
290
+ end
291
+
292
+ module Google
293
+ module Cloud
294
+ module Vision
295
+ module V1p4beta1
296
+ Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Feature").msgclass
297
+ Feature::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Feature.Type").enummodule
298
+ ImageSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.ImageSource").msgclass
299
+ Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Image").msgclass
300
+ FaceAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.FaceAnnotation").msgclass
301
+ FaceAnnotation::Landmark = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark").msgclass
302
+ FaceAnnotation::Landmark::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type").enummodule
303
+ LocationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.LocationInfo").msgclass
304
+ Property = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Property").msgclass
305
+ EntityAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.EntityAnnotation").msgclass
306
+ LocalizedObjectAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation").msgclass
307
+ SafeSearchAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.SafeSearchAnnotation").msgclass
308
+ LatLongRect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.LatLongRect").msgclass
309
+ ColorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.ColorInfo").msgclass
310
+ DominantColorsAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.DominantColorsAnnotation").msgclass
311
+ ImageProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.ImageProperties").msgclass
312
+ CropHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.CropHint").msgclass
313
+ CropHintsAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.CropHintsAnnotation").msgclass
314
+ CropHintsParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.CropHintsParams").msgclass
315
+ WebDetectionParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.WebDetectionParams").msgclass
316
+ TextDetectionParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.TextDetectionParams").msgclass
317
+ ImageContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.ImageContext").msgclass
318
+ AnnotateImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AnnotateImageRequest").msgclass
319
+ ImageAnnotationContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.ImageAnnotationContext").msgclass
320
+ AnnotateImageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AnnotateImageResponse").msgclass
321
+ BatchAnnotateImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest").msgclass
322
+ BatchAnnotateImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse").msgclass
323
+ AnnotateFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AnnotateFileRequest").msgclass
324
+ AnnotateFileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AnnotateFileResponse").msgclass
325
+ BatchAnnotateFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest").msgclass
326
+ BatchAnnotateFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse").msgclass
327
+ AsyncAnnotateFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest").msgclass
328
+ AsyncAnnotateFileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse").msgclass
329
+ AsyncBatchAnnotateImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest").msgclass
330
+ AsyncBatchAnnotateImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse").msgclass
331
+ AsyncBatchAnnotateFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest").msgclass
332
+ AsyncBatchAnnotateFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse").msgclass
333
+ InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.InputConfig").msgclass
334
+ OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.OutputConfig").msgclass
335
+ GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.GcsSource").msgclass
336
+ GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.GcsDestination").msgclass
337
+ OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.OperationMetadata").msgclass
338
+ OperationMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.OperationMetadata.State").enummodule
339
+ Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p4beta1.Likelihood").enummodule
340
+ end
341
+ end
342
+ end
343
+ end
@@ -0,0 +1,73 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/vision/v1p4beta1/image_annotator.proto for package 'google.cloud.vision.v1p4beta1'
3
+ # Original file comments:
4
+ # Copyright 2019 Google LLC.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ #
19
+
20
+ require 'grpc'
21
+ require 'google/cloud/vision/v1p4beta1/image_annotator_pb'
22
+
23
+ module Google
24
+ module Cloud
25
+ module Vision
26
+ module V1p4beta1
27
+ module ImageAnnotator
28
+ # Service that performs Google Cloud Vision API detection tasks over client
29
+ # images, such as face, landmark, logo, label, and text detection. The
30
+ # ImageAnnotator service returns detected entities from the images.
31
+ class Service
32
+
33
+ include ::GRPC::GenericService
34
+
35
+ self.marshal_class_method = :encode
36
+ self.unmarshal_class_method = :decode
37
+ self.service_name = 'google.cloud.vision.v1p4beta1.ImageAnnotator'
38
+
39
+ # Run image detection and annotation for a batch of images.
40
+ rpc :BatchAnnotateImages, ::Google::Cloud::Vision::V1p4beta1::BatchAnnotateImagesRequest, ::Google::Cloud::Vision::V1p4beta1::BatchAnnotateImagesResponse
41
+ # Service that performs image detection and annotation for a batch of files.
42
+ # Now only "application/pdf", "image/tiff" and "image/gif" are supported.
43
+ #
44
+ # This service will extract at most 5 (customers can specify which 5 in
45
+ # AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
46
+ # file provided and perform detection and annotation for each image
47
+ # extracted.
48
+ rpc :BatchAnnotateFiles, ::Google::Cloud::Vision::V1p4beta1::BatchAnnotateFilesRequest, ::Google::Cloud::Vision::V1p4beta1::BatchAnnotateFilesResponse
49
+ # Run asynchronous image detection and annotation for a list of images.
50
+ #
51
+ # Progress and results can be retrieved through the
52
+ # `google.longrunning.Operations` interface.
53
+ # `Operation.metadata` contains `OperationMetadata` (metadata).
54
+ # `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
55
+ #
56
+ # This service will write image annotation outputs to json files in customer
57
+ # GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
58
+ rpc :AsyncBatchAnnotateImages, ::Google::Cloud::Vision::V1p4beta1::AsyncBatchAnnotateImagesRequest, ::Google::Longrunning::Operation
59
+ # Run asynchronous image detection and annotation for a list of generic
60
+ # files, such as PDF files, which may contain multiple pages and multiple
61
+ # images per page. Progress and results can be retrieved through the
62
+ # `google.longrunning.Operations` interface.
63
+ # `Operation.metadata` contains `OperationMetadata` (metadata).
64
+ # `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
65
+ rpc :AsyncBatchAnnotateFiles, ::Google::Cloud::Vision::V1p4beta1::AsyncBatchAnnotateFilesRequest, ::Google::Longrunning::Operation
66
+ end
67
+
68
+ Stub = Service.rpc_stub_class
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end