blob: 11524a94425ec9b8f9b2543466d532c331a3018d [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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_v1.html">Cloud Vision API</a> . <a href="vision_v1.files.html">files</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#annotate">annotate(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Service that performs image detection and annotation for a batch of files.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#asyncBatchAnnotate">asyncBatchAnnotate(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Run asynchronous image detection and annotation for a list of generic</p>
83<h3>Method Details</h3>
84<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070085 <code class="details" id="annotate">annotate(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086 <pre>Service that performs image detection and annotation for a batch of files.
Bu Sun Kim65020912020-05-20 12:08:20 -070087Now only &quot;application/pdf&quot;, &quot;image/tiff&quot; and &quot;image/gif&quot; are supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088
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:
Dan O'Mearadd494642020-05-01 07:42:23 -070095 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 The object takes the form of:
97
98{ # A list of requests to annotate files using the BatchAnnotateFiles API.
Bu Sun Kim65020912020-05-20 12:08:20 -070099 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
100 #
101 # Format: `projects/{project-id}/locations/{location-id}`.
102 #
103 # If no parent is specified, a region will be chosen automatically.
104 #
105 # Supported location-ids:
106 # `us`: USA country only,
107 # `asia`: East asia areas, like Japan, Taiwan,
108 # `eu`: The European Union.
109 #
110 # Example: `projects/project-A/locations/eu`.
111 &quot;requests&quot;: [ # Required. The list of file annotation requests. Right now we support only one
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 # AnnotateFileRequest in BatchAnnotateFilesRequest.
113 { # A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 &quot;inputConfig&quot;: { # The desired input location and metadata. # Required. Information about the input file.
115 &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.
116 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
117 # Google Cloud Storage object. Wildcards are not currently supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700119 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
120 # &quot;image/gif&quot; are supported. Wildcards are not supported.
121 &quot;content&quot;: &quot;A String&quot;, # File 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 #
125 # Currently, this field only works for BatchAnnotateFiles requests. It does
126 # not work for AsyncBatchAnnotateFiles requests.
127 },
128 &quot;features&quot;: [ # Required. Requested features.
129 { # The type of Google Cloud Vision API detection to perform, and the maximum
130 # number of results to return for that type. Multiple `Feature` objects can
131 # be specified in the `features` list.
132 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
133 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
134 # &quot;builtin/latest&quot;.
135 &quot;type&quot;: &quot;A String&quot;, # The feature type.
136 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
137 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
138 },
139 ],
140 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image(s) in the file.
141 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 # yields the best results since it enables automatic language detection. For
143 # languages based on the Latin alphabet, setting `language_hints` is not
144 # needed. In rare cases, when the language of the text in the image is known,
145 # setting a hint will help get better results (although it will be a
146 # significant hindrance if the hint is wrong). Text detection returns an
147 # error if one or more of the specified languages is not one of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700148 # [supported languages](https://cloud.google.com/vision/docs/languages).
Bu Sun Kim65020912020-05-20 12:08:20 -0700149 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
152 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
153 },
154 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
155 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
156 # of doubles representing degrees latitude and degrees longitude. Unless
157 # specified otherwise, this must conform to the
158 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
159 # standard&lt;/a&gt;. Values must be within normalized ranges.
160 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
161 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
162 },
163 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
164 # of doubles representing degrees latitude and degrees longitude. Unless
165 # specified otherwise, this must conform to the
166 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
167 # standard&lt;/a&gt;. Values must be within normalized ranges.
168 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
169 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700170 },
171 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
173 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 # of the image. For example, if the desired aspect ratio is 4/3, the
175 # corresponding float value should be 1.33333. If not specified, the
176 # best possible crop is returned. The number of provided aspect ratios is
177 # limited to a maximum of 16; any aspect ratios provided after the 16th are
178 # ignored.
179 3.14,
180 ],
181 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
183 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
184 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
185 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
186 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
187 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
188 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
189 # migrate existing products to these categories as well.
190 &quot;A String&quot;,
191 ],
192 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
193 # on Product labels. We currently support an AND of OR of key-value
194 # expressions, where each expression within an OR must have the same key. An
195 # &#x27;=&#x27; should be used to connect the key and value.
196 #
197 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
198 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
199 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
200 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
201 #
202 # Format is:
203 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
204 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
205 # If it is not specified, system discretion will be applied.
206 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
207 { # A vertex represents a 2D point in the image.
208 # NOTE: the normalized vertex coordinates are relative to the original image
209 # and range from 0 to 1.
210 &quot;y&quot;: 3.14, # Y coordinate.
211 &quot;x&quot;: 3.14, # X coordinate.
212 },
213 ],
214 &quot;vertices&quot;: [ # The bounding polygon vertices.
215 { # A vertex represents a 2D point in the image.
216 # NOTE: the vertex coordinates are in the same scale as the original image.
217 &quot;y&quot;: 42, # Y coordinate.
218 &quot;x&quot;: 42, # X coordinate.
219 },
220 ],
221 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700222 },
223 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 &quot;pages&quot;: [ # Pages of the file to perform image annotation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 #
226 # Pages starts from 1, we assume the first page of the file is page 1.
227 # At most 5 pages are supported per request. Pages can be negative.
228 #
229 # Page 1 means the first page.
230 # Page 2 means the second page.
231 # Page -1 means the last page.
232 # Page -2 means the second to the last page.
233 #
234 # If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
235 #
236 # If this field is empty, by default the service performs image annotation
237 # for the first 5 pages of the file.
238 42,
239 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700240 },
241 ],
242 }
243
244 x__xgafv: string, V1 error format.
245 Allowed values
246 1 - v1 error format
247 2 - v2 error format
248
249Returns:
250 An object of the form:
251
252 { # A list of file annotation responses.
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 &quot;responses&quot;: [ # The list of file annotation responses, each response corresponding to each
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 # AnnotateFileRequest in BatchAnnotateFilesRequest.
255 { # Response to a single file annotation request. A file may contain one or more
256 # images, which individually have their own responses.
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 &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
258 # `responses` field will not be set in this case.
259 # different programming environments, including REST APIs and RPC APIs. It is
260 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
261 # three pieces of data: error code, error message, and error details.
262 #
263 # You can find out more about this error model and how to work with it in the
264 # [API Design Guide](https://cloud.google.com/apis/design/errors).
265 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
266 # message types for APIs to use.
267 {
268 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
269 },
270 ],
271 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
272 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
273 # user-facing error message should be localized and sent in the
274 # google.rpc.Status.details field, or localized by the client.
Dan O'Mearadd494642020-05-01 07:42:23 -0700275 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700276 &quot;responses&quot;: [ # Individual responses to images found within the file. This field will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 # empty if the `error` field is set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278 { # Response to an image annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 &quot;faceAnnotations&quot;: [ # If present, face detection has completed successfully.
280 { # A face annotation object contains the results of face detection.
281 &quot;tiltAngle&quot;: 3.14, # Pitch angle, which indicates the upwards/downwards angle that the face is
282 # pointing relative to the image&#x27;s horizontal plane. Range [-180,180].
283 &quot;fdBoundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The `fd_bounding_poly` bounding polygon is tighter than the
284 # `boundingPoly`, and encloses only the skin part of the face. Typically, it
285 # is used to eliminate the face from any image analysis that detects the
286 # &quot;amount of skin&quot; visible in an image. It is not based on the
287 # landmarker results, only on the initial face detection, hence
288 # the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
289 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
290 { # A vertex represents a 2D point in the image.
291 # NOTE: the normalized vertex coordinates are relative to the original image
292 # and range from 0 to 1.
293 &quot;y&quot;: 3.14, # Y coordinate.
294 &quot;x&quot;: 3.14, # X coordinate.
295 },
296 ],
297 &quot;vertices&quot;: [ # The bounding polygon vertices.
298 { # A vertex represents a 2D point in the image.
299 # NOTE: the vertex coordinates are in the same scale as the original image.
300 &quot;y&quot;: 42, # Y coordinate.
301 &quot;x&quot;: 42, # X coordinate.
302 },
303 ],
304 },
305 &quot;angerLikelihood&quot;: &quot;A String&quot;, # Anger likelihood.
306 &quot;landmarks&quot;: [ # Detected face landmarks.
307 { # A face-specific landmark (for example, a face feature).
308 &quot;position&quot;: { # A 3D position in the image, used primarily for Face detection landmarks. # Face landmark position.
309 # A valid Position must have both x and y coordinates.
310 # The position coordinates are in the same scale as the original image.
311 &quot;y&quot;: 3.14, # Y coordinate.
312 &quot;x&quot;: 3.14, # X coordinate.
313 &quot;z&quot;: 3.14, # Z coordinate (or depth).
314 },
315 &quot;type&quot;: &quot;A String&quot;, # Face landmark type.
316 },
317 ],
318 &quot;surpriseLikelihood&quot;: &quot;A String&quot;, # Surprise likelihood.
319 &quot;landmarkingConfidence&quot;: 3.14, # Face landmarking confidence. Range [0, 1].
320 &quot;joyLikelihood&quot;: &quot;A String&quot;, # Joy likelihood.
321 &quot;underExposedLikelihood&quot;: &quot;A String&quot;, # Under-exposed likelihood.
322 &quot;panAngle&quot;: 3.14, # Yaw angle, which indicates the leftward/rightward angle that the face is
323 # pointing relative to the vertical plane perpendicular to the image. Range
324 # [-180,180].
325 &quot;detectionConfidence&quot;: 3.14, # Detection confidence. Range [0, 1].
326 &quot;blurredLikelihood&quot;: &quot;A String&quot;, # Blurred likelihood.
327 &quot;headwearLikelihood&quot;: &quot;A String&quot;, # Headwear likelihood.
328 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the face. The coordinates of the bounding box
329 # are in the original image&#x27;s scale.
330 # The bounding box is computed to &quot;frame&quot; the face in accordance with human
331 # expectations. It is based on the landmarker results.
332 # Note that one or more x and/or y coordinates may not be generated in the
333 # `BoundingPoly` (the polygon will be unbounded) if only a partial face
334 # appears in the image to be annotated.
335 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
336 { # A vertex represents a 2D point in the image.
337 # NOTE: the normalized vertex coordinates are relative to the original image
338 # and range from 0 to 1.
339 &quot;y&quot;: 3.14, # Y coordinate.
340 &quot;x&quot;: 3.14, # X coordinate.
341 },
342 ],
343 &quot;vertices&quot;: [ # The bounding polygon vertices.
344 { # A vertex represents a 2D point in the image.
345 # NOTE: the vertex coordinates are in the same scale as the original image.
346 &quot;y&quot;: 42, # Y coordinate.
347 &quot;x&quot;: 42, # X coordinate.
348 },
349 ],
350 },
351 &quot;rollAngle&quot;: 3.14, # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
352 # of the face relative to the image vertical about the axis perpendicular to
353 # the face. Range [-180,180].
354 &quot;sorrowLikelihood&quot;: &quot;A String&quot;, # Sorrow likelihood.
355 },
356 ],
357 &quot;cropHintsAnnotation&quot;: { # Set of crop hints that are used to generate new crops when serving images. # If present, crop hints have completed successfully.
358 &quot;cropHints&quot;: [ # Crop hint results.
359 { # Single crop hint that is used to generate a new crop when serving an image.
360 &quot;confidence&quot;: 3.14, # Confidence of this being a salient region. Range [0, 1].
361 &quot;importanceFraction&quot;: 3.14, # Fraction of importance of this salient region with respect to the original
362 # image.
363 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the crop region. The coordinates of the bounding
364 # box are in the original image&#x27;s scale.
365 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
366 { # A vertex represents a 2D point in the image.
367 # NOTE: the normalized vertex coordinates are relative to the original image
368 # and range from 0 to 1.
369 &quot;y&quot;: 3.14, # Y coordinate.
370 &quot;x&quot;: 3.14, # X coordinate.
371 },
372 ],
373 &quot;vertices&quot;: [ # The bounding polygon vertices.
374 { # A vertex represents a 2D point in the image.
375 # NOTE: the vertex coordinates are in the same scale as the original image.
376 &quot;y&quot;: 42, # Y coordinate.
377 &quot;x&quot;: 42, # X coordinate.
378 },
379 ],
380 },
381 },
382 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 &quot;labelAnnotations&quot;: [ # If present, label detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700385 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
387 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 # `LocationInfo` elements can be present because one location may
389 # indicate the location of the scene in the image, and another location
390 # may indicate the location of the place where the image was taken.
391 # Location information is usually present for landmarks.
392 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700393 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 # of doubles representing degrees latitude and degrees longitude. Unless
395 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -0700396 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -0700397 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
399 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700400 },
401 },
402 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700404 # [Google Knowledge Graph Search
405 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700406 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
407 # The accuracy of the entity detection in an image.
408 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
409 # this field represents the confidence that there is a tower in the query
410 # image. Range [0, 1].
411 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
412 # `description` is expressed.
413 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700415 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 { # A vertex represents a 2D point in the image.
417 # NOTE: the normalized vertex coordinates are relative to the original image
418 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700419 &quot;y&quot;: 3.14, # Y coordinate.
420 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700421 },
422 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700424 { # A vertex represents a 2D point in the image.
425 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700426 &quot;y&quot;: 42, # Y coordinate.
427 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700428 },
429 ],
430 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700431 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
432 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
433 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
434 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
435 # detected distant towering building, even though the confidence that
436 # there is a tower in each image may be the same. Range [0, 1].
437 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 # fields, such a score or string that qualifies the entity.
439 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -0700440 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
441 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
442 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 },
444 ],
445 },
446 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700447 &quot;productSearchResults&quot;: { # Results for a product search request. # If present, product search has completed successfully.
448 &quot;indexTime&quot;: &quot;A String&quot;, # Timestamp of the index which provided these results. Products added to the
449 # product set and products removed from the product set after this time are
450 # not reflected in the current results.
451 &quot;productGroupedResults&quot;: [ # List of results grouped by products detected in the query image. Each entry
452 # corresponds to one bounding polygon in the query image, and contains the
453 # matching products specific to that region. There may be duplicate product
454 # matches in the union of all the per-product results.
455 { # Information about the products similar to a single product in a query
456 # image.
457 &quot;objectAnnotations&quot;: [ # List of generic predictions for the object in the bounding box.
458 { # Prediction for what the object in the bounding box is.
459 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
460 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
461 &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
462 # information, see
463 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
464 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 },
466 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700467 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the product detected in the query image.
468 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
469 { # A vertex represents a 2D point in the image.
470 # NOTE: the normalized vertex coordinates are relative to the original image
471 # and range from 0 to 1.
472 &quot;y&quot;: 3.14, # Y coordinate.
473 &quot;x&quot;: 3.14, # X coordinate.
474 },
475 ],
476 &quot;vertices&quot;: [ # The bounding polygon vertices.
477 { # A vertex represents a 2D point in the image.
478 # NOTE: the vertex coordinates are in the same scale as the original image.
479 &quot;y&quot;: 42, # Y coordinate.
480 &quot;x&quot;: 42, # X coordinate.
481 },
482 ],
483 },
484 &quot;results&quot;: [ # List of results, one for each product match.
485 { # Information about a product.
486 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
487 # to the query.
488 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
489 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
490 #
491 # Format is:
492 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
493 #
494 # This field is ignored when creating a product.
495 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
496 # 4096 characters long.
497 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
498 # characters long.
499 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
500 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
501 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
502 # not be used for new products.
503 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
504 # constraints can be specified based on the product_labels.
505 #
506 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
507 # strings with integer values can match a range-based restriction which is
508 # to be supported soon.
509 #
510 # Multiple values can be assigned to the same key. One product may have up to
511 # 500 product_labels.
512 #
513 # Notice that the total number of distinct product_labels over all products
514 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
515 # will refuse to work for that ProductSet.
516 { # A product label represented as a key-value pair.
517 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
518 # cannot exceed 128 bytes.
519 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
520 # exceed 128 bytes.
521 },
522 ],
523 },
524 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
525 # 1 (full confidence).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700526 },
527 ],
528 },
529 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 &quot;results&quot;: [ # List of results, one for each product match.
531 { # Information about a product.
532 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
533 # to the query.
534 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
535 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
536 #
537 # Format is:
538 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
539 #
540 # This field is ignored when creating a product.
541 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
542 # 4096 characters long.
543 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
544 # characters long.
545 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
546 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
547 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
548 # not be used for new products.
549 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
550 # constraints can be specified based on the product_labels.
551 #
552 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
553 # strings with integer values can match a range-based restriction which is
554 # to be supported soon.
555 #
556 # Multiple values can be assigned to the same key. One product may have up to
557 # 500 product_labels.
558 #
559 # Notice that the total number of distinct product_labels over all products
560 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
561 # will refuse to work for that ProductSet.
562 { # A product label represented as a key-value pair.
563 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
564 # cannot exceed 128 bytes.
565 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
566 # exceed 128 bytes.
567 },
568 ],
569 },
570 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
571 # 1 (full confidence).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700572 },
573 ],
574 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 &quot;localizedObjectAnnotations&quot;: [ # If present, localized object detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700576 # This will be sorted descending by confidence score.
577 { # Set of detected objects with bounding boxes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700578 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
579 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this object belongs. This must be populated.
580 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700581 { # A vertex represents a 2D point in the image.
582 # NOTE: the normalized vertex coordinates are relative to the original image
583 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700584 &quot;y&quot;: 3.14, # Y coordinate.
585 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700586 },
587 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700588 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589 { # A vertex represents a 2D point in the image.
590 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700591 &quot;y&quot;: 42, # Y coordinate.
592 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 },
594 ],
595 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700596 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
597 &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
598 # information, see
599 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
600 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700601 },
602 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700603 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # If set, represents the error message for the operation.
604 # Note that filled-in image annotations are guaranteed to be
605 # correct, even when `error` is set.
606 # different programming environments, including REST APIs and RPC APIs. It is
607 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
608 # three pieces of data: error code, error message, and error details.
609 #
610 # You can find out more about this error model and how to work with it in the
611 # [API Design Guide](https://cloud.google.com/apis/design/errors).
612 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
613 # message types for APIs to use.
614 {
615 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
616 },
617 ],
618 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
619 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
620 # user-facing error message should be localized and sent in the
621 # google.rpc.Status.details field, or localized by the client.
622 },
623 &quot;fullTextAnnotation&quot;: { # TextAnnotation contains a structured representation of OCR extracted text. # If present, text (OCR) detection or document (OCR) text detection has
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 # completed successfully.
625 # This annotation provides the structural hierarchy for the OCR detected
626 # text.
627 # The hierarchy of an OCR extracted text structure is like this:
Dan O'Mearadd494642020-05-01 07:42:23 -0700628 # TextAnnotation -&gt; Page -&gt; Block -&gt; Paragraph -&gt; Word -&gt; Symbol
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 # Each structural component, starting from Page, may further have their own
630 # properties. Properties describe detected languages, breaks etc.. Please refer
631 # to the TextAnnotation.TextProperty message definition below for more
632 # detail.
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 &quot;pages&quot;: [ # List of pages detected by OCR.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 { # Detected page from OCR.
Bu Sun Kim65020912020-05-20 12:08:20 -0700635 &quot;height&quot;: 42, # Page height. For PDFs the unit is points. For images (including
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636 # TIFFs) the unit is pixels.
Bu Sun Kim65020912020-05-20 12:08:20 -0700637 &quot;width&quot;: 42, # Page width. For PDFs the unit is points. For images (including
638 # TIFFs) the unit is pixels.
639 &quot;blocks&quot;: [ # List of blocks of text, images etc on this page.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 { # Logical element on the page.
Bu Sun Kim65020912020-05-20 12:08:20 -0700641 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the block.
642 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
643 { # Detected language for a structural component.
644 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
645 &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
646 # information, see
647 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
648 },
649 ],
650 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
651 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
652 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
653 },
654 },
655 &quot;blockType&quot;: &quot;A String&quot;, # Detected block type (text, image etc) for this block.
656 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the block.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700657 # The vertices are in the order of top-left, top-right, bottom-right,
658 # bottom-left. When a rotation of the bounding box is detected the rotation
659 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700660 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700661 # For example:
662 #
663 # * when the text is horizontal it might look like:
664 #
665 # 0----1
666 # | |
667 # 3----2
668 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700670 #
671 # 2----3
672 # | |
673 # 1----0
674 #
675 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700676 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700677 { # A vertex represents a 2D point in the image.
678 # NOTE: the normalized vertex coordinates are relative to the original image
679 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700680 &quot;y&quot;: 3.14, # Y coordinate.
681 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 },
683 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700684 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700685 { # A vertex represents a 2D point in the image.
686 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700687 &quot;y&quot;: 42, # Y coordinate.
688 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 },
690 ],
691 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700692 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the block. Range [0, 1].
693 &quot;paragraphs&quot;: [ # List of paragraphs in this block (if this blocks is of type text).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700694 { # Structural unit of text representing a number of words in certain order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700695 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the paragraph.
696 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
697 { # Detected language for a structural component.
698 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
699 &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
700 # information, see
701 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
702 },
703 ],
704 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
705 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
706 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
707 },
708 },
709 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the paragraph.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 # The vertices are in the order of top-left, top-right, bottom-right,
711 # bottom-left. When a rotation of the bounding box is detected the rotation
712 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700713 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700714 # For example:
715 # * when the text is horizontal it might look like:
716 # 0----1
717 # | |
718 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700720 # 2----3
721 # | |
722 # 1----0
723 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700724 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700725 { # 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 &quot;y&quot;: 3.14, # Y coordinate.
729 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 },
731 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700732 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700733 { # A vertex represents a 2D point in the image.
734 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 &quot;y&quot;: 42, # Y coordinate.
736 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737 },
738 ],
739 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the paragraph. Range [0, 1].
741 &quot;words&quot;: [ # List of all words in this paragraph.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700742 { # A word representation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700743 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the word.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 # The vertices are in the order of top-left, top-right, bottom-right,
745 # bottom-left. When a rotation of the bounding box is detected the rotation
746 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700747 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700748 # For example:
749 # * when the text is horizontal it might look like:
750 # 0----1
751 # | |
752 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700754 # 2----3
755 # | |
756 # 1----0
757 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700758 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700759 { # A vertex represents a 2D point in the image.
760 # NOTE: the normalized vertex coordinates are relative to the original image
761 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700762 &quot;y&quot;: 3.14, # Y coordinate.
763 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700764 },
765 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700766 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700767 { # A vertex represents a 2D point in the image.
768 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700769 &quot;y&quot;: 42, # Y coordinate.
770 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700771 },
772 ],
773 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700774 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the word. Range [0, 1].
775 &quot;symbols&quot;: [ # List of symbols in the word.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700776 # The order of the symbols follows the natural reading order.
777 { # A single symbol representation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the symbol.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700779 # The vertices are in the order of top-left, top-right, bottom-right,
780 # bottom-left. When a rotation of the bounding box is detected the rotation
781 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700782 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700783 # For example:
784 # * when the text is horizontal it might look like:
785 # 0----1
786 # | |
787 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700788 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700789 # 2----3
790 # | |
791 # 1----0
Dan O'Mearadd494642020-05-01 07:42:23 -0700792 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700793 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700794 { # A vertex represents a 2D point in the image.
795 # NOTE: the normalized vertex coordinates are relative to the original image
796 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 &quot;y&quot;: 3.14, # Y coordinate.
798 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700799 },
800 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700802 { # A vertex represents a 2D point in the image.
803 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700804 &quot;y&quot;: 42, # Y coordinate.
805 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700806 },
807 ],
808 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700809 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the symbol. Range [0, 1].
810 &quot;text&quot;: &quot;A String&quot;, # The actual UTF-8 representation of the symbol.
811 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the symbol.
812 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700813 { # Detected language for a structural component.
Bu Sun Kim65020912020-05-20 12:08:20 -0700814 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
815 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700816 # information, see
817 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700818 },
819 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700820 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
821 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
822 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
823 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700824 },
825 },
826 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700827 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the word.
828 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700829 { # Detected language for a structural component.
Bu Sun Kim65020912020-05-20 12:08:20 -0700830 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
831 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700832 # information, see
833 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700834 },
835 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700836 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
837 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
838 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
839 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700840 },
841 },
842 ],
843 },
844 ],
845 },
846 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700847 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected on the page.
848 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
849 { # Detected language for a structural component.
850 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
851 &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
852 # information, see
853 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
854 },
855 ],
856 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
857 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
858 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
859 },
860 },
861 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the page. Range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700862 },
863 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700864 &quot;text&quot;: &quot;A String&quot;, # UTF-8 text detected on the pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700865 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700866 &quot;textAnnotations&quot;: [ # If present, text (OCR) detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700867 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
869 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700870 # `LocationInfo` elements can be present because one location may
871 # indicate the location of the scene in the image, and another location
872 # may indicate the location of the place where the image was taken.
873 # Location information is usually present for landmarks.
874 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700876 # of doubles representing degrees latitude and degrees longitude. Unless
877 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -0700878 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -0700879 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
881 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700882 },
883 },
884 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700885 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700886 # [Google Knowledge Graph Search
887 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700888 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
889 # The accuracy of the entity detection in an image.
890 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
891 # this field represents the confidence that there is a tower in the query
892 # image. Range [0, 1].
893 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
894 # `description` is expressed.
895 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700897 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700898 { # A vertex represents a 2D point in the image.
899 # NOTE: the normalized vertex coordinates are relative to the original image
900 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700901 &quot;y&quot;: 3.14, # Y coordinate.
902 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700903 },
904 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700905 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700906 { # A vertex represents a 2D point in the image.
907 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700908 &quot;y&quot;: 42, # Y coordinate.
909 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700910 },
911 ],
912 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700913 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
914 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
915 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
916 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
917 # detected distant towering building, even though the confidence that
918 # there is a tower in each image may be the same. Range [0, 1].
919 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 # fields, such a score or string that qualifies the entity.
921 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -0700922 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
923 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
924 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 },
926 ],
927 },
928 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700929 &quot;imagePropertiesAnnotation&quot;: { # Stores image properties, such as dominant colors. # If present, image properties were extracted successfully.
930 &quot;dominantColors&quot;: { # Set of dominant colors and their corresponding scores. # If present, dominant colors completed successfully.
931 &quot;colors&quot;: [ # RGB color values with their score and pixel fraction.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700932 { # Color information consists of RGB channels, score, and the fraction of
933 # the image that the color occupies in the image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700934 &quot;pixelFraction&quot;: 3.14, # The fraction of pixels the color occupies in the image.
935 # Value in range [0, 1].
936 &quot;color&quot;: { # Represents a color in the RGBA color space. This representation is designed # RGB components of the color.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700937 # for simplicity of conversion to/from color representations in various
938 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
940 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700941 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -0700942 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700943 #
944 # Note: this proto does not carry information about the absolute color space
945 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
946 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
947 # space.
948 #
949 # Example (Java):
950 #
951 # import com.google.type.Color;
952 #
953 # // ...
954 # public static java.awt.Color fromProto(Color protocolor) {
955 # float alpha = protocolor.hasAlpha()
956 # ? protocolor.getAlpha().getValue()
957 # : 1.0;
958 #
959 # return new java.awt.Color(
960 # protocolor.getRed(),
961 # protocolor.getGreen(),
962 # protocolor.getBlue(),
963 # alpha);
964 # }
965 #
966 # public static Color toProto(java.awt.Color color) {
967 # float red = (float) color.getRed();
968 # float green = (float) color.getGreen();
969 # float blue = (float) color.getBlue();
970 # float denominator = 255.0;
971 # Color.Builder resultBuilder =
972 # Color
973 # .newBuilder()
974 # .setRed(red / denominator)
975 # .setGreen(green / denominator)
976 # .setBlue(blue / denominator);
977 # int alpha = color.getAlpha();
978 # if (alpha != 255) {
979 # result.setAlpha(
980 # FloatValue
981 # .newBuilder()
982 # .setValue(((float) alpha) / denominator)
983 # .build());
984 # }
985 # return resultBuilder.build();
986 # }
987 # // ...
988 #
989 # Example (iOS / Obj-C):
990 #
991 # // ...
992 # static UIColor* fromProto(Color* protocolor) {
993 # float red = [protocolor red];
994 # float green = [protocolor green];
995 # float blue = [protocolor blue];
996 # FloatValue* alpha_wrapper = [protocolor alpha];
997 # float alpha = 1.0;
998 # if (alpha_wrapper != nil) {
999 # alpha = [alpha_wrapper value];
1000 # }
1001 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1002 # }
1003 #
1004 # static Color* toProto(UIColor* color) {
1005 # CGFloat red, green, blue, alpha;
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001007 # return nil;
1008 # }
1009 # Color* result = [[Color alloc] init];
1010 # [result setRed:red];
1011 # [result setGreen:green];
1012 # [result setBlue:blue];
Dan O'Mearadd494642020-05-01 07:42:23 -07001013 # if (alpha &lt;= 0.9999) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001014 # [result setAlpha:floatWrapperWithValue(alpha)];
1015 # }
1016 # [result autorelease];
1017 # return result;
1018 # }
1019 # // ...
1020 #
1021 # Example (JavaScript):
1022 #
1023 # // ...
1024 #
1025 # var protoToCssColor = function(rgb_color) {
1026 # var redFrac = rgb_color.red || 0.0;
1027 # var greenFrac = rgb_color.green || 0.0;
1028 # var blueFrac = rgb_color.blue || 0.0;
1029 # var red = Math.floor(redFrac * 255);
1030 # var green = Math.floor(greenFrac * 255);
1031 # var blue = Math.floor(blueFrac * 255);
1032 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001033 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001034 # return rgbToCssColor_(red, green, blue);
1035 # }
1036 #
1037 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -07001038 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
1039 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040 # };
1041 #
1042 # var rgbToCssColor_ = function(red, green, blue) {
Dan O'Mearadd494642020-05-01 07:42:23 -07001043 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001044 # var hexString = rgbNumber.toString(16);
1045 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -07001046 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -07001047 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -07001048 # resultBuilder.push(&#x27;0&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001049 # }
1050 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -07001051 # return resultBuilder.join(&#x27;&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 # };
1053 #
1054 # // ...
Bu Sun Kim65020912020-05-20 12:08:20 -07001055 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
1056 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
1057 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1058 &quot;alpha&quot;: 3.14, # The fraction of this color that should be applied to the pixel. That is,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001059 # the final pixel color is defined by the equation:
1060 #
1061 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1062 #
1063 # This means that a value of 1.0 corresponds to a solid color, whereas
1064 # a value of 0.0 corresponds to a completely transparent color. This
1065 # uses a wrapper message rather than a simple float scalar so that it is
1066 # possible to distinguish between a default value and the value being unset.
1067 # If omitted, this color object is to be rendered as a solid color
1068 # (as if the alpha value had been explicitly given with a value of 1.0).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001069 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001070 &quot;score&quot;: 3.14, # Image-specific score for this color. Value in range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001071 },
1072 ],
1073 },
1074 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001075 &quot;logoAnnotations&quot;: [ # If present, logo detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001076 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001077 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1078 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001079 # `LocationInfo` elements can be present because one location may
1080 # indicate the location of the scene in the image, and another location
1081 # may indicate the location of the place where the image was taken.
1082 # Location information is usually present for landmarks.
1083 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001084 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085 # of doubles representing degrees latitude and degrees longitude. Unless
1086 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -07001087 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -07001088 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -07001089 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1090 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001091 },
1092 },
1093 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001094 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 # [Google Knowledge Graph Search
1096 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001097 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001098 # The accuracy of the entity detection in an image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001100 # this field represents the confidence that there is a tower in the query
1101 # image. Range [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -07001102 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001103 # `description` is expressed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001104 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001105 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001106 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107 { # A vertex represents a 2D point in the image.
1108 # NOTE: the normalized vertex coordinates are relative to the original image
1109 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -07001110 &quot;y&quot;: 3.14, # Y coordinate.
1111 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001112 },
1113 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001114 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001115 { # A vertex represents a 2D point in the image.
1116 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001117 &quot;y&quot;: 42, # Y coordinate.
1118 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001119 },
1120 ],
1121 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001122 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1123 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1124 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1125 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1126 # detected distant towering building, even though the confidence that
1127 # there is a tower in each image may be the same. Range [0, 1].
1128 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001129 # fields, such a score or string that qualifies the entity.
1130 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -07001131 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1132 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1133 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001134 },
1135 ],
1136 },
1137 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001138 &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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001139 # comes from.
1140 # information about the source of that image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001141 &quot;uri&quot;: &quot;A String&quot;, # The URI of the file used to produce the image.
1142 &quot;pageNumber&quot;: 42, # If the file was a PDF or TIFF, this field gives the page number within
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001143 # the file used to produce the image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001144 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001145 &quot;webDetection&quot;: { # Relevant information for the image from the Internet. # If present, web detection has completed successfully.
1146 &quot;fullMatchingImages&quot;: [ # Fully matching images from the Internet.
1147 # Can include resized copies of the query image.
1148 { # Metadata for online images.
1149 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1150 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1151 },
1152 ],
1153 &quot;webEntities&quot;: [ # Deduced entities from similar images on the Internet.
1154 { # Entity deduced from similar images on the Internet.
1155 &quot;score&quot;: 3.14, # Overall relevancy score for the entity.
1156 # Not normalized and not comparable across different image queries.
1157 &quot;entityId&quot;: &quot;A String&quot;, # Opaque entity ID.
1158 &quot;description&quot;: &quot;A String&quot;, # Canonical description of the entity, in English.
1159 },
1160 ],
1161 &quot;pagesWithMatchingImages&quot;: [ # Web pages containing the matching images from the Internet.
1162 { # Metadata for web pages.
1163 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the web page.
1164 &quot;partialMatchingImages&quot;: [ # Partial matching images on the page.
1165 # Those images are similar enough to share some key-point features. For
1166 # example an original image will likely have partial matching for its
1167 # crops.
1168 { # Metadata for online images.
1169 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1170 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1171 },
1172 ],
1173 &quot;url&quot;: &quot;A String&quot;, # The result web page URL.
1174 &quot;pageTitle&quot;: &quot;A String&quot;, # Title for the web page, may contain HTML markups.
1175 &quot;fullMatchingImages&quot;: [ # Fully matching images on the page.
1176 # Can include resized copies of the query image.
1177 { # Metadata for online images.
1178 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1179 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1180 },
1181 ],
1182 },
1183 ],
1184 &quot;partialMatchingImages&quot;: [ # Partial matching images from the Internet.
1185 # Those images are similar enough to share some key-point features. For
1186 # example an original image will likely have partial matching for its crops.
1187 { # Metadata for online images.
1188 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1189 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1190 },
1191 ],
1192 &quot;visuallySimilarImages&quot;: [ # The visually similar image results.
1193 { # Metadata for online images.
1194 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1195 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1196 },
1197 ],
1198 &quot;bestGuessLabels&quot;: [ # The service&#x27;s best guess as to the topic of the request image.
1199 # Inferred from similar images on the open web.
1200 { # Label to provide extra metadata for the web detection.
1201 &quot;label&quot;: &quot;A String&quot;, # Label for extra metadata.
1202 &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;.
1203 # For more information, see
1204 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001205 },
1206 ],
1207 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 &quot;safeSearchAnnotation&quot;: { # Set of features pertaining to the image, computed by computer vision # If present, safe-search annotation has completed successfully.
1209 # methods over safe-search verticals (for example, adult, spoof, medical,
1210 # violence).
1211 &quot;adult&quot;: &quot;A String&quot;, # Represents the adult content likelihood for the image. Adult content may
1212 # contain elements such as nudity, pornographic images or cartoons, or
1213 # sexual activities.
1214 &quot;spoof&quot;: &quot;A String&quot;, # Spoof likelihood. The likelihood that an modification
1215 # was made to the image&#x27;s canonical version to make it appear
1216 # funny or offensive.
1217 &quot;medical&quot;: &quot;A String&quot;, # Likelihood that this is a medical image.
1218 &quot;racy&quot;: &quot;A String&quot;, # Likelihood that the request image contains racy content. Racy content may
1219 # include (but is not limited to) skimpy or sheer clothing, strategically
1220 # covered nudity, lewd or provocative poses, or close-ups of sensitive
1221 # body areas.
1222 &quot;violence&quot;: &quot;A String&quot;, # Likelihood that this image contains violent content.
1223 },
1224 &quot;landmarkAnnotations&quot;: [ # If present, landmark detection has completed successfully.
1225 { # Set of detected entity features.
1226 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1227 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
1228 # `LocationInfo` elements can be present because one location may
1229 # indicate the location of the scene in the image, and another location
1230 # may indicate the location of the place where the image was taken.
1231 # Location information is usually present for landmarks.
1232 { # Detected entity location information.
1233 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
1234 # of doubles representing degrees latitude and degrees longitude. Unless
1235 # specified otherwise, this must conform to the
1236 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1237 # standard&lt;/a&gt;. Values must be within normalized ranges.
1238 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1239 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1240 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001241 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001242 ],
1243 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1244 # [Google Knowledge Graph Search
1245 # API](https://developers.google.com/knowledge-graph/).
1246 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
1247 # The accuracy of the entity detection in an image.
1248 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
1249 # this field represents the confidence that there is a tower in the query
1250 # image. Range [0, 1].
1251 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1252 # `description` is expressed.
1253 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
1254 # for `LABEL_DETECTION` features.
1255 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1256 { # A vertex represents a 2D point in the image.
1257 # NOTE: the normalized vertex coordinates are relative to the original image
1258 # and range from 0 to 1.
1259 &quot;y&quot;: 3.14, # Y coordinate.
1260 &quot;x&quot;: 3.14, # X coordinate.
1261 },
1262 ],
1263 &quot;vertices&quot;: [ # The bounding polygon vertices.
1264 { # A vertex represents a 2D point in the image.
1265 # NOTE: the vertex coordinates are in the same scale as the original image.
1266 &quot;y&quot;: 42, # Y coordinate.
1267 &quot;x&quot;: 42, # X coordinate.
1268 },
1269 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001270 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001271 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1272 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1273 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1274 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1275 # detected distant towering building, even though the confidence that
1276 # there is a tower in each image may be the same. Range [0, 1].
1277 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
1278 # fields, such a score or string that qualifies the entity.
1279 { # A `Property` consists of a user-supplied name/value pair.
1280 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1281 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1282 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
1283 },
1284 ],
1285 },
1286 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001287 },
1288 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001289 &quot;inputConfig&quot;: { # The desired input location and metadata. # Information about the file for which this response is generated.
1290 &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.
1291 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
1292 # Google Cloud Storage object. Wildcards are not currently supported.
1293 },
1294 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
1295 # &quot;image/gif&quot; are supported. Wildcards are not supported.
1296 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
1297 # Note: As with all `bytes` fields, protobuffers use a pure binary
1298 # representation, whereas JSON representations use base64.
1299 #
1300 # Currently, this field only works for BatchAnnotateFiles requests. It does
1301 # not work for AsyncBatchAnnotateFiles requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001302 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001303 &quot;totalPages&quot;: 42, # This field gives the total number of pages in the file.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001304 },
1305 ],
1306 }</pre>
1307</div>
1308
1309<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001310 <code class="details" id="asyncBatchAnnotate">asyncBatchAnnotate(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001311 <pre>Run asynchronous image detection and annotation for a list of generic
1312files, such as PDF files, which may contain multiple pages and multiple
1313images per page. Progress and results can be retrieved through the
1314`google.longrunning.Operations` interface.
1315`Operation.metadata` contains `OperationMetadata` (metadata).
1316`Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
1317
1318Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001319 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001320 The object takes the form of:
1321
1322{ # Multiple async file annotation requests are batched into a single service
1323 # call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001324 &quot;requests&quot;: [ # Required. Individual async file annotation requests for this batch.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001325 { # An offline file annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001326 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image(s) in the file.
1327 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001328 # yields the best results since it enables automatic language detection. For
1329 # languages based on the Latin alphabet, setting `language_hints` is not
1330 # needed. In rare cases, when the language of the text in the image is known,
1331 # setting a hint will help get better results (although it will be a
1332 # significant hindrance if the hint is wrong). Text detection returns an
1333 # error if one or more of the specified languages is not one of the
Dan O'Mearadd494642020-05-01 07:42:23 -07001334 # [supported languages](https://cloud.google.com/vision/docs/languages).
Bu Sun Kim65020912020-05-20 12:08:20 -07001335 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001336 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001337 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
1338 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
1339 },
1340 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
1341 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
1342 # of doubles representing degrees latitude and degrees longitude. Unless
1343 # specified otherwise, this must conform to the
1344 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1345 # standard&lt;/a&gt;. Values must be within normalized ranges.
1346 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1347 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1348 },
1349 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
1350 # of doubles representing degrees latitude and degrees longitude. Unless
1351 # specified otherwise, this must conform to the
1352 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1353 # standard&lt;/a&gt;. Values must be within normalized ranges.
1354 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1355 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001356 },
1357 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001358 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
1359 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001360 # of the image. For example, if the desired aspect ratio is 4/3, the
1361 # corresponding float value should be 1.33333. If not specified, the
1362 # best possible crop is returned. The number of provided aspect ratios is
1363 # limited to a maximum of 16; any aspect ratios provided after the 16th are
1364 # ignored.
1365 3.14,
1366 ],
1367 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001368 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
1369 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
1370 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
1371 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
1372 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
1373 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
1374 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
1375 # migrate existing products to these categories as well.
1376 &quot;A String&quot;,
1377 ],
1378 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
1379 # on Product labels. We currently support an AND of OR of key-value
1380 # expressions, where each expression within an OR must have the same key. An
1381 # &#x27;=&#x27; should be used to connect the key and value.
1382 #
1383 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
1384 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
1385 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
1386 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
1387 #
1388 # Format is:
1389 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
1390 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
1391 # If it is not specified, system discretion will be applied.
1392 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1393 { # A vertex represents a 2D point in the image.
1394 # NOTE: the normalized vertex coordinates are relative to the original image
1395 # and range from 0 to 1.
1396 &quot;y&quot;: 3.14, # Y coordinate.
1397 &quot;x&quot;: 3.14, # X coordinate.
1398 },
1399 ],
1400 &quot;vertices&quot;: [ # The bounding polygon vertices.
1401 { # A vertex represents a 2D point in the image.
1402 # NOTE: the vertex coordinates are in the same scale as the original image.
1403 &quot;y&quot;: 42, # Y coordinate.
1404 &quot;x&quot;: 42, # X coordinate.
1405 },
1406 ],
1407 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001408 },
1409 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &quot;outputConfig&quot;: { # The desired output location and metadata. # Required. The desired output location and metadata (e.g. format).
1411 &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.
1412 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI prefix where the results will be stored. Results
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001413 # will be in JSON format and preceded by its corresponding input URI prefix.
1414 # This field can either represent a gcs file prefix or gcs directory. In
1415 # either case, the uri should be unique because in order to get all of the
1416 # output files, you will need to do a wildcard gcs search on the uri prefix
1417 # you provide.
1418 #
1419 # Examples:
1420 #
1421 # * File Prefix: gs://bucket-name/here/filenameprefix The output files
1422 # will be created in gs://bucket-name/here/ and the names of the
Bu Sun Kim65020912020-05-20 12:08:20 -07001423 # output files will begin with &quot;filenameprefix&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001424 #
1425 # * Directory Prefix: gs://bucket-name/some/location/ The output files
1426 # will be created in gs://bucket-name/some/location/ and the names of the
1427 # output files could be anything because there was no filename prefix
1428 # specified.
1429 #
1430 # If multiple outputs, each response is still AnnotateFileResponse, each of
1431 # which contains some subset of the full list of AnnotateImageResponse.
1432 # Multiple outputs can happen if, for example, the output JSON is too large
1433 # and overflows into multiple sharded files.
1434 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001435 &quot;batchSize&quot;: 42, # The max number of response protos to put into each output JSON file on
1436 # Google Cloud Storage.
1437 # The valid range is [1, 100]. If not specified, the default value is 20.
1438 #
1439 # For example, for one pdf file with 100 pages, 100 response protos will
1440 # be generated. If `batch_size` = 20, then 5 json files each
1441 # containing 20 response protos will be written under the prefix
1442 # `gcs_destination`.`uri`.
1443 #
1444 # Currently, batch_size only applies to GcsDestination, with potential future
1445 # support for other output configurations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001446 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001447 &quot;inputConfig&quot;: { # The desired input location and metadata. # Required. Information about the input file.
1448 &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.
1449 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
1450 # Google Cloud Storage object. Wildcards are not currently supported.
1451 },
1452 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
1453 # &quot;image/gif&quot; are supported. Wildcards are not supported.
1454 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001455 # Note: As with all `bytes` fields, protobuffers use a pure binary
1456 # representation, whereas JSON representations use base64.
1457 #
1458 # Currently, this field only works for BatchAnnotateFiles requests. It does
1459 # not work for AsyncBatchAnnotateFiles requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001460 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001461 &quot;features&quot;: [ # Required. Requested features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 { # The type of Google Cloud Vision API detection to perform, and the maximum
1463 # number of results to return for that type. Multiple `Feature` objects can
1464 # be specified in the `features` list.
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
1466 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
1467 # &quot;builtin/latest&quot;.
1468 &quot;type&quot;: &quot;A String&quot;, # The feature type.
1469 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001470 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
1471 },
1472 ],
1473 },
1474 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001475 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
Dan O'Mearadd494642020-05-01 07:42:23 -07001476 #
1477 # Format: `projects/{project-id}/locations/{location-id}`.
1478 #
1479 # If no parent is specified, a region will be chosen automatically.
1480 #
1481 # Supported location-ids:
1482 # `us`: USA country only,
1483 # `asia`: East asia areas, like Japan, Taiwan,
1484 # `eu`: The European Union.
1485 #
1486 # Example: `projects/project-A/locations/eu`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001487 }
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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001499 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1500 # If `true`, the operation is completed, and either `error` or `response` is
1501 # available.
1502 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001503 # method returns no data on success, such as `Delete`, the response is
1504 # `google.protobuf.Empty`. If the original method is standard
1505 # `Get`/`Create`/`Update`, the response should be the resource. For other
1506 # methods, the response should have the type `XxxResponse`, where `Xxx`
1507 # is the original method name. For example, if the original method name
1508 # is `TakeSnapshot()`, the inferred response type is
1509 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001510 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001511 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001512 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001513 # originally returns it. If you use the default HTTP mapping, the
1514 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001515 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001516 # different programming environments, including REST APIs and RPC APIs. It is
1517 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1518 # three pieces of data: error code, error message, and error details.
1519 #
1520 # You can find out more about this error model and how to work with it in the
1521 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -07001522 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001523 # message types for APIs to use.
1524 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001525 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001526 },
1527 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001528 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1529 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1530 # user-facing error message should be localized and sent in the
1531 # google.rpc.Status.details field, or localized by the client.
1532 },
1533 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1534 # contains progress information and common metadata such as create time.
1535 # Some services might not provide such metadata. Any method that returns a
1536 # long-running operation should document the metadata type, if any.
1537 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001538 },
1539 }</pre>
1540</div>
1541
1542</body></html>