blob: 2036e7b7e86b86d214fe7d05992f1f64c5f175f9 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="vision_v1p1beta1.html">Cloud Vision API</a> . <a href="vision_v1p1beta1.projects.html">projects</a> . <a href="vision_v1p1beta1.projects.images.html">images</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#annotate">annotate(parent, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Run image detection and annotation for a batch of images.</p>
80<p class="toc_element">
81 <code><a href="#asyncBatchAnnotate">asyncBatchAnnotate(parent, body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Run asynchronous image detection and annotation for a list of images.</p>
83<h3>Method Details</h3>
84<div class="method">
85 <code class="details" id="annotate">annotate(parent, body=None, x__xgafv=None)</code>
86 <pre>Run image detection and annotation for a batch of images.
87
88Args:
89 parent: string, Optional. Target project and location to make a call.
90
91Format: `projects/{project-id}/locations/{location-id}`.
92
93If no parent is specified, a region will be chosen automatically.
94
95Supported location-ids:
96 `us`: USA country only,
97 `asia`: East asia areas, like Japan, Taiwan,
98 `eu`: The European Union.
99
100Example: `projects/project-A/locations/eu`. (required)
101 body: object, The request body.
102 The object takes the form of:
103
104{ # Multiple image annotation requests are batched into a single service call.
105 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
106 #
107 # Format: `projects/{project-id}/locations/{location-id}`.
108 #
109 # If no parent is specified, a region will be chosen automatically.
110 #
111 # Supported location-ids:
112 # `us`: USA country only,
113 # `asia`: East asia areas, like Japan, Taiwan,
114 # `eu`: The European Union.
115 #
116 # Example: `projects/project-A/locations/eu`.
117 &quot;requests&quot;: [ # Required. Individual image annotation requests for this batch.
118 { # Request for performing Google Cloud Vision API tasks over a user-provided
119 # image, with user-requested features, and with context information.
120 &quot;image&quot;: { # Client image to perform Google Cloud Vision API tasks over. # The image to be processed.
121 &quot;content&quot;: &quot;A String&quot;, # Image content, represented as a stream of bytes.
122 # Note: As with all `bytes` fields, protobuffers use a pure binary
123 # representation, whereas JSON representations use base64.
124 &quot;source&quot;: { # External image source (Google Cloud Storage or web URL image location). # Google Cloud Storage image location, or publicly-accessible image
125 # URL. If both `content` and `source` are provided for an image, `content`
126 # takes precedence and is used to perform the image annotation request.
127 &quot;imageUri&quot;: &quot;A String&quot;, # The URI of the source image. Can be either:
128 #
129 # 1. A Google Cloud Storage URI of the form
130 # `gs://bucket_name/object_name`. Object versioning is not supported. See
131 # [Google Cloud Storage Request
132 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
133 # info.
134 #
135 # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
136 # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
137 # completed. Your request may fail if the specified host denies the
138 # request (e.g. due to request throttling or DOS prevention), or if Google
139 # throttles requests to the site for abuse prevention. You should not
140 # depend on externally-hosted images for production applications.
141 #
142 # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
143 # precedence.
144 &quot;gcsImageUri&quot;: &quot;A String&quot;, # **Use `image_uri` instead.**
145 #
146 # The Google Cloud Storage URI of the form
147 # `gs://bucket_name/object_name`. Object versioning is not supported. See
148 # [Google Cloud Storage Request
149 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
150 },
151 },
152 &quot;features&quot;: [ # Requested features.
153 { # The type of Google Cloud Vision API detection to perform, and the maximum
154 # number of results to return for that type. Multiple `Feature` objects can
155 # be specified in the `features` list.
156 &quot;type&quot;: &quot;A String&quot;, # The feature type.
157 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
158 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
159 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
160 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
161 # &quot;builtin/latest&quot;.
162 },
163 ],
164 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image.
165 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
166 # yields the best results since it enables automatic language detection. For
167 # languages based on the Latin alphabet, setting `language_hints` is not
168 # needed. In rare cases, when the language of the text in the image is known,
169 # setting a hint will help get better results (although it will be a
170 # significant hindrance if the hint is wrong). Text detection returns an
171 # error if one or more of the specified languages is not one of the
172 # [supported languages](https://cloud.google.com/vision/docs/languages).
173 &quot;A String&quot;,
174 ],
175 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
176 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
177 },
178 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
179 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
180 # of doubles representing degrees latitude and degrees longitude. Unless
181 # specified otherwise, this must conform to the
182 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
183 # standard&lt;/a&gt;. Values must be within normalized ranges.
184 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
185 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
186 },
187 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
188 # of doubles representing degrees latitude and degrees longitude. Unless
189 # specified otherwise, this must conform to the
190 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
191 # standard&lt;/a&gt;. Values must be within normalized ranges.
192 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
193 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
194 },
195 },
196 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
197 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
198 # of the image. For example, if the desired aspect ratio is 4/3, the
199 # corresponding float value should be 1.33333. If not specified, the
200 # best possible crop is returned. The number of provided aspect ratios is
201 # limited to a maximum of 16; any aspect ratios provided after the 16th are
202 # ignored.
203 3.14,
204 ],
205 },
206 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
207 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
208 # on Product labels. We currently support an AND of OR of key-value
209 # expressions, where each expression within an OR must have the same key. An
210 # &#x27;=&#x27; should be used to connect the key and value.
211 #
212 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
213 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
214 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
215 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
216 #
217 # Format is:
218 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
219 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
220 # If it is not specified, system discretion will be applied.
221 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
222 { # A vertex represents a 2D point in the image.
223 # NOTE: the normalized vertex coordinates are relative to the original image
224 # and range from 0 to 1.
225 &quot;y&quot;: 3.14, # Y coordinate.
226 &quot;x&quot;: 3.14, # X coordinate.
227 },
228 ],
229 &quot;vertices&quot;: [ # The bounding polygon vertices.
230 { # A vertex represents a 2D point in the image.
231 # NOTE: the vertex coordinates are in the same scale as the original image.
232 &quot;y&quot;: 42, # Y coordinate.
233 &quot;x&quot;: 42, # X coordinate.
234 },
235 ],
236 },
237 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
238 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
239 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
240 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
241 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
242 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
243 # migrate existing products to these categories as well.
244 &quot;A String&quot;,
245 ],
246 },
247 },
248 },
249 ],
250 }
251
252 x__xgafv: string, V1 error format.
253 Allowed values
254 1 - v1 error format
255 2 - v2 error format
256
257Returns:
258 An object of the form:
259
260 { # Response to a batch image annotation request.
261 &quot;responses&quot;: [ # Individual responses to image annotation requests within the batch.
262 { # Response to an image annotation request.
263 &quot;landmarkAnnotations&quot;: [ # If present, landmark detection has completed successfully.
264 { # Set of detected entity features.
265 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
266 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
267 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
268 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
269 # detected distant towering building, even though the confidence that
270 # there is a tower in each image may be the same. Range [0, 1].
271 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
272 # fields, such a score or string that qualifies the entity.
273 { # A `Property` consists of a user-supplied name/value pair.
274 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
275 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
276 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
277 },
278 ],
279 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
280 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
281 # `LocationInfo` elements can be present because one location may
282 # indicate the location of the scene in the image, and another location
283 # may indicate the location of the place where the image was taken.
284 # Location information is usually present for landmarks.
285 { # Detected entity location information.
286 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
287 # of doubles representing degrees latitude and degrees longitude. Unless
288 # specified otherwise, this must conform to the
289 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
290 # standard&lt;/a&gt;. Values must be within normalized ranges.
291 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
292 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
293 },
294 },
295 ],
296 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
297 # [Google Knowledge Graph Search
298 # API](https://developers.google.com/knowledge-graph/).
299 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
300 # The accuracy of the entity detection in an image.
301 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
302 # this field represents the confidence that there is a tower in the query
303 # image. Range [0, 1].
304 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
305 # for `LABEL_DETECTION` features.
306 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
307 { # A vertex represents a 2D point in the image.
308 # NOTE: the normalized vertex coordinates are relative to the original image
309 # and range from 0 to 1.
310 &quot;y&quot;: 3.14, # Y coordinate.
311 &quot;x&quot;: 3.14, # X coordinate.
312 },
313 ],
314 &quot;vertices&quot;: [ # The bounding polygon vertices.
315 { # A vertex represents a 2D point in the image.
316 # NOTE: the vertex coordinates are in the same scale as the original image.
317 &quot;y&quot;: 42, # Y coordinate.
318 &quot;x&quot;: 42, # X coordinate.
319 },
320 ],
321 },
322 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
323 # `description` is expressed.
324 },
325 ],
326 &quot;faceAnnotations&quot;: [ # If present, face detection has completed successfully.
327 { # A face annotation object contains the results of face detection.
328 &quot;angerLikelihood&quot;: &quot;A String&quot;, # Anger likelihood.
329 &quot;landmarks&quot;: [ # Detected face landmarks.
330 { # A face-specific landmark (for example, a face feature).
331 &quot;position&quot;: { # A 3D position in the image, used primarily for Face detection landmarks. # Face landmark position.
332 # A valid Position must have both x and y coordinates.
333 # The position coordinates are in the same scale as the original image.
334 &quot;x&quot;: 3.14, # X coordinate.
335 &quot;z&quot;: 3.14, # Z coordinate (or depth).
336 &quot;y&quot;: 3.14, # Y coordinate.
337 },
338 &quot;type&quot;: &quot;A String&quot;, # Face landmark type.
339 },
340 ],
341 &quot;surpriseLikelihood&quot;: &quot;A String&quot;, # Surprise likelihood.
342 &quot;joyLikelihood&quot;: &quot;A String&quot;, # Joy likelihood.
343 &quot;landmarkingConfidence&quot;: 3.14, # Face landmarking confidence. Range [0, 1].
344 &quot;detectionConfidence&quot;: 3.14, # Detection confidence. Range [0, 1].
345 &quot;panAngle&quot;: 3.14, # Yaw angle, which indicates the leftward/rightward angle that the face is
346 # pointing relative to the vertical plane perpendicular to the image. Range
347 # [-180,180].
348 &quot;underExposedLikelihood&quot;: &quot;A String&quot;, # Under-exposed likelihood.
349 &quot;blurredLikelihood&quot;: &quot;A String&quot;, # Blurred likelihood.
350 &quot;headwearLikelihood&quot;: &quot;A String&quot;, # Headwear likelihood.
351 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the face. The coordinates of the bounding box
352 # are in the original image&#x27;s scale.
353 # The bounding box is computed to &quot;frame&quot; the face in accordance with human
354 # expectations. It is based on the landmarker results.
355 # Note that one or more x and/or y coordinates may not be generated in the
356 # `BoundingPoly` (the polygon will be unbounded) if only a partial face
357 # appears in the image to be annotated.
358 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
359 { # A vertex represents a 2D point in the image.
360 # NOTE: the normalized vertex coordinates are relative to the original image
361 # and range from 0 to 1.
362 &quot;y&quot;: 3.14, # Y coordinate.
363 &quot;x&quot;: 3.14, # X coordinate.
364 },
365 ],
366 &quot;vertices&quot;: [ # The bounding polygon vertices.
367 { # A vertex represents a 2D point in the image.
368 # NOTE: the vertex coordinates are in the same scale as the original image.
369 &quot;y&quot;: 42, # Y coordinate.
370 &quot;x&quot;: 42, # X coordinate.
371 },
372 ],
373 },
374 &quot;rollAngle&quot;: 3.14, # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
375 # of the face relative to the image vertical about the axis perpendicular to
376 # the face. Range [-180,180].
377 &quot;sorrowLikelihood&quot;: &quot;A String&quot;, # Sorrow likelihood.
378 &quot;tiltAngle&quot;: 3.14, # Pitch angle, which indicates the upwards/downwards angle that the face is
379 # pointing relative to the image&#x27;s horizontal plane. Range [-180,180].
380 &quot;fdBoundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The `fd_bounding_poly` bounding polygon is tighter than the
381 # `boundingPoly`, and encloses only the skin part of the face. Typically, it
382 # is used to eliminate the face from any image analysis that detects the
383 # &quot;amount of skin&quot; visible in an image. It is not based on the
384 # landmarker results, only on the initial face detection, hence
385 # the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
386 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
387 { # A vertex represents a 2D point in the image.
388 # NOTE: the normalized vertex coordinates are relative to the original image
389 # and range from 0 to 1.
390 &quot;y&quot;: 3.14, # Y coordinate.
391 &quot;x&quot;: 3.14, # X coordinate.
392 },
393 ],
394 &quot;vertices&quot;: [ # The bounding polygon vertices.
395 { # A vertex represents a 2D point in the image.
396 # NOTE: the vertex coordinates are in the same scale as the original image.
397 &quot;y&quot;: 42, # Y coordinate.
398 &quot;x&quot;: 42, # X coordinate.
399 },
400 ],
401 },
402 },
403 ],
404 &quot;cropHintsAnnotation&quot;: { # Set of crop hints that are used to generate new crops when serving images. # If present, crop hints have completed successfully.
405 &quot;cropHints&quot;: [ # Crop hint results.
406 { # Single crop hint that is used to generate a new crop when serving an image.
407 &quot;confidence&quot;: 3.14, # Confidence of this being a salient region. Range [0, 1].
408 &quot;importanceFraction&quot;: 3.14, # Fraction of importance of this salient region with respect to the original
409 # image.
410 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the crop region. The coordinates of the bounding
411 # box are in the original image&#x27;s scale.
412 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
413 { # A vertex represents a 2D point in the image.
414 # NOTE: the normalized vertex coordinates are relative to the original image
415 # and range from 0 to 1.
416 &quot;y&quot;: 3.14, # Y coordinate.
417 &quot;x&quot;: 3.14, # X coordinate.
418 },
419 ],
420 &quot;vertices&quot;: [ # The bounding polygon vertices.
421 { # A vertex represents a 2D point in the image.
422 # NOTE: the vertex coordinates are in the same scale as the original image.
423 &quot;y&quot;: 42, # Y coordinate.
424 &quot;x&quot;: 42, # X coordinate.
425 },
426 ],
427 },
428 },
429 ],
430 },
431 &quot;labelAnnotations&quot;: [ # If present, label detection has completed successfully.
432 { # Set of detected entity features.
433 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
434 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
435 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
436 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
437 # detected distant towering building, even though the confidence that
438 # there is a tower in each image may be the same. Range [0, 1].
439 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
440 # fields, such a score or string that qualifies the entity.
441 { # A `Property` consists of a user-supplied name/value pair.
442 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
443 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
444 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
445 },
446 ],
447 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
448 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
449 # `LocationInfo` elements can be present because one location may
450 # indicate the location of the scene in the image, and another location
451 # may indicate the location of the place where the image was taken.
452 # Location information is usually present for landmarks.
453 { # Detected entity location information.
454 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
455 # of doubles representing degrees latitude and degrees longitude. Unless
456 # specified otherwise, this must conform to the
457 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
458 # standard&lt;/a&gt;. Values must be within normalized ranges.
459 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
460 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
461 },
462 },
463 ],
464 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
465 # [Google Knowledge Graph Search
466 # API](https://developers.google.com/knowledge-graph/).
467 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
468 # The accuracy of the entity detection in an image.
469 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
470 # this field represents the confidence that there is a tower in the query
471 # image. Range [0, 1].
472 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
473 # for `LABEL_DETECTION` features.
474 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
475 { # A vertex represents a 2D point in the image.
476 # NOTE: the normalized vertex coordinates are relative to the original image
477 # and range from 0 to 1.
478 &quot;y&quot;: 3.14, # Y coordinate.
479 &quot;x&quot;: 3.14, # X coordinate.
480 },
481 ],
482 &quot;vertices&quot;: [ # The bounding polygon vertices.
483 { # A vertex represents a 2D point in the image.
484 # NOTE: the vertex coordinates are in the same scale as the original image.
485 &quot;y&quot;: 42, # Y coordinate.
486 &quot;x&quot;: 42, # X coordinate.
487 },
488 ],
489 },
490 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
491 # `description` is expressed.
492 },
493 ],
494 &quot;productSearchResults&quot;: { # Results for a product search request. # If present, product search has completed successfully.
495 &quot;productGroupedResults&quot;: [ # List of results grouped by products detected in the query image. Each entry
496 # corresponds to one bounding polygon in the query image, and contains the
497 # matching products specific to that region. There may be duplicate product
498 # matches in the union of all the per-product results.
499 { # Information about the products similar to a single product in a query
500 # image.
501 &quot;objectAnnotations&quot;: [ # List of generic predictions for the object in the bounding box.
502 { # Prediction for what the object in the bounding box is.
503 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
504 # information, see
505 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
506 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
507 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
508 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
509 },
510 ],
511 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the product detected in the query image.
512 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
513 { # A vertex represents a 2D point in the image.
514 # NOTE: the normalized vertex coordinates are relative to the original image
515 # and range from 0 to 1.
516 &quot;y&quot;: 3.14, # Y coordinate.
517 &quot;x&quot;: 3.14, # X coordinate.
518 },
519 ],
520 &quot;vertices&quot;: [ # The bounding polygon vertices.
521 { # A vertex represents a 2D point in the image.
522 # NOTE: the vertex coordinates are in the same scale as the original image.
523 &quot;y&quot;: 42, # Y coordinate.
524 &quot;x&quot;: 42, # X coordinate.
525 },
526 ],
527 },
528 &quot;results&quot;: [ # List of results, one for each product match.
529 { # Information about a product.
530 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
531 # to the query.
532 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
533 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
534 # 4096 characters long.
535 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
536 # characters long.
537 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
538 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
539 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
540 # not be used for new products.
541 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
542 # constraints can be specified based on the product_labels.
543 #
544 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
545 # strings with integer values can match a range-based restriction which is
546 # to be supported soon.
547 #
548 # Multiple values can be assigned to the same key. One product may have up to
549 # 500 product_labels.
550 #
551 # Notice that the total number of distinct product_labels over all products
552 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
553 # will refuse to work for that ProductSet.
554 { # A product label represented as a key-value pair.
555 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
556 # exceed 128 bytes.
557 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
558 # cannot exceed 128 bytes.
559 },
560 ],
561 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
562 #
563 # Format is:
564 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
565 #
566 # This field is ignored when creating a product.
567 },
568 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
569 # 1 (full confidence).
570 },
571 ],
572 },
573 ],
574 &quot;results&quot;: [ # List of results, one for each product match.
575 { # Information about a product.
576 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
577 # to the query.
578 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
579 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
580 # 4096 characters long.
581 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
582 # characters long.
583 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
584 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
585 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
586 # not be used for new products.
587 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
588 # constraints can be specified based on the product_labels.
589 #
590 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
591 # strings with integer values can match a range-based restriction which is
592 # to be supported soon.
593 #
594 # Multiple values can be assigned to the same key. One product may have up to
595 # 500 product_labels.
596 #
597 # Notice that the total number of distinct product_labels over all products
598 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
599 # will refuse to work for that ProductSet.
600 { # A product label represented as a key-value pair.
601 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
602 # exceed 128 bytes.
603 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
604 # cannot exceed 128 bytes.
605 },
606 ],
607 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
608 #
609 # Format is:
610 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
611 #
612 # This field is ignored when creating a product.
613 },
614 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
615 # 1 (full confidence).
616 },
617 ],
618 &quot;indexTime&quot;: &quot;A String&quot;, # Timestamp of the index which provided these results. Products added to the
619 # product set and products removed from the product set after this time are
620 # not reflected in the current results.
621 },
622 &quot;localizedObjectAnnotations&quot;: [ # If present, localized object detection has completed successfully.
623 # This will be sorted descending by confidence score.
624 { # Set of detected objects with bounding boxes.
625 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
626 # information, see
627 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
628 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
629 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
630 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this object belongs. This must be populated.
631 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
632 { # A vertex represents a 2D point in the image.
633 # NOTE: the normalized vertex coordinates are relative to the original image
634 # and range from 0 to 1.
635 &quot;y&quot;: 3.14, # Y coordinate.
636 &quot;x&quot;: 3.14, # X coordinate.
637 },
638 ],
639 &quot;vertices&quot;: [ # The bounding polygon vertices.
640 { # A vertex represents a 2D point in the image.
641 # NOTE: the vertex coordinates are in the same scale as the original image.
642 &quot;y&quot;: 42, # Y coordinate.
643 &quot;x&quot;: 42, # X coordinate.
644 },
645 ],
646 },
647 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
648 },
649 ],
650 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # If set, represents the error message for the operation.
651 # Note that filled-in image annotations are guaranteed to be
652 # correct, even when `error` is set.
653 # different programming environments, including REST APIs and RPC APIs. It is
654 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
655 # three pieces of data: error code, error message, and error details.
656 #
657 # You can find out more about this error model and how to work with it in the
658 # [API Design Guide](https://cloud.google.com/apis/design/errors).
659 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
660 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
661 # user-facing error message should be localized and sent in the
662 # google.rpc.Status.details field, or localized by the client.
663 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
664 # message types for APIs to use.
665 {
666 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
667 },
668 ],
669 },
670 &quot;fullTextAnnotation&quot;: { # TextAnnotation contains a structured representation of OCR extracted text. # If present, text (OCR) detection or document (OCR) text detection has
671 # completed successfully.
672 # This annotation provides the structural hierarchy for the OCR detected
673 # text.
674 # The hierarchy of an OCR extracted text structure is like this:
675 # TextAnnotation -&gt; Page -&gt; Block -&gt; Paragraph -&gt; Word -&gt; Symbol
676 # Each structural component, starting from Page, may further have their own
677 # properties. Properties describe detected languages, breaks etc.. Please refer
678 # to the TextAnnotation.TextProperty message definition below for more
679 # detail.
680 &quot;pages&quot;: [ # List of pages detected by OCR.
681 { # Detected page from OCR.
682 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the page. Range [0, 1].
683 &quot;height&quot;: 42, # Page height. For PDFs the unit is points. For images (including
684 # TIFFs) the unit is pixels.
685 &quot;width&quot;: 42, # Page width. For PDFs the unit is points. For images (including
686 # TIFFs) the unit is pixels.
687 &quot;blocks&quot;: [ # List of blocks of text, images etc on this page.
688 { # Logical element on the page.
689 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the block.
690 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
691 { # Detected language for a structural component.
692 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
693 # information, see
694 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
695 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
696 },
697 ],
698 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
699 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
700 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
701 },
702 },
703 &quot;blockType&quot;: &quot;A String&quot;, # Detected block type (text, image etc) for this block.
704 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the block.
705 # The vertices are in the order of top-left, top-right, bottom-right,
706 # bottom-left. When a rotation of the bounding box is detected the rotation
707 # is represented as around the top-left corner as defined when the text is
708 # read in the &#x27;natural&#x27; orientation.
709 # For example:
710 #
711 # * when the text is horizontal it might look like:
712 #
713 # 0----1
714 # | |
715 # 3----2
716 #
717 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
718 #
719 # 2----3
720 # | |
721 # 1----0
722 #
723 # and the vertex order will still be (0, 1, 2, 3).
724 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
725 { # A vertex represents a 2D point in the image.
726 # NOTE: the normalized vertex coordinates are relative to the original image
727 # and range from 0 to 1.
728 &quot;y&quot;: 3.14, # Y coordinate.
729 &quot;x&quot;: 3.14, # X coordinate.
730 },
731 ],
732 &quot;vertices&quot;: [ # The bounding polygon vertices.
733 { # A vertex represents a 2D point in the image.
734 # NOTE: the vertex coordinates are in the same scale as the original image.
735 &quot;y&quot;: 42, # Y coordinate.
736 &quot;x&quot;: 42, # X coordinate.
737 },
738 ],
739 },
740 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the block. Range [0, 1].
741 &quot;paragraphs&quot;: [ # List of paragraphs in this block (if this blocks is of type text).
742 { # Structural unit of text representing a number of words in certain order.
743 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the paragraph.
744 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
745 { # Detected language for a structural component.
746 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
747 # information, see
748 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
749 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
750 },
751 ],
752 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
753 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
754 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
755 },
756 },
757 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the paragraph.
758 # The vertices are in the order of top-left, top-right, bottom-right,
759 # bottom-left. When a rotation of the bounding box is detected the rotation
760 # is represented as around the top-left corner as defined when the text is
761 # read in the &#x27;natural&#x27; orientation.
762 # For example:
763 # * when the text is horizontal it might look like:
764 # 0----1
765 # | |
766 # 3----2
767 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
768 # 2----3
769 # | |
770 # 1----0
771 # and the vertex order will still be (0, 1, 2, 3).
772 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
773 { # A vertex represents a 2D point in the image.
774 # NOTE: the normalized vertex coordinates are relative to the original image
775 # and range from 0 to 1.
776 &quot;y&quot;: 3.14, # Y coordinate.
777 &quot;x&quot;: 3.14, # X coordinate.
778 },
779 ],
780 &quot;vertices&quot;: [ # The bounding polygon vertices.
781 { # A vertex represents a 2D point in the image.
782 # NOTE: the vertex coordinates are in the same scale as the original image.
783 &quot;y&quot;: 42, # Y coordinate.
784 &quot;x&quot;: 42, # X coordinate.
785 },
786 ],
787 },
788 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the paragraph. Range [0, 1].
789 &quot;words&quot;: [ # List of all words in this paragraph.
790 { # A word representation.
791 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the word.
792 # The vertices are in the order of top-left, top-right, bottom-right,
793 # bottom-left. When a rotation of the bounding box is detected the rotation
794 # is represented as around the top-left corner as defined when the text is
795 # read in the &#x27;natural&#x27; orientation.
796 # For example:
797 # * when the text is horizontal it might look like:
798 # 0----1
799 # | |
800 # 3----2
801 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
802 # 2----3
803 # | |
804 # 1----0
805 # and the vertex order will still be (0, 1, 2, 3).
806 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
807 { # A vertex represents a 2D point in the image.
808 # NOTE: the normalized vertex coordinates are relative to the original image
809 # and range from 0 to 1.
810 &quot;y&quot;: 3.14, # Y coordinate.
811 &quot;x&quot;: 3.14, # X coordinate.
812 },
813 ],
814 &quot;vertices&quot;: [ # The bounding polygon vertices.
815 { # A vertex represents a 2D point in the image.
816 # NOTE: the vertex coordinates are in the same scale as the original image.
817 &quot;y&quot;: 42, # Y coordinate.
818 &quot;x&quot;: 42, # X coordinate.
819 },
820 ],
821 },
822 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the word. Range [0, 1].
823 &quot;symbols&quot;: [ # List of symbols in the word.
824 # The order of the symbols follows the natural reading order.
825 { # A single symbol representation.
826 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the symbol.
827 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
828 { # Detected language for a structural component.
829 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
830 # information, see
831 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
832 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
833 },
834 ],
835 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
836 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
837 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
838 },
839 },
840 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the symbol.
841 # The vertices are in the order of top-left, top-right, bottom-right,
842 # bottom-left. When a rotation of the bounding box is detected the rotation
843 # is represented as around the top-left corner as defined when the text is
844 # read in the &#x27;natural&#x27; orientation.
845 # For example:
846 # * when the text is horizontal it might look like:
847 # 0----1
848 # | |
849 # 3----2
850 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
851 # 2----3
852 # | |
853 # 1----0
854 # and the vertex order will still be (0, 1, 2, 3).
855 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
856 { # A vertex represents a 2D point in the image.
857 # NOTE: the normalized vertex coordinates are relative to the original image
858 # and range from 0 to 1.
859 &quot;y&quot;: 3.14, # Y coordinate.
860 &quot;x&quot;: 3.14, # X coordinate.
861 },
862 ],
863 &quot;vertices&quot;: [ # The bounding polygon vertices.
864 { # A vertex represents a 2D point in the image.
865 # NOTE: the vertex coordinates are in the same scale as the original image.
866 &quot;y&quot;: 42, # Y coordinate.
867 &quot;x&quot;: 42, # X coordinate.
868 },
869 ],
870 },
871 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the symbol. Range [0, 1].
872 &quot;text&quot;: &quot;A String&quot;, # The actual UTF-8 representation of the symbol.
873 },
874 ],
875 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the word.
876 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
877 { # Detected language for a structural component.
878 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
879 # information, see
880 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
881 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
882 },
883 ],
884 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
885 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
886 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
887 },
888 },
889 },
890 ],
891 },
892 ],
893 },
894 ],
895 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected on the page.
896 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
897 { # Detected language for a structural component.
898 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
899 # information, see
900 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
901 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
902 },
903 ],
904 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
905 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
906 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
907 },
908 },
909 },
910 ],
911 &quot;text&quot;: &quot;A String&quot;, # UTF-8 text detected on the pages.
912 },
913 &quot;textAnnotations&quot;: [ # If present, text (OCR) detection has completed successfully.
914 { # Set of detected entity features.
915 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
916 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
917 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
918 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
919 # detected distant towering building, even though the confidence that
920 # there is a tower in each image may be the same. Range [0, 1].
921 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
922 # fields, such a score or string that qualifies the entity.
923 { # A `Property` consists of a user-supplied name/value pair.
924 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
925 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
926 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
927 },
928 ],
929 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
930 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
931 # `LocationInfo` elements can be present because one location may
932 # indicate the location of the scene in the image, and another location
933 # may indicate the location of the place where the image was taken.
934 # Location information is usually present for landmarks.
935 { # Detected entity location information.
936 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
937 # of doubles representing degrees latitude and degrees longitude. Unless
938 # specified otherwise, this must conform to the
939 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
940 # standard&lt;/a&gt;. Values must be within normalized ranges.
941 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
942 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
943 },
944 },
945 ],
946 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
947 # [Google Knowledge Graph Search
948 # API](https://developers.google.com/knowledge-graph/).
949 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
950 # The accuracy of the entity detection in an image.
951 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
952 # this field represents the confidence that there is a tower in the query
953 # image. Range [0, 1].
954 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
955 # for `LABEL_DETECTION` features.
956 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
957 { # A vertex represents a 2D point in the image.
958 # NOTE: the normalized vertex coordinates are relative to the original image
959 # and range from 0 to 1.
960 &quot;y&quot;: 3.14, # Y coordinate.
961 &quot;x&quot;: 3.14, # X coordinate.
962 },
963 ],
964 &quot;vertices&quot;: [ # The bounding polygon vertices.
965 { # A vertex represents a 2D point in the image.
966 # NOTE: the vertex coordinates are in the same scale as the original image.
967 &quot;y&quot;: 42, # Y coordinate.
968 &quot;x&quot;: 42, # X coordinate.
969 },
970 ],
971 },
972 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
973 # `description` is expressed.
974 },
975 ],
976 &quot;imagePropertiesAnnotation&quot;: { # Stores image properties, such as dominant colors. # If present, image properties were extracted successfully.
977 &quot;dominantColors&quot;: { # Set of dominant colors and their corresponding scores. # If present, dominant colors completed successfully.
978 &quot;colors&quot;: [ # RGB color values with their score and pixel fraction.
979 { # Color information consists of RGB channels, score, and the fraction of
980 # the image that the color occupies in the image.
981 &quot;pixelFraction&quot;: 3.14, # The fraction of pixels the color occupies in the image.
982 # Value in range [0, 1].
983 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed # RGB components of the color.
984 # for simplicity of conversion to/from color representations in various
985 # languages over compactness; for example, the fields of this representation
986 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
987 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
988 # method in iOS; and, with just a little work, it can be easily formatted into
989 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
990 #
991 # Note: this proto does not carry information about the absolute color space
992 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
993 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
994 # space.
995 #
996 # Example (Java):
997 #
998 # import com.google.type.Color;
999 #
1000 # // ...
1001 # public static java.awt.Color fromProto(Color protocolor) {
1002 # float alpha = protocolor.hasAlpha()
1003 # ? protocolor.getAlpha().getValue()
1004 # : 1.0;
1005 #
1006 # return new java.awt.Color(
1007 # protocolor.getRed(),
1008 # protocolor.getGreen(),
1009 # protocolor.getBlue(),
1010 # alpha);
1011 # }
1012 #
1013 # public static Color toProto(java.awt.Color color) {
1014 # float red = (float) color.getRed();
1015 # float green = (float) color.getGreen();
1016 # float blue = (float) color.getBlue();
1017 # float denominator = 255.0;
1018 # Color.Builder resultBuilder =
1019 # Color
1020 # .newBuilder()
1021 # .setRed(red / denominator)
1022 # .setGreen(green / denominator)
1023 # .setBlue(blue / denominator);
1024 # int alpha = color.getAlpha();
1025 # if (alpha != 255) {
1026 # result.setAlpha(
1027 # FloatValue
1028 # .newBuilder()
1029 # .setValue(((float) alpha) / denominator)
1030 # .build());
1031 # }
1032 # return resultBuilder.build();
1033 # }
1034 # // ...
1035 #
1036 # Example (iOS / Obj-C):
1037 #
1038 # // ...
1039 # static UIColor* fromProto(Color* protocolor) {
1040 # float red = [protocolor red];
1041 # float green = [protocolor green];
1042 # float blue = [protocolor blue];
1043 # FloatValue* alpha_wrapper = [protocolor alpha];
1044 # float alpha = 1.0;
1045 # if (alpha_wrapper != nil) {
1046 # alpha = [alpha_wrapper value];
1047 # }
1048 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1049 # }
1050 #
1051 # static Color* toProto(UIColor* color) {
1052 # CGFloat red, green, blue, alpha;
1053 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
1054 # return nil;
1055 # }
1056 # Color* result = [[Color alloc] init];
1057 # [result setRed:red];
1058 # [result setGreen:green];
1059 # [result setBlue:blue];
1060 # if (alpha &lt;= 0.9999) {
1061 # [result setAlpha:floatWrapperWithValue(alpha)];
1062 # }
1063 # [result autorelease];
1064 # return result;
1065 # }
1066 # // ...
1067 #
1068 # Example (JavaScript):
1069 #
1070 # // ...
1071 #
1072 # var protoToCssColor = function(rgb_color) {
1073 # var redFrac = rgb_color.red || 0.0;
1074 # var greenFrac = rgb_color.green || 0.0;
1075 # var blueFrac = rgb_color.blue || 0.0;
1076 # var red = Math.floor(redFrac * 255);
1077 # var green = Math.floor(greenFrac * 255);
1078 # var blue = Math.floor(blueFrac * 255);
1079 #
1080 # if (!(&#x27;alpha&#x27; in rgb_color)) {
1081 # return rgbToCssColor_(red, green, blue);
1082 # }
1083 #
1084 # var alphaFrac = rgb_color.alpha.value || 0.0;
1085 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
1086 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
1087 # };
1088 #
1089 # var rgbToCssColor_ = function(red, green, blue) {
1090 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
1091 # var hexString = rgbNumber.toString(16);
1092 # var missingZeros = 6 - hexString.length;
1093 # var resultBuilder = [&#x27;#&#x27;];
1094 # for (var i = 0; i &lt; missingZeros; i++) {
1095 # resultBuilder.push(&#x27;0&#x27;);
1096 # }
1097 # resultBuilder.push(hexString);
1098 # return resultBuilder.join(&#x27;&#x27;);
1099 # };
1100 #
1101 # // ...
1102 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
1103 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
1104 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1105 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is,
1106 # the final pixel color is defined by the equation:
1107 #
1108 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1109 #
1110 # This means that a value of 1.0 corresponds to a solid color, whereas
1111 # a value of 0.0 corresponds to a completely transparent color. This
1112 # uses a wrapper message rather than a simple float scalar so that it is
1113 # possible to distinguish between a default value and the value being unset.
1114 # If omitted, this color object is to be rendered as a solid color
1115 # (as if the alpha value had been explicitly given with a value of 1.0).
1116 },
1117 &quot;score&quot;: 3.14, # Image-specific score for this color. Value in range [0, 1].
1118 },
1119 ],
1120 },
1121 },
1122 &quot;logoAnnotations&quot;: [ # If present, logo detection has completed successfully.
1123 { # Set of detected entity features.
1124 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1125 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1126 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1127 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1128 # detected distant towering building, even though the confidence that
1129 # there is a tower in each image may be the same. Range [0, 1].
1130 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
1131 # fields, such a score or string that qualifies the entity.
1132 { # A `Property` consists of a user-supplied name/value pair.
1133 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1134 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
1135 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1136 },
1137 ],
1138 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1139 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
1140 # `LocationInfo` elements can be present because one location may
1141 # indicate the location of the scene in the image, and another location
1142 # may indicate the location of the place where the image was taken.
1143 # Location information is usually present for landmarks.
1144 { # Detected entity location information.
1145 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
1146 # of doubles representing degrees latitude and degrees longitude. Unless
1147 # specified otherwise, this must conform to the
1148 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1149 # standard&lt;/a&gt;. Values must be within normalized ranges.
1150 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1151 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1152 },
1153 },
1154 ],
1155 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1156 # [Google Knowledge Graph Search
1157 # API](https://developers.google.com/knowledge-graph/).
1158 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
1159 # The accuracy of the entity detection in an image.
1160 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
1161 # this field represents the confidence that there is a tower in the query
1162 # image. Range [0, 1].
1163 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
1164 # for `LABEL_DETECTION` features.
1165 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1166 { # A vertex represents a 2D point in the image.
1167 # NOTE: the normalized vertex coordinates are relative to the original image
1168 # and range from 0 to 1.
1169 &quot;y&quot;: 3.14, # Y coordinate.
1170 &quot;x&quot;: 3.14, # X coordinate.
1171 },
1172 ],
1173 &quot;vertices&quot;: [ # The bounding polygon vertices.
1174 { # A vertex represents a 2D point in the image.
1175 # NOTE: the vertex coordinates are in the same scale as the original image.
1176 &quot;y&quot;: 42, # Y coordinate.
1177 &quot;x&quot;: 42, # X coordinate.
1178 },
1179 ],
1180 },
1181 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1182 # `description` is expressed.
1183 },
1184 ],
1185 &quot;context&quot;: { # If an image was produced from a file (e.g. a PDF), this message gives # If present, contextual information is needed to understand where this image
1186 # comes from.
1187 # information about the source of that image.
1188 &quot;uri&quot;: &quot;A String&quot;, # The URI of the file used to produce the image.
1189 &quot;pageNumber&quot;: 42, # If the file was a PDF or TIFF, this field gives the page number within
1190 # the file used to produce the image.
1191 },
1192 &quot;webDetection&quot;: { # Relevant information for the image from the Internet. # If present, web detection has completed successfully.
1193 &quot;visuallySimilarImages&quot;: [ # The visually similar image results.
1194 { # Metadata for online images.
1195 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1196 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1197 },
1198 ],
1199 &quot;bestGuessLabels&quot;: [ # The service&#x27;s best guess as to the topic of the request image.
1200 # Inferred from similar images on the open web.
1201 { # Label to provide extra metadata for the web detection.
1202 &quot;label&quot;: &quot;A String&quot;, # Label for extra metadata.
1203 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code for `label`, such as &quot;en-US&quot; or &quot;sr-Latn&quot;.
1204 # For more information, see
1205 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1206 },
1207 ],
1208 &quot;fullMatchingImages&quot;: [ # Fully matching images from the Internet.
1209 # Can include resized copies of the query image.
1210 { # Metadata for online images.
1211 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1212 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1213 },
1214 ],
1215 &quot;webEntities&quot;: [ # Deduced entities from similar images on the Internet.
1216 { # Entity deduced from similar images on the Internet.
1217 &quot;entityId&quot;: &quot;A String&quot;, # Opaque entity ID.
1218 &quot;description&quot;: &quot;A String&quot;, # Canonical description of the entity, in English.
1219 &quot;score&quot;: 3.14, # Overall relevancy score for the entity.
1220 # Not normalized and not comparable across different image queries.
1221 },
1222 ],
1223 &quot;pagesWithMatchingImages&quot;: [ # Web pages containing the matching images from the Internet.
1224 { # Metadata for web pages.
1225 &quot;pageTitle&quot;: &quot;A String&quot;, # Title for the web page, may contain HTML markups.
1226 &quot;fullMatchingImages&quot;: [ # Fully matching images on the page.
1227 # Can include resized copies of the query image.
1228 { # Metadata for online images.
1229 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1230 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1231 },
1232 ],
1233 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the web page.
1234 &quot;partialMatchingImages&quot;: [ # Partial matching images on the page.
1235 # Those images are similar enough to share some key-point features. For
1236 # example an original image will likely have partial matching for its
1237 # crops.
1238 { # Metadata for online images.
1239 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1240 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1241 },
1242 ],
1243 &quot;url&quot;: &quot;A String&quot;, # The result web page URL.
1244 },
1245 ],
1246 &quot;partialMatchingImages&quot;: [ # Partial matching images from the Internet.
1247 # Those images are similar enough to share some key-point features. For
1248 # example an original image will likely have partial matching for its crops.
1249 { # Metadata for online images.
1250 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1251 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1252 },
1253 ],
1254 },
1255 &quot;safeSearchAnnotation&quot;: { # Set of features pertaining to the image, computed by computer vision # If present, safe-search annotation has completed successfully.
1256 # methods over safe-search verticals (for example, adult, spoof, medical,
1257 # violence).
1258 &quot;medical&quot;: &quot;A String&quot;, # Likelihood that this is a medical image.
1259 &quot;racy&quot;: &quot;A String&quot;, # Likelihood that the request image contains racy content. Racy content may
1260 # include (but is not limited to) skimpy or sheer clothing, strategically
1261 # covered nudity, lewd or provocative poses, or close-ups of sensitive
1262 # body areas.
1263 &quot;violence&quot;: &quot;A String&quot;, # Likelihood that this image contains violent content.
1264 &quot;adult&quot;: &quot;A String&quot;, # Represents the adult content likelihood for the image. Adult content may
1265 # contain elements such as nudity, pornographic images or cartoons, or
1266 # sexual activities.
1267 &quot;spoof&quot;: &quot;A String&quot;, # Spoof likelihood. The likelihood that an modification
1268 # was made to the image&#x27;s canonical version to make it appear
1269 # funny or offensive.
1270 },
1271 },
1272 ],
1273 }</pre>
1274</div>
1275
1276<div class="method">
1277 <code class="details" id="asyncBatchAnnotate">asyncBatchAnnotate(parent, body=None, x__xgafv=None)</code>
1278 <pre>Run asynchronous image detection and annotation for a list of images.
1279
1280Progress and results can be retrieved through the
1281`google.longrunning.Operations` interface.
1282`Operation.metadata` contains `OperationMetadata` (metadata).
1283`Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results).
1284
1285This service will write image annotation outputs to json files in customer
1286GCS bucket, each json file containing BatchAnnotateImagesResponse proto.
1287
1288Args:
1289 parent: string, Optional. Target project and location to make a call.
1290
1291Format: `projects/{project-id}/locations/{location-id}`.
1292
1293If no parent is specified, a region will be chosen automatically.
1294
1295Supported location-ids:
1296 `us`: USA country only,
1297 `asia`: East asia areas, like Japan, Taiwan,
1298 `eu`: The European Union.
1299
1300Example: `projects/project-A/locations/eu`. (required)
1301 body: object, The request body.
1302 The object takes the form of:
1303
1304{ # Request for async image annotation for a list of images.
1305 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
1306 #
1307 # Format: `projects/{project-id}/locations/{location-id}`.
1308 #
1309 # If no parent is specified, a region will be chosen automatically.
1310 #
1311 # Supported location-ids:
1312 # `us`: USA country only,
1313 # `asia`: East asia areas, like Japan, Taiwan,
1314 # `eu`: The European Union.
1315 #
1316 # Example: `projects/project-A/locations/eu`.
1317 &quot;outputConfig&quot;: { # The desired output location and metadata. # Required. The desired output location and metadata (e.g. format).
1318 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output will be written to. # The Google Cloud Storage location to write the output(s) to.
1319 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI prefix where the results will be stored. Results
1320 # will be in JSON format and preceded by its corresponding input URI prefix.
1321 # This field can either represent a gcs file prefix or gcs directory. In
1322 # either case, the uri should be unique because in order to get all of the
1323 # output files, you will need to do a wildcard gcs search on the uri prefix
1324 # you provide.
1325 #
1326 # Examples:
1327 #
1328 # * File Prefix: gs://bucket-name/here/filenameprefix The output files
1329 # will be created in gs://bucket-name/here/ and the names of the
1330 # output files will begin with &quot;filenameprefix&quot;.
1331 #
1332 # * Directory Prefix: gs://bucket-name/some/location/ The output files
1333 # will be created in gs://bucket-name/some/location/ and the names of the
1334 # output files could be anything because there was no filename prefix
1335 # specified.
1336 #
1337 # If multiple outputs, each response is still AnnotateFileResponse, each of
1338 # which contains some subset of the full list of AnnotateImageResponse.
1339 # Multiple outputs can happen if, for example, the output JSON is too large
1340 # and overflows into multiple sharded files.
1341 },
1342 &quot;batchSize&quot;: 42, # The max number of response protos to put into each output JSON file on
1343 # Google Cloud Storage.
1344 # The valid range is [1, 100]. If not specified, the default value is 20.
1345 #
1346 # For example, for one pdf file with 100 pages, 100 response protos will
1347 # be generated. If `batch_size` = 20, then 5 json files each
1348 # containing 20 response protos will be written under the prefix
1349 # `gcs_destination`.`uri`.
1350 #
1351 # Currently, batch_size only applies to GcsDestination, with potential future
1352 # support for other output configurations.
1353 },
1354 &quot;requests&quot;: [ # Required. Individual image annotation requests for this batch.
1355 { # Request for performing Google Cloud Vision API tasks over a user-provided
1356 # image, with user-requested features, and with context information.
1357 &quot;image&quot;: { # Client image to perform Google Cloud Vision API tasks over. # The image to be processed.
1358 &quot;content&quot;: &quot;A String&quot;, # Image content, represented as a stream of bytes.
1359 # Note: As with all `bytes` fields, protobuffers use a pure binary
1360 # representation, whereas JSON representations use base64.
1361 &quot;source&quot;: { # External image source (Google Cloud Storage or web URL image location). # Google Cloud Storage image location, or publicly-accessible image
1362 # URL. If both `content` and `source` are provided for an image, `content`
1363 # takes precedence and is used to perform the image annotation request.
1364 &quot;imageUri&quot;: &quot;A String&quot;, # The URI of the source image. Can be either:
1365 #
1366 # 1. A Google Cloud Storage URI of the form
1367 # `gs://bucket_name/object_name`. Object versioning is not supported. See
1368 # [Google Cloud Storage Request
1369 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more
1370 # info.
1371 #
1372 # 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
1373 # HTTP/HTTPS URLs, Google cannot guarantee that the request will be
1374 # completed. Your request may fail if the specified host denies the
1375 # request (e.g. due to request throttling or DOS prevention), or if Google
1376 # throttles requests to the site for abuse prevention. You should not
1377 # depend on externally-hosted images for production applications.
1378 #
1379 # When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
1380 # precedence.
1381 &quot;gcsImageUri&quot;: &quot;A String&quot;, # **Use `image_uri` instead.**
1382 #
1383 # The Google Cloud Storage URI of the form
1384 # `gs://bucket_name/object_name`. Object versioning is not supported. See
1385 # [Google Cloud Storage Request
1386 # URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
1387 },
1388 },
1389 &quot;features&quot;: [ # Requested features.
1390 { # The type of Google Cloud Vision API detection to perform, and the maximum
1391 # number of results to return for that type. Multiple `Feature` objects can
1392 # be specified in the `features` list.
1393 &quot;type&quot;: &quot;A String&quot;, # The feature type.
1394 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
1395 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
1396 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
1397 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
1398 # &quot;builtin/latest&quot;.
1399 },
1400 ],
1401 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image.
1402 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
1403 # yields the best results since it enables automatic language detection. For
1404 # languages based on the Latin alphabet, setting `language_hints` is not
1405 # needed. In rare cases, when the language of the text in the image is known,
1406 # setting a hint will help get better results (although it will be a
1407 # significant hindrance if the hint is wrong). Text detection returns an
1408 # error if one or more of the specified languages is not one of the
1409 # [supported languages](https://cloud.google.com/vision/docs/languages).
1410 &quot;A String&quot;,
1411 ],
1412 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
1413 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
1414 },
1415 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
1416 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
1417 # of doubles representing degrees latitude and degrees longitude. Unless
1418 # specified otherwise, this must conform to the
1419 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1420 # standard&lt;/a&gt;. Values must be within normalized ranges.
1421 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1422 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1423 },
1424 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
1425 # of doubles representing degrees latitude and degrees longitude. Unless
1426 # specified otherwise, this must conform to the
1427 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1428 # standard&lt;/a&gt;. Values must be within normalized ranges.
1429 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1430 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1431 },
1432 },
1433 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
1434 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
1435 # of the image. For example, if the desired aspect ratio is 4/3, the
1436 # corresponding float value should be 1.33333. If not specified, the
1437 # best possible crop is returned. The number of provided aspect ratios is
1438 # limited to a maximum of 16; any aspect ratios provided after the 16th are
1439 # ignored.
1440 3.14,
1441 ],
1442 },
1443 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
1444 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
1445 # on Product labels. We currently support an AND of OR of key-value
1446 # expressions, where each expression within an OR must have the same key. An
1447 # &#x27;=&#x27; should be used to connect the key and value.
1448 #
1449 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
1450 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
1451 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
1452 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
1453 #
1454 # Format is:
1455 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
1456 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
1457 # If it is not specified, system discretion will be applied.
1458 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1459 { # A vertex represents a 2D point in the image.
1460 # NOTE: the normalized vertex coordinates are relative to the original image
1461 # and range from 0 to 1.
1462 &quot;y&quot;: 3.14, # Y coordinate.
1463 &quot;x&quot;: 3.14, # X coordinate.
1464 },
1465 ],
1466 &quot;vertices&quot;: [ # The bounding polygon vertices.
1467 { # A vertex represents a 2D point in the image.
1468 # NOTE: the vertex coordinates are in the same scale as the original image.
1469 &quot;y&quot;: 42, # Y coordinate.
1470 &quot;x&quot;: 42, # X coordinate.
1471 },
1472 ],
1473 },
1474 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
1475 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
1476 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
1477 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
1478 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
1479 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
1480 # migrate existing products to these categories as well.
1481 &quot;A String&quot;,
1482 ],
1483 },
1484 },
1485 },
1486 ],
1487 }
1488
1489 x__xgafv: string, V1 error format.
1490 Allowed values
1491 1 - v1 error format
1492 2 - v2 error format
1493
1494Returns:
1495 An object of the form:
1496
1497 { # This resource represents a long-running operation that is the result of a
1498 # network API call.
1499 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1500 # different programming environments, including REST APIs and RPC APIs. It is
1501 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1502 # three pieces of data: error code, error message, and error details.
1503 #
1504 # You can find out more about this error model and how to work with it in the
1505 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1506 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1507 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1508 # user-facing error message should be localized and sent in the
1509 # google.rpc.Status.details field, or localized by the client.
1510 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1511 # message types for APIs to use.
1512 {
1513 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1514 },
1515 ],
1516 },
1517 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1518 # contains progress information and common metadata such as create time.
1519 # Some services might not provide such metadata. Any method that returns a
1520 # long-running operation should document the metadata type, if any.
1521 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1522 },
1523 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1524 # If `true`, the operation is completed, and either `error` or `response` is
1525 # available.
1526 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
1527 # method returns no data on success, such as `Delete`, the response is
1528 # `google.protobuf.Empty`. If the original method is standard
1529 # `Get`/`Create`/`Update`, the response should be the resource. For other
1530 # methods, the response should have the type `XxxResponse`, where `Xxx`
1531 # is the original method name. For example, if the original method name
1532 # is `TakeSnapshot()`, the inferred response type is
1533 # `TakeSnapshotResponse`.
1534 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1535 },
1536 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
1537 # originally returns it. If you use the default HTTP mapping, the
1538 # `name` should be a resource name ending with `operations/{unique_id}`.
1539 }</pre>
1540</div>
1541
1542</body></html>