google-api-client 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  4. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +0 -8
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +0 -1
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +28 -184
  7. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  8. data/generated/google/apis/analyticsreporting_v4/classes.rb +56 -0
  9. data/generated/google/apis/analyticsreporting_v4/representations.rb +18 -0
  10. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  11. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  12. data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +116 -0
  13. data/generated/google/apis/bigquerydatatransfer_v1/representations.rb +17 -0
  14. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  15. data/generated/google/apis/cloudtasks_v2beta2/service.rb +2 -0
  16. data/generated/google/apis/cloudtrace_v1.rb +4 -5
  17. data/generated/google/apis/cloudtrace_v1/service.rb +3 -4
  18. data/generated/google/apis/cloudtrace_v2.rb +4 -5
  19. data/generated/google/apis/cloudtrace_v2/classes.rb +18 -16
  20. data/generated/google/apis/cloudtrace_v2/service.rb +13 -16
  21. data/generated/google/apis/container_v1.rb +1 -1
  22. data/generated/google/apis/container_v1/classes.rb +1 -1
  23. data/generated/google/apis/container_v1beta1.rb +1 -1
  24. data/generated/google/apis/container_v1beta1/classes.rb +335 -1
  25. data/generated/google/apis/container_v1beta1/representations.rb +107 -0
  26. data/generated/google/apis/container_v1beta1/service.rb +482 -0
  27. data/generated/google/apis/deploymentmanager_alpha.rb +1 -1
  28. data/generated/google/apis/deploymentmanager_alpha/classes.rb +2 -1
  29. data/generated/google/apis/deploymentmanager_v2beta.rb +1 -1
  30. data/generated/google/apis/deploymentmanager_v2beta/classes.rb +2 -1
  31. data/generated/google/apis/dfareporting_v2_7.rb +1 -1
  32. data/generated/google/apis/dfareporting_v2_7/classes.rb +6 -3
  33. data/generated/google/apis/dfareporting_v2_8.rb +1 -1
  34. data/generated/google/apis/dfareporting_v2_8/classes.rb +8 -5
  35. data/generated/google/apis/dfareporting_v3_0.rb +40 -0
  36. data/generated/google/apis/dfareporting_v3_0/classes.rb +12117 -0
  37. data/generated/google/apis/dfareporting_v3_0/representations.rb +4336 -0
  38. data/generated/google/apis/dfareporting_v3_0/service.rb +9108 -0
  39. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  40. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +9 -0
  41. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +1 -0
  42. data/generated/google/apis/firestore_v1beta1.rb +1 -1
  43. data/generated/google/apis/firestore_v1beta1/classes.rb +1 -0
  44. data/generated/google/apis/ml_v1.rb +1 -1
  45. data/generated/google/apis/ml_v1/classes.rb +76 -3
  46. data/generated/google/apis/ml_v1/representations.rb +7 -0
  47. data/generated/google/apis/ml_v1/service.rb +53 -0
  48. data/generated/google/apis/monitoring_v3.rb +1 -1
  49. data/generated/google/apis/monitoring_v3/service.rb +1 -5
  50. data/generated/google/apis/oslogin_v1alpha.rb +2 -2
  51. data/generated/google/apis/oslogin_v1alpha/service.rb +1 -1
  52. data/generated/google/apis/oslogin_v1beta.rb +2 -2
  53. data/generated/google/apis/oslogin_v1beta/service.rb +1 -1
  54. data/generated/google/apis/people_v1.rb +1 -1
  55. data/generated/google/apis/people_v1/classes.rb +2 -0
  56. data/generated/google/apis/people_v1/service.rb +0 -4
  57. data/generated/google/apis/script_v1.rb +1 -1
  58. data/generated/google/apis/script_v1/classes.rb +5 -6
  59. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  60. data/generated/google/apis/servicemanagement_v1/classes.rb +0 -8
  61. data/generated/google/apis/servicemanagement_v1/representations.rb +0 -1
  62. data/generated/google/apis/serviceuser_v1.rb +1 -1
  63. data/generated/google/apis/serviceuser_v1/classes.rb +0 -8
  64. data/generated/google/apis/serviceuser_v1/representations.rb +0 -1
  65. data/generated/google/apis/spanner_v1.rb +1 -1
  66. data/generated/google/apis/spanner_v1/classes.rb +13 -14
  67. data/generated/google/apis/spanner_v1/service.rb +13 -13
  68. data/generated/google/apis/tagmanager_v1.rb +1 -1
  69. data/generated/google/apis/tagmanager_v1/classes.rb +70 -9
  70. data/generated/google/apis/tagmanager_v1/representations.rb +22 -3
  71. data/generated/google/apis/tagmanager_v2.rb +1 -1
  72. data/generated/google/apis/tagmanager_v2/classes.rb +7 -0
  73. data/generated/google/apis/tagmanager_v2/representations.rb +1 -0
  74. data/generated/google/apis/vision_v1.rb +1 -1
  75. data/generated/google/apis/vision_v1/classes.rb +434 -434
  76. data/generated/google/apis/vision_v1/representations.rb +178 -178
  77. data/generated/google/apis/vision_v1/service.rb +8 -8
  78. data/generated/google/apis/vision_v1p1beta1.rb +39 -0
  79. data/generated/google/apis/vision_v1p1beta1/classes.rb +1800 -0
  80. data/generated/google/apis/vision_v1p1beta1/representations.rb +728 -0
  81. data/generated/google/apis/vision_v1p1beta1/service.rb +91 -0
  82. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  83. data/lib/google/apis/version.rb +1 -1
  84. metadata +10 -2
@@ -50,7 +50,7 @@ module Google
50
50
  end
51
51
 
52
52
  # Run image detection and annotation for a batch of images.
53
- # @param [Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesRequest] google_cloud_vision_v1_batch_annotate_images_request_object
53
+ # @param [Google::Apis::VisionV1::BatchAnnotateImagesRequest] batch_annotate_images_request_object
54
54
  # @param [String] fields
55
55
  # Selector specifying which fields to include in a partial response.
56
56
  # @param [String] quota_user
@@ -60,20 +60,20 @@ module Google
60
60
  # Request-specific options
61
61
  #
62
62
  # @yield [result, err] Result & error if block supplied
63
- # @yieldparam result [Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesResponse] parsed result object
63
+ # @yieldparam result [Google::Apis::VisionV1::BatchAnnotateImagesResponse] parsed result object
64
64
  # @yieldparam err [StandardError] error object if request failed
65
65
  #
66
- # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesResponse]
66
+ # @return [Google::Apis::VisionV1::BatchAnnotateImagesResponse]
67
67
  #
68
68
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
69
69
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
70
70
  # @raise [Google::Apis::AuthorizationError] Authorization is required
71
- def annotate_image(google_cloud_vision_v1_batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
71
+ def annotate_image(batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
72
72
  command = make_simple_command(:post, 'v1/images:annotate', options)
73
- command.request_representation = Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesRequest::Representation
74
- command.request_object = google_cloud_vision_v1_batch_annotate_images_request_object
75
- command.response_representation = Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesResponse::Representation
76
- command.response_class = Google::Apis::VisionV1::GoogleCloudVisionV1BatchAnnotateImagesResponse
73
+ command.request_representation = Google::Apis::VisionV1::BatchAnnotateImagesRequest::Representation
74
+ command.request_object = batch_annotate_images_request_object
75
+ command.response_representation = Google::Apis::VisionV1::BatchAnnotateImagesResponse::Representation
76
+ command.response_class = Google::Apis::VisionV1::BatchAnnotateImagesResponse
77
77
  command.query['fields'] = fields unless fields.nil?
78
78
  command.query['quotaUser'] = quota_user unless quota_user.nil?
79
79
  execute_or_queue_command(command, &block)
@@ -0,0 +1,39 @@
1
+ # Copyright 2015 Google Inc.
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
+ # http://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
+ require 'google/apis/vision_v1p1beta1/service.rb'
16
+ require 'google/apis/vision_v1p1beta1/classes.rb'
17
+ require 'google/apis/vision_v1p1beta1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Google Cloud Vision API
22
+ #
23
+ # Integrates Google Vision features, including image labeling, face, logo, and
24
+ # landmark detection, optical character recognition (OCR), and detection of
25
+ # explicit content, into applications.
26
+ #
27
+ # @see https://cloud.google.com/vision/
28
+ module VisionV1p1beta1
29
+ VERSION = 'V1p1beta1'
30
+ REVISION = '20171107'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+
35
+ # Apply machine learning models to understand and label images
36
+ AUTH_CLOUD_VISION = 'https://www.googleapis.com/auth/cloud-vision'
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,1800 @@
1
+ # Copyright 2015 Google Inc.
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
+ # http://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
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module VisionV1p1beta1
24
+
25
+ # Represents a color in the RGBA color space. This representation is designed
26
+ # for simplicity of conversion to/from color representations in various
27
+ # languages over compactness; for example, the fields of this representation
28
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
29
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
30
+ # method in iOS; and, with just a little work, it can be easily formatted into
31
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
32
+ # Example (Java):
33
+ # import com.google.type.Color;
34
+ # // ...
35
+ # public static java.awt.Color fromProto(Color protocolor) `
36
+ # float alpha = protocolor.hasAlpha()
37
+ # ? protocolor.getAlpha().getValue()
38
+ # : 1.0;
39
+ # return new java.awt.Color(
40
+ # protocolor.getRed(),
41
+ # protocolor.getGreen(),
42
+ # protocolor.getBlue(),
43
+ # alpha);
44
+ # `
45
+ # public static Color toProto(java.awt.Color color) `
46
+ # float red = (float) color.getRed();
47
+ # float green = (float) color.getGreen();
48
+ # float blue = (float) color.getBlue();
49
+ # float denominator = 255.0;
50
+ # Color.Builder resultBuilder =
51
+ # Color
52
+ # .newBuilder()
53
+ # .setRed(red / denominator)
54
+ # .setGreen(green / denominator)
55
+ # .setBlue(blue / denominator);
56
+ # int alpha = color.getAlpha();
57
+ # if (alpha != 255) `
58
+ # result.setAlpha(
59
+ # FloatValue
60
+ # .newBuilder()
61
+ # .setValue(((float) alpha) / denominator)
62
+ # .build());
63
+ # `
64
+ # return resultBuilder.build();
65
+ # `
66
+ # // ...
67
+ # Example (iOS / Obj-C):
68
+ # // ...
69
+ # static UIColor* fromProto(Color* protocolor) `
70
+ # float red = [protocolor red];
71
+ # float green = [protocolor green];
72
+ # float blue = [protocolor blue];
73
+ # FloatValue* alpha_wrapper = [protocolor alpha];
74
+ # float alpha = 1.0;
75
+ # if (alpha_wrapper != nil) `
76
+ # alpha = [alpha_wrapper value];
77
+ # `
78
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
79
+ # `
80
+ # static Color* toProto(UIColor* color) `
81
+ # CGFloat red, green, blue, alpha;
82
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
83
+ # return nil;
84
+ # `
85
+ # Color* result = [Color alloc] init];
86
+ # [result setRed:red];
87
+ # [result setGreen:green];
88
+ # [result setBlue:blue];
89
+ # if (alpha <= 0.9999) `
90
+ # [result setAlpha:floatWrapperWithValue(alpha)];
91
+ # `
92
+ # [result autorelease];
93
+ # return result;
94
+ # `
95
+ # // ...
96
+ # Example (JavaScript):
97
+ # // ...
98
+ # var protoToCssColor = function(rgb_color) `
99
+ # var redFrac = rgb_color.red || 0.0;
100
+ # var greenFrac = rgb_color.green || 0.0;
101
+ # var blueFrac = rgb_color.blue || 0.0;
102
+ # var red = Math.floor(redFrac * 255);
103
+ # var green = Math.floor(greenFrac * 255);
104
+ # var blue = Math.floor(blueFrac * 255);
105
+ # if (!('alpha' in rgb_color)) `
106
+ # return rgbToCssColor_(red, green, blue);
107
+ # `
108
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
109
+ # var rgbParams = [red, green, blue].join(',');
110
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
111
+ # `;
112
+ # var rgbToCssColor_ = function(red, green, blue) `
113
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
114
+ # var hexString = rgbNumber.toString(16);
115
+ # var missingZeros = 6 - hexString.length;
116
+ # var resultBuilder = ['#'];
117
+ # for (var i = 0; i < missingZeros; i++) `
118
+ # resultBuilder.push('0');
119
+ # `
120
+ # resultBuilder.push(hexString);
121
+ # return resultBuilder.join('');
122
+ # `;
123
+ # // ...
124
+ class Color
125
+ include Google::Apis::Core::Hashable
126
+
127
+ # The fraction of this color that should be applied to the pixel. That is,
128
+ # the final pixel color is defined by the equation:
129
+ # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
130
+ # This means that a value of 1.0 corresponds to a solid color, whereas
131
+ # a value of 0.0 corresponds to a completely transparent color. This
132
+ # uses a wrapper message rather than a simple float scalar so that it is
133
+ # possible to distinguish between a default value and the value being unset.
134
+ # If omitted, this color object is to be rendered as a solid color
135
+ # (as if the alpha value had been explicitly given with a value of 1.0).
136
+ # Corresponds to the JSON property `alpha`
137
+ # @return [Float]
138
+ attr_accessor :alpha
139
+
140
+ # The amount of blue in the color as a value in the interval [0, 1].
141
+ # Corresponds to the JSON property `blue`
142
+ # @return [Float]
143
+ attr_accessor :blue
144
+
145
+ # The amount of green in the color as a value in the interval [0, 1].
146
+ # Corresponds to the JSON property `green`
147
+ # @return [Float]
148
+ attr_accessor :green
149
+
150
+ # The amount of red in the color as a value in the interval [0, 1].
151
+ # Corresponds to the JSON property `red`
152
+ # @return [Float]
153
+ attr_accessor :red
154
+
155
+ def initialize(**args)
156
+ update!(**args)
157
+ end
158
+
159
+ # Update properties of this object
160
+ def update!(**args)
161
+ @alpha = args[:alpha] if args.key?(:alpha)
162
+ @blue = args[:blue] if args.key?(:blue)
163
+ @green = args[:green] if args.key?(:green)
164
+ @red = args[:red] if args.key?(:red)
165
+ end
166
+ end
167
+
168
+ # Request for performing Google Cloud Vision API tasks over a user-provided
169
+ # image, with user-requested features.
170
+ class GoogleCloudVisionV1p1beta1AnnotateImageRequest
171
+ include Google::Apis::Core::Hashable
172
+
173
+ # Requested features.
174
+ # Corresponds to the JSON property `features`
175
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Feature>]
176
+ attr_accessor :features
177
+
178
+ # Client image to perform Google Cloud Vision API tasks over.
179
+ # Corresponds to the JSON property `image`
180
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Image]
181
+ attr_accessor :image
182
+
183
+ # Image context and/or feature-specific parameters.
184
+ # Corresponds to the JSON property `imageContext`
185
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1ImageContext]
186
+ attr_accessor :image_context
187
+
188
+ def initialize(**args)
189
+ update!(**args)
190
+ end
191
+
192
+ # Update properties of this object
193
+ def update!(**args)
194
+ @features = args[:features] if args.key?(:features)
195
+ @image = args[:image] if args.key?(:image)
196
+ @image_context = args[:image_context] if args.key?(:image_context)
197
+ end
198
+ end
199
+
200
+ # Response to an image annotation request.
201
+ class GoogleCloudVisionV1p1beta1AnnotateImageResponse
202
+ include Google::Apis::Core::Hashable
203
+
204
+ # Set of crop hints that are used to generate new crops when serving images.
205
+ # Corresponds to the JSON property `cropHintsAnnotation`
206
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1CropHintsAnnotation]
207
+ attr_accessor :crop_hints_annotation
208
+
209
+ # The `Status` type defines a logical error model that is suitable for different
210
+ # programming environments, including REST APIs and RPC APIs. It is used by
211
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
212
+ # - Simple to use and understand for most users
213
+ # - Flexible enough to meet unexpected needs
214
+ # # Overview
215
+ # The `Status` message contains three pieces of data: error code, error message,
216
+ # and error details. The error code should be an enum value of
217
+ # google.rpc.Code, but it may accept additional error codes if needed. The
218
+ # error message should be a developer-facing English message that helps
219
+ # developers *understand* and *resolve* the error. If a localized user-facing
220
+ # error message is needed, put the localized message in the error details or
221
+ # localize it in the client. The optional error details may contain arbitrary
222
+ # information about the error. There is a predefined set of error detail types
223
+ # in the package `google.rpc` that can be used for common error conditions.
224
+ # # Language mapping
225
+ # The `Status` message is the logical representation of the error model, but it
226
+ # is not necessarily the actual wire format. When the `Status` message is
227
+ # exposed in different client libraries and different wire protocols, it can be
228
+ # mapped differently. For example, it will likely be mapped to some exceptions
229
+ # in Java, but more likely mapped to some error codes in C.
230
+ # # Other uses
231
+ # The error model and the `Status` message can be used in a variety of
232
+ # environments, either with or without APIs, to provide a
233
+ # consistent developer experience across different environments.
234
+ # Example uses of this error model include:
235
+ # - Partial errors. If a service needs to return partial errors to the client,
236
+ # it may embed the `Status` in the normal response to indicate the partial
237
+ # errors.
238
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
239
+ # have a `Status` message for error reporting.
240
+ # - Batch operations. If a client uses batch request and batch response, the
241
+ # `Status` message should be used directly inside batch response, one for
242
+ # each error sub-response.
243
+ # - Asynchronous operations. If an API call embeds asynchronous operation
244
+ # results in its response, the status of those operations should be
245
+ # represented directly using the `Status` message.
246
+ # - Logging. If some API errors are stored in logs, the message `Status` could
247
+ # be used directly after any stripping needed for security/privacy reasons.
248
+ # Corresponds to the JSON property `error`
249
+ # @return [Google::Apis::VisionV1p1beta1::Status]
250
+ attr_accessor :error
251
+
252
+ # If present, face detection has completed successfully.
253
+ # Corresponds to the JSON property `faceAnnotations`
254
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1FaceAnnotation>]
255
+ attr_accessor :face_annotations
256
+
257
+ # TextAnnotation contains a structured representation of OCR extracted text.
258
+ # The hierarchy of an OCR extracted text structure is like this:
259
+ # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
260
+ # Each structural component, starting from Page, may further have their own
261
+ # properties. Properties describe detected languages, breaks etc.. Please refer
262
+ # to the TextAnnotation.TextProperty message definition below for more
263
+ # detail.
264
+ # Corresponds to the JSON property `fullTextAnnotation`
265
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextAnnotation]
266
+ attr_accessor :full_text_annotation
267
+
268
+ # Stores image properties, such as dominant colors.
269
+ # Corresponds to the JSON property `imagePropertiesAnnotation`
270
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1ImageProperties]
271
+ attr_accessor :image_properties_annotation
272
+
273
+ # If present, label detection has completed successfully.
274
+ # Corresponds to the JSON property `labelAnnotations`
275
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1EntityAnnotation>]
276
+ attr_accessor :label_annotations
277
+
278
+ # If present, landmark detection has completed successfully.
279
+ # Corresponds to the JSON property `landmarkAnnotations`
280
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1EntityAnnotation>]
281
+ attr_accessor :landmark_annotations
282
+
283
+ # If present, logo detection has completed successfully.
284
+ # Corresponds to the JSON property `logoAnnotations`
285
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1EntityAnnotation>]
286
+ attr_accessor :logo_annotations
287
+
288
+ # Set of features pertaining to the image, computed by computer vision
289
+ # methods over safe-search verticals (for example, adult, spoof, medical,
290
+ # violence).
291
+ # Corresponds to the JSON property `safeSearchAnnotation`
292
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1SafeSearchAnnotation]
293
+ attr_accessor :safe_search_annotation
294
+
295
+ # If present, text (OCR) detection has completed successfully.
296
+ # Corresponds to the JSON property `textAnnotations`
297
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1EntityAnnotation>]
298
+ attr_accessor :text_annotations
299
+
300
+ # Relevant information for the image from the Internet.
301
+ # Corresponds to the JSON property `webDetection`
302
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetection]
303
+ attr_accessor :web_detection
304
+
305
+ def initialize(**args)
306
+ update!(**args)
307
+ end
308
+
309
+ # Update properties of this object
310
+ def update!(**args)
311
+ @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation)
312
+ @error = args[:error] if args.key?(:error)
313
+ @face_annotations = args[:face_annotations] if args.key?(:face_annotations)
314
+ @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation)
315
+ @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation)
316
+ @label_annotations = args[:label_annotations] if args.key?(:label_annotations)
317
+ @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations)
318
+ @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations)
319
+ @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation)
320
+ @text_annotations = args[:text_annotations] if args.key?(:text_annotations)
321
+ @web_detection = args[:web_detection] if args.key?(:web_detection)
322
+ end
323
+ end
324
+
325
+ # Multiple image annotation requests are batched into a single service call.
326
+ class GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest
327
+ include Google::Apis::Core::Hashable
328
+
329
+ # Individual image annotation requests for this batch.
330
+ # Corresponds to the JSON property `requests`
331
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageRequest>]
332
+ attr_accessor :requests
333
+
334
+ def initialize(**args)
335
+ update!(**args)
336
+ end
337
+
338
+ # Update properties of this object
339
+ def update!(**args)
340
+ @requests = args[:requests] if args.key?(:requests)
341
+ end
342
+ end
343
+
344
+ # Response to a batch image annotation request.
345
+ class GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse
346
+ include Google::Apis::Core::Hashable
347
+
348
+ # Individual responses to image annotation requests within the batch.
349
+ # Corresponds to the JSON property `responses`
350
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AnnotateImageResponse>]
351
+ attr_accessor :responses
352
+
353
+ def initialize(**args)
354
+ update!(**args)
355
+ end
356
+
357
+ # Update properties of this object
358
+ def update!(**args)
359
+ @responses = args[:responses] if args.key?(:responses)
360
+ end
361
+ end
362
+
363
+ # Logical element on the page.
364
+ class GoogleCloudVisionV1p1beta1Block
365
+ include Google::Apis::Core::Hashable
366
+
367
+ # Detected block type (text, image etc) for this block.
368
+ # Corresponds to the JSON property `blockType`
369
+ # @return [String]
370
+ attr_accessor :block_type
371
+
372
+ # A bounding polygon for the detected image annotation.
373
+ # Corresponds to the JSON property `boundingBox`
374
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BoundingPoly]
375
+ attr_accessor :bounding_box
376
+
377
+ # Confidence of the OCR results on the block. Range [0, 1].
378
+ # Corresponds to the JSON property `confidence`
379
+ # @return [Float]
380
+ attr_accessor :confidence
381
+
382
+ # List of paragraphs in this block (if this blocks is of type text).
383
+ # Corresponds to the JSON property `paragraphs`
384
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Paragraph>]
385
+ attr_accessor :paragraphs
386
+
387
+ # Additional information detected on the structural component.
388
+ # Corresponds to the JSON property `property`
389
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextAnnotationTextProperty]
390
+ attr_accessor :property
391
+
392
+ def initialize(**args)
393
+ update!(**args)
394
+ end
395
+
396
+ # Update properties of this object
397
+ def update!(**args)
398
+ @block_type = args[:block_type] if args.key?(:block_type)
399
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
400
+ @confidence = args[:confidence] if args.key?(:confidence)
401
+ @paragraphs = args[:paragraphs] if args.key?(:paragraphs)
402
+ @property = args[:property] if args.key?(:property)
403
+ end
404
+ end
405
+
406
+ # A bounding polygon for the detected image annotation.
407
+ class GoogleCloudVisionV1p1beta1BoundingPoly
408
+ include Google::Apis::Core::Hashable
409
+
410
+ # The bounding polygon vertices.
411
+ # Corresponds to the JSON property `vertices`
412
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Vertex>]
413
+ attr_accessor :vertices
414
+
415
+ def initialize(**args)
416
+ update!(**args)
417
+ end
418
+
419
+ # Update properties of this object
420
+ def update!(**args)
421
+ @vertices = args[:vertices] if args.key?(:vertices)
422
+ end
423
+ end
424
+
425
+ # Color information consists of RGB channels, score, and the fraction of
426
+ # the image that the color occupies in the image.
427
+ class GoogleCloudVisionV1p1beta1ColorInfo
428
+ include Google::Apis::Core::Hashable
429
+
430
+ # Represents a color in the RGBA color space. This representation is designed
431
+ # for simplicity of conversion to/from color representations in various
432
+ # languages over compactness; for example, the fields of this representation
433
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
434
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
435
+ # method in iOS; and, with just a little work, it can be easily formatted into
436
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
437
+ # Example (Java):
438
+ # import com.google.type.Color;
439
+ # // ...
440
+ # public static java.awt.Color fromProto(Color protocolor) `
441
+ # float alpha = protocolor.hasAlpha()
442
+ # ? protocolor.getAlpha().getValue()
443
+ # : 1.0;
444
+ # return new java.awt.Color(
445
+ # protocolor.getRed(),
446
+ # protocolor.getGreen(),
447
+ # protocolor.getBlue(),
448
+ # alpha);
449
+ # `
450
+ # public static Color toProto(java.awt.Color color) `
451
+ # float red = (float) color.getRed();
452
+ # float green = (float) color.getGreen();
453
+ # float blue = (float) color.getBlue();
454
+ # float denominator = 255.0;
455
+ # Color.Builder resultBuilder =
456
+ # Color
457
+ # .newBuilder()
458
+ # .setRed(red / denominator)
459
+ # .setGreen(green / denominator)
460
+ # .setBlue(blue / denominator);
461
+ # int alpha = color.getAlpha();
462
+ # if (alpha != 255) `
463
+ # result.setAlpha(
464
+ # FloatValue
465
+ # .newBuilder()
466
+ # .setValue(((float) alpha) / denominator)
467
+ # .build());
468
+ # `
469
+ # return resultBuilder.build();
470
+ # `
471
+ # // ...
472
+ # Example (iOS / Obj-C):
473
+ # // ...
474
+ # static UIColor* fromProto(Color* protocolor) `
475
+ # float red = [protocolor red];
476
+ # float green = [protocolor green];
477
+ # float blue = [protocolor blue];
478
+ # FloatValue* alpha_wrapper = [protocolor alpha];
479
+ # float alpha = 1.0;
480
+ # if (alpha_wrapper != nil) `
481
+ # alpha = [alpha_wrapper value];
482
+ # `
483
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
484
+ # `
485
+ # static Color* toProto(UIColor* color) `
486
+ # CGFloat red, green, blue, alpha;
487
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
488
+ # return nil;
489
+ # `
490
+ # Color* result = [Color alloc] init];
491
+ # [result setRed:red];
492
+ # [result setGreen:green];
493
+ # [result setBlue:blue];
494
+ # if (alpha <= 0.9999) `
495
+ # [result setAlpha:floatWrapperWithValue(alpha)];
496
+ # `
497
+ # [result autorelease];
498
+ # return result;
499
+ # `
500
+ # // ...
501
+ # Example (JavaScript):
502
+ # // ...
503
+ # var protoToCssColor = function(rgb_color) `
504
+ # var redFrac = rgb_color.red || 0.0;
505
+ # var greenFrac = rgb_color.green || 0.0;
506
+ # var blueFrac = rgb_color.blue || 0.0;
507
+ # var red = Math.floor(redFrac * 255);
508
+ # var green = Math.floor(greenFrac * 255);
509
+ # var blue = Math.floor(blueFrac * 255);
510
+ # if (!('alpha' in rgb_color)) `
511
+ # return rgbToCssColor_(red, green, blue);
512
+ # `
513
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
514
+ # var rgbParams = [red, green, blue].join(',');
515
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
516
+ # `;
517
+ # var rgbToCssColor_ = function(red, green, blue) `
518
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
519
+ # var hexString = rgbNumber.toString(16);
520
+ # var missingZeros = 6 - hexString.length;
521
+ # var resultBuilder = ['#'];
522
+ # for (var i = 0; i < missingZeros; i++) `
523
+ # resultBuilder.push('0');
524
+ # `
525
+ # resultBuilder.push(hexString);
526
+ # return resultBuilder.join('');
527
+ # `;
528
+ # // ...
529
+ # Corresponds to the JSON property `color`
530
+ # @return [Google::Apis::VisionV1p1beta1::Color]
531
+ attr_accessor :color
532
+
533
+ # The fraction of pixels the color occupies in the image.
534
+ # Value in range [0, 1].
535
+ # Corresponds to the JSON property `pixelFraction`
536
+ # @return [Float]
537
+ attr_accessor :pixel_fraction
538
+
539
+ # Image-specific score for this color. Value in range [0, 1].
540
+ # Corresponds to the JSON property `score`
541
+ # @return [Float]
542
+ attr_accessor :score
543
+
544
+ def initialize(**args)
545
+ update!(**args)
546
+ end
547
+
548
+ # Update properties of this object
549
+ def update!(**args)
550
+ @color = args[:color] if args.key?(:color)
551
+ @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction)
552
+ @score = args[:score] if args.key?(:score)
553
+ end
554
+ end
555
+
556
+ # Single crop hint that is used to generate a new crop when serving an image.
557
+ class GoogleCloudVisionV1p1beta1CropHint
558
+ include Google::Apis::Core::Hashable
559
+
560
+ # A bounding polygon for the detected image annotation.
561
+ # Corresponds to the JSON property `boundingPoly`
562
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BoundingPoly]
563
+ attr_accessor :bounding_poly
564
+
565
+ # Confidence of this being a salient region. Range [0, 1].
566
+ # Corresponds to the JSON property `confidence`
567
+ # @return [Float]
568
+ attr_accessor :confidence
569
+
570
+ # Fraction of importance of this salient region with respect to the original
571
+ # image.
572
+ # Corresponds to the JSON property `importanceFraction`
573
+ # @return [Float]
574
+ attr_accessor :importance_fraction
575
+
576
+ def initialize(**args)
577
+ update!(**args)
578
+ end
579
+
580
+ # Update properties of this object
581
+ def update!(**args)
582
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
583
+ @confidence = args[:confidence] if args.key?(:confidence)
584
+ @importance_fraction = args[:importance_fraction] if args.key?(:importance_fraction)
585
+ end
586
+ end
587
+
588
+ # Set of crop hints that are used to generate new crops when serving images.
589
+ class GoogleCloudVisionV1p1beta1CropHintsAnnotation
590
+ include Google::Apis::Core::Hashable
591
+
592
+ # Crop hint results.
593
+ # Corresponds to the JSON property `cropHints`
594
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1CropHint>]
595
+ attr_accessor :crop_hints
596
+
597
+ def initialize(**args)
598
+ update!(**args)
599
+ end
600
+
601
+ # Update properties of this object
602
+ def update!(**args)
603
+ @crop_hints = args[:crop_hints] if args.key?(:crop_hints)
604
+ end
605
+ end
606
+
607
+ # Parameters for crop hints annotation request.
608
+ class GoogleCloudVisionV1p1beta1CropHintsParams
609
+ include Google::Apis::Core::Hashable
610
+
611
+ # Aspect ratios in floats, representing the ratio of the width to the height
612
+ # of the image. For example, if the desired aspect ratio is 4/3, the
613
+ # corresponding float value should be 1.33333. If not specified, the
614
+ # best possible crop is returned. The number of provided aspect ratios is
615
+ # limited to a maximum of 16; any aspect ratios provided after the 16th are
616
+ # ignored.
617
+ # Corresponds to the JSON property `aspectRatios`
618
+ # @return [Array<Float>]
619
+ attr_accessor :aspect_ratios
620
+
621
+ def initialize(**args)
622
+ update!(**args)
623
+ end
624
+
625
+ # Update properties of this object
626
+ def update!(**args)
627
+ @aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios)
628
+ end
629
+ end
630
+
631
+ # Set of dominant colors and their corresponding scores.
632
+ class GoogleCloudVisionV1p1beta1DominantColorsAnnotation
633
+ include Google::Apis::Core::Hashable
634
+
635
+ # RGB color values with their score and pixel fraction.
636
+ # Corresponds to the JSON property `colors`
637
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1ColorInfo>]
638
+ attr_accessor :colors
639
+
640
+ def initialize(**args)
641
+ update!(**args)
642
+ end
643
+
644
+ # Update properties of this object
645
+ def update!(**args)
646
+ @colors = args[:colors] if args.key?(:colors)
647
+ end
648
+ end
649
+
650
+ # Set of detected entity features.
651
+ class GoogleCloudVisionV1p1beta1EntityAnnotation
652
+ include Google::Apis::Core::Hashable
653
+
654
+ # A bounding polygon for the detected image annotation.
655
+ # Corresponds to the JSON property `boundingPoly`
656
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BoundingPoly]
657
+ attr_accessor :bounding_poly
658
+
659
+ # The accuracy of the entity detection in an image.
660
+ # For example, for an image in which the "Eiffel Tower" entity is detected,
661
+ # this field represents the confidence that there is a tower in the query
662
+ # image. Range [0, 1].
663
+ # Corresponds to the JSON property `confidence`
664
+ # @return [Float]
665
+ attr_accessor :confidence
666
+
667
+ # Entity textual description, expressed in its `locale` language.
668
+ # Corresponds to the JSON property `description`
669
+ # @return [String]
670
+ attr_accessor :description
671
+
672
+ # The language code for the locale in which the entity textual
673
+ # `description` is expressed.
674
+ # Corresponds to the JSON property `locale`
675
+ # @return [String]
676
+ attr_accessor :locale
677
+
678
+ # The location information for the detected entity. Multiple
679
+ # `LocationInfo` elements can be present because one location may
680
+ # indicate the location of the scene in the image, and another location
681
+ # may indicate the location of the place where the image was taken.
682
+ # Location information is usually present for landmarks.
683
+ # Corresponds to the JSON property `locations`
684
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1LocationInfo>]
685
+ attr_accessor :locations
686
+
687
+ # Opaque entity ID. Some IDs may be available in
688
+ # [Google Knowledge Graph Search
689
+ # API](https://developers.google.com/knowledge-graph/).
690
+ # Corresponds to the JSON property `mid`
691
+ # @return [String]
692
+ attr_accessor :mid
693
+
694
+ # Some entities may have optional user-supplied `Property` (name/value)
695
+ # fields, such a score or string that qualifies the entity.
696
+ # Corresponds to the JSON property `properties`
697
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Property>]
698
+ attr_accessor :properties
699
+
700
+ # Overall score of the result. Range [0, 1].
701
+ # Corresponds to the JSON property `score`
702
+ # @return [Float]
703
+ attr_accessor :score
704
+
705
+ # The relevancy of the ICA (Image Content Annotation) label to the
706
+ # image. For example, the relevancy of "tower" is likely higher to an image
707
+ # containing the detected "Eiffel Tower" than to an image containing a
708
+ # detected distant towering building, even though the confidence that
709
+ # there is a tower in each image may be the same. Range [0, 1].
710
+ # Corresponds to the JSON property `topicality`
711
+ # @return [Float]
712
+ attr_accessor :topicality
713
+
714
+ def initialize(**args)
715
+ update!(**args)
716
+ end
717
+
718
+ # Update properties of this object
719
+ def update!(**args)
720
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
721
+ @confidence = args[:confidence] if args.key?(:confidence)
722
+ @description = args[:description] if args.key?(:description)
723
+ @locale = args[:locale] if args.key?(:locale)
724
+ @locations = args[:locations] if args.key?(:locations)
725
+ @mid = args[:mid] if args.key?(:mid)
726
+ @properties = args[:properties] if args.key?(:properties)
727
+ @score = args[:score] if args.key?(:score)
728
+ @topicality = args[:topicality] if args.key?(:topicality)
729
+ end
730
+ end
731
+
732
+ # A face annotation object contains the results of face detection.
733
+ class GoogleCloudVisionV1p1beta1FaceAnnotation
734
+ include Google::Apis::Core::Hashable
735
+
736
+ # Anger likelihood.
737
+ # Corresponds to the JSON property `angerLikelihood`
738
+ # @return [String]
739
+ attr_accessor :anger_likelihood
740
+
741
+ # Blurred likelihood.
742
+ # Corresponds to the JSON property `blurredLikelihood`
743
+ # @return [String]
744
+ attr_accessor :blurred_likelihood
745
+
746
+ # A bounding polygon for the detected image annotation.
747
+ # Corresponds to the JSON property `boundingPoly`
748
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BoundingPoly]
749
+ attr_accessor :bounding_poly
750
+
751
+ # Detection confidence. Range [0, 1].
752
+ # Corresponds to the JSON property `detectionConfidence`
753
+ # @return [Float]
754
+ attr_accessor :detection_confidence
755
+
756
+ # A bounding polygon for the detected image annotation.
757
+ # Corresponds to the JSON property `fdBoundingPoly`
758
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BoundingPoly]
759
+ attr_accessor :fd_bounding_poly
760
+
761
+ # Headwear likelihood.
762
+ # Corresponds to the JSON property `headwearLikelihood`
763
+ # @return [String]
764
+ attr_accessor :headwear_likelihood
765
+
766
+ # Joy likelihood.
767
+ # Corresponds to the JSON property `joyLikelihood`
768
+ # @return [String]
769
+ attr_accessor :joy_likelihood
770
+
771
+ # Face landmarking confidence. Range [0, 1].
772
+ # Corresponds to the JSON property `landmarkingConfidence`
773
+ # @return [Float]
774
+ attr_accessor :landmarking_confidence
775
+
776
+ # Detected face landmarks.
777
+ # Corresponds to the JSON property `landmarks`
778
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1FaceAnnotationLandmark>]
779
+ attr_accessor :landmarks
780
+
781
+ # Yaw angle, which indicates the leftward/rightward angle that the face is
782
+ # pointing relative to the vertical plane perpendicular to the image. Range
783
+ # [-180,180].
784
+ # Corresponds to the JSON property `panAngle`
785
+ # @return [Float]
786
+ attr_accessor :pan_angle
787
+
788
+ # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
789
+ # of the face relative to the image vertical about the axis perpendicular to
790
+ # the face. Range [-180,180].
791
+ # Corresponds to the JSON property `rollAngle`
792
+ # @return [Float]
793
+ attr_accessor :roll_angle
794
+
795
+ # Sorrow likelihood.
796
+ # Corresponds to the JSON property `sorrowLikelihood`
797
+ # @return [String]
798
+ attr_accessor :sorrow_likelihood
799
+
800
+ # Surprise likelihood.
801
+ # Corresponds to the JSON property `surpriseLikelihood`
802
+ # @return [String]
803
+ attr_accessor :surprise_likelihood
804
+
805
+ # Pitch angle, which indicates the upwards/downwards angle that the face is
806
+ # pointing relative to the image's horizontal plane. Range [-180,180].
807
+ # Corresponds to the JSON property `tiltAngle`
808
+ # @return [Float]
809
+ attr_accessor :tilt_angle
810
+
811
+ # Under-exposed likelihood.
812
+ # Corresponds to the JSON property `underExposedLikelihood`
813
+ # @return [String]
814
+ attr_accessor :under_exposed_likelihood
815
+
816
+ def initialize(**args)
817
+ update!(**args)
818
+ end
819
+
820
+ # Update properties of this object
821
+ def update!(**args)
822
+ @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood)
823
+ @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood)
824
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
825
+ @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
826
+ @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly)
827
+ @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood)
828
+ @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
829
+ @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence)
830
+ @landmarks = args[:landmarks] if args.key?(:landmarks)
831
+ @pan_angle = args[:pan_angle] if args.key?(:pan_angle)
832
+ @roll_angle = args[:roll_angle] if args.key?(:roll_angle)
833
+ @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood)
834
+ @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood)
835
+ @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle)
836
+ @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood)
837
+ end
838
+ end
839
+
840
+ # A face-specific landmark (for example, a face feature).
841
+ class GoogleCloudVisionV1p1beta1FaceAnnotationLandmark
842
+ include Google::Apis::Core::Hashable
843
+
844
+ # A 3D position in the image, used primarily for Face detection landmarks.
845
+ # A valid Position must have both x and y coordinates.
846
+ # The position coordinates are in the same scale as the original image.
847
+ # Corresponds to the JSON property `position`
848
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Position]
849
+ attr_accessor :position
850
+
851
+ # Face landmark type.
852
+ # Corresponds to the JSON property `type`
853
+ # @return [String]
854
+ attr_accessor :type
855
+
856
+ def initialize(**args)
857
+ update!(**args)
858
+ end
859
+
860
+ # Update properties of this object
861
+ def update!(**args)
862
+ @position = args[:position] if args.key?(:position)
863
+ @type = args[:type] if args.key?(:type)
864
+ end
865
+ end
866
+
867
+ # Users describe the type of Google Cloud Vision API tasks to perform over
868
+ # images by using *Feature*s. Each Feature indicates a type of image
869
+ # detection task to perform. Features encode the Cloud Vision API
870
+ # vertical to operate on and the number of top-scoring results to return.
871
+ class GoogleCloudVisionV1p1beta1Feature
872
+ include Google::Apis::Core::Hashable
873
+
874
+ # Maximum number of results of this type.
875
+ # Corresponds to the JSON property `maxResults`
876
+ # @return [Fixnum]
877
+ attr_accessor :max_results
878
+
879
+ # Model to use for the feature.
880
+ # Supported values: "builtin/stable" (the default if unset) and
881
+ # "builtin/latest".
882
+ # Corresponds to the JSON property `model`
883
+ # @return [String]
884
+ attr_accessor :model
885
+
886
+ # The feature type.
887
+ # Corresponds to the JSON property `type`
888
+ # @return [String]
889
+ attr_accessor :type
890
+
891
+ def initialize(**args)
892
+ update!(**args)
893
+ end
894
+
895
+ # Update properties of this object
896
+ def update!(**args)
897
+ @max_results = args[:max_results] if args.key?(:max_results)
898
+ @model = args[:model] if args.key?(:model)
899
+ @type = args[:type] if args.key?(:type)
900
+ end
901
+ end
902
+
903
+ # Client image to perform Google Cloud Vision API tasks over.
904
+ class GoogleCloudVisionV1p1beta1Image
905
+ include Google::Apis::Core::Hashable
906
+
907
+ # Image content, represented as a stream of bytes.
908
+ # Note: as with all `bytes` fields, protobuffers use a pure binary
909
+ # representation, whereas JSON representations use base64.
910
+ # Corresponds to the JSON property `content`
911
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
912
+ # @return [String]
913
+ attr_accessor :content
914
+
915
+ # External image source (Google Cloud Storage image location).
916
+ # Corresponds to the JSON property `source`
917
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1ImageSource]
918
+ attr_accessor :source
919
+
920
+ def initialize(**args)
921
+ update!(**args)
922
+ end
923
+
924
+ # Update properties of this object
925
+ def update!(**args)
926
+ @content = args[:content] if args.key?(:content)
927
+ @source = args[:source] if args.key?(:source)
928
+ end
929
+ end
930
+
931
+ # Image context and/or feature-specific parameters.
932
+ class GoogleCloudVisionV1p1beta1ImageContext
933
+ include Google::Apis::Core::Hashable
934
+
935
+ # Parameters for crop hints annotation request.
936
+ # Corresponds to the JSON property `cropHintsParams`
937
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1CropHintsParams]
938
+ attr_accessor :crop_hints_params
939
+
940
+ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
941
+ # yields the best results since it enables automatic language detection. For
942
+ # languages based on the Latin alphabet, setting `language_hints` is not
943
+ # needed. In rare cases, when the language of the text in the image is known,
944
+ # setting a hint will help get better results (although it will be a
945
+ # significant hindrance if the hint is wrong). Text detection returns an
946
+ # error if one or more of the specified languages is not one of the
947
+ # [supported languages](/vision/docs/languages).
948
+ # Corresponds to the JSON property `languageHints`
949
+ # @return [Array<String>]
950
+ attr_accessor :language_hints
951
+
952
+ # Rectangle determined by min and max `LatLng` pairs.
953
+ # Corresponds to the JSON property `latLongRect`
954
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1LatLongRect]
955
+ attr_accessor :lat_long_rect
956
+
957
+ # Parameters for web detection request.
958
+ # Corresponds to the JSON property `webDetectionParams`
959
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionParams]
960
+ attr_accessor :web_detection_params
961
+
962
+ def initialize(**args)
963
+ update!(**args)
964
+ end
965
+
966
+ # Update properties of this object
967
+ def update!(**args)
968
+ @crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params)
969
+ @language_hints = args[:language_hints] if args.key?(:language_hints)
970
+ @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
971
+ @web_detection_params = args[:web_detection_params] if args.key?(:web_detection_params)
972
+ end
973
+ end
974
+
975
+ # Stores image properties, such as dominant colors.
976
+ class GoogleCloudVisionV1p1beta1ImageProperties
977
+ include Google::Apis::Core::Hashable
978
+
979
+ # Set of dominant colors and their corresponding scores.
980
+ # Corresponds to the JSON property `dominantColors`
981
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1DominantColorsAnnotation]
982
+ attr_accessor :dominant_colors
983
+
984
+ def initialize(**args)
985
+ update!(**args)
986
+ end
987
+
988
+ # Update properties of this object
989
+ def update!(**args)
990
+ @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
991
+ end
992
+ end
993
+
994
+ # External image source (Google Cloud Storage image location).
995
+ class GoogleCloudVisionV1p1beta1ImageSource
996
+ include Google::Apis::Core::Hashable
997
+
998
+ # NOTE: For new code `image_uri` below is preferred.
999
+ # Google Cloud Storage image URI, which must be in the following form:
1000
+ # `gs://bucket_name/object_name` (for details, see
1001
+ # [Google Cloud Storage Request
1002
+ # URIs](https://cloud.google.com/storage/docs/reference-uris)).
1003
+ # NOTE: Cloud Storage object versioning is not supported.
1004
+ # Corresponds to the JSON property `gcsImageUri`
1005
+ # @return [String]
1006
+ attr_accessor :gcs_image_uri
1007
+
1008
+ # Image URI which supports:
1009
+ # 1) Google Cloud Storage image URI, which must be in the following form:
1010
+ # `gs://bucket_name/object_name` (for details, see
1011
+ # [Google Cloud Storage Request
1012
+ # URIs](https://cloud.google.com/storage/docs/reference-uris)).
1013
+ # NOTE: Cloud Storage object versioning is not supported.
1014
+ # 2) Publicly accessible image HTTP/HTTPS URL.
1015
+ # This is preferred over the legacy `gcs_image_uri` above. When both
1016
+ # `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
1017
+ # precedence.
1018
+ # Corresponds to the JSON property `imageUri`
1019
+ # @return [String]
1020
+ attr_accessor :image_uri
1021
+
1022
+ def initialize(**args)
1023
+ update!(**args)
1024
+ end
1025
+
1026
+ # Update properties of this object
1027
+ def update!(**args)
1028
+ @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
1029
+ @image_uri = args[:image_uri] if args.key?(:image_uri)
1030
+ end
1031
+ end
1032
+
1033
+ # Rectangle determined by min and max `LatLng` pairs.
1034
+ class GoogleCloudVisionV1p1beta1LatLongRect
1035
+ include Google::Apis::Core::Hashable
1036
+
1037
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1038
+ # of doubles representing degrees latitude and degrees longitude. Unless
1039
+ # specified otherwise, this must conform to the
1040
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1041
+ # standard</a>. Values must be within normalized ranges.
1042
+ # Corresponds to the JSON property `maxLatLng`
1043
+ # @return [Google::Apis::VisionV1p1beta1::LatLng]
1044
+ attr_accessor :max_lat_lng
1045
+
1046
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1047
+ # of doubles representing degrees latitude and degrees longitude. Unless
1048
+ # specified otherwise, this must conform to the
1049
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1050
+ # standard</a>. Values must be within normalized ranges.
1051
+ # Corresponds to the JSON property `minLatLng`
1052
+ # @return [Google::Apis::VisionV1p1beta1::LatLng]
1053
+ attr_accessor :min_lat_lng
1054
+
1055
+ def initialize(**args)
1056
+ update!(**args)
1057
+ end
1058
+
1059
+ # Update properties of this object
1060
+ def update!(**args)
1061
+ @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng)
1062
+ @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng)
1063
+ end
1064
+ end
1065
+
1066
+ # Detected entity location information.
1067
+ class GoogleCloudVisionV1p1beta1LocationInfo
1068
+ include Google::Apis::Core::Hashable
1069
+
1070
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1071
+ # of doubles representing degrees latitude and degrees longitude. Unless
1072
+ # specified otherwise, this must conform to the
1073
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1074
+ # standard</a>. Values must be within normalized ranges.
1075
+ # Corresponds to the JSON property `latLng`
1076
+ # @return [Google::Apis::VisionV1p1beta1::LatLng]
1077
+ attr_accessor :lat_lng
1078
+
1079
+ def initialize(**args)
1080
+ update!(**args)
1081
+ end
1082
+
1083
+ # Update properties of this object
1084
+ def update!(**args)
1085
+ @lat_lng = args[:lat_lng] if args.key?(:lat_lng)
1086
+ end
1087
+ end
1088
+
1089
+ # Detected page from OCR.
1090
+ class GoogleCloudVisionV1p1beta1Page
1091
+ include Google::Apis::Core::Hashable
1092
+
1093
+ # List of blocks of text, images etc on this page.
1094
+ # Corresponds to the JSON property `blocks`
1095
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Block>]
1096
+ attr_accessor :blocks
1097
+
1098
+ # Confidence of the OCR results on the page. Range [0, 1].
1099
+ # Corresponds to the JSON property `confidence`
1100
+ # @return [Float]
1101
+ attr_accessor :confidence
1102
+
1103
+ # Page height in pixels.
1104
+ # Corresponds to the JSON property `height`
1105
+ # @return [Fixnum]
1106
+ attr_accessor :height
1107
+
1108
+ # Additional information detected on the structural component.
1109
+ # Corresponds to the JSON property `property`
1110
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextAnnotationTextProperty]
1111
+ attr_accessor :property
1112
+
1113
+ # Page width in pixels.
1114
+ # Corresponds to the JSON property `width`
1115
+ # @return [Fixnum]
1116
+ attr_accessor :width
1117
+
1118
+ def initialize(**args)
1119
+ update!(**args)
1120
+ end
1121
+
1122
+ # Update properties of this object
1123
+ def update!(**args)
1124
+ @blocks = args[:blocks] if args.key?(:blocks)
1125
+ @confidence = args[:confidence] if args.key?(:confidence)
1126
+ @height = args[:height] if args.key?(:height)
1127
+ @property = args[:property] if args.key?(:property)
1128
+ @width = args[:width] if args.key?(:width)
1129
+ end
1130
+ end
1131
+
1132
+ # Structural unit of text representing a number of words in certain order.
1133
+ class GoogleCloudVisionV1p1beta1Paragraph
1134
+ include Google::Apis::Core::Hashable
1135
+
1136
+ # A bounding polygon for the detected image annotation.
1137
+ # Corresponds to the JSON property `boundingBox`
1138
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BoundingPoly]
1139
+ attr_accessor :bounding_box
1140
+
1141
+ # Confidence of the OCR results for the paragraph. Range [0, 1].
1142
+ # Corresponds to the JSON property `confidence`
1143
+ # @return [Float]
1144
+ attr_accessor :confidence
1145
+
1146
+ # Additional information detected on the structural component.
1147
+ # Corresponds to the JSON property `property`
1148
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextAnnotationTextProperty]
1149
+ attr_accessor :property
1150
+
1151
+ # List of words in this paragraph.
1152
+ # Corresponds to the JSON property `words`
1153
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Word>]
1154
+ attr_accessor :words
1155
+
1156
+ def initialize(**args)
1157
+ update!(**args)
1158
+ end
1159
+
1160
+ # Update properties of this object
1161
+ def update!(**args)
1162
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1163
+ @confidence = args[:confidence] if args.key?(:confidence)
1164
+ @property = args[:property] if args.key?(:property)
1165
+ @words = args[:words] if args.key?(:words)
1166
+ end
1167
+ end
1168
+
1169
+ # A 3D position in the image, used primarily for Face detection landmarks.
1170
+ # A valid Position must have both x and y coordinates.
1171
+ # The position coordinates are in the same scale as the original image.
1172
+ class GoogleCloudVisionV1p1beta1Position
1173
+ include Google::Apis::Core::Hashable
1174
+
1175
+ # X coordinate.
1176
+ # Corresponds to the JSON property `x`
1177
+ # @return [Float]
1178
+ attr_accessor :x
1179
+
1180
+ # Y coordinate.
1181
+ # Corresponds to the JSON property `y`
1182
+ # @return [Float]
1183
+ attr_accessor :y
1184
+
1185
+ # Z coordinate (or depth).
1186
+ # Corresponds to the JSON property `z`
1187
+ # @return [Float]
1188
+ attr_accessor :z
1189
+
1190
+ def initialize(**args)
1191
+ update!(**args)
1192
+ end
1193
+
1194
+ # Update properties of this object
1195
+ def update!(**args)
1196
+ @x = args[:x] if args.key?(:x)
1197
+ @y = args[:y] if args.key?(:y)
1198
+ @z = args[:z] if args.key?(:z)
1199
+ end
1200
+ end
1201
+
1202
+ # A `Property` consists of a user-supplied name/value pair.
1203
+ class GoogleCloudVisionV1p1beta1Property
1204
+ include Google::Apis::Core::Hashable
1205
+
1206
+ # Name of the property.
1207
+ # Corresponds to the JSON property `name`
1208
+ # @return [String]
1209
+ attr_accessor :name
1210
+
1211
+ # Value of numeric properties.
1212
+ # Corresponds to the JSON property `uint64Value`
1213
+ # @return [Fixnum]
1214
+ attr_accessor :uint64_value
1215
+
1216
+ # Value of the property.
1217
+ # Corresponds to the JSON property `value`
1218
+ # @return [String]
1219
+ attr_accessor :value
1220
+
1221
+ def initialize(**args)
1222
+ update!(**args)
1223
+ end
1224
+
1225
+ # Update properties of this object
1226
+ def update!(**args)
1227
+ @name = args[:name] if args.key?(:name)
1228
+ @uint64_value = args[:uint64_value] if args.key?(:uint64_value)
1229
+ @value = args[:value] if args.key?(:value)
1230
+ end
1231
+ end
1232
+
1233
+ # Set of features pertaining to the image, computed by computer vision
1234
+ # methods over safe-search verticals (for example, adult, spoof, medical,
1235
+ # violence).
1236
+ class GoogleCloudVisionV1p1beta1SafeSearchAnnotation
1237
+ include Google::Apis::Core::Hashable
1238
+
1239
+ # Represents the adult content likelihood for the image. Adult content may
1240
+ # contain elements such as nudity, pornographic images or cartoons, or
1241
+ # sexual activities.
1242
+ # Corresponds to the JSON property `adult`
1243
+ # @return [String]
1244
+ attr_accessor :adult
1245
+
1246
+ # Likelihood that this is a medical image.
1247
+ # Corresponds to the JSON property `medical`
1248
+ # @return [String]
1249
+ attr_accessor :medical
1250
+
1251
+ # Likelihood that the request image contains racy content. Racy content may
1252
+ # include (but is not limited to) skimpy or sheer clothing, strategically
1253
+ # covered nudity, lewd or provocative poses, or close-ups of sensitive
1254
+ # body areas.
1255
+ # Corresponds to the JSON property `racy`
1256
+ # @return [String]
1257
+ attr_accessor :racy
1258
+
1259
+ # Spoof likelihood. The likelihood that an modification
1260
+ # was made to the image's canonical version to make it appear
1261
+ # funny or offensive.
1262
+ # Corresponds to the JSON property `spoof`
1263
+ # @return [String]
1264
+ attr_accessor :spoof
1265
+
1266
+ # Likelihood that this image contains violent content.
1267
+ # Corresponds to the JSON property `violence`
1268
+ # @return [String]
1269
+ attr_accessor :violence
1270
+
1271
+ def initialize(**args)
1272
+ update!(**args)
1273
+ end
1274
+
1275
+ # Update properties of this object
1276
+ def update!(**args)
1277
+ @adult = args[:adult] if args.key?(:adult)
1278
+ @medical = args[:medical] if args.key?(:medical)
1279
+ @racy = args[:racy] if args.key?(:racy)
1280
+ @spoof = args[:spoof] if args.key?(:spoof)
1281
+ @violence = args[:violence] if args.key?(:violence)
1282
+ end
1283
+ end
1284
+
1285
+ # A single symbol representation.
1286
+ class GoogleCloudVisionV1p1beta1Symbol
1287
+ include Google::Apis::Core::Hashable
1288
+
1289
+ # A bounding polygon for the detected image annotation.
1290
+ # Corresponds to the JSON property `boundingBox`
1291
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BoundingPoly]
1292
+ attr_accessor :bounding_box
1293
+
1294
+ # Confidence of the OCR results for the symbol. Range [0, 1].
1295
+ # Corresponds to the JSON property `confidence`
1296
+ # @return [Float]
1297
+ attr_accessor :confidence
1298
+
1299
+ # Additional information detected on the structural component.
1300
+ # Corresponds to the JSON property `property`
1301
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextAnnotationTextProperty]
1302
+ attr_accessor :property
1303
+
1304
+ # The actual UTF-8 representation of the symbol.
1305
+ # Corresponds to the JSON property `text`
1306
+ # @return [String]
1307
+ attr_accessor :text
1308
+
1309
+ def initialize(**args)
1310
+ update!(**args)
1311
+ end
1312
+
1313
+ # Update properties of this object
1314
+ def update!(**args)
1315
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1316
+ @confidence = args[:confidence] if args.key?(:confidence)
1317
+ @property = args[:property] if args.key?(:property)
1318
+ @text = args[:text] if args.key?(:text)
1319
+ end
1320
+ end
1321
+
1322
+ # TextAnnotation contains a structured representation of OCR extracted text.
1323
+ # The hierarchy of an OCR extracted text structure is like this:
1324
+ # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
1325
+ # Each structural component, starting from Page, may further have their own
1326
+ # properties. Properties describe detected languages, breaks etc.. Please refer
1327
+ # to the TextAnnotation.TextProperty message definition below for more
1328
+ # detail.
1329
+ class GoogleCloudVisionV1p1beta1TextAnnotation
1330
+ include Google::Apis::Core::Hashable
1331
+
1332
+ # List of pages detected by OCR.
1333
+ # Corresponds to the JSON property `pages`
1334
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Page>]
1335
+ attr_accessor :pages
1336
+
1337
+ # UTF-8 text detected on the pages.
1338
+ # Corresponds to the JSON property `text`
1339
+ # @return [String]
1340
+ attr_accessor :text
1341
+
1342
+ def initialize(**args)
1343
+ update!(**args)
1344
+ end
1345
+
1346
+ # Update properties of this object
1347
+ def update!(**args)
1348
+ @pages = args[:pages] if args.key?(:pages)
1349
+ @text = args[:text] if args.key?(:text)
1350
+ end
1351
+ end
1352
+
1353
+ # Detected start or end of a structural component.
1354
+ class GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak
1355
+ include Google::Apis::Core::Hashable
1356
+
1357
+ # True if break prepends the element.
1358
+ # Corresponds to the JSON property `isPrefix`
1359
+ # @return [Boolean]
1360
+ attr_accessor :is_prefix
1361
+ alias_method :is_prefix?, :is_prefix
1362
+
1363
+ # Detected break type.
1364
+ # Corresponds to the JSON property `type`
1365
+ # @return [String]
1366
+ attr_accessor :type
1367
+
1368
+ def initialize(**args)
1369
+ update!(**args)
1370
+ end
1371
+
1372
+ # Update properties of this object
1373
+ def update!(**args)
1374
+ @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
1375
+ @type = args[:type] if args.key?(:type)
1376
+ end
1377
+ end
1378
+
1379
+ # Detected language for a structural component.
1380
+ class GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage
1381
+ include Google::Apis::Core::Hashable
1382
+
1383
+ # Confidence of detected language. Range [0, 1].
1384
+ # Corresponds to the JSON property `confidence`
1385
+ # @return [Float]
1386
+ attr_accessor :confidence
1387
+
1388
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
1389
+ # information, see
1390
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1391
+ # Corresponds to the JSON property `languageCode`
1392
+ # @return [String]
1393
+ attr_accessor :language_code
1394
+
1395
+ def initialize(**args)
1396
+ update!(**args)
1397
+ end
1398
+
1399
+ # Update properties of this object
1400
+ def update!(**args)
1401
+ @confidence = args[:confidence] if args.key?(:confidence)
1402
+ @language_code = args[:language_code] if args.key?(:language_code)
1403
+ end
1404
+ end
1405
+
1406
+ # Additional information detected on the structural component.
1407
+ class GoogleCloudVisionV1p1beta1TextAnnotationTextProperty
1408
+ include Google::Apis::Core::Hashable
1409
+
1410
+ # Detected start or end of a structural component.
1411
+ # Corresponds to the JSON property `detectedBreak`
1412
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak]
1413
+ attr_accessor :detected_break
1414
+
1415
+ # A list of detected languages together with confidence.
1416
+ # Corresponds to the JSON property `detectedLanguages`
1417
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage>]
1418
+ attr_accessor :detected_languages
1419
+
1420
+ def initialize(**args)
1421
+ update!(**args)
1422
+ end
1423
+
1424
+ # Update properties of this object
1425
+ def update!(**args)
1426
+ @detected_break = args[:detected_break] if args.key?(:detected_break)
1427
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
1428
+ end
1429
+ end
1430
+
1431
+ # A vertex represents a 2D point in the image.
1432
+ # NOTE: the vertex coordinates are in the same scale as the original image.
1433
+ class GoogleCloudVisionV1p1beta1Vertex
1434
+ include Google::Apis::Core::Hashable
1435
+
1436
+ # X coordinate.
1437
+ # Corresponds to the JSON property `x`
1438
+ # @return [Fixnum]
1439
+ attr_accessor :x
1440
+
1441
+ # Y coordinate.
1442
+ # Corresponds to the JSON property `y`
1443
+ # @return [Fixnum]
1444
+ attr_accessor :y
1445
+
1446
+ def initialize(**args)
1447
+ update!(**args)
1448
+ end
1449
+
1450
+ # Update properties of this object
1451
+ def update!(**args)
1452
+ @x = args[:x] if args.key?(:x)
1453
+ @y = args[:y] if args.key?(:y)
1454
+ end
1455
+ end
1456
+
1457
+ # Relevant information for the image from the Internet.
1458
+ class GoogleCloudVisionV1p1beta1WebDetection
1459
+ include Google::Apis::Core::Hashable
1460
+
1461
+ # Best guess text labels for the request image.
1462
+ # Corresponds to the JSON property `bestGuessLabels`
1463
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionWebLabel>]
1464
+ attr_accessor :best_guess_labels
1465
+
1466
+ # Fully matching images from the Internet.
1467
+ # Can include resized copies of the query image.
1468
+ # Corresponds to the JSON property `fullMatchingImages`
1469
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionWebImage>]
1470
+ attr_accessor :full_matching_images
1471
+
1472
+ # Web pages containing the matching images from the Internet.
1473
+ # Corresponds to the JSON property `pagesWithMatchingImages`
1474
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionWebPage>]
1475
+ attr_accessor :pages_with_matching_images
1476
+
1477
+ # Partial matching images from the Internet.
1478
+ # Those images are similar enough to share some key-point features. For
1479
+ # example an original image will likely have partial matching for its crops.
1480
+ # Corresponds to the JSON property `partialMatchingImages`
1481
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionWebImage>]
1482
+ attr_accessor :partial_matching_images
1483
+
1484
+ # The visually similar image results.
1485
+ # Corresponds to the JSON property `visuallySimilarImages`
1486
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionWebImage>]
1487
+ attr_accessor :visually_similar_images
1488
+
1489
+ # Deduced entities from similar images on the Internet.
1490
+ # Corresponds to the JSON property `webEntities`
1491
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionWebEntity>]
1492
+ attr_accessor :web_entities
1493
+
1494
+ def initialize(**args)
1495
+ update!(**args)
1496
+ end
1497
+
1498
+ # Update properties of this object
1499
+ def update!(**args)
1500
+ @best_guess_labels = args[:best_guess_labels] if args.key?(:best_guess_labels)
1501
+ @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
1502
+ @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
1503
+ @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
1504
+ @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
1505
+ @web_entities = args[:web_entities] if args.key?(:web_entities)
1506
+ end
1507
+ end
1508
+
1509
+ # Parameters for web detection request.
1510
+ class GoogleCloudVisionV1p1beta1WebDetectionParams
1511
+ include Google::Apis::Core::Hashable
1512
+
1513
+ # Whether to include results derived from the geo information in the image.
1514
+ # Corresponds to the JSON property `includeGeoResults`
1515
+ # @return [Boolean]
1516
+ attr_accessor :include_geo_results
1517
+ alias_method :include_geo_results?, :include_geo_results
1518
+
1519
+ def initialize(**args)
1520
+ update!(**args)
1521
+ end
1522
+
1523
+ # Update properties of this object
1524
+ def update!(**args)
1525
+ @include_geo_results = args[:include_geo_results] if args.key?(:include_geo_results)
1526
+ end
1527
+ end
1528
+
1529
+ # Entity deduced from similar images on the Internet.
1530
+ class GoogleCloudVisionV1p1beta1WebDetectionWebEntity
1531
+ include Google::Apis::Core::Hashable
1532
+
1533
+ # Canonical description of the entity, in English.
1534
+ # Corresponds to the JSON property `description`
1535
+ # @return [String]
1536
+ attr_accessor :description
1537
+
1538
+ # Opaque entity ID.
1539
+ # Corresponds to the JSON property `entityId`
1540
+ # @return [String]
1541
+ attr_accessor :entity_id
1542
+
1543
+ # Overall relevancy score for the entity.
1544
+ # Not normalized and not comparable across different image queries.
1545
+ # Corresponds to the JSON property `score`
1546
+ # @return [Float]
1547
+ attr_accessor :score
1548
+
1549
+ def initialize(**args)
1550
+ update!(**args)
1551
+ end
1552
+
1553
+ # Update properties of this object
1554
+ def update!(**args)
1555
+ @description = args[:description] if args.key?(:description)
1556
+ @entity_id = args[:entity_id] if args.key?(:entity_id)
1557
+ @score = args[:score] if args.key?(:score)
1558
+ end
1559
+ end
1560
+
1561
+ # Metadata for online images.
1562
+ class GoogleCloudVisionV1p1beta1WebDetectionWebImage
1563
+ include Google::Apis::Core::Hashable
1564
+
1565
+ # (Deprecated) Overall relevancy score for the image.
1566
+ # Corresponds to the JSON property `score`
1567
+ # @return [Float]
1568
+ attr_accessor :score
1569
+
1570
+ # The result image URL.
1571
+ # Corresponds to the JSON property `url`
1572
+ # @return [String]
1573
+ attr_accessor :url
1574
+
1575
+ def initialize(**args)
1576
+ update!(**args)
1577
+ end
1578
+
1579
+ # Update properties of this object
1580
+ def update!(**args)
1581
+ @score = args[:score] if args.key?(:score)
1582
+ @url = args[:url] if args.key?(:url)
1583
+ end
1584
+ end
1585
+
1586
+ # Label to provide extra metadata for the web detection.
1587
+ class GoogleCloudVisionV1p1beta1WebDetectionWebLabel
1588
+ include Google::Apis::Core::Hashable
1589
+
1590
+ # Label for extra metadata.
1591
+ # Corresponds to the JSON property `label`
1592
+ # @return [String]
1593
+ attr_accessor :label
1594
+
1595
+ # The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
1596
+ # For more information, see
1597
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1598
+ # Corresponds to the JSON property `languageCode`
1599
+ # @return [String]
1600
+ attr_accessor :language_code
1601
+
1602
+ def initialize(**args)
1603
+ update!(**args)
1604
+ end
1605
+
1606
+ # Update properties of this object
1607
+ def update!(**args)
1608
+ @label = args[:label] if args.key?(:label)
1609
+ @language_code = args[:language_code] if args.key?(:language_code)
1610
+ end
1611
+ end
1612
+
1613
+ # Metadata for web pages.
1614
+ class GoogleCloudVisionV1p1beta1WebDetectionWebPage
1615
+ include Google::Apis::Core::Hashable
1616
+
1617
+ # Fully matching images on the page.
1618
+ # Can include resized copies of the query image.
1619
+ # Corresponds to the JSON property `fullMatchingImages`
1620
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionWebImage>]
1621
+ attr_accessor :full_matching_images
1622
+
1623
+ # Title for the web page, may contain HTML markups.
1624
+ # Corresponds to the JSON property `pageTitle`
1625
+ # @return [String]
1626
+ attr_accessor :page_title
1627
+
1628
+ # Partial matching images on the page.
1629
+ # Those images are similar enough to share some key-point features. For
1630
+ # example an original image will likely have partial matching for its
1631
+ # crops.
1632
+ # Corresponds to the JSON property `partialMatchingImages`
1633
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1WebDetectionWebImage>]
1634
+ attr_accessor :partial_matching_images
1635
+
1636
+ # (Deprecated) Overall relevancy score for the web page.
1637
+ # Corresponds to the JSON property `score`
1638
+ # @return [Float]
1639
+ attr_accessor :score
1640
+
1641
+ # The result web page URL.
1642
+ # Corresponds to the JSON property `url`
1643
+ # @return [String]
1644
+ attr_accessor :url
1645
+
1646
+ def initialize(**args)
1647
+ update!(**args)
1648
+ end
1649
+
1650
+ # Update properties of this object
1651
+ def update!(**args)
1652
+ @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
1653
+ @page_title = args[:page_title] if args.key?(:page_title)
1654
+ @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
1655
+ @score = args[:score] if args.key?(:score)
1656
+ @url = args[:url] if args.key?(:url)
1657
+ end
1658
+ end
1659
+
1660
+ # A word representation.
1661
+ class GoogleCloudVisionV1p1beta1Word
1662
+ include Google::Apis::Core::Hashable
1663
+
1664
+ # A bounding polygon for the detected image annotation.
1665
+ # Corresponds to the JSON property `boundingBox`
1666
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BoundingPoly]
1667
+ attr_accessor :bounding_box
1668
+
1669
+ # Confidence of the OCR results for the word. Range [0, 1].
1670
+ # Corresponds to the JSON property `confidence`
1671
+ # @return [Float]
1672
+ attr_accessor :confidence
1673
+
1674
+ # Additional information detected on the structural component.
1675
+ # Corresponds to the JSON property `property`
1676
+ # @return [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1TextAnnotationTextProperty]
1677
+ attr_accessor :property
1678
+
1679
+ # List of symbols in the word.
1680
+ # The order of the symbols follows the natural reading order.
1681
+ # Corresponds to the JSON property `symbols`
1682
+ # @return [Array<Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1Symbol>]
1683
+ attr_accessor :symbols
1684
+
1685
+ def initialize(**args)
1686
+ update!(**args)
1687
+ end
1688
+
1689
+ # Update properties of this object
1690
+ def update!(**args)
1691
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1692
+ @confidence = args[:confidence] if args.key?(:confidence)
1693
+ @property = args[:property] if args.key?(:property)
1694
+ @symbols = args[:symbols] if args.key?(:symbols)
1695
+ end
1696
+ end
1697
+
1698
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1699
+ # of doubles representing degrees latitude and degrees longitude. Unless
1700
+ # specified otherwise, this must conform to the
1701
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1702
+ # standard</a>. Values must be within normalized ranges.
1703
+ class LatLng
1704
+ include Google::Apis::Core::Hashable
1705
+
1706
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
1707
+ # Corresponds to the JSON property `latitude`
1708
+ # @return [Float]
1709
+ attr_accessor :latitude
1710
+
1711
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
1712
+ # Corresponds to the JSON property `longitude`
1713
+ # @return [Float]
1714
+ attr_accessor :longitude
1715
+
1716
+ def initialize(**args)
1717
+ update!(**args)
1718
+ end
1719
+
1720
+ # Update properties of this object
1721
+ def update!(**args)
1722
+ @latitude = args[:latitude] if args.key?(:latitude)
1723
+ @longitude = args[:longitude] if args.key?(:longitude)
1724
+ end
1725
+ end
1726
+
1727
+ # The `Status` type defines a logical error model that is suitable for different
1728
+ # programming environments, including REST APIs and RPC APIs. It is used by
1729
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
1730
+ # - Simple to use and understand for most users
1731
+ # - Flexible enough to meet unexpected needs
1732
+ # # Overview
1733
+ # The `Status` message contains three pieces of data: error code, error message,
1734
+ # and error details. The error code should be an enum value of
1735
+ # google.rpc.Code, but it may accept additional error codes if needed. The
1736
+ # error message should be a developer-facing English message that helps
1737
+ # developers *understand* and *resolve* the error. If a localized user-facing
1738
+ # error message is needed, put the localized message in the error details or
1739
+ # localize it in the client. The optional error details may contain arbitrary
1740
+ # information about the error. There is a predefined set of error detail types
1741
+ # in the package `google.rpc` that can be used for common error conditions.
1742
+ # # Language mapping
1743
+ # The `Status` message is the logical representation of the error model, but it
1744
+ # is not necessarily the actual wire format. When the `Status` message is
1745
+ # exposed in different client libraries and different wire protocols, it can be
1746
+ # mapped differently. For example, it will likely be mapped to some exceptions
1747
+ # in Java, but more likely mapped to some error codes in C.
1748
+ # # Other uses
1749
+ # The error model and the `Status` message can be used in a variety of
1750
+ # environments, either with or without APIs, to provide a
1751
+ # consistent developer experience across different environments.
1752
+ # Example uses of this error model include:
1753
+ # - Partial errors. If a service needs to return partial errors to the client,
1754
+ # it may embed the `Status` in the normal response to indicate the partial
1755
+ # errors.
1756
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
1757
+ # have a `Status` message for error reporting.
1758
+ # - Batch operations. If a client uses batch request and batch response, the
1759
+ # `Status` message should be used directly inside batch response, one for
1760
+ # each error sub-response.
1761
+ # - Asynchronous operations. If an API call embeds asynchronous operation
1762
+ # results in its response, the status of those operations should be
1763
+ # represented directly using the `Status` message.
1764
+ # - Logging. If some API errors are stored in logs, the message `Status` could
1765
+ # be used directly after any stripping needed for security/privacy reasons.
1766
+ class Status
1767
+ include Google::Apis::Core::Hashable
1768
+
1769
+ # The status code, which should be an enum value of google.rpc.Code.
1770
+ # Corresponds to the JSON property `code`
1771
+ # @return [Fixnum]
1772
+ attr_accessor :code
1773
+
1774
+ # A list of messages that carry the error details. There is a common set of
1775
+ # message types for APIs to use.
1776
+ # Corresponds to the JSON property `details`
1777
+ # @return [Array<Hash<String,Object>>]
1778
+ attr_accessor :details
1779
+
1780
+ # A developer-facing error message, which should be in English. Any
1781
+ # user-facing error message should be localized and sent in the
1782
+ # google.rpc.Status.details field, or localized by the client.
1783
+ # Corresponds to the JSON property `message`
1784
+ # @return [String]
1785
+ attr_accessor :message
1786
+
1787
+ def initialize(**args)
1788
+ update!(**args)
1789
+ end
1790
+
1791
+ # Update properties of this object
1792
+ def update!(**args)
1793
+ @code = args[:code] if args.key?(:code)
1794
+ @details = args[:details] if args.key?(:details)
1795
+ @message = args[:message] if args.key?(:message)
1796
+ end
1797
+ end
1798
+ end
1799
+ end
1800
+ end