blob: cfc29d93190300633d986a6980102faa88fbc2d5 [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;requests&quot;: [ # Required. The list of file annotation requests. Right now we support only one
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100 # AnnotateFileRequest in BatchAnnotateFilesRequest.
101 { # A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 &quot;features&quot;: [ # Required. Requested features.
103 { # The type of Google Cloud Vision API detection to perform, and the maximum
104 # number of results to return for that type. Multiple `Feature` objects can
105 # be specified in the `features` list.
Bu Sun Kim65020912020-05-20 12:08:20 -0700106 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
107 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700108 &quot;type&quot;: &quot;A String&quot;, # The feature type.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700109 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
110 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
111 # &quot;builtin/latest&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700112 },
113 ],
114 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image(s) in the file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700115 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
116 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
117 # of doubles representing degrees latitude and degrees longitude. Unless
118 # specified otherwise, this must conform to the
119 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
120 # standard&lt;/a&gt;. Values must be within normalized ranges.
121 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
122 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
123 },
124 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
125 # of doubles representing degrees latitude and degrees longitude. Unless
126 # specified otherwise, this must conform to the
127 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
128 # standard&lt;/a&gt;. Values must be within normalized ranges.
129 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
130 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
131 },
132 },
133 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
134 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
135 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &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 -0700137 # yields the best results since it enables automatic language detection. For
138 # languages based on the Latin alphabet, setting `language_hints` is not
139 # needed. In rare cases, when the language of the text in the image is known,
140 # setting a hint will help get better results (although it will be a
141 # significant hindrance if the hint is wrong). Text detection returns an
142 # error if one or more of the specified languages is not one of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 # [supported languages](https://cloud.google.com/vision/docs/languages).
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700147 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
148 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
149 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
150 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
151 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
152 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
153 # migrate existing products to these categories as well.
154 &quot;A String&quot;,
155 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
157 # If it is not specified, system discretion will be applied.
158 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
159 { # A vertex represents a 2D point in the image.
160 # NOTE: the normalized vertex coordinates are relative to the original image
161 # and range from 0 to 1.
162 &quot;y&quot;: 3.14, # Y coordinate.
163 &quot;x&quot;: 3.14, # X coordinate.
164 },
165 ],
166 &quot;vertices&quot;: [ # The bounding polygon vertices.
167 { # A vertex represents a 2D point in the image.
168 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700169 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700170 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700171 },
172 ],
173 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700174 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
175 # on Product labels. We currently support an AND of OR of key-value
176 # expressions, where each expression within an OR must have the same key. An
177 # &#x27;=&#x27; should be used to connect the key and value.
178 #
179 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
180 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
181 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
182 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
183 #
184 # Format is:
185 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
186 },
187 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
188 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
189 # of the image. For example, if the desired aspect ratio is 4/3, the
190 # corresponding float value should be 1.33333. If not specified, the
191 # best possible crop is returned. The number of provided aspect ratios is
192 # limited to a maximum of 16; any aspect ratios provided after the 16th are
193 # ignored.
194 3.14,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700195 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700196 },
197 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700198 &quot;inputConfig&quot;: { # The desired input location and metadata. # Required. Information about the input file.
199 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
200 # &quot;image/gif&quot; are supported. Wildcards are not supported.
201 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
202 # Note: As with all `bytes` fields, protobuffers use a pure binary
203 # representation, whereas JSON representations use base64.
204 #
205 # Currently, this field only works for BatchAnnotateFiles requests. It does
206 # not work for AsyncBatchAnnotateFiles requests.
207 &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.
208 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
209 # Google Cloud Storage object. Wildcards are not currently supported.
210 },
211 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 &quot;pages&quot;: [ # Pages of the file to perform image annotation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 #
214 # Pages starts from 1, we assume the first page of the file is page 1.
215 # At most 5 pages are supported per request. Pages can be negative.
216 #
217 # Page 1 means the first page.
218 # Page 2 means the second page.
219 # Page -1 means the last page.
220 # Page -2 means the second to the last page.
221 #
222 # If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
223 #
224 # If this field is empty, by default the service performs image annotation
225 # for the first 5 pages of the file.
226 42,
227 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 },
229 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700230 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
231 #
232 # Format: `projects/{project-id}/locations/{location-id}`.
233 #
234 # If no parent is specified, a region will be chosen automatically.
235 #
236 # Supported location-ids:
237 # `us`: USA country only,
238 # `asia`: East asia areas, like Japan, Taiwan,
239 # `eu`: The European Union.
240 #
241 # Example: `projects/project-A/locations/eu`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 }
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 Kimd059ad82020-07-22 17:02:09 -0700257 &quot;totalPages&quot;: 42, # This field gives the total number of pages in the file.
258 &quot;inputConfig&quot;: { # The desired input location and metadata. # Information about the file for which this response is generated.
259 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
260 # &quot;image/gif&quot; are supported. Wildcards are not supported.
261 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
262 # Note: As with all `bytes` fields, protobuffers use a pure binary
263 # representation, whereas JSON representations use base64.
264 #
265 # Currently, this field only works for BatchAnnotateFiles requests. It does
266 # not work for AsyncBatchAnnotateFiles requests.
267 &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.
268 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
269 # Google Cloud Storage object. Wildcards are not currently supported.
270 },
271 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 &quot;responses&quot;: [ # Individual responses to images found within the file. This field will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700273 # empty if the `error` field is set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700274 { # Response to an image annotation request.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700275 &quot;labelAnnotations&quot;: [ # If present, label detection has completed successfully.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700276 { # Set of detected entity features.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700277 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700278 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
279 # The accuracy of the entity detection in an image.
280 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
281 # this field represents the confidence that there is a tower in the query
282 # image. Range [0, 1].
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700283 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
284 # for `LABEL_DETECTION` features.
285 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
286 { # A vertex represents a 2D point in the image.
287 # NOTE: the normalized vertex coordinates are relative to the original image
288 # and range from 0 to 1.
289 &quot;y&quot;: 3.14, # Y coordinate.
290 &quot;x&quot;: 3.14, # X coordinate.
291 },
292 ],
293 &quot;vertices&quot;: [ # The bounding polygon vertices.
294 { # A vertex represents a 2D point in the image.
295 # NOTE: the vertex coordinates are in the same scale as the original image.
296 &quot;x&quot;: 42, # X coordinate.
297 &quot;y&quot;: 42, # Y coordinate.
298 },
299 ],
300 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700301 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
302 # [Google Knowledge Graph Search
303 # API](https://developers.google.com/knowledge-graph/).
304 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
305 # `description` is expressed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700306 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
307 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
308 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
309 # detected distant towering building, even though the confidence that
310 # there is a tower in each image may be the same. Range [0, 1].
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700311 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
312 # `LocationInfo` elements can be present because one location may
313 # indicate the location of the scene in the image, and another location
314 # may indicate the location of the place where the image was taken.
315 # Location information is usually present for landmarks.
316 { # Detected entity location information.
317 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
318 # of doubles representing degrees latitude and degrees longitude. Unless
319 # specified otherwise, this must conform to the
320 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
321 # standard&lt;/a&gt;. Values must be within normalized ranges.
322 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
323 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
324 },
325 },
326 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700327 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
328 # fields, such a score or string that qualifies the entity.
329 { # A `Property` consists of a user-supplied name/value pair.
330 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
331 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
332 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
333 },
334 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700335 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700336 },
337 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700338 &quot;safeSearchAnnotation&quot;: { # Set of features pertaining to the image, computed by computer vision # If present, safe-search annotation has completed successfully.
339 # methods over safe-search verticals (for example, adult, spoof, medical,
340 # violence).
341 &quot;spoof&quot;: &quot;A String&quot;, # Spoof likelihood. The likelihood that an modification
342 # was made to the image&#x27;s canonical version to make it appear
343 # funny or offensive.
344 &quot;racy&quot;: &quot;A String&quot;, # Likelihood that the request image contains racy content. Racy content may
345 # include (but is not limited to) skimpy or sheer clothing, strategically
346 # covered nudity, lewd or provocative poses, or close-ups of sensitive
347 # body areas.
348 &quot;adult&quot;: &quot;A String&quot;, # Represents the adult content likelihood for the image. Adult content may
349 # contain elements such as nudity, pornographic images or cartoons, or
350 # sexual activities.
351 &quot;violence&quot;: &quot;A String&quot;, # Likelihood that this image contains violent content.
352 &quot;medical&quot;: &quot;A String&quot;, # Likelihood that this is a medical image.
353 },
354 &quot;webDetection&quot;: { # Relevant information for the image from the Internet. # If present, web detection has completed successfully.
355 &quot;partialMatchingImages&quot;: [ # Partial matching images from the Internet.
356 # Those images are similar enough to share some key-point features. For
357 # example an original image will likely have partial matching for its crops.
358 { # Metadata for online images.
359 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
360 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700362 ],
363 &quot;bestGuessLabels&quot;: [ # The service&#x27;s best guess as to the topic of the request image.
364 # Inferred from similar images on the open web.
365 { # Label to provide extra metadata for the web detection.
366 &quot;label&quot;: &quot;A String&quot;, # Label for extra metadata.
367 &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;.
368 # For more information, see
369 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Bu Sun Kim65020912020-05-20 12:08:20 -0700370 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700371 ],
372 &quot;visuallySimilarImages&quot;: [ # The visually similar image results.
373 { # Metadata for online images.
374 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
375 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
376 },
377 ],
378 &quot;webEntities&quot;: [ # Deduced entities from similar images on the Internet.
379 { # Entity deduced from similar images on the Internet.
380 &quot;entityId&quot;: &quot;A String&quot;, # Opaque entity ID.
381 &quot;score&quot;: 3.14, # Overall relevancy score for the entity.
382 # Not normalized and not comparable across different image queries.
383 &quot;description&quot;: &quot;A String&quot;, # Canonical description of the entity, in English.
384 },
385 ],
386 &quot;fullMatchingImages&quot;: [ # Fully matching images from the Internet.
387 # Can include resized copies of the query image.
388 { # Metadata for online images.
389 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
390 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
391 },
392 ],
393 &quot;pagesWithMatchingImages&quot;: [ # Web pages containing the matching images from the Internet.
394 { # Metadata for web pages.
395 &quot;fullMatchingImages&quot;: [ # Fully matching images on the page.
396 # Can include resized copies of the query image.
397 { # Metadata for online images.
398 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
399 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
400 },
401 ],
402 &quot;pageTitle&quot;: &quot;A String&quot;, # Title for the web page, may contain HTML markups.
403 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the web page.
404 &quot;url&quot;: &quot;A String&quot;, # The result web page URL.
405 &quot;partialMatchingImages&quot;: [ # Partial matching images on the page.
406 # Those images are similar enough to share some key-point features. For
407 # example an original image will likely have partial matching for its
408 # crops.
409 { # Metadata for online images.
410 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
411 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
412 },
413 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700414 },
415 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700417 &quot;productSearchResults&quot;: { # Results for a product search request. # If present, product search has completed successfully.
Bu Sun Kim65020912020-05-20 12:08:20 -0700418 &quot;productGroupedResults&quot;: [ # List of results grouped by products detected in the query image. Each entry
419 # corresponds to one bounding polygon in the query image, and contains the
420 # matching products specific to that region. There may be duplicate product
421 # matches in the union of all the per-product results.
422 { # Information about the products similar to a single product in a query
423 # image.
424 &quot;objectAnnotations&quot;: [ # List of generic predictions for the object in the bounding box.
425 { # Prediction for what the object in the bounding box is.
Bu Sun Kim65020912020-05-20 12:08:20 -0700426 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700427 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 &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
429 # information, see
430 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700431 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700432 },
433 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700434 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the product detected in the query image.
435 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
436 { # A vertex represents a 2D point in the image.
437 # NOTE: the normalized vertex coordinates are relative to the original image
438 # and range from 0 to 1.
439 &quot;y&quot;: 3.14, # Y coordinate.
440 &quot;x&quot;: 3.14, # X coordinate.
441 },
442 ],
443 &quot;vertices&quot;: [ # The bounding polygon vertices.
444 { # A vertex represents a 2D point in the image.
445 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700447 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 },
449 ],
450 },
451 &quot;results&quot;: [ # List of results, one for each product match.
452 { # Information about a product.
453 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
454 # to the query.
455 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700456 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
457 # 4096 characters long.
Bu Sun Kim65020912020-05-20 12:08:20 -0700458 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
459 #
460 # Format is:
461 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
462 #
463 # This field is ignored when creating a product.
Bu Sun Kim65020912020-05-20 12:08:20 -0700464 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
465 # constraints can be specified based on the product_labels.
466 #
467 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
468 # strings with integer values can match a range-based restriction which is
469 # to be supported soon.
470 #
471 # Multiple values can be assigned to the same key. One product may have up to
472 # 500 product_labels.
473 #
474 # Notice that the total number of distinct product_labels over all products
475 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
476 # will refuse to work for that ProductSet.
477 { # A product label represented as a key-value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -0700478 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
479 # exceed 128 bytes.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700480 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
481 # cannot exceed 128 bytes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700482 },
483 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700484 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
485 # characters long.
486 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
487 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
488 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
489 # not be used for new products.
Bu Sun Kim65020912020-05-20 12:08:20 -0700490 },
491 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
492 # 1 (full confidence).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700493 },
494 ],
495 },
496 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700497 &quot;indexTime&quot;: &quot;A String&quot;, # Timestamp of the index which provided these results. Products added to the
498 # product set and products removed from the product set after this time are
499 # not reflected in the current results.
Bu Sun Kim65020912020-05-20 12:08:20 -0700500 &quot;results&quot;: [ # List of results, one for each product match.
501 { # Information about a product.
502 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
503 # to the query.
504 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700505 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
506 # 4096 characters long.
Bu Sun Kim65020912020-05-20 12:08:20 -0700507 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
508 #
509 # Format is:
510 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
511 #
512 # This field is ignored when creating a product.
Bu Sun Kim65020912020-05-20 12:08:20 -0700513 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
514 # constraints can be specified based on the product_labels.
515 #
516 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
517 # strings with integer values can match a range-based restriction which is
518 # to be supported soon.
519 #
520 # Multiple values can be assigned to the same key. One product may have up to
521 # 500 product_labels.
522 #
523 # Notice that the total number of distinct product_labels over all products
524 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
525 # will refuse to work for that ProductSet.
526 { # A product label represented as a key-value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -0700527 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
528 # exceed 128 bytes.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700529 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
530 # cannot exceed 128 bytes.
Bu Sun Kim65020912020-05-20 12:08:20 -0700531 },
532 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700533 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
534 # characters long.
535 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
536 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
537 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
538 # not be used for new products.
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 },
540 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
541 # 1 (full confidence).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 },
543 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 },
545 &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 -0700546 # completed successfully.
547 # This annotation provides the structural hierarchy for the OCR detected
548 # text.
549 # The hierarchy of an OCR extracted text structure is like this:
Dan O'Mearadd494642020-05-01 07:42:23 -0700550 # TextAnnotation -&gt; Page -&gt; Block -&gt; Paragraph -&gt; Word -&gt; Symbol
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 # Each structural component, starting from Page, may further have their own
552 # properties. Properties describe detected languages, breaks etc.. Please refer
553 # to the TextAnnotation.TextProperty message definition below for more
554 # detail.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700555 &quot;text&quot;: &quot;A String&quot;, # UTF-8 text detected on the pages.
Bu Sun Kim65020912020-05-20 12:08:20 -0700556 &quot;pages&quot;: [ # List of pages detected by OCR.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700557 { # Detected page from OCR.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700558 &quot;width&quot;: 42, # Page width. For PDFs the unit is points. For images (including
559 # TIFFs) the unit is pixels.
Bu Sun Kim65020912020-05-20 12:08:20 -0700560 &quot;blocks&quot;: [ # List of blocks of text, images etc on this page.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561 { # Logical element on the page.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700562 &quot;paragraphs&quot;: [ # List of paragraphs in this block (if this blocks is of type text).
563 { # Structural unit of text representing a number of words in certain order.
564 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the paragraph.
565 # The vertices are in the order of top-left, top-right, bottom-right,
566 # bottom-left. When a rotation of the bounding box is detected the rotation
567 # is represented as around the top-left corner as defined when the text is
568 # read in the &#x27;natural&#x27; orientation.
569 # For example:
570 # * when the text is horizontal it might look like:
571 # 0----1
572 # | |
573 # 3----2
574 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
575 # 2----3
576 # | |
577 # 1----0
578 # and the vertex order will still be (0, 1, 2, 3).
579 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
580 { # A vertex represents a 2D point in the image.
581 # NOTE: the normalized vertex coordinates are relative to the original image
582 # and range from 0 to 1.
583 &quot;y&quot;: 3.14, # Y coordinate.
584 &quot;x&quot;: 3.14, # X coordinate.
585 },
586 ],
587 &quot;vertices&quot;: [ # The bounding polygon vertices.
588 { # A vertex represents a 2D point in the image.
589 # NOTE: the vertex coordinates are in the same scale as the original image.
590 &quot;x&quot;: 42, # X coordinate.
591 &quot;y&quot;: 42, # Y coordinate.
592 },
593 ],
594 },
595 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the paragraph.
596 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
597 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
598 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
599 },
600 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
601 { # Detected language for a structural component.
602 &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
603 # information, see
604 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
605 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
606 },
607 ],
608 },
609 &quot;words&quot;: [ # List of all words in this paragraph.
610 { # A word representation.
611 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the word.
612 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
613 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
614 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
615 },
616 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
617 { # Detected language for a structural component.
618 &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
619 # information, see
620 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
621 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
622 },
623 ],
624 },
625 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the word. Range [0, 1].
626 &quot;symbols&quot;: [ # List of symbols in the word.
627 # The order of the symbols follows the natural reading order.
628 { # A single symbol representation.
629 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the symbol. Range [0, 1].
630 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the symbol.
631 # The vertices are in the order of top-left, top-right, bottom-right,
632 # bottom-left. When a rotation of the bounding box is detected the rotation
633 # is represented as around the top-left corner as defined when the text is
634 # read in the &#x27;natural&#x27; orientation.
635 # For example:
636 # * when the text is horizontal it might look like:
637 # 0----1
638 # | |
639 # 3----2
640 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
641 # 2----3
642 # | |
643 # 1----0
644 # and the vertex order will still be (0, 1, 2, 3).
645 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
646 { # A vertex represents a 2D point in the image.
647 # NOTE: the normalized vertex coordinates are relative to the original image
648 # and range from 0 to 1.
649 &quot;y&quot;: 3.14, # Y coordinate.
650 &quot;x&quot;: 3.14, # X coordinate.
651 },
652 ],
653 &quot;vertices&quot;: [ # The bounding polygon vertices.
654 { # A vertex represents a 2D point in the image.
655 # NOTE: the vertex coordinates are in the same scale as the original image.
656 &quot;x&quot;: 42, # X coordinate.
657 &quot;y&quot;: 42, # Y coordinate.
658 },
659 ],
660 },
661 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the symbol.
662 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
663 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
664 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
665 },
666 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
667 { # Detected language for a structural component.
668 &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
669 # information, see
670 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
671 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
672 },
673 ],
674 },
675 &quot;text&quot;: &quot;A String&quot;, # The actual UTF-8 representation of the symbol.
676 },
677 ],
678 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the word.
679 # The vertices are in the order of top-left, top-right, bottom-right,
680 # bottom-left. When a rotation of the bounding box is detected the rotation
681 # is represented as around the top-left corner as defined when the text is
682 # read in the &#x27;natural&#x27; orientation.
683 # For example:
684 # * when the text is horizontal it might look like:
685 # 0----1
686 # | |
687 # 3----2
688 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
689 # 2----3
690 # | |
691 # 1----0
692 # and the vertex order will still be (0, 1, 2, 3).
693 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
694 { # A vertex represents a 2D point in the image.
695 # NOTE: the normalized vertex coordinates are relative to the original image
696 # and range from 0 to 1.
697 &quot;y&quot;: 3.14, # Y coordinate.
698 &quot;x&quot;: 3.14, # X coordinate.
699 },
700 ],
701 &quot;vertices&quot;: [ # The bounding polygon vertices.
702 { # A vertex represents a 2D point in the image.
703 # NOTE: the vertex coordinates are in the same scale as the original image.
704 &quot;x&quot;: 42, # X coordinate.
705 &quot;y&quot;: 42, # Y coordinate.
706 },
707 ],
708 },
709 },
710 ],
711 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the paragraph. Range [0, 1].
712 },
713 ],
714 &quot;blockType&quot;: &quot;A String&quot;, # Detected block type (text, image etc) for this block.
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the block.
Bu Sun Kim65020912020-05-20 12:08:20 -0700716 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700718 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700720 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
721 { # Detected language for a structural component.
722 &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
723 # information, see
724 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
725 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
726 },
727 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700728 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700729 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the block. Range [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -0700730 &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 -0700731 # The vertices are in the order of top-left, top-right, bottom-right,
732 # bottom-left. When a rotation of the bounding box is detected the rotation
733 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700734 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700735 # For example:
736 #
737 # * when the text is horizontal it might look like:
738 #
739 # 0----1
740 # | |
741 # 3----2
742 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700743 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 #
745 # 2----3
746 # | |
747 # 1----0
748 #
749 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700750 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 { # A vertex represents a 2D point in the image.
752 # NOTE: the normalized vertex coordinates are relative to the original image
753 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 &quot;y&quot;: 3.14, # Y coordinate.
755 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700756 },
757 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700758 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700759 { # A vertex represents a 2D point in the image.
760 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700761 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700762 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700763 },
764 ],
765 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 },
767 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700768 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the page. Range [0, 1].
769 &quot;height&quot;: 42, # Page height. For PDFs the unit is points. For images (including
770 # TIFFs) the unit is pixels.
Bu Sun Kim65020912020-05-20 12:08:20 -0700771 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected on the page.
Bu Sun Kim65020912020-05-20 12:08:20 -0700772 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700774 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
Bu Sun Kim65020912020-05-20 12:08:20 -0700775 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700776 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
777 { # Detected language for a structural component.
778 &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
779 # information, see
780 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
781 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
782 },
783 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700785 },
786 ],
787 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700788 &quot;localizedObjectAnnotations&quot;: [ # If present, localized object detection has completed successfully.
789 # This will be sorted descending by confidence score.
790 { # Set of detected objects with bounding boxes.
791 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
792 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
793 &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
794 # information, see
795 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
796 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this object belongs. This must be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700797 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 { # A vertex represents a 2D point in the image.
799 # NOTE: the normalized vertex coordinates are relative to the original image
800 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 &quot;y&quot;: 3.14, # Y coordinate.
802 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700803 },
804 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700805 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700806 { # A vertex represents a 2D point in the image.
807 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700808 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700809 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 },
811 ],
812 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700813 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 },
815 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700816 &quot;imagePropertiesAnnotation&quot;: { # Stores image properties, such as dominant colors. # If present, image properties were extracted successfully.
817 &quot;dominantColors&quot;: { # Set of dominant colors and their corresponding scores. # If present, dominant colors completed successfully.
818 &quot;colors&quot;: [ # RGB color values with their score and pixel fraction.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 { # Color information consists of RGB channels, score, and the fraction of
820 # the image that the color occupies in the image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700821 &quot;score&quot;: 3.14, # Image-specific score for this color. Value in range [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -0700822 &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 -0700823 # for simplicity of conversion to/from color representations in various
824 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -0700825 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
826 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700827 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -0700828 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700829 #
830 # Note: this proto does not carry information about the absolute color space
831 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
832 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
833 # space.
834 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700835 # Note: when color equality needs to be decided, implementations, unless
836 # documented otherwise, will treat two colors to be equal if all their red,
837 # green, blue and alpha values each differ by at most 1e-5.
838 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 # Example (Java):
840 #
841 # import com.google.type.Color;
842 #
843 # // ...
844 # public static java.awt.Color fromProto(Color protocolor) {
845 # float alpha = protocolor.hasAlpha()
846 # ? protocolor.getAlpha().getValue()
847 # : 1.0;
848 #
849 # return new java.awt.Color(
850 # protocolor.getRed(),
851 # protocolor.getGreen(),
852 # protocolor.getBlue(),
853 # alpha);
854 # }
855 #
856 # public static Color toProto(java.awt.Color color) {
857 # float red = (float) color.getRed();
858 # float green = (float) color.getGreen();
859 # float blue = (float) color.getBlue();
860 # float denominator = 255.0;
861 # Color.Builder resultBuilder =
862 # Color
863 # .newBuilder()
864 # .setRed(red / denominator)
865 # .setGreen(green / denominator)
866 # .setBlue(blue / denominator);
867 # int alpha = color.getAlpha();
868 # if (alpha != 255) {
869 # result.setAlpha(
870 # FloatValue
871 # .newBuilder()
872 # .setValue(((float) alpha) / denominator)
873 # .build());
874 # }
875 # return resultBuilder.build();
876 # }
877 # // ...
878 #
879 # Example (iOS / Obj-C):
880 #
881 # // ...
882 # static UIColor* fromProto(Color* protocolor) {
883 # float red = [protocolor red];
884 # float green = [protocolor green];
885 # float blue = [protocolor blue];
886 # FloatValue* alpha_wrapper = [protocolor alpha];
887 # float alpha = 1.0;
888 # if (alpha_wrapper != nil) {
889 # alpha = [alpha_wrapper value];
890 # }
891 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
892 # }
893 #
894 # static Color* toProto(UIColor* color) {
895 # CGFloat red, green, blue, alpha;
Dan O'Mearadd494642020-05-01 07:42:23 -0700896 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700897 # return nil;
898 # }
899 # Color* result = [[Color alloc] init];
900 # [result setRed:red];
901 # [result setGreen:green];
902 # [result setBlue:blue];
Dan O'Mearadd494642020-05-01 07:42:23 -0700903 # if (alpha &lt;= 0.9999) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 # [result setAlpha:floatWrapperWithValue(alpha)];
905 # }
906 # [result autorelease];
907 # return result;
908 # }
909 # // ...
910 #
911 # Example (JavaScript):
912 #
913 # // ...
914 #
915 # var protoToCssColor = function(rgb_color) {
916 # var redFrac = rgb_color.red || 0.0;
917 # var greenFrac = rgb_color.green || 0.0;
918 # var blueFrac = rgb_color.blue || 0.0;
919 # var red = Math.floor(redFrac * 255);
920 # var green = Math.floor(greenFrac * 255);
921 # var blue = Math.floor(blueFrac * 255);
922 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700923 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700924 # return rgbToCssColor_(red, green, blue);
925 # }
926 #
927 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
929 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 # };
931 #
932 # var rgbToCssColor_ = function(red, green, blue) {
Dan O'Mearadd494642020-05-01 07:42:23 -0700933 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700934 # var hexString = rgbNumber.toString(16);
935 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -0700936 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -0700937 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -0700938 # resultBuilder.push(&#x27;0&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700939 # }
940 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -0700941 # return resultBuilder.join(&#x27;&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700942 # };
943 #
944 # // ...
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700945 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -0700946 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
947 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 &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 -0700949 # the final pixel color is defined by the equation:
950 #
951 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
952 #
953 # This means that a value of 1.0 corresponds to a solid color, whereas
954 # a value of 0.0 corresponds to a completely transparent color. This
955 # uses a wrapper message rather than a simple float scalar so that it is
956 # possible to distinguish between a default value and the value being unset.
957 # If omitted, this color object is to be rendered as a solid color
958 # (as if the alpha value had been explicitly given with a value of 1.0).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700960 &quot;pixelFraction&quot;: 3.14, # The fraction of pixels the color occupies in the image.
961 # Value in range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 },
963 ],
964 },
965 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700966 &quot;faceAnnotations&quot;: [ # If present, face detection has completed successfully.
967 { # A face annotation object contains the results of face detection.
968 &quot;fdBoundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The `fd_bounding_poly` bounding polygon is tighter than the
969 # `boundingPoly`, and encloses only the skin part of the face. Typically, it
970 # is used to eliminate the face from any image analysis that detects the
971 # &quot;amount of skin&quot; visible in an image. It is not based on the
972 # landmarker results, only on the initial face detection, hence
973 # the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
974 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
975 { # A vertex represents a 2D point in the image.
976 # NOTE: the normalized vertex coordinates are relative to the original image
977 # and range from 0 to 1.
978 &quot;y&quot;: 3.14, # Y coordinate.
979 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700980 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700981 ],
982 &quot;vertices&quot;: [ # The bounding polygon vertices.
983 { # A vertex represents a 2D point in the image.
984 # NOTE: the vertex coordinates are in the same scale as the original image.
985 &quot;x&quot;: 42, # X coordinate.
986 &quot;y&quot;: 42, # Y coordinate.
987 },
988 ],
989 },
990 &quot;sorrowLikelihood&quot;: &quot;A String&quot;, # Sorrow likelihood.
991 &quot;rollAngle&quot;: 3.14, # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
992 # of the face relative to the image vertical about the axis perpendicular to
993 # the face. Range [-180,180].
994 &quot;angerLikelihood&quot;: &quot;A String&quot;, # Anger likelihood.
995 &quot;surpriseLikelihood&quot;: &quot;A String&quot;, # Surprise likelihood.
996 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the face. The coordinates of the bounding box
997 # are in the original image&#x27;s scale.
998 # The bounding box is computed to &quot;frame&quot; the face in accordance with human
999 # expectations. It is based on the landmarker results.
1000 # Note that one or more x and/or y coordinates may not be generated in the
1001 # `BoundingPoly` (the polygon will be unbounded) if only a partial face
1002 # appears in the image to be annotated.
1003 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1004 { # A vertex represents a 2D point in the image.
1005 # NOTE: the normalized vertex coordinates are relative to the original image
1006 # and range from 0 to 1.
1007 &quot;y&quot;: 3.14, # Y coordinate.
1008 &quot;x&quot;: 3.14, # X coordinate.
1009 },
1010 ],
1011 &quot;vertices&quot;: [ # The bounding polygon vertices.
1012 { # A vertex represents a 2D point in the image.
1013 # NOTE: the vertex coordinates are in the same scale as the original image.
1014 &quot;x&quot;: 42, # X coordinate.
1015 &quot;y&quot;: 42, # Y coordinate.
1016 },
1017 ],
1018 },
1019 &quot;detectionConfidence&quot;: 3.14, # Detection confidence. Range [0, 1].
1020 &quot;headwearLikelihood&quot;: &quot;A String&quot;, # Headwear likelihood.
1021 &quot;panAngle&quot;: 3.14, # Yaw angle, which indicates the leftward/rightward angle that the face is
1022 # pointing relative to the vertical plane perpendicular to the image. Range
1023 # [-180,180].
1024 &quot;landmarks&quot;: [ # Detected face landmarks.
1025 { # A face-specific landmark (for example, a face feature).
1026 &quot;position&quot;: { # A 3D position in the image, used primarily for Face detection landmarks. # Face landmark position.
1027 # A valid Position must have both x and y coordinates.
1028 # The position coordinates are in the same scale as the original image.
1029 &quot;z&quot;: 3.14, # Z coordinate (or depth).
1030 &quot;y&quot;: 3.14, # Y coordinate.
1031 &quot;x&quot;: 3.14, # X coordinate.
1032 },
1033 &quot;type&quot;: &quot;A String&quot;, # Face landmark type.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001034 },
1035 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001036 &quot;landmarkingConfidence&quot;: 3.14, # Face landmarking confidence. Range [0, 1].
1037 &quot;joyLikelihood&quot;: &quot;A String&quot;, # Joy likelihood.
1038 &quot;tiltAngle&quot;: 3.14, # Pitch angle, which indicates the upwards/downwards angle that the face is
1039 # pointing relative to the image&#x27;s horizontal plane. Range [-180,180].
1040 &quot;underExposedLikelihood&quot;: &quot;A String&quot;, # Under-exposed likelihood.
1041 &quot;blurredLikelihood&quot;: &quot;A String&quot;, # Blurred likelihood.
1042 },
1043 ],
1044 &quot;logoAnnotations&quot;: [ # If present, logo detection has completed successfully.
1045 { # Set of detected entity features.
1046 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
Bu Sun Kim65020912020-05-20 12:08:20 -07001047 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001048 # The accuracy of the entity detection in an image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001049 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001050 # this field represents the confidence that there is a tower in the query
1051 # image. Range [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -07001052 &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 -07001053 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001054 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001055 { # A vertex represents a 2D point in the image.
1056 # NOTE: the normalized vertex coordinates are relative to the original image
1057 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -07001058 &quot;y&quot;: 3.14, # Y coordinate.
1059 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001060 },
1061 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001062 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001063 { # A vertex represents a 2D point in the image.
1064 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001065 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001066 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001067 },
1068 ],
1069 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001070 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1071 # [Google Knowledge Graph Search
1072 # API](https://developers.google.com/knowledge-graph/).
1073 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1074 # `description` is expressed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001075 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1076 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1077 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1078 # detected distant towering building, even though the confidence that
1079 # there is a tower in each image may be the same. Range [0, 1].
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001080 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
1081 # `LocationInfo` elements can be present because one location may
1082 # indicate the location of the scene in the image, and another location
1083 # may indicate the location of the place where the image was taken.
1084 # Location information is usually present for landmarks.
1085 { # Detected entity location information.
1086 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
1087 # of doubles representing degrees latitude and degrees longitude. Unless
1088 # specified otherwise, this must conform to the
1089 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1090 # standard&lt;/a&gt;. Values must be within normalized ranges.
1091 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1092 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1093 },
1094 },
1095 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001096 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001097 # fields, such a score or string that qualifies the entity.
1098 { # A `Property` consists of a user-supplied name/value pair.
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1100 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1101 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001102 },
1103 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001104 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001105 },
1106 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001107 &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 -07001108 # comes from.
1109 # information about the source of that image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001110 &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 -07001111 # the file used to produce the image.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001112 &quot;uri&quot;: &quot;A String&quot;, # The URI of the file used to produce the image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001113 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001114 &quot;cropHintsAnnotation&quot;: { # Set of crop hints that are used to generate new crops when serving images. # If present, crop hints have completed successfully.
1115 &quot;cropHints&quot;: [ # Crop hint results.
1116 { # Single crop hint that is used to generate a new crop when serving an image.
1117 &quot;importanceFraction&quot;: 3.14, # Fraction of importance of this salient region with respect to the original
1118 # image.
1119 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the crop region. The coordinates of the bounding
1120 # box are in the original image&#x27;s scale.
1121 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1122 { # A vertex represents a 2D point in the image.
1123 # NOTE: the normalized vertex coordinates are relative to the original image
1124 # and range from 0 to 1.
1125 &quot;y&quot;: 3.14, # Y coordinate.
1126 &quot;x&quot;: 3.14, # X coordinate.
1127 },
1128 ],
1129 &quot;vertices&quot;: [ # The bounding polygon vertices.
1130 { # A vertex represents a 2D point in the image.
1131 # NOTE: the vertex coordinates are in the same scale as the original image.
1132 &quot;x&quot;: 42, # X coordinate.
1133 &quot;y&quot;: 42, # Y coordinate.
1134 },
1135 ],
1136 },
1137 &quot;confidence&quot;: 3.14, # Confidence of this being a salient region. Range [0, 1].
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001138 },
1139 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001140 },
1141 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # If set, represents the error message for the operation.
1142 # Note that filled-in image annotations are guaranteed to be
1143 # correct, even when `error` is set.
1144 # different programming environments, including REST APIs and RPC APIs. It is
1145 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1146 # three pieces of data: error code, error message, and error details.
1147 #
1148 # You can find out more about this error model and how to work with it in the
1149 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1150 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1151 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1152 # message types for APIs to use.
1153 {
1154 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001155 },
1156 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001157 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1158 # user-facing error message should be localized and sent in the
1159 # google.rpc.Status.details field, or localized by the client.
1160 },
1161 &quot;landmarkAnnotations&quot;: [ # If present, landmark detection has completed successfully.
1162 { # Set of detected entity features.
1163 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1164 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
1165 # The accuracy of the entity detection in an image.
1166 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
1167 # this field represents the confidence that there is a tower in the query
1168 # image. Range [0, 1].
1169 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
1170 # for `LABEL_DETECTION` features.
1171 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1172 { # A vertex represents a 2D point in the image.
1173 # NOTE: the normalized vertex coordinates are relative to the original image
1174 # and range from 0 to 1.
1175 &quot;y&quot;: 3.14, # Y coordinate.
1176 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -07001177 },
1178 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001179 &quot;vertices&quot;: [ # The bounding polygon vertices.
1180 { # A vertex represents a 2D point in the image.
1181 # NOTE: the vertex coordinates are in the same scale as the original image.
1182 &quot;x&quot;: 42, # X coordinate.
1183 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -07001184 },
1185 ],
1186 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001187 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1188 # [Google Knowledge Graph Search
1189 # API](https://developers.google.com/knowledge-graph/).
1190 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1191 # `description` is expressed.
1192 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1193 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1194 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1195 # detected distant towering building, even though the confidence that
1196 # there is a tower in each image may be the same. Range [0, 1].
1197 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
1198 # `LocationInfo` elements can be present because one location may
1199 # indicate the location of the scene in the image, and another location
1200 # may indicate the location of the place where the image was taken.
1201 # Location information is usually present for landmarks.
1202 { # Detected entity location information.
1203 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
1204 # of doubles representing degrees latitude and degrees longitude. Unless
1205 # specified otherwise, this must conform to the
1206 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1207 # standard&lt;/a&gt;. Values must be within normalized ranges.
1208 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1209 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1210 },
1211 },
1212 ],
1213 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
1214 # fields, such a score or string that qualifies the entity.
1215 { # A `Property` consists of a user-supplied name/value pair.
1216 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1217 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1218 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
1219 },
1220 ],
1221 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1222 },
1223 ],
1224 &quot;textAnnotations&quot;: [ # If present, text (OCR) detection has completed successfully.
1225 { # Set of detected entity features.
1226 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1227 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
1228 # The accuracy of the entity detection in an image.
1229 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
1230 # this field represents the confidence that there is a tower in the query
1231 # image. Range [0, 1].
1232 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
1233 # for `LABEL_DETECTION` features.
1234 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1235 { # A vertex represents a 2D point in the image.
1236 # NOTE: the normalized vertex coordinates are relative to the original image
1237 # and range from 0 to 1.
1238 &quot;y&quot;: 3.14, # Y coordinate.
1239 &quot;x&quot;: 3.14, # X coordinate.
1240 },
1241 ],
1242 &quot;vertices&quot;: [ # The bounding polygon vertices.
1243 { # A vertex represents a 2D point in the image.
1244 # NOTE: the vertex coordinates are in the same scale as the original image.
1245 &quot;x&quot;: 42, # X coordinate.
1246 &quot;y&quot;: 42, # Y coordinate.
1247 },
1248 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001249 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001250 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1251 # [Google Knowledge Graph Search
1252 # API](https://developers.google.com/knowledge-graph/).
1253 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1254 # `description` is expressed.
1255 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1256 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1257 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1258 # detected distant towering building, even though the confidence that
1259 # there is a tower in each image may be the same. Range [0, 1].
1260 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
1261 # `LocationInfo` elements can be present because one location may
1262 # indicate the location of the scene in the image, and another location
1263 # may indicate the location of the place where the image was taken.
1264 # Location information is usually present for landmarks.
1265 { # Detected entity location information.
1266 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
1267 # of doubles representing degrees latitude and degrees longitude. Unless
1268 # specified otherwise, this must conform to the
1269 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1270 # standard&lt;/a&gt;. Values must be within normalized ranges.
1271 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1272 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1273 },
1274 },
1275 ],
1276 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
1277 # fields, such a score or string that qualifies the entity.
1278 { # A `Property` consists of a user-supplied name/value pair.
1279 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1280 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1281 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
1282 },
1283 ],
1284 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1285 },
1286 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001287 },
1288 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001289 &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
1290 # `responses` field will not be set in this case.
1291 # different programming environments, including REST APIs and RPC APIs. It is
1292 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1293 # three pieces of data: error code, error message, and error details.
1294 #
1295 # You can find out more about this error model and how to work with it in the
1296 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1297 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001298 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1299 # message types for APIs to use.
1300 {
1301 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1302 },
1303 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001304 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1305 # user-facing error message should be localized and sent in the
1306 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001307 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001308 },
1309 ],
1310 }</pre>
1311</div>
1312
1313<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001314 <code class="details" id="asyncBatchAnnotate">asyncBatchAnnotate(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001315 <pre>Run asynchronous image detection and annotation for a list of generic
1316files, such as PDF files, which may contain multiple pages and multiple
1317images per page. Progress and results can be retrieved through the
1318`google.longrunning.Operations` interface.
1319`Operation.metadata` contains `OperationMetadata` (metadata).
1320`Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
1321
1322Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001323 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001324 The object takes the form of:
1325
1326{ # Multiple async file annotation requests are batched into a single service
1327 # call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001328 &quot;requests&quot;: [ # Required. Individual async file annotation requests for this batch.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001329 { # An offline file annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001330 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image(s) in the file.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001331 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
1332 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
1333 # of doubles representing degrees latitude and degrees longitude. Unless
1334 # specified otherwise, this must conform to the
1335 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1336 # standard&lt;/a&gt;. Values must be within normalized ranges.
1337 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1338 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1339 },
1340 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
1341 # of doubles representing degrees latitude and degrees longitude. Unless
1342 # specified otherwise, this must conform to the
1343 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1344 # standard&lt;/a&gt;. Values must be within normalized ranges.
1345 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1346 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1347 },
1348 },
1349 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
1350 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
1351 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001352 &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 -07001353 # yields the best results since it enables automatic language detection. For
1354 # languages based on the Latin alphabet, setting `language_hints` is not
1355 # needed. In rare cases, when the language of the text in the image is known,
1356 # setting a hint will help get better results (although it will be a
1357 # significant hindrance if the hint is wrong). Text detection returns an
1358 # error if one or more of the specified languages is not one of the
Dan O'Mearadd494642020-05-01 07:42:23 -07001359 # [supported languages](https://cloud.google.com/vision/docs/languages).
Bu Sun Kim65020912020-05-20 12:08:20 -07001360 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001361 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001362 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001363 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
1364 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
1365 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
1366 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
1367 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
1368 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
1369 # migrate existing products to these categories as well.
1370 &quot;A String&quot;,
1371 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001372 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
1373 # If it is not specified, system discretion will be applied.
1374 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1375 { # A vertex represents a 2D point in the image.
1376 # NOTE: the normalized vertex coordinates are relative to the original image
1377 # and range from 0 to 1.
1378 &quot;y&quot;: 3.14, # Y coordinate.
1379 &quot;x&quot;: 3.14, # X coordinate.
1380 },
1381 ],
1382 &quot;vertices&quot;: [ # The bounding polygon vertices.
1383 { # A vertex represents a 2D point in the image.
1384 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001385 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001386 &quot;y&quot;: 42, # Y coordinate.
Bu Sun Kim65020912020-05-20 12:08:20 -07001387 },
1388 ],
1389 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001390 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
1391 # on Product labels. We currently support an AND of OR of key-value
1392 # expressions, where each expression within an OR must have the same key. An
1393 # &#x27;=&#x27; should be used to connect the key and value.
1394 #
1395 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
1396 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
1397 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
1398 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
1399 #
1400 # Format is:
1401 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
1402 },
1403 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
1404 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
1405 # of the image. For example, if the desired aspect ratio is 4/3, the
1406 # corresponding float value should be 1.33333. If not specified, the
1407 # best possible crop is returned. The number of provided aspect ratios is
1408 # limited to a maximum of 16; any aspect ratios provided after the 16th are
1409 # ignored.
1410 3.14,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001411 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001412 },
1413 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 &quot;outputConfig&quot;: { # The desired output location and metadata. # Required. The desired output location and metadata (e.g. format).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001415 &quot;batchSize&quot;: 42, # The max number of response protos to put into each output JSON file on
1416 # Google Cloud Storage.
1417 # The valid range is [1, 100]. If not specified, the default value is 20.
1418 #
1419 # For example, for one pdf file with 100 pages, 100 response protos will
1420 # be generated. If `batch_size` = 20, then 5 json files each
1421 # containing 20 response protos will be written under the prefix
1422 # `gcs_destination`.`uri`.
1423 #
1424 # Currently, batch_size only applies to GcsDestination, with potential future
1425 # support for other output configurations.
Bu Sun Kim65020912020-05-20 12:08:20 -07001426 &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.
1427 &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 -07001428 # will be in JSON format and preceded by its corresponding input URI prefix.
1429 # This field can either represent a gcs file prefix or gcs directory. In
1430 # either case, the uri should be unique because in order to get all of the
1431 # output files, you will need to do a wildcard gcs search on the uri prefix
1432 # you provide.
1433 #
1434 # Examples:
1435 #
1436 # * File Prefix: gs://bucket-name/here/filenameprefix The output files
1437 # will be created in gs://bucket-name/here/ and the names of the
Bu Sun Kim65020912020-05-20 12:08:20 -07001438 # output files will begin with &quot;filenameprefix&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001439 #
1440 # * Directory Prefix: gs://bucket-name/some/location/ The output files
1441 # will be created in gs://bucket-name/some/location/ and the names of the
1442 # output files could be anything because there was no filename prefix
1443 # specified.
1444 #
1445 # If multiple outputs, each response is still AnnotateFileResponse, each of
1446 # which contains some subset of the full list of AnnotateImageResponse.
1447 # Multiple outputs can happen if, for example, the output JSON is too large
1448 # and overflows into multiple sharded files.
1449 },
1450 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001451 &quot;features&quot;: [ # Required. Requested features.
1452 { # The type of Google Cloud Vision API detection to perform, and the maximum
1453 # number of results to return for that type. Multiple `Feature` objects can
1454 # be specified in the `features` list.
1455 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
1456 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
1457 &quot;type&quot;: &quot;A String&quot;, # The feature type.
1458 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
1459 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
1460 # &quot;builtin/latest&quot;.
1461 },
1462 ],
1463 &quot;inputConfig&quot;: { # The desired input location and metadata. # Required. Information about the input file.
1464 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
1465 # &quot;image/gif&quot; are supported. Wildcards are not supported.
1466 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
1467 # Note: As with all `bytes` fields, protobuffers use a pure binary
1468 # representation, whereas JSON representations use base64.
1469 #
1470 # Currently, this field only works for BatchAnnotateFiles requests. It does
1471 # not work for AsyncBatchAnnotateFiles requests.
1472 &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.
1473 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
1474 # Google Cloud Storage object. Wildcards are not currently supported.
1475 },
1476 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001477 },
1478 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001479 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
Dan O'Mearadd494642020-05-01 07:42:23 -07001480 #
1481 # Format: `projects/{project-id}/locations/{location-id}`.
1482 #
1483 # If no parent is specified, a region will be chosen automatically.
1484 #
1485 # Supported location-ids:
1486 # `us`: USA country only,
1487 # `asia`: East asia areas, like Japan, Taiwan,
1488 # `eu`: The European Union.
1489 #
1490 # Example: `projects/project-A/locations/eu`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001491 }
1492
1493 x__xgafv: string, V1 error format.
1494 Allowed values
1495 1 - v1 error format
1496 2 - v2 error format
1497
1498Returns:
1499 An object of the form:
1500
1501 { # This resource represents a long-running operation that is the result of a
1502 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001503 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1504 # If `true`, the operation is completed, and either `error` or `response` is
1505 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -07001506 &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 -07001507 # originally returns it. If you use the default HTTP mapping, the
1508 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001509 &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 -07001510 # different programming environments, including REST APIs and RPC APIs. It is
1511 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1512 # three pieces of data: error code, error message, and error details.
1513 #
1514 # You can find out more about this error model and how to work with it in the
1515 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001516 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
Bu Sun Kim65020912020-05-20 12:08:20 -07001517 &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 -07001518 # message types for APIs to use.
1519 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001520 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001521 },
1522 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001523 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1524 # user-facing error message should be localized and sent in the
1525 # google.rpc.Status.details field, or localized by the client.
1526 },
1527 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
1528 # method returns no data on success, such as `Delete`, the response is
1529 # `google.protobuf.Empty`. If the original method is standard
1530 # `Get`/`Create`/`Update`, the response should be the resource. For other
1531 # methods, the response should have the type `XxxResponse`, where `Xxx`
1532 # is the original method name. For example, if the original method name
1533 # is `TakeSnapshot()`, the inferred response type is
1534 # `TakeSnapshotResponse`.
1535 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001536 },
1537 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1538 # contains progress information and common metadata such as create time.
1539 # Some services might not provide such metadata. Any method that returns a
1540 # long-running operation should document the metadata type, if any.
1541 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001542 },
1543 }</pre>
1544</div>
1545
1546</body></html>