google-api-client 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  4. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +13 -0
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +1 -0
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +6 -1
  7. data/generated/google/apis/bigquery_v2.rb +1 -1
  8. data/generated/google/apis/bigquery_v2/classes.rb +1 -1
  9. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  10. data/generated/google/apis/cloudfunctions_v1/classes.rb +13 -1
  11. data/generated/google/apis/cloudfunctions_v1/representations.rb +2 -0
  12. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  13. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +13 -1
  14. data/generated/google/apis/cloudfunctions_v1beta2/representations.rb +2 -0
  15. data/generated/google/apis/container_v1beta1.rb +1 -1
  16. data/generated/google/apis/container_v1beta1/classes.rb +52 -0
  17. data/generated/google/apis/container_v1beta1/representations.rb +17 -0
  18. data/generated/google/apis/container_v1beta1/service.rb +78 -0
  19. data/generated/google/apis/content_v2.rb +1 -1
  20. data/generated/google/apis/content_v2/classes.rb +6 -11
  21. data/generated/google/apis/content_v2/representations.rb +0 -1
  22. data/generated/google/apis/content_v2sandbox.rb +1 -1
  23. data/generated/google/apis/content_v2sandbox/classes.rb +6 -11
  24. data/generated/google/apis/content_v2sandbox/representations.rb +0 -1
  25. data/generated/google/apis/dataproc_v1.rb +1 -1
  26. data/generated/google/apis/dataproc_v1/service.rb +3 -3
  27. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  28. data/generated/google/apis/dataproc_v1beta2/service.rb +3 -3
  29. data/generated/google/apis/videointelligence_v1beta1.rb +1 -1
  30. data/generated/google/apis/videointelligence_v1beta1/classes.rb +149 -51
  31. data/generated/google/apis/videointelligence_v1beta1/representations.rb +66 -16
  32. data/generated/google/apis/vision_v1.rb +1 -1
  33. data/generated/google/apis/vision_v1/classes.rb +439 -563
  34. data/generated/google/apis/vision_v1/representations.rb +178 -178
  35. data/generated/google/apis/vision_v1/service.rb +8 -8
  36. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  37. data/generated/google/apis/youtube_v3.rb +1 -1
  38. data/lib/google/apis/version.rb +1 -1
  39. metadata +2 -6
  40. data/generated/google/apis/cloudmonitoring_v2beta2.rb +0 -37
  41. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +0 -679
  42. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +0 -353
  43. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +0 -453
@@ -34,19 +34,37 @@ module Google
34
34
  include Google::Apis::Core::JsonObjectSupport
35
35
  end
36
36
 
37
+ class GoogleCloudVideointelligenceV1Entity
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class GoogleCloudVideointelligenceV1ExplicitContentAnnotation
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class GoogleCloudVideointelligenceV1ExplicitContentFrame
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
37
55
  class GoogleCloudVideointelligenceV1LabelAnnotation
38
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
57
 
40
58
  include Google::Apis::Core::JsonObjectSupport
41
59
  end
42
60
 
43
- class GoogleCloudVideointelligenceV1LabelLocation
61
+ class GoogleCloudVideointelligenceV1LabelFrame
44
62
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
63
 
46
64
  include Google::Apis::Core::JsonObjectSupport
47
65
  end
48
66
 
49
- class GoogleCloudVideointelligenceV1SafeSearchAnnotation
67
+ class GoogleCloudVideointelligenceV1LabelSegment
50
68
  class Representation < Google::Apis::Core::JsonRepresentation; end
51
69
 
52
70
  include Google::Apis::Core::JsonObjectSupport
@@ -224,31 +242,59 @@ module Google
224
242
  end
225
243
  end
226
244
 
227
- class GoogleCloudVideointelligenceV1LabelAnnotation
245
+ class GoogleCloudVideointelligenceV1Entity
228
246
  # @private
229
247
  class Representation < Google::Apis::Core::JsonRepresentation
230
248
  property :description, as: 'description'
249
+ property :entity_id, as: 'entityId'
231
250
  property :language_code, as: 'languageCode'
232
- collection :locations, as: 'locations', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelLocation, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelLocation::Representation
251
+ end
252
+ end
253
+
254
+ class GoogleCloudVideointelligenceV1ExplicitContentAnnotation
255
+ # @private
256
+ class Representation < Google::Apis::Core::JsonRepresentation
257
+ collection :frames, as: 'frames', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1ExplicitContentFrame, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1ExplicitContentFrame::Representation
233
258
 
234
259
  end
235
260
  end
236
261
 
237
- class GoogleCloudVideointelligenceV1LabelLocation
262
+ class GoogleCloudVideointelligenceV1ExplicitContentFrame
238
263
  # @private
239
264
  class Representation < Google::Apis::Core::JsonRepresentation
240
- property :confidence, as: 'confidence'
241
- property :level, as: 'level'
242
- property :segment, as: 'segment', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1VideoSegment, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1VideoSegment::Representation
265
+ property :pornography_likelihood, as: 'pornographyLikelihood'
266
+ property :time_offset, as: 'timeOffset'
267
+ end
268
+ end
269
+
270
+ class GoogleCloudVideointelligenceV1LabelAnnotation
271
+ # @private
272
+ class Representation < Google::Apis::Core::JsonRepresentation
273
+ collection :category_entities, as: 'categoryEntities', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1Entity, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1Entity::Representation
274
+
275
+ property :entity, as: 'entity', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1Entity, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1Entity::Representation
276
+
277
+ collection :frames, as: 'frames', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelFrame, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelFrame::Representation
278
+
279
+ collection :segments, as: 'segments', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelSegment, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelSegment::Representation
243
280
 
244
281
  end
245
282
  end
246
283
 
247
- class GoogleCloudVideointelligenceV1SafeSearchAnnotation
284
+ class GoogleCloudVideointelligenceV1LabelFrame
248
285
  # @private
249
286
  class Representation < Google::Apis::Core::JsonRepresentation
250
- property :adult, as: 'adult'
251
- property :time, as: 'time'
287
+ property :confidence, as: 'confidence'
288
+ property :time_offset, as: 'timeOffset'
289
+ end
290
+ end
291
+
292
+ class GoogleCloudVideointelligenceV1LabelSegment
293
+ # @private
294
+ class Representation < Google::Apis::Core::JsonRepresentation
295
+ property :confidence, as: 'confidence'
296
+ property :segment, as: 'segment', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1VideoSegment, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1VideoSegment::Representation
297
+
252
298
  end
253
299
  end
254
300
 
@@ -267,21 +313,25 @@ module Google
267
313
  class Representation < Google::Apis::Core::JsonRepresentation
268
314
  property :error, as: 'error', class: Google::Apis::VideointelligenceV1beta1::GoogleRpcStatus, decorator: Google::Apis::VideointelligenceV1beta1::GoogleRpcStatus::Representation
269
315
 
270
- property :input_uri, as: 'inputUri'
271
- collection :label_annotations, as: 'labelAnnotations', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelAnnotation, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelAnnotation::Representation
316
+ property :explicit_annotation, as: 'explicitAnnotation', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1ExplicitContentAnnotation, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1ExplicitContentAnnotation::Representation
272
317
 
273
- collection :safe_search_annotations, as: 'safeSearchAnnotations', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1SafeSearchAnnotation, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1SafeSearchAnnotation::Representation
318
+ collection :frame_label_annotations, as: 'frameLabelAnnotations', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelAnnotation, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelAnnotation::Representation
319
+
320
+ property :input_uri, as: 'inputUri'
321
+ collection :segment_label_annotations, as: 'segmentLabelAnnotations', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelAnnotation, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelAnnotation::Representation
274
322
 
275
323
  collection :shot_annotations, as: 'shotAnnotations', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1VideoSegment, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1VideoSegment::Representation
276
324
 
325
+ collection :shot_label_annotations, as: 'shotLabelAnnotations', class: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelAnnotation, decorator: Google::Apis::VideointelligenceV1beta1::GoogleCloudVideointelligenceV1LabelAnnotation::Representation
326
+
277
327
  end
278
328
  end
279
329
 
280
330
  class GoogleCloudVideointelligenceV1VideoSegment
281
331
  # @private
282
332
  class Representation < Google::Apis::Core::JsonRepresentation
283
- property :end_time, as: 'endTime'
284
- property :start_time, as: 'startTime'
333
+ property :end_time_offset, as: 'endTimeOffset'
334
+ property :start_time_offset, as: 'startTimeOffset'
285
335
  end
286
336
  end
287
337
 
@@ -27,7 +27,7 @@ module Google
27
27
  # @see https://cloud.google.com/vision/
28
28
  module VisionV1
29
29
  VERSION = 'V1'
30
- REVISION = '20171003'
30
+ REVISION = '20171102'
31
31
 
32
32
  # View and manage your data across Google Cloud Platform services
33
33
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -24,22 +24,22 @@ module Google
24
24
 
25
25
  # Request for performing Google Cloud Vision API tasks over a user-provided
26
26
  # image, with user-requested features.
27
- class AnnotateImageRequest
27
+ class GoogleCloudVisionV1AnnotateImageRequest
28
28
  include Google::Apis::Core::Hashable
29
29
 
30
30
  # Requested features.
31
31
  # Corresponds to the JSON property `features`
32
- # @return [Array<Google::Apis::VisionV1::Feature>]
32
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1Feature>]
33
33
  attr_accessor :features
34
34
 
35
35
  # Client image to perform Google Cloud Vision API tasks over.
36
36
  # Corresponds to the JSON property `image`
37
- # @return [Google::Apis::VisionV1::Image]
37
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1Image]
38
38
  attr_accessor :image
39
39
 
40
40
  # Image context and/or feature-specific parameters.
41
41
  # Corresponds to the JSON property `imageContext`
42
- # @return [Google::Apis::VisionV1::ImageContext]
42
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1ImageContext]
43
43
  attr_accessor :image_context
44
44
 
45
45
  def initialize(**args)
@@ -55,12 +55,12 @@ module Google
55
55
  end
56
56
 
57
57
  # Response to an image annotation request.
58
- class AnnotateImageResponse
58
+ class GoogleCloudVisionV1AnnotateImageResponse
59
59
  include Google::Apis::Core::Hashable
60
60
 
61
61
  # Set of crop hints that are used to generate new crops when serving images.
62
62
  # Corresponds to the JSON property `cropHintsAnnotation`
63
- # @return [Google::Apis::VisionV1::CropHintsAnnotation]
63
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1CropHintsAnnotation]
64
64
  attr_accessor :crop_hints_annotation
65
65
 
66
66
  # The `Status` type defines a logical error model that is suitable for different
@@ -103,60 +103,60 @@ module Google
103
103
  # - Logging. If some API errors are stored in logs, the message `Status` could
104
104
  # be used directly after any stripping needed for security/privacy reasons.
105
105
  # Corresponds to the JSON property `error`
106
- # @return [Google::Apis::VisionV1::Status]
106
+ # @return [Google::Apis::VisionV1::GoogleRpcStatus]
107
107
  attr_accessor :error
108
108
 
109
109
  # If present, face detection has completed successfully.
110
110
  # Corresponds to the JSON property `faceAnnotations`
111
- # @return [Array<Google::Apis::VisionV1::FaceAnnotation>]
111
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1FaceAnnotation>]
112
112
  attr_accessor :face_annotations
113
113
 
114
114
  # TextAnnotation contains a structured representation of OCR extracted text.
115
115
  # The hierarchy of an OCR extracted text structure is like this:
116
116
  # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
117
117
  # Each structural component, starting from Page, may further have their own
118
- # properties. Properties describe detected languages, breaks etc.. Please
119
- # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message
120
- # definition below for more detail.
118
+ # properties. Properties describe detected languages, breaks etc.. Please refer
119
+ # to the TextAnnotation.TextProperty message definition below for more
120
+ # detail.
121
121
  # Corresponds to the JSON property `fullTextAnnotation`
122
- # @return [Google::Apis::VisionV1::TextAnnotation]
122
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotation]
123
123
  attr_accessor :full_text_annotation
124
124
 
125
125
  # Stores image properties, such as dominant colors.
126
126
  # Corresponds to the JSON property `imagePropertiesAnnotation`
127
- # @return [Google::Apis::VisionV1::ImageProperties]
127
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1ImageProperties]
128
128
  attr_accessor :image_properties_annotation
129
129
 
130
130
  # If present, label detection has completed successfully.
131
131
  # Corresponds to the JSON property `labelAnnotations`
132
- # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
132
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation>]
133
133
  attr_accessor :label_annotations
134
134
 
135
135
  # If present, landmark detection has completed successfully.
136
136
  # Corresponds to the JSON property `landmarkAnnotations`
137
- # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
137
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation>]
138
138
  attr_accessor :landmark_annotations
139
139
 
140
140
  # If present, logo detection has completed successfully.
141
141
  # Corresponds to the JSON property `logoAnnotations`
142
- # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
142
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation>]
143
143
  attr_accessor :logo_annotations
144
144
 
145
145
  # Set of features pertaining to the image, computed by computer vision
146
146
  # methods over safe-search verticals (for example, adult, spoof, medical,
147
147
  # violence).
148
148
  # Corresponds to the JSON property `safeSearchAnnotation`
149
- # @return [Google::Apis::VisionV1::SafeSearchAnnotation]
149
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1SafeSearchAnnotation]
150
150
  attr_accessor :safe_search_annotation
151
151
 
152
152
  # If present, text (OCR) detection has completed successfully.
153
153
  # Corresponds to the JSON property `textAnnotations`
154
- # @return [Array<Google::Apis::VisionV1::EntityAnnotation>]
154
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1EntityAnnotation>]
155
155
  attr_accessor :text_annotations
156
156
 
157
157
  # Relevant information for the image from the Internet.
158
158
  # Corresponds to the JSON property `webDetection`
159
- # @return [Google::Apis::VisionV1::WebDetection]
159
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1WebDetection]
160
160
  attr_accessor :web_detection
161
161
 
162
162
  def initialize(**args)
@@ -180,12 +180,12 @@ module Google
180
180
  end
181
181
 
182
182
  # Multiple image annotation requests are batched into a single service call.
183
- class BatchAnnotateImagesRequest
183
+ class GoogleCloudVisionV1BatchAnnotateImagesRequest
184
184
  include Google::Apis::Core::Hashable
185
185
 
186
186
  # Individual image annotation requests for this batch.
187
187
  # Corresponds to the JSON property `requests`
188
- # @return [Array<Google::Apis::VisionV1::AnnotateImageRequest>]
188
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1AnnotateImageRequest>]
189
189
  attr_accessor :requests
190
190
 
191
191
  def initialize(**args)
@@ -199,12 +199,12 @@ module Google
199
199
  end
200
200
 
201
201
  # Response to a batch image annotation request.
202
- class BatchAnnotateImagesResponse
202
+ class GoogleCloudVisionV1BatchAnnotateImagesResponse
203
203
  include Google::Apis::Core::Hashable
204
204
 
205
205
  # Individual responses to image annotation requests within the batch.
206
206
  # Corresponds to the JSON property `responses`
207
- # @return [Array<Google::Apis::VisionV1::AnnotateImageResponse>]
207
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1AnnotateImageResponse>]
208
208
  attr_accessor :responses
209
209
 
210
210
  def initialize(**args)
@@ -218,7 +218,7 @@ module Google
218
218
  end
219
219
 
220
220
  # Logical element on the page.
221
- class Block
221
+ class GoogleCloudVisionV1Block
222
222
  include Google::Apis::Core::Hashable
223
223
 
224
224
  # Detected block type (text, image etc) for this block.
@@ -228,17 +228,17 @@ module Google
228
228
 
229
229
  # A bounding polygon for the detected image annotation.
230
230
  # Corresponds to the JSON property `boundingBox`
231
- # @return [Google::Apis::VisionV1::BoundingPoly]
231
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly]
232
232
  attr_accessor :bounding_box
233
233
 
234
234
  # List of paragraphs in this block (if this blocks is of type text).
235
235
  # Corresponds to the JSON property `paragraphs`
236
- # @return [Array<Google::Apis::VisionV1::Paragraph>]
236
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1Paragraph>]
237
237
  attr_accessor :paragraphs
238
238
 
239
239
  # Additional information detected on the structural component.
240
240
  # Corresponds to the JSON property `property`
241
- # @return [Google::Apis::VisionV1::TextProperty]
241
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty]
242
242
  attr_accessor :property
243
243
 
244
244
  def initialize(**args)
@@ -255,12 +255,12 @@ module Google
255
255
  end
256
256
 
257
257
  # A bounding polygon for the detected image annotation.
258
- class BoundingPoly
258
+ class GoogleCloudVisionV1BoundingPoly
259
259
  include Google::Apis::Core::Hashable
260
260
 
261
261
  # The bounding polygon vertices.
262
262
  # Corresponds to the JSON property `vertices`
263
- # @return [Array<Google::Apis::VisionV1::Vertex>]
263
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1Vertex>]
264
264
  attr_accessor :vertices
265
265
 
266
266
  def initialize(**args)
@@ -273,152 +273,9 @@ module Google
273
273
  end
274
274
  end
275
275
 
276
- # Represents a color in the RGBA color space. This representation is designed
277
- # for simplicity of conversion to/from color representations in various
278
- # languages over compactness; for example, the fields of this representation
279
- # can be trivially provided to the constructor of "java.awt.Color" in Java; it
280
- # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
281
- # method in iOS; and, with just a little work, it can be easily formatted into
282
- # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
283
- # Example (Java):
284
- # import com.google.type.Color;
285
- # // ...
286
- # public static java.awt.Color fromProto(Color protocolor) `
287
- # float alpha = protocolor.hasAlpha()
288
- # ? protocolor.getAlpha().getValue()
289
- # : 1.0;
290
- # return new java.awt.Color(
291
- # protocolor.getRed(),
292
- # protocolor.getGreen(),
293
- # protocolor.getBlue(),
294
- # alpha);
295
- # `
296
- # public static Color toProto(java.awt.Color color) `
297
- # float red = (float) color.getRed();
298
- # float green = (float) color.getGreen();
299
- # float blue = (float) color.getBlue();
300
- # float denominator = 255.0;
301
- # Color.Builder resultBuilder =
302
- # Color
303
- # .newBuilder()
304
- # .setRed(red / denominator)
305
- # .setGreen(green / denominator)
306
- # .setBlue(blue / denominator);
307
- # int alpha = color.getAlpha();
308
- # if (alpha != 255) `
309
- # result.setAlpha(
310
- # FloatValue
311
- # .newBuilder()
312
- # .setValue(((float) alpha) / denominator)
313
- # .build());
314
- # `
315
- # return resultBuilder.build();
316
- # `
317
- # // ...
318
- # Example (iOS / Obj-C):
319
- # // ...
320
- # static UIColor* fromProto(Color* protocolor) `
321
- # float red = [protocolor red];
322
- # float green = [protocolor green];
323
- # float blue = [protocolor blue];
324
- # FloatValue* alpha_wrapper = [protocolor alpha];
325
- # float alpha = 1.0;
326
- # if (alpha_wrapper != nil) `
327
- # alpha = [alpha_wrapper value];
328
- # `
329
- # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
330
- # `
331
- # static Color* toProto(UIColor* color) `
332
- # CGFloat red, green, blue, alpha;
333
- # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
334
- # return nil;
335
- # `
336
- # Color* result = [Color alloc] init];
337
- # [result setRed:red];
338
- # [result setGreen:green];
339
- # [result setBlue:blue];
340
- # if (alpha <= 0.9999) `
341
- # [result setAlpha:floatWrapperWithValue(alpha)];
342
- # `
343
- # [result autorelease];
344
- # return result;
345
- # `
346
- # // ...
347
- # Example (JavaScript):
348
- # // ...
349
- # var protoToCssColor = function(rgb_color) `
350
- # var redFrac = rgb_color.red || 0.0;
351
- # var greenFrac = rgb_color.green || 0.0;
352
- # var blueFrac = rgb_color.blue || 0.0;
353
- # var red = Math.floor(redFrac * 255);
354
- # var green = Math.floor(greenFrac * 255);
355
- # var blue = Math.floor(blueFrac * 255);
356
- # if (!('alpha' in rgb_color)) `
357
- # return rgbToCssColor_(red, green, blue);
358
- # `
359
- # var alphaFrac = rgb_color.alpha.value || 0.0;
360
- # var rgbParams = [red, green, blue].join(',');
361
- # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
362
- # `;
363
- # var rgbToCssColor_ = function(red, green, blue) `
364
- # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
365
- # var hexString = rgbNumber.toString(16);
366
- # var missingZeros = 6 - hexString.length;
367
- # var resultBuilder = ['#'];
368
- # for (var i = 0; i < missingZeros; i++) `
369
- # resultBuilder.push('0');
370
- # `
371
- # resultBuilder.push(hexString);
372
- # return resultBuilder.join('');
373
- # `;
374
- # // ...
375
- class Color
376
- include Google::Apis::Core::Hashable
377
-
378
- # The fraction of this color that should be applied to the pixel. That is,
379
- # the final pixel color is defined by the equation:
380
- # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
381
- # This means that a value of 1.0 corresponds to a solid color, whereas
382
- # a value of 0.0 corresponds to a completely transparent color. This
383
- # uses a wrapper message rather than a simple float scalar so that it is
384
- # possible to distinguish between a default value and the value being unset.
385
- # If omitted, this color object is to be rendered as a solid color
386
- # (as if the alpha value had been explicitly given with a value of 1.0).
387
- # Corresponds to the JSON property `alpha`
388
- # @return [Float]
389
- attr_accessor :alpha
390
-
391
- # The amount of blue in the color as a value in the interval [0, 1].
392
- # Corresponds to the JSON property `blue`
393
- # @return [Float]
394
- attr_accessor :blue
395
-
396
- # The amount of green in the color as a value in the interval [0, 1].
397
- # Corresponds to the JSON property `green`
398
- # @return [Float]
399
- attr_accessor :green
400
-
401
- # The amount of red in the color as a value in the interval [0, 1].
402
- # Corresponds to the JSON property `red`
403
- # @return [Float]
404
- attr_accessor :red
405
-
406
- def initialize(**args)
407
- update!(**args)
408
- end
409
-
410
- # Update properties of this object
411
- def update!(**args)
412
- @alpha = args[:alpha] if args.key?(:alpha)
413
- @blue = args[:blue] if args.key?(:blue)
414
- @green = args[:green] if args.key?(:green)
415
- @red = args[:red] if args.key?(:red)
416
- end
417
- end
418
-
419
276
  # Color information consists of RGB channels, score, and the fraction of
420
277
  # the image that the color occupies in the image.
421
- class ColorInfo
278
+ class GoogleCloudVisionV1ColorInfo
422
279
  include Google::Apis::Core::Hashable
423
280
 
424
281
  # Represents a color in the RGBA color space. This representation is designed
@@ -521,7 +378,7 @@ module Google
521
378
  # `;
522
379
  # // ...
523
380
  # Corresponds to the JSON property `color`
524
- # @return [Google::Apis::VisionV1::Color]
381
+ # @return [Google::Apis::VisionV1::GoogleTypeColor]
525
382
  attr_accessor :color
526
383
 
527
384
  # The fraction of pixels the color occupies in the image.
@@ -548,12 +405,12 @@ module Google
548
405
  end
549
406
 
550
407
  # Single crop hint that is used to generate a new crop when serving an image.
551
- class CropHint
408
+ class GoogleCloudVisionV1CropHint
552
409
  include Google::Apis::Core::Hashable
553
410
 
554
411
  # A bounding polygon for the detected image annotation.
555
412
  # Corresponds to the JSON property `boundingPoly`
556
- # @return [Google::Apis::VisionV1::BoundingPoly]
413
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly]
557
414
  attr_accessor :bounding_poly
558
415
 
559
416
  # Confidence of this being a salient region. Range [0, 1].
@@ -580,12 +437,12 @@ module Google
580
437
  end
581
438
 
582
439
  # Set of crop hints that are used to generate new crops when serving images.
583
- class CropHintsAnnotation
440
+ class GoogleCloudVisionV1CropHintsAnnotation
584
441
  include Google::Apis::Core::Hashable
585
442
 
586
443
  # Crop hint results.
587
444
  # Corresponds to the JSON property `cropHints`
588
- # @return [Array<Google::Apis::VisionV1::CropHint>]
445
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1CropHint>]
589
446
  attr_accessor :crop_hints
590
447
 
591
448
  def initialize(**args)
@@ -599,7 +456,7 @@ module Google
599
456
  end
600
457
 
601
458
  # Parameters for crop hints annotation request.
602
- class CropHintsParams
459
+ class GoogleCloudVisionV1CropHintsParams
603
460
  include Google::Apis::Core::Hashable
604
461
 
605
462
  # Aspect ratios in floats, representing the ratio of the width to the height
@@ -622,66 +479,13 @@ module Google
622
479
  end
623
480
  end
624
481
 
625
- # Detected start or end of a structural component.
626
- class DetectedBreak
627
- include Google::Apis::Core::Hashable
628
-
629
- # True if break prepends the element.
630
- # Corresponds to the JSON property `isPrefix`
631
- # @return [Boolean]
632
- attr_accessor :is_prefix
633
- alias_method :is_prefix?, :is_prefix
634
-
635
- # Detected break type.
636
- # Corresponds to the JSON property `type`
637
- # @return [String]
638
- attr_accessor :type
639
-
640
- def initialize(**args)
641
- update!(**args)
642
- end
643
-
644
- # Update properties of this object
645
- def update!(**args)
646
- @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
647
- @type = args[:type] if args.key?(:type)
648
- end
649
- end
650
-
651
- # Detected language for a structural component.
652
- class DetectedLanguage
653
- include Google::Apis::Core::Hashable
654
-
655
- # Confidence of detected language. Range [0, 1].
656
- # Corresponds to the JSON property `confidence`
657
- # @return [Float]
658
- attr_accessor :confidence
659
-
660
- # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
661
- # information, see
662
- # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
663
- # Corresponds to the JSON property `languageCode`
664
- # @return [String]
665
- attr_accessor :language_code
666
-
667
- def initialize(**args)
668
- update!(**args)
669
- end
670
-
671
- # Update properties of this object
672
- def update!(**args)
673
- @confidence = args[:confidence] if args.key?(:confidence)
674
- @language_code = args[:language_code] if args.key?(:language_code)
675
- end
676
- end
677
-
678
482
  # Set of dominant colors and their corresponding scores.
679
- class DominantColorsAnnotation
483
+ class GoogleCloudVisionV1DominantColorsAnnotation
680
484
  include Google::Apis::Core::Hashable
681
485
 
682
486
  # RGB color values with their score and pixel fraction.
683
487
  # Corresponds to the JSON property `colors`
684
- # @return [Array<Google::Apis::VisionV1::ColorInfo>]
488
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1ColorInfo>]
685
489
  attr_accessor :colors
686
490
 
687
491
  def initialize(**args)
@@ -695,12 +499,12 @@ module Google
695
499
  end
696
500
 
697
501
  # Set of detected entity features.
698
- class EntityAnnotation
502
+ class GoogleCloudVisionV1EntityAnnotation
699
503
  include Google::Apis::Core::Hashable
700
504
 
701
505
  # A bounding polygon for the detected image annotation.
702
506
  # Corresponds to the JSON property `boundingPoly`
703
- # @return [Google::Apis::VisionV1::BoundingPoly]
507
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly]
704
508
  attr_accessor :bounding_poly
705
509
 
706
510
  # The accuracy of the entity detection in an image.
@@ -728,12 +532,12 @@ module Google
728
532
  # may indicate the location of the place where the image was taken.
729
533
  # Location information is usually present for landmarks.
730
534
  # Corresponds to the JSON property `locations`
731
- # @return [Array<Google::Apis::VisionV1::LocationInfo>]
535
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1LocationInfo>]
732
536
  attr_accessor :locations
733
537
 
734
538
  # Opaque entity ID. Some IDs may be available in
735
- # [Google Knowledge Graph Search API](https://developers.google.com/knowledge-
736
- # graph/).
539
+ # [Google Knowledge Graph Search
540
+ # API](https://developers.google.com/knowledge-graph/).
737
541
  # Corresponds to the JSON property `mid`
738
542
  # @return [String]
739
543
  attr_accessor :mid
@@ -741,7 +545,7 @@ module Google
741
545
  # Some entities may have optional user-supplied `Property` (name/value)
742
546
  # fields, such a score or string that qualifies the entity.
743
547
  # Corresponds to the JSON property `properties`
744
- # @return [Array<Google::Apis::VisionV1::Property>]
548
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1Property>]
745
549
  attr_accessor :properties
746
550
 
747
551
  # Overall score of the result. Range [0, 1].
@@ -777,7 +581,7 @@ module Google
777
581
  end
778
582
 
779
583
  # A face annotation object contains the results of face detection.
780
- class FaceAnnotation
584
+ class GoogleCloudVisionV1FaceAnnotation
781
585
  include Google::Apis::Core::Hashable
782
586
 
783
587
  # Anger likelihood.
@@ -792,7 +596,7 @@ module Google
792
596
 
793
597
  # A bounding polygon for the detected image annotation.
794
598
  # Corresponds to the JSON property `boundingPoly`
795
- # @return [Google::Apis::VisionV1::BoundingPoly]
599
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly]
796
600
  attr_accessor :bounding_poly
797
601
 
798
602
  # Detection confidence. Range [0, 1].
@@ -802,7 +606,7 @@ module Google
802
606
 
803
607
  # A bounding polygon for the detected image annotation.
804
608
  # Corresponds to the JSON property `fdBoundingPoly`
805
- # @return [Google::Apis::VisionV1::BoundingPoly]
609
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly]
806
610
  attr_accessor :fd_bounding_poly
807
611
 
808
612
  # Headwear likelihood.
@@ -822,7 +626,7 @@ module Google
822
626
 
823
627
  # Detected face landmarks.
824
628
  # Corresponds to the JSON property `landmarks`
825
- # @return [Array<Google::Apis::VisionV1::Landmark>]
629
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1FaceAnnotationLandmark>]
826
630
  attr_accessor :landmarks
827
631
 
828
632
  # Yaw angle, which indicates the leftward/rightward angle that the face is
@@ -884,11 +688,38 @@ module Google
884
688
  end
885
689
  end
886
690
 
691
+ # A face-specific landmark (for example, a face feature).
692
+ class GoogleCloudVisionV1FaceAnnotationLandmark
693
+ include Google::Apis::Core::Hashable
694
+
695
+ # A 3D position in the image, used primarily for Face detection landmarks.
696
+ # A valid Position must have both x and y coordinates.
697
+ # The position coordinates are in the same scale as the original image.
698
+ # Corresponds to the JSON property `position`
699
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1Position]
700
+ attr_accessor :position
701
+
702
+ # Face landmark type.
703
+ # Corresponds to the JSON property `type`
704
+ # @return [String]
705
+ attr_accessor :type
706
+
707
+ def initialize(**args)
708
+ update!(**args)
709
+ end
710
+
711
+ # Update properties of this object
712
+ def update!(**args)
713
+ @position = args[:position] if args.key?(:position)
714
+ @type = args[:type] if args.key?(:type)
715
+ end
716
+ end
717
+
887
718
  # Users describe the type of Google Cloud Vision API tasks to perform over
888
719
  # images by using *Feature*s. Each Feature indicates a type of image
889
720
  # detection task to perform. Features encode the Cloud Vision API
890
721
  # vertical to operate on and the number of top-scoring results to return.
891
- class Feature
722
+ class GoogleCloudVisionV1Feature
892
723
  include Google::Apis::Core::Hashable
893
724
 
894
725
  # Maximum number of results of this type.
@@ -913,7 +744,7 @@ module Google
913
744
  end
914
745
 
915
746
  # Client image to perform Google Cloud Vision API tasks over.
916
- class Image
747
+ class GoogleCloudVisionV1Image
917
748
  include Google::Apis::Core::Hashable
918
749
 
919
750
  # Image content, represented as a stream of bytes.
@@ -926,7 +757,7 @@ module Google
926
757
 
927
758
  # External image source (Google Cloud Storage image location).
928
759
  # Corresponds to the JSON property `source`
929
- # @return [Google::Apis::VisionV1::ImageSource]
760
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1ImageSource]
930
761
  attr_accessor :source
931
762
 
932
763
  def initialize(**args)
@@ -941,12 +772,12 @@ module Google
941
772
  end
942
773
 
943
774
  # Image context and/or feature-specific parameters.
944
- class ImageContext
775
+ class GoogleCloudVisionV1ImageContext
945
776
  include Google::Apis::Core::Hashable
946
777
 
947
778
  # Parameters for crop hints annotation request.
948
779
  # Corresponds to the JSON property `cropHintsParams`
949
- # @return [Google::Apis::VisionV1::CropHintsParams]
780
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1CropHintsParams]
950
781
  attr_accessor :crop_hints_params
951
782
 
952
783
  # List of languages to use for TEXT_DETECTION. In most cases, an empty value
@@ -963,7 +794,7 @@ module Google
963
794
 
964
795
  # Rectangle determined by min and max `LatLng` pairs.
965
796
  # Corresponds to the JSON property `latLongRect`
966
- # @return [Google::Apis::VisionV1::LatLongRect]
797
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1LatLongRect]
967
798
  attr_accessor :lat_long_rect
968
799
 
969
800
  def initialize(**args)
@@ -979,12 +810,12 @@ module Google
979
810
  end
980
811
 
981
812
  # Stores image properties, such as dominant colors.
982
- class ImageProperties
813
+ class GoogleCloudVisionV1ImageProperties
983
814
  include Google::Apis::Core::Hashable
984
815
 
985
816
  # Set of dominant colors and their corresponding scores.
986
817
  # Corresponds to the JSON property `dominantColors`
987
- # @return [Google::Apis::VisionV1::DominantColorsAnnotation]
818
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1DominantColorsAnnotation]
988
819
  attr_accessor :dominant_colors
989
820
 
990
821
  def initialize(**args)
@@ -998,7 +829,7 @@ module Google
998
829
  end
999
830
 
1000
831
  # External image source (Google Cloud Storage image location).
1001
- class ImageSource
832
+ class GoogleCloudVisionV1ImageSource
1002
833
  include Google::Apis::Core::Hashable
1003
834
 
1004
835
  # NOTE: For new code `image_uri` below is preferred.
@@ -1036,25 +867,27 @@ module Google
1036
867
  end
1037
868
  end
1038
869
 
1039
- # A face-specific landmark (for example, a face feature).
1040
- # Landmark positions may fall outside the bounds of the image
1041
- # if the face is near one or more edges of the image.
1042
- # Therefore it is NOT guaranteed that `0 <= x < width` or
1043
- # `0 <= y < height`.
1044
- class Landmark
870
+ # Rectangle determined by min and max `LatLng` pairs.
871
+ class GoogleCloudVisionV1LatLongRect
1045
872
  include Google::Apis::Core::Hashable
1046
873
 
1047
- # A 3D position in the image, used primarily for Face detection landmarks.
1048
- # A valid Position must have both x and y coordinates.
1049
- # The position coordinates are in the same scale as the original image.
1050
- # Corresponds to the JSON property `position`
1051
- # @return [Google::Apis::VisionV1::Position]
1052
- attr_accessor :position
874
+ # An object representing a latitude/longitude pair. This is expressed as a pair
875
+ # of doubles representing degrees latitude and degrees longitude. Unless
876
+ # specified otherwise, this must conform to the
877
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
878
+ # standard</a>. Values must be within normalized ranges.
879
+ # Corresponds to the JSON property `maxLatLng`
880
+ # @return [Google::Apis::VisionV1::GoogleTypeLatLng]
881
+ attr_accessor :max_lat_lng
1053
882
 
1054
- # Face landmark type.
1055
- # Corresponds to the JSON property `type`
1056
- # @return [String]
1057
- attr_accessor :type
883
+ # An object representing a latitude/longitude pair. This is expressed as a pair
884
+ # of doubles representing degrees latitude and degrees longitude. Unless
885
+ # specified otherwise, this must conform to the
886
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
887
+ # standard</a>. Values must be within normalized ranges.
888
+ # Corresponds to the JSON property `minLatLng`
889
+ # @return [Google::Apis::VisionV1::GoogleTypeLatLng]
890
+ attr_accessor :min_lat_lng
1058
891
 
1059
892
  def initialize(**args)
1060
893
  update!(**args)
@@ -1062,165 +895,13 @@ module Google
1062
895
 
1063
896
  # Update properties of this object
1064
897
  def update!(**args)
1065
- @position = args[:position] if args.key?(:position)
1066
- @type = args[:type] if args.key?(:type)
898
+ @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng)
899
+ @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng)
1067
900
  end
1068
901
  end
1069
902
 
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
- # Example of normalization code in Python:
1076
- # def NormalizeLongitude(longitude):
1077
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1078
- # q, r = divmod(longitude, 360.0)
1079
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
1080
- # return r - 360.0
1081
- # return r
1082
- # def NormalizeLatLng(latitude, longitude):
1083
- # """Wraps decimal degrees latitude and longitude to
1084
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1085
- # r = latitude % 360.0
1086
- # if r <= 90.0:
1087
- # return r, NormalizeLongitude(longitude)
1088
- # elif r >= 270.0:
1089
- # return r - 360, NormalizeLongitude(longitude)
1090
- # else:
1091
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
1092
- # assert 180.0 == NormalizeLongitude(180.0)
1093
- # assert -180.0 == NormalizeLongitude(-180.0)
1094
- # assert -179.0 == NormalizeLongitude(181.0)
1095
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1096
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1097
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1098
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1099
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1100
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1101
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1102
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1103
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1104
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1105
- class LatLng
1106
- include Google::Apis::Core::Hashable
1107
-
1108
- # The latitude in degrees. It must be in the range [-90.0, +90.0].
1109
- # Corresponds to the JSON property `latitude`
1110
- # @return [Float]
1111
- attr_accessor :latitude
1112
-
1113
- # The longitude in degrees. It must be in the range [-180.0, +180.0].
1114
- # Corresponds to the JSON property `longitude`
1115
- # @return [Float]
1116
- attr_accessor :longitude
1117
-
1118
- def initialize(**args)
1119
- update!(**args)
1120
- end
1121
-
1122
- # Update properties of this object
1123
- def update!(**args)
1124
- @latitude = args[:latitude] if args.key?(:latitude)
1125
- @longitude = args[:longitude] if args.key?(:longitude)
1126
- end
1127
- end
1128
-
1129
- # Rectangle determined by min and max `LatLng` pairs.
1130
- class LatLongRect
1131
- include Google::Apis::Core::Hashable
1132
-
1133
- # An object representing a latitude/longitude pair. This is expressed as a pair
1134
- # of doubles representing degrees latitude and degrees longitude. Unless
1135
- # specified otherwise, this must conform to the
1136
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1137
- # standard</a>. Values must be within normalized ranges.
1138
- # Example of normalization code in Python:
1139
- # def NormalizeLongitude(longitude):
1140
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1141
- # q, r = divmod(longitude, 360.0)
1142
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
1143
- # return r - 360.0
1144
- # return r
1145
- # def NormalizeLatLng(latitude, longitude):
1146
- # """Wraps decimal degrees latitude and longitude to
1147
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1148
- # r = latitude % 360.0
1149
- # if r <= 90.0:
1150
- # return r, NormalizeLongitude(longitude)
1151
- # elif r >= 270.0:
1152
- # return r - 360, NormalizeLongitude(longitude)
1153
- # else:
1154
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
1155
- # assert 180.0 == NormalizeLongitude(180.0)
1156
- # assert -180.0 == NormalizeLongitude(-180.0)
1157
- # assert -179.0 == NormalizeLongitude(181.0)
1158
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1159
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1160
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1161
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1162
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1163
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1164
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1165
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1166
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1167
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1168
- # Corresponds to the JSON property `maxLatLng`
1169
- # @return [Google::Apis::VisionV1::LatLng]
1170
- attr_accessor :max_lat_lng
1171
-
1172
- # An object representing a latitude/longitude pair. This is expressed as a pair
1173
- # of doubles representing degrees latitude and degrees longitude. Unless
1174
- # specified otherwise, this must conform to the
1175
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1176
- # standard</a>. Values must be within normalized ranges.
1177
- # Example of normalization code in Python:
1178
- # def NormalizeLongitude(longitude):
1179
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1180
- # q, r = divmod(longitude, 360.0)
1181
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
1182
- # return r - 360.0
1183
- # return r
1184
- # def NormalizeLatLng(latitude, longitude):
1185
- # """Wraps decimal degrees latitude and longitude to
1186
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1187
- # r = latitude % 360.0
1188
- # if r <= 90.0:
1189
- # return r, NormalizeLongitude(longitude)
1190
- # elif r >= 270.0:
1191
- # return r - 360, NormalizeLongitude(longitude)
1192
- # else:
1193
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
1194
- # assert 180.0 == NormalizeLongitude(180.0)
1195
- # assert -180.0 == NormalizeLongitude(-180.0)
1196
- # assert -179.0 == NormalizeLongitude(181.0)
1197
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1198
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1199
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1200
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1201
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1202
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1203
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1204
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1205
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1206
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1207
- # Corresponds to the JSON property `minLatLng`
1208
- # @return [Google::Apis::VisionV1::LatLng]
1209
- attr_accessor :min_lat_lng
1210
-
1211
- def initialize(**args)
1212
- update!(**args)
1213
- end
1214
-
1215
- # Update properties of this object
1216
- def update!(**args)
1217
- @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng)
1218
- @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng)
1219
- end
1220
- end
1221
-
1222
- # Detected entity location information.
1223
- class LocationInfo
903
+ # Detected entity location information.
904
+ class GoogleCloudVisionV1LocationInfo
1224
905
  include Google::Apis::Core::Hashable
1225
906
 
1226
907
  # An object representing a latitude/longitude pair. This is expressed as a pair
@@ -1228,38 +909,8 @@ module Google
1228
909
  # specified otherwise, this must conform to the
1229
910
  # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1230
911
  # standard</a>. Values must be within normalized ranges.
1231
- # Example of normalization code in Python:
1232
- # def NormalizeLongitude(longitude):
1233
- # """Wraps decimal degrees longitude to [-180.0, 180.0]."""
1234
- # q, r = divmod(longitude, 360.0)
1235
- # if r > 180.0 or (r == 180.0 and q <= -1.0):
1236
- # return r - 360.0
1237
- # return r
1238
- # def NormalizeLatLng(latitude, longitude):
1239
- # """Wraps decimal degrees latitude and longitude to
1240
- # [-90.0, 90.0] and [-180.0, 180.0], respectively."""
1241
- # r = latitude % 360.0
1242
- # if r <= 90.0:
1243
- # return r, NormalizeLongitude(longitude)
1244
- # elif r >= 270.0:
1245
- # return r - 360, NormalizeLongitude(longitude)
1246
- # else:
1247
- # return 180 - r, NormalizeLongitude(longitude + 180.0)
1248
- # assert 180.0 == NormalizeLongitude(180.0)
1249
- # assert -180.0 == NormalizeLongitude(-180.0)
1250
- # assert -179.0 == NormalizeLongitude(181.0)
1251
- # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
1252
- # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
1253
- # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
1254
- # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
1255
- # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
1256
- # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
1257
- # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
1258
- # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
1259
- # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
1260
- # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
1261
912
  # Corresponds to the JSON property `latLng`
1262
- # @return [Google::Apis::VisionV1::LatLng]
913
+ # @return [Google::Apis::VisionV1::GoogleTypeLatLng]
1263
914
  attr_accessor :lat_lng
1264
915
 
1265
916
  def initialize(**args)
@@ -1273,12 +924,12 @@ module Google
1273
924
  end
1274
925
 
1275
926
  # Detected page from OCR.
1276
- class Page
927
+ class GoogleCloudVisionV1Page
1277
928
  include Google::Apis::Core::Hashable
1278
929
 
1279
930
  # List of blocks of text, images etc on this page.
1280
931
  # Corresponds to the JSON property `blocks`
1281
- # @return [Array<Google::Apis::VisionV1::Block>]
932
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1Block>]
1282
933
  attr_accessor :blocks
1283
934
 
1284
935
  # Page height in pixels.
@@ -1288,7 +939,7 @@ module Google
1288
939
 
1289
940
  # Additional information detected on the structural component.
1290
941
  # Corresponds to the JSON property `property`
1291
- # @return [Google::Apis::VisionV1::TextProperty]
942
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty]
1292
943
  attr_accessor :property
1293
944
 
1294
945
  # Page width in pixels.
@@ -1310,22 +961,22 @@ module Google
1310
961
  end
1311
962
 
1312
963
  # Structural unit of text representing a number of words in certain order.
1313
- class Paragraph
964
+ class GoogleCloudVisionV1Paragraph
1314
965
  include Google::Apis::Core::Hashable
1315
966
 
1316
967
  # A bounding polygon for the detected image annotation.
1317
968
  # Corresponds to the JSON property `boundingBox`
1318
- # @return [Google::Apis::VisionV1::BoundingPoly]
969
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly]
1319
970
  attr_accessor :bounding_box
1320
971
 
1321
972
  # Additional information detected on the structural component.
1322
973
  # Corresponds to the JSON property `property`
1323
- # @return [Google::Apis::VisionV1::TextProperty]
974
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty]
1324
975
  attr_accessor :property
1325
976
 
1326
977
  # List of words in this paragraph.
1327
978
  # Corresponds to the JSON property `words`
1328
- # @return [Array<Google::Apis::VisionV1::Word>]
979
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1Word>]
1329
980
  attr_accessor :words
1330
981
 
1331
982
  def initialize(**args)
@@ -1343,7 +994,7 @@ module Google
1343
994
  # A 3D position in the image, used primarily for Face detection landmarks.
1344
995
  # A valid Position must have both x and y coordinates.
1345
996
  # The position coordinates are in the same scale as the original image.
1346
- class Position
997
+ class GoogleCloudVisionV1Position
1347
998
  include Google::Apis::Core::Hashable
1348
999
 
1349
1000
  # X coordinate.
@@ -1374,7 +1025,7 @@ module Google
1374
1025
  end
1375
1026
 
1376
1027
  # A `Property` consists of a user-supplied name/value pair.
1377
- class Property
1028
+ class GoogleCloudVisionV1Property
1378
1029
  include Google::Apis::Core::Hashable
1379
1030
 
1380
1031
  # Name of the property.
@@ -1407,7 +1058,7 @@ module Google
1407
1058
  # Set of features pertaining to the image, computed by computer vision
1408
1059
  # methods over safe-search verticals (for example, adult, spoof, medical,
1409
1060
  # violence).
1410
- class SafeSearchAnnotation
1061
+ class GoogleCloudVisionV1SafeSearchAnnotation
1411
1062
  include Google::Apis::Core::Hashable
1412
1063
 
1413
1064
  # Represents the adult content likelihood for the image. Adult content may
@@ -1447,90 +1098,18 @@ module Google
1447
1098
  end
1448
1099
  end
1449
1100
 
1450
- # The `Status` type defines a logical error model that is suitable for different
1451
- # programming environments, including REST APIs and RPC APIs. It is used by
1452
- # [gRPC](https://github.com/grpc). The error model is designed to be:
1453
- # - Simple to use and understand for most users
1454
- # - Flexible enough to meet unexpected needs
1455
- # # Overview
1456
- # The `Status` message contains three pieces of data: error code, error message,
1457
- # and error details. The error code should be an enum value of
1458
- # google.rpc.Code, but it may accept additional error codes if needed. The
1459
- # error message should be a developer-facing English message that helps
1460
- # developers *understand* and *resolve* the error. If a localized user-facing
1461
- # error message is needed, put the localized message in the error details or
1462
- # localize it in the client. The optional error details may contain arbitrary
1463
- # information about the error. There is a predefined set of error detail types
1464
- # in the package `google.rpc` that can be used for common error conditions.
1465
- # # Language mapping
1466
- # The `Status` message is the logical representation of the error model, but it
1467
- # is not necessarily the actual wire format. When the `Status` message is
1468
- # exposed in different client libraries and different wire protocols, it can be
1469
- # mapped differently. For example, it will likely be mapped to some exceptions
1470
- # in Java, but more likely mapped to some error codes in C.
1471
- # # Other uses
1472
- # The error model and the `Status` message can be used in a variety of
1473
- # environments, either with or without APIs, to provide a
1474
- # consistent developer experience across different environments.
1475
- # Example uses of this error model include:
1476
- # - Partial errors. If a service needs to return partial errors to the client,
1477
- # it may embed the `Status` in the normal response to indicate the partial
1478
- # errors.
1479
- # - Workflow errors. A typical workflow has multiple steps. Each step may
1480
- # have a `Status` message for error reporting.
1481
- # - Batch operations. If a client uses batch request and batch response, the
1482
- # `Status` message should be used directly inside batch response, one for
1483
- # each error sub-response.
1484
- # - Asynchronous operations. If an API call embeds asynchronous operation
1485
- # results in its response, the status of those operations should be
1486
- # represented directly using the `Status` message.
1487
- # - Logging. If some API errors are stored in logs, the message `Status` could
1488
- # be used directly after any stripping needed for security/privacy reasons.
1489
- class Status
1490
- include Google::Apis::Core::Hashable
1491
-
1492
- # The status code, which should be an enum value of google.rpc.Code.
1493
- # Corresponds to the JSON property `code`
1494
- # @return [Fixnum]
1495
- attr_accessor :code
1496
-
1497
- # A list of messages that carry the error details. There is a common set of
1498
- # message types for APIs to use.
1499
- # Corresponds to the JSON property `details`
1500
- # @return [Array<Hash<String,Object>>]
1501
- attr_accessor :details
1502
-
1503
- # A developer-facing error message, which should be in English. Any
1504
- # user-facing error message should be localized and sent in the
1505
- # google.rpc.Status.details field, or localized by the client.
1506
- # Corresponds to the JSON property `message`
1507
- # @return [String]
1508
- attr_accessor :message
1509
-
1510
- def initialize(**args)
1511
- update!(**args)
1512
- end
1513
-
1514
- # Update properties of this object
1515
- def update!(**args)
1516
- @code = args[:code] if args.key?(:code)
1517
- @details = args[:details] if args.key?(:details)
1518
- @message = args[:message] if args.key?(:message)
1519
- end
1520
- end
1521
-
1522
1101
  # A single symbol representation.
1523
- class Symbol
1102
+ class GoogleCloudVisionV1Symbol
1524
1103
  include Google::Apis::Core::Hashable
1525
1104
 
1526
1105
  # A bounding polygon for the detected image annotation.
1527
1106
  # Corresponds to the JSON property `boundingBox`
1528
- # @return [Google::Apis::VisionV1::BoundingPoly]
1107
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly]
1529
1108
  attr_accessor :bounding_box
1530
1109
 
1531
1110
  # Additional information detected on the structural component.
1532
1111
  # Corresponds to the JSON property `property`
1533
- # @return [Google::Apis::VisionV1::TextProperty]
1112
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty]
1534
1113
  attr_accessor :property
1535
1114
 
1536
1115
  # The actual UTF-8 representation of the symbol.
@@ -1554,15 +1133,15 @@ module Google
1554
1133
  # The hierarchy of an OCR extracted text structure is like this:
1555
1134
  # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
1556
1135
  # Each structural component, starting from Page, may further have their own
1557
- # properties. Properties describe detected languages, breaks etc.. Please
1558
- # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message
1559
- # definition below for more detail.
1560
- class TextAnnotation
1136
+ # properties. Properties describe detected languages, breaks etc.. Please refer
1137
+ # to the TextAnnotation.TextProperty message definition below for more
1138
+ # detail.
1139
+ class GoogleCloudVisionV1TextAnnotation
1561
1140
  include Google::Apis::Core::Hashable
1562
1141
 
1563
1142
  # List of pages detected by OCR.
1564
1143
  # Corresponds to the JSON property `pages`
1565
- # @return [Array<Google::Apis::VisionV1::Page>]
1144
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1Page>]
1566
1145
  attr_accessor :pages
1567
1146
 
1568
1147
  # UTF-8 text detected on the pages.
@@ -1581,18 +1160,71 @@ module Google
1581
1160
  end
1582
1161
  end
1583
1162
 
1163
+ # Detected start or end of a structural component.
1164
+ class GoogleCloudVisionV1TextAnnotationDetectedBreak
1165
+ include Google::Apis::Core::Hashable
1166
+
1167
+ # True if break prepends the element.
1168
+ # Corresponds to the JSON property `isPrefix`
1169
+ # @return [Boolean]
1170
+ attr_accessor :is_prefix
1171
+ alias_method :is_prefix?, :is_prefix
1172
+
1173
+ # Detected break type.
1174
+ # Corresponds to the JSON property `type`
1175
+ # @return [String]
1176
+ attr_accessor :type
1177
+
1178
+ def initialize(**args)
1179
+ update!(**args)
1180
+ end
1181
+
1182
+ # Update properties of this object
1183
+ def update!(**args)
1184
+ @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
1185
+ @type = args[:type] if args.key?(:type)
1186
+ end
1187
+ end
1188
+
1189
+ # Detected language for a structural component.
1190
+ class GoogleCloudVisionV1TextAnnotationDetectedLanguage
1191
+ include Google::Apis::Core::Hashable
1192
+
1193
+ # Confidence of detected language. Range [0, 1].
1194
+ # Corresponds to the JSON property `confidence`
1195
+ # @return [Float]
1196
+ attr_accessor :confidence
1197
+
1198
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
1199
+ # information, see
1200
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1201
+ # Corresponds to the JSON property `languageCode`
1202
+ # @return [String]
1203
+ attr_accessor :language_code
1204
+
1205
+ def initialize(**args)
1206
+ update!(**args)
1207
+ end
1208
+
1209
+ # Update properties of this object
1210
+ def update!(**args)
1211
+ @confidence = args[:confidence] if args.key?(:confidence)
1212
+ @language_code = args[:language_code] if args.key?(:language_code)
1213
+ end
1214
+ end
1215
+
1584
1216
  # Additional information detected on the structural component.
1585
- class TextProperty
1217
+ class GoogleCloudVisionV1TextAnnotationTextProperty
1586
1218
  include Google::Apis::Core::Hashable
1587
1219
 
1588
1220
  # Detected start or end of a structural component.
1589
1221
  # Corresponds to the JSON property `detectedBreak`
1590
- # @return [Google::Apis::VisionV1::DetectedBreak]
1222
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationDetectedBreak]
1591
1223
  attr_accessor :detected_break
1592
1224
 
1593
1225
  # A list of detected languages together with confidence.
1594
1226
  # Corresponds to the JSON property `detectedLanguages`
1595
- # @return [Array<Google::Apis::VisionV1::DetectedLanguage>]
1227
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationDetectedLanguage>]
1596
1228
  attr_accessor :detected_languages
1597
1229
 
1598
1230
  def initialize(**args)
@@ -1608,7 +1240,7 @@ module Google
1608
1240
 
1609
1241
  # A vertex represents a 2D point in the image.
1610
1242
  # NOTE: the vertex coordinates are in the same scale as the original image.
1611
- class Vertex
1243
+ class GoogleCloudVisionV1Vertex
1612
1244
  include Google::Apis::Core::Hashable
1613
1245
 
1614
1246
  # X coordinate.
@@ -1633,35 +1265,35 @@ module Google
1633
1265
  end
1634
1266
 
1635
1267
  # Relevant information for the image from the Internet.
1636
- class WebDetection
1268
+ class GoogleCloudVisionV1WebDetection
1637
1269
  include Google::Apis::Core::Hashable
1638
1270
 
1639
1271
  # Fully matching images from the Internet.
1640
1272
  # Can include resized copies of the query image.
1641
1273
  # Corresponds to the JSON property `fullMatchingImages`
1642
- # @return [Array<Google::Apis::VisionV1::WebImage>]
1274
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebImage>]
1643
1275
  attr_accessor :full_matching_images
1644
1276
 
1645
1277
  # Web pages containing the matching images from the Internet.
1646
1278
  # Corresponds to the JSON property `pagesWithMatchingImages`
1647
- # @return [Array<Google::Apis::VisionV1::WebPage>]
1279
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebPage>]
1648
1280
  attr_accessor :pages_with_matching_images
1649
1281
 
1650
1282
  # Partial matching images from the Internet.
1651
1283
  # Those images are similar enough to share some key-point features. For
1652
1284
  # example an original image will likely have partial matching for its crops.
1653
1285
  # Corresponds to the JSON property `partialMatchingImages`
1654
- # @return [Array<Google::Apis::VisionV1::WebImage>]
1286
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebImage>]
1655
1287
  attr_accessor :partial_matching_images
1656
1288
 
1657
1289
  # The visually similar image results.
1658
1290
  # Corresponds to the JSON property `visuallySimilarImages`
1659
- # @return [Array<Google::Apis::VisionV1::WebImage>]
1291
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebImage>]
1660
1292
  attr_accessor :visually_similar_images
1661
1293
 
1662
1294
  # Deduced entities from similar images on the Internet.
1663
1295
  # Corresponds to the JSON property `webEntities`
1664
- # @return [Array<Google::Apis::VisionV1::WebEntity>]
1296
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1WebDetectionWebEntity>]
1665
1297
  attr_accessor :web_entities
1666
1298
 
1667
1299
  def initialize(**args)
@@ -1679,7 +1311,7 @@ module Google
1679
1311
  end
1680
1312
 
1681
1313
  # Entity deduced from similar images on the Internet.
1682
- class WebEntity
1314
+ class GoogleCloudVisionV1WebDetectionWebEntity
1683
1315
  include Google::Apis::Core::Hashable
1684
1316
 
1685
1317
  # Canonical description of the entity, in English.
@@ -1711,7 +1343,7 @@ module Google
1711
1343
  end
1712
1344
 
1713
1345
  # Metadata for online images.
1714
- class WebImage
1346
+ class GoogleCloudVisionV1WebDetectionWebImage
1715
1347
  include Google::Apis::Core::Hashable
1716
1348
 
1717
1349
  # (Deprecated) Overall relevancy score for the image.
@@ -1736,7 +1368,7 @@ module Google
1736
1368
  end
1737
1369
 
1738
1370
  # Metadata for web pages.
1739
- class WebPage
1371
+ class GoogleCloudVisionV1WebDetectionWebPage
1740
1372
  include Google::Apis::Core::Hashable
1741
1373
 
1742
1374
  # (Deprecated) Overall relevancy score for the web page.
@@ -1761,23 +1393,23 @@ module Google
1761
1393
  end
1762
1394
 
1763
1395
  # A word representation.
1764
- class Word
1396
+ class GoogleCloudVisionV1Word
1765
1397
  include Google::Apis::Core::Hashable
1766
1398
 
1767
1399
  # A bounding polygon for the detected image annotation.
1768
1400
  # Corresponds to the JSON property `boundingBox`
1769
- # @return [Google::Apis::VisionV1::BoundingPoly]
1401
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1BoundingPoly]
1770
1402
  attr_accessor :bounding_box
1771
1403
 
1772
1404
  # Additional information detected on the structural component.
1773
1405
  # Corresponds to the JSON property `property`
1774
- # @return [Google::Apis::VisionV1::TextProperty]
1406
+ # @return [Google::Apis::VisionV1::GoogleCloudVisionV1TextAnnotationTextProperty]
1775
1407
  attr_accessor :property
1776
1408
 
1777
1409
  # List of symbols in the word.
1778
1410
  # The order of the symbols follows the natural reading order.
1779
1411
  # Corresponds to the JSON property `symbols`
1780
- # @return [Array<Google::Apis::VisionV1::Symbol>]
1412
+ # @return [Array<Google::Apis::VisionV1::GoogleCloudVisionV1Symbol>]
1781
1413
  attr_accessor :symbols
1782
1414
 
1783
1415
  def initialize(**args)
@@ -1791,6 +1423,250 @@ module Google
1791
1423
  @symbols = args[:symbols] if args.key?(:symbols)
1792
1424
  end
1793
1425
  end
1426
+
1427
+ # The `Status` type defines a logical error model that is suitable for different
1428
+ # programming environments, including REST APIs and RPC APIs. It is used by
1429
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
1430
+ # - Simple to use and understand for most users
1431
+ # - Flexible enough to meet unexpected needs
1432
+ # # Overview
1433
+ # The `Status` message contains three pieces of data: error code, error message,
1434
+ # and error details. The error code should be an enum value of
1435
+ # google.rpc.Code, but it may accept additional error codes if needed. The
1436
+ # error message should be a developer-facing English message that helps
1437
+ # developers *understand* and *resolve* the error. If a localized user-facing
1438
+ # error message is needed, put the localized message in the error details or
1439
+ # localize it in the client. The optional error details may contain arbitrary
1440
+ # information about the error. There is a predefined set of error detail types
1441
+ # in the package `google.rpc` that can be used for common error conditions.
1442
+ # # Language mapping
1443
+ # The `Status` message is the logical representation of the error model, but it
1444
+ # is not necessarily the actual wire format. When the `Status` message is
1445
+ # exposed in different client libraries and different wire protocols, it can be
1446
+ # mapped differently. For example, it will likely be mapped to some exceptions
1447
+ # in Java, but more likely mapped to some error codes in C.
1448
+ # # Other uses
1449
+ # The error model and the `Status` message can be used in a variety of
1450
+ # environments, either with or without APIs, to provide a
1451
+ # consistent developer experience across different environments.
1452
+ # Example uses of this error model include:
1453
+ # - Partial errors. If a service needs to return partial errors to the client,
1454
+ # it may embed the `Status` in the normal response to indicate the partial
1455
+ # errors.
1456
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
1457
+ # have a `Status` message for error reporting.
1458
+ # - Batch operations. If a client uses batch request and batch response, the
1459
+ # `Status` message should be used directly inside batch response, one for
1460
+ # each error sub-response.
1461
+ # - Asynchronous operations. If an API call embeds asynchronous operation
1462
+ # results in its response, the status of those operations should be
1463
+ # represented directly using the `Status` message.
1464
+ # - Logging. If some API errors are stored in logs, the message `Status` could
1465
+ # be used directly after any stripping needed for security/privacy reasons.
1466
+ class GoogleRpcStatus
1467
+ include Google::Apis::Core::Hashable
1468
+
1469
+ # The status code, which should be an enum value of google.rpc.Code.
1470
+ # Corresponds to the JSON property `code`
1471
+ # @return [Fixnum]
1472
+ attr_accessor :code
1473
+
1474
+ # A list of messages that carry the error details. There is a common set of
1475
+ # message types for APIs to use.
1476
+ # Corresponds to the JSON property `details`
1477
+ # @return [Array<Hash<String,Object>>]
1478
+ attr_accessor :details
1479
+
1480
+ # A developer-facing error message, which should be in English. Any
1481
+ # user-facing error message should be localized and sent in the
1482
+ # google.rpc.Status.details field, or localized by the client.
1483
+ # Corresponds to the JSON property `message`
1484
+ # @return [String]
1485
+ attr_accessor :message
1486
+
1487
+ def initialize(**args)
1488
+ update!(**args)
1489
+ end
1490
+
1491
+ # Update properties of this object
1492
+ def update!(**args)
1493
+ @code = args[:code] if args.key?(:code)
1494
+ @details = args[:details] if args.key?(:details)
1495
+ @message = args[:message] if args.key?(:message)
1496
+ end
1497
+ end
1498
+
1499
+ # Represents a color in the RGBA color space. This representation is designed
1500
+ # for simplicity of conversion to/from color representations in various
1501
+ # languages over compactness; for example, the fields of this representation
1502
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1503
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1504
+ # method in iOS; and, with just a little work, it can be easily formatted into
1505
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1506
+ # Example (Java):
1507
+ # import com.google.type.Color;
1508
+ # // ...
1509
+ # public static java.awt.Color fromProto(Color protocolor) `
1510
+ # float alpha = protocolor.hasAlpha()
1511
+ # ? protocolor.getAlpha().getValue()
1512
+ # : 1.0;
1513
+ # return new java.awt.Color(
1514
+ # protocolor.getRed(),
1515
+ # protocolor.getGreen(),
1516
+ # protocolor.getBlue(),
1517
+ # alpha);
1518
+ # `
1519
+ # public static Color toProto(java.awt.Color color) `
1520
+ # float red = (float) color.getRed();
1521
+ # float green = (float) color.getGreen();
1522
+ # float blue = (float) color.getBlue();
1523
+ # float denominator = 255.0;
1524
+ # Color.Builder resultBuilder =
1525
+ # Color
1526
+ # .newBuilder()
1527
+ # .setRed(red / denominator)
1528
+ # .setGreen(green / denominator)
1529
+ # .setBlue(blue / denominator);
1530
+ # int alpha = color.getAlpha();
1531
+ # if (alpha != 255) `
1532
+ # result.setAlpha(
1533
+ # FloatValue
1534
+ # .newBuilder()
1535
+ # .setValue(((float) alpha) / denominator)
1536
+ # .build());
1537
+ # `
1538
+ # return resultBuilder.build();
1539
+ # `
1540
+ # // ...
1541
+ # Example (iOS / Obj-C):
1542
+ # // ...
1543
+ # static UIColor* fromProto(Color* protocolor) `
1544
+ # float red = [protocolor red];
1545
+ # float green = [protocolor green];
1546
+ # float blue = [protocolor blue];
1547
+ # FloatValue* alpha_wrapper = [protocolor alpha];
1548
+ # float alpha = 1.0;
1549
+ # if (alpha_wrapper != nil) `
1550
+ # alpha = [alpha_wrapper value];
1551
+ # `
1552
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1553
+ # `
1554
+ # static Color* toProto(UIColor* color) `
1555
+ # CGFloat red, green, blue, alpha;
1556
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
1557
+ # return nil;
1558
+ # `
1559
+ # Color* result = [Color alloc] init];
1560
+ # [result setRed:red];
1561
+ # [result setGreen:green];
1562
+ # [result setBlue:blue];
1563
+ # if (alpha <= 0.9999) `
1564
+ # [result setAlpha:floatWrapperWithValue(alpha)];
1565
+ # `
1566
+ # [result autorelease];
1567
+ # return result;
1568
+ # `
1569
+ # // ...
1570
+ # Example (JavaScript):
1571
+ # // ...
1572
+ # var protoToCssColor = function(rgb_color) `
1573
+ # var redFrac = rgb_color.red || 0.0;
1574
+ # var greenFrac = rgb_color.green || 0.0;
1575
+ # var blueFrac = rgb_color.blue || 0.0;
1576
+ # var red = Math.floor(redFrac * 255);
1577
+ # var green = Math.floor(greenFrac * 255);
1578
+ # var blue = Math.floor(blueFrac * 255);
1579
+ # if (!('alpha' in rgb_color)) `
1580
+ # return rgbToCssColor_(red, green, blue);
1581
+ # `
1582
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
1583
+ # var rgbParams = [red, green, blue].join(',');
1584
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1585
+ # `;
1586
+ # var rgbToCssColor_ = function(red, green, blue) `
1587
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1588
+ # var hexString = rgbNumber.toString(16);
1589
+ # var missingZeros = 6 - hexString.length;
1590
+ # var resultBuilder = ['#'];
1591
+ # for (var i = 0; i < missingZeros; i++) `
1592
+ # resultBuilder.push('0');
1593
+ # `
1594
+ # resultBuilder.push(hexString);
1595
+ # return resultBuilder.join('');
1596
+ # `;
1597
+ # // ...
1598
+ class GoogleTypeColor
1599
+ include Google::Apis::Core::Hashable
1600
+
1601
+ # The fraction of this color that should be applied to the pixel. That is,
1602
+ # the final pixel color is defined by the equation:
1603
+ # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1604
+ # This means that a value of 1.0 corresponds to a solid color, whereas
1605
+ # a value of 0.0 corresponds to a completely transparent color. This
1606
+ # uses a wrapper message rather than a simple float scalar so that it is
1607
+ # possible to distinguish between a default value and the value being unset.
1608
+ # If omitted, this color object is to be rendered as a solid color
1609
+ # (as if the alpha value had been explicitly given with a value of 1.0).
1610
+ # Corresponds to the JSON property `alpha`
1611
+ # @return [Float]
1612
+ attr_accessor :alpha
1613
+
1614
+ # The amount of blue in the color as a value in the interval [0, 1].
1615
+ # Corresponds to the JSON property `blue`
1616
+ # @return [Float]
1617
+ attr_accessor :blue
1618
+
1619
+ # The amount of green in the color as a value in the interval [0, 1].
1620
+ # Corresponds to the JSON property `green`
1621
+ # @return [Float]
1622
+ attr_accessor :green
1623
+
1624
+ # The amount of red in the color as a value in the interval [0, 1].
1625
+ # Corresponds to the JSON property `red`
1626
+ # @return [Float]
1627
+ attr_accessor :red
1628
+
1629
+ def initialize(**args)
1630
+ update!(**args)
1631
+ end
1632
+
1633
+ # Update properties of this object
1634
+ def update!(**args)
1635
+ @alpha = args[:alpha] if args.key?(:alpha)
1636
+ @blue = args[:blue] if args.key?(:blue)
1637
+ @green = args[:green] if args.key?(:green)
1638
+ @red = args[:red] if args.key?(:red)
1639
+ end
1640
+ end
1641
+
1642
+ # An object representing a latitude/longitude pair. This is expressed as a pair
1643
+ # of doubles representing degrees latitude and degrees longitude. Unless
1644
+ # specified otherwise, this must conform to the
1645
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1646
+ # standard</a>. Values must be within normalized ranges.
1647
+ class GoogleTypeLatLng
1648
+ include Google::Apis::Core::Hashable
1649
+
1650
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
1651
+ # Corresponds to the JSON property `latitude`
1652
+ # @return [Float]
1653
+ attr_accessor :latitude
1654
+
1655
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
1656
+ # Corresponds to the JSON property `longitude`
1657
+ # @return [Float]
1658
+ attr_accessor :longitude
1659
+
1660
+ def initialize(**args)
1661
+ update!(**args)
1662
+ end
1663
+
1664
+ # Update properties of this object
1665
+ def update!(**args)
1666
+ @latitude = args[:latitude] if args.key?(:latitude)
1667
+ @longitude = args[:longitude] if args.key?(:longitude)
1668
+ end
1669
+ end
1794
1670
  end
1795
1671
  end
1796
1672
  end