google-api-client 0.21.1 → 0.21.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -0
  3. data/generated/google/apis/admin_reports_v1.rb +1 -1
  4. data/generated/google/apis/analytics_v3.rb +4 -1
  5. data/generated/google/apis/analytics_v3/classes.rb +68 -0
  6. data/generated/google/apis/analytics_v3/representations.rb +33 -0
  7. data/generated/google/apis/analytics_v3/service.rb +33 -0
  8. data/generated/google/apis/analyticsreporting_v4.rb +2 -2
  9. data/generated/google/apis/analyticsreporting_v4/classes.rb +1 -1
  10. data/generated/google/apis/analyticsreporting_v4/service.rb +1 -1
  11. data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
  12. data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +8 -0
  13. data/generated/google/apis/androiddeviceprovisioning_v1/representations.rb +1 -0
  14. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  15. data/generated/google/apis/androidpublisher_v2/service.rb +42 -0
  16. data/generated/google/apis/appengine_v1.rb +1 -1
  17. data/generated/google/apis/appengine_v1/classes.rb +11 -4
  18. data/generated/google/apis/appengine_v1/service.rb +28 -19
  19. data/generated/google/apis/appengine_v1beta.rb +1 -1
  20. data/generated/google/apis/appengine_v1beta/classes.rb +11 -7
  21. data/generated/google/apis/appengine_v1beta/service.rb +28 -19
  22. data/generated/google/apis/bigquery_v2.rb +1 -1
  23. data/generated/google/apis/bigquery_v2/classes.rb +9 -6
  24. data/generated/google/apis/clouddebugger_v2.rb +2 -2
  25. data/generated/google/apis/clouddebugger_v2/classes.rb +2 -1
  26. data/generated/google/apis/clouddebugger_v2/service.rb +1 -1
  27. data/generated/google/apis/cloudiot_v1.rb +1 -1
  28. data/generated/google/apis/cloudiot_v1/service.rb +2 -12
  29. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  30. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1 -1
  31. data/generated/google/apis/composer_v1beta1.rb +1 -1
  32. data/generated/google/apis/composer_v1beta1/classes.rb +49 -52
  33. data/generated/google/apis/composer_v1beta1/service.rb +5 -5
  34. data/generated/google/apis/compute_v1.rb +1 -1
  35. data/generated/google/apis/container_v1.rb +1 -1
  36. data/generated/google/apis/container_v1/service.rb +18 -18
  37. data/generated/google/apis/container_v1beta1.rb +1 -1
  38. data/generated/google/apis/container_v1beta1/classes.rb +7 -0
  39. data/generated/google/apis/container_v1beta1/representations.rb +1 -0
  40. data/generated/google/apis/container_v1beta1/service.rb +18 -18
  41. data/generated/google/apis/dfareporting_v2_8.rb +1 -1
  42. data/generated/google/apis/dfareporting_v2_8/classes.rb +5 -5
  43. data/generated/google/apis/dfareporting_v2_8/service.rb +4 -1
  44. data/generated/google/apis/dfareporting_v3_0.rb +1 -1
  45. data/generated/google/apis/dfareporting_v3_0/classes.rb +5 -5
  46. data/generated/google/apis/dfareporting_v3_0/service.rb +4 -1
  47. data/generated/google/apis/dfareporting_v3_1.rb +40 -0
  48. data/generated/google/apis/dfareporting_v3_1/classes.rb +12256 -0
  49. data/generated/google/apis/dfareporting_v3_1/representations.rb +4389 -0
  50. data/generated/google/apis/dfareporting_v3_1/service.rb +8790 -0
  51. data/generated/google/apis/dlp_v2.rb +1 -1
  52. data/generated/google/apis/dlp_v2/classes.rb +20 -0
  53. data/generated/google/apis/dlp_v2/representations.rb +3 -0
  54. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  55. data/generated/google/apis/identitytoolkit_v3/classes.rb +56 -0
  56. data/generated/google/apis/identitytoolkit_v3/representations.rb +8 -0
  57. data/generated/google/apis/jobs_v2.rb +1 -1
  58. data/generated/google/apis/jobs_v2/classes.rb +1 -5
  59. data/generated/google/apis/jobs_v2/service.rb +9 -10
  60. data/generated/google/apis/language_v1.rb +1 -1
  61. data/generated/google/apis/language_v1/classes.rb +1 -0
  62. data/generated/google/apis/language_v1beta1.rb +1 -1
  63. data/generated/google/apis/language_v1beta1/classes.rb +1 -0
  64. data/generated/google/apis/language_v1beta2.rb +1 -1
  65. data/generated/google/apis/language_v1beta2/classes.rb +1 -0
  66. data/generated/google/apis/monitoring_v3.rb +1 -1
  67. data/generated/google/apis/monitoring_v3/classes.rb +7 -7
  68. data/generated/google/apis/partners_v2.rb +1 -1
  69. data/generated/google/apis/partners_v2/classes.rb +7 -0
  70. data/generated/google/apis/partners_v2/representations.rb +1 -0
  71. data/generated/google/apis/people_v1.rb +1 -1
  72. data/generated/google/apis/people_v1/service.rb +4 -0
  73. data/generated/google/apis/redis_v1beta1.rb +1 -1
  74. data/generated/google/apis/redis_v1beta1/classes.rb +11 -11
  75. data/generated/google/apis/redis_v1beta1/service.rb +6 -6
  76. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  77. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +1 -1
  78. data/generated/google/apis/script_v1.rb +1 -1
  79. data/generated/google/apis/spanner_v1.rb +1 -1
  80. data/generated/google/apis/spanner_v1/classes.rb +1 -1
  81. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  82. data/generated/google/apis/sqladmin_v1beta4/classes.rb +76 -0
  83. data/generated/google/apis/sqladmin_v1beta4/representations.rb +44 -0
  84. data/generated/google/apis/sqladmin_v1beta4/service.rb +120 -0
  85. data/generated/google/apis/testing_v1.rb +1 -1
  86. data/generated/google/apis/texttospeech_v1beta1.rb +2 -2
  87. data/generated/google/apis/texttospeech_v1beta1/service.rb +1 -1
  88. data/generated/google/apis/vision_v1.rb +1 -1
  89. data/generated/google/apis/vision_v1/classes.rb +517 -0
  90. data/generated/google/apis/vision_v1/representations.rb +272 -0
  91. data/generated/google/apis/vision_v1/service.rb +35 -0
  92. data/generated/google/apis/vision_v1p1beta1.rb +1 -1
  93. data/generated/google/apis/vision_v1p1beta1/classes.rb +3411 -1415
  94. data/generated/google/apis/vision_v1p1beta1/representations.rb +868 -0
  95. data/generated/google/apis/vision_v1p1beta1/service.rb +35 -0
  96. data/generated/google/apis/vision_v1p2beta1.rb +1 -1
  97. data/generated/google/apis/vision_v1p2beta1/classes.rb +2521 -822
  98. data/generated/google/apis/vision_v1p2beta1/representations.rb +758 -14
  99. data/generated/google/apis/vision_v1p2beta1/service.rb +3 -3
  100. data/generated/google/apis/youtube_analytics_v2.rb +2 -2
  101. data/generated/google/apis/youtube_analytics_v2/service.rb +1 -1
  102. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  103. data/lib/google/apis/version.rb +1 -1
  104. metadata +7 -3
@@ -49,6 +49,41 @@ module Google
49
49
  @batch_path = 'batch'
50
50
  end
51
51
 
52
+ # Run asynchronous image detection and annotation for a list of generic
53
+ # files, such as PDF files, which may contain multiple pages and multiple
54
+ # images per page. Progress and results can be retrieved through the
55
+ # `google.longrunning.Operations` interface.
56
+ # `Operation.metadata` contains `OperationMetadata` (metadata).
57
+ # `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
58
+ # @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest] google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object
59
+ # @param [String] fields
60
+ # Selector specifying which fields to include in a partial response.
61
+ # @param [String] quota_user
62
+ # Available to use for quota purposes for server-side applications. Can be any
63
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
64
+ # @param [Google::Apis::RequestOptions] options
65
+ # Request-specific options
66
+ #
67
+ # @yield [result, err] Result & error if block supplied
68
+ # @yieldparam result [Google::Apis::VisionV1p1beta1::Operation] parsed result object
69
+ # @yieldparam err [StandardError] error object if request failed
70
+ #
71
+ # @return [Google::Apis::VisionV1p1beta1::Operation]
72
+ #
73
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
76
+ def async_file_batch_annotate(google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
77
+ command = make_simple_command(:post, 'v1p1beta1/files:asyncBatchAnnotate', options)
78
+ command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest::Representation
79
+ command.request_object = google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object
80
+ command.response_representation = Google::Apis::VisionV1p1beta1::Operation::Representation
81
+ command.response_class = Google::Apis::VisionV1p1beta1::Operation
82
+ command.query['fields'] = fields unless fields.nil?
83
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
84
+ execute_or_queue_command(command, &block)
85
+ end
86
+
52
87
  # Run image detection and annotation for a batch of images.
53
88
  # @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest] google_cloud_vision_v1p1beta1_batch_annotate_images_request_object
54
89
  # @param [String] fields
@@ -27,7 +27,7 @@ module Google
27
27
  # @see https://cloud.google.com/vision/
28
28
  module VisionV1p2beta1
29
29
  VERSION = 'V1p2beta1'
30
- REVISION = '20180416'
30
+ REVISION = '20180515'
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'
@@ -22,162 +22,19 @@ module Google
22
22
  module Apis
23
23
  module VisionV1p2beta1
24
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
25
  # Response to a single file annotation request. A file may contain one or more
169
26
  # images, which individually have their own responses.
170
- class GoogleCloudVisionV1p2beta1AnnotateFileResponse
27
+ class AnnotateFileResponse
171
28
  include Google::Apis::Core::Hashable
172
29
 
173
30
  # The desired input location and metadata.
174
31
  # Corresponds to the JSON property `inputConfig`
175
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig]
32
+ # @return [Google::Apis::VisionV1p2beta1::InputConfig]
176
33
  attr_accessor :input_config
177
34
 
178
35
  # Individual responses to images found within the file.
179
36
  # Corresponds to the JSON property `responses`
180
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse>]
37
+ # @return [Array<Google::Apis::VisionV1p2beta1::AnnotateImageResponse>]
181
38
  attr_accessor :responses
182
39
 
183
40
  def initialize(**args)
@@ -191,51 +48,19 @@ module Google
191
48
  end
192
49
  end
193
50
 
194
- # Request for performing Google Cloud Vision API tasks over a user-provided
195
- # image, with user-requested features.
196
- class GoogleCloudVisionV1p2beta1AnnotateImageRequest
197
- include Google::Apis::Core::Hashable
198
-
199
- # Requested features.
200
- # Corresponds to the JSON property `features`
201
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>]
202
- attr_accessor :features
203
-
204
- # Client image to perform Google Cloud Vision API tasks over.
205
- # Corresponds to the JSON property `image`
206
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Image]
207
- attr_accessor :image
208
-
209
- # Image context and/or feature-specific parameters.
210
- # Corresponds to the JSON property `imageContext`
211
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext]
212
- attr_accessor :image_context
213
-
214
- def initialize(**args)
215
- update!(**args)
216
- end
217
-
218
- # Update properties of this object
219
- def update!(**args)
220
- @features = args[:features] if args.key?(:features)
221
- @image = args[:image] if args.key?(:image)
222
- @image_context = args[:image_context] if args.key?(:image_context)
223
- end
224
- end
225
-
226
51
  # Response to an image annotation request.
227
- class GoogleCloudVisionV1p2beta1AnnotateImageResponse
52
+ class AnnotateImageResponse
228
53
  include Google::Apis::Core::Hashable
229
54
 
230
55
  # If an image was produced from a file (e.g. a PDF), this message gives
231
56
  # information about the source of that image.
232
57
  # Corresponds to the JSON property `context`
233
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageAnnotationContext]
58
+ # @return [Google::Apis::VisionV1p2beta1::ImageAnnotationContext]
234
59
  attr_accessor :context
235
60
 
236
61
  # Set of crop hints that are used to generate new crops when serving images.
237
62
  # Corresponds to the JSON property `cropHintsAnnotation`
238
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsAnnotation]
63
+ # @return [Google::Apis::VisionV1p2beta1::CropHintsAnnotation]
239
64
  attr_accessor :crop_hints_annotation
240
65
 
241
66
  # The `Status` type defines a logical error model that is suitable for different
@@ -283,7 +108,7 @@ module Google
283
108
 
284
109
  # If present, face detection has completed successfully.
285
110
  # Corresponds to the JSON property `faceAnnotations`
286
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotation>]
111
+ # @return [Array<Google::Apis::VisionV1p2beta1::FaceAnnotation>]
287
112
  attr_accessor :face_annotations
288
113
 
289
114
  # TextAnnotation contains a structured representation of OCR extracted text.
@@ -294,44 +119,44 @@ module Google
294
119
  # to the TextAnnotation.TextProperty message definition below for more
295
120
  # detail.
296
121
  # Corresponds to the JSON property `fullTextAnnotation`
297
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotation]
122
+ # @return [Google::Apis::VisionV1p2beta1::TextAnnotation]
298
123
  attr_accessor :full_text_annotation
299
124
 
300
125
  # Stores image properties, such as dominant colors.
301
126
  # Corresponds to the JSON property `imagePropertiesAnnotation`
302
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageProperties]
127
+ # @return [Google::Apis::VisionV1p2beta1::ImageProperties]
303
128
  attr_accessor :image_properties_annotation
304
129
 
305
130
  # If present, label detection has completed successfully.
306
131
  # Corresponds to the JSON property `labelAnnotations`
307
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
132
+ # @return [Array<Google::Apis::VisionV1p2beta1::EntityAnnotation>]
308
133
  attr_accessor :label_annotations
309
134
 
310
135
  # If present, landmark detection has completed successfully.
311
136
  # Corresponds to the JSON property `landmarkAnnotations`
312
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
137
+ # @return [Array<Google::Apis::VisionV1p2beta1::EntityAnnotation>]
313
138
  attr_accessor :landmark_annotations
314
139
 
315
140
  # If present, logo detection has completed successfully.
316
141
  # Corresponds to the JSON property `logoAnnotations`
317
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
142
+ # @return [Array<Google::Apis::VisionV1p2beta1::EntityAnnotation>]
318
143
  attr_accessor :logo_annotations
319
144
 
320
145
  # Set of features pertaining to the image, computed by computer vision
321
146
  # methods over safe-search verticals (for example, adult, spoof, medical,
322
147
  # violence).
323
148
  # Corresponds to the JSON property `safeSearchAnnotation`
324
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1SafeSearchAnnotation]
149
+ # @return [Google::Apis::VisionV1p2beta1::SafeSearchAnnotation]
325
150
  attr_accessor :safe_search_annotation
326
151
 
327
152
  # If present, text (OCR) detection has completed successfully.
328
153
  # Corresponds to the JSON property `textAnnotations`
329
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
154
+ # @return [Array<Google::Apis::VisionV1p2beta1::EntityAnnotation>]
330
155
  attr_accessor :text_annotations
331
156
 
332
157
  # Relevant information for the image from the Internet.
333
158
  # Corresponds to the JSON property `webDetection`
334
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetection]
159
+ # @return [Google::Apis::VisionV1p2beta1::WebDetection]
335
160
  attr_accessor :web_detection
336
161
 
337
162
  def initialize(**args)
@@ -355,50 +180,13 @@ module Google
355
180
  end
356
181
  end
357
182
 
358
- # An offline file annotation request.
359
- class GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest
360
- include Google::Apis::Core::Hashable
361
-
362
- # Required. Requested features.
363
- # Corresponds to the JSON property `features`
364
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>]
365
- attr_accessor :features
366
-
367
- # Image context and/or feature-specific parameters.
368
- # Corresponds to the JSON property `imageContext`
369
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext]
370
- attr_accessor :image_context
371
-
372
- # The desired input location and metadata.
373
- # Corresponds to the JSON property `inputConfig`
374
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig]
375
- attr_accessor :input_config
376
-
377
- # The desired output location and metadata.
378
- # Corresponds to the JSON property `outputConfig`
379
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig]
380
- attr_accessor :output_config
381
-
382
- def initialize(**args)
383
- update!(**args)
384
- end
385
-
386
- # Update properties of this object
387
- def update!(**args)
388
- @features = args[:features] if args.key?(:features)
389
- @image_context = args[:image_context] if args.key?(:image_context)
390
- @input_config = args[:input_config] if args.key?(:input_config)
391
- @output_config = args[:output_config] if args.key?(:output_config)
392
- end
393
- end
394
-
395
183
  # The response for a single offline file annotation request.
396
- class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
184
+ class AsyncAnnotateFileResponse
397
185
  include Google::Apis::Core::Hashable
398
186
 
399
187
  # The desired output location and metadata.
400
188
  # Corresponds to the JSON property `outputConfig`
401
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig]
189
+ # @return [Google::Apis::VisionV1p2beta1::OutputConfig]
402
190
  attr_accessor :output_config
403
191
 
404
192
  def initialize(**args)
@@ -411,34 +199,14 @@ module Google
411
199
  end
412
200
  end
413
201
 
414
- # Multiple async file annotation requests are batched into a single service
415
- # call.
416
- class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
417
- include Google::Apis::Core::Hashable
418
-
419
- # Individual async file annotation requests for this batch.
420
- # Corresponds to the JSON property `requests`
421
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest>]
422
- attr_accessor :requests
423
-
424
- def initialize(**args)
425
- update!(**args)
426
- end
427
-
428
- # Update properties of this object
429
- def update!(**args)
430
- @requests = args[:requests] if args.key?(:requests)
431
- end
432
- end
433
-
434
202
  # Response to an async batch file annotation request.
435
- class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
203
+ class AsyncBatchAnnotateFilesResponse
436
204
  include Google::Apis::Core::Hashable
437
205
 
438
206
  # The list of file annotation responses, one for each request in
439
207
  # AsyncBatchAnnotateFilesRequest.
440
208
  # Corresponds to the JSON property `responses`
441
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse>]
209
+ # @return [Array<Google::Apis::VisionV1p2beta1::AsyncAnnotateFileResponse>]
442
210
  attr_accessor :responses
443
211
 
444
212
  def initialize(**args)
@@ -451,46 +219,8 @@ module Google
451
219
  end
452
220
  end
453
221
 
454
- # Multiple image annotation requests are batched into a single service call.
455
- class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
456
- include Google::Apis::Core::Hashable
457
-
458
- # Individual image annotation requests for this batch.
459
- # Corresponds to the JSON property `requests`
460
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>]
461
- attr_accessor :requests
462
-
463
- def initialize(**args)
464
- update!(**args)
465
- end
466
-
467
- # Update properties of this object
468
- def update!(**args)
469
- @requests = args[:requests] if args.key?(:requests)
470
- end
471
- end
472
-
473
- # Response to a batch image annotation request.
474
- class GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
475
- include Google::Apis::Core::Hashable
476
-
477
- # Individual responses to image annotation requests within the batch.
478
- # Corresponds to the JSON property `responses`
479
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse>]
480
- attr_accessor :responses
481
-
482
- def initialize(**args)
483
- update!(**args)
484
- end
485
-
486
- # Update properties of this object
487
- def update!(**args)
488
- @responses = args[:responses] if args.key?(:responses)
489
- end
490
- end
491
-
492
- # Logical element on the page.
493
- class GoogleCloudVisionV1p2beta1Block
222
+ # Logical element on the page.
223
+ class Block
494
224
  include Google::Apis::Core::Hashable
495
225
 
496
226
  # Detected block type (text, image etc) for this block.
@@ -500,7 +230,7 @@ module Google
500
230
 
501
231
  # A bounding polygon for the detected image annotation.
502
232
  # Corresponds to the JSON property `boundingBox`
503
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
233
+ # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
504
234
  attr_accessor :bounding_box
505
235
 
506
236
  # Confidence of the OCR results on the block. Range [0, 1].
@@ -510,12 +240,12 @@ module Google
510
240
 
511
241
  # List of paragraphs in this block (if this blocks is of type text).
512
242
  # Corresponds to the JSON property `paragraphs`
513
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Paragraph>]
243
+ # @return [Array<Google::Apis::VisionV1p2beta1::Paragraph>]
514
244
  attr_accessor :paragraphs
515
245
 
516
246
  # Additional information detected on the structural component.
517
247
  # Corresponds to the JSON property `property`
518
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
248
+ # @return [Google::Apis::VisionV1p2beta1::TextProperty]
519
249
  attr_accessor :property
520
250
 
521
251
  def initialize(**args)
@@ -533,17 +263,17 @@ module Google
533
263
  end
534
264
 
535
265
  # A bounding polygon for the detected image annotation.
536
- class GoogleCloudVisionV1p2beta1BoundingPoly
266
+ class BoundingPoly
537
267
  include Google::Apis::Core::Hashable
538
268
 
539
269
  # The bounding polygon normalized vertices.
540
270
  # Corresponds to the JSON property `normalizedVertices`
541
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1NormalizedVertex>]
271
+ # @return [Array<Google::Apis::VisionV1p2beta1::NormalizedVertex>]
542
272
  attr_accessor :normalized_vertices
543
273
 
544
274
  # The bounding polygon vertices.
545
275
  # Corresponds to the JSON property `vertices`
546
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Vertex>]
276
+ # @return [Array<Google::Apis::VisionV1p2beta1::Vertex>]
547
277
  attr_accessor :vertices
548
278
 
549
279
  def initialize(**args)
@@ -557,9 +287,152 @@ module Google
557
287
  end
558
288
  end
559
289
 
290
+ # Represents a color in the RGBA color space. This representation is designed
291
+ # for simplicity of conversion to/from color representations in various
292
+ # languages over compactness; for example, the fields of this representation
293
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
294
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
295
+ # method in iOS; and, with just a little work, it can be easily formatted into
296
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
297
+ # Example (Java):
298
+ # import com.google.type.Color;
299
+ # // ...
300
+ # public static java.awt.Color fromProto(Color protocolor) `
301
+ # float alpha = protocolor.hasAlpha()
302
+ # ? protocolor.getAlpha().getValue()
303
+ # : 1.0;
304
+ # return new java.awt.Color(
305
+ # protocolor.getRed(),
306
+ # protocolor.getGreen(),
307
+ # protocolor.getBlue(),
308
+ # alpha);
309
+ # `
310
+ # public static Color toProto(java.awt.Color color) `
311
+ # float red = (float) color.getRed();
312
+ # float green = (float) color.getGreen();
313
+ # float blue = (float) color.getBlue();
314
+ # float denominator = 255.0;
315
+ # Color.Builder resultBuilder =
316
+ # Color
317
+ # .newBuilder()
318
+ # .setRed(red / denominator)
319
+ # .setGreen(green / denominator)
320
+ # .setBlue(blue / denominator);
321
+ # int alpha = color.getAlpha();
322
+ # if (alpha != 255) `
323
+ # result.setAlpha(
324
+ # FloatValue
325
+ # .newBuilder()
326
+ # .setValue(((float) alpha) / denominator)
327
+ # .build());
328
+ # `
329
+ # return resultBuilder.build();
330
+ # `
331
+ # // ...
332
+ # Example (iOS / Obj-C):
333
+ # // ...
334
+ # static UIColor* fromProto(Color* protocolor) `
335
+ # float red = [protocolor red];
336
+ # float green = [protocolor green];
337
+ # float blue = [protocolor blue];
338
+ # FloatValue* alpha_wrapper = [protocolor alpha];
339
+ # float alpha = 1.0;
340
+ # if (alpha_wrapper != nil) `
341
+ # alpha = [alpha_wrapper value];
342
+ # `
343
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
344
+ # `
345
+ # static Color* toProto(UIColor* color) `
346
+ # CGFloat red, green, blue, alpha;
347
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
348
+ # return nil;
349
+ # `
350
+ # Color* result = [Color alloc] init];
351
+ # [result setRed:red];
352
+ # [result setGreen:green];
353
+ # [result setBlue:blue];
354
+ # if (alpha <= 0.9999) `
355
+ # [result setAlpha:floatWrapperWithValue(alpha)];
356
+ # `
357
+ # [result autorelease];
358
+ # return result;
359
+ # `
360
+ # // ...
361
+ # Example (JavaScript):
362
+ # // ...
363
+ # var protoToCssColor = function(rgb_color) `
364
+ # var redFrac = rgb_color.red || 0.0;
365
+ # var greenFrac = rgb_color.green || 0.0;
366
+ # var blueFrac = rgb_color.blue || 0.0;
367
+ # var red = Math.floor(redFrac * 255);
368
+ # var green = Math.floor(greenFrac * 255);
369
+ # var blue = Math.floor(blueFrac * 255);
370
+ # if (!('alpha' in rgb_color)) `
371
+ # return rgbToCssColor_(red, green, blue);
372
+ # `
373
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
374
+ # var rgbParams = [red, green, blue].join(',');
375
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
376
+ # `;
377
+ # var rgbToCssColor_ = function(red, green, blue) `
378
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
379
+ # var hexString = rgbNumber.toString(16);
380
+ # var missingZeros = 6 - hexString.length;
381
+ # var resultBuilder = ['#'];
382
+ # for (var i = 0; i < missingZeros; i++) `
383
+ # resultBuilder.push('0');
384
+ # `
385
+ # resultBuilder.push(hexString);
386
+ # return resultBuilder.join('');
387
+ # `;
388
+ # // ...
389
+ class Color
390
+ include Google::Apis::Core::Hashable
391
+
392
+ # The fraction of this color that should be applied to the pixel. That is,
393
+ # the final pixel color is defined by the equation:
394
+ # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
395
+ # This means that a value of 1.0 corresponds to a solid color, whereas
396
+ # a value of 0.0 corresponds to a completely transparent color. This
397
+ # uses a wrapper message rather than a simple float scalar so that it is
398
+ # possible to distinguish between a default value and the value being unset.
399
+ # If omitted, this color object is to be rendered as a solid color
400
+ # (as if the alpha value had been explicitly given with a value of 1.0).
401
+ # Corresponds to the JSON property `alpha`
402
+ # @return [Float]
403
+ attr_accessor :alpha
404
+
405
+ # The amount of blue in the color as a value in the interval [0, 1].
406
+ # Corresponds to the JSON property `blue`
407
+ # @return [Float]
408
+ attr_accessor :blue
409
+
410
+ # The amount of green in the color as a value in the interval [0, 1].
411
+ # Corresponds to the JSON property `green`
412
+ # @return [Float]
413
+ attr_accessor :green
414
+
415
+ # The amount of red in the color as a value in the interval [0, 1].
416
+ # Corresponds to the JSON property `red`
417
+ # @return [Float]
418
+ attr_accessor :red
419
+
420
+ def initialize(**args)
421
+ update!(**args)
422
+ end
423
+
424
+ # Update properties of this object
425
+ def update!(**args)
426
+ @alpha = args[:alpha] if args.key?(:alpha)
427
+ @blue = args[:blue] if args.key?(:blue)
428
+ @green = args[:green] if args.key?(:green)
429
+ @red = args[:red] if args.key?(:red)
430
+ end
431
+ end
432
+
560
433
  # Color information consists of RGB channels, score, and the fraction of
561
434
  # the image that the color occupies in the image.
562
- class GoogleCloudVisionV1p2beta1ColorInfo
435
+ class ColorInfo
563
436
  include Google::Apis::Core::Hashable
564
437
 
565
438
  # Represents a color in the RGBA color space. This representation is designed
@@ -689,12 +562,12 @@ module Google
689
562
  end
690
563
 
691
564
  # Single crop hint that is used to generate a new crop when serving an image.
692
- class GoogleCloudVisionV1p2beta1CropHint
565
+ class CropHint
693
566
  include Google::Apis::Core::Hashable
694
567
 
695
568
  # A bounding polygon for the detected image annotation.
696
569
  # Corresponds to the JSON property `boundingPoly`
697
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
570
+ # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
698
571
  attr_accessor :bounding_poly
699
572
 
700
573
  # Confidence of this being a salient region. Range [0, 1].
@@ -721,12 +594,12 @@ module Google
721
594
  end
722
595
 
723
596
  # Set of crop hints that are used to generate new crops when serving images.
724
- class GoogleCloudVisionV1p2beta1CropHintsAnnotation
597
+ class CropHintsAnnotation
725
598
  include Google::Apis::Core::Hashable
726
599
 
727
600
  # Crop hint results.
728
601
  # Corresponds to the JSON property `cropHints`
729
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHint>]
602
+ # @return [Array<Google::Apis::VisionV1p2beta1::CropHint>]
730
603
  attr_accessor :crop_hints
731
604
 
732
605
  def initialize(**args)
@@ -739,19 +612,20 @@ module Google
739
612
  end
740
613
  end
741
614
 
742
- # Parameters for crop hints annotation request.
743
- class GoogleCloudVisionV1p2beta1CropHintsParams
615
+ # Detected start or end of a structural component.
616
+ class DetectedBreak
744
617
  include Google::Apis::Core::Hashable
745
618
 
746
- # Aspect ratios in floats, representing the ratio of the width to the height
747
- # of the image. For example, if the desired aspect ratio is 4/3, the
748
- # corresponding float value should be 1.33333. If not specified, the
749
- # best possible crop is returned. The number of provided aspect ratios is
750
- # limited to a maximum of 16; any aspect ratios provided after the 16th are
751
- # ignored.
752
- # Corresponds to the JSON property `aspectRatios`
753
- # @return [Array<Float>]
754
- attr_accessor :aspect_ratios
619
+ # True if break prepends the element.
620
+ # Corresponds to the JSON property `isPrefix`
621
+ # @return [Boolean]
622
+ attr_accessor :is_prefix
623
+ alias_method :is_prefix?, :is_prefix
624
+
625
+ # Detected break type.
626
+ # Corresponds to the JSON property `type`
627
+ # @return [String]
628
+ attr_accessor :type
755
629
 
756
630
  def initialize(**args)
757
631
  update!(**args)
@@ -759,17 +633,45 @@ module Google
759
633
 
760
634
  # Update properties of this object
761
635
  def update!(**args)
762
- @aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios)
636
+ @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
637
+ @type = args[:type] if args.key?(:type)
638
+ end
639
+ end
640
+
641
+ # Detected language for a structural component.
642
+ class DetectedLanguage
643
+ include Google::Apis::Core::Hashable
644
+
645
+ # Confidence of detected language. Range [0, 1].
646
+ # Corresponds to the JSON property `confidence`
647
+ # @return [Float]
648
+ attr_accessor :confidence
649
+
650
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
651
+ # information, see
652
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
653
+ # Corresponds to the JSON property `languageCode`
654
+ # @return [String]
655
+ attr_accessor :language_code
656
+
657
+ def initialize(**args)
658
+ update!(**args)
659
+ end
660
+
661
+ # Update properties of this object
662
+ def update!(**args)
663
+ @confidence = args[:confidence] if args.key?(:confidence)
664
+ @language_code = args[:language_code] if args.key?(:language_code)
763
665
  end
764
666
  end
765
667
 
766
668
  # Set of dominant colors and their corresponding scores.
767
- class GoogleCloudVisionV1p2beta1DominantColorsAnnotation
669
+ class DominantColorsAnnotation
768
670
  include Google::Apis::Core::Hashable
769
671
 
770
672
  # RGB color values with their score and pixel fraction.
771
673
  # Corresponds to the JSON property `colors`
772
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ColorInfo>]
674
+ # @return [Array<Google::Apis::VisionV1p2beta1::ColorInfo>]
773
675
  attr_accessor :colors
774
676
 
775
677
  def initialize(**args)
@@ -783,12 +685,12 @@ module Google
783
685
  end
784
686
 
785
687
  # Set of detected entity features.
786
- class GoogleCloudVisionV1p2beta1EntityAnnotation
688
+ class EntityAnnotation
787
689
  include Google::Apis::Core::Hashable
788
690
 
789
691
  # A bounding polygon for the detected image annotation.
790
692
  # Corresponds to the JSON property `boundingPoly`
791
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
693
+ # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
792
694
  attr_accessor :bounding_poly
793
695
 
794
696
  # **Deprecated. Use `score` instead.**
@@ -817,7 +719,7 @@ module Google
817
719
  # may indicate the location of the place where the image was taken.
818
720
  # Location information is usually present for landmarks.
819
721
  # Corresponds to the JSON property `locations`
820
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LocationInfo>]
722
+ # @return [Array<Google::Apis::VisionV1p2beta1::LocationInfo>]
821
723
  attr_accessor :locations
822
724
 
823
725
  # Opaque entity ID. Some IDs may be available in
@@ -830,7 +732,7 @@ module Google
830
732
  # Some entities may have optional user-supplied `Property` (name/value)
831
733
  # fields, such a score or string that qualifies the entity.
832
734
  # Corresponds to the JSON property `properties`
833
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Property>]
735
+ # @return [Array<Google::Apis::VisionV1p2beta1::Property>]
834
736
  attr_accessor :properties
835
737
 
836
738
  # Overall score of the result. Range [0, 1].
@@ -866,7 +768,7 @@ module Google
866
768
  end
867
769
 
868
770
  # A face annotation object contains the results of face detection.
869
- class GoogleCloudVisionV1p2beta1FaceAnnotation
771
+ class FaceAnnotation
870
772
  include Google::Apis::Core::Hashable
871
773
 
872
774
  # Anger likelihood.
@@ -881,7 +783,7 @@ module Google
881
783
 
882
784
  # A bounding polygon for the detected image annotation.
883
785
  # Corresponds to the JSON property `boundingPoly`
884
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
786
+ # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
885
787
  attr_accessor :bounding_poly
886
788
 
887
789
  # Detection confidence. Range [0, 1].
@@ -891,7 +793,7 @@ module Google
891
793
 
892
794
  # A bounding polygon for the detected image annotation.
893
795
  # Corresponds to the JSON property `fdBoundingPoly`
894
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
796
+ # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
895
797
  attr_accessor :fd_bounding_poly
896
798
 
897
799
  # Headwear likelihood.
@@ -911,7 +813,7 @@ module Google
911
813
 
912
814
  # Detected face landmarks.
913
815
  # Corresponds to the JSON property `landmarks`
914
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotationLandmark>]
816
+ # @return [Array<Google::Apis::VisionV1p2beta1::Landmark>]
915
817
  attr_accessor :landmarks
916
818
 
917
819
  # Yaw angle, which indicates the leftward/rightward angle that the face is
@@ -973,21 +875,1942 @@ module Google
973
875
  end
974
876
  end
975
877
 
976
- # A face-specific landmark (for example, a face feature).
977
- class GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
878
+ # The Google Cloud Storage location where the output will be written to.
879
+ class GcsDestination
978
880
  include Google::Apis::Core::Hashable
979
881
 
980
- # A 3D position in the image, used primarily for Face detection landmarks.
981
- # A valid Position must have both x and y coordinates.
882
+ # Google Cloud Storage URI where the results will be stored. Results will
883
+ # be in JSON format and preceded by its corresponding input URI. This field
884
+ # can either represent a single file, or a prefix for multiple outputs.
885
+ # Prefixes must end in a `/`.
886
+ # Examples:
887
+ # * File: gs://bucket-name/filename.json
888
+ # * Prefix: gs://bucket-name/prefix/here/
889
+ # * File: gs://bucket-name/prefix/here
890
+ # If multiple outputs, each response is still AnnotateFileResponse, each of
891
+ # which contains some subset of the full list of AnnotateImageResponse.
892
+ # Multiple outputs can happen if, for example, the output JSON is too large
893
+ # and overflows into multiple sharded files.
894
+ # Corresponds to the JSON property `uri`
895
+ # @return [String]
896
+ attr_accessor :uri
897
+
898
+ def initialize(**args)
899
+ update!(**args)
900
+ end
901
+
902
+ # Update properties of this object
903
+ def update!(**args)
904
+ @uri = args[:uri] if args.key?(:uri)
905
+ end
906
+ end
907
+
908
+ # The Google Cloud Storage location where the input will be read from.
909
+ class GcsSource
910
+ include Google::Apis::Core::Hashable
911
+
912
+ # Google Cloud Storage URI for the input file. This must only be a
913
+ # Google Cloud Storage object. Wildcards are not currently supported.
914
+ # Corresponds to the JSON property `uri`
915
+ # @return [String]
916
+ attr_accessor :uri
917
+
918
+ def initialize(**args)
919
+ update!(**args)
920
+ end
921
+
922
+ # Update properties of this object
923
+ def update!(**args)
924
+ @uri = args[:uri] if args.key?(:uri)
925
+ end
926
+ end
927
+
928
+ # Response to a single file annotation request. A file may contain one or more
929
+ # images, which individually have their own responses.
930
+ class GoogleCloudVisionV1p2beta1AnnotateFileResponse
931
+ include Google::Apis::Core::Hashable
932
+
933
+ # The desired input location and metadata.
934
+ # Corresponds to the JSON property `inputConfig`
935
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig]
936
+ attr_accessor :input_config
937
+
938
+ # Individual responses to images found within the file.
939
+ # Corresponds to the JSON property `responses`
940
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse>]
941
+ attr_accessor :responses
942
+
943
+ def initialize(**args)
944
+ update!(**args)
945
+ end
946
+
947
+ # Update properties of this object
948
+ def update!(**args)
949
+ @input_config = args[:input_config] if args.key?(:input_config)
950
+ @responses = args[:responses] if args.key?(:responses)
951
+ end
952
+ end
953
+
954
+ # Request for performing Google Cloud Vision API tasks over a user-provided
955
+ # image, with user-requested features.
956
+ class GoogleCloudVisionV1p2beta1AnnotateImageRequest
957
+ include Google::Apis::Core::Hashable
958
+
959
+ # Requested features.
960
+ # Corresponds to the JSON property `features`
961
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>]
962
+ attr_accessor :features
963
+
964
+ # Client image to perform Google Cloud Vision API tasks over.
965
+ # Corresponds to the JSON property `image`
966
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Image]
967
+ attr_accessor :image
968
+
969
+ # Image context and/or feature-specific parameters.
970
+ # Corresponds to the JSON property `imageContext`
971
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext]
972
+ attr_accessor :image_context
973
+
974
+ def initialize(**args)
975
+ update!(**args)
976
+ end
977
+
978
+ # Update properties of this object
979
+ def update!(**args)
980
+ @features = args[:features] if args.key?(:features)
981
+ @image = args[:image] if args.key?(:image)
982
+ @image_context = args[:image_context] if args.key?(:image_context)
983
+ end
984
+ end
985
+
986
+ # Response to an image annotation request.
987
+ class GoogleCloudVisionV1p2beta1AnnotateImageResponse
988
+ include Google::Apis::Core::Hashable
989
+
990
+ # If an image was produced from a file (e.g. a PDF), this message gives
991
+ # information about the source of that image.
992
+ # Corresponds to the JSON property `context`
993
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageAnnotationContext]
994
+ attr_accessor :context
995
+
996
+ # Set of crop hints that are used to generate new crops when serving images.
997
+ # Corresponds to the JSON property `cropHintsAnnotation`
998
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsAnnotation]
999
+ attr_accessor :crop_hints_annotation
1000
+
1001
+ # The `Status` type defines a logical error model that is suitable for different
1002
+ # programming environments, including REST APIs and RPC APIs. It is used by
1003
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
1004
+ # - Simple to use and understand for most users
1005
+ # - Flexible enough to meet unexpected needs
1006
+ # # Overview
1007
+ # The `Status` message contains three pieces of data: error code, error message,
1008
+ # and error details. The error code should be an enum value of
1009
+ # google.rpc.Code, but it may accept additional error codes if needed. The
1010
+ # error message should be a developer-facing English message that helps
1011
+ # developers *understand* and *resolve* the error. If a localized user-facing
1012
+ # error message is needed, put the localized message in the error details or
1013
+ # localize it in the client. The optional error details may contain arbitrary
1014
+ # information about the error. There is a predefined set of error detail types
1015
+ # in the package `google.rpc` that can be used for common error conditions.
1016
+ # # Language mapping
1017
+ # The `Status` message is the logical representation of the error model, but it
1018
+ # is not necessarily the actual wire format. When the `Status` message is
1019
+ # exposed in different client libraries and different wire protocols, it can be
1020
+ # mapped differently. For example, it will likely be mapped to some exceptions
1021
+ # in Java, but more likely mapped to some error codes in C.
1022
+ # # Other uses
1023
+ # The error model and the `Status` message can be used in a variety of
1024
+ # environments, either with or without APIs, to provide a
1025
+ # consistent developer experience across different environments.
1026
+ # Example uses of this error model include:
1027
+ # - Partial errors. If a service needs to return partial errors to the client,
1028
+ # it may embed the `Status` in the normal response to indicate the partial
1029
+ # errors.
1030
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
1031
+ # have a `Status` message for error reporting.
1032
+ # - Batch operations. If a client uses batch request and batch response, the
1033
+ # `Status` message should be used directly inside batch response, one for
1034
+ # each error sub-response.
1035
+ # - Asynchronous operations. If an API call embeds asynchronous operation
1036
+ # results in its response, the status of those operations should be
1037
+ # represented directly using the `Status` message.
1038
+ # - Logging. If some API errors are stored in logs, the message `Status` could
1039
+ # be used directly after any stripping needed for security/privacy reasons.
1040
+ # Corresponds to the JSON property `error`
1041
+ # @return [Google::Apis::VisionV1p2beta1::Status]
1042
+ attr_accessor :error
1043
+
1044
+ # If present, face detection has completed successfully.
1045
+ # Corresponds to the JSON property `faceAnnotations`
1046
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotation>]
1047
+ attr_accessor :face_annotations
1048
+
1049
+ # TextAnnotation contains a structured representation of OCR extracted text.
1050
+ # The hierarchy of an OCR extracted text structure is like this:
1051
+ # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
1052
+ # Each structural component, starting from Page, may further have their own
1053
+ # properties. Properties describe detected languages, breaks etc.. Please refer
1054
+ # to the TextAnnotation.TextProperty message definition below for more
1055
+ # detail.
1056
+ # Corresponds to the JSON property `fullTextAnnotation`
1057
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotation]
1058
+ attr_accessor :full_text_annotation
1059
+
1060
+ # Stores image properties, such as dominant colors.
1061
+ # Corresponds to the JSON property `imagePropertiesAnnotation`
1062
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageProperties]
1063
+ attr_accessor :image_properties_annotation
1064
+
1065
+ # If present, label detection has completed successfully.
1066
+ # Corresponds to the JSON property `labelAnnotations`
1067
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
1068
+ attr_accessor :label_annotations
1069
+
1070
+ # If present, landmark detection has completed successfully.
1071
+ # Corresponds to the JSON property `landmarkAnnotations`
1072
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
1073
+ attr_accessor :landmark_annotations
1074
+
1075
+ # If present, logo detection has completed successfully.
1076
+ # Corresponds to the JSON property `logoAnnotations`
1077
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
1078
+ attr_accessor :logo_annotations
1079
+
1080
+ # Set of features pertaining to the image, computed by computer vision
1081
+ # methods over safe-search verticals (for example, adult, spoof, medical,
1082
+ # violence).
1083
+ # Corresponds to the JSON property `safeSearchAnnotation`
1084
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1SafeSearchAnnotation]
1085
+ attr_accessor :safe_search_annotation
1086
+
1087
+ # If present, text (OCR) detection has completed successfully.
1088
+ # Corresponds to the JSON property `textAnnotations`
1089
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
1090
+ attr_accessor :text_annotations
1091
+
1092
+ # Relevant information for the image from the Internet.
1093
+ # Corresponds to the JSON property `webDetection`
1094
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetection]
1095
+ attr_accessor :web_detection
1096
+
1097
+ def initialize(**args)
1098
+ update!(**args)
1099
+ end
1100
+
1101
+ # Update properties of this object
1102
+ def update!(**args)
1103
+ @context = args[:context] if args.key?(:context)
1104
+ @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation)
1105
+ @error = args[:error] if args.key?(:error)
1106
+ @face_annotations = args[:face_annotations] if args.key?(:face_annotations)
1107
+ @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation)
1108
+ @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation)
1109
+ @label_annotations = args[:label_annotations] if args.key?(:label_annotations)
1110
+ @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations)
1111
+ @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations)
1112
+ @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation)
1113
+ @text_annotations = args[:text_annotations] if args.key?(:text_annotations)
1114
+ @web_detection = args[:web_detection] if args.key?(:web_detection)
1115
+ end
1116
+ end
1117
+
1118
+ # An offline file annotation request.
1119
+ class GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest
1120
+ include Google::Apis::Core::Hashable
1121
+
1122
+ # Required. Requested features.
1123
+ # Corresponds to the JSON property `features`
1124
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>]
1125
+ attr_accessor :features
1126
+
1127
+ # Image context and/or feature-specific parameters.
1128
+ # Corresponds to the JSON property `imageContext`
1129
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext]
1130
+ attr_accessor :image_context
1131
+
1132
+ # The desired input location and metadata.
1133
+ # Corresponds to the JSON property `inputConfig`
1134
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig]
1135
+ attr_accessor :input_config
1136
+
1137
+ # The desired output location and metadata.
1138
+ # Corresponds to the JSON property `outputConfig`
1139
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig]
1140
+ attr_accessor :output_config
1141
+
1142
+ def initialize(**args)
1143
+ update!(**args)
1144
+ end
1145
+
1146
+ # Update properties of this object
1147
+ def update!(**args)
1148
+ @features = args[:features] if args.key?(:features)
1149
+ @image_context = args[:image_context] if args.key?(:image_context)
1150
+ @input_config = args[:input_config] if args.key?(:input_config)
1151
+ @output_config = args[:output_config] if args.key?(:output_config)
1152
+ end
1153
+ end
1154
+
1155
+ # The response for a single offline file annotation request.
1156
+ class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
1157
+ include Google::Apis::Core::Hashable
1158
+
1159
+ # The desired output location and metadata.
1160
+ # Corresponds to the JSON property `outputConfig`
1161
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig]
1162
+ attr_accessor :output_config
1163
+
1164
+ def initialize(**args)
1165
+ update!(**args)
1166
+ end
1167
+
1168
+ # Update properties of this object
1169
+ def update!(**args)
1170
+ @output_config = args[:output_config] if args.key?(:output_config)
1171
+ end
1172
+ end
1173
+
1174
+ # Multiple async file annotation requests are batched into a single service
1175
+ # call.
1176
+ class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
1177
+ include Google::Apis::Core::Hashable
1178
+
1179
+ # Individual async file annotation requests for this batch.
1180
+ # Corresponds to the JSON property `requests`
1181
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest>]
1182
+ attr_accessor :requests
1183
+
1184
+ def initialize(**args)
1185
+ update!(**args)
1186
+ end
1187
+
1188
+ # Update properties of this object
1189
+ def update!(**args)
1190
+ @requests = args[:requests] if args.key?(:requests)
1191
+ end
1192
+ end
1193
+
1194
+ # Response to an async batch file annotation request.
1195
+ class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
1196
+ include Google::Apis::Core::Hashable
1197
+
1198
+ # The list of file annotation responses, one for each request in
1199
+ # AsyncBatchAnnotateFilesRequest.
1200
+ # Corresponds to the JSON property `responses`
1201
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse>]
1202
+ attr_accessor :responses
1203
+
1204
+ def initialize(**args)
1205
+ update!(**args)
1206
+ end
1207
+
1208
+ # Update properties of this object
1209
+ def update!(**args)
1210
+ @responses = args[:responses] if args.key?(:responses)
1211
+ end
1212
+ end
1213
+
1214
+ # Multiple image annotation requests are batched into a single service call.
1215
+ class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
1216
+ include Google::Apis::Core::Hashable
1217
+
1218
+ # Individual image annotation requests for this batch.
1219
+ # Corresponds to the JSON property `requests`
1220
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>]
1221
+ attr_accessor :requests
1222
+
1223
+ def initialize(**args)
1224
+ update!(**args)
1225
+ end
1226
+
1227
+ # Update properties of this object
1228
+ def update!(**args)
1229
+ @requests = args[:requests] if args.key?(:requests)
1230
+ end
1231
+ end
1232
+
1233
+ # Response to a batch image annotation request.
1234
+ class GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
1235
+ include Google::Apis::Core::Hashable
1236
+
1237
+ # Individual responses to image annotation requests within the batch.
1238
+ # Corresponds to the JSON property `responses`
1239
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse>]
1240
+ attr_accessor :responses
1241
+
1242
+ def initialize(**args)
1243
+ update!(**args)
1244
+ end
1245
+
1246
+ # Update properties of this object
1247
+ def update!(**args)
1248
+ @responses = args[:responses] if args.key?(:responses)
1249
+ end
1250
+ end
1251
+
1252
+ # Logical element on the page.
1253
+ class GoogleCloudVisionV1p2beta1Block
1254
+ include Google::Apis::Core::Hashable
1255
+
1256
+ # Detected block type (text, image etc) for this block.
1257
+ # Corresponds to the JSON property `blockType`
1258
+ # @return [String]
1259
+ attr_accessor :block_type
1260
+
1261
+ # A bounding polygon for the detected image annotation.
1262
+ # Corresponds to the JSON property `boundingBox`
1263
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
1264
+ attr_accessor :bounding_box
1265
+
1266
+ # Confidence of the OCR results on the block. Range [0, 1].
1267
+ # Corresponds to the JSON property `confidence`
1268
+ # @return [Float]
1269
+ attr_accessor :confidence
1270
+
1271
+ # List of paragraphs in this block (if this blocks is of type text).
1272
+ # Corresponds to the JSON property `paragraphs`
1273
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Paragraph>]
1274
+ attr_accessor :paragraphs
1275
+
1276
+ # Additional information detected on the structural component.
1277
+ # Corresponds to the JSON property `property`
1278
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
1279
+ attr_accessor :property
1280
+
1281
+ def initialize(**args)
1282
+ update!(**args)
1283
+ end
1284
+
1285
+ # Update properties of this object
1286
+ def update!(**args)
1287
+ @block_type = args[:block_type] if args.key?(:block_type)
1288
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
1289
+ @confidence = args[:confidence] if args.key?(:confidence)
1290
+ @paragraphs = args[:paragraphs] if args.key?(:paragraphs)
1291
+ @property = args[:property] if args.key?(:property)
1292
+ end
1293
+ end
1294
+
1295
+ # A bounding polygon for the detected image annotation.
1296
+ class GoogleCloudVisionV1p2beta1BoundingPoly
1297
+ include Google::Apis::Core::Hashable
1298
+
1299
+ # The bounding polygon normalized vertices.
1300
+ # Corresponds to the JSON property `normalizedVertices`
1301
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1NormalizedVertex>]
1302
+ attr_accessor :normalized_vertices
1303
+
1304
+ # The bounding polygon vertices.
1305
+ # Corresponds to the JSON property `vertices`
1306
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Vertex>]
1307
+ attr_accessor :vertices
1308
+
1309
+ def initialize(**args)
1310
+ update!(**args)
1311
+ end
1312
+
1313
+ # Update properties of this object
1314
+ def update!(**args)
1315
+ @normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices)
1316
+ @vertices = args[:vertices] if args.key?(:vertices)
1317
+ end
1318
+ end
1319
+
1320
+ # Color information consists of RGB channels, score, and the fraction of
1321
+ # the image that the color occupies in the image.
1322
+ class GoogleCloudVisionV1p2beta1ColorInfo
1323
+ include Google::Apis::Core::Hashable
1324
+
1325
+ # Represents a color in the RGBA color space. This representation is designed
1326
+ # for simplicity of conversion to/from color representations in various
1327
+ # languages over compactness; for example, the fields of this representation
1328
+ # can be trivially provided to the constructor of "java.awt.Color" in Java; it
1329
+ # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
1330
+ # method in iOS; and, with just a little work, it can be easily formatted into
1331
+ # a CSS "rgba()" string in JavaScript, as well. Here are some examples:
1332
+ # Example (Java):
1333
+ # import com.google.type.Color;
1334
+ # // ...
1335
+ # public static java.awt.Color fromProto(Color protocolor) `
1336
+ # float alpha = protocolor.hasAlpha()
1337
+ # ? protocolor.getAlpha().getValue()
1338
+ # : 1.0;
1339
+ # return new java.awt.Color(
1340
+ # protocolor.getRed(),
1341
+ # protocolor.getGreen(),
1342
+ # protocolor.getBlue(),
1343
+ # alpha);
1344
+ # `
1345
+ # public static Color toProto(java.awt.Color color) `
1346
+ # float red = (float) color.getRed();
1347
+ # float green = (float) color.getGreen();
1348
+ # float blue = (float) color.getBlue();
1349
+ # float denominator = 255.0;
1350
+ # Color.Builder resultBuilder =
1351
+ # Color
1352
+ # .newBuilder()
1353
+ # .setRed(red / denominator)
1354
+ # .setGreen(green / denominator)
1355
+ # .setBlue(blue / denominator);
1356
+ # int alpha = color.getAlpha();
1357
+ # if (alpha != 255) `
1358
+ # result.setAlpha(
1359
+ # FloatValue
1360
+ # .newBuilder()
1361
+ # .setValue(((float) alpha) / denominator)
1362
+ # .build());
1363
+ # `
1364
+ # return resultBuilder.build();
1365
+ # `
1366
+ # // ...
1367
+ # Example (iOS / Obj-C):
1368
+ # // ...
1369
+ # static UIColor* fromProto(Color* protocolor) `
1370
+ # float red = [protocolor red];
1371
+ # float green = [protocolor green];
1372
+ # float blue = [protocolor blue];
1373
+ # FloatValue* alpha_wrapper = [protocolor alpha];
1374
+ # float alpha = 1.0;
1375
+ # if (alpha_wrapper != nil) `
1376
+ # alpha = [alpha_wrapper value];
1377
+ # `
1378
+ # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1379
+ # `
1380
+ # static Color* toProto(UIColor* color) `
1381
+ # CGFloat red, green, blue, alpha;
1382
+ # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
1383
+ # return nil;
1384
+ # `
1385
+ # Color* result = [Color alloc] init];
1386
+ # [result setRed:red];
1387
+ # [result setGreen:green];
1388
+ # [result setBlue:blue];
1389
+ # if (alpha <= 0.9999) `
1390
+ # [result setAlpha:floatWrapperWithValue(alpha)];
1391
+ # `
1392
+ # [result autorelease];
1393
+ # return result;
1394
+ # `
1395
+ # // ...
1396
+ # Example (JavaScript):
1397
+ # // ...
1398
+ # var protoToCssColor = function(rgb_color) `
1399
+ # var redFrac = rgb_color.red || 0.0;
1400
+ # var greenFrac = rgb_color.green || 0.0;
1401
+ # var blueFrac = rgb_color.blue || 0.0;
1402
+ # var red = Math.floor(redFrac * 255);
1403
+ # var green = Math.floor(greenFrac * 255);
1404
+ # var blue = Math.floor(blueFrac * 255);
1405
+ # if (!('alpha' in rgb_color)) `
1406
+ # return rgbToCssColor_(red, green, blue);
1407
+ # `
1408
+ # var alphaFrac = rgb_color.alpha.value || 0.0;
1409
+ # var rgbParams = [red, green, blue].join(',');
1410
+ # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
1411
+ # `;
1412
+ # var rgbToCssColor_ = function(red, green, blue) `
1413
+ # var rgbNumber = new Number((red << 16) | (green << 8) | blue);
1414
+ # var hexString = rgbNumber.toString(16);
1415
+ # var missingZeros = 6 - hexString.length;
1416
+ # var resultBuilder = ['#'];
1417
+ # for (var i = 0; i < missingZeros; i++) `
1418
+ # resultBuilder.push('0');
1419
+ # `
1420
+ # resultBuilder.push(hexString);
1421
+ # return resultBuilder.join('');
1422
+ # `;
1423
+ # // ...
1424
+ # Corresponds to the JSON property `color`
1425
+ # @return [Google::Apis::VisionV1p2beta1::Color]
1426
+ attr_accessor :color
1427
+
1428
+ # The fraction of pixels the color occupies in the image.
1429
+ # Value in range [0, 1].
1430
+ # Corresponds to the JSON property `pixelFraction`
1431
+ # @return [Float]
1432
+ attr_accessor :pixel_fraction
1433
+
1434
+ # Image-specific score for this color. Value in range [0, 1].
1435
+ # Corresponds to the JSON property `score`
1436
+ # @return [Float]
1437
+ attr_accessor :score
1438
+
1439
+ def initialize(**args)
1440
+ update!(**args)
1441
+ end
1442
+
1443
+ # Update properties of this object
1444
+ def update!(**args)
1445
+ @color = args[:color] if args.key?(:color)
1446
+ @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction)
1447
+ @score = args[:score] if args.key?(:score)
1448
+ end
1449
+ end
1450
+
1451
+ # Single crop hint that is used to generate a new crop when serving an image.
1452
+ class GoogleCloudVisionV1p2beta1CropHint
1453
+ include Google::Apis::Core::Hashable
1454
+
1455
+ # A bounding polygon for the detected image annotation.
1456
+ # Corresponds to the JSON property `boundingPoly`
1457
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
1458
+ attr_accessor :bounding_poly
1459
+
1460
+ # Confidence of this being a salient region. Range [0, 1].
1461
+ # Corresponds to the JSON property `confidence`
1462
+ # @return [Float]
1463
+ attr_accessor :confidence
1464
+
1465
+ # Fraction of importance of this salient region with respect to the original
1466
+ # image.
1467
+ # Corresponds to the JSON property `importanceFraction`
1468
+ # @return [Float]
1469
+ attr_accessor :importance_fraction
1470
+
1471
+ def initialize(**args)
1472
+ update!(**args)
1473
+ end
1474
+
1475
+ # Update properties of this object
1476
+ def update!(**args)
1477
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
1478
+ @confidence = args[:confidence] if args.key?(:confidence)
1479
+ @importance_fraction = args[:importance_fraction] if args.key?(:importance_fraction)
1480
+ end
1481
+ end
1482
+
1483
+ # Set of crop hints that are used to generate new crops when serving images.
1484
+ class GoogleCloudVisionV1p2beta1CropHintsAnnotation
1485
+ include Google::Apis::Core::Hashable
1486
+
1487
+ # Crop hint results.
1488
+ # Corresponds to the JSON property `cropHints`
1489
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHint>]
1490
+ attr_accessor :crop_hints
1491
+
1492
+ def initialize(**args)
1493
+ update!(**args)
1494
+ end
1495
+
1496
+ # Update properties of this object
1497
+ def update!(**args)
1498
+ @crop_hints = args[:crop_hints] if args.key?(:crop_hints)
1499
+ end
1500
+ end
1501
+
1502
+ # Parameters for crop hints annotation request.
1503
+ class GoogleCloudVisionV1p2beta1CropHintsParams
1504
+ include Google::Apis::Core::Hashable
1505
+
1506
+ # Aspect ratios in floats, representing the ratio of the width to the height
1507
+ # of the image. For example, if the desired aspect ratio is 4/3, the
1508
+ # corresponding float value should be 1.33333. If not specified, the
1509
+ # best possible crop is returned. The number of provided aspect ratios is
1510
+ # limited to a maximum of 16; any aspect ratios provided after the 16th are
1511
+ # ignored.
1512
+ # Corresponds to the JSON property `aspectRatios`
1513
+ # @return [Array<Float>]
1514
+ attr_accessor :aspect_ratios
1515
+
1516
+ def initialize(**args)
1517
+ update!(**args)
1518
+ end
1519
+
1520
+ # Update properties of this object
1521
+ def update!(**args)
1522
+ @aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios)
1523
+ end
1524
+ end
1525
+
1526
+ # Set of dominant colors and their corresponding scores.
1527
+ class GoogleCloudVisionV1p2beta1DominantColorsAnnotation
1528
+ include Google::Apis::Core::Hashable
1529
+
1530
+ # RGB color values with their score and pixel fraction.
1531
+ # Corresponds to the JSON property `colors`
1532
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ColorInfo>]
1533
+ attr_accessor :colors
1534
+
1535
+ def initialize(**args)
1536
+ update!(**args)
1537
+ end
1538
+
1539
+ # Update properties of this object
1540
+ def update!(**args)
1541
+ @colors = args[:colors] if args.key?(:colors)
1542
+ end
1543
+ end
1544
+
1545
+ # Set of detected entity features.
1546
+ class GoogleCloudVisionV1p2beta1EntityAnnotation
1547
+ include Google::Apis::Core::Hashable
1548
+
1549
+ # A bounding polygon for the detected image annotation.
1550
+ # Corresponds to the JSON property `boundingPoly`
1551
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
1552
+ attr_accessor :bounding_poly
1553
+
1554
+ # **Deprecated. Use `score` instead.**
1555
+ # The accuracy of the entity detection in an image.
1556
+ # For example, for an image in which the "Eiffel Tower" entity is detected,
1557
+ # this field represents the confidence that there is a tower in the query
1558
+ # image. Range [0, 1].
1559
+ # Corresponds to the JSON property `confidence`
1560
+ # @return [Float]
1561
+ attr_accessor :confidence
1562
+
1563
+ # Entity textual description, expressed in its `locale` language.
1564
+ # Corresponds to the JSON property `description`
1565
+ # @return [String]
1566
+ attr_accessor :description
1567
+
1568
+ # The language code for the locale in which the entity textual
1569
+ # `description` is expressed.
1570
+ # Corresponds to the JSON property `locale`
1571
+ # @return [String]
1572
+ attr_accessor :locale
1573
+
1574
+ # The location information for the detected entity. Multiple
1575
+ # `LocationInfo` elements can be present because one location may
1576
+ # indicate the location of the scene in the image, and another location
1577
+ # may indicate the location of the place where the image was taken.
1578
+ # Location information is usually present for landmarks.
1579
+ # Corresponds to the JSON property `locations`
1580
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LocationInfo>]
1581
+ attr_accessor :locations
1582
+
1583
+ # Opaque entity ID. Some IDs may be available in
1584
+ # [Google Knowledge Graph Search
1585
+ # API](https://developers.google.com/knowledge-graph/).
1586
+ # Corresponds to the JSON property `mid`
1587
+ # @return [String]
1588
+ attr_accessor :mid
1589
+
1590
+ # Some entities may have optional user-supplied `Property` (name/value)
1591
+ # fields, such a score or string that qualifies the entity.
1592
+ # Corresponds to the JSON property `properties`
1593
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Property>]
1594
+ attr_accessor :properties
1595
+
1596
+ # Overall score of the result. Range [0, 1].
1597
+ # Corresponds to the JSON property `score`
1598
+ # @return [Float]
1599
+ attr_accessor :score
1600
+
1601
+ # The relevancy of the ICA (Image Content Annotation) label to the
1602
+ # image. For example, the relevancy of "tower" is likely higher to an image
1603
+ # containing the detected "Eiffel Tower" than to an image containing a
1604
+ # detected distant towering building, even though the confidence that
1605
+ # there is a tower in each image may be the same. Range [0, 1].
1606
+ # Corresponds to the JSON property `topicality`
1607
+ # @return [Float]
1608
+ attr_accessor :topicality
1609
+
1610
+ def initialize(**args)
1611
+ update!(**args)
1612
+ end
1613
+
1614
+ # Update properties of this object
1615
+ def update!(**args)
1616
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
1617
+ @confidence = args[:confidence] if args.key?(:confidence)
1618
+ @description = args[:description] if args.key?(:description)
1619
+ @locale = args[:locale] if args.key?(:locale)
1620
+ @locations = args[:locations] if args.key?(:locations)
1621
+ @mid = args[:mid] if args.key?(:mid)
1622
+ @properties = args[:properties] if args.key?(:properties)
1623
+ @score = args[:score] if args.key?(:score)
1624
+ @topicality = args[:topicality] if args.key?(:topicality)
1625
+ end
1626
+ end
1627
+
1628
+ # A face annotation object contains the results of face detection.
1629
+ class GoogleCloudVisionV1p2beta1FaceAnnotation
1630
+ include Google::Apis::Core::Hashable
1631
+
1632
+ # Anger likelihood.
1633
+ # Corresponds to the JSON property `angerLikelihood`
1634
+ # @return [String]
1635
+ attr_accessor :anger_likelihood
1636
+
1637
+ # Blurred likelihood.
1638
+ # Corresponds to the JSON property `blurredLikelihood`
1639
+ # @return [String]
1640
+ attr_accessor :blurred_likelihood
1641
+
1642
+ # A bounding polygon for the detected image annotation.
1643
+ # Corresponds to the JSON property `boundingPoly`
1644
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
1645
+ attr_accessor :bounding_poly
1646
+
1647
+ # Detection confidence. Range [0, 1].
1648
+ # Corresponds to the JSON property `detectionConfidence`
1649
+ # @return [Float]
1650
+ attr_accessor :detection_confidence
1651
+
1652
+ # A bounding polygon for the detected image annotation.
1653
+ # Corresponds to the JSON property `fdBoundingPoly`
1654
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
1655
+ attr_accessor :fd_bounding_poly
1656
+
1657
+ # Headwear likelihood.
1658
+ # Corresponds to the JSON property `headwearLikelihood`
1659
+ # @return [String]
1660
+ attr_accessor :headwear_likelihood
1661
+
1662
+ # Joy likelihood.
1663
+ # Corresponds to the JSON property `joyLikelihood`
1664
+ # @return [String]
1665
+ attr_accessor :joy_likelihood
1666
+
1667
+ # Face landmarking confidence. Range [0, 1].
1668
+ # Corresponds to the JSON property `landmarkingConfidence`
1669
+ # @return [Float]
1670
+ attr_accessor :landmarking_confidence
1671
+
1672
+ # Detected face landmarks.
1673
+ # Corresponds to the JSON property `landmarks`
1674
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotationLandmark>]
1675
+ attr_accessor :landmarks
1676
+
1677
+ # Yaw angle, which indicates the leftward/rightward angle that the face is
1678
+ # pointing relative to the vertical plane perpendicular to the image. Range
1679
+ # [-180,180].
1680
+ # Corresponds to the JSON property `panAngle`
1681
+ # @return [Float]
1682
+ attr_accessor :pan_angle
1683
+
1684
+ # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
1685
+ # of the face relative to the image vertical about the axis perpendicular to
1686
+ # the face. Range [-180,180].
1687
+ # Corresponds to the JSON property `rollAngle`
1688
+ # @return [Float]
1689
+ attr_accessor :roll_angle
1690
+
1691
+ # Sorrow likelihood.
1692
+ # Corresponds to the JSON property `sorrowLikelihood`
1693
+ # @return [String]
1694
+ attr_accessor :sorrow_likelihood
1695
+
1696
+ # Surprise likelihood.
1697
+ # Corresponds to the JSON property `surpriseLikelihood`
1698
+ # @return [String]
1699
+ attr_accessor :surprise_likelihood
1700
+
1701
+ # Pitch angle, which indicates the upwards/downwards angle that the face is
1702
+ # pointing relative to the image's horizontal plane. Range [-180,180].
1703
+ # Corresponds to the JSON property `tiltAngle`
1704
+ # @return [Float]
1705
+ attr_accessor :tilt_angle
1706
+
1707
+ # Under-exposed likelihood.
1708
+ # Corresponds to the JSON property `underExposedLikelihood`
1709
+ # @return [String]
1710
+ attr_accessor :under_exposed_likelihood
1711
+
1712
+ def initialize(**args)
1713
+ update!(**args)
1714
+ end
1715
+
1716
+ # Update properties of this object
1717
+ def update!(**args)
1718
+ @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood)
1719
+ @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood)
1720
+ @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
1721
+ @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
1722
+ @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly)
1723
+ @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood)
1724
+ @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
1725
+ @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence)
1726
+ @landmarks = args[:landmarks] if args.key?(:landmarks)
1727
+ @pan_angle = args[:pan_angle] if args.key?(:pan_angle)
1728
+ @roll_angle = args[:roll_angle] if args.key?(:roll_angle)
1729
+ @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood)
1730
+ @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood)
1731
+ @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle)
1732
+ @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood)
1733
+ end
1734
+ end
1735
+
1736
+ # A face-specific landmark (for example, a face feature).
1737
+ class GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
1738
+ include Google::Apis::Core::Hashable
1739
+
1740
+ # A 3D position in the image, used primarily for Face detection landmarks.
1741
+ # A valid Position must have both x and y coordinates.
982
1742
  # The position coordinates are in the same scale as the original image.
983
1743
  # Corresponds to the JSON property `position`
984
1744
  # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Position]
985
1745
  attr_accessor :position
986
1746
 
987
- # Face landmark type.
988
- # Corresponds to the JSON property `type`
1747
+ # Face landmark type.
1748
+ # Corresponds to the JSON property `type`
1749
+ # @return [String]
1750
+ attr_accessor :type
1751
+
1752
+ def initialize(**args)
1753
+ update!(**args)
1754
+ end
1755
+
1756
+ # Update properties of this object
1757
+ def update!(**args)
1758
+ @position = args[:position] if args.key?(:position)
1759
+ @type = args[:type] if args.key?(:type)
1760
+ end
1761
+ end
1762
+
1763
+ # The type of Google Cloud Vision API detection to perform, and the maximum
1764
+ # number of results to return for that type. Multiple `Feature` objects can
1765
+ # be specified in the `features` list.
1766
+ class GoogleCloudVisionV1p2beta1Feature
1767
+ include Google::Apis::Core::Hashable
1768
+
1769
+ # Maximum number of results of this type. Does not apply to
1770
+ # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
1771
+ # Corresponds to the JSON property `maxResults`
1772
+ # @return [Fixnum]
1773
+ attr_accessor :max_results
1774
+
1775
+ # Model to use for the feature.
1776
+ # Supported values: "builtin/stable" (the default if unset) and
1777
+ # "builtin/latest".
1778
+ # Corresponds to the JSON property `model`
1779
+ # @return [String]
1780
+ attr_accessor :model
1781
+
1782
+ # The feature type.
1783
+ # Corresponds to the JSON property `type`
1784
+ # @return [String]
1785
+ attr_accessor :type
1786
+
1787
+ def initialize(**args)
1788
+ update!(**args)
1789
+ end
1790
+
1791
+ # Update properties of this object
1792
+ def update!(**args)
1793
+ @max_results = args[:max_results] if args.key?(:max_results)
1794
+ @model = args[:model] if args.key?(:model)
1795
+ @type = args[:type] if args.key?(:type)
1796
+ end
1797
+ end
1798
+
1799
+ # The Google Cloud Storage location where the output will be written to.
1800
+ class GoogleCloudVisionV1p2beta1GcsDestination
1801
+ include Google::Apis::Core::Hashable
1802
+
1803
+ # Google Cloud Storage URI where the results will be stored. Results will
1804
+ # be in JSON format and preceded by its corresponding input URI. This field
1805
+ # can either represent a single file, or a prefix for multiple outputs.
1806
+ # Prefixes must end in a `/`.
1807
+ # Examples:
1808
+ # * File: gs://bucket-name/filename.json
1809
+ # * Prefix: gs://bucket-name/prefix/here/
1810
+ # * File: gs://bucket-name/prefix/here
1811
+ # If multiple outputs, each response is still AnnotateFileResponse, each of
1812
+ # which contains some subset of the full list of AnnotateImageResponse.
1813
+ # Multiple outputs can happen if, for example, the output JSON is too large
1814
+ # and overflows into multiple sharded files.
1815
+ # Corresponds to the JSON property `uri`
1816
+ # @return [String]
1817
+ attr_accessor :uri
1818
+
1819
+ def initialize(**args)
1820
+ update!(**args)
1821
+ end
1822
+
1823
+ # Update properties of this object
1824
+ def update!(**args)
1825
+ @uri = args[:uri] if args.key?(:uri)
1826
+ end
1827
+ end
1828
+
1829
+ # The Google Cloud Storage location where the input will be read from.
1830
+ class GoogleCloudVisionV1p2beta1GcsSource
1831
+ include Google::Apis::Core::Hashable
1832
+
1833
+ # Google Cloud Storage URI for the input file. This must only be a
1834
+ # Google Cloud Storage object. Wildcards are not currently supported.
1835
+ # Corresponds to the JSON property `uri`
1836
+ # @return [String]
1837
+ attr_accessor :uri
1838
+
1839
+ def initialize(**args)
1840
+ update!(**args)
1841
+ end
1842
+
1843
+ # Update properties of this object
1844
+ def update!(**args)
1845
+ @uri = args[:uri] if args.key?(:uri)
1846
+ end
1847
+ end
1848
+
1849
+ # Client image to perform Google Cloud Vision API tasks over.
1850
+ class GoogleCloudVisionV1p2beta1Image
1851
+ include Google::Apis::Core::Hashable
1852
+
1853
+ # Image content, represented as a stream of bytes.
1854
+ # Note: As with all `bytes` fields, protobuffers use a pure binary
1855
+ # representation, whereas JSON representations use base64.
1856
+ # Corresponds to the JSON property `content`
1857
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1858
+ # @return [String]
1859
+ attr_accessor :content
1860
+
1861
+ # External image source (Google Cloud Storage or web URL image location).
1862
+ # Corresponds to the JSON property `source`
1863
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageSource]
1864
+ attr_accessor :source
1865
+
1866
+ def initialize(**args)
1867
+ update!(**args)
1868
+ end
1869
+
1870
+ # Update properties of this object
1871
+ def update!(**args)
1872
+ @content = args[:content] if args.key?(:content)
1873
+ @source = args[:source] if args.key?(:source)
1874
+ end
1875
+ end
1876
+
1877
+ # If an image was produced from a file (e.g. a PDF), this message gives
1878
+ # information about the source of that image.
1879
+ class GoogleCloudVisionV1p2beta1ImageAnnotationContext
1880
+ include Google::Apis::Core::Hashable
1881
+
1882
+ # If the file was a PDF or TIFF, this field gives the page number within
1883
+ # the file used to produce the image.
1884
+ # Corresponds to the JSON property `pageNumber`
1885
+ # @return [Fixnum]
1886
+ attr_accessor :page_number
1887
+
1888
+ # The URI of the file used to produce the image.
1889
+ # Corresponds to the JSON property `uri`
1890
+ # @return [String]
1891
+ attr_accessor :uri
1892
+
1893
+ def initialize(**args)
1894
+ update!(**args)
1895
+ end
1896
+
1897
+ # Update properties of this object
1898
+ def update!(**args)
1899
+ @page_number = args[:page_number] if args.key?(:page_number)
1900
+ @uri = args[:uri] if args.key?(:uri)
1901
+ end
1902
+ end
1903
+
1904
+ # Image context and/or feature-specific parameters.
1905
+ class GoogleCloudVisionV1p2beta1ImageContext
1906
+ include Google::Apis::Core::Hashable
1907
+
1908
+ # Parameters for crop hints annotation request.
1909
+ # Corresponds to the JSON property `cropHintsParams`
1910
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsParams]
1911
+ attr_accessor :crop_hints_params
1912
+
1913
+ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
1914
+ # yields the best results since it enables automatic language detection. For
1915
+ # languages based on the Latin alphabet, setting `language_hints` is not
1916
+ # needed. In rare cases, when the language of the text in the image is known,
1917
+ # setting a hint will help get better results (although it will be a
1918
+ # significant hindrance if the hint is wrong). Text detection returns an
1919
+ # error if one or more of the specified languages is not one of the
1920
+ # [supported languages](/vision/docs/languages).
1921
+ # Corresponds to the JSON property `languageHints`
1922
+ # @return [Array<String>]
1923
+ attr_accessor :language_hints
1924
+
1925
+ # Rectangle determined by min and max `LatLng` pairs.
1926
+ # Corresponds to the JSON property `latLongRect`
1927
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LatLongRect]
1928
+ attr_accessor :lat_long_rect
1929
+
1930
+ # Parameters for web detection request.
1931
+ # Corresponds to the JSON property `webDetectionParams`
1932
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionParams]
1933
+ attr_accessor :web_detection_params
1934
+
1935
+ def initialize(**args)
1936
+ update!(**args)
1937
+ end
1938
+
1939
+ # Update properties of this object
1940
+ def update!(**args)
1941
+ @crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params)
1942
+ @language_hints = args[:language_hints] if args.key?(:language_hints)
1943
+ @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
1944
+ @web_detection_params = args[:web_detection_params] if args.key?(:web_detection_params)
1945
+ end
1946
+ end
1947
+
1948
+ # Stores image properties, such as dominant colors.
1949
+ class GoogleCloudVisionV1p2beta1ImageProperties
1950
+ include Google::Apis::Core::Hashable
1951
+
1952
+ # Set of dominant colors and their corresponding scores.
1953
+ # Corresponds to the JSON property `dominantColors`
1954
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1DominantColorsAnnotation]
1955
+ attr_accessor :dominant_colors
1956
+
1957
+ def initialize(**args)
1958
+ update!(**args)
1959
+ end
1960
+
1961
+ # Update properties of this object
1962
+ def update!(**args)
1963
+ @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
1964
+ end
1965
+ end
1966
+
1967
+ # External image source (Google Cloud Storage or web URL image location).
1968
+ class GoogleCloudVisionV1p2beta1ImageSource
1969
+ include Google::Apis::Core::Hashable
1970
+
1971
+ # **Use `image_uri` instead.**
1972
+ # The Google Cloud Storage URI of the form
1973
+ # `gs://bucket_name/object_name`. Object versioning is not supported. See
1974
+ # [Google Cloud Storage Request
1975
+ # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
1976
+ # Corresponds to the JSON property `gcsImageUri`
1977
+ # @return [String]
1978
+ attr_accessor :gcs_image_uri
1979
+
1980
+ # The URI of the source image. Can be either:
1981
+ # 1. A Google Cloud Storage URI of the form
1982
+ # `gs://bucket_name/object_name`. Object versioning is not supported. See
1983
+ # [Google Cloud Storage Request
1984
+ # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
1985
+ # info.
1986
+ # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
1987
+ # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
1988
+ # completed. Your request may fail if the specified host denies the
1989
+ # request (e.g. due to request throttling or DOS prevention), or if Google
1990
+ # throttles requests to the site for abuse prevention. You should not
1991
+ # depend on externally-hosted images for production applications.
1992
+ # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
1993
+ # precedence.
1994
+ # Corresponds to the JSON property `imageUri`
1995
+ # @return [String]
1996
+ attr_accessor :image_uri
1997
+
1998
+ def initialize(**args)
1999
+ update!(**args)
2000
+ end
2001
+
2002
+ # Update properties of this object
2003
+ def update!(**args)
2004
+ @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
2005
+ @image_uri = args[:image_uri] if args.key?(:image_uri)
2006
+ end
2007
+ end
2008
+
2009
+ # The desired input location and metadata.
2010
+ class GoogleCloudVisionV1p2beta1InputConfig
2011
+ include Google::Apis::Core::Hashable
2012
+
2013
+ # The Google Cloud Storage location where the input will be read from.
2014
+ # Corresponds to the JSON property `gcsSource`
2015
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsSource]
2016
+ attr_accessor :gcs_source
2017
+
2018
+ # The type of the file. Currently only "application/pdf" and "image/tiff"
2019
+ # are supported. Wildcards are not supported.
2020
+ # Corresponds to the JSON property `mimeType`
2021
+ # @return [String]
2022
+ attr_accessor :mime_type
2023
+
2024
+ def initialize(**args)
2025
+ update!(**args)
2026
+ end
2027
+
2028
+ # Update properties of this object
2029
+ def update!(**args)
2030
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
2031
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
2032
+ end
2033
+ end
2034
+
2035
+ # Rectangle determined by min and max `LatLng` pairs.
2036
+ class GoogleCloudVisionV1p2beta1LatLongRect
2037
+ include Google::Apis::Core::Hashable
2038
+
2039
+ # An object representing a latitude/longitude pair. This is expressed as a pair
2040
+ # of doubles representing degrees latitude and degrees longitude. Unless
2041
+ # specified otherwise, this must conform to the
2042
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2043
+ # standard</a>. Values must be within normalized ranges.
2044
+ # Corresponds to the JSON property `maxLatLng`
2045
+ # @return [Google::Apis::VisionV1p2beta1::LatLng]
2046
+ attr_accessor :max_lat_lng
2047
+
2048
+ # An object representing a latitude/longitude pair. This is expressed as a pair
2049
+ # of doubles representing degrees latitude and degrees longitude. Unless
2050
+ # specified otherwise, this must conform to the
2051
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2052
+ # standard</a>. Values must be within normalized ranges.
2053
+ # Corresponds to the JSON property `minLatLng`
2054
+ # @return [Google::Apis::VisionV1p2beta1::LatLng]
2055
+ attr_accessor :min_lat_lng
2056
+
2057
+ def initialize(**args)
2058
+ update!(**args)
2059
+ end
2060
+
2061
+ # Update properties of this object
2062
+ def update!(**args)
2063
+ @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng)
2064
+ @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng)
2065
+ end
2066
+ end
2067
+
2068
+ # Detected entity location information.
2069
+ class GoogleCloudVisionV1p2beta1LocationInfo
2070
+ include Google::Apis::Core::Hashable
2071
+
2072
+ # An object representing a latitude/longitude pair. This is expressed as a pair
2073
+ # of doubles representing degrees latitude and degrees longitude. Unless
2074
+ # specified otherwise, this must conform to the
2075
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2076
+ # standard</a>. Values must be within normalized ranges.
2077
+ # Corresponds to the JSON property `latLng`
2078
+ # @return [Google::Apis::VisionV1p2beta1::LatLng]
2079
+ attr_accessor :lat_lng
2080
+
2081
+ def initialize(**args)
2082
+ update!(**args)
2083
+ end
2084
+
2085
+ # Update properties of this object
2086
+ def update!(**args)
2087
+ @lat_lng = args[:lat_lng] if args.key?(:lat_lng)
2088
+ end
2089
+ end
2090
+
2091
+ # A vertex represents a 2D point in the image.
2092
+ # NOTE: the normalized vertex coordinates are relative to the original image
2093
+ # and range from 0 to 1.
2094
+ class GoogleCloudVisionV1p2beta1NormalizedVertex
2095
+ include Google::Apis::Core::Hashable
2096
+
2097
+ # X coordinate.
2098
+ # Corresponds to the JSON property `x`
2099
+ # @return [Float]
2100
+ attr_accessor :x
2101
+
2102
+ # Y coordinate.
2103
+ # Corresponds to the JSON property `y`
2104
+ # @return [Float]
2105
+ attr_accessor :y
2106
+
2107
+ def initialize(**args)
2108
+ update!(**args)
2109
+ end
2110
+
2111
+ # Update properties of this object
2112
+ def update!(**args)
2113
+ @x = args[:x] if args.key?(:x)
2114
+ @y = args[:y] if args.key?(:y)
2115
+ end
2116
+ end
2117
+
2118
+ # Contains metadata for the BatchAnnotateImages operation.
2119
+ class GoogleCloudVisionV1p2beta1OperationMetadata
2120
+ include Google::Apis::Core::Hashable
2121
+
2122
+ # The time when the batch request was received.
2123
+ # Corresponds to the JSON property `createTime`
2124
+ # @return [String]
2125
+ attr_accessor :create_time
2126
+
2127
+ # Current state of the batch operation.
2128
+ # Corresponds to the JSON property `state`
2129
+ # @return [String]
2130
+ attr_accessor :state
2131
+
2132
+ # The time when the operation result was last updated.
2133
+ # Corresponds to the JSON property `updateTime`
2134
+ # @return [String]
2135
+ attr_accessor :update_time
2136
+
2137
+ def initialize(**args)
2138
+ update!(**args)
2139
+ end
2140
+
2141
+ # Update properties of this object
2142
+ def update!(**args)
2143
+ @create_time = args[:create_time] if args.key?(:create_time)
2144
+ @state = args[:state] if args.key?(:state)
2145
+ @update_time = args[:update_time] if args.key?(:update_time)
2146
+ end
2147
+ end
2148
+
2149
+ # The desired output location and metadata.
2150
+ class GoogleCloudVisionV1p2beta1OutputConfig
2151
+ include Google::Apis::Core::Hashable
2152
+
2153
+ # The max number of response protos to put into each output JSON file on
2154
+ # Google Cloud Storage.
2155
+ # The valid range is [1, 100]. If not specified, the default value is 20.
2156
+ # For example, for one pdf file with 100 pages, 100 response protos will
2157
+ # be generated. If `batch_size` = 20, then 5 json files each
2158
+ # containing 20 response protos will be written under the prefix
2159
+ # `gcs_destination`.`uri`.
2160
+ # Currently, batch_size only applies to GcsDestination, with potential future
2161
+ # support for other output configurations.
2162
+ # Corresponds to the JSON property `batchSize`
2163
+ # @return [Fixnum]
2164
+ attr_accessor :batch_size
2165
+
2166
+ # The Google Cloud Storage location where the output will be written to.
2167
+ # Corresponds to the JSON property `gcsDestination`
2168
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsDestination]
2169
+ attr_accessor :gcs_destination
2170
+
2171
+ def initialize(**args)
2172
+ update!(**args)
2173
+ end
2174
+
2175
+ # Update properties of this object
2176
+ def update!(**args)
2177
+ @batch_size = args[:batch_size] if args.key?(:batch_size)
2178
+ @gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
2179
+ end
2180
+ end
2181
+
2182
+ # Detected page from OCR.
2183
+ class GoogleCloudVisionV1p2beta1Page
2184
+ include Google::Apis::Core::Hashable
2185
+
2186
+ # List of blocks of text, images etc on this page.
2187
+ # Corresponds to the JSON property `blocks`
2188
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Block>]
2189
+ attr_accessor :blocks
2190
+
2191
+ # Confidence of the OCR results on the page. Range [0, 1].
2192
+ # Corresponds to the JSON property `confidence`
2193
+ # @return [Float]
2194
+ attr_accessor :confidence
2195
+
2196
+ # Page height. For PDFs the unit is points. For images (including
2197
+ # TIFFs) the unit is pixels.
2198
+ # Corresponds to the JSON property `height`
2199
+ # @return [Fixnum]
2200
+ attr_accessor :height
2201
+
2202
+ # Additional information detected on the structural component.
2203
+ # Corresponds to the JSON property `property`
2204
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
2205
+ attr_accessor :property
2206
+
2207
+ # Page width. For PDFs the unit is points. For images (including
2208
+ # TIFFs) the unit is pixels.
2209
+ # Corresponds to the JSON property `width`
2210
+ # @return [Fixnum]
2211
+ attr_accessor :width
2212
+
2213
+ def initialize(**args)
2214
+ update!(**args)
2215
+ end
2216
+
2217
+ # Update properties of this object
2218
+ def update!(**args)
2219
+ @blocks = args[:blocks] if args.key?(:blocks)
2220
+ @confidence = args[:confidence] if args.key?(:confidence)
2221
+ @height = args[:height] if args.key?(:height)
2222
+ @property = args[:property] if args.key?(:property)
2223
+ @width = args[:width] if args.key?(:width)
2224
+ end
2225
+ end
2226
+
2227
+ # Structural unit of text representing a number of words in certain order.
2228
+ class GoogleCloudVisionV1p2beta1Paragraph
2229
+ include Google::Apis::Core::Hashable
2230
+
2231
+ # A bounding polygon for the detected image annotation.
2232
+ # Corresponds to the JSON property `boundingBox`
2233
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
2234
+ attr_accessor :bounding_box
2235
+
2236
+ # Confidence of the OCR results for the paragraph. Range [0, 1].
2237
+ # Corresponds to the JSON property `confidence`
2238
+ # @return [Float]
2239
+ attr_accessor :confidence
2240
+
2241
+ # Additional information detected on the structural component.
2242
+ # Corresponds to the JSON property `property`
2243
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
2244
+ attr_accessor :property
2245
+
2246
+ # List of words in this paragraph.
2247
+ # Corresponds to the JSON property `words`
2248
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Word>]
2249
+ attr_accessor :words
2250
+
2251
+ def initialize(**args)
2252
+ update!(**args)
2253
+ end
2254
+
2255
+ # Update properties of this object
2256
+ def update!(**args)
2257
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
2258
+ @confidence = args[:confidence] if args.key?(:confidence)
2259
+ @property = args[:property] if args.key?(:property)
2260
+ @words = args[:words] if args.key?(:words)
2261
+ end
2262
+ end
2263
+
2264
+ # A 3D position in the image, used primarily for Face detection landmarks.
2265
+ # A valid Position must have both x and y coordinates.
2266
+ # The position coordinates are in the same scale as the original image.
2267
+ class GoogleCloudVisionV1p2beta1Position
2268
+ include Google::Apis::Core::Hashable
2269
+
2270
+ # X coordinate.
2271
+ # Corresponds to the JSON property `x`
2272
+ # @return [Float]
2273
+ attr_accessor :x
2274
+
2275
+ # Y coordinate.
2276
+ # Corresponds to the JSON property `y`
2277
+ # @return [Float]
2278
+ attr_accessor :y
2279
+
2280
+ # Z coordinate (or depth).
2281
+ # Corresponds to the JSON property `z`
2282
+ # @return [Float]
2283
+ attr_accessor :z
2284
+
2285
+ def initialize(**args)
2286
+ update!(**args)
2287
+ end
2288
+
2289
+ # Update properties of this object
2290
+ def update!(**args)
2291
+ @x = args[:x] if args.key?(:x)
2292
+ @y = args[:y] if args.key?(:y)
2293
+ @z = args[:z] if args.key?(:z)
2294
+ end
2295
+ end
2296
+
2297
+ # A `Property` consists of a user-supplied name/value pair.
2298
+ class GoogleCloudVisionV1p2beta1Property
2299
+ include Google::Apis::Core::Hashable
2300
+
2301
+ # Name of the property.
2302
+ # Corresponds to the JSON property `name`
2303
+ # @return [String]
2304
+ attr_accessor :name
2305
+
2306
+ # Value of numeric properties.
2307
+ # Corresponds to the JSON property `uint64Value`
2308
+ # @return [Fixnum]
2309
+ attr_accessor :uint64_value
2310
+
2311
+ # Value of the property.
2312
+ # Corresponds to the JSON property `value`
2313
+ # @return [String]
2314
+ attr_accessor :value
2315
+
2316
+ def initialize(**args)
2317
+ update!(**args)
2318
+ end
2319
+
2320
+ # Update properties of this object
2321
+ def update!(**args)
2322
+ @name = args[:name] if args.key?(:name)
2323
+ @uint64_value = args[:uint64_value] if args.key?(:uint64_value)
2324
+ @value = args[:value] if args.key?(:value)
2325
+ end
2326
+ end
2327
+
2328
+ # Set of features pertaining to the image, computed by computer vision
2329
+ # methods over safe-search verticals (for example, adult, spoof, medical,
2330
+ # violence).
2331
+ class GoogleCloudVisionV1p2beta1SafeSearchAnnotation
2332
+ include Google::Apis::Core::Hashable
2333
+
2334
+ # Represents the adult content likelihood for the image. Adult content may
2335
+ # contain elements such as nudity, pornographic images or cartoons, or
2336
+ # sexual activities.
2337
+ # Corresponds to the JSON property `adult`
2338
+ # @return [String]
2339
+ attr_accessor :adult
2340
+
2341
+ # Likelihood that this is a medical image.
2342
+ # Corresponds to the JSON property `medical`
2343
+ # @return [String]
2344
+ attr_accessor :medical
2345
+
2346
+ # Likelihood that the request image contains racy content. Racy content may
2347
+ # include (but is not limited to) skimpy or sheer clothing, strategically
2348
+ # covered nudity, lewd or provocative poses, or close-ups of sensitive
2349
+ # body areas.
2350
+ # Corresponds to the JSON property `racy`
2351
+ # @return [String]
2352
+ attr_accessor :racy
2353
+
2354
+ # Spoof likelihood. The likelihood that an modification
2355
+ # was made to the image's canonical version to make it appear
2356
+ # funny or offensive.
2357
+ # Corresponds to the JSON property `spoof`
2358
+ # @return [String]
2359
+ attr_accessor :spoof
2360
+
2361
+ # Likelihood that this image contains violent content.
2362
+ # Corresponds to the JSON property `violence`
2363
+ # @return [String]
2364
+ attr_accessor :violence
2365
+
2366
+ def initialize(**args)
2367
+ update!(**args)
2368
+ end
2369
+
2370
+ # Update properties of this object
2371
+ def update!(**args)
2372
+ @adult = args[:adult] if args.key?(:adult)
2373
+ @medical = args[:medical] if args.key?(:medical)
2374
+ @racy = args[:racy] if args.key?(:racy)
2375
+ @spoof = args[:spoof] if args.key?(:spoof)
2376
+ @violence = args[:violence] if args.key?(:violence)
2377
+ end
2378
+ end
2379
+
2380
+ # A single symbol representation.
2381
+ class GoogleCloudVisionV1p2beta1Symbol
2382
+ include Google::Apis::Core::Hashable
2383
+
2384
+ # A bounding polygon for the detected image annotation.
2385
+ # Corresponds to the JSON property `boundingBox`
2386
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
2387
+ attr_accessor :bounding_box
2388
+
2389
+ # Confidence of the OCR results for the symbol. Range [0, 1].
2390
+ # Corresponds to the JSON property `confidence`
2391
+ # @return [Float]
2392
+ attr_accessor :confidence
2393
+
2394
+ # Additional information detected on the structural component.
2395
+ # Corresponds to the JSON property `property`
2396
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
2397
+ attr_accessor :property
2398
+
2399
+ # The actual UTF-8 representation of the symbol.
2400
+ # Corresponds to the JSON property `text`
2401
+ # @return [String]
2402
+ attr_accessor :text
2403
+
2404
+ def initialize(**args)
2405
+ update!(**args)
2406
+ end
2407
+
2408
+ # Update properties of this object
2409
+ def update!(**args)
2410
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
2411
+ @confidence = args[:confidence] if args.key?(:confidence)
2412
+ @property = args[:property] if args.key?(:property)
2413
+ @text = args[:text] if args.key?(:text)
2414
+ end
2415
+ end
2416
+
2417
+ # TextAnnotation contains a structured representation of OCR extracted text.
2418
+ # The hierarchy of an OCR extracted text structure is like this:
2419
+ # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
2420
+ # Each structural component, starting from Page, may further have their own
2421
+ # properties. Properties describe detected languages, breaks etc.. Please refer
2422
+ # to the TextAnnotation.TextProperty message definition below for more
2423
+ # detail.
2424
+ class GoogleCloudVisionV1p2beta1TextAnnotation
2425
+ include Google::Apis::Core::Hashable
2426
+
2427
+ # List of pages detected by OCR.
2428
+ # Corresponds to the JSON property `pages`
2429
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Page>]
2430
+ attr_accessor :pages
2431
+
2432
+ # UTF-8 text detected on the pages.
2433
+ # Corresponds to the JSON property `text`
2434
+ # @return [String]
2435
+ attr_accessor :text
2436
+
2437
+ def initialize(**args)
2438
+ update!(**args)
2439
+ end
2440
+
2441
+ # Update properties of this object
2442
+ def update!(**args)
2443
+ @pages = args[:pages] if args.key?(:pages)
2444
+ @text = args[:text] if args.key?(:text)
2445
+ end
2446
+ end
2447
+
2448
+ # Detected start or end of a structural component.
2449
+ class GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
2450
+ include Google::Apis::Core::Hashable
2451
+
2452
+ # True if break prepends the element.
2453
+ # Corresponds to the JSON property `isPrefix`
2454
+ # @return [Boolean]
2455
+ attr_accessor :is_prefix
2456
+ alias_method :is_prefix?, :is_prefix
2457
+
2458
+ # Detected break type.
2459
+ # Corresponds to the JSON property `type`
2460
+ # @return [String]
2461
+ attr_accessor :type
2462
+
2463
+ def initialize(**args)
2464
+ update!(**args)
2465
+ end
2466
+
2467
+ # Update properties of this object
2468
+ def update!(**args)
2469
+ @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
2470
+ @type = args[:type] if args.key?(:type)
2471
+ end
2472
+ end
2473
+
2474
+ # Detected language for a structural component.
2475
+ class GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
2476
+ include Google::Apis::Core::Hashable
2477
+
2478
+ # Confidence of detected language. Range [0, 1].
2479
+ # Corresponds to the JSON property `confidence`
2480
+ # @return [Float]
2481
+ attr_accessor :confidence
2482
+
2483
+ # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
2484
+ # information, see
2485
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
2486
+ # Corresponds to the JSON property `languageCode`
2487
+ # @return [String]
2488
+ attr_accessor :language_code
2489
+
2490
+ def initialize(**args)
2491
+ update!(**args)
2492
+ end
2493
+
2494
+ # Update properties of this object
2495
+ def update!(**args)
2496
+ @confidence = args[:confidence] if args.key?(:confidence)
2497
+ @language_code = args[:language_code] if args.key?(:language_code)
2498
+ end
2499
+ end
2500
+
2501
+ # Additional information detected on the structural component.
2502
+ class GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
2503
+ include Google::Apis::Core::Hashable
2504
+
2505
+ # Detected start or end of a structural component.
2506
+ # Corresponds to the JSON property `detectedBreak`
2507
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak]
2508
+ attr_accessor :detected_break
2509
+
2510
+ # A list of detected languages together with confidence.
2511
+ # Corresponds to the JSON property `detectedLanguages`
2512
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage>]
2513
+ attr_accessor :detected_languages
2514
+
2515
+ def initialize(**args)
2516
+ update!(**args)
2517
+ end
2518
+
2519
+ # Update properties of this object
2520
+ def update!(**args)
2521
+ @detected_break = args[:detected_break] if args.key?(:detected_break)
2522
+ @detected_languages = args[:detected_languages] if args.key?(:detected_languages)
2523
+ end
2524
+ end
2525
+
2526
+ # A vertex represents a 2D point in the image.
2527
+ # NOTE: the vertex coordinates are in the same scale as the original image.
2528
+ class GoogleCloudVisionV1p2beta1Vertex
2529
+ include Google::Apis::Core::Hashable
2530
+
2531
+ # X coordinate.
2532
+ # Corresponds to the JSON property `x`
2533
+ # @return [Fixnum]
2534
+ attr_accessor :x
2535
+
2536
+ # Y coordinate.
2537
+ # Corresponds to the JSON property `y`
2538
+ # @return [Fixnum]
2539
+ attr_accessor :y
2540
+
2541
+ def initialize(**args)
2542
+ update!(**args)
2543
+ end
2544
+
2545
+ # Update properties of this object
2546
+ def update!(**args)
2547
+ @x = args[:x] if args.key?(:x)
2548
+ @y = args[:y] if args.key?(:y)
2549
+ end
2550
+ end
2551
+
2552
+ # Relevant information for the image from the Internet.
2553
+ class GoogleCloudVisionV1p2beta1WebDetection
2554
+ include Google::Apis::Core::Hashable
2555
+
2556
+ # Best guess text labels for the request image.
2557
+ # Corresponds to the JSON property `bestGuessLabels`
2558
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebLabel>]
2559
+ attr_accessor :best_guess_labels
2560
+
2561
+ # Fully matching images from the Internet.
2562
+ # Can include resized copies of the query image.
2563
+ # Corresponds to the JSON property `fullMatchingImages`
2564
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
2565
+ attr_accessor :full_matching_images
2566
+
2567
+ # Web pages containing the matching images from the Internet.
2568
+ # Corresponds to the JSON property `pagesWithMatchingImages`
2569
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebPage>]
2570
+ attr_accessor :pages_with_matching_images
2571
+
2572
+ # Partial matching images from the Internet.
2573
+ # Those images are similar enough to share some key-point features. For
2574
+ # example an original image will likely have partial matching for its crops.
2575
+ # Corresponds to the JSON property `partialMatchingImages`
2576
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
2577
+ attr_accessor :partial_matching_images
2578
+
2579
+ # The visually similar image results.
2580
+ # Corresponds to the JSON property `visuallySimilarImages`
2581
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
2582
+ attr_accessor :visually_similar_images
2583
+
2584
+ # Deduced entities from similar images on the Internet.
2585
+ # Corresponds to the JSON property `webEntities`
2586
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebEntity>]
2587
+ attr_accessor :web_entities
2588
+
2589
+ def initialize(**args)
2590
+ update!(**args)
2591
+ end
2592
+
2593
+ # Update properties of this object
2594
+ def update!(**args)
2595
+ @best_guess_labels = args[:best_guess_labels] if args.key?(:best_guess_labels)
2596
+ @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
2597
+ @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
2598
+ @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
2599
+ @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
2600
+ @web_entities = args[:web_entities] if args.key?(:web_entities)
2601
+ end
2602
+ end
2603
+
2604
+ # Parameters for web detection request.
2605
+ class GoogleCloudVisionV1p2beta1WebDetectionParams
2606
+ include Google::Apis::Core::Hashable
2607
+
2608
+ # Whether to include results derived from the geo information in the image.
2609
+ # Corresponds to the JSON property `includeGeoResults`
2610
+ # @return [Boolean]
2611
+ attr_accessor :include_geo_results
2612
+ alias_method :include_geo_results?, :include_geo_results
2613
+
2614
+ def initialize(**args)
2615
+ update!(**args)
2616
+ end
2617
+
2618
+ # Update properties of this object
2619
+ def update!(**args)
2620
+ @include_geo_results = args[:include_geo_results] if args.key?(:include_geo_results)
2621
+ end
2622
+ end
2623
+
2624
+ # Entity deduced from similar images on the Internet.
2625
+ class GoogleCloudVisionV1p2beta1WebDetectionWebEntity
2626
+ include Google::Apis::Core::Hashable
2627
+
2628
+ # Canonical description of the entity, in English.
2629
+ # Corresponds to the JSON property `description`
2630
+ # @return [String]
2631
+ attr_accessor :description
2632
+
2633
+ # Opaque entity ID.
2634
+ # Corresponds to the JSON property `entityId`
2635
+ # @return [String]
2636
+ attr_accessor :entity_id
2637
+
2638
+ # Overall relevancy score for the entity.
2639
+ # Not normalized and not comparable across different image queries.
2640
+ # Corresponds to the JSON property `score`
2641
+ # @return [Float]
2642
+ attr_accessor :score
2643
+
2644
+ def initialize(**args)
2645
+ update!(**args)
2646
+ end
2647
+
2648
+ # Update properties of this object
2649
+ def update!(**args)
2650
+ @description = args[:description] if args.key?(:description)
2651
+ @entity_id = args[:entity_id] if args.key?(:entity_id)
2652
+ @score = args[:score] if args.key?(:score)
2653
+ end
2654
+ end
2655
+
2656
+ # Metadata for online images.
2657
+ class GoogleCloudVisionV1p2beta1WebDetectionWebImage
2658
+ include Google::Apis::Core::Hashable
2659
+
2660
+ # (Deprecated) Overall relevancy score for the image.
2661
+ # Corresponds to the JSON property `score`
2662
+ # @return [Float]
2663
+ attr_accessor :score
2664
+
2665
+ # The result image URL.
2666
+ # Corresponds to the JSON property `url`
2667
+ # @return [String]
2668
+ attr_accessor :url
2669
+
2670
+ def initialize(**args)
2671
+ update!(**args)
2672
+ end
2673
+
2674
+ # Update properties of this object
2675
+ def update!(**args)
2676
+ @score = args[:score] if args.key?(:score)
2677
+ @url = args[:url] if args.key?(:url)
2678
+ end
2679
+ end
2680
+
2681
+ # Label to provide extra metadata for the web detection.
2682
+ class GoogleCloudVisionV1p2beta1WebDetectionWebLabel
2683
+ include Google::Apis::Core::Hashable
2684
+
2685
+ # Label for extra metadata.
2686
+ # Corresponds to the JSON property `label`
2687
+ # @return [String]
2688
+ attr_accessor :label
2689
+
2690
+ # The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
2691
+ # For more information, see
2692
+ # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
2693
+ # Corresponds to the JSON property `languageCode`
2694
+ # @return [String]
2695
+ attr_accessor :language_code
2696
+
2697
+ def initialize(**args)
2698
+ update!(**args)
2699
+ end
2700
+
2701
+ # Update properties of this object
2702
+ def update!(**args)
2703
+ @label = args[:label] if args.key?(:label)
2704
+ @language_code = args[:language_code] if args.key?(:language_code)
2705
+ end
2706
+ end
2707
+
2708
+ # Metadata for web pages.
2709
+ class GoogleCloudVisionV1p2beta1WebDetectionWebPage
2710
+ include Google::Apis::Core::Hashable
2711
+
2712
+ # Fully matching images on the page.
2713
+ # Can include resized copies of the query image.
2714
+ # Corresponds to the JSON property `fullMatchingImages`
2715
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
2716
+ attr_accessor :full_matching_images
2717
+
2718
+ # Title for the web page, may contain HTML markups.
2719
+ # Corresponds to the JSON property `pageTitle`
2720
+ # @return [String]
2721
+ attr_accessor :page_title
2722
+
2723
+ # Partial matching images on the page.
2724
+ # Those images are similar enough to share some key-point features. For
2725
+ # example an original image will likely have partial matching for its
2726
+ # crops.
2727
+ # Corresponds to the JSON property `partialMatchingImages`
2728
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
2729
+ attr_accessor :partial_matching_images
2730
+
2731
+ # (Deprecated) Overall relevancy score for the web page.
2732
+ # Corresponds to the JSON property `score`
2733
+ # @return [Float]
2734
+ attr_accessor :score
2735
+
2736
+ # The result web page URL.
2737
+ # Corresponds to the JSON property `url`
2738
+ # @return [String]
2739
+ attr_accessor :url
2740
+
2741
+ def initialize(**args)
2742
+ update!(**args)
2743
+ end
2744
+
2745
+ # Update properties of this object
2746
+ def update!(**args)
2747
+ @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
2748
+ @page_title = args[:page_title] if args.key?(:page_title)
2749
+ @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
2750
+ @score = args[:score] if args.key?(:score)
2751
+ @url = args[:url] if args.key?(:url)
2752
+ end
2753
+ end
2754
+
2755
+ # A word representation.
2756
+ class GoogleCloudVisionV1p2beta1Word
2757
+ include Google::Apis::Core::Hashable
2758
+
2759
+ # A bounding polygon for the detected image annotation.
2760
+ # Corresponds to the JSON property `boundingBox`
2761
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
2762
+ attr_accessor :bounding_box
2763
+
2764
+ # Confidence of the OCR results for the word. Range [0, 1].
2765
+ # Corresponds to the JSON property `confidence`
2766
+ # @return [Float]
2767
+ attr_accessor :confidence
2768
+
2769
+ # Additional information detected on the structural component.
2770
+ # Corresponds to the JSON property `property`
2771
+ # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
2772
+ attr_accessor :property
2773
+
2774
+ # List of symbols in the word.
2775
+ # The order of the symbols follows the natural reading order.
2776
+ # Corresponds to the JSON property `symbols`
2777
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Symbol>]
2778
+ attr_accessor :symbols
2779
+
2780
+ def initialize(**args)
2781
+ update!(**args)
2782
+ end
2783
+
2784
+ # Update properties of this object
2785
+ def update!(**args)
2786
+ @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
2787
+ @confidence = args[:confidence] if args.key?(:confidence)
2788
+ @property = args[:property] if args.key?(:property)
2789
+ @symbols = args[:symbols] if args.key?(:symbols)
2790
+ end
2791
+ end
2792
+
2793
+ # Metadata for the batch operations such as the current state.
2794
+ # This is included in the `metadata` field of the `Operation` returned by the
2795
+ # `GetOperation` call of the `google::longrunning::Operations` service.
2796
+ class GoogleCloudVisionV1p3beta1BatchOperationMetadata
2797
+ include Google::Apis::Core::Hashable
2798
+
2799
+ # The time when the batch request is finished and
2800
+ # google.longrunning.Operation.done is set to true.
2801
+ # Corresponds to the JSON property `endTime`
2802
+ # @return [String]
2803
+ attr_accessor :end_time
2804
+
2805
+ # The current state of the batch operation.
2806
+ # Corresponds to the JSON property `state`
989
2807
  # @return [String]
990
- attr_accessor :type
2808
+ attr_accessor :state
2809
+
2810
+ # The time when the batch request was submitted to the server.
2811
+ # Corresponds to the JSON property `submitTime`
2812
+ # @return [String]
2813
+ attr_accessor :submit_time
991
2814
 
992
2815
  def initialize(**args)
993
2816
  update!(**args)
@@ -995,34 +2818,57 @@ module Google
995
2818
 
996
2819
  # Update properties of this object
997
2820
  def update!(**args)
998
- @position = args[:position] if args.key?(:position)
999
- @type = args[:type] if args.key?(:type)
2821
+ @end_time = args[:end_time] if args.key?(:end_time)
2822
+ @state = args[:state] if args.key?(:state)
2823
+ @submit_time = args[:submit_time] if args.key?(:submit_time)
1000
2824
  end
1001
2825
  end
1002
2826
 
1003
- # The type of Google Cloud Vision API detection to perform, and the maximum
1004
- # number of results to return for that type. Multiple `Feature` objects can
1005
- # be specified in the `features` list.
1006
- class GoogleCloudVisionV1p2beta1Feature
2827
+ # A bounding polygon for the detected image annotation.
2828
+ class GoogleCloudVisionV1p3beta1BoundingPoly
1007
2829
  include Google::Apis::Core::Hashable
1008
2830
 
1009
- # Maximum number of results of this type. Does not apply to
1010
- # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
1011
- # Corresponds to the JSON property `maxResults`
1012
- # @return [Fixnum]
1013
- attr_accessor :max_results
2831
+ # The bounding polygon normalized vertices.
2832
+ # Corresponds to the JSON property `normalizedVertices`
2833
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1NormalizedVertex>]
2834
+ attr_accessor :normalized_vertices
1014
2835
 
1015
- # Model to use for the feature.
1016
- # Supported values: "builtin/stable" (the default if unset) and
1017
- # "builtin/latest".
1018
- # Corresponds to the JSON property `model`
1019
- # @return [String]
1020
- attr_accessor :model
2836
+ # The bounding polygon vertices.
2837
+ # Corresponds to the JSON property `vertices`
2838
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1Vertex>]
2839
+ attr_accessor :vertices
1021
2840
 
1022
- # The feature type.
1023
- # Corresponds to the JSON property `type`
1024
- # @return [String]
1025
- attr_accessor :type
2841
+ def initialize(**args)
2842
+ update!(**args)
2843
+ end
2844
+
2845
+ # Update properties of this object
2846
+ def update!(**args)
2847
+ @normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices)
2848
+ @vertices = args[:vertices] if args.key?(:vertices)
2849
+ end
2850
+ end
2851
+
2852
+ # Response message for the `ImportProductSets` method.
2853
+ # This message is returned by the
2854
+ # google.longrunning.Operations.GetOperation method in the returned
2855
+ # google.longrunning.Operation.response field.
2856
+ class GoogleCloudVisionV1p3beta1ImportProductSetsResponse
2857
+ include Google::Apis::Core::Hashable
2858
+
2859
+ # The list of reference_images that are imported successfully.
2860
+ # Corresponds to the JSON property `referenceImages`
2861
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1ReferenceImage>]
2862
+ attr_accessor :reference_images
2863
+
2864
+ # The rpc status for each ImportProductSet request, including both successes
2865
+ # and errors.
2866
+ # The number of statuses here matches the number of lines in the csv file,
2867
+ # and statuses[i] stores the success or failure status of processing the i-th
2868
+ # line of the csv, starting from line 0.
2869
+ # Corresponds to the JSON property `statuses`
2870
+ # @return [Array<Google::Apis::VisionV1p2beta1::Status>]
2871
+ attr_accessor :statuses
1026
2872
 
1027
2873
  def initialize(**args)
1028
2874
  update!(**args)
@@ -1030,31 +2876,26 @@ module Google
1030
2876
 
1031
2877
  # Update properties of this object
1032
2878
  def update!(**args)
1033
- @max_results = args[:max_results] if args.key?(:max_results)
1034
- @model = args[:model] if args.key?(:model)
1035
- @type = args[:type] if args.key?(:type)
2879
+ @reference_images = args[:reference_images] if args.key?(:reference_images)
2880
+ @statuses = args[:statuses] if args.key?(:statuses)
1036
2881
  end
1037
2882
  end
1038
2883
 
1039
- # The Google Cloud Storage location where the output will be written to.
1040
- class GoogleCloudVisionV1p2beta1GcsDestination
2884
+ # A vertex represents a 2D point in the image.
2885
+ # NOTE: the normalized vertex coordinates are relative to the original image
2886
+ # and range from 0 to 1.
2887
+ class GoogleCloudVisionV1p3beta1NormalizedVertex
1041
2888
  include Google::Apis::Core::Hashable
1042
2889
 
1043
- # Google Cloud Storage URI where the results will be stored. Results will
1044
- # be in JSON format and preceded by its corresponding input URI. This field
1045
- # can either represent a single file, or a prefix for multiple outputs.
1046
- # Prefixes must end in a `/`.
1047
- # Examples:
1048
- # * File: gs://bucket-name/filename.json
1049
- # * Prefix: gs://bucket-name/prefix/here/
1050
- # * File: gs://bucket-name/prefix/here
1051
- # If multiple outputs, each response is still AnnotateFileResponse, each of
1052
- # which contains some subset of the full list of AnnotateImageResponse.
1053
- # Multiple outputs can happen if, for example, the output JSON is too large
1054
- # and overflows into multiple sharded files.
1055
- # Corresponds to the JSON property `uri`
1056
- # @return [String]
1057
- attr_accessor :uri
2890
+ # X coordinate.
2891
+ # Corresponds to the JSON property `x`
2892
+ # @return [Float]
2893
+ attr_accessor :x
2894
+
2895
+ # Y coordinate.
2896
+ # Corresponds to the JSON property `y`
2897
+ # @return [Float]
2898
+ attr_accessor :y
1058
2899
 
1059
2900
  def initialize(**args)
1060
2901
  update!(**args)
@@ -1062,16 +2903,39 @@ module Google
1062
2903
 
1063
2904
  # Update properties of this object
1064
2905
  def update!(**args)
1065
- @uri = args[:uri] if args.key?(:uri)
2906
+ @x = args[:x] if args.key?(:x)
2907
+ @y = args[:y] if args.key?(:y)
1066
2908
  end
1067
2909
  end
1068
2910
 
1069
- # The Google Cloud Storage location where the input will be read from.
1070
- class GoogleCloudVisionV1p2beta1GcsSource
2911
+ # A `ReferenceImage` represents a product image and its associated metadata,
2912
+ # such as bounding boxes.
2913
+ class GoogleCloudVisionV1p3beta1ReferenceImage
1071
2914
  include Google::Apis::Core::Hashable
1072
2915
 
1073
- # Google Cloud Storage URI for the input file. This must only be a
1074
- # Google Cloud Storage object. Wildcards are not currently supported.
2916
+ # Bounding polygons around the areas of interest in the reference image.
2917
+ # Optional. If this field is empty, the system will try to detect regions of
2918
+ # interest. At most 10 bounding polygons will be used.
2919
+ # The provided shape is converted into a non-rotated rectangle. Once
2920
+ # converted, the small edge of the rectangle must be greater than or equal
2921
+ # to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
2922
+ # is not).
2923
+ # Corresponds to the JSON property `boundingPolys`
2924
+ # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1BoundingPoly>]
2925
+ attr_accessor :bounding_polys
2926
+
2927
+ # The resource name of the reference image.
2928
+ # Format is:
2929
+ # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/
2930
+ # IMAGE_ID`.
2931
+ # This field is ignored when creating a reference image.
2932
+ # Corresponds to the JSON property `name`
2933
+ # @return [String]
2934
+ attr_accessor :name
2935
+
2936
+ # The Google Cloud Storage URI of the reference image.
2937
+ # The URI must start with `gs://`.
2938
+ # Required.
1075
2939
  # Corresponds to the JSON property `uri`
1076
2940
  # @return [String]
1077
2941
  attr_accessor :uri
@@ -1082,26 +2946,26 @@ module Google
1082
2946
 
1083
2947
  # Update properties of this object
1084
2948
  def update!(**args)
2949
+ @bounding_polys = args[:bounding_polys] if args.key?(:bounding_polys)
2950
+ @name = args[:name] if args.key?(:name)
1085
2951
  @uri = args[:uri] if args.key?(:uri)
1086
2952
  end
1087
2953
  end
1088
2954
 
1089
- # Client image to perform Google Cloud Vision API tasks over.
1090
- class GoogleCloudVisionV1p2beta1Image
2955
+ # A vertex represents a 2D point in the image.
2956
+ # NOTE: the vertex coordinates are in the same scale as the original image.
2957
+ class GoogleCloudVisionV1p3beta1Vertex
1091
2958
  include Google::Apis::Core::Hashable
1092
2959
 
1093
- # Image content, represented as a stream of bytes.
1094
- # Note: As with all `bytes` fields, protobuffers use a pure binary
1095
- # representation, whereas JSON representations use base64.
1096
- # Corresponds to the JSON property `content`
1097
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
1098
- # @return [String]
1099
- attr_accessor :content
2960
+ # X coordinate.
2961
+ # Corresponds to the JSON property `x`
2962
+ # @return [Fixnum]
2963
+ attr_accessor :x
1100
2964
 
1101
- # External image source (Google Cloud Storage or web URL image location).
1102
- # Corresponds to the JSON property `source`
1103
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageSource]
1104
- attr_accessor :source
2965
+ # Y coordinate.
2966
+ # Corresponds to the JSON property `y`
2967
+ # @return [Fixnum]
2968
+ attr_accessor :y
1105
2969
 
1106
2970
  def initialize(**args)
1107
2971
  update!(**args)
@@ -1109,14 +2973,14 @@ module Google
1109
2973
 
1110
2974
  # Update properties of this object
1111
2975
  def update!(**args)
1112
- @content = args[:content] if args.key?(:content)
1113
- @source = args[:source] if args.key?(:source)
2976
+ @x = args[:x] if args.key?(:x)
2977
+ @y = args[:y] if args.key?(:y)
1114
2978
  end
1115
2979
  end
1116
2980
 
1117
2981
  # If an image was produced from a file (e.g. a PDF), this message gives
1118
2982
  # information about the source of that image.
1119
- class GoogleCloudVisionV1p2beta1ImageAnnotationContext
2983
+ class ImageAnnotationContext
1120
2984
  include Google::Apis::Core::Hashable
1121
2985
 
1122
2986
  # If the file was a PDF or TIFF, this field gives the page number within
@@ -1141,57 +3005,13 @@ module Google
1141
3005
  end
1142
3006
  end
1143
3007
 
1144
- # Image context and/or feature-specific parameters.
1145
- class GoogleCloudVisionV1p2beta1ImageContext
1146
- include Google::Apis::Core::Hashable
1147
-
1148
- # Parameters for crop hints annotation request.
1149
- # Corresponds to the JSON property `cropHintsParams`
1150
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsParams]
1151
- attr_accessor :crop_hints_params
1152
-
1153
- # List of languages to use for TEXT_DETECTION. In most cases, an empty value
1154
- # yields the best results since it enables automatic language detection. For
1155
- # languages based on the Latin alphabet, setting `language_hints` is not
1156
- # needed. In rare cases, when the language of the text in the image is known,
1157
- # setting a hint will help get better results (although it will be a
1158
- # significant hindrance if the hint is wrong). Text detection returns an
1159
- # error if one or more of the specified languages is not one of the
1160
- # [supported languages](/vision/docs/languages).
1161
- # Corresponds to the JSON property `languageHints`
1162
- # @return [Array<String>]
1163
- attr_accessor :language_hints
1164
-
1165
- # Rectangle determined by min and max `LatLng` pairs.
1166
- # Corresponds to the JSON property `latLongRect`
1167
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LatLongRect]
1168
- attr_accessor :lat_long_rect
1169
-
1170
- # Parameters for web detection request.
1171
- # Corresponds to the JSON property `webDetectionParams`
1172
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionParams]
1173
- attr_accessor :web_detection_params
1174
-
1175
- def initialize(**args)
1176
- update!(**args)
1177
- end
1178
-
1179
- # Update properties of this object
1180
- def update!(**args)
1181
- @crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params)
1182
- @language_hints = args[:language_hints] if args.key?(:language_hints)
1183
- @lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
1184
- @web_detection_params = args[:web_detection_params] if args.key?(:web_detection_params)
1185
- end
1186
- end
1187
-
1188
3008
  # Stores image properties, such as dominant colors.
1189
- class GoogleCloudVisionV1p2beta1ImageProperties
3009
+ class ImageProperties
1190
3010
  include Google::Apis::Core::Hashable
1191
3011
 
1192
3012
  # Set of dominant colors and their corresponding scores.
1193
3013
  # Corresponds to the JSON property `dominantColors`
1194
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1DominantColorsAnnotation]
3014
+ # @return [Google::Apis::VisionV1p2beta1::DominantColorsAnnotation]
1195
3015
  attr_accessor :dominant_colors
1196
3016
 
1197
3017
  def initialize(**args)
@@ -1204,36 +3024,20 @@ module Google
1204
3024
  end
1205
3025
  end
1206
3026
 
1207
- # External image source (Google Cloud Storage or web URL image location).
1208
- class GoogleCloudVisionV1p2beta1ImageSource
3027
+ # The desired input location and metadata.
3028
+ class InputConfig
1209
3029
  include Google::Apis::Core::Hashable
1210
3030
 
1211
- # **Use `image_uri` instead.**
1212
- # The Google Cloud Storage URI of the form
1213
- # `gs://bucket_name/object_name`. Object versioning is not supported. See
1214
- # [Google Cloud Storage Request
1215
- # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
1216
- # Corresponds to the JSON property `gcsImageUri`
1217
- # @return [String]
1218
- attr_accessor :gcs_image_uri
3031
+ # The Google Cloud Storage location where the input will be read from.
3032
+ # Corresponds to the JSON property `gcsSource`
3033
+ # @return [Google::Apis::VisionV1p2beta1::GcsSource]
3034
+ attr_accessor :gcs_source
1219
3035
 
1220
- # The URI of the source image. Can be either:
1221
- # 1. A Google Cloud Storage URI of the form
1222
- # `gs://bucket_name/object_name`. Object versioning is not supported. See
1223
- # [Google Cloud Storage Request
1224
- # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
1225
- # info.
1226
- # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
1227
- # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
1228
- # completed. Your request may fail if the specified host denies the
1229
- # request (e.g. due to request throttling or DOS prevention), or if Google
1230
- # throttles requests to the site for abuse prevention. You should not
1231
- # depend on externally-hosted images for production applications.
1232
- # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
1233
- # precedence.
1234
- # Corresponds to the JSON property `imageUri`
3036
+ # The type of the file. Currently only "application/pdf" and "image/tiff"
3037
+ # are supported. Wildcards are not supported.
3038
+ # Corresponds to the JSON property `mimeType`
1235
3039
  # @return [String]
1236
- attr_accessor :image_uri
3040
+ attr_accessor :mime_type
1237
3041
 
1238
3042
  def initialize(**args)
1239
3043
  update!(**args)
@@ -1241,25 +3045,26 @@ module Google
1241
3045
 
1242
3046
  # Update properties of this object
1243
3047
  def update!(**args)
1244
- @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
1245
- @image_uri = args[:image_uri] if args.key?(:image_uri)
3048
+ @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
3049
+ @mime_type = args[:mime_type] if args.key?(:mime_type)
1246
3050
  end
1247
3051
  end
1248
3052
 
1249
- # The desired input location and metadata.
1250
- class GoogleCloudVisionV1p2beta1InputConfig
3053
+ # A face-specific landmark (for example, a face feature).
3054
+ class Landmark
1251
3055
  include Google::Apis::Core::Hashable
1252
3056
 
1253
- # The Google Cloud Storage location where the input will be read from.
1254
- # Corresponds to the JSON property `gcsSource`
1255
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsSource]
1256
- attr_accessor :gcs_source
3057
+ # A 3D position in the image, used primarily for Face detection landmarks.
3058
+ # A valid Position must have both x and y coordinates.
3059
+ # The position coordinates are in the same scale as the original image.
3060
+ # Corresponds to the JSON property `position`
3061
+ # @return [Google::Apis::VisionV1p2beta1::Position]
3062
+ attr_accessor :position
1257
3063
 
1258
- # The type of the file. Currently only "application/pdf" and "image/tiff"
1259
- # are supported. Wildcards are not supported.
1260
- # Corresponds to the JSON property `mimeType`
3064
+ # Face landmark type.
3065
+ # Corresponds to the JSON property `type`
1261
3066
  # @return [String]
1262
- attr_accessor :mime_type
3067
+ attr_accessor :type
1263
3068
 
1264
3069
  def initialize(**args)
1265
3070
  update!(**args)
@@ -1267,32 +3072,28 @@ module Google
1267
3072
 
1268
3073
  # Update properties of this object
1269
3074
  def update!(**args)
1270
- @gcs_source = args[:gcs_source] if args.key?(:gcs_source)
1271
- @mime_type = args[:mime_type] if args.key?(:mime_type)
3075
+ @position = args[:position] if args.key?(:position)
3076
+ @type = args[:type] if args.key?(:type)
1272
3077
  end
1273
3078
  end
1274
3079
 
1275
- # Rectangle determined by min and max `LatLng` pairs.
1276
- class GoogleCloudVisionV1p2beta1LatLongRect
3080
+ # An object representing a latitude/longitude pair. This is expressed as a pair
3081
+ # of doubles representing degrees latitude and degrees longitude. Unless
3082
+ # specified otherwise, this must conform to the
3083
+ # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
3084
+ # standard</a>. Values must be within normalized ranges.
3085
+ class LatLng
1277
3086
  include Google::Apis::Core::Hashable
1278
3087
 
1279
- # An object representing a latitude/longitude pair. This is expressed as a pair
1280
- # of doubles representing degrees latitude and degrees longitude. Unless
1281
- # specified otherwise, this must conform to the
1282
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1283
- # standard</a>. Values must be within normalized ranges.
1284
- # Corresponds to the JSON property `maxLatLng`
1285
- # @return [Google::Apis::VisionV1p2beta1::LatLng]
1286
- attr_accessor :max_lat_lng
1287
-
1288
- # An object representing a latitude/longitude pair. This is expressed as a pair
1289
- # of doubles representing degrees latitude and degrees longitude. Unless
1290
- # specified otherwise, this must conform to the
1291
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1292
- # standard</a>. Values must be within normalized ranges.
1293
- # Corresponds to the JSON property `minLatLng`
1294
- # @return [Google::Apis::VisionV1p2beta1::LatLng]
1295
- attr_accessor :min_lat_lng
3088
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
3089
+ # Corresponds to the JSON property `latitude`
3090
+ # @return [Float]
3091
+ attr_accessor :latitude
3092
+
3093
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
3094
+ # Corresponds to the JSON property `longitude`
3095
+ # @return [Float]
3096
+ attr_accessor :longitude
1296
3097
 
1297
3098
  def initialize(**args)
1298
3099
  update!(**args)
@@ -1300,13 +3101,13 @@ module Google
1300
3101
 
1301
3102
  # Update properties of this object
1302
3103
  def update!(**args)
1303
- @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng)
1304
- @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng)
3104
+ @latitude = args[:latitude] if args.key?(:latitude)
3105
+ @longitude = args[:longitude] if args.key?(:longitude)
1305
3106
  end
1306
3107
  end
1307
3108
 
1308
3109
  # Detected entity location information.
1309
- class GoogleCloudVisionV1p2beta1LocationInfo
3110
+ class LocationInfo
1310
3111
  include Google::Apis::Core::Hashable
1311
3112
 
1312
3113
  # An object representing a latitude/longitude pair. This is expressed as a pair
@@ -1331,7 +3132,7 @@ module Google
1331
3132
  # A vertex represents a 2D point in the image.
1332
3133
  # NOTE: the normalized vertex coordinates are relative to the original image
1333
3134
  # and range from 0 to 1.
1334
- class GoogleCloudVisionV1p2beta1NormalizedVertex
3135
+ class NormalizedVertex
1335
3136
  include Google::Apis::Core::Hashable
1336
3137
 
1337
3138
  # X coordinate.
@@ -1355,8 +3156,105 @@ module Google
1355
3156
  end
1356
3157
  end
1357
3158
 
3159
+ # This resource represents a long-running operation that is the result of a
3160
+ # network API call.
3161
+ class Operation
3162
+ include Google::Apis::Core::Hashable
3163
+
3164
+ # If the value is `false`, it means the operation is still in progress.
3165
+ # If `true`, the operation is completed, and either `error` or `response` is
3166
+ # available.
3167
+ # Corresponds to the JSON property `done`
3168
+ # @return [Boolean]
3169
+ attr_accessor :done
3170
+ alias_method :done?, :done
3171
+
3172
+ # The `Status` type defines a logical error model that is suitable for different
3173
+ # programming environments, including REST APIs and RPC APIs. It is used by
3174
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
3175
+ # - Simple to use and understand for most users
3176
+ # - Flexible enough to meet unexpected needs
3177
+ # # Overview
3178
+ # The `Status` message contains three pieces of data: error code, error message,
3179
+ # and error details. The error code should be an enum value of
3180
+ # google.rpc.Code, but it may accept additional error codes if needed. The
3181
+ # error message should be a developer-facing English message that helps
3182
+ # developers *understand* and *resolve* the error. If a localized user-facing
3183
+ # error message is needed, put the localized message in the error details or
3184
+ # localize it in the client. The optional error details may contain arbitrary
3185
+ # information about the error. There is a predefined set of error detail types
3186
+ # in the package `google.rpc` that can be used for common error conditions.
3187
+ # # Language mapping
3188
+ # The `Status` message is the logical representation of the error model, but it
3189
+ # is not necessarily the actual wire format. When the `Status` message is
3190
+ # exposed in different client libraries and different wire protocols, it can be
3191
+ # mapped differently. For example, it will likely be mapped to some exceptions
3192
+ # in Java, but more likely mapped to some error codes in C.
3193
+ # # Other uses
3194
+ # The error model and the `Status` message can be used in a variety of
3195
+ # environments, either with or without APIs, to provide a
3196
+ # consistent developer experience across different environments.
3197
+ # Example uses of this error model include:
3198
+ # - Partial errors. If a service needs to return partial errors to the client,
3199
+ # it may embed the `Status` in the normal response to indicate the partial
3200
+ # errors.
3201
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
3202
+ # have a `Status` message for error reporting.
3203
+ # - Batch operations. If a client uses batch request and batch response, the
3204
+ # `Status` message should be used directly inside batch response, one for
3205
+ # each error sub-response.
3206
+ # - Asynchronous operations. If an API call embeds asynchronous operation
3207
+ # results in its response, the status of those operations should be
3208
+ # represented directly using the `Status` message.
3209
+ # - Logging. If some API errors are stored in logs, the message `Status` could
3210
+ # be used directly after any stripping needed for security/privacy reasons.
3211
+ # Corresponds to the JSON property `error`
3212
+ # @return [Google::Apis::VisionV1p2beta1::Status]
3213
+ attr_accessor :error
3214
+
3215
+ # Service-specific metadata associated with the operation. It typically
3216
+ # contains progress information and common metadata such as create time.
3217
+ # Some services might not provide such metadata. Any method that returns a
3218
+ # long-running operation should document the metadata type, if any.
3219
+ # Corresponds to the JSON property `metadata`
3220
+ # @return [Hash<String,Object>]
3221
+ attr_accessor :metadata
3222
+
3223
+ # The server-assigned name, which is only unique within the same service that
3224
+ # originally returns it. If you use the default HTTP mapping, the
3225
+ # `name` should have the format of `operations/some/unique/name`.
3226
+ # Corresponds to the JSON property `name`
3227
+ # @return [String]
3228
+ attr_accessor :name
3229
+
3230
+ # The normal response of the operation in case of success. If the original
3231
+ # method returns no data on success, such as `Delete`, the response is
3232
+ # `google.protobuf.Empty`. If the original method is standard
3233
+ # `Get`/`Create`/`Update`, the response should be the resource. For other
3234
+ # methods, the response should have the type `XxxResponse`, where `Xxx`
3235
+ # is the original method name. For example, if the original method name
3236
+ # is `TakeSnapshot()`, the inferred response type is
3237
+ # `TakeSnapshotResponse`.
3238
+ # Corresponds to the JSON property `response`
3239
+ # @return [Hash<String,Object>]
3240
+ attr_accessor :response
3241
+
3242
+ def initialize(**args)
3243
+ update!(**args)
3244
+ end
3245
+
3246
+ # Update properties of this object
3247
+ def update!(**args)
3248
+ @done = args[:done] if args.key?(:done)
3249
+ @error = args[:error] if args.key?(:error)
3250
+ @metadata = args[:metadata] if args.key?(:metadata)
3251
+ @name = args[:name] if args.key?(:name)
3252
+ @response = args[:response] if args.key?(:response)
3253
+ end
3254
+ end
3255
+
1358
3256
  # Contains metadata for the BatchAnnotateImages operation.
1359
- class GoogleCloudVisionV1p2beta1OperationMetadata
3257
+ class OperationMetadata
1360
3258
  include Google::Apis::Core::Hashable
1361
3259
 
1362
3260
  # The time when the batch request was received.
@@ -1387,7 +3285,7 @@ module Google
1387
3285
  end
1388
3286
 
1389
3287
  # The desired output location and metadata.
1390
- class GoogleCloudVisionV1p2beta1OutputConfig
3288
+ class OutputConfig
1391
3289
  include Google::Apis::Core::Hashable
1392
3290
 
1393
3291
  # The max number of response protos to put into each output JSON file on
@@ -1405,7 +3303,7 @@ module Google
1405
3303
 
1406
3304
  # The Google Cloud Storage location where the output will be written to.
1407
3305
  # Corresponds to the JSON property `gcsDestination`
1408
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsDestination]
3306
+ # @return [Google::Apis::VisionV1p2beta1::GcsDestination]
1409
3307
  attr_accessor :gcs_destination
1410
3308
 
1411
3309
  def initialize(**args)
@@ -1420,12 +3318,12 @@ module Google
1420
3318
  end
1421
3319
 
1422
3320
  # Detected page from OCR.
1423
- class GoogleCloudVisionV1p2beta1Page
3321
+ class Page
1424
3322
  include Google::Apis::Core::Hashable
1425
3323
 
1426
3324
  # List of blocks of text, images etc on this page.
1427
3325
  # Corresponds to the JSON property `blocks`
1428
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Block>]
3326
+ # @return [Array<Google::Apis::VisionV1p2beta1::Block>]
1429
3327
  attr_accessor :blocks
1430
3328
 
1431
3329
  # Confidence of the OCR results on the page. Range [0, 1].
@@ -1441,7 +3339,7 @@ module Google
1441
3339
 
1442
3340
  # Additional information detected on the structural component.
1443
3341
  # Corresponds to the JSON property `property`
1444
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
3342
+ # @return [Google::Apis::VisionV1p2beta1::TextProperty]
1445
3343
  attr_accessor :property
1446
3344
 
1447
3345
  # Page width. For PDFs the unit is points. For images (including
@@ -1465,12 +3363,12 @@ module Google
1465
3363
  end
1466
3364
 
1467
3365
  # Structural unit of text representing a number of words in certain order.
1468
- class GoogleCloudVisionV1p2beta1Paragraph
3366
+ class Paragraph
1469
3367
  include Google::Apis::Core::Hashable
1470
3368
 
1471
3369
  # A bounding polygon for the detected image annotation.
1472
3370
  # Corresponds to the JSON property `boundingBox`
1473
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
3371
+ # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
1474
3372
  attr_accessor :bounding_box
1475
3373
 
1476
3374
  # Confidence of the OCR results for the paragraph. Range [0, 1].
@@ -1480,12 +3378,12 @@ module Google
1480
3378
 
1481
3379
  # Additional information detected on the structural component.
1482
3380
  # Corresponds to the JSON property `property`
1483
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
3381
+ # @return [Google::Apis::VisionV1p2beta1::TextProperty]
1484
3382
  attr_accessor :property
1485
3383
 
1486
3384
  # List of words in this paragraph.
1487
3385
  # Corresponds to the JSON property `words`
1488
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Word>]
3386
+ # @return [Array<Google::Apis::VisionV1p2beta1::Word>]
1489
3387
  attr_accessor :words
1490
3388
 
1491
3389
  def initialize(**args)
@@ -1504,7 +3402,7 @@ module Google
1504
3402
  # A 3D position in the image, used primarily for Face detection landmarks.
1505
3403
  # A valid Position must have both x and y coordinates.
1506
3404
  # The position coordinates are in the same scale as the original image.
1507
- class GoogleCloudVisionV1p2beta1Position
3405
+ class Position
1508
3406
  include Google::Apis::Core::Hashable
1509
3407
 
1510
3408
  # X coordinate.
@@ -1535,7 +3433,7 @@ module Google
1535
3433
  end
1536
3434
 
1537
3435
  # A `Property` consists of a user-supplied name/value pair.
1538
- class GoogleCloudVisionV1p2beta1Property
3436
+ class Property
1539
3437
  include Google::Apis::Core::Hashable
1540
3438
 
1541
3439
  # Name of the property.
@@ -1568,7 +3466,7 @@ module Google
1568
3466
  # Set of features pertaining to the image, computed by computer vision
1569
3467
  # methods over safe-search verticals (for example, adult, spoof, medical,
1570
3468
  # violence).
1571
- class GoogleCloudVisionV1p2beta1SafeSearchAnnotation
3469
+ class SafeSearchAnnotation
1572
3470
  include Google::Apis::Core::Hashable
1573
3471
 
1574
3472
  # Represents the adult content likelihood for the image. Adult content may
@@ -1617,13 +3515,85 @@ module Google
1617
3515
  end
1618
3516
  end
1619
3517
 
3518
+ # The `Status` type defines a logical error model that is suitable for different
3519
+ # programming environments, including REST APIs and RPC APIs. It is used by
3520
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
3521
+ # - Simple to use and understand for most users
3522
+ # - Flexible enough to meet unexpected needs
3523
+ # # Overview
3524
+ # The `Status` message contains three pieces of data: error code, error message,
3525
+ # and error details. The error code should be an enum value of
3526
+ # google.rpc.Code, but it may accept additional error codes if needed. The
3527
+ # error message should be a developer-facing English message that helps
3528
+ # developers *understand* and *resolve* the error. If a localized user-facing
3529
+ # error message is needed, put the localized message in the error details or
3530
+ # localize it in the client. The optional error details may contain arbitrary
3531
+ # information about the error. There is a predefined set of error detail types
3532
+ # in the package `google.rpc` that can be used for common error conditions.
3533
+ # # Language mapping
3534
+ # The `Status` message is the logical representation of the error model, but it
3535
+ # is not necessarily the actual wire format. When the `Status` message is
3536
+ # exposed in different client libraries and different wire protocols, it can be
3537
+ # mapped differently. For example, it will likely be mapped to some exceptions
3538
+ # in Java, but more likely mapped to some error codes in C.
3539
+ # # Other uses
3540
+ # The error model and the `Status` message can be used in a variety of
3541
+ # environments, either with or without APIs, to provide a
3542
+ # consistent developer experience across different environments.
3543
+ # Example uses of this error model include:
3544
+ # - Partial errors. If a service needs to return partial errors to the client,
3545
+ # it may embed the `Status` in the normal response to indicate the partial
3546
+ # errors.
3547
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
3548
+ # have a `Status` message for error reporting.
3549
+ # - Batch operations. If a client uses batch request and batch response, the
3550
+ # `Status` message should be used directly inside batch response, one for
3551
+ # each error sub-response.
3552
+ # - Asynchronous operations. If an API call embeds asynchronous operation
3553
+ # results in its response, the status of those operations should be
3554
+ # represented directly using the `Status` message.
3555
+ # - Logging. If some API errors are stored in logs, the message `Status` could
3556
+ # be used directly after any stripping needed for security/privacy reasons.
3557
+ class Status
3558
+ include Google::Apis::Core::Hashable
3559
+
3560
+ # The status code, which should be an enum value of google.rpc.Code.
3561
+ # Corresponds to the JSON property `code`
3562
+ # @return [Fixnum]
3563
+ attr_accessor :code
3564
+
3565
+ # A list of messages that carry the error details. There is a common set of
3566
+ # message types for APIs to use.
3567
+ # Corresponds to the JSON property `details`
3568
+ # @return [Array<Hash<String,Object>>]
3569
+ attr_accessor :details
3570
+
3571
+ # A developer-facing error message, which should be in English. Any
3572
+ # user-facing error message should be localized and sent in the
3573
+ # google.rpc.Status.details field, or localized by the client.
3574
+ # Corresponds to the JSON property `message`
3575
+ # @return [String]
3576
+ attr_accessor :message
3577
+
3578
+ def initialize(**args)
3579
+ update!(**args)
3580
+ end
3581
+
3582
+ # Update properties of this object
3583
+ def update!(**args)
3584
+ @code = args[:code] if args.key?(:code)
3585
+ @details = args[:details] if args.key?(:details)
3586
+ @message = args[:message] if args.key?(:message)
3587
+ end
3588
+ end
3589
+
1620
3590
  # A single symbol representation.
1621
- class GoogleCloudVisionV1p2beta1Symbol
3591
+ class Symbol
1622
3592
  include Google::Apis::Core::Hashable
1623
3593
 
1624
3594
  # A bounding polygon for the detected image annotation.
1625
3595
  # Corresponds to the JSON property `boundingBox`
1626
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
3596
+ # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
1627
3597
  attr_accessor :bounding_box
1628
3598
 
1629
3599
  # Confidence of the OCR results for the symbol. Range [0, 1].
@@ -1633,7 +3603,7 @@ module Google
1633
3603
 
1634
3604
  # Additional information detected on the structural component.
1635
3605
  # Corresponds to the JSON property `property`
1636
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
3606
+ # @return [Google::Apis::VisionV1p2beta1::TextProperty]
1637
3607
  attr_accessor :property
1638
3608
 
1639
3609
  # The actual UTF-8 representation of the symbol.
@@ -1661,71 +3631,18 @@ module Google
1661
3631
  # properties. Properties describe detected languages, breaks etc.. Please refer
1662
3632
  # to the TextAnnotation.TextProperty message definition below for more
1663
3633
  # detail.
1664
- class GoogleCloudVisionV1p2beta1TextAnnotation
1665
- include Google::Apis::Core::Hashable
1666
-
1667
- # List of pages detected by OCR.
1668
- # Corresponds to the JSON property `pages`
1669
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Page>]
1670
- attr_accessor :pages
1671
-
1672
- # UTF-8 text detected on the pages.
1673
- # Corresponds to the JSON property `text`
1674
- # @return [String]
1675
- attr_accessor :text
1676
-
1677
- def initialize(**args)
1678
- update!(**args)
1679
- end
1680
-
1681
- # Update properties of this object
1682
- def update!(**args)
1683
- @pages = args[:pages] if args.key?(:pages)
1684
- @text = args[:text] if args.key?(:text)
1685
- end
1686
- end
1687
-
1688
- # Detected start or end of a structural component.
1689
- class GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
1690
- include Google::Apis::Core::Hashable
1691
-
1692
- # True if break prepends the element.
1693
- # Corresponds to the JSON property `isPrefix`
1694
- # @return [Boolean]
1695
- attr_accessor :is_prefix
1696
- alias_method :is_prefix?, :is_prefix
1697
-
1698
- # Detected break type.
1699
- # Corresponds to the JSON property `type`
1700
- # @return [String]
1701
- attr_accessor :type
1702
-
1703
- def initialize(**args)
1704
- update!(**args)
1705
- end
1706
-
1707
- # Update properties of this object
1708
- def update!(**args)
1709
- @is_prefix = args[:is_prefix] if args.key?(:is_prefix)
1710
- @type = args[:type] if args.key?(:type)
1711
- end
1712
- end
1713
-
1714
- # Detected language for a structural component.
1715
- class GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
1716
- include Google::Apis::Core::Hashable
1717
-
1718
- # Confidence of detected language. Range [0, 1].
1719
- # Corresponds to the JSON property `confidence`
1720
- # @return [Float]
1721
- attr_accessor :confidence
3634
+ class TextAnnotation
3635
+ include Google::Apis::Core::Hashable
1722
3636
 
1723
- # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
1724
- # information, see
1725
- # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1726
- # Corresponds to the JSON property `languageCode`
3637
+ # List of pages detected by OCR.
3638
+ # Corresponds to the JSON property `pages`
3639
+ # @return [Array<Google::Apis::VisionV1p2beta1::Page>]
3640
+ attr_accessor :pages
3641
+
3642
+ # UTF-8 text detected on the pages.
3643
+ # Corresponds to the JSON property `text`
1727
3644
  # @return [String]
1728
- attr_accessor :language_code
3645
+ attr_accessor :text
1729
3646
 
1730
3647
  def initialize(**args)
1731
3648
  update!(**args)
@@ -1733,23 +3650,23 @@ module Google
1733
3650
 
1734
3651
  # Update properties of this object
1735
3652
  def update!(**args)
1736
- @confidence = args[:confidence] if args.key?(:confidence)
1737
- @language_code = args[:language_code] if args.key?(:language_code)
3653
+ @pages = args[:pages] if args.key?(:pages)
3654
+ @text = args[:text] if args.key?(:text)
1738
3655
  end
1739
3656
  end
1740
3657
 
1741
3658
  # Additional information detected on the structural component.
1742
- class GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
3659
+ class TextProperty
1743
3660
  include Google::Apis::Core::Hashable
1744
3661
 
1745
3662
  # Detected start or end of a structural component.
1746
3663
  # Corresponds to the JSON property `detectedBreak`
1747
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak]
3664
+ # @return [Google::Apis::VisionV1p2beta1::DetectedBreak]
1748
3665
  attr_accessor :detected_break
1749
3666
 
1750
3667
  # A list of detected languages together with confidence.
1751
3668
  # Corresponds to the JSON property `detectedLanguages`
1752
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage>]
3669
+ # @return [Array<Google::Apis::VisionV1p2beta1::DetectedLanguage>]
1753
3670
  attr_accessor :detected_languages
1754
3671
 
1755
3672
  def initialize(**args)
@@ -1765,7 +3682,7 @@ module Google
1765
3682
 
1766
3683
  # A vertex represents a 2D point in the image.
1767
3684
  # NOTE: the vertex coordinates are in the same scale as the original image.
1768
- class GoogleCloudVisionV1p2beta1Vertex
3685
+ class Vertex
1769
3686
  include Google::Apis::Core::Hashable
1770
3687
 
1771
3688
  # X coordinate.
@@ -1790,40 +3707,40 @@ module Google
1790
3707
  end
1791
3708
 
1792
3709
  # Relevant information for the image from the Internet.
1793
- class GoogleCloudVisionV1p2beta1WebDetection
3710
+ class WebDetection
1794
3711
  include Google::Apis::Core::Hashable
1795
3712
 
1796
3713
  # Best guess text labels for the request image.
1797
3714
  # Corresponds to the JSON property `bestGuessLabels`
1798
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebLabel>]
3715
+ # @return [Array<Google::Apis::VisionV1p2beta1::WebLabel>]
1799
3716
  attr_accessor :best_guess_labels
1800
3717
 
1801
3718
  # Fully matching images from the Internet.
1802
3719
  # Can include resized copies of the query image.
1803
3720
  # Corresponds to the JSON property `fullMatchingImages`
1804
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
3721
+ # @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
1805
3722
  attr_accessor :full_matching_images
1806
3723
 
1807
3724
  # Web pages containing the matching images from the Internet.
1808
3725
  # Corresponds to the JSON property `pagesWithMatchingImages`
1809
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebPage>]
3726
+ # @return [Array<Google::Apis::VisionV1p2beta1::WebPage>]
1810
3727
  attr_accessor :pages_with_matching_images
1811
3728
 
1812
3729
  # Partial matching images from the Internet.
1813
3730
  # Those images are similar enough to share some key-point features. For
1814
3731
  # example an original image will likely have partial matching for its crops.
1815
3732
  # Corresponds to the JSON property `partialMatchingImages`
1816
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
3733
+ # @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
1817
3734
  attr_accessor :partial_matching_images
1818
3735
 
1819
3736
  # The visually similar image results.
1820
3737
  # Corresponds to the JSON property `visuallySimilarImages`
1821
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
3738
+ # @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
1822
3739
  attr_accessor :visually_similar_images
1823
3740
 
1824
3741
  # Deduced entities from similar images on the Internet.
1825
3742
  # Corresponds to the JSON property `webEntities`
1826
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebEntity>]
3743
+ # @return [Array<Google::Apis::VisionV1p2beta1::WebEntity>]
1827
3744
  attr_accessor :web_entities
1828
3745
 
1829
3746
  def initialize(**args)
@@ -1841,28 +3758,8 @@ module Google
1841
3758
  end
1842
3759
  end
1843
3760
 
1844
- # Parameters for web detection request.
1845
- class GoogleCloudVisionV1p2beta1WebDetectionParams
1846
- include Google::Apis::Core::Hashable
1847
-
1848
- # Whether to include results derived from the geo information in the image.
1849
- # Corresponds to the JSON property `includeGeoResults`
1850
- # @return [Boolean]
1851
- attr_accessor :include_geo_results
1852
- alias_method :include_geo_results?, :include_geo_results
1853
-
1854
- def initialize(**args)
1855
- update!(**args)
1856
- end
1857
-
1858
- # Update properties of this object
1859
- def update!(**args)
1860
- @include_geo_results = args[:include_geo_results] if args.key?(:include_geo_results)
1861
- end
1862
- end
1863
-
1864
3761
  # Entity deduced from similar images on the Internet.
1865
- class GoogleCloudVisionV1p2beta1WebDetectionWebEntity
3762
+ class WebEntity
1866
3763
  include Google::Apis::Core::Hashable
1867
3764
 
1868
3765
  # Canonical description of the entity, in English.
@@ -1894,7 +3791,7 @@ module Google
1894
3791
  end
1895
3792
 
1896
3793
  # Metadata for online images.
1897
- class GoogleCloudVisionV1p2beta1WebDetectionWebImage
3794
+ class WebImage
1898
3795
  include Google::Apis::Core::Hashable
1899
3796
 
1900
3797
  # (Deprecated) Overall relevancy score for the image.
@@ -1919,7 +3816,7 @@ module Google
1919
3816
  end
1920
3817
 
1921
3818
  # Label to provide extra metadata for the web detection.
1922
- class GoogleCloudVisionV1p2beta1WebDetectionWebLabel
3819
+ class WebLabel
1923
3820
  include Google::Apis::Core::Hashable
1924
3821
 
1925
3822
  # Label for extra metadata.
@@ -1946,13 +3843,13 @@ module Google
1946
3843
  end
1947
3844
 
1948
3845
  # Metadata for web pages.
1949
- class GoogleCloudVisionV1p2beta1WebDetectionWebPage
3846
+ class WebPage
1950
3847
  include Google::Apis::Core::Hashable
1951
3848
 
1952
3849
  # Fully matching images on the page.
1953
3850
  # Can include resized copies of the query image.
1954
3851
  # Corresponds to the JSON property `fullMatchingImages`
1955
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
3852
+ # @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
1956
3853
  attr_accessor :full_matching_images
1957
3854
 
1958
3855
  # Title for the web page, may contain HTML markups.
@@ -1965,7 +3862,7 @@ module Google
1965
3862
  # example an original image will likely have partial matching for its
1966
3863
  # crops.
1967
3864
  # Corresponds to the JSON property `partialMatchingImages`
1968
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
3865
+ # @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
1969
3866
  attr_accessor :partial_matching_images
1970
3867
 
1971
3868
  # (Deprecated) Overall relevancy score for the web page.
@@ -1993,12 +3890,12 @@ module Google
1993
3890
  end
1994
3891
 
1995
3892
  # A word representation.
1996
- class GoogleCloudVisionV1p2beta1Word
3893
+ class Word
1997
3894
  include Google::Apis::Core::Hashable
1998
3895
 
1999
3896
  # A bounding polygon for the detected image annotation.
2000
3897
  # Corresponds to the JSON property `boundingBox`
2001
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
3898
+ # @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
2002
3899
  attr_accessor :bounding_box
2003
3900
 
2004
3901
  # Confidence of the OCR results for the word. Range [0, 1].
@@ -2008,13 +3905,13 @@ module Google
2008
3905
 
2009
3906
  # Additional information detected on the structural component.
2010
3907
  # Corresponds to the JSON property `property`
2011
- # @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
3908
+ # @return [Google::Apis::VisionV1p2beta1::TextProperty]
2012
3909
  attr_accessor :property
2013
3910
 
2014
3911
  # List of symbols in the word.
2015
3912
  # The order of the symbols follows the natural reading order.
2016
3913
  # Corresponds to the JSON property `symbols`
2017
- # @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Symbol>]
3914
+ # @return [Array<Google::Apis::VisionV1p2beta1::Symbol>]
2018
3915
  attr_accessor :symbols
2019
3916
 
2020
3917
  def initialize(**args)
@@ -2029,204 +3926,6 @@ module Google
2029
3926
  @symbols = args[:symbols] if args.key?(:symbols)
2030
3927
  end
2031
3928
  end
2032
-
2033
- # An object representing a latitude/longitude pair. This is expressed as a pair
2034
- # of doubles representing degrees latitude and degrees longitude. Unless
2035
- # specified otherwise, this must conform to the
2036
- # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2037
- # standard</a>. Values must be within normalized ranges.
2038
- class LatLng
2039
- include Google::Apis::Core::Hashable
2040
-
2041
- # The latitude in degrees. It must be in the range [-90.0, +90.0].
2042
- # Corresponds to the JSON property `latitude`
2043
- # @return [Float]
2044
- attr_accessor :latitude
2045
-
2046
- # The longitude in degrees. It must be in the range [-180.0, +180.0].
2047
- # Corresponds to the JSON property `longitude`
2048
- # @return [Float]
2049
- attr_accessor :longitude
2050
-
2051
- def initialize(**args)
2052
- update!(**args)
2053
- end
2054
-
2055
- # Update properties of this object
2056
- def update!(**args)
2057
- @latitude = args[:latitude] if args.key?(:latitude)
2058
- @longitude = args[:longitude] if args.key?(:longitude)
2059
- end
2060
- end
2061
-
2062
- # This resource represents a long-running operation that is the result of a
2063
- # network API call.
2064
- class Operation
2065
- include Google::Apis::Core::Hashable
2066
-
2067
- # If the value is `false`, it means the operation is still in progress.
2068
- # If `true`, the operation is completed, and either `error` or `response` is
2069
- # available.
2070
- # Corresponds to the JSON property `done`
2071
- # @return [Boolean]
2072
- attr_accessor :done
2073
- alias_method :done?, :done
2074
-
2075
- # The `Status` type defines a logical error model that is suitable for different
2076
- # programming environments, including REST APIs and RPC APIs. It is used by
2077
- # [gRPC](https://github.com/grpc). The error model is designed to be:
2078
- # - Simple to use and understand for most users
2079
- # - Flexible enough to meet unexpected needs
2080
- # # Overview
2081
- # The `Status` message contains three pieces of data: error code, error message,
2082
- # and error details. The error code should be an enum value of
2083
- # google.rpc.Code, but it may accept additional error codes if needed. The
2084
- # error message should be a developer-facing English message that helps
2085
- # developers *understand* and *resolve* the error. If a localized user-facing
2086
- # error message is needed, put the localized message in the error details or
2087
- # localize it in the client. The optional error details may contain arbitrary
2088
- # information about the error. There is a predefined set of error detail types
2089
- # in the package `google.rpc` that can be used for common error conditions.
2090
- # # Language mapping
2091
- # The `Status` message is the logical representation of the error model, but it
2092
- # is not necessarily the actual wire format. When the `Status` message is
2093
- # exposed in different client libraries and different wire protocols, it can be
2094
- # mapped differently. For example, it will likely be mapped to some exceptions
2095
- # in Java, but more likely mapped to some error codes in C.
2096
- # # Other uses
2097
- # The error model and the `Status` message can be used in a variety of
2098
- # environments, either with or without APIs, to provide a
2099
- # consistent developer experience across different environments.
2100
- # Example uses of this error model include:
2101
- # - Partial errors. If a service needs to return partial errors to the client,
2102
- # it may embed the `Status` in the normal response to indicate the partial
2103
- # errors.
2104
- # - Workflow errors. A typical workflow has multiple steps. Each step may
2105
- # have a `Status` message for error reporting.
2106
- # - Batch operations. If a client uses batch request and batch response, the
2107
- # `Status` message should be used directly inside batch response, one for
2108
- # each error sub-response.
2109
- # - Asynchronous operations. If an API call embeds asynchronous operation
2110
- # results in its response, the status of those operations should be
2111
- # represented directly using the `Status` message.
2112
- # - Logging. If some API errors are stored in logs, the message `Status` could
2113
- # be used directly after any stripping needed for security/privacy reasons.
2114
- # Corresponds to the JSON property `error`
2115
- # @return [Google::Apis::VisionV1p2beta1::Status]
2116
- attr_accessor :error
2117
-
2118
- # Service-specific metadata associated with the operation. It typically
2119
- # contains progress information and common metadata such as create time.
2120
- # Some services might not provide such metadata. Any method that returns a
2121
- # long-running operation should document the metadata type, if any.
2122
- # Corresponds to the JSON property `metadata`
2123
- # @return [Hash<String,Object>]
2124
- attr_accessor :metadata
2125
-
2126
- # The server-assigned name, which is only unique within the same service that
2127
- # originally returns it. If you use the default HTTP mapping, the
2128
- # `name` should have the format of `operations/some/unique/name`.
2129
- # Corresponds to the JSON property `name`
2130
- # @return [String]
2131
- attr_accessor :name
2132
-
2133
- # The normal response of the operation in case of success. If the original
2134
- # method returns no data on success, such as `Delete`, the response is
2135
- # `google.protobuf.Empty`. If the original method is standard
2136
- # `Get`/`Create`/`Update`, the response should be the resource. For other
2137
- # methods, the response should have the type `XxxResponse`, where `Xxx`
2138
- # is the original method name. For example, if the original method name
2139
- # is `TakeSnapshot()`, the inferred response type is
2140
- # `TakeSnapshotResponse`.
2141
- # Corresponds to the JSON property `response`
2142
- # @return [Hash<String,Object>]
2143
- attr_accessor :response
2144
-
2145
- def initialize(**args)
2146
- update!(**args)
2147
- end
2148
-
2149
- # Update properties of this object
2150
- def update!(**args)
2151
- @done = args[:done] if args.key?(:done)
2152
- @error = args[:error] if args.key?(:error)
2153
- @metadata = args[:metadata] if args.key?(:metadata)
2154
- @name = args[:name] if args.key?(:name)
2155
- @response = args[:response] if args.key?(:response)
2156
- end
2157
- end
2158
-
2159
- # The `Status` type defines a logical error model that is suitable for different
2160
- # programming environments, including REST APIs and RPC APIs. It is used by
2161
- # [gRPC](https://github.com/grpc). The error model is designed to be:
2162
- # - Simple to use and understand for most users
2163
- # - Flexible enough to meet unexpected needs
2164
- # # Overview
2165
- # The `Status` message contains three pieces of data: error code, error message,
2166
- # and error details. The error code should be an enum value of
2167
- # google.rpc.Code, but it may accept additional error codes if needed. The
2168
- # error message should be a developer-facing English message that helps
2169
- # developers *understand* and *resolve* the error. If a localized user-facing
2170
- # error message is needed, put the localized message in the error details or
2171
- # localize it in the client. The optional error details may contain arbitrary
2172
- # information about the error. There is a predefined set of error detail types
2173
- # in the package `google.rpc` that can be used for common error conditions.
2174
- # # Language mapping
2175
- # The `Status` message is the logical representation of the error model, but it
2176
- # is not necessarily the actual wire format. When the `Status` message is
2177
- # exposed in different client libraries and different wire protocols, it can be
2178
- # mapped differently. For example, it will likely be mapped to some exceptions
2179
- # in Java, but more likely mapped to some error codes in C.
2180
- # # Other uses
2181
- # The error model and the `Status` message can be used in a variety of
2182
- # environments, either with or without APIs, to provide a
2183
- # consistent developer experience across different environments.
2184
- # Example uses of this error model include:
2185
- # - Partial errors. If a service needs to return partial errors to the client,
2186
- # it may embed the `Status` in the normal response to indicate the partial
2187
- # errors.
2188
- # - Workflow errors. A typical workflow has multiple steps. Each step may
2189
- # have a `Status` message for error reporting.
2190
- # - Batch operations. If a client uses batch request and batch response, the
2191
- # `Status` message should be used directly inside batch response, one for
2192
- # each error sub-response.
2193
- # - Asynchronous operations. If an API call embeds asynchronous operation
2194
- # results in its response, the status of those operations should be
2195
- # represented directly using the `Status` message.
2196
- # - Logging. If some API errors are stored in logs, the message `Status` could
2197
- # be used directly after any stripping needed for security/privacy reasons.
2198
- class Status
2199
- include Google::Apis::Core::Hashable
2200
-
2201
- # The status code, which should be an enum value of google.rpc.Code.
2202
- # Corresponds to the JSON property `code`
2203
- # @return [Fixnum]
2204
- attr_accessor :code
2205
-
2206
- # A list of messages that carry the error details. There is a common set of
2207
- # message types for APIs to use.
2208
- # Corresponds to the JSON property `details`
2209
- # @return [Array<Hash<String,Object>>]
2210
- attr_accessor :details
2211
-
2212
- # A developer-facing error message, which should be in English. Any
2213
- # user-facing error message should be localized and sent in the
2214
- # google.rpc.Status.details field, or localized by the client.
2215
- # Corresponds to the JSON property `message`
2216
- # @return [String]
2217
- attr_accessor :message
2218
-
2219
- def initialize(**args)
2220
- update!(**args)
2221
- end
2222
-
2223
- # Update properties of this object
2224
- def update!(**args)
2225
- @code = args[:code] if args.key?(:code)
2226
- @details = args[:details] if args.key?(:details)
2227
- @message = args[:message] if args.key?(:message)
2228
- end
2229
- end
2230
3929
  end
2231
3930
  end
2232
3931
  end