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