google-cloud-vision 0.37.1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +343 -0
  6. data/README.md +35 -49
  7. data/lib/{google/cloud/vision/v1/doc/google/protobuf/wrappers.rb → google-cloud-vision.rb} +5 -12
  8. data/lib/google/cloud/vision.rb +132 -215
  9. data/lib/google/cloud/vision/version.rb +6 -2
  10. metadata +74 -102
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/vision/v1.rb +0 -249
  13. data/lib/google/cloud/vision/v1/credentials.rb +0 -42
  14. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb +0 -66
  15. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +0 -923
  16. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb +0 -115
  17. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb +0 -569
  18. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +0 -254
  19. data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +0 -102
  20. data/lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb +0 -51
  21. data/lib/google/cloud/vision/v1/doc/google/protobuf/any.rb +0 -131
  22. data/lib/google/cloud/vision/v1/doc/google/protobuf/empty.rb +0 -29
  23. data/lib/google/cloud/vision/v1/doc/google/protobuf/field_mask.rb +0 -222
  24. data/lib/google/cloud/vision/v1/doc/google/protobuf/timestamp.rb +0 -113
  25. data/lib/google/cloud/vision/v1/doc/google/rpc/status.rb +0 -87
  26. data/lib/google/cloud/vision/v1/doc/google/type/color.rb +0 -161
  27. data/lib/google/cloud/vision/v1/doc/google/type/latlng.rb +0 -31
  28. data/lib/google/cloud/vision/v1/geometry_pb.rb +0 -39
  29. data/lib/google/cloud/vision/v1/helpers.rb +0 -1154
  30. data/lib/google/cloud/vision/v1/image_annotator_client.rb +0 -516
  31. data/lib/google/cloud/vision/v1/image_annotator_client_config.json +0 -46
  32. data/lib/google/cloud/vision/v1/image_annotator_pb.rb +0 -344
  33. data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +0 -74
  34. data/lib/google/cloud/vision/v1/product_search_client.rb +0 -1490
  35. data/lib/google/cloud/vision/v1/product_search_client_config.json +0 -121
  36. data/lib/google/cloud/vision/v1/product_search_pb.rb +0 -54
  37. data/lib/google/cloud/vision/v1/product_search_service_pb.rb +0 -207
  38. data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +0 -233
  39. data/lib/google/cloud/vision/v1/text_annotation_pb.rb +0 -94
  40. data/lib/google/cloud/vision/v1/web_detection_pb.rb +0 -51
  41. data/lib/google/cloud/vision/v1p3beta1.rb +0 -253
  42. data/lib/google/cloud/vision/v1p3beta1/credentials.rb +0 -42
  43. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/geometry.rb +0 -72
  44. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/image_annotator.rb +0 -763
  45. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search.rb +0 -156
  46. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search_service.rb +0 -538
  47. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/text_annotation.rb +0 -255
  48. data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/web_detection.rb +0 -101
  49. data/lib/google/cloud/vision/v1p3beta1/doc/google/longrunning/operations.rb +0 -51
  50. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/any.rb +0 -131
  51. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/empty.rb +0 -29
  52. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/field_mask.rb +0 -222
  53. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/timestamp.rb +0 -113
  54. data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/wrappers.rb +0 -26
  55. data/lib/google/cloud/vision/v1p3beta1/doc/google/rpc/status.rb +0 -87
  56. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/color.rb +0 -161
  57. data/lib/google/cloud/vision/v1p3beta1/doc/google/type/latlng.rb +0 -31
  58. data/lib/google/cloud/vision/v1p3beta1/geometry_pb.rb +0 -43
  59. data/lib/google/cloud/vision/v1p3beta1/helpers.rb +0 -1154
  60. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client.rb +0 -312
  61. data/lib/google/cloud/vision/v1p3beta1/image_annotator_client_config.json +0 -36
  62. data/lib/google/cloud/vision/v1p3beta1/image_annotator_pb.rb +0 -304
  63. data/lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb +0 -55
  64. data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +0 -1419
  65. data/lib/google/cloud/vision/v1p3beta1/product_search_client_config.json +0 -116
  66. data/lib/google/cloud/vision/v1p3beta1/product_search_pb.rb +0 -64
  67. data/lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb +0 -191
  68. data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +0 -226
  69. data/lib/google/cloud/vision/v1p3beta1/text_annotation_pb.rb +0 -94
  70. data/lib/google/cloud/vision/v1p3beta1/web_detection_pb.rb +0 -51
@@ -1,312 +0,0 @@
1
- # Copyright 2019 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- #
15
- # EDITING INSTRUCTIONS
16
- # This file was generated from the file
17
- # https://github.com/googleapis/googleapis/blob/master/google/cloud/vision/v1p3beta1/image_annotator.proto,
18
- # and updates to that file get reflected here through a refresh process.
19
- # For the short term, the refresh process will only be runnable by Google
20
- # engineers.
21
-
22
-
23
- require "json"
24
- require "pathname"
25
-
26
- require "google/gax"
27
- require "google/gax/operation"
28
- require "google/longrunning/operations_client"
29
-
30
- require "google/cloud/vision/v1p3beta1/image_annotator_pb"
31
- require "google/cloud/vision/v1p3beta1/credentials"
32
- require "google/cloud/vision/version"
33
-
34
- module Google
35
- module Cloud
36
- module Vision
37
- module V1p3beta1
38
- # Service that performs Google Cloud Vision API detection tasks over client
39
- # images, such as face, landmark, logo, label, and text detection. The
40
- # ImageAnnotator service returns detected entities from the images.
41
- #
42
- # @!attribute [r] image_annotator_stub
43
- # @return [Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Stub]
44
- class ImageAnnotatorClient
45
- # @private
46
- attr_reader :image_annotator_stub
47
-
48
- # The default address of the service.
49
- SERVICE_ADDRESS = "vision.googleapis.com".freeze
50
-
51
- # The default port of the service.
52
- DEFAULT_SERVICE_PORT = 443
53
-
54
- # The default set of gRPC interceptors.
55
- GRPC_INTERCEPTORS = []
56
-
57
- DEFAULT_TIMEOUT = 30
58
-
59
- # The scopes needed to make gRPC calls to all of the methods defined in
60
- # this service.
61
- ALL_SCOPES = [
62
- "https://www.googleapis.com/auth/cloud-platform",
63
- "https://www.googleapis.com/auth/cloud-vision"
64
- ].freeze
65
-
66
- # @private
67
- class OperationsClient < Google::Longrunning::OperationsClient
68
- self::SERVICE_ADDRESS = ImageAnnotatorClient::SERVICE_ADDRESS
69
- self::GRPC_INTERCEPTORS = ImageAnnotatorClient::GRPC_INTERCEPTORS
70
- end
71
-
72
- # @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
73
- # Provides the means for authenticating requests made by the client. This parameter can
74
- # be many types.
75
- # A `Google::Auth::Credentials` uses a the properties of its represented keyfile for
76
- # authenticating requests made by this client.
77
- # A `String` will be treated as the path to the keyfile to be used for the construction of
78
- # credentials for this client.
79
- # A `Hash` will be treated as the contents of a keyfile to be used for the construction of
80
- # credentials for this client.
81
- # A `GRPC::Core::Channel` will be used to make calls through.
82
- # A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
83
- # should already be composed with a `GRPC::Core::CallCredentials` object.
84
- # A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
85
- # metadata for requests, generally, to give OAuth credentials.
86
- # @param scopes [Array<String>]
87
- # The OAuth scopes for this service. This parameter is ignored if
88
- # an updater_proc is supplied.
89
- # @param client_config [Hash]
90
- # A Hash for call options for each method. See
91
- # Google::Gax#construct_settings for the structure of
92
- # this data. Falls back to the default config if not specified
93
- # or the specified config is missing data points.
94
- # @param timeout [Numeric]
95
- # The default timeout, in seconds, for calls made through this client.
96
- # @param metadata [Hash]
97
- # Default metadata to be sent with each request. This can be overridden on a per call basis.
98
- # @param service_address [String]
99
- # Override for the service hostname, or `nil` to leave as the default.
100
- # @param service_port [Integer]
101
- # Override for the service port, or `nil` to leave as the default.
102
- # @param exception_transformer [Proc]
103
- # An optional proc that intercepts any exceptions raised during an API call to inject
104
- # custom error handling.
105
- def initialize \
106
- credentials: nil,
107
- scopes: ALL_SCOPES,
108
- client_config: {},
109
- timeout: DEFAULT_TIMEOUT,
110
- metadata: nil,
111
- service_address: nil,
112
- service_port: nil,
113
- exception_transformer: nil,
114
- lib_name: nil,
115
- lib_version: ""
116
- # These require statements are intentionally placed here to initialize
117
- # the gRPC module only when it's required.
118
- # See https://github.com/googleapis/toolkit/issues/446
119
- require "google/gax/grpc"
120
- require "google/cloud/vision/v1p3beta1/image_annotator_services_pb"
121
-
122
- credentials ||= Google::Cloud::Vision::V1p3beta1::Credentials.default
123
-
124
- @operations_client = OperationsClient.new(
125
- credentials: credentials,
126
- scopes: scopes,
127
- client_config: client_config,
128
- timeout: timeout,
129
- lib_name: lib_name,
130
- service_address: service_address,
131
- service_port: service_port,
132
- lib_version: lib_version,
133
- metadata: metadata,
134
- )
135
-
136
- if credentials.is_a?(String) || credentials.is_a?(Hash)
137
- updater_proc = Google::Cloud::Vision::V1p3beta1::Credentials.new(credentials).updater_proc
138
- end
139
- if credentials.is_a?(GRPC::Core::Channel)
140
- channel = credentials
141
- end
142
- if credentials.is_a?(GRPC::Core::ChannelCredentials)
143
- chan_creds = credentials
144
- end
145
- if credentials.is_a?(Proc)
146
- updater_proc = credentials
147
- end
148
- if credentials.is_a?(Google::Auth::Credentials)
149
- updater_proc = credentials.updater_proc
150
- end
151
-
152
- package_version = Google::Cloud::Vision::VERSION
153
-
154
- google_api_client = "gl-ruby/#{RUBY_VERSION}"
155
- google_api_client << " #{lib_name}/#{lib_version}" if lib_name
156
- google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
157
- google_api_client << " grpc/#{GRPC::VERSION}"
158
- google_api_client.freeze
159
-
160
- headers = { :"x-goog-api-client" => google_api_client }
161
- headers.merge!(metadata) unless metadata.nil?
162
- client_config_file = Pathname.new(__dir__).join(
163
- "image_annotator_client_config.json"
164
- )
165
- defaults = client_config_file.open do |f|
166
- Google::Gax.construct_settings(
167
- "google.cloud.vision.v1p3beta1.ImageAnnotator",
168
- JSON.parse(f.read),
169
- client_config,
170
- Google::Gax::Grpc::STATUS_CODE_NAMES,
171
- timeout,
172
- errors: Google::Gax::Grpc::API_ERRORS,
173
- metadata: headers
174
- )
175
- end
176
-
177
- # Allow overriding the service path/port in subclasses.
178
- service_path = service_address || self.class::SERVICE_ADDRESS
179
- port = service_port || self.class::DEFAULT_SERVICE_PORT
180
- interceptors = self.class::GRPC_INTERCEPTORS
181
- @image_annotator_stub = Google::Gax::Grpc.create_stub(
182
- service_path,
183
- port,
184
- chan_creds: chan_creds,
185
- channel: channel,
186
- updater_proc: updater_proc,
187
- scopes: scopes,
188
- interceptors: interceptors,
189
- &Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Stub.method(:new)
190
- )
191
-
192
- @batch_annotate_images = Google::Gax.create_api_call(
193
- @image_annotator_stub.method(:batch_annotate_images),
194
- defaults["batch_annotate_images"],
195
- exception_transformer: exception_transformer
196
- )
197
- @async_batch_annotate_files = Google::Gax.create_api_call(
198
- @image_annotator_stub.method(:async_batch_annotate_files),
199
- defaults["async_batch_annotate_files"],
200
- exception_transformer: exception_transformer
201
- )
202
- end
203
-
204
- # Service calls
205
-
206
- # Run image detection and annotation for a batch of images.
207
- #
208
- # @param requests [Array<Google::Cloud::Vision::V1p3beta1::AnnotateImageRequest | Hash>]
209
- # Individual image annotation requests for this batch.
210
- # A hash of the same form as `Google::Cloud::Vision::V1p3beta1::AnnotateImageRequest`
211
- # can also be provided.
212
- # @param options [Google::Gax::CallOptions]
213
- # Overrides the default settings for this call, e.g, timeout,
214
- # retries, etc.
215
- # @yield [result, operation] Access the result along with the RPC operation
216
- # @yieldparam result [Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse]
217
- # @yieldparam operation [GRPC::ActiveCall::Operation]
218
- # @return [Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse]
219
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
220
- # @example
221
- # require "google/cloud/vision"
222
- #
223
- # image_annotator_client = Google::Cloud::Vision::ImageAnnotator.new(version: :v1p3beta1)
224
- #
225
- # # TODO: Initialize `requests`:
226
- # requests = []
227
- # response = image_annotator_client.batch_annotate_images(requests)
228
-
229
- def batch_annotate_images \
230
- requests,
231
- options: nil,
232
- &block
233
- req = {
234
- requests: requests
235
- }.delete_if { |_, v| v.nil? }
236
- req = Google::Gax::to_proto(req, Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesRequest)
237
- @batch_annotate_images.call(req, options, &block)
238
- end
239
-
240
- # Run asynchronous image detection and annotation for a list of generic
241
- # files, such as PDF files, which may contain multiple pages and multiple
242
- # images per page. Progress and results can be retrieved through the
243
- # `google.longrunning.Operations` interface.
244
- # `Operation.metadata` contains `OperationMetadata` (metadata).
245
- # `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
246
- #
247
- # @param requests [Array<Google::Cloud::Vision::V1p3beta1::AsyncAnnotateFileRequest | Hash>]
248
- # Individual async file annotation requests for this batch.
249
- # A hash of the same form as `Google::Cloud::Vision::V1p3beta1::AsyncAnnotateFileRequest`
250
- # can also be provided.
251
- # @param options [Google::Gax::CallOptions]
252
- # Overrides the default settings for this call, e.g, timeout,
253
- # retries, etc.
254
- # @return [Google::Gax::Operation]
255
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
256
- # @example
257
- # require "google/cloud/vision"
258
- #
259
- # image_annotator_client = Google::Cloud::Vision::ImageAnnotator.new(version: :v1p3beta1)
260
- #
261
- # # TODO: Initialize `requests`:
262
- # requests = []
263
- #
264
- # # Register a callback during the method call.
265
- # operation = image_annotator_client.async_batch_annotate_files(requests) do |op|
266
- # raise op.results.message if op.error?
267
- # op_results = op.results
268
- # # Process the results.
269
- #
270
- # metadata = op.metadata
271
- # # Process the metadata.
272
- # end
273
- #
274
- # # Or use the return value to register a callback.
275
- # operation.on_done do |op|
276
- # raise op.results.message if op.error?
277
- # op_results = op.results
278
- # # Process the results.
279
- #
280
- # metadata = op.metadata
281
- # # Process the metadata.
282
- # end
283
- #
284
- # # Manually reload the operation.
285
- # operation.reload!
286
- #
287
- # # Or block until the operation completes, triggering callbacks on
288
- # # completion.
289
- # operation.wait_until_done!
290
-
291
- def async_batch_annotate_files \
292
- requests,
293
- options: nil
294
- req = {
295
- requests: requests
296
- }.delete_if { |_, v| v.nil? }
297
- req = Google::Gax::to_proto(req, Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesRequest)
298
- operation = Google::Gax::Operation.new(
299
- @async_batch_annotate_files.call(req, options),
300
- @operations_client,
301
- Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesResponse,
302
- Google::Cloud::Vision::V1p3beta1::OperationMetadata,
303
- call_options: options
304
- )
305
- operation.on_done { |operation| yield(operation) } if block_given?
306
- operation
307
- end
308
- end
309
- end
310
- end
311
- end
312
- end
@@ -1,36 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.cloud.vision.v1p3beta1.ImageAnnotator": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "UNAVAILABLE"
8
- ],
9
- "non_idempotent": []
10
- },
11
- "retry_params": {
12
- "default": {
13
- "initial_retry_delay_millis": 100,
14
- "retry_delay_multiplier": 1.3,
15
- "max_retry_delay_millis": 60000,
16
- "initial_rpc_timeout_millis": 60000,
17
- "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 60000,
19
- "total_timeout_millis": 600000
20
- }
21
- },
22
- "methods": {
23
- "BatchAnnotateImages": {
24
- "timeout_millis": 60000,
25
- "retry_codes_name": "idempotent",
26
- "retry_params_name": "default"
27
- },
28
- "AsyncBatchAnnotateFiles": {
29
- "timeout_millis": 60000,
30
- "retry_codes_name": "non_idempotent",
31
- "retry_params_name": "default"
32
- }
33
- }
34
- }
35
- }
36
- }
@@ -1,304 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/vision/v1p3beta1/image_annotator.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/cloud/vision/v1p3beta1/geometry_pb'
9
- require 'google/cloud/vision/v1p3beta1/product_search_pb'
10
- require 'google/cloud/vision/v1p3beta1/text_annotation_pb'
11
- require 'google/cloud/vision/v1p3beta1/web_detection_pb'
12
- require 'google/longrunning/operations_pb'
13
- require 'google/protobuf/timestamp_pb'
14
- require 'google/rpc/status_pb'
15
- require 'google/type/color_pb'
16
- require 'google/type/latlng_pb'
17
- Google::Protobuf::DescriptorPool.generated_pool.build do
18
- add_message "google.cloud.vision.v1p3beta1.Feature" do
19
- optional :type, :enum, 1, "google.cloud.vision.v1p3beta1.Feature.Type"
20
- optional :max_results, :int32, 2
21
- optional :model, :string, 3
22
- end
23
- add_enum "google.cloud.vision.v1p3beta1.Feature.Type" do
24
- value :TYPE_UNSPECIFIED, 0
25
- value :FACE_DETECTION, 1
26
- value :LANDMARK_DETECTION, 2
27
- value :LOGO_DETECTION, 3
28
- value :LABEL_DETECTION, 4
29
- value :TEXT_DETECTION, 5
30
- value :DOCUMENT_TEXT_DETECTION, 11
31
- value :SAFE_SEARCH_DETECTION, 6
32
- value :IMAGE_PROPERTIES, 7
33
- value :CROP_HINTS, 9
34
- value :WEB_DETECTION, 10
35
- value :PRODUCT_SEARCH, 12
36
- value :OBJECT_LOCALIZATION, 19
37
- end
38
- add_message "google.cloud.vision.v1p3beta1.ImageSource" do
39
- optional :gcs_image_uri, :string, 1
40
- optional :image_uri, :string, 2
41
- end
42
- add_message "google.cloud.vision.v1p3beta1.Image" do
43
- optional :content, :bytes, 1
44
- optional :source, :message, 2, "google.cloud.vision.v1p3beta1.ImageSource"
45
- end
46
- add_message "google.cloud.vision.v1p3beta1.FaceAnnotation" do
47
- optional :bounding_poly, :message, 1, "google.cloud.vision.v1p3beta1.BoundingPoly"
48
- optional :fd_bounding_poly, :message, 2, "google.cloud.vision.v1p3beta1.BoundingPoly"
49
- repeated :landmarks, :message, 3, "google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark"
50
- optional :roll_angle, :float, 4
51
- optional :pan_angle, :float, 5
52
- optional :tilt_angle, :float, 6
53
- optional :detection_confidence, :float, 7
54
- optional :landmarking_confidence, :float, 8
55
- optional :joy_likelihood, :enum, 9, "google.cloud.vision.v1p3beta1.Likelihood"
56
- optional :sorrow_likelihood, :enum, 10, "google.cloud.vision.v1p3beta1.Likelihood"
57
- optional :anger_likelihood, :enum, 11, "google.cloud.vision.v1p3beta1.Likelihood"
58
- optional :surprise_likelihood, :enum, 12, "google.cloud.vision.v1p3beta1.Likelihood"
59
- optional :under_exposed_likelihood, :enum, 13, "google.cloud.vision.v1p3beta1.Likelihood"
60
- optional :blurred_likelihood, :enum, 14, "google.cloud.vision.v1p3beta1.Likelihood"
61
- optional :headwear_likelihood, :enum, 15, "google.cloud.vision.v1p3beta1.Likelihood"
62
- end
63
- add_message "google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark" do
64
- optional :type, :enum, 3, "google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type"
65
- optional :position, :message, 4, "google.cloud.vision.v1p3beta1.Position"
66
- end
67
- add_enum "google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type" do
68
- value :UNKNOWN_LANDMARK, 0
69
- value :LEFT_EYE, 1
70
- value :RIGHT_EYE, 2
71
- value :LEFT_OF_LEFT_EYEBROW, 3
72
- value :RIGHT_OF_LEFT_EYEBROW, 4
73
- value :LEFT_OF_RIGHT_EYEBROW, 5
74
- value :RIGHT_OF_RIGHT_EYEBROW, 6
75
- value :MIDPOINT_BETWEEN_EYES, 7
76
- value :NOSE_TIP, 8
77
- value :UPPER_LIP, 9
78
- value :LOWER_LIP, 10
79
- value :MOUTH_LEFT, 11
80
- value :MOUTH_RIGHT, 12
81
- value :MOUTH_CENTER, 13
82
- value :NOSE_BOTTOM_RIGHT, 14
83
- value :NOSE_BOTTOM_LEFT, 15
84
- value :NOSE_BOTTOM_CENTER, 16
85
- value :LEFT_EYE_TOP_BOUNDARY, 17
86
- value :LEFT_EYE_RIGHT_CORNER, 18
87
- value :LEFT_EYE_BOTTOM_BOUNDARY, 19
88
- value :LEFT_EYE_LEFT_CORNER, 20
89
- value :RIGHT_EYE_TOP_BOUNDARY, 21
90
- value :RIGHT_EYE_RIGHT_CORNER, 22
91
- value :RIGHT_EYE_BOTTOM_BOUNDARY, 23
92
- value :RIGHT_EYE_LEFT_CORNER, 24
93
- value :LEFT_EYEBROW_UPPER_MIDPOINT, 25
94
- value :RIGHT_EYEBROW_UPPER_MIDPOINT, 26
95
- value :LEFT_EAR_TRAGION, 27
96
- value :RIGHT_EAR_TRAGION, 28
97
- value :LEFT_EYE_PUPIL, 29
98
- value :RIGHT_EYE_PUPIL, 30
99
- value :FOREHEAD_GLABELLA, 31
100
- value :CHIN_GNATHION, 32
101
- value :CHIN_LEFT_GONION, 33
102
- value :CHIN_RIGHT_GONION, 34
103
- end
104
- add_message "google.cloud.vision.v1p3beta1.LocationInfo" do
105
- optional :lat_lng, :message, 1, "google.type.LatLng"
106
- end
107
- add_message "google.cloud.vision.v1p3beta1.Property" do
108
- optional :name, :string, 1
109
- optional :value, :string, 2
110
- optional :uint64_value, :uint64, 3
111
- end
112
- add_message "google.cloud.vision.v1p3beta1.EntityAnnotation" do
113
- optional :mid, :string, 1
114
- optional :locale, :string, 2
115
- optional :description, :string, 3
116
- optional :score, :float, 4
117
- optional :confidence, :float, 5
118
- optional :topicality, :float, 6
119
- optional :bounding_poly, :message, 7, "google.cloud.vision.v1p3beta1.BoundingPoly"
120
- repeated :locations, :message, 8, "google.cloud.vision.v1p3beta1.LocationInfo"
121
- repeated :properties, :message, 9, "google.cloud.vision.v1p3beta1.Property"
122
- end
123
- add_message "google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation" do
124
- optional :mid, :string, 1
125
- optional :language_code, :string, 2
126
- optional :name, :string, 3
127
- optional :score, :float, 4
128
- optional :bounding_poly, :message, 5, "google.cloud.vision.v1p3beta1.BoundingPoly"
129
- end
130
- add_message "google.cloud.vision.v1p3beta1.SafeSearchAnnotation" do
131
- optional :adult, :enum, 1, "google.cloud.vision.v1p3beta1.Likelihood"
132
- optional :spoof, :enum, 2, "google.cloud.vision.v1p3beta1.Likelihood"
133
- optional :medical, :enum, 3, "google.cloud.vision.v1p3beta1.Likelihood"
134
- optional :violence, :enum, 4, "google.cloud.vision.v1p3beta1.Likelihood"
135
- optional :racy, :enum, 9, "google.cloud.vision.v1p3beta1.Likelihood"
136
- end
137
- add_message "google.cloud.vision.v1p3beta1.LatLongRect" do
138
- optional :min_lat_lng, :message, 1, "google.type.LatLng"
139
- optional :max_lat_lng, :message, 2, "google.type.LatLng"
140
- end
141
- add_message "google.cloud.vision.v1p3beta1.ColorInfo" do
142
- optional :color, :message, 1, "google.type.Color"
143
- optional :score, :float, 2
144
- optional :pixel_fraction, :float, 3
145
- end
146
- add_message "google.cloud.vision.v1p3beta1.DominantColorsAnnotation" do
147
- repeated :colors, :message, 1, "google.cloud.vision.v1p3beta1.ColorInfo"
148
- end
149
- add_message "google.cloud.vision.v1p3beta1.ImageProperties" do
150
- optional :dominant_colors, :message, 1, "google.cloud.vision.v1p3beta1.DominantColorsAnnotation"
151
- end
152
- add_message "google.cloud.vision.v1p3beta1.CropHint" do
153
- optional :bounding_poly, :message, 1, "google.cloud.vision.v1p3beta1.BoundingPoly"
154
- optional :confidence, :float, 2
155
- optional :importance_fraction, :float, 3
156
- end
157
- add_message "google.cloud.vision.v1p3beta1.CropHintsAnnotation" do
158
- repeated :crop_hints, :message, 1, "google.cloud.vision.v1p3beta1.CropHint"
159
- end
160
- add_message "google.cloud.vision.v1p3beta1.CropHintsParams" do
161
- repeated :aspect_ratios, :float, 1
162
- end
163
- add_message "google.cloud.vision.v1p3beta1.WebDetectionParams" do
164
- optional :include_geo_results, :bool, 2
165
- end
166
- add_message "google.cloud.vision.v1p3beta1.ImageContext" do
167
- optional :lat_long_rect, :message, 1, "google.cloud.vision.v1p3beta1.LatLongRect"
168
- repeated :language_hints, :string, 2
169
- optional :crop_hints_params, :message, 4, "google.cloud.vision.v1p3beta1.CropHintsParams"
170
- optional :product_search_params, :message, 5, "google.cloud.vision.v1p3beta1.ProductSearchParams"
171
- optional :web_detection_params, :message, 6, "google.cloud.vision.v1p3beta1.WebDetectionParams"
172
- end
173
- add_message "google.cloud.vision.v1p3beta1.AnnotateImageRequest" do
174
- optional :image, :message, 1, "google.cloud.vision.v1p3beta1.Image"
175
- repeated :features, :message, 2, "google.cloud.vision.v1p3beta1.Feature"
176
- optional :image_context, :message, 3, "google.cloud.vision.v1p3beta1.ImageContext"
177
- end
178
- add_message "google.cloud.vision.v1p3beta1.ImageAnnotationContext" do
179
- optional :uri, :string, 1
180
- optional :page_number, :int32, 2
181
- end
182
- add_message "google.cloud.vision.v1p3beta1.AnnotateImageResponse" do
183
- repeated :face_annotations, :message, 1, "google.cloud.vision.v1p3beta1.FaceAnnotation"
184
- repeated :landmark_annotations, :message, 2, "google.cloud.vision.v1p3beta1.EntityAnnotation"
185
- repeated :logo_annotations, :message, 3, "google.cloud.vision.v1p3beta1.EntityAnnotation"
186
- repeated :label_annotations, :message, 4, "google.cloud.vision.v1p3beta1.EntityAnnotation"
187
- repeated :localized_object_annotations, :message, 22, "google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation"
188
- repeated :text_annotations, :message, 5, "google.cloud.vision.v1p3beta1.EntityAnnotation"
189
- optional :full_text_annotation, :message, 12, "google.cloud.vision.v1p3beta1.TextAnnotation"
190
- optional :safe_search_annotation, :message, 6, "google.cloud.vision.v1p3beta1.SafeSearchAnnotation"
191
- optional :image_properties_annotation, :message, 8, "google.cloud.vision.v1p3beta1.ImageProperties"
192
- optional :crop_hints_annotation, :message, 11, "google.cloud.vision.v1p3beta1.CropHintsAnnotation"
193
- optional :web_detection, :message, 13, "google.cloud.vision.v1p3beta1.WebDetection"
194
- optional :product_search_results, :message, 14, "google.cloud.vision.v1p3beta1.ProductSearchResults"
195
- optional :error, :message, 9, "google.rpc.Status"
196
- optional :context, :message, 21, "google.cloud.vision.v1p3beta1.ImageAnnotationContext"
197
- end
198
- add_message "google.cloud.vision.v1p3beta1.AnnotateFileResponse" do
199
- optional :input_config, :message, 1, "google.cloud.vision.v1p3beta1.InputConfig"
200
- repeated :responses, :message, 2, "google.cloud.vision.v1p3beta1.AnnotateImageResponse"
201
- end
202
- add_message "google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest" do
203
- repeated :requests, :message, 1, "google.cloud.vision.v1p3beta1.AnnotateImageRequest"
204
- end
205
- add_message "google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse" do
206
- repeated :responses, :message, 1, "google.cloud.vision.v1p3beta1.AnnotateImageResponse"
207
- end
208
- add_message "google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest" do
209
- optional :input_config, :message, 1, "google.cloud.vision.v1p3beta1.InputConfig"
210
- repeated :features, :message, 2, "google.cloud.vision.v1p3beta1.Feature"
211
- optional :image_context, :message, 3, "google.cloud.vision.v1p3beta1.ImageContext"
212
- optional :output_config, :message, 4, "google.cloud.vision.v1p3beta1.OutputConfig"
213
- end
214
- add_message "google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse" do
215
- optional :output_config, :message, 1, "google.cloud.vision.v1p3beta1.OutputConfig"
216
- end
217
- add_message "google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest" do
218
- repeated :requests, :message, 1, "google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest"
219
- end
220
- add_message "google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse" do
221
- repeated :responses, :message, 1, "google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse"
222
- end
223
- add_message "google.cloud.vision.v1p3beta1.InputConfig" do
224
- optional :gcs_source, :message, 1, "google.cloud.vision.v1p3beta1.GcsSource"
225
- optional :mime_type, :string, 2
226
- end
227
- add_message "google.cloud.vision.v1p3beta1.OutputConfig" do
228
- optional :gcs_destination, :message, 1, "google.cloud.vision.v1p3beta1.GcsDestination"
229
- optional :batch_size, :int32, 2
230
- end
231
- add_message "google.cloud.vision.v1p3beta1.GcsSource" do
232
- optional :uri, :string, 1
233
- end
234
- add_message "google.cloud.vision.v1p3beta1.GcsDestination" do
235
- optional :uri, :string, 1
236
- end
237
- add_message "google.cloud.vision.v1p3beta1.OperationMetadata" do
238
- optional :state, :enum, 1, "google.cloud.vision.v1p3beta1.OperationMetadata.State"
239
- optional :create_time, :message, 5, "google.protobuf.Timestamp"
240
- optional :update_time, :message, 6, "google.protobuf.Timestamp"
241
- end
242
- add_enum "google.cloud.vision.v1p3beta1.OperationMetadata.State" do
243
- value :STATE_UNSPECIFIED, 0
244
- value :CREATED, 1
245
- value :RUNNING, 2
246
- value :DONE, 3
247
- value :CANCELLED, 4
248
- end
249
- add_enum "google.cloud.vision.v1p3beta1.Likelihood" do
250
- value :UNKNOWN, 0
251
- value :VERY_UNLIKELY, 1
252
- value :UNLIKELY, 2
253
- value :POSSIBLE, 3
254
- value :LIKELY, 4
255
- value :VERY_LIKELY, 5
256
- end
257
- end
258
-
259
- module Google
260
- module Cloud
261
- module Vision
262
- module V1p3beta1
263
- Feature = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Feature").msgclass
264
- Feature::Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Feature.Type").enummodule
265
- ImageSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImageSource").msgclass
266
- Image = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Image").msgclass
267
- FaceAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.FaceAnnotation").msgclass
268
- FaceAnnotation::Landmark = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark").msgclass
269
- FaceAnnotation::Landmark::Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type").enummodule
270
- LocationInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.LocationInfo").msgclass
271
- Property = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Property").msgclass
272
- EntityAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.EntityAnnotation").msgclass
273
- LocalizedObjectAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation").msgclass
274
- SafeSearchAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.SafeSearchAnnotation").msgclass
275
- LatLongRect = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.LatLongRect").msgclass
276
- ColorInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ColorInfo").msgclass
277
- DominantColorsAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.DominantColorsAnnotation").msgclass
278
- ImageProperties = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImageProperties").msgclass
279
- CropHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.CropHint").msgclass
280
- CropHintsAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.CropHintsAnnotation").msgclass
281
- CropHintsParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.CropHintsParams").msgclass
282
- WebDetectionParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.WebDetectionParams").msgclass
283
- ImageContext = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImageContext").msgclass
284
- AnnotateImageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AnnotateImageRequest").msgclass
285
- ImageAnnotationContext = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImageAnnotationContext").msgclass
286
- AnnotateImageResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AnnotateImageResponse").msgclass
287
- AnnotateFileResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AnnotateFileResponse").msgclass
288
- BatchAnnotateImagesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest").msgclass
289
- BatchAnnotateImagesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse").msgclass
290
- AsyncAnnotateFileRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest").msgclass
291
- AsyncAnnotateFileResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse").msgclass
292
- AsyncBatchAnnotateFilesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest").msgclass
293
- AsyncBatchAnnotateFilesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse").msgclass
294
- InputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.InputConfig").msgclass
295
- OutputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.OutputConfig").msgclass
296
- GcsSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.GcsSource").msgclass
297
- GcsDestination = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.GcsDestination").msgclass
298
- OperationMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.OperationMetadata").msgclass
299
- OperationMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.OperationMetadata.State").enummodule
300
- Likelihood = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Likelihood").enummodule
301
- end
302
- end
303
- end
304
- end