google-cloud-vision-v1 0.1.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +6 -6
  3. data/README.md +48 -1
  4. data/lib/google-cloud-vision-v1.rb +21 -1
  5. data/lib/google/cloud/vision/v1.rb +16 -0
  6. data/lib/google/cloud/vision/v1/image_annotator.rb +33 -2
  7. data/lib/google/cloud/vision/v1/image_annotator/client.rb +154 -150
  8. data/lib/google/cloud/vision/v1/image_annotator/credentials.rb +1 -1
  9. data/lib/google/cloud/vision/v1/image_annotator/operations.rb +139 -127
  10. data/lib/google/cloud/vision/v1/image_annotator/paths.rb +3 -3
  11. data/lib/google/cloud/vision/v1/product_search.rb +44 -2
  12. data/lib/google/cloud/vision/v1/product_search/client.rb +530 -539
  13. data/lib/google/cloud/vision/v1/product_search/credentials.rb +1 -1
  14. data/lib/google/cloud/vision/v1/product_search/operations.rb +139 -127
  15. data/lib/google/cloud/vision/v1/product_search/paths.rb +12 -12
  16. data/lib/google/cloud/vision/v1/version.rb +1 -1
  17. data/proto_docs/google/api/resource.rb +12 -12
  18. data/proto_docs/google/cloud/vision/v1/geometry.rb +17 -17
  19. data/proto_docs/google/cloud/vision/v1/image_annotator.rb +204 -204
  20. data/proto_docs/google/cloud/vision/v1/product_search.rb +28 -28
  21. data/proto_docs/google/cloud/vision/v1/product_search_service.rb +144 -144
  22. data/proto_docs/google/cloud/vision/v1/text_annotation.rb +49 -49
  23. data/proto_docs/google/cloud/vision/v1/web_detection.rb +28 -28
  24. data/proto_docs/google/longrunning/operations.rb +30 -30
  25. data/proto_docs/google/protobuf/any.rb +4 -4
  26. data/proto_docs/google/protobuf/empty.rb +2 -2
  27. data/proto_docs/google/protobuf/field_mask.rb +3 -3
  28. data/proto_docs/google/protobuf/timestamp.rb +4 -4
  29. data/proto_docs/google/protobuf/wrappers.rb +27 -27
  30. data/proto_docs/google/rpc/status.rb +6 -6
  31. data/proto_docs/google/type/color.rb +6 -6
  32. data/proto_docs/google/type/latlng.rb +4 -4
  33. metadata +32 -5
  34. data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -34,9 +34,9 @@ module Google
34
34
  # @param project [String]
35
35
  # @param location [String]
36
36
  #
37
- # @return [String]
37
+ # @return [::String]
38
38
  def location_path project:, location:
39
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
40
 
41
41
  "projects/#{project}/locations/#{location}"
42
42
  end
@@ -52,10 +52,10 @@ module Google
52
52
  # @param location [String]
53
53
  # @param product [String]
54
54
  #
55
- # @return [String]
55
+ # @return [::String]
56
56
  def product_path project:, location:, product:
57
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
58
- raise ArgumentError, "location cannot contain /" if location.to_s.include? "/"
57
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
58
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
59
59
 
60
60
  "projects/#{project}/locations/#{location}/products/#{product}"
61
61
  end
@@ -71,10 +71,10 @@ module Google
71
71
  # @param location [String]
72
72
  # @param product_set [String]
73
73
  #
74
- # @return [String]
74
+ # @return [::String]
75
75
  def product_set_path project:, location:, product_set:
76
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
77
- raise ArgumentError, "location cannot contain /" if location.to_s.include? "/"
76
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
77
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
78
78
 
79
79
  "projects/#{project}/locations/#{location}/productSets/#{product_set}"
80
80
  end
@@ -91,11 +91,11 @@ module Google
91
91
  # @param product [String]
92
92
  # @param reference_image [String]
93
93
  #
94
- # @return [String]
94
+ # @return [::String]
95
95
  def reference_image_path project:, location:, product:, reference_image:
96
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
97
- raise ArgumentError, "location cannot contain /" if location.to_s.include? "/"
98
- raise ArgumentError, "product cannot contain /" if product.to_s.include? "/"
96
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
97
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
98
+ raise ::ArgumentError, "product cannot contain /" if product.to_s.include? "/"
99
99
 
100
100
  "projects/#{project}/locations/#{location}/products/#{product}/referenceImages/#{reference_image}"
101
101
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Vision
23
23
  module V1
24
- VERSION = "0.1.2"
24
+ VERSION = "0.2.1"
25
25
  end
26
26
  end
27
27
  end
@@ -128,7 +128,7 @@ module Google
128
128
  # - pattern: "shelves/{shelf}"
129
129
  # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
130
  # @!attribute [rw] type
131
- # @return [String]
131
+ # @return [::String]
132
132
  # The resource type. It must be in the format of
133
133
  # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
134
  # singular and must not include version numbers.
@@ -140,7 +140,7 @@ module Google
140
140
  # should use PascalCase (UpperCamelCase). The maximum number of
141
141
  # characters allowed for the `resource_type_kind` is 100.
142
142
  # @!attribute [rw] pattern
143
- # @return [Array<String>]
143
+ # @return [::Array<::String>]
144
144
  # Optional. The relative resource name pattern associated with this resource
145
145
  # type. The DNS prefix of the full resource name shouldn't be specified here.
146
146
  #
@@ -161,11 +161,11 @@ module Google
161
161
  # the same component name (e.g. "project") refers to IDs of the same
162
162
  # type of resource.
163
163
  # @!attribute [rw] name_field
164
- # @return [String]
164
+ # @return [::String]
165
165
  # Optional. The field on the resource that designates the resource name
166
166
  # field. If omitted, this is assumed to be "name".
167
167
  # @!attribute [rw] history
168
- # @return [Google::Api::ResourceDescriptor::History]
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
169
  # Optional. The historical or future-looking state of the resource pattern.
170
170
  #
171
171
  # Example:
@@ -182,19 +182,19 @@ module Google
182
182
  # };
183
183
  # }
184
184
  # @!attribute [rw] plural
185
- # @return [String]
185
+ # @return [::String]
186
186
  # The plural name used in the resource name, such as 'projects' for
187
187
  # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
188
  # field in k8s CRD spec
189
189
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
190
190
  # @!attribute [rw] singular
191
- # @return [String]
191
+ # @return [::String]
192
192
  # The same concept of the `singular` field in k8s CRD spec
193
193
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
194
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
195
195
  class ResourceDescriptor
196
- include Google::Protobuf::MessageExts
197
- extend Google::Protobuf::MessageExts::ClassMethods
196
+ include ::Google::Protobuf::MessageExts
197
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
198
 
199
199
  # A description of the historical or future-looking state of the
200
200
  # resource pattern.
@@ -216,7 +216,7 @@ module Google
216
216
  # Defines a proto annotation that describes a string field that refers to
217
217
  # an API resource.
218
218
  # @!attribute [rw] type
219
- # @return [String]
219
+ # @return [::String]
220
220
  # The resource type that the annotated field references.
221
221
  #
222
222
  # Example:
@@ -227,7 +227,7 @@ module Google
227
227
  # }];
228
228
  # }
229
229
  # @!attribute [rw] child_type
230
- # @return [String]
230
+ # @return [::String]
231
231
  # The resource type of a child collection that the annotated field
232
232
  # references. This is useful for annotating the `parent` field that
233
233
  # doesn't have a fixed resource type.
@@ -240,8 +240,8 @@ module Google
240
240
  # };
241
241
  # }
242
242
  class ResourceReference
243
- include Google::Protobuf::MessageExts
244
- extend Google::Protobuf::MessageExts::ClassMethods
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
245
  end
246
246
  end
247
247
  end
@@ -24,57 +24,57 @@ module Google
24
24
  # A vertex represents a 2D point in the image.
25
25
  # NOTE: the vertex coordinates are in the same scale as the original image.
26
26
  # @!attribute [rw] x
27
- # @return [Integer]
27
+ # @return [::Integer]
28
28
  # X coordinate.
29
29
  # @!attribute [rw] y
30
- # @return [Integer]
30
+ # @return [::Integer]
31
31
  # Y coordinate.
32
32
  class Vertex
33
- include Google::Protobuf::MessageExts
34
- extend Google::Protobuf::MessageExts::ClassMethods
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
35
  end
36
36
 
37
37
  # A vertex represents a 2D point in the image.
38
38
  # NOTE: the normalized vertex coordinates are relative to the original image
39
39
  # and range from 0 to 1.
40
40
  # @!attribute [rw] x
41
- # @return [Float]
41
+ # @return [::Float]
42
42
  # X coordinate.
43
43
  # @!attribute [rw] y
44
- # @return [Float]
44
+ # @return [::Float]
45
45
  # Y coordinate.
46
46
  class NormalizedVertex
47
- include Google::Protobuf::MessageExts
48
- extend Google::Protobuf::MessageExts::ClassMethods
47
+ include ::Google::Protobuf::MessageExts
48
+ extend ::Google::Protobuf::MessageExts::ClassMethods
49
49
  end
50
50
 
51
51
  # A bounding polygon for the detected image annotation.
52
52
  # @!attribute [rw] vertices
53
- # @return [Array<Google::Cloud::Vision::V1::Vertex>]
53
+ # @return [::Array<::Google::Cloud::Vision::V1::Vertex>]
54
54
  # The bounding polygon vertices.
55
55
  # @!attribute [rw] normalized_vertices
56
- # @return [Array<Google::Cloud::Vision::V1::NormalizedVertex>]
56
+ # @return [::Array<::Google::Cloud::Vision::V1::NormalizedVertex>]
57
57
  # The bounding polygon normalized vertices.
58
58
  class BoundingPoly
59
- include Google::Protobuf::MessageExts
60
- extend Google::Protobuf::MessageExts::ClassMethods
59
+ include ::Google::Protobuf::MessageExts
60
+ extend ::Google::Protobuf::MessageExts::ClassMethods
61
61
  end
62
62
 
63
63
  # A 3D position in the image, used primarily for Face detection landmarks.
64
64
  # A valid Position must have both x and y coordinates.
65
65
  # The position coordinates are in the same scale as the original image.
66
66
  # @!attribute [rw] x
67
- # @return [Float]
67
+ # @return [::Float]
68
68
  # X coordinate.
69
69
  # @!attribute [rw] y
70
- # @return [Float]
70
+ # @return [::Float]
71
71
  # Y coordinate.
72
72
  # @!attribute [rw] z
73
- # @return [Float]
73
+ # @return [::Float]
74
74
  # Z coordinate (or depth).
75
75
  class Position
76
- include Google::Protobuf::MessageExts
77
- extend Google::Protobuf::MessageExts::ClassMethods
76
+ include ::Google::Protobuf::MessageExts
77
+ extend ::Google::Protobuf::MessageExts::ClassMethods
78
78
  end
79
79
  end
80
80
  end
@@ -25,20 +25,20 @@ module Google
25
25
  # number of results to return for that type. Multiple `Feature` objects can
26
26
  # be specified in the `features` list.
27
27
  # @!attribute [rw] type
28
- # @return [Google::Cloud::Vision::V1::Feature::Type]
28
+ # @return [::Google::Cloud::Vision::V1::Feature::Type]
29
29
  # The feature type.
30
30
  # @!attribute [rw] max_results
31
- # @return [Integer]
31
+ # @return [::Integer]
32
32
  # Maximum number of results of this type. Does not apply to
33
33
  # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
34
34
  # @!attribute [rw] model
35
- # @return [String]
35
+ # @return [::String]
36
36
  # Model to use for the feature.
37
37
  # Supported values: "builtin/stable" (the default if unset) and
38
38
  # "builtin/latest".
39
39
  class Feature
40
- include Google::Protobuf::MessageExts
41
- extend Google::Protobuf::MessageExts::ClassMethods
40
+ include ::Google::Protobuf::MessageExts
41
+ extend ::Google::Protobuf::MessageExts::ClassMethods
42
42
 
43
43
  # Type of Google Cloud Vision API feature to be extracted.
44
44
  module Type
@@ -90,7 +90,7 @@ module Google
90
90
 
91
91
  # External image source (Google Cloud Storage or web URL image location).
92
92
  # @!attribute [rw] gcs_image_uri
93
- # @return [String]
93
+ # @return [::String]
94
94
  # **Use `image_uri` instead.**
95
95
  #
96
96
  # The Google Cloud Storage URI of the form
@@ -98,7 +98,7 @@ module Google
98
98
  # [Google Cloud Storage Request
99
99
  # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
100
100
  # @!attribute [rw] image_uri
101
- # @return [String]
101
+ # @return [::String]
102
102
  # The URI of the source image. Can be either:
103
103
  #
104
104
  # 1. A Google Cloud Storage URI of the form
@@ -117,29 +117,29 @@ module Google
117
117
  # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
118
118
  # precedence.
119
119
  class ImageSource
120
- include Google::Protobuf::MessageExts
121
- extend Google::Protobuf::MessageExts::ClassMethods
120
+ include ::Google::Protobuf::MessageExts
121
+ extend ::Google::Protobuf::MessageExts::ClassMethods
122
122
  end
123
123
 
124
124
  # Client image to perform Google Cloud Vision API tasks over.
125
125
  # @!attribute [rw] content
126
- # @return [String]
126
+ # @return [::String]
127
127
  # Image content, represented as a stream of bytes.
128
128
  # Note: As with all `bytes` fields, protobuffers use a pure binary
129
129
  # representation, whereas JSON representations use base64.
130
130
  # @!attribute [rw] source
131
- # @return [Google::Cloud::Vision::V1::ImageSource]
131
+ # @return [::Google::Cloud::Vision::V1::ImageSource]
132
132
  # Google Cloud Storage image location, or publicly-accessible image
133
133
  # URL. If both `content` and `source` are provided for an image, `content`
134
134
  # takes precedence and is used to perform the image annotation request.
135
135
  class Image
136
- include Google::Protobuf::MessageExts
137
- extend Google::Protobuf::MessageExts::ClassMethods
136
+ include ::Google::Protobuf::MessageExts
137
+ extend ::Google::Protobuf::MessageExts::ClassMethods
138
138
  end
139
139
 
140
140
  # A face annotation object contains the results of face detection.
141
141
  # @!attribute [rw] bounding_poly
142
- # @return [Google::Cloud::Vision::V1::BoundingPoly]
142
+ # @return [::Google::Cloud::Vision::V1::BoundingPoly]
143
143
  # The bounding polygon around the face. The coordinates of the bounding box
144
144
  # are in the original image's scale.
145
145
  # The bounding box is computed to "frame" the face in accordance with human
@@ -148,7 +148,7 @@ module Google
148
148
  # `BoundingPoly` (the polygon will be unbounded) if only a partial face
149
149
  # appears in the image to be annotated.
150
150
  # @!attribute [rw] fd_bounding_poly
151
- # @return [Google::Cloud::Vision::V1::BoundingPoly]
151
+ # @return [::Google::Cloud::Vision::V1::BoundingPoly]
152
152
  # The `fd_bounding_poly` bounding polygon is tighter than the
153
153
  # `boundingPoly`, and encloses only the skin part of the face. Typically, it
154
154
  # is used to eliminate the face from any image analysis that detects the
@@ -156,63 +156,63 @@ module Google
156
156
  # landmarker results, only on the initial face detection, hence
157
157
  # the <code>fd</code> (face detection) prefix.
158
158
  # @!attribute [rw] landmarks
159
- # @return [Array<Google::Cloud::Vision::V1::FaceAnnotation::Landmark>]
159
+ # @return [::Array<::Google::Cloud::Vision::V1::FaceAnnotation::Landmark>]
160
160
  # Detected face landmarks.
161
161
  # @!attribute [rw] roll_angle
162
- # @return [Float]
162
+ # @return [::Float]
163
163
  # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
164
164
  # of the face relative to the image vertical about the axis perpendicular to
165
165
  # the face. Range [-180,180].
166
166
  # @!attribute [rw] pan_angle
167
- # @return [Float]
167
+ # @return [::Float]
168
168
  # Yaw angle, which indicates the leftward/rightward angle that the face is
169
169
  # pointing relative to the vertical plane perpendicular to the image. Range
170
170
  # [-180,180].
171
171
  # @!attribute [rw] tilt_angle
172
- # @return [Float]
172
+ # @return [::Float]
173
173
  # Pitch angle, which indicates the upwards/downwards angle that the face is
174
174
  # pointing relative to the image's horizontal plane. Range [-180,180].
175
175
  # @!attribute [rw] detection_confidence
176
- # @return [Float]
176
+ # @return [::Float]
177
177
  # Detection confidence. Range [0, 1].
178
178
  # @!attribute [rw] landmarking_confidence
179
- # @return [Float]
179
+ # @return [::Float]
180
180
  # Face landmarking confidence. Range [0, 1].
181
181
  # @!attribute [rw] joy_likelihood
182
- # @return [Google::Cloud::Vision::V1::Likelihood]
182
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
183
183
  # Joy likelihood.
184
184
  # @!attribute [rw] sorrow_likelihood
185
- # @return [Google::Cloud::Vision::V1::Likelihood]
185
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
186
186
  # Sorrow likelihood.
187
187
  # @!attribute [rw] anger_likelihood
188
- # @return [Google::Cloud::Vision::V1::Likelihood]
188
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
189
189
  # Anger likelihood.
190
190
  # @!attribute [rw] surprise_likelihood
191
- # @return [Google::Cloud::Vision::V1::Likelihood]
191
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
192
192
  # Surprise likelihood.
193
193
  # @!attribute [rw] under_exposed_likelihood
194
- # @return [Google::Cloud::Vision::V1::Likelihood]
194
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
195
195
  # Under-exposed likelihood.
196
196
  # @!attribute [rw] blurred_likelihood
197
- # @return [Google::Cloud::Vision::V1::Likelihood]
197
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
198
198
  # Blurred likelihood.
199
199
  # @!attribute [rw] headwear_likelihood
200
- # @return [Google::Cloud::Vision::V1::Likelihood]
200
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
201
201
  # Headwear likelihood.
202
202
  class FaceAnnotation
203
- include Google::Protobuf::MessageExts
204
- extend Google::Protobuf::MessageExts::ClassMethods
203
+ include ::Google::Protobuf::MessageExts
204
+ extend ::Google::Protobuf::MessageExts::ClassMethods
205
205
 
206
206
  # A face-specific landmark (for example, a face feature).
207
207
  # @!attribute [rw] type
208
- # @return [Google::Cloud::Vision::V1::FaceAnnotation::Landmark::Type]
208
+ # @return [::Google::Cloud::Vision::V1::FaceAnnotation::Landmark::Type]
209
209
  # Face landmark type.
210
210
  # @!attribute [rw] position
211
- # @return [Google::Cloud::Vision::V1::Position]
211
+ # @return [::Google::Cloud::Vision::V1::Position]
212
212
  # Face landmark position.
213
213
  class Landmark
214
- include Google::Protobuf::MessageExts
215
- extend Google::Protobuf::MessageExts::ClassMethods
214
+ include ::Google::Protobuf::MessageExts
215
+ extend ::Google::Protobuf::MessageExts::ClassMethods
216
216
 
217
217
  # Face landmark (feature) type.
218
218
  # Left and right are defined from the vantage of the viewer of the image
@@ -329,231 +329,231 @@ module Google
329
329
 
330
330
  # Detected entity location information.
331
331
  # @!attribute [rw] lat_lng
332
- # @return [Google::Type::LatLng]
332
+ # @return [::Google::Type::LatLng]
333
333
  # lat/long location coordinates.
334
334
  class LocationInfo
335
- include Google::Protobuf::MessageExts
336
- extend Google::Protobuf::MessageExts::ClassMethods
335
+ include ::Google::Protobuf::MessageExts
336
+ extend ::Google::Protobuf::MessageExts::ClassMethods
337
337
  end
338
338
 
339
339
  # A `Property` consists of a user-supplied name/value pair.
340
340
  # @!attribute [rw] name
341
- # @return [String]
341
+ # @return [::String]
342
342
  # Name of the property.
343
343
  # @!attribute [rw] value
344
- # @return [String]
344
+ # @return [::String]
345
345
  # Value of the property.
346
346
  # @!attribute [rw] uint64_value
347
- # @return [Integer]
347
+ # @return [::Integer]
348
348
  # Value of numeric properties.
349
349
  class Property
350
- include Google::Protobuf::MessageExts
351
- extend Google::Protobuf::MessageExts::ClassMethods
350
+ include ::Google::Protobuf::MessageExts
351
+ extend ::Google::Protobuf::MessageExts::ClassMethods
352
352
  end
353
353
 
354
354
  # Set of detected entity features.
355
355
  # @!attribute [rw] mid
356
- # @return [String]
356
+ # @return [::String]
357
357
  # Opaque entity ID. Some IDs may be available in
358
358
  # [Google Knowledge Graph Search
359
359
  # API](https://developers.google.com/knowledge-graph/).
360
360
  # @!attribute [rw] locale
361
- # @return [String]
361
+ # @return [::String]
362
362
  # The language code for the locale in which the entity textual
363
363
  # `description` is expressed.
364
364
  # @!attribute [rw] description
365
- # @return [String]
365
+ # @return [::String]
366
366
  # Entity textual description, expressed in its `locale` language.
367
367
  # @!attribute [rw] score
368
- # @return [Float]
368
+ # @return [::Float]
369
369
  # Overall score of the result. Range [0, 1].
370
370
  # @!attribute [rw] confidence
371
- # @return [Float]
371
+ # @return [::Float]
372
372
  # **Deprecated. Use `score` instead.**
373
373
  # The accuracy of the entity detection in an image.
374
374
  # For example, for an image in which the "Eiffel Tower" entity is detected,
375
375
  # this field represents the confidence that there is a tower in the query
376
376
  # image. Range [0, 1].
377
377
  # @!attribute [rw] topicality
378
- # @return [Float]
378
+ # @return [::Float]
379
379
  # The relevancy of the ICA (Image Content Annotation) label to the
380
380
  # image. For example, the relevancy of "tower" is likely higher to an image
381
381
  # containing the detected "Eiffel Tower" than to an image containing a
382
382
  # detected distant towering building, even though the confidence that
383
383
  # there is a tower in each image may be the same. Range [0, 1].
384
384
  # @!attribute [rw] bounding_poly
385
- # @return [Google::Cloud::Vision::V1::BoundingPoly]
385
+ # @return [::Google::Cloud::Vision::V1::BoundingPoly]
386
386
  # Image region to which this entity belongs. Not produced
387
387
  # for `LABEL_DETECTION` features.
388
388
  # @!attribute [rw] locations
389
- # @return [Array<Google::Cloud::Vision::V1::LocationInfo>]
389
+ # @return [::Array<::Google::Cloud::Vision::V1::LocationInfo>]
390
390
  # The location information for the detected entity. Multiple
391
391
  # `LocationInfo` elements can be present because one location may
392
392
  # indicate the location of the scene in the image, and another location
393
393
  # may indicate the location of the place where the image was taken.
394
394
  # Location information is usually present for landmarks.
395
395
  # @!attribute [rw] properties
396
- # @return [Array<Google::Cloud::Vision::V1::Property>]
396
+ # @return [::Array<::Google::Cloud::Vision::V1::Property>]
397
397
  # Some entities may have optional user-supplied `Property` (name/value)
398
398
  # fields, such a score or string that qualifies the entity.
399
399
  class EntityAnnotation
400
- include Google::Protobuf::MessageExts
401
- extend Google::Protobuf::MessageExts::ClassMethods
400
+ include ::Google::Protobuf::MessageExts
401
+ extend ::Google::Protobuf::MessageExts::ClassMethods
402
402
  end
403
403
 
404
404
  # Set of detected objects with bounding boxes.
405
405
  # @!attribute [rw] mid
406
- # @return [String]
406
+ # @return [::String]
407
407
  # Object ID that should align with EntityAnnotation mid.
408
408
  # @!attribute [rw] language_code
409
- # @return [String]
409
+ # @return [::String]
410
410
  # The BCP-47 language code, such as "en-US" or "sr-Latn". For more
411
411
  # information, see
412
412
  # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
413
413
  # @!attribute [rw] name
414
- # @return [String]
414
+ # @return [::String]
415
415
  # Object name, expressed in its `language_code` language.
416
416
  # @!attribute [rw] score
417
- # @return [Float]
417
+ # @return [::Float]
418
418
  # Score of the result. Range [0, 1].
419
419
  # @!attribute [rw] bounding_poly
420
- # @return [Google::Cloud::Vision::V1::BoundingPoly]
420
+ # @return [::Google::Cloud::Vision::V1::BoundingPoly]
421
421
  # Image region to which this object belongs. This must be populated.
422
422
  class LocalizedObjectAnnotation
423
- include Google::Protobuf::MessageExts
424
- extend Google::Protobuf::MessageExts::ClassMethods
423
+ include ::Google::Protobuf::MessageExts
424
+ extend ::Google::Protobuf::MessageExts::ClassMethods
425
425
  end
426
426
 
427
427
  # Set of features pertaining to the image, computed by computer vision
428
428
  # methods over safe-search verticals (for example, adult, spoof, medical,
429
429
  # violence).
430
430
  # @!attribute [rw] adult
431
- # @return [Google::Cloud::Vision::V1::Likelihood]
431
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
432
432
  # Represents the adult content likelihood for the image. Adult content may
433
433
  # contain elements such as nudity, pornographic images or cartoons, or
434
434
  # sexual activities.
435
435
  # @!attribute [rw] spoof
436
- # @return [Google::Cloud::Vision::V1::Likelihood]
436
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
437
437
  # Spoof likelihood. The likelihood that an modification
438
438
  # was made to the image's canonical version to make it appear
439
439
  # funny or offensive.
440
440
  # @!attribute [rw] medical
441
- # @return [Google::Cloud::Vision::V1::Likelihood]
441
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
442
442
  # Likelihood that this is a medical image.
443
443
  # @!attribute [rw] violence
444
- # @return [Google::Cloud::Vision::V1::Likelihood]
444
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
445
445
  # Likelihood that this image contains violent content.
446
446
  # @!attribute [rw] racy
447
- # @return [Google::Cloud::Vision::V1::Likelihood]
447
+ # @return [::Google::Cloud::Vision::V1::Likelihood]
448
448
  # Likelihood that the request image contains racy content. Racy content may
449
449
  # include (but is not limited to) skimpy or sheer clothing, strategically
450
450
  # covered nudity, lewd or provocative poses, or close-ups of sensitive
451
451
  # body areas.
452
452
  # @!attribute [rw] adult_confidence
453
- # @return [Float]
453
+ # @return [::Float]
454
454
  # Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means
455
455
  # very confident.
456
456
  # @!attribute [rw] spoof_confidence
457
- # @return [Float]
457
+ # @return [::Float]
458
458
  # Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means
459
459
  # very confident.
460
460
  # @!attribute [rw] medical_confidence
461
- # @return [Float]
461
+ # @return [::Float]
462
462
  # Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means
463
463
  # very confident.
464
464
  # @!attribute [rw] violence_confidence
465
- # @return [Float]
465
+ # @return [::Float]
466
466
  # Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means
467
467
  # very confident.
468
468
  # @!attribute [rw] racy_confidence
469
- # @return [Float]
469
+ # @return [::Float]
470
470
  # Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very
471
471
  # confident.
472
472
  # @!attribute [rw] nsfw_confidence
473
- # @return [Float]
473
+ # @return [::Float]
474
474
  # Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very
475
475
  # confident.
476
476
  class SafeSearchAnnotation
477
- include Google::Protobuf::MessageExts
478
- extend Google::Protobuf::MessageExts::ClassMethods
477
+ include ::Google::Protobuf::MessageExts
478
+ extend ::Google::Protobuf::MessageExts::ClassMethods
479
479
  end
480
480
 
481
481
  # Rectangle determined by min and max `LatLng` pairs.
482
482
  # @!attribute [rw] min_lat_lng
483
- # @return [Google::Type::LatLng]
483
+ # @return [::Google::Type::LatLng]
484
484
  # Min lat/long pair.
485
485
  # @!attribute [rw] max_lat_lng
486
- # @return [Google::Type::LatLng]
486
+ # @return [::Google::Type::LatLng]
487
487
  # Max lat/long pair.
488
488
  class LatLongRect
489
- include Google::Protobuf::MessageExts
490
- extend Google::Protobuf::MessageExts::ClassMethods
489
+ include ::Google::Protobuf::MessageExts
490
+ extend ::Google::Protobuf::MessageExts::ClassMethods
491
491
  end
492
492
 
493
493
  # Color information consists of RGB channels, score, and the fraction of
494
494
  # the image that the color occupies in the image.
495
495
  # @!attribute [rw] color
496
- # @return [Google::Type::Color]
496
+ # @return [::Google::Type::Color]
497
497
  # RGB components of the color.
498
498
  # @!attribute [rw] score
499
- # @return [Float]
499
+ # @return [::Float]
500
500
  # Image-specific score for this color. Value in range [0, 1].
501
501
  # @!attribute [rw] pixel_fraction
502
- # @return [Float]
502
+ # @return [::Float]
503
503
  # The fraction of pixels the color occupies in the image.
504
504
  # Value in range [0, 1].
505
505
  class ColorInfo
506
- include Google::Protobuf::MessageExts
507
- extend Google::Protobuf::MessageExts::ClassMethods
506
+ include ::Google::Protobuf::MessageExts
507
+ extend ::Google::Protobuf::MessageExts::ClassMethods
508
508
  end
509
509
 
510
510
  # Set of dominant colors and their corresponding scores.
511
511
  # @!attribute [rw] colors
512
- # @return [Array<Google::Cloud::Vision::V1::ColorInfo>]
512
+ # @return [::Array<::Google::Cloud::Vision::V1::ColorInfo>]
513
513
  # RGB color values with their score and pixel fraction.
514
514
  class DominantColorsAnnotation
515
- include Google::Protobuf::MessageExts
516
- extend Google::Protobuf::MessageExts::ClassMethods
515
+ include ::Google::Protobuf::MessageExts
516
+ extend ::Google::Protobuf::MessageExts::ClassMethods
517
517
  end
518
518
 
519
519
  # Stores image properties, such as dominant colors.
520
520
  # @!attribute [rw] dominant_colors
521
- # @return [Google::Cloud::Vision::V1::DominantColorsAnnotation]
521
+ # @return [::Google::Cloud::Vision::V1::DominantColorsAnnotation]
522
522
  # If present, dominant colors completed successfully.
523
523
  class ImageProperties
524
- include Google::Protobuf::MessageExts
525
- extend Google::Protobuf::MessageExts::ClassMethods
524
+ include ::Google::Protobuf::MessageExts
525
+ extend ::Google::Protobuf::MessageExts::ClassMethods
526
526
  end
527
527
 
528
528
  # Single crop hint that is used to generate a new crop when serving an image.
529
529
  # @!attribute [rw] bounding_poly
530
- # @return [Google::Cloud::Vision::V1::BoundingPoly]
530
+ # @return [::Google::Cloud::Vision::V1::BoundingPoly]
531
531
  # The bounding polygon for the crop region. The coordinates of the bounding
532
532
  # box are in the original image's scale.
533
533
  # @!attribute [rw] confidence
534
- # @return [Float]
534
+ # @return [::Float]
535
535
  # Confidence of this being a salient region. Range [0, 1].
536
536
  # @!attribute [rw] importance_fraction
537
- # @return [Float]
537
+ # @return [::Float]
538
538
  # Fraction of importance of this salient region with respect to the original
539
539
  # image.
540
540
  class CropHint
541
- include Google::Protobuf::MessageExts
542
- extend Google::Protobuf::MessageExts::ClassMethods
541
+ include ::Google::Protobuf::MessageExts
542
+ extend ::Google::Protobuf::MessageExts::ClassMethods
543
543
  end
544
544
 
545
545
  # Set of crop hints that are used to generate new crops when serving images.
546
546
  # @!attribute [rw] crop_hints
547
- # @return [Array<Google::Cloud::Vision::V1::CropHint>]
547
+ # @return [::Array<::Google::Cloud::Vision::V1::CropHint>]
548
548
  # Crop hint results.
549
549
  class CropHintsAnnotation
550
- include Google::Protobuf::MessageExts
551
- extend Google::Protobuf::MessageExts::ClassMethods
550
+ include ::Google::Protobuf::MessageExts
551
+ extend ::Google::Protobuf::MessageExts::ClassMethods
552
552
  end
553
553
 
554
554
  # Parameters for crop hints annotation request.
555
555
  # @!attribute [rw] aspect_ratios
556
- # @return [Array<Float>]
556
+ # @return [::Array<::Float>]
557
557
  # Aspect ratios in floats, representing the ratio of the width to the height
558
558
  # of the image. For example, if the desired aspect ratio is 4/3, the
559
559
  # corresponding float value should be 1.33333. If not specified, the
@@ -561,25 +561,25 @@ module Google
561
561
  # limited to a maximum of 16; any aspect ratios provided after the 16th are
562
562
  # ignored.
563
563
  class CropHintsParams
564
- include Google::Protobuf::MessageExts
565
- extend Google::Protobuf::MessageExts::ClassMethods
564
+ include ::Google::Protobuf::MessageExts
565
+ extend ::Google::Protobuf::MessageExts::ClassMethods
566
566
  end
567
567
 
568
568
  # Parameters for web detection request.
569
569
  # @!attribute [rw] include_geo_results
570
- # @return [Boolean]
570
+ # @return [::Boolean]
571
571
  # Whether to include results derived from the geo information in the image.
572
572
  class WebDetectionParams
573
- include Google::Protobuf::MessageExts
574
- extend Google::Protobuf::MessageExts::ClassMethods
573
+ include ::Google::Protobuf::MessageExts
574
+ extend ::Google::Protobuf::MessageExts::ClassMethods
575
575
  end
576
576
 
577
577
  # Image context and/or feature-specific parameters.
578
578
  # @!attribute [rw] lat_long_rect
579
- # @return [Google::Cloud::Vision::V1::LatLongRect]
579
+ # @return [::Google::Cloud::Vision::V1::LatLongRect]
580
580
  # Not used.
581
581
  # @!attribute [rw] language_hints
582
- # @return [Array<String>]
582
+ # @return [::Array<::String>]
583
583
  # List of languages to use for TEXT_DETECTION. In most cases, an empty value
584
584
  # yields the best results since it enables automatic language detection. For
585
585
  # languages based on the Latin alphabet, setting `language_hints` is not
@@ -589,110 +589,110 @@ module Google
589
589
  # error if one or more of the specified languages is not one of the
590
590
  # [supported languages](https://cloud.google.com/vision/docs/languages).
591
591
  # @!attribute [rw] crop_hints_params
592
- # @return [Google::Cloud::Vision::V1::CropHintsParams]
592
+ # @return [::Google::Cloud::Vision::V1::CropHintsParams]
593
593
  # Parameters for crop hints annotation request.
594
594
  # @!attribute [rw] product_search_params
595
- # @return [Google::Cloud::Vision::V1::ProductSearchParams]
595
+ # @return [::Google::Cloud::Vision::V1::ProductSearchParams]
596
596
  # Parameters for product search.
597
597
  # @!attribute [rw] web_detection_params
598
- # @return [Google::Cloud::Vision::V1::WebDetectionParams]
598
+ # @return [::Google::Cloud::Vision::V1::WebDetectionParams]
599
599
  # Parameters for web detection.
600
600
  class ImageContext
601
- include Google::Protobuf::MessageExts
602
- extend Google::Protobuf::MessageExts::ClassMethods
601
+ include ::Google::Protobuf::MessageExts
602
+ extend ::Google::Protobuf::MessageExts::ClassMethods
603
603
  end
604
604
 
605
605
  # Request for performing Google Cloud Vision API tasks over a user-provided
606
606
  # image, with user-requested features, and with context information.
607
607
  # @!attribute [rw] image
608
- # @return [Google::Cloud::Vision::V1::Image]
608
+ # @return [::Google::Cloud::Vision::V1::Image]
609
609
  # The image to be processed.
610
610
  # @!attribute [rw] features
611
- # @return [Array<Google::Cloud::Vision::V1::Feature>]
611
+ # @return [::Array<::Google::Cloud::Vision::V1::Feature>]
612
612
  # Requested features.
613
613
  # @!attribute [rw] image_context
614
- # @return [Google::Cloud::Vision::V1::ImageContext]
614
+ # @return [::Google::Cloud::Vision::V1::ImageContext]
615
615
  # Additional context that may accompany the image.
616
616
  class AnnotateImageRequest
617
- include Google::Protobuf::MessageExts
618
- extend Google::Protobuf::MessageExts::ClassMethods
617
+ include ::Google::Protobuf::MessageExts
618
+ extend ::Google::Protobuf::MessageExts::ClassMethods
619
619
  end
620
620
 
621
621
  # If an image was produced from a file (e.g. a PDF), this message gives
622
622
  # information about the source of that image.
623
623
  # @!attribute [rw] uri
624
- # @return [String]
624
+ # @return [::String]
625
625
  # The URI of the file used to produce the image.
626
626
  # @!attribute [rw] page_number
627
- # @return [Integer]
627
+ # @return [::Integer]
628
628
  # If the file was a PDF or TIFF, this field gives the page number within
629
629
  # the file used to produce the image.
630
630
  class ImageAnnotationContext
631
- include Google::Protobuf::MessageExts
632
- extend Google::Protobuf::MessageExts::ClassMethods
631
+ include ::Google::Protobuf::MessageExts
632
+ extend ::Google::Protobuf::MessageExts::ClassMethods
633
633
  end
634
634
 
635
635
  # Response to an image annotation request.
636
636
  # @!attribute [rw] face_annotations
637
- # @return [Array<Google::Cloud::Vision::V1::FaceAnnotation>]
637
+ # @return [::Array<::Google::Cloud::Vision::V1::FaceAnnotation>]
638
638
  # If present, face detection has completed successfully.
639
639
  # @!attribute [rw] landmark_annotations
640
- # @return [Array<Google::Cloud::Vision::V1::EntityAnnotation>]
640
+ # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>]
641
641
  # If present, landmark detection has completed successfully.
642
642
  # @!attribute [rw] logo_annotations
643
- # @return [Array<Google::Cloud::Vision::V1::EntityAnnotation>]
643
+ # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>]
644
644
  # If present, logo detection has completed successfully.
645
645
  # @!attribute [rw] label_annotations
646
- # @return [Array<Google::Cloud::Vision::V1::EntityAnnotation>]
646
+ # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>]
647
647
  # If present, label detection has completed successfully.
648
648
  # @!attribute [rw] localized_object_annotations
649
- # @return [Array<Google::Cloud::Vision::V1::LocalizedObjectAnnotation>]
649
+ # @return [::Array<::Google::Cloud::Vision::V1::LocalizedObjectAnnotation>]
650
650
  # If present, localized object detection has completed successfully.
651
651
  # This will be sorted descending by confidence score.
652
652
  # @!attribute [rw] text_annotations
653
- # @return [Array<Google::Cloud::Vision::V1::EntityAnnotation>]
653
+ # @return [::Array<::Google::Cloud::Vision::V1::EntityAnnotation>]
654
654
  # If present, text (OCR) detection has completed successfully.
655
655
  # @!attribute [rw] full_text_annotation
656
- # @return [Google::Cloud::Vision::V1::TextAnnotation]
656
+ # @return [::Google::Cloud::Vision::V1::TextAnnotation]
657
657
  # If present, text (OCR) detection or document (OCR) text detection has
658
658
  # completed successfully.
659
659
  # This annotation provides the structural hierarchy for the OCR detected
660
660
  # text.
661
661
  # @!attribute [rw] safe_search_annotation
662
- # @return [Google::Cloud::Vision::V1::SafeSearchAnnotation]
662
+ # @return [::Google::Cloud::Vision::V1::SafeSearchAnnotation]
663
663
  # If present, safe-search annotation has completed successfully.
664
664
  # @!attribute [rw] image_properties_annotation
665
- # @return [Google::Cloud::Vision::V1::ImageProperties]
665
+ # @return [::Google::Cloud::Vision::V1::ImageProperties]
666
666
  # If present, image properties were extracted successfully.
667
667
  # @!attribute [rw] crop_hints_annotation
668
- # @return [Google::Cloud::Vision::V1::CropHintsAnnotation]
668
+ # @return [::Google::Cloud::Vision::V1::CropHintsAnnotation]
669
669
  # If present, crop hints have completed successfully.
670
670
  # @!attribute [rw] web_detection
671
- # @return [Google::Cloud::Vision::V1::WebDetection]
671
+ # @return [::Google::Cloud::Vision::V1::WebDetection]
672
672
  # If present, web detection has completed successfully.
673
673
  # @!attribute [rw] product_search_results
674
- # @return [Google::Cloud::Vision::V1::ProductSearchResults]
674
+ # @return [::Google::Cloud::Vision::V1::ProductSearchResults]
675
675
  # If present, product search has completed successfully.
676
676
  # @!attribute [rw] error
677
- # @return [Google::Rpc::Status]
677
+ # @return [::Google::Rpc::Status]
678
678
  # If set, represents the error message for the operation.
679
679
  # Note that filled-in image annotations are guaranteed to be
680
680
  # correct, even when `error` is set.
681
681
  # @!attribute [rw] context
682
- # @return [Google::Cloud::Vision::V1::ImageAnnotationContext]
682
+ # @return [::Google::Cloud::Vision::V1::ImageAnnotationContext]
683
683
  # If present, contextual information is needed to understand where this image
684
684
  # comes from.
685
685
  class AnnotateImageResponse
686
- include Google::Protobuf::MessageExts
687
- extend Google::Protobuf::MessageExts::ClassMethods
686
+ include ::Google::Protobuf::MessageExts
687
+ extend ::Google::Protobuf::MessageExts::ClassMethods
688
688
  end
689
689
 
690
690
  # Multiple image annotation requests are batched into a single service call.
691
691
  # @!attribute [rw] requests
692
- # @return [Array<Google::Cloud::Vision::V1::AnnotateImageRequest>]
692
+ # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest>]
693
693
  # Required. Individual image annotation requests for this batch.
694
694
  # @!attribute [rw] parent
695
- # @return [String]
695
+ # @return [::String]
696
696
  # Optional. Target project and location to make a call.
697
697
  #
698
698
  # Format: `projects/{project-id}/locations/{location-id}`.
@@ -706,31 +706,31 @@ module Google
706
706
  #
707
707
  # Example: `projects/project-A/locations/eu`.
708
708
  class BatchAnnotateImagesRequest
709
- include Google::Protobuf::MessageExts
710
- extend Google::Protobuf::MessageExts::ClassMethods
709
+ include ::Google::Protobuf::MessageExts
710
+ extend ::Google::Protobuf::MessageExts::ClassMethods
711
711
  end
712
712
 
713
713
  # Response to a batch image annotation request.
714
714
  # @!attribute [rw] responses
715
- # @return [Array<Google::Cloud::Vision::V1::AnnotateImageResponse>]
715
+ # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageResponse>]
716
716
  # Individual responses to image annotation requests within the batch.
717
717
  class BatchAnnotateImagesResponse
718
- include Google::Protobuf::MessageExts
719
- extend Google::Protobuf::MessageExts::ClassMethods
718
+ include ::Google::Protobuf::MessageExts
719
+ extend ::Google::Protobuf::MessageExts::ClassMethods
720
720
  end
721
721
 
722
722
  # A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
723
723
  # @!attribute [rw] input_config
724
- # @return [Google::Cloud::Vision::V1::InputConfig]
724
+ # @return [::Google::Cloud::Vision::V1::InputConfig]
725
725
  # Required. Information about the input file.
726
726
  # @!attribute [rw] features
727
- # @return [Array<Google::Cloud::Vision::V1::Feature>]
727
+ # @return [::Array<::Google::Cloud::Vision::V1::Feature>]
728
728
  # Required. Requested features.
729
729
  # @!attribute [rw] image_context
730
- # @return [Google::Cloud::Vision::V1::ImageContext]
730
+ # @return [::Google::Cloud::Vision::V1::ImageContext]
731
731
  # Additional context that may accompany the image(s) in the file.
732
732
  # @!attribute [rw] pages
733
- # @return [Array<Integer>]
733
+ # @return [::Array<::Integer>]
734
734
  # Pages of the file to perform image annotation.
735
735
  #
736
736
  # Pages starts from 1, we assume the first page of the file is page 1.
@@ -746,38 +746,38 @@ module Google
746
746
  # If this field is empty, by default the service performs image annotation
747
747
  # for the first 5 pages of the file.
748
748
  class AnnotateFileRequest
749
- include Google::Protobuf::MessageExts
750
- extend Google::Protobuf::MessageExts::ClassMethods
749
+ include ::Google::Protobuf::MessageExts
750
+ extend ::Google::Protobuf::MessageExts::ClassMethods
751
751
  end
752
752
 
753
753
  # Response to a single file annotation request. A file may contain one or more
754
754
  # images, which individually have their own responses.
755
755
  # @!attribute [rw] input_config
756
- # @return [Google::Cloud::Vision::V1::InputConfig]
756
+ # @return [::Google::Cloud::Vision::V1::InputConfig]
757
757
  # Information about the file for which this response is generated.
758
758
  # @!attribute [rw] responses
759
- # @return [Array<Google::Cloud::Vision::V1::AnnotateImageResponse>]
759
+ # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageResponse>]
760
760
  # Individual responses to images found within the file. This field will be
761
761
  # empty if the `error` field is set.
762
762
  # @!attribute [rw] total_pages
763
- # @return [Integer]
763
+ # @return [::Integer]
764
764
  # This field gives the total number of pages in the file.
765
765
  # @!attribute [rw] error
766
- # @return [Google::Rpc::Status]
766
+ # @return [::Google::Rpc::Status]
767
767
  # If set, represents the error message for the failed request. The
768
768
  # `responses` field will not be set in this case.
769
769
  class AnnotateFileResponse
770
- include Google::Protobuf::MessageExts
771
- extend Google::Protobuf::MessageExts::ClassMethods
770
+ include ::Google::Protobuf::MessageExts
771
+ extend ::Google::Protobuf::MessageExts::ClassMethods
772
772
  end
773
773
 
774
774
  # A list of requests to annotate files using the BatchAnnotateFiles API.
775
775
  # @!attribute [rw] requests
776
- # @return [Array<Google::Cloud::Vision::V1::AnnotateFileRequest>]
776
+ # @return [::Array<::Google::Cloud::Vision::V1::AnnotateFileRequest>]
777
777
  # Required. The list of file annotation requests. Right now we support only one
778
778
  # AnnotateFileRequest in BatchAnnotateFilesRequest.
779
779
  # @!attribute [rw] parent
780
- # @return [String]
780
+ # @return [::String]
781
781
  # Optional. Target project and location to make a call.
782
782
  #
783
783
  # Format: `projects/{project-id}/locations/{location-id}`.
@@ -791,56 +791,56 @@ module Google
791
791
  #
792
792
  # Example: `projects/project-A/locations/eu`.
793
793
  class BatchAnnotateFilesRequest
794
- include Google::Protobuf::MessageExts
795
- extend Google::Protobuf::MessageExts::ClassMethods
794
+ include ::Google::Protobuf::MessageExts
795
+ extend ::Google::Protobuf::MessageExts::ClassMethods
796
796
  end
797
797
 
798
798
  # A list of file annotation responses.
799
799
  # @!attribute [rw] responses
800
- # @return [Array<Google::Cloud::Vision::V1::AnnotateFileResponse>]
800
+ # @return [::Array<::Google::Cloud::Vision::V1::AnnotateFileResponse>]
801
801
  # The list of file annotation responses, each response corresponding to each
802
802
  # AnnotateFileRequest in BatchAnnotateFilesRequest.
803
803
  class BatchAnnotateFilesResponse
804
- include Google::Protobuf::MessageExts
805
- extend Google::Protobuf::MessageExts::ClassMethods
804
+ include ::Google::Protobuf::MessageExts
805
+ extend ::Google::Protobuf::MessageExts::ClassMethods
806
806
  end
807
807
 
808
808
  # An offline file annotation request.
809
809
  # @!attribute [rw] input_config
810
- # @return [Google::Cloud::Vision::V1::InputConfig]
810
+ # @return [::Google::Cloud::Vision::V1::InputConfig]
811
811
  # Required. Information about the input file.
812
812
  # @!attribute [rw] features
813
- # @return [Array<Google::Cloud::Vision::V1::Feature>]
813
+ # @return [::Array<::Google::Cloud::Vision::V1::Feature>]
814
814
  # Required. Requested features.
815
815
  # @!attribute [rw] image_context
816
- # @return [Google::Cloud::Vision::V1::ImageContext]
816
+ # @return [::Google::Cloud::Vision::V1::ImageContext]
817
817
  # Additional context that may accompany the image(s) in the file.
818
818
  # @!attribute [rw] output_config
819
- # @return [Google::Cloud::Vision::V1::OutputConfig]
819
+ # @return [::Google::Cloud::Vision::V1::OutputConfig]
820
820
  # Required. The desired output location and metadata (e.g. format).
821
821
  class AsyncAnnotateFileRequest
822
- include Google::Protobuf::MessageExts
823
- extend Google::Protobuf::MessageExts::ClassMethods
822
+ include ::Google::Protobuf::MessageExts
823
+ extend ::Google::Protobuf::MessageExts::ClassMethods
824
824
  end
825
825
 
826
826
  # The response for a single offline file annotation request.
827
827
  # @!attribute [rw] output_config
828
- # @return [Google::Cloud::Vision::V1::OutputConfig]
828
+ # @return [::Google::Cloud::Vision::V1::OutputConfig]
829
829
  # The output location and metadata from AsyncAnnotateFileRequest.
830
830
  class AsyncAnnotateFileResponse
831
- include Google::Protobuf::MessageExts
832
- extend Google::Protobuf::MessageExts::ClassMethods
831
+ include ::Google::Protobuf::MessageExts
832
+ extend ::Google::Protobuf::MessageExts::ClassMethods
833
833
  end
834
834
 
835
835
  # Request for async image annotation for a list of images.
836
836
  # @!attribute [rw] requests
837
- # @return [Array<Google::Cloud::Vision::V1::AnnotateImageRequest>]
837
+ # @return [::Array<::Google::Cloud::Vision::V1::AnnotateImageRequest>]
838
838
  # Required. Individual image annotation requests for this batch.
839
839
  # @!attribute [rw] output_config
840
- # @return [Google::Cloud::Vision::V1::OutputConfig]
840
+ # @return [::Google::Cloud::Vision::V1::OutputConfig]
841
841
  # Required. The desired output location and metadata (e.g. format).
842
842
  # @!attribute [rw] parent
843
- # @return [String]
843
+ # @return [::String]
844
844
  # Optional. Target project and location to make a call.
845
845
  #
846
846
  # Format: `projects/{project-id}/locations/{location-id}`.
@@ -854,26 +854,26 @@ module Google
854
854
  #
855
855
  # Example: `projects/project-A/locations/eu`.
856
856
  class AsyncBatchAnnotateImagesRequest
857
- include Google::Protobuf::MessageExts
858
- extend Google::Protobuf::MessageExts::ClassMethods
857
+ include ::Google::Protobuf::MessageExts
858
+ extend ::Google::Protobuf::MessageExts::ClassMethods
859
859
  end
860
860
 
861
861
  # Response to an async batch image annotation request.
862
862
  # @!attribute [rw] output_config
863
- # @return [Google::Cloud::Vision::V1::OutputConfig]
863
+ # @return [::Google::Cloud::Vision::V1::OutputConfig]
864
864
  # The output location and metadata from AsyncBatchAnnotateImagesRequest.
865
865
  class AsyncBatchAnnotateImagesResponse
866
- include Google::Protobuf::MessageExts
867
- extend Google::Protobuf::MessageExts::ClassMethods
866
+ include ::Google::Protobuf::MessageExts
867
+ extend ::Google::Protobuf::MessageExts::ClassMethods
868
868
  end
869
869
 
870
870
  # Multiple async file annotation requests are batched into a single service
871
871
  # call.
872
872
  # @!attribute [rw] requests
873
- # @return [Array<Google::Cloud::Vision::V1::AsyncAnnotateFileRequest>]
873
+ # @return [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileRequest>]
874
874
  # Required. Individual async file annotation requests for this batch.
875
875
  # @!attribute [rw] parent
876
- # @return [String]
876
+ # @return [::String]
877
877
  # Optional. Target project and location to make a call.
878
878
  #
879
879
  # Format: `projects/{project-id}/locations/{location-id}`.
@@ -887,26 +887,26 @@ module Google
887
887
  #
888
888
  # Example: `projects/project-A/locations/eu`.
889
889
  class AsyncBatchAnnotateFilesRequest
890
- include Google::Protobuf::MessageExts
891
- extend Google::Protobuf::MessageExts::ClassMethods
890
+ include ::Google::Protobuf::MessageExts
891
+ extend ::Google::Protobuf::MessageExts::ClassMethods
892
892
  end
893
893
 
894
894
  # Response to an async batch file annotation request.
895
895
  # @!attribute [rw] responses
896
- # @return [Array<Google::Cloud::Vision::V1::AsyncAnnotateFileResponse>]
896
+ # @return [::Array<::Google::Cloud::Vision::V1::AsyncAnnotateFileResponse>]
897
897
  # The list of file annotation responses, one for each request in
898
898
  # AsyncBatchAnnotateFilesRequest.
899
899
  class AsyncBatchAnnotateFilesResponse
900
- include Google::Protobuf::MessageExts
901
- extend Google::Protobuf::MessageExts::ClassMethods
900
+ include ::Google::Protobuf::MessageExts
901
+ extend ::Google::Protobuf::MessageExts::ClassMethods
902
902
  end
903
903
 
904
904
  # The desired input location and metadata.
905
905
  # @!attribute [rw] gcs_source
906
- # @return [Google::Cloud::Vision::V1::GcsSource]
906
+ # @return [::Google::Cloud::Vision::V1::GcsSource]
907
907
  # The Google Cloud Storage location to read the input from.
908
908
  # @!attribute [rw] content
909
- # @return [String]
909
+ # @return [::String]
910
910
  # File content, represented as a stream of bytes.
911
911
  # Note: As with all `bytes` fields, protobuffers use a pure binary
912
912
  # representation, whereas JSON representations use base64.
@@ -914,20 +914,20 @@ module Google
914
914
  # Currently, this field only works for BatchAnnotateFiles requests. It does
915
915
  # not work for AsyncBatchAnnotateFiles requests.
916
916
  # @!attribute [rw] mime_type
917
- # @return [String]
917
+ # @return [::String]
918
918
  # The type of the file. Currently only "application/pdf", "image/tiff" and
919
919
  # "image/gif" are supported. Wildcards are not supported.
920
920
  class InputConfig
921
- include Google::Protobuf::MessageExts
922
- extend Google::Protobuf::MessageExts::ClassMethods
921
+ include ::Google::Protobuf::MessageExts
922
+ extend ::Google::Protobuf::MessageExts::ClassMethods
923
923
  end
924
924
 
925
925
  # The desired output location and metadata.
926
926
  # @!attribute [rw] gcs_destination
927
- # @return [Google::Cloud::Vision::V1::GcsDestination]
927
+ # @return [::Google::Cloud::Vision::V1::GcsDestination]
928
928
  # The Google Cloud Storage location to write the output(s) to.
929
929
  # @!attribute [rw] batch_size
930
- # @return [Integer]
930
+ # @return [::Integer]
931
931
  # The max number of response protos to put into each output JSON file on
932
932
  # Google Cloud Storage.
933
933
  # The valid range is [1, 100]. If not specified, the default value is 20.
@@ -940,23 +940,23 @@ module Google
940
940
  # Currently, batch_size only applies to GcsDestination, with potential future
941
941
  # support for other output configurations.
942
942
  class OutputConfig
943
- include Google::Protobuf::MessageExts
944
- extend Google::Protobuf::MessageExts::ClassMethods
943
+ include ::Google::Protobuf::MessageExts
944
+ extend ::Google::Protobuf::MessageExts::ClassMethods
945
945
  end
946
946
 
947
947
  # The Google Cloud Storage location where the input will be read from.
948
948
  # @!attribute [rw] uri
949
- # @return [String]
949
+ # @return [::String]
950
950
  # Google Cloud Storage URI for the input file. This must only be a
951
951
  # Google Cloud Storage object. Wildcards are not currently supported.
952
952
  class GcsSource
953
- include Google::Protobuf::MessageExts
954
- extend Google::Protobuf::MessageExts::ClassMethods
953
+ include ::Google::Protobuf::MessageExts
954
+ extend ::Google::Protobuf::MessageExts::ClassMethods
955
955
  end
956
956
 
957
957
  # The Google Cloud Storage location where the output will be written to.
958
958
  # @!attribute [rw] uri
959
- # @return [String]
959
+ # @return [::String]
960
960
  # Google Cloud Storage URI prefix where the results will be stored. Results
961
961
  # will be in JSON format and preceded by its corresponding input URI prefix.
962
962
  # This field can either represent a gcs file prefix or gcs directory. In
@@ -980,23 +980,23 @@ module Google
980
980
  # Multiple outputs can happen if, for example, the output JSON is too large
981
981
  # and overflows into multiple sharded files.
982
982
  class GcsDestination
983
- include Google::Protobuf::MessageExts
984
- extend Google::Protobuf::MessageExts::ClassMethods
983
+ include ::Google::Protobuf::MessageExts
984
+ extend ::Google::Protobuf::MessageExts::ClassMethods
985
985
  end
986
986
 
987
987
  # Contains metadata for the BatchAnnotateImages operation.
988
988
  # @!attribute [rw] state
989
- # @return [Google::Cloud::Vision::V1::OperationMetadata::State]
989
+ # @return [::Google::Cloud::Vision::V1::OperationMetadata::State]
990
990
  # Current state of the batch operation.
991
991
  # @!attribute [rw] create_time
992
- # @return [Google::Protobuf::Timestamp]
992
+ # @return [::Google::Protobuf::Timestamp]
993
993
  # The time when the batch request was received.
994
994
  # @!attribute [rw] update_time
995
- # @return [Google::Protobuf::Timestamp]
995
+ # @return [::Google::Protobuf::Timestamp]
996
996
  # The time when the operation result was last updated.
997
997
  class OperationMetadata
998
- include Google::Protobuf::MessageExts
999
- extend Google::Protobuf::MessageExts::ClassMethods
998
+ include ::Google::Protobuf::MessageExts
999
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1000
1000
 
1001
1001
  # Batch operation states.
1002
1002
  module State