google-cloud-vision-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +24 -0
  6. data/lib/google-cloud-vision-v1.rb +1 -0
  7. data/lib/google/cloud/common_resources_pb.rb +15 -0
  8. data/lib/google/cloud/vision/v1.rb +20 -0
  9. data/lib/google/cloud/vision/v1/geometry_pb.rb +40 -0
  10. data/lib/google/cloud/vision/v1/image_annotator.rb +21 -0
  11. data/lib/google/cloud/vision/v1/image_annotator/client.rb +682 -0
  12. data/lib/google/cloud/vision/v1/image_annotator/credentials.rb +52 -0
  13. data/lib/google/cloud/vision/v1/image_annotator/helpers.rb +1228 -0
  14. data/lib/google/cloud/vision/v1/image_annotator/operations.rb +558 -0
  15. data/lib/google/cloud/vision/v1/image_annotator/paths.rb +52 -0
  16. data/lib/google/cloud/vision/v1/image_annotator_pb.rb +345 -0
  17. data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +73 -0
  18. data/lib/google/cloud/vision/v1/product_search.rb +21 -0
  19. data/lib/google/cloud/vision/v1/product_search/client.rb +2134 -0
  20. data/lib/google/cloud/vision/v1/product_search/credentials.rb +52 -0
  21. data/lib/google/cloud/vision/v1/product_search/operations.rb +558 -0
  22. data/lib/google/cloud/vision/v1/product_search/paths.rb +109 -0
  23. data/lib/google/cloud/vision/v1/product_search_pb.rb +55 -0
  24. data/lib/google/cloud/vision/v1/product_search_service_pb.rb +208 -0
  25. data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +232 -0
  26. data/lib/google/cloud/vision/v1/text_annotation_pb.rb +95 -0
  27. data/lib/google/cloud/vision/v1/version.rb +28 -0
  28. data/lib/google/cloud/vision/v1/web_detection_pb.rb +52 -0
  29. data/proto_docs/README.md +4 -0
  30. data/proto_docs/google/api/field_behavior.rb +59 -0
  31. data/proto_docs/google/api/resource.rb +247 -0
  32. data/proto_docs/google/cloud/vision/v1/geometry.rb +82 -0
  33. data/proto_docs/google/cloud/vision/v1/image_annotator.rb +1044 -0
  34. data/proto_docs/google/cloud/vision/v1/product_search.rb +134 -0
  35. data/proto_docs/google/cloud/vision/v1/product_search_service.rb +669 -0
  36. data/proto_docs/google/cloud/vision/v1/text_annotation.rb +285 -0
  37. data/proto_docs/google/cloud/vision/v1/web_detection.rb +121 -0
  38. data/proto_docs/google/longrunning/operations.rb +150 -0
  39. data/proto_docs/google/protobuf/any.rb +137 -0
  40. data/proto_docs/google/protobuf/empty.rb +36 -0
  41. data/proto_docs/google/protobuf/field_mask.rb +237 -0
  42. data/proto_docs/google/protobuf/timestamp.rb +116 -0
  43. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  44. data/proto_docs/google/rpc/status.rb +46 -0
  45. data/proto_docs/google/type/color.rb +168 -0
  46. data/proto_docs/google/type/latlng.rb +38 -0
  47. metadata +201 -0
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 V1
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,345 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/vision/v1/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/v1/geometry_pb'
10
+ require 'google/cloud/vision/v1/product_search_pb'
11
+ require 'google/cloud/vision/v1/text_annotation_pb'
12
+ require 'google/cloud/vision/v1/web_detection_pb'
13
+ require 'google/longrunning/operations_pb'
14
+ require 'google/protobuf/field_mask_pb'
15
+ require 'google/protobuf/timestamp_pb'
16
+ require 'google/rpc/status_pb'
17
+ require 'google/type/color_pb'
18
+ require 'google/type/latlng_pb'
19
+ Google::Protobuf::DescriptorPool.generated_pool.build do
20
+ add_file("google/cloud/vision/v1/image_annotator.proto", :syntax => :proto3) do
21
+ add_message "google.cloud.vision.v1.Feature" do
22
+ optional :type, :enum, 1, "google.cloud.vision.v1.Feature.Type"
23
+ optional :max_results, :int32, 2
24
+ optional :model, :string, 3
25
+ end
26
+ add_enum "google.cloud.vision.v1.Feature.Type" do
27
+ value :TYPE_UNSPECIFIED, 0
28
+ value :FACE_DETECTION, 1
29
+ value :LANDMARK_DETECTION, 2
30
+ value :LOGO_DETECTION, 3
31
+ value :LABEL_DETECTION, 4
32
+ value :TEXT_DETECTION, 5
33
+ value :DOCUMENT_TEXT_DETECTION, 11
34
+ value :SAFE_SEARCH_DETECTION, 6
35
+ value :IMAGE_PROPERTIES, 7
36
+ value :CROP_HINTS, 9
37
+ value :WEB_DETECTION, 10
38
+ value :PRODUCT_SEARCH, 12
39
+ value :OBJECT_LOCALIZATION, 19
40
+ end
41
+ add_message "google.cloud.vision.v1.ImageSource" do
42
+ optional :gcs_image_uri, :string, 1
43
+ optional :image_uri, :string, 2
44
+ end
45
+ add_message "google.cloud.vision.v1.Image" do
46
+ optional :content, :bytes, 1
47
+ optional :source, :message, 2, "google.cloud.vision.v1.ImageSource"
48
+ end
49
+ add_message "google.cloud.vision.v1.FaceAnnotation" do
50
+ optional :bounding_poly, :message, 1, "google.cloud.vision.v1.BoundingPoly"
51
+ optional :fd_bounding_poly, :message, 2, "google.cloud.vision.v1.BoundingPoly"
52
+ repeated :landmarks, :message, 3, "google.cloud.vision.v1.FaceAnnotation.Landmark"
53
+ optional :roll_angle, :float, 4
54
+ optional :pan_angle, :float, 5
55
+ optional :tilt_angle, :float, 6
56
+ optional :detection_confidence, :float, 7
57
+ optional :landmarking_confidence, :float, 8
58
+ optional :joy_likelihood, :enum, 9, "google.cloud.vision.v1.Likelihood"
59
+ optional :sorrow_likelihood, :enum, 10, "google.cloud.vision.v1.Likelihood"
60
+ optional :anger_likelihood, :enum, 11, "google.cloud.vision.v1.Likelihood"
61
+ optional :surprise_likelihood, :enum, 12, "google.cloud.vision.v1.Likelihood"
62
+ optional :under_exposed_likelihood, :enum, 13, "google.cloud.vision.v1.Likelihood"
63
+ optional :blurred_likelihood, :enum, 14, "google.cloud.vision.v1.Likelihood"
64
+ optional :headwear_likelihood, :enum, 15, "google.cloud.vision.v1.Likelihood"
65
+ end
66
+ add_message "google.cloud.vision.v1.FaceAnnotation.Landmark" do
67
+ optional :type, :enum, 3, "google.cloud.vision.v1.FaceAnnotation.Landmark.Type"
68
+ optional :position, :message, 4, "google.cloud.vision.v1.Position"
69
+ end
70
+ add_enum "google.cloud.vision.v1.FaceAnnotation.Landmark.Type" do
71
+ value :UNKNOWN_LANDMARK, 0
72
+ value :LEFT_EYE, 1
73
+ value :RIGHT_EYE, 2
74
+ value :LEFT_OF_LEFT_EYEBROW, 3
75
+ value :RIGHT_OF_LEFT_EYEBROW, 4
76
+ value :LEFT_OF_RIGHT_EYEBROW, 5
77
+ value :RIGHT_OF_RIGHT_EYEBROW, 6
78
+ value :MIDPOINT_BETWEEN_EYES, 7
79
+ value :NOSE_TIP, 8
80
+ value :UPPER_LIP, 9
81
+ value :LOWER_LIP, 10
82
+ value :MOUTH_LEFT, 11
83
+ value :MOUTH_RIGHT, 12
84
+ value :MOUTH_CENTER, 13
85
+ value :NOSE_BOTTOM_RIGHT, 14
86
+ value :NOSE_BOTTOM_LEFT, 15
87
+ value :NOSE_BOTTOM_CENTER, 16
88
+ value :LEFT_EYE_TOP_BOUNDARY, 17
89
+ value :LEFT_EYE_RIGHT_CORNER, 18
90
+ value :LEFT_EYE_BOTTOM_BOUNDARY, 19
91
+ value :LEFT_EYE_LEFT_CORNER, 20
92
+ value :RIGHT_EYE_TOP_BOUNDARY, 21
93
+ value :RIGHT_EYE_RIGHT_CORNER, 22
94
+ value :RIGHT_EYE_BOTTOM_BOUNDARY, 23
95
+ value :RIGHT_EYE_LEFT_CORNER, 24
96
+ value :LEFT_EYEBROW_UPPER_MIDPOINT, 25
97
+ value :RIGHT_EYEBROW_UPPER_MIDPOINT, 26
98
+ value :LEFT_EAR_TRAGION, 27
99
+ value :RIGHT_EAR_TRAGION, 28
100
+ value :LEFT_EYE_PUPIL, 29
101
+ value :RIGHT_EYE_PUPIL, 30
102
+ value :FOREHEAD_GLABELLA, 31
103
+ value :CHIN_GNATHION, 32
104
+ value :CHIN_LEFT_GONION, 33
105
+ value :CHIN_RIGHT_GONION, 34
106
+ end
107
+ add_message "google.cloud.vision.v1.LocationInfo" do
108
+ optional :lat_lng, :message, 1, "google.type.LatLng"
109
+ end
110
+ add_message "google.cloud.vision.v1.Property" do
111
+ optional :name, :string, 1
112
+ optional :value, :string, 2
113
+ optional :uint64_value, :uint64, 3
114
+ end
115
+ add_message "google.cloud.vision.v1.EntityAnnotation" do
116
+ optional :mid, :string, 1
117
+ optional :locale, :string, 2
118
+ optional :description, :string, 3
119
+ optional :score, :float, 4
120
+ optional :confidence, :float, 5
121
+ optional :topicality, :float, 6
122
+ optional :bounding_poly, :message, 7, "google.cloud.vision.v1.BoundingPoly"
123
+ repeated :locations, :message, 8, "google.cloud.vision.v1.LocationInfo"
124
+ repeated :properties, :message, 9, "google.cloud.vision.v1.Property"
125
+ end
126
+ add_message "google.cloud.vision.v1.LocalizedObjectAnnotation" do
127
+ optional :mid, :string, 1
128
+ optional :language_code, :string, 2
129
+ optional :name, :string, 3
130
+ optional :score, :float, 4
131
+ optional :bounding_poly, :message, 5, "google.cloud.vision.v1.BoundingPoly"
132
+ end
133
+ add_message "google.cloud.vision.v1.SafeSearchAnnotation" do
134
+ optional :adult, :enum, 1, "google.cloud.vision.v1.Likelihood"
135
+ optional :spoof, :enum, 2, "google.cloud.vision.v1.Likelihood"
136
+ optional :medical, :enum, 3, "google.cloud.vision.v1.Likelihood"
137
+ optional :violence, :enum, 4, "google.cloud.vision.v1.Likelihood"
138
+ optional :racy, :enum, 9, "google.cloud.vision.v1.Likelihood"
139
+ optional :adult_confidence, :float, 16
140
+ optional :spoof_confidence, :float, 18
141
+ optional :medical_confidence, :float, 20
142
+ optional :violence_confidence, :float, 22
143
+ optional :racy_confidence, :float, 24
144
+ optional :nsfw_confidence, :float, 26
145
+ end
146
+ add_message "google.cloud.vision.v1.LatLongRect" do
147
+ optional :min_lat_lng, :message, 1, "google.type.LatLng"
148
+ optional :max_lat_lng, :message, 2, "google.type.LatLng"
149
+ end
150
+ add_message "google.cloud.vision.v1.ColorInfo" do
151
+ optional :color, :message, 1, "google.type.Color"
152
+ optional :score, :float, 2
153
+ optional :pixel_fraction, :float, 3
154
+ end
155
+ add_message "google.cloud.vision.v1.DominantColorsAnnotation" do
156
+ repeated :colors, :message, 1, "google.cloud.vision.v1.ColorInfo"
157
+ end
158
+ add_message "google.cloud.vision.v1.ImageProperties" do
159
+ optional :dominant_colors, :message, 1, "google.cloud.vision.v1.DominantColorsAnnotation"
160
+ end
161
+ add_message "google.cloud.vision.v1.CropHint" do
162
+ optional :bounding_poly, :message, 1, "google.cloud.vision.v1.BoundingPoly"
163
+ optional :confidence, :float, 2
164
+ optional :importance_fraction, :float, 3
165
+ end
166
+ add_message "google.cloud.vision.v1.CropHintsAnnotation" do
167
+ repeated :crop_hints, :message, 1, "google.cloud.vision.v1.CropHint"
168
+ end
169
+ add_message "google.cloud.vision.v1.CropHintsParams" do
170
+ repeated :aspect_ratios, :float, 1
171
+ end
172
+ add_message "google.cloud.vision.v1.WebDetectionParams" do
173
+ optional :include_geo_results, :bool, 2
174
+ end
175
+ add_message "google.cloud.vision.v1.ImageContext" do
176
+ optional :lat_long_rect, :message, 1, "google.cloud.vision.v1.LatLongRect"
177
+ repeated :language_hints, :string, 2
178
+ optional :crop_hints_params, :message, 4, "google.cloud.vision.v1.CropHintsParams"
179
+ optional :product_search_params, :message, 5, "google.cloud.vision.v1.ProductSearchParams"
180
+ optional :web_detection_params, :message, 6, "google.cloud.vision.v1.WebDetectionParams"
181
+ end
182
+ add_message "google.cloud.vision.v1.AnnotateImageRequest" do
183
+ optional :image, :message, 1, "google.cloud.vision.v1.Image"
184
+ repeated :features, :message, 2, "google.cloud.vision.v1.Feature"
185
+ optional :image_context, :message, 3, "google.cloud.vision.v1.ImageContext"
186
+ end
187
+ add_message "google.cloud.vision.v1.ImageAnnotationContext" do
188
+ optional :uri, :string, 1
189
+ optional :page_number, :int32, 2
190
+ end
191
+ add_message "google.cloud.vision.v1.AnnotateImageResponse" do
192
+ repeated :face_annotations, :message, 1, "google.cloud.vision.v1.FaceAnnotation"
193
+ repeated :landmark_annotations, :message, 2, "google.cloud.vision.v1.EntityAnnotation"
194
+ repeated :logo_annotations, :message, 3, "google.cloud.vision.v1.EntityAnnotation"
195
+ repeated :label_annotations, :message, 4, "google.cloud.vision.v1.EntityAnnotation"
196
+ repeated :localized_object_annotations, :message, 22, "google.cloud.vision.v1.LocalizedObjectAnnotation"
197
+ repeated :text_annotations, :message, 5, "google.cloud.vision.v1.EntityAnnotation"
198
+ optional :full_text_annotation, :message, 12, "google.cloud.vision.v1.TextAnnotation"
199
+ optional :safe_search_annotation, :message, 6, "google.cloud.vision.v1.SafeSearchAnnotation"
200
+ optional :image_properties_annotation, :message, 8, "google.cloud.vision.v1.ImageProperties"
201
+ optional :crop_hints_annotation, :message, 11, "google.cloud.vision.v1.CropHintsAnnotation"
202
+ optional :web_detection, :message, 13, "google.cloud.vision.v1.WebDetection"
203
+ optional :product_search_results, :message, 14, "google.cloud.vision.v1.ProductSearchResults"
204
+ optional :error, :message, 9, "google.rpc.Status"
205
+ optional :context, :message, 21, "google.cloud.vision.v1.ImageAnnotationContext"
206
+ end
207
+ add_message "google.cloud.vision.v1.BatchAnnotateImagesRequest" do
208
+ repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateImageRequest"
209
+ optional :parent, :string, 4
210
+ end
211
+ add_message "google.cloud.vision.v1.BatchAnnotateImagesResponse" do
212
+ repeated :responses, :message, 1, "google.cloud.vision.v1.AnnotateImageResponse"
213
+ end
214
+ add_message "google.cloud.vision.v1.AnnotateFileRequest" do
215
+ optional :input_config, :message, 1, "google.cloud.vision.v1.InputConfig"
216
+ repeated :features, :message, 2, "google.cloud.vision.v1.Feature"
217
+ optional :image_context, :message, 3, "google.cloud.vision.v1.ImageContext"
218
+ repeated :pages, :int32, 4
219
+ end
220
+ add_message "google.cloud.vision.v1.AnnotateFileResponse" do
221
+ optional :input_config, :message, 1, "google.cloud.vision.v1.InputConfig"
222
+ repeated :responses, :message, 2, "google.cloud.vision.v1.AnnotateImageResponse"
223
+ optional :total_pages, :int32, 3
224
+ optional :error, :message, 4, "google.rpc.Status"
225
+ end
226
+ add_message "google.cloud.vision.v1.BatchAnnotateFilesRequest" do
227
+ repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateFileRequest"
228
+ optional :parent, :string, 3
229
+ end
230
+ add_message "google.cloud.vision.v1.BatchAnnotateFilesResponse" do
231
+ repeated :responses, :message, 1, "google.cloud.vision.v1.AnnotateFileResponse"
232
+ end
233
+ add_message "google.cloud.vision.v1.AsyncAnnotateFileRequest" do
234
+ optional :input_config, :message, 1, "google.cloud.vision.v1.InputConfig"
235
+ repeated :features, :message, 2, "google.cloud.vision.v1.Feature"
236
+ optional :image_context, :message, 3, "google.cloud.vision.v1.ImageContext"
237
+ optional :output_config, :message, 4, "google.cloud.vision.v1.OutputConfig"
238
+ end
239
+ add_message "google.cloud.vision.v1.AsyncAnnotateFileResponse" do
240
+ optional :output_config, :message, 1, "google.cloud.vision.v1.OutputConfig"
241
+ end
242
+ add_message "google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest" do
243
+ repeated :requests, :message, 1, "google.cloud.vision.v1.AnnotateImageRequest"
244
+ optional :output_config, :message, 2, "google.cloud.vision.v1.OutputConfig"
245
+ optional :parent, :string, 4
246
+ end
247
+ add_message "google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse" do
248
+ optional :output_config, :message, 1, "google.cloud.vision.v1.OutputConfig"
249
+ end
250
+ add_message "google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest" do
251
+ repeated :requests, :message, 1, "google.cloud.vision.v1.AsyncAnnotateFileRequest"
252
+ optional :parent, :string, 4
253
+ end
254
+ add_message "google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse" do
255
+ repeated :responses, :message, 1, "google.cloud.vision.v1.AsyncAnnotateFileResponse"
256
+ end
257
+ add_message "google.cloud.vision.v1.InputConfig" do
258
+ optional :gcs_source, :message, 1, "google.cloud.vision.v1.GcsSource"
259
+ optional :content, :bytes, 3
260
+ optional :mime_type, :string, 2
261
+ end
262
+ add_message "google.cloud.vision.v1.OutputConfig" do
263
+ optional :gcs_destination, :message, 1, "google.cloud.vision.v1.GcsDestination"
264
+ optional :batch_size, :int32, 2
265
+ end
266
+ add_message "google.cloud.vision.v1.GcsSource" do
267
+ optional :uri, :string, 1
268
+ end
269
+ add_message "google.cloud.vision.v1.GcsDestination" do
270
+ optional :uri, :string, 1
271
+ end
272
+ add_message "google.cloud.vision.v1.OperationMetadata" do
273
+ optional :state, :enum, 1, "google.cloud.vision.v1.OperationMetadata.State"
274
+ optional :create_time, :message, 5, "google.protobuf.Timestamp"
275
+ optional :update_time, :message, 6, "google.protobuf.Timestamp"
276
+ end
277
+ add_enum "google.cloud.vision.v1.OperationMetadata.State" do
278
+ value :STATE_UNSPECIFIED, 0
279
+ value :CREATED, 1
280
+ value :RUNNING, 2
281
+ value :DONE, 3
282
+ value :CANCELLED, 4
283
+ end
284
+ add_enum "google.cloud.vision.v1.Likelihood" do
285
+ value :UNKNOWN, 0
286
+ value :VERY_UNLIKELY, 1
287
+ value :UNLIKELY, 2
288
+ value :POSSIBLE, 3
289
+ value :LIKELY, 4
290
+ value :VERY_LIKELY, 5
291
+ end
292
+ end
293
+ end
294
+
295
+ module Google
296
+ module Cloud
297
+ module Vision
298
+ module V1
299
+ Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Feature").msgclass
300
+ Feature::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Feature.Type").enummodule
301
+ ImageSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImageSource").msgclass
302
+ Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Image").msgclass
303
+ FaceAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.FaceAnnotation").msgclass
304
+ FaceAnnotation::Landmark = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.FaceAnnotation.Landmark").msgclass
305
+ FaceAnnotation::Landmark::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.FaceAnnotation.Landmark.Type").enummodule
306
+ LocationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.LocationInfo").msgclass
307
+ Property = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Property").msgclass
308
+ EntityAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.EntityAnnotation").msgclass
309
+ LocalizedObjectAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.LocalizedObjectAnnotation").msgclass
310
+ SafeSearchAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.SafeSearchAnnotation").msgclass
311
+ LatLongRect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.LatLongRect").msgclass
312
+ ColorInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ColorInfo").msgclass
313
+ DominantColorsAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.DominantColorsAnnotation").msgclass
314
+ ImageProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImageProperties").msgclass
315
+ CropHint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CropHint").msgclass
316
+ CropHintsAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CropHintsAnnotation").msgclass
317
+ CropHintsParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.CropHintsParams").msgclass
318
+ WebDetectionParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.WebDetectionParams").msgclass
319
+ ImageContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImageContext").msgclass
320
+ AnnotateImageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AnnotateImageRequest").msgclass
321
+ ImageAnnotationContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.ImageAnnotationContext").msgclass
322
+ AnnotateImageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AnnotateImageResponse").msgclass
323
+ BatchAnnotateImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchAnnotateImagesRequest").msgclass
324
+ BatchAnnotateImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchAnnotateImagesResponse").msgclass
325
+ AnnotateFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AnnotateFileRequest").msgclass
326
+ AnnotateFileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AnnotateFileResponse").msgclass
327
+ BatchAnnotateFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchAnnotateFilesRequest").msgclass
328
+ BatchAnnotateFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.BatchAnnotateFilesResponse").msgclass
329
+ AsyncAnnotateFileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncAnnotateFileRequest").msgclass
330
+ AsyncAnnotateFileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncAnnotateFileResponse").msgclass
331
+ AsyncBatchAnnotateImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest").msgclass
332
+ AsyncBatchAnnotateImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse").msgclass
333
+ AsyncBatchAnnotateFilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest").msgclass
334
+ AsyncBatchAnnotateFilesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse").msgclass
335
+ InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.InputConfig").msgclass
336
+ OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.OutputConfig").msgclass
337
+ GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GcsSource").msgclass
338
+ GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.GcsDestination").msgclass
339
+ OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.OperationMetadata").msgclass
340
+ OperationMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.OperationMetadata.State").enummodule
341
+ Likelihood = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1.Likelihood").enummodule
342
+ end
343
+ end
344
+ end
345
+ end
@@ -0,0 +1,73 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/vision/v1/image_annotator.proto for package 'google.cloud.vision.v1'
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/v1/image_annotator_pb'
22
+
23
+ module Google
24
+ module Cloud
25
+ module Vision
26
+ module V1
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.v1.ImageAnnotator'
38
+
39
+ # Run image detection and annotation for a batch of images.
40
+ rpc :BatchAnnotateImages, BatchAnnotateImagesRequest, 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, BatchAnnotateFilesRequest, 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, 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, AsyncBatchAnnotateFilesRequest, Google::Longrunning::Operation
66
+ end
67
+
68
+ Stub = Service.rpc_stub_class
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end