google-cloud-vision 0.38.0 → 1.0.0

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} +4 -11
  8. data/lib/google/cloud/vision.rb +131 -214
  9. data/lib/google/cloud/vision/version.rb +6 -2
  10. metadata +73 -101
  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 -39
  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 -519
  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 -1493
  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 -249
  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 -536
  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 -39
  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 -315
  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 -306
  63. data/lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb +0 -56
  64. data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +0 -1418
  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 -65
  67. data/lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb +0 -194
  68. data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +0 -223
  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,315 +0,0 @@
1
- # Copyright 2020 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
- if credentials.respond_to?(:quota_project_id) && credentials.quota_project_id
162
- headers[:"x-goog-user-project"] = credentials.quota_project_id
163
- end
164
- headers.merge!(metadata) unless metadata.nil?
165
- client_config_file = Pathname.new(__dir__).join(
166
- "image_annotator_client_config.json"
167
- )
168
- defaults = client_config_file.open do |f|
169
- Google::Gax.construct_settings(
170
- "google.cloud.vision.v1p3beta1.ImageAnnotator",
171
- JSON.parse(f.read),
172
- client_config,
173
- Google::Gax::Grpc::STATUS_CODE_NAMES,
174
- timeout,
175
- errors: Google::Gax::Grpc::API_ERRORS,
176
- metadata: headers
177
- )
178
- end
179
-
180
- # Allow overriding the service path/port in subclasses.
181
- service_path = service_address || self.class::SERVICE_ADDRESS
182
- port = service_port || self.class::DEFAULT_SERVICE_PORT
183
- interceptors = self.class::GRPC_INTERCEPTORS
184
- @image_annotator_stub = Google::Gax::Grpc.create_stub(
185
- service_path,
186
- port,
187
- chan_creds: chan_creds,
188
- channel: channel,
189
- updater_proc: updater_proc,
190
- scopes: scopes,
191
- interceptors: interceptors,
192
- &Google::Cloud::Vision::V1p3beta1::ImageAnnotator::Stub.method(:new)
193
- )
194
-
195
- @batch_annotate_images = Google::Gax.create_api_call(
196
- @image_annotator_stub.method(:batch_annotate_images),
197
- defaults["batch_annotate_images"],
198
- exception_transformer: exception_transformer
199
- )
200
- @async_batch_annotate_files = Google::Gax.create_api_call(
201
- @image_annotator_stub.method(:async_batch_annotate_files),
202
- defaults["async_batch_annotate_files"],
203
- exception_transformer: exception_transformer
204
- )
205
- end
206
-
207
- # Service calls
208
-
209
- # Run image detection and annotation for a batch of images.
210
- #
211
- # @param requests [Array<Google::Cloud::Vision::V1p3beta1::AnnotateImageRequest | Hash>]
212
- # Individual image annotation requests for this batch.
213
- # A hash of the same form as `Google::Cloud::Vision::V1p3beta1::AnnotateImageRequest`
214
- # can also be provided.
215
- # @param options [Google::Gax::CallOptions]
216
- # Overrides the default settings for this call, e.g, timeout,
217
- # retries, etc.
218
- # @yield [result, operation] Access the result along with the RPC operation
219
- # @yieldparam result [Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse]
220
- # @yieldparam operation [GRPC::ActiveCall::Operation]
221
- # @return [Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesResponse]
222
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
223
- # @example
224
- # require "google/cloud/vision"
225
- #
226
- # image_annotator_client = Google::Cloud::Vision::ImageAnnotator.new(version: :v1p3beta1)
227
- #
228
- # # TODO: Initialize `requests`:
229
- # requests = []
230
- # response = image_annotator_client.batch_annotate_images(requests)
231
-
232
- def batch_annotate_images \
233
- requests,
234
- options: nil,
235
- &block
236
- req = {
237
- requests: requests
238
- }.delete_if { |_, v| v.nil? }
239
- req = Google::Gax::to_proto(req, Google::Cloud::Vision::V1p3beta1::BatchAnnotateImagesRequest)
240
- @batch_annotate_images.call(req, options, &block)
241
- end
242
-
243
- # Run asynchronous image detection and annotation for a list of generic
244
- # files, such as PDF files, which may contain multiple pages and multiple
245
- # images per page. Progress and results can be retrieved through the
246
- # `google.longrunning.Operations` interface.
247
- # `Operation.metadata` contains `OperationMetadata` (metadata).
248
- # `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
249
- #
250
- # @param requests [Array<Google::Cloud::Vision::V1p3beta1::AsyncAnnotateFileRequest | Hash>]
251
- # Required. Individual async file annotation requests for this batch.
252
- # A hash of the same form as `Google::Cloud::Vision::V1p3beta1::AsyncAnnotateFileRequest`
253
- # can also be provided.
254
- # @param options [Google::Gax::CallOptions]
255
- # Overrides the default settings for this call, e.g, timeout,
256
- # retries, etc.
257
- # @return [Google::Gax::Operation]
258
- # @raise [Google::Gax::GaxError] if the RPC is aborted.
259
- # @example
260
- # require "google/cloud/vision"
261
- #
262
- # image_annotator_client = Google::Cloud::Vision::ImageAnnotator.new(version: :v1p3beta1)
263
- #
264
- # # TODO: Initialize `requests`:
265
- # requests = []
266
- #
267
- # # Register a callback during the method call.
268
- # operation = image_annotator_client.async_batch_annotate_files(requests) do |op|
269
- # raise op.results.message if op.error?
270
- # op_results = op.results
271
- # # Process the results.
272
- #
273
- # metadata = op.metadata
274
- # # Process the metadata.
275
- # end
276
- #
277
- # # Or use the return value to register a callback.
278
- # operation.on_done do |op|
279
- # raise op.results.message if op.error?
280
- # op_results = op.results
281
- # # Process the results.
282
- #
283
- # metadata = op.metadata
284
- # # Process the metadata.
285
- # end
286
- #
287
- # # Manually reload the operation.
288
- # operation.reload!
289
- #
290
- # # Or block until the operation completes, triggering callbacks on
291
- # # completion.
292
- # operation.wait_until_done!
293
-
294
- def async_batch_annotate_files \
295
- requests,
296
- options: nil
297
- req = {
298
- requests: requests
299
- }.delete_if { |_, v| v.nil? }
300
- req = Google::Gax::to_proto(req, Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesRequest)
301
- operation = Google::Gax::Operation.new(
302
- @async_batch_annotate_files.call(req, options),
303
- @operations_client,
304
- Google::Cloud::Vision::V1p3beta1::AsyncBatchAnnotateFilesResponse,
305
- Google::Cloud::Vision::V1p3beta1::OperationMetadata,
306
- call_options: options
307
- )
308
- operation.on_done { |operation| yield(operation) } if block_given?
309
- operation
310
- end
311
- end
312
- end
313
- end
314
- end
315
- 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,306 +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/api/client_pb'
9
- require 'google/api/field_behavior_pb'
10
- require 'google/cloud/vision/v1p3beta1/geometry_pb'
11
- require 'google/cloud/vision/v1p3beta1/product_search_pb'
12
- require 'google/cloud/vision/v1p3beta1/text_annotation_pb'
13
- require 'google/cloud/vision/v1p3beta1/web_detection_pb'
14
- require 'google/longrunning/operations_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_message "google.cloud.vision.v1p3beta1.Feature" do
21
- optional :type, :enum, 1, "google.cloud.vision.v1p3beta1.Feature.Type"
22
- optional :max_results, :int32, 2
23
- optional :model, :string, 3
24
- end
25
- add_enum "google.cloud.vision.v1p3beta1.Feature.Type" do
26
- value :TYPE_UNSPECIFIED, 0
27
- value :FACE_DETECTION, 1
28
- value :LANDMARK_DETECTION, 2
29
- value :LOGO_DETECTION, 3
30
- value :LABEL_DETECTION, 4
31
- value :TEXT_DETECTION, 5
32
- value :DOCUMENT_TEXT_DETECTION, 11
33
- value :SAFE_SEARCH_DETECTION, 6
34
- value :IMAGE_PROPERTIES, 7
35
- value :CROP_HINTS, 9
36
- value :WEB_DETECTION, 10
37
- value :PRODUCT_SEARCH, 12
38
- value :OBJECT_LOCALIZATION, 19
39
- end
40
- add_message "google.cloud.vision.v1p3beta1.ImageSource" do
41
- optional :gcs_image_uri, :string, 1
42
- optional :image_uri, :string, 2
43
- end
44
- add_message "google.cloud.vision.v1p3beta1.Image" do
45
- optional :content, :bytes, 1
46
- optional :source, :message, 2, "google.cloud.vision.v1p3beta1.ImageSource"
47
- end
48
- add_message "google.cloud.vision.v1p3beta1.FaceAnnotation" do
49
- optional :bounding_poly, :message, 1, "google.cloud.vision.v1p3beta1.BoundingPoly"
50
- optional :fd_bounding_poly, :message, 2, "google.cloud.vision.v1p3beta1.BoundingPoly"
51
- repeated :landmarks, :message, 3, "google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark"
52
- optional :roll_angle, :float, 4
53
- optional :pan_angle, :float, 5
54
- optional :tilt_angle, :float, 6
55
- optional :detection_confidence, :float, 7
56
- optional :landmarking_confidence, :float, 8
57
- optional :joy_likelihood, :enum, 9, "google.cloud.vision.v1p3beta1.Likelihood"
58
- optional :sorrow_likelihood, :enum, 10, "google.cloud.vision.v1p3beta1.Likelihood"
59
- optional :anger_likelihood, :enum, 11, "google.cloud.vision.v1p3beta1.Likelihood"
60
- optional :surprise_likelihood, :enum, 12, "google.cloud.vision.v1p3beta1.Likelihood"
61
- optional :under_exposed_likelihood, :enum, 13, "google.cloud.vision.v1p3beta1.Likelihood"
62
- optional :blurred_likelihood, :enum, 14, "google.cloud.vision.v1p3beta1.Likelihood"
63
- optional :headwear_likelihood, :enum, 15, "google.cloud.vision.v1p3beta1.Likelihood"
64
- end
65
- add_message "google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark" do
66
- optional :type, :enum, 3, "google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type"
67
- optional :position, :message, 4, "google.cloud.vision.v1p3beta1.Position"
68
- end
69
- add_enum "google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type" do
70
- value :UNKNOWN_LANDMARK, 0
71
- value :LEFT_EYE, 1
72
- value :RIGHT_EYE, 2
73
- value :LEFT_OF_LEFT_EYEBROW, 3
74
- value :RIGHT_OF_LEFT_EYEBROW, 4
75
- value :LEFT_OF_RIGHT_EYEBROW, 5
76
- value :RIGHT_OF_RIGHT_EYEBROW, 6
77
- value :MIDPOINT_BETWEEN_EYES, 7
78
- value :NOSE_TIP, 8
79
- value :UPPER_LIP, 9
80
- value :LOWER_LIP, 10
81
- value :MOUTH_LEFT, 11
82
- value :MOUTH_RIGHT, 12
83
- value :MOUTH_CENTER, 13
84
- value :NOSE_BOTTOM_RIGHT, 14
85
- value :NOSE_BOTTOM_LEFT, 15
86
- value :NOSE_BOTTOM_CENTER, 16
87
- value :LEFT_EYE_TOP_BOUNDARY, 17
88
- value :LEFT_EYE_RIGHT_CORNER, 18
89
- value :LEFT_EYE_BOTTOM_BOUNDARY, 19
90
- value :LEFT_EYE_LEFT_CORNER, 20
91
- value :RIGHT_EYE_TOP_BOUNDARY, 21
92
- value :RIGHT_EYE_RIGHT_CORNER, 22
93
- value :RIGHT_EYE_BOTTOM_BOUNDARY, 23
94
- value :RIGHT_EYE_LEFT_CORNER, 24
95
- value :LEFT_EYEBROW_UPPER_MIDPOINT, 25
96
- value :RIGHT_EYEBROW_UPPER_MIDPOINT, 26
97
- value :LEFT_EAR_TRAGION, 27
98
- value :RIGHT_EAR_TRAGION, 28
99
- value :LEFT_EYE_PUPIL, 29
100
- value :RIGHT_EYE_PUPIL, 30
101
- value :FOREHEAD_GLABELLA, 31
102
- value :CHIN_GNATHION, 32
103
- value :CHIN_LEFT_GONION, 33
104
- value :CHIN_RIGHT_GONION, 34
105
- end
106
- add_message "google.cloud.vision.v1p3beta1.LocationInfo" do
107
- optional :lat_lng, :message, 1, "google.type.LatLng"
108
- end
109
- add_message "google.cloud.vision.v1p3beta1.Property" do
110
- optional :name, :string, 1
111
- optional :value, :string, 2
112
- optional :uint64_value, :uint64, 3
113
- end
114
- add_message "google.cloud.vision.v1p3beta1.EntityAnnotation" do
115
- optional :mid, :string, 1
116
- optional :locale, :string, 2
117
- optional :description, :string, 3
118
- optional :score, :float, 4
119
- optional :confidence, :float, 5
120
- optional :topicality, :float, 6
121
- optional :bounding_poly, :message, 7, "google.cloud.vision.v1p3beta1.BoundingPoly"
122
- repeated :locations, :message, 8, "google.cloud.vision.v1p3beta1.LocationInfo"
123
- repeated :properties, :message, 9, "google.cloud.vision.v1p3beta1.Property"
124
- end
125
- add_message "google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation" do
126
- optional :mid, :string, 1
127
- optional :language_code, :string, 2
128
- optional :name, :string, 3
129
- optional :score, :float, 4
130
- optional :bounding_poly, :message, 5, "google.cloud.vision.v1p3beta1.BoundingPoly"
131
- end
132
- add_message "google.cloud.vision.v1p3beta1.SafeSearchAnnotation" do
133
- optional :adult, :enum, 1, "google.cloud.vision.v1p3beta1.Likelihood"
134
- optional :spoof, :enum, 2, "google.cloud.vision.v1p3beta1.Likelihood"
135
- optional :medical, :enum, 3, "google.cloud.vision.v1p3beta1.Likelihood"
136
- optional :violence, :enum, 4, "google.cloud.vision.v1p3beta1.Likelihood"
137
- optional :racy, :enum, 9, "google.cloud.vision.v1p3beta1.Likelihood"
138
- end
139
- add_message "google.cloud.vision.v1p3beta1.LatLongRect" do
140
- optional :min_lat_lng, :message, 1, "google.type.LatLng"
141
- optional :max_lat_lng, :message, 2, "google.type.LatLng"
142
- end
143
- add_message "google.cloud.vision.v1p3beta1.ColorInfo" do
144
- optional :color, :message, 1, "google.type.Color"
145
- optional :score, :float, 2
146
- optional :pixel_fraction, :float, 3
147
- end
148
- add_message "google.cloud.vision.v1p3beta1.DominantColorsAnnotation" do
149
- repeated :colors, :message, 1, "google.cloud.vision.v1p3beta1.ColorInfo"
150
- end
151
- add_message "google.cloud.vision.v1p3beta1.ImageProperties" do
152
- optional :dominant_colors, :message, 1, "google.cloud.vision.v1p3beta1.DominantColorsAnnotation"
153
- end
154
- add_message "google.cloud.vision.v1p3beta1.CropHint" do
155
- optional :bounding_poly, :message, 1, "google.cloud.vision.v1p3beta1.BoundingPoly"
156
- optional :confidence, :float, 2
157
- optional :importance_fraction, :float, 3
158
- end
159
- add_message "google.cloud.vision.v1p3beta1.CropHintsAnnotation" do
160
- repeated :crop_hints, :message, 1, "google.cloud.vision.v1p3beta1.CropHint"
161
- end
162
- add_message "google.cloud.vision.v1p3beta1.CropHintsParams" do
163
- repeated :aspect_ratios, :float, 1
164
- end
165
- add_message "google.cloud.vision.v1p3beta1.WebDetectionParams" do
166
- optional :include_geo_results, :bool, 2
167
- end
168
- add_message "google.cloud.vision.v1p3beta1.ImageContext" do
169
- optional :lat_long_rect, :message, 1, "google.cloud.vision.v1p3beta1.LatLongRect"
170
- repeated :language_hints, :string, 2
171
- optional :crop_hints_params, :message, 4, "google.cloud.vision.v1p3beta1.CropHintsParams"
172
- optional :product_search_params, :message, 5, "google.cloud.vision.v1p3beta1.ProductSearchParams"
173
- optional :web_detection_params, :message, 6, "google.cloud.vision.v1p3beta1.WebDetectionParams"
174
- end
175
- add_message "google.cloud.vision.v1p3beta1.AnnotateImageRequest" do
176
- optional :image, :message, 1, "google.cloud.vision.v1p3beta1.Image"
177
- repeated :features, :message, 2, "google.cloud.vision.v1p3beta1.Feature"
178
- optional :image_context, :message, 3, "google.cloud.vision.v1p3beta1.ImageContext"
179
- end
180
- add_message "google.cloud.vision.v1p3beta1.ImageAnnotationContext" do
181
- optional :uri, :string, 1
182
- optional :page_number, :int32, 2
183
- end
184
- add_message "google.cloud.vision.v1p3beta1.AnnotateImageResponse" do
185
- repeated :face_annotations, :message, 1, "google.cloud.vision.v1p3beta1.FaceAnnotation"
186
- repeated :landmark_annotations, :message, 2, "google.cloud.vision.v1p3beta1.EntityAnnotation"
187
- repeated :logo_annotations, :message, 3, "google.cloud.vision.v1p3beta1.EntityAnnotation"
188
- repeated :label_annotations, :message, 4, "google.cloud.vision.v1p3beta1.EntityAnnotation"
189
- repeated :localized_object_annotations, :message, 22, "google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation"
190
- repeated :text_annotations, :message, 5, "google.cloud.vision.v1p3beta1.EntityAnnotation"
191
- optional :full_text_annotation, :message, 12, "google.cloud.vision.v1p3beta1.TextAnnotation"
192
- optional :safe_search_annotation, :message, 6, "google.cloud.vision.v1p3beta1.SafeSearchAnnotation"
193
- optional :image_properties_annotation, :message, 8, "google.cloud.vision.v1p3beta1.ImageProperties"
194
- optional :crop_hints_annotation, :message, 11, "google.cloud.vision.v1p3beta1.CropHintsAnnotation"
195
- optional :web_detection, :message, 13, "google.cloud.vision.v1p3beta1.WebDetection"
196
- optional :product_search_results, :message, 14, "google.cloud.vision.v1p3beta1.ProductSearchResults"
197
- optional :error, :message, 9, "google.rpc.Status"
198
- optional :context, :message, 21, "google.cloud.vision.v1p3beta1.ImageAnnotationContext"
199
- end
200
- add_message "google.cloud.vision.v1p3beta1.AnnotateFileResponse" do
201
- optional :input_config, :message, 1, "google.cloud.vision.v1p3beta1.InputConfig"
202
- repeated :responses, :message, 2, "google.cloud.vision.v1p3beta1.AnnotateImageResponse"
203
- end
204
- add_message "google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest" do
205
- repeated :requests, :message, 1, "google.cloud.vision.v1p3beta1.AnnotateImageRequest"
206
- end
207
- add_message "google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse" do
208
- repeated :responses, :message, 1, "google.cloud.vision.v1p3beta1.AnnotateImageResponse"
209
- end
210
- add_message "google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest" do
211
- optional :input_config, :message, 1, "google.cloud.vision.v1p3beta1.InputConfig"
212
- repeated :features, :message, 2, "google.cloud.vision.v1p3beta1.Feature"
213
- optional :image_context, :message, 3, "google.cloud.vision.v1p3beta1.ImageContext"
214
- optional :output_config, :message, 4, "google.cloud.vision.v1p3beta1.OutputConfig"
215
- end
216
- add_message "google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse" do
217
- optional :output_config, :message, 1, "google.cloud.vision.v1p3beta1.OutputConfig"
218
- end
219
- add_message "google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest" do
220
- repeated :requests, :message, 1, "google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest"
221
- end
222
- add_message "google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse" do
223
- repeated :responses, :message, 1, "google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse"
224
- end
225
- add_message "google.cloud.vision.v1p3beta1.InputConfig" do
226
- optional :gcs_source, :message, 1, "google.cloud.vision.v1p3beta1.GcsSource"
227
- optional :mime_type, :string, 2
228
- end
229
- add_message "google.cloud.vision.v1p3beta1.OutputConfig" do
230
- optional :gcs_destination, :message, 1, "google.cloud.vision.v1p3beta1.GcsDestination"
231
- optional :batch_size, :int32, 2
232
- end
233
- add_message "google.cloud.vision.v1p3beta1.GcsSource" do
234
- optional :uri, :string, 1
235
- end
236
- add_message "google.cloud.vision.v1p3beta1.GcsDestination" do
237
- optional :uri, :string, 1
238
- end
239
- add_message "google.cloud.vision.v1p3beta1.OperationMetadata" do
240
- optional :state, :enum, 1, "google.cloud.vision.v1p3beta1.OperationMetadata.State"
241
- optional :create_time, :message, 5, "google.protobuf.Timestamp"
242
- optional :update_time, :message, 6, "google.protobuf.Timestamp"
243
- end
244
- add_enum "google.cloud.vision.v1p3beta1.OperationMetadata.State" do
245
- value :STATE_UNSPECIFIED, 0
246
- value :CREATED, 1
247
- value :RUNNING, 2
248
- value :DONE, 3
249
- value :CANCELLED, 4
250
- end
251
- add_enum "google.cloud.vision.v1p3beta1.Likelihood" do
252
- value :UNKNOWN, 0
253
- value :VERY_UNLIKELY, 1
254
- value :UNLIKELY, 2
255
- value :POSSIBLE, 3
256
- value :LIKELY, 4
257
- value :VERY_LIKELY, 5
258
- end
259
- end
260
-
261
- module Google
262
- module Cloud
263
- module Vision
264
- module V1p3beta1
265
- Feature = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Feature").msgclass
266
- Feature::Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Feature.Type").enummodule
267
- ImageSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImageSource").msgclass
268
- Image = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Image").msgclass
269
- FaceAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.FaceAnnotation").msgclass
270
- FaceAnnotation::Landmark = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark").msgclass
271
- FaceAnnotation::Landmark::Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type").enummodule
272
- LocationInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.LocationInfo").msgclass
273
- Property = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Property").msgclass
274
- EntityAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.EntityAnnotation").msgclass
275
- LocalizedObjectAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation").msgclass
276
- SafeSearchAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.SafeSearchAnnotation").msgclass
277
- LatLongRect = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.LatLongRect").msgclass
278
- ColorInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ColorInfo").msgclass
279
- DominantColorsAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.DominantColorsAnnotation").msgclass
280
- ImageProperties = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImageProperties").msgclass
281
- CropHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.CropHint").msgclass
282
- CropHintsAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.CropHintsAnnotation").msgclass
283
- CropHintsParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.CropHintsParams").msgclass
284
- WebDetectionParams = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.WebDetectionParams").msgclass
285
- ImageContext = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImageContext").msgclass
286
- AnnotateImageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AnnotateImageRequest").msgclass
287
- ImageAnnotationContext = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.ImageAnnotationContext").msgclass
288
- AnnotateImageResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AnnotateImageResponse").msgclass
289
- AnnotateFileResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AnnotateFileResponse").msgclass
290
- BatchAnnotateImagesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest").msgclass
291
- BatchAnnotateImagesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse").msgclass
292
- AsyncAnnotateFileRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest").msgclass
293
- AsyncAnnotateFileResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse").msgclass
294
- AsyncBatchAnnotateFilesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest").msgclass
295
- AsyncBatchAnnotateFilesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse").msgclass
296
- InputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.InputConfig").msgclass
297
- OutputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.OutputConfig").msgclass
298
- GcsSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.GcsSource").msgclass
299
- GcsDestination = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.GcsDestination").msgclass
300
- OperationMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.OperationMetadata").msgclass
301
- OperationMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.OperationMetadata.State").enummodule
302
- Likelihood = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Likelihood").enummodule
303
- end
304
- end
305
- end
306
- end