blob: 4ff50a69cd29c053033d1396b4e061be562fa7e1 [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_v1p1beta1.html">Cloud Vision API</a> . <a href="vision_v1p1beta1.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;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image(s) in the file.
103 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
104 # yields the best results since it enables automatic language detection. For
105 # languages based on the Latin alphabet, setting `language_hints` is not
106 # needed. In rare cases, when the language of the text in the image is known,
107 # setting a hint will help get better results (although it will be a
108 # significant hindrance if the hint is wrong). Text detection returns an
109 # error if one or more of the specified languages is not one of the
110 # [supported languages](https://cloud.google.com/vision/docs/languages).
111 &quot;A String&quot;,
112 ],
113 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
114 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
115 },
116 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
117 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
118 # of doubles representing degrees latitude and degrees longitude. Unless
119 # specified otherwise, this must conform to the
120 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
121 # standard&lt;/a&gt;. Values must be within normalized ranges.
122 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
123 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
124 },
125 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
126 # of doubles representing degrees latitude and degrees longitude. Unless
127 # specified otherwise, this must conform to the
128 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
129 # standard&lt;/a&gt;. Values must be within normalized ranges.
130 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
131 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
132 },
133 },
134 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
135 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
136 # of the image. For example, if the desired aspect ratio is 4/3, the
137 # corresponding float value should be 1.33333. If not specified, the
138 # best possible crop is returned. The number of provided aspect ratios is
139 # limited to a maximum of 16; any aspect ratios provided after the 16th are
140 # ignored.
141 3.14,
142 ],
143 },
144 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
Bu Sun Kim65020912020-05-20 12:08:20 -0700145 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
146 # If it is not specified, system discretion will be applied.
147 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
148 { # A vertex represents a 2D point in the image.
149 # NOTE: the normalized vertex coordinates are relative to the original image
150 # and range from 0 to 1.
151 &quot;y&quot;: 3.14, # Y coordinate.
152 &quot;x&quot;: 3.14, # X coordinate.
153 },
154 ],
155 &quot;vertices&quot;: [ # The bounding polygon vertices.
156 { # A vertex represents a 2D point in the image.
157 # NOTE: the vertex coordinates are in the same scale as the original image.
158 &quot;y&quot;: 42, # Y coordinate.
159 &quot;x&quot;: 42, # X coordinate.
160 },
161 ],
162 },
163 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
164 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
165 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
166 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
167 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
168 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
169 # migrate existing products to these categories as well.
170 &quot;A String&quot;,
171 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700172 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
173 # on Product labels. We currently support an AND of OR of key-value
174 # expressions, where each expression within an OR must have the same key. An
175 # &#x27;=&#x27; should be used to connect the key and value.
176 #
177 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
178 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
179 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
180 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
181 #
182 # Format is:
183 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 },
185 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700186 &quot;pages&quot;: [ # Pages of the file to perform image annotation.
187 #
188 # Pages starts from 1, we assume the first page of the file is page 1.
189 # At most 5 pages are supported per request. Pages can be negative.
190 #
191 # Page 1 means the first page.
192 # Page 2 means the second page.
193 # Page -1 means the last page.
194 # Page -2 means the second to the last page.
195 #
196 # If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
197 #
198 # If this field is empty, by default the service performs image annotation
199 # for the first 5 pages of the file.
200 42,
201 ],
202 &quot;inputConfig&quot;: { # The desired input location and metadata. # Required. Information about the input file.
203 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
204 # Note: As with all `bytes` fields, protobuffers use a pure binary
205 # representation, whereas JSON representations use base64.
206 #
207 # Currently, this field only works for BatchAnnotateFiles requests. It does
208 # not work for AsyncBatchAnnotateFiles requests.
209 &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.
210 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
211 # Google Cloud Storage object. Wildcards are not currently supported.
212 },
213 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
214 # &quot;image/gif&quot; are supported. Wildcards are not supported.
215 },
216 &quot;features&quot;: [ # Required. Requested features.
217 { # The type of Google Cloud Vision API detection to perform, and the maximum
218 # number of results to return for that type. Multiple `Feature` objects can
219 # be specified in the `features` list.
220 &quot;type&quot;: &quot;A String&quot;, # The feature type.
221 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
222 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
223 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
224 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
225 # &quot;builtin/latest&quot;.
226 },
227 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 },
229 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -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 Kim65020912020-05-20 12:08:20 -0700257 &quot;responses&quot;: [ # Individual responses to images found within the file. This field will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 # empty if the `error` field is set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 { # Response to an image annotation request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700260 &quot;localizedObjectAnnotations&quot;: [ # If present, localized object detection has completed successfully.
261 # This will be sorted descending by confidence score.
262 { # Set of detected objects with bounding boxes.
263 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
264 &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 -0700265 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700266 { # A vertex represents a 2D point in the image.
267 # NOTE: the normalized vertex coordinates are relative to the original image
268 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700269 &quot;y&quot;: 3.14, # Y coordinate.
270 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 },
272 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700273 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700274 { # A vertex represents a 2D point in the image.
275 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700276 &quot;y&quot;: 42, # Y coordinate.
277 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278 },
279 ],
280 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700281 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
282 &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
283 # information, see
284 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
285 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 },
287 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 &quot;productSearchResults&quot;: { # Results for a product search request. # If present, product search has completed successfully.
289 &quot;productGroupedResults&quot;: [ # List of results grouped by products detected in the query image. Each entry
290 # corresponds to one bounding polygon in the query image, and contains the
291 # matching products specific to that region. There may be duplicate product
292 # matches in the union of all the per-product results.
293 { # Information about the products similar to a single product in a query
294 # image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700295 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the product detected in the query image.
296 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
297 { # A vertex represents a 2D point in the image.
298 # NOTE: the normalized vertex coordinates are relative to the original image
299 # and range from 0 to 1.
300 &quot;y&quot;: 3.14, # Y coordinate.
301 &quot;x&quot;: 3.14, # X coordinate.
302 },
303 ],
304 &quot;vertices&quot;: [ # The bounding polygon vertices.
305 { # A vertex represents a 2D point in the image.
306 # NOTE: the vertex coordinates are in the same scale as the original image.
307 &quot;y&quot;: 42, # Y coordinate.
308 &quot;x&quot;: 42, # X coordinate.
309 },
310 ],
311 },
312 &quot;results&quot;: [ # List of results, one for each product match.
313 { # Information about a product.
314 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
315 # to the query.
316 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700317 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
318 #
319 # Format is:
320 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
321 #
322 # This field is ignored when creating a product.
Bu Sun Kim65020912020-05-20 12:08:20 -0700323 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
324 # 4096 characters long.
325 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
326 # characters long.
327 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
328 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
329 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
330 # not be used for new products.
331 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
332 # constraints can be specified based on the product_labels.
333 #
334 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
335 # strings with integer values can match a range-based restriction which is
336 # to be supported soon.
337 #
338 # Multiple values can be assigned to the same key. One product may have up to
339 # 500 product_labels.
340 #
341 # Notice that the total number of distinct product_labels over all products
342 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
343 # will refuse to work for that ProductSet.
344 { # A product label represented as a key-value pair.
345 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
346 # exceed 128 bytes.
347 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
348 # cannot exceed 128 bytes.
349 },
350 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 },
352 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
353 # 1 (full confidence).
354 },
355 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700356 &quot;objectAnnotations&quot;: [ # List of generic predictions for the object in the bounding box.
357 { # Prediction for what the object in the bounding box is.
358 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
359 &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
360 # information, see
361 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
362 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
363 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
364 },
365 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700366 },
367 ],
368 &quot;results&quot;: [ # List of results, one for each product match.
369 { # Information about a product.
370 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
371 # to the query.
372 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700373 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
374 #
375 # Format is:
376 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
377 #
378 # This field is ignored when creating a product.
Bu Sun Kim65020912020-05-20 12:08:20 -0700379 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
380 # 4096 characters long.
381 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
382 # characters long.
383 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
384 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
385 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
386 # not be used for new products.
387 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
388 # constraints can be specified based on the product_labels.
389 #
390 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
391 # strings with integer values can match a range-based restriction which is
392 # to be supported soon.
393 #
394 # Multiple values can be assigned to the same key. One product may have up to
395 # 500 product_labels.
396 #
397 # Notice that the total number of distinct product_labels over all products
398 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
399 # will refuse to work for that ProductSet.
400 { # A product label represented as a key-value pair.
401 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
402 # exceed 128 bytes.
403 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
404 # cannot exceed 128 bytes.
405 },
406 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700407 },
408 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
409 # 1 (full confidence).
410 },
411 ],
412 &quot;indexTime&quot;: &quot;A String&quot;, # Timestamp of the index which provided these results. Products added to the
413 # product set and products removed from the product set after this time are
414 # not reflected in the current results.
415 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700416 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # If set, represents the error message for the operation.
417 # Note that filled-in image annotations are guaranteed to be
418 # correct, even when `error` is set.
419 # different programming environments, including REST APIs and RPC APIs. It is
420 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
421 # three pieces of data: error code, error message, and error details.
422 #
423 # You can find out more about this error model and how to work with it in the
424 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -0700425 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
426 # message types for APIs to use.
427 {
428 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
429 },
430 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700431 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
432 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
433 # user-facing error message should be localized and sent in the
434 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700435 },
436 &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 -0700437 # completed successfully.
438 # This annotation provides the structural hierarchy for the OCR detected
439 # text.
440 # The hierarchy of an OCR extracted text structure is like this:
Dan O'Mearadd494642020-05-01 07:42:23 -0700441 # TextAnnotation -&gt; Page -&gt; Block -&gt; Paragraph -&gt; Word -&gt; Symbol
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 # Each structural component, starting from Page, may further have their own
443 # properties. Properties describe detected languages, breaks etc.. Please refer
444 # to the TextAnnotation.TextProperty message definition below for more
445 # detail.
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &quot;pages&quot;: [ # List of pages detected by OCR.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 { # Detected page from OCR.
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 &quot;blocks&quot;: [ # List of blocks of text, images etc on this page.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 { # Logical element on the page.
Bu Sun Kim65020912020-05-20 12:08:20 -0700450 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the block.
451 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
452 { # Detected language for a structural component.
453 &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
454 # information, see
455 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
456 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
457 },
458 ],
459 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
460 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
461 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
462 },
463 },
464 &quot;blockType&quot;: &quot;A String&quot;, # Detected block type (text, image etc) for this block.
465 &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 -0700466 # The vertices are in the order of top-left, top-right, bottom-right,
467 # bottom-left. When a rotation of the bounding box is detected the rotation
468 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700469 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700470 # For example:
471 #
472 # * when the text is horizontal it might look like:
473 #
474 # 0----1
475 # | |
476 # 3----2
477 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700478 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 #
480 # 2----3
481 # | |
482 # 1----0
483 #
484 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700485 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700486 { # A vertex represents a 2D point in the image.
487 # NOTE: the normalized vertex coordinates are relative to the original image
488 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 &quot;y&quot;: 3.14, # Y coordinate.
490 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700491 },
492 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700494 { # A vertex represents a 2D point in the image.
495 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700496 &quot;y&quot;: 42, # Y coordinate.
497 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700498 },
499 ],
500 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700501 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the block. Range [0, 1].
502 &quot;paragraphs&quot;: [ # List of paragraphs in this block (if this blocks is of type text).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700503 { # Structural unit of text representing a number of words in certain order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700504 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the paragraph.
505 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
506 { # Detected language for a structural component.
507 &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
508 # information, see
509 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
510 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
511 },
512 ],
513 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
514 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
515 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
516 },
517 },
518 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the paragraph.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700519 # The vertices are in the order of top-left, top-right, bottom-right,
520 # bottom-left. When a rotation of the bounding box is detected the rotation
521 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 # For example:
524 # * when the text is horizontal it might look like:
525 # 0----1
526 # | |
527 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700528 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700529 # 2----3
530 # | |
531 # 1----0
532 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700533 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700534 { # A vertex represents a 2D point in the image.
535 # NOTE: the normalized vertex coordinates are relative to the original image
536 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700537 &quot;y&quot;: 3.14, # Y coordinate.
538 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 },
540 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700542 { # A vertex represents a 2D point in the image.
543 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 &quot;y&quot;: 42, # Y coordinate.
545 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700546 },
547 ],
548 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the paragraph. Range [0, 1].
550 &quot;words&quot;: [ # List of all words in this paragraph.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700551 { # A word representation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the word.
Dan O'Mearadd494642020-05-01 07:42:23 -0700553 # The vertices are in the order of top-left, top-right, bottom-right,
554 # bottom-left. When a rotation of the bounding box is detected the rotation
555 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700556 # read in the &#x27;natural&#x27; orientation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700557 # For example:
558 # * when the text is horizontal it might look like:
559 # 0----1
560 # | |
561 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700562 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Dan O'Mearadd494642020-05-01 07:42:23 -0700563 # 2----3
564 # | |
565 # 1----0
566 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700567 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Dan O'Mearadd494642020-05-01 07:42:23 -0700568 { # A vertex represents a 2D point in the image.
569 # NOTE: the normalized vertex coordinates are relative to the original image
570 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 &quot;y&quot;: 3.14, # Y coordinate.
572 &quot;x&quot;: 3.14, # X coordinate.
Dan O'Mearadd494642020-05-01 07:42:23 -0700573 },
574 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 &quot;vertices&quot;: [ # The bounding polygon vertices.
Dan O'Mearadd494642020-05-01 07:42:23 -0700576 { # A vertex represents a 2D point in the image.
577 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700578 &quot;y&quot;: 42, # Y coordinate.
579 &quot;x&quot;: 42, # X coordinate.
Dan O'Mearadd494642020-05-01 07:42:23 -0700580 },
581 ],
582 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700583 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the word. Range [0, 1].
584 &quot;symbols&quot;: [ # List of symbols in the word.
585 # The order of the symbols follows the natural reading order.
586 { # A single symbol representation.
587 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the symbol.
588 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
589 { # Detected language for a structural component.
590 &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
591 # information, see
592 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
593 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
594 },
595 ],
596 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
597 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
598 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
599 },
600 },
601 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the symbol.
602 # The vertices are in the order of top-left, top-right, bottom-right,
603 # bottom-left. When a rotation of the bounding box is detected the rotation
604 # is represented as around the top-left corner as defined when the text is
605 # read in the &#x27;natural&#x27; orientation.
606 # For example:
607 # * when the text is horizontal it might look like:
608 # 0----1
609 # | |
610 # 3----2
611 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
612 # 2----3
613 # | |
614 # 1----0
615 # and the vertex order will still be (0, 1, 2, 3).
616 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
617 { # A vertex represents a 2D point in the image.
618 # NOTE: the normalized vertex coordinates are relative to the original image
619 # and range from 0 to 1.
620 &quot;y&quot;: 3.14, # Y coordinate.
621 &quot;x&quot;: 3.14, # X coordinate.
622 },
623 ],
624 &quot;vertices&quot;: [ # The bounding polygon vertices.
625 { # A vertex represents a 2D point in the image.
626 # NOTE: the vertex coordinates are in the same scale as the original image.
627 &quot;y&quot;: 42, # Y coordinate.
628 &quot;x&quot;: 42, # X coordinate.
629 },
630 ],
631 },
632 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the symbol. Range [0, 1].
633 &quot;text&quot;: &quot;A String&quot;, # The actual UTF-8 representation of the symbol.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700635 ],
636 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the word.
637 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700638 { # Detected language for a structural component.
Bu Sun Kim65020912020-05-20 12:08:20 -0700639 &quot;languageCode&quot;: &quot;A String&quot;, # The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot;. For more
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700640 # information, see
641 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 },
644 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700645 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
646 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
647 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
648 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700649 },
650 },
651 ],
652 },
653 ],
654 },
655 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700656 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected on the page.
657 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
658 { # Detected language for a structural component.
659 &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
660 # information, see
661 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
662 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
663 },
664 ],
665 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
666 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
667 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
668 },
669 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700670 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the page. Range [0, 1].
671 &quot;height&quot;: 42, # Page height. For PDFs the unit is points. For images (including
672 # TIFFs) the unit is pixels.
673 &quot;width&quot;: 42, # Page width. For PDFs the unit is points. For images (including
674 # TIFFs) the unit is pixels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700675 },
676 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700677 &quot;text&quot;: &quot;A String&quot;, # UTF-8 text detected on the pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700678 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700679 &quot;textAnnotations&quot;: [ # If present, text (OCR) detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
682 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700683 # `LocationInfo` elements can be present because one location may
684 # indicate the location of the scene in the image, and another location
685 # may indicate the location of the place where the image was taken.
686 # Location information is usually present for landmarks.
687 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 # of doubles representing degrees latitude and degrees longitude. Unless
690 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -0700691 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -0700692 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700693 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
694 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 },
696 },
697 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
699 # [Google Knowledge Graph Search
700 # API](https://developers.google.com/knowledge-graph/).
701 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
702 # The accuracy of the entity detection in an image.
703 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
704 # this field represents the confidence that there is a tower in the query
705 # image. Range [0, 1].
706 &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 -0700707 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700709 { # A vertex represents a 2D point in the image.
710 # NOTE: the normalized vertex coordinates are relative to the original image
711 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700712 &quot;y&quot;: 3.14, # Y coordinate.
713 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700714 },
715 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700716 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 { # A vertex represents a 2D point in the image.
718 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 &quot;y&quot;: 42, # Y coordinate.
720 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 },
722 ],
723 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700724 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
725 # `description` is expressed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700726 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
727 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
728 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
729 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
730 # detected distant towering building, even though the confidence that
731 # there is a tower in each image may be the same. Range [0, 1].
732 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
733 # fields, such a score or string that qualifies the entity.
734 { # A `Property` consists of a user-supplied name/value pair.
735 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
736 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
737 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
738 },
739 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700740 },
741 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700742 &quot;imagePropertiesAnnotation&quot;: { # Stores image properties, such as dominant colors. # If present, image properties were extracted successfully.
743 &quot;dominantColors&quot;: { # Set of dominant colors and their corresponding scores. # If present, dominant colors completed successfully.
744 &quot;colors&quot;: [ # RGB color values with their score and pixel fraction.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700745 { # Color information consists of RGB channels, score, and the fraction of
746 # the image that the color occupies in the image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700747 &quot;score&quot;: 3.14, # Image-specific score for this color. Value in range [0, 1].
Bu Sun Kim65020912020-05-20 12:08:20 -0700748 &quot;pixelFraction&quot;: 3.14, # The fraction of pixels the color occupies in the image.
749 # Value in range [0, 1].
750 &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 -0700751 # for simplicity of conversion to/from color representations in various
752 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -0700753 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
754 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -0700756 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700757 #
758 # Note: this proto does not carry information about the absolute color space
759 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
760 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
761 # space.
762 #
763 # Example (Java):
764 #
765 # import com.google.type.Color;
766 #
767 # // ...
768 # public static java.awt.Color fromProto(Color protocolor) {
769 # float alpha = protocolor.hasAlpha()
770 # ? protocolor.getAlpha().getValue()
771 # : 1.0;
772 #
773 # return new java.awt.Color(
774 # protocolor.getRed(),
775 # protocolor.getGreen(),
776 # protocolor.getBlue(),
777 # alpha);
778 # }
779 #
780 # public static Color toProto(java.awt.Color color) {
781 # float red = (float) color.getRed();
782 # float green = (float) color.getGreen();
783 # float blue = (float) color.getBlue();
784 # float denominator = 255.0;
785 # Color.Builder resultBuilder =
786 # Color
787 # .newBuilder()
788 # .setRed(red / denominator)
789 # .setGreen(green / denominator)
790 # .setBlue(blue / denominator);
791 # int alpha = color.getAlpha();
792 # if (alpha != 255) {
793 # result.setAlpha(
794 # FloatValue
795 # .newBuilder()
796 # .setValue(((float) alpha) / denominator)
797 # .build());
798 # }
799 # return resultBuilder.build();
800 # }
801 # // ...
802 #
803 # Example (iOS / Obj-C):
804 #
805 # // ...
806 # static UIColor* fromProto(Color* protocolor) {
807 # float red = [protocolor red];
808 # float green = [protocolor green];
809 # float blue = [protocolor blue];
810 # FloatValue* alpha_wrapper = [protocolor alpha];
811 # float alpha = 1.0;
812 # if (alpha_wrapper != nil) {
813 # alpha = [alpha_wrapper value];
814 # }
815 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
816 # }
817 #
818 # static Color* toProto(UIColor* color) {
819 # CGFloat red, green, blue, alpha;
Dan O'Mearadd494642020-05-01 07:42:23 -0700820 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700821 # return nil;
822 # }
823 # Color* result = [[Color alloc] init];
824 # [result setRed:red];
825 # [result setGreen:green];
826 # [result setBlue:blue];
Dan O'Mearadd494642020-05-01 07:42:23 -0700827 # if (alpha &lt;= 0.9999) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828 # [result setAlpha:floatWrapperWithValue(alpha)];
829 # }
830 # [result autorelease];
831 # return result;
832 # }
833 # // ...
834 #
835 # Example (JavaScript):
836 #
837 # // ...
838 #
839 # var protoToCssColor = function(rgb_color) {
840 # var redFrac = rgb_color.red || 0.0;
841 # var greenFrac = rgb_color.green || 0.0;
842 # var blueFrac = rgb_color.blue || 0.0;
843 # var red = Math.floor(redFrac * 255);
844 # var green = Math.floor(greenFrac * 255);
845 # var blue = Math.floor(blueFrac * 255);
846 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700847 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700848 # return rgbToCssColor_(red, green, blue);
849 # }
850 #
851 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -0700852 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
853 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700854 # };
855 #
856 # var rgbToCssColor_ = function(red, green, blue) {
Dan O'Mearadd494642020-05-01 07:42:23 -0700857 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700858 # var hexString = rgbNumber.toString(16);
859 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -0700860 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -0700861 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -0700862 # resultBuilder.push(&#x27;0&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700863 # }
864 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 # return resultBuilder.join(&#x27;&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700866 # };
867 #
868 # // ...
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
870 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
871 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
872 &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 -0700873 # the final pixel color is defined by the equation:
874 #
875 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
876 #
877 # This means that a value of 1.0 corresponds to a solid color, whereas
878 # a value of 0.0 corresponds to a completely transparent color. This
879 # uses a wrapper message rather than a simple float scalar so that it is
880 # possible to distinguish between a default value and the value being unset.
881 # If omitted, this color object is to be rendered as a solid color
882 # (as if the alpha value had been explicitly given with a value of 1.0).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700884 },
885 ],
886 },
887 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700888 &quot;logoAnnotations&quot;: [ # If present, logo detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700889 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700890 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
891 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700892 # `LocationInfo` elements can be present because one location may
893 # indicate the location of the scene in the image, and another location
894 # may indicate the location of the place where the image was taken.
895 # Location information is usually present for landmarks.
896 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700897 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700898 # of doubles representing degrees latitude and degrees longitude. Unless
899 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
Dan O'Mearadd494642020-05-01 07:42:23 -0700901 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700902 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
903 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700904 },
905 },
906 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700907 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700908 # [Google Knowledge Graph Search
909 # API](https://developers.google.com/knowledge-graph/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700910 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
911 # The accuracy of the entity detection in an image.
912 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
913 # this field represents the confidence that there is a tower in the query
914 # image. Range [0, 1].
915 &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 -0700916 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700917 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 { # A vertex represents a 2D point in the image.
919 # NOTE: the normalized vertex coordinates are relative to the original image
920 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700921 &quot;y&quot;: 3.14, # Y coordinate.
922 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700923 },
924 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700925 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700926 { # A vertex represents a 2D point in the image.
927 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 &quot;y&quot;: 42, # Y coordinate.
929 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 },
931 ],
932 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700933 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
934 # `description` is expressed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700935 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
936 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
937 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
938 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
939 # detected distant towering building, even though the confidence that
940 # there is a tower in each image may be the same. Range [0, 1].
941 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
942 # fields, such a score or string that qualifies the entity.
943 { # A `Property` consists of a user-supplied name/value pair.
944 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
945 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
946 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
947 },
948 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700949 },
950 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 &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 -0700952 # comes from.
953 # information about the source of that image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700954 &quot;uri&quot;: &quot;A String&quot;, # The URI of the file used to produce the image.
955 &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 -0700956 # the file used to produce the image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 &quot;webDetection&quot;: { # Relevant information for the image from the Internet. # If present, web detection has completed successfully.
959 &quot;visuallySimilarImages&quot;: [ # The visually similar image results.
960 { # Metadata for online images.
961 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
962 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
963 },
964 ],
965 &quot;bestGuessLabels&quot;: [ # The service&#x27;s best guess as to the topic of the request image.
966 # Inferred from similar images on the open web.
967 { # Label to provide extra metadata for the web detection.
968 &quot;label&quot;: &quot;A String&quot;, # Label for extra metadata.
969 &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;.
970 # For more information, see
971 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
972 },
973 ],
974 &quot;fullMatchingImages&quot;: [ # Fully matching images from the Internet.
975 # Can include resized copies of the query image.
976 { # Metadata for online images.
977 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
978 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
979 },
980 ],
981 &quot;webEntities&quot;: [ # Deduced entities from similar images on the Internet.
982 { # Entity deduced from similar images on the Internet.
983 &quot;entityId&quot;: &quot;A String&quot;, # Opaque entity ID.
984 &quot;description&quot;: &quot;A String&quot;, # Canonical description of the entity, in English.
985 &quot;score&quot;: 3.14, # Overall relevancy score for the entity.
986 # Not normalized and not comparable across different image queries.
987 },
988 ],
989 &quot;pagesWithMatchingImages&quot;: [ # Web pages containing the matching images from the Internet.
990 { # Metadata for web pages.
Bu Sun Kim65020912020-05-20 12:08:20 -0700991 &quot;partialMatchingImages&quot;: [ # Partial matching images on the page.
992 # Those images are similar enough to share some key-point features. For
993 # example an original image will likely have partial matching for its
994 # crops.
995 { # Metadata for online images.
996 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
997 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
998 },
999 ],
1000 &quot;url&quot;: &quot;A String&quot;, # The result web page URL.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001001 &quot;pageTitle&quot;: &quot;A String&quot;, # Title for the web page, may contain HTML markups.
1002 &quot;fullMatchingImages&quot;: [ # Fully matching images on the page.
1003 # Can include resized copies of the query image.
1004 { # Metadata for online images.
1005 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1006 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
1007 },
1008 ],
1009 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the web page.
Bu Sun Kim65020912020-05-20 12:08:20 -07001010 },
1011 ],
1012 &quot;partialMatchingImages&quot;: [ # Partial matching images from the Internet.
1013 # Those images are similar enough to share some key-point features. For
1014 # example an original image will likely have partial matching for its crops.
1015 { # Metadata for online images.
1016 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
1017 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001018 },
1019 ],
1020 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001021 &quot;safeSearchAnnotation&quot;: { # Set of features pertaining to the image, computed by computer vision # If present, safe-search annotation has completed successfully.
1022 # methods over safe-search verticals (for example, adult, spoof, medical,
1023 # violence).
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 &quot;violence&quot;: &quot;A String&quot;, # Likelihood that this image contains violent content.
1025 &quot;adult&quot;: &quot;A String&quot;, # Represents the adult content likelihood for the image. Adult content may
1026 # contain elements such as nudity, pornographic images or cartoons, or
1027 # sexual activities.
1028 &quot;spoof&quot;: &quot;A String&quot;, # Spoof likelihood. The likelihood that an modification
1029 # was made to the image&#x27;s canonical version to make it appear
1030 # funny or offensive.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001031 &quot;medical&quot;: &quot;A String&quot;, # Likelihood that this is a medical image.
1032 &quot;racy&quot;: &quot;A String&quot;, # Likelihood that the request image contains racy content. Racy content may
1033 # include (but is not limited to) skimpy or sheer clothing, strategically
1034 # covered nudity, lewd or provocative poses, or close-ups of sensitive
1035 # body areas.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001036 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001037 &quot;landmarkAnnotations&quot;: [ # If present, landmark detection has completed successfully.
1038 { # Set of detected entity features.
1039 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1040 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
1041 # `LocationInfo` elements can be present because one location may
1042 # indicate the location of the scene in the image, and another location
1043 # may indicate the location of the place where the image was taken.
1044 # Location information is usually present for landmarks.
1045 { # Detected entity location information.
1046 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
1047 # of doubles representing degrees latitude and degrees longitude. Unless
1048 # specified otherwise, this must conform to the
1049 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1050 # standard&lt;/a&gt;. Values must be within normalized ranges.
1051 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1052 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1053 },
1054 },
1055 ],
1056 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1057 # [Google Knowledge Graph Search
1058 # API](https://developers.google.com/knowledge-graph/).
1059 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
1060 # The accuracy of the entity detection in an image.
1061 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
1062 # this field represents the confidence that there is a tower in the query
1063 # image. Range [0, 1].
1064 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
1065 # for `LABEL_DETECTION` features.
1066 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1067 { # A vertex represents a 2D point in the image.
1068 # NOTE: the normalized vertex coordinates are relative to the original image
1069 # and range from 0 to 1.
1070 &quot;y&quot;: 3.14, # Y coordinate.
1071 &quot;x&quot;: 3.14, # X coordinate.
1072 },
1073 ],
1074 &quot;vertices&quot;: [ # The bounding polygon vertices.
1075 { # A vertex represents a 2D point in the image.
1076 # NOTE: the vertex coordinates are in the same scale as the original image.
1077 &quot;y&quot;: 42, # Y coordinate.
1078 &quot;x&quot;: 42, # X coordinate.
1079 },
1080 ],
1081 },
1082 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1083 # `description` is expressed.
1084 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1085 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1086 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1087 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1088 # detected distant towering building, even though the confidence that
1089 # there is a tower in each image may be the same. Range [0, 1].
1090 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
1091 # fields, such a score or string that qualifies the entity.
1092 { # A `Property` consists of a user-supplied name/value pair.
1093 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1094 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1095 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
1096 },
1097 ],
1098 },
1099 ],
1100 &quot;faceAnnotations&quot;: [ # If present, face detection has completed successfully.
1101 { # A face annotation object contains the results of face detection.
1102 &quot;surpriseLikelihood&quot;: &quot;A String&quot;, # Surprise likelihood.
1103 &quot;landmarks&quot;: [ # Detected face landmarks.
1104 { # A face-specific landmark (for example, a face feature).
1105 &quot;position&quot;: { # A 3D position in the image, used primarily for Face detection landmarks. # Face landmark position.
1106 # A valid Position must have both x and y coordinates.
1107 # The position coordinates are in the same scale as the original image.
1108 &quot;x&quot;: 3.14, # X coordinate.
1109 &quot;z&quot;: 3.14, # Z coordinate (or depth).
1110 &quot;y&quot;: 3.14, # Y coordinate.
1111 },
1112 &quot;type&quot;: &quot;A String&quot;, # Face landmark type.
1113 },
1114 ],
1115 &quot;angerLikelihood&quot;: &quot;A String&quot;, # Anger likelihood.
1116 &quot;landmarkingConfidence&quot;: 3.14, # Face landmarking confidence. Range [0, 1].
1117 &quot;joyLikelihood&quot;: &quot;A String&quot;, # Joy likelihood.
1118 &quot;detectionConfidence&quot;: 3.14, # Detection confidence. Range [0, 1].
1119 &quot;panAngle&quot;: 3.14, # Yaw angle, which indicates the leftward/rightward angle that the face is
1120 # pointing relative to the vertical plane perpendicular to the image. Range
1121 # [-180,180].
1122 &quot;underExposedLikelihood&quot;: &quot;A String&quot;, # Under-exposed likelihood.
1123 &quot;blurredLikelihood&quot;: &quot;A String&quot;, # Blurred likelihood.
1124 &quot;headwearLikelihood&quot;: &quot;A String&quot;, # Headwear likelihood.
1125 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the face. The coordinates of the bounding box
1126 # are in the original image&#x27;s scale.
1127 # The bounding box is computed to &quot;frame&quot; the face in accordance with human
1128 # expectations. It is based on the landmarker results.
1129 # Note that one or more x and/or y coordinates may not be generated in the
1130 # `BoundingPoly` (the polygon will be unbounded) if only a partial face
1131 # appears in the image to be annotated.
1132 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1133 { # A vertex represents a 2D point in the image.
1134 # NOTE: the normalized vertex coordinates are relative to the original image
1135 # and range from 0 to 1.
1136 &quot;y&quot;: 3.14, # Y coordinate.
1137 &quot;x&quot;: 3.14, # X coordinate.
1138 },
1139 ],
1140 &quot;vertices&quot;: [ # The bounding polygon vertices.
1141 { # A vertex represents a 2D point in the image.
1142 # NOTE: the vertex coordinates are in the same scale as the original image.
1143 &quot;y&quot;: 42, # Y coordinate.
1144 &quot;x&quot;: 42, # X coordinate.
1145 },
1146 ],
1147 },
1148 &quot;rollAngle&quot;: 3.14, # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
1149 # of the face relative to the image vertical about the axis perpendicular to
1150 # the face. Range [-180,180].
1151 &quot;sorrowLikelihood&quot;: &quot;A String&quot;, # Sorrow likelihood.
1152 &quot;tiltAngle&quot;: 3.14, # Pitch angle, which indicates the upwards/downwards angle that the face is
1153 # pointing relative to the image&#x27;s horizontal plane. Range [-180,180].
1154 &quot;fdBoundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The `fd_bounding_poly` bounding polygon is tighter than the
1155 # `boundingPoly`, and encloses only the skin part of the face. Typically, it
1156 # is used to eliminate the face from any image analysis that detects the
1157 # &quot;amount of skin&quot; visible in an image. It is not based on the
1158 # landmarker results, only on the initial face detection, hence
1159 # the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
1160 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1161 { # A vertex represents a 2D point in the image.
1162 # NOTE: the normalized vertex coordinates are relative to the original image
1163 # and range from 0 to 1.
1164 &quot;y&quot;: 3.14, # Y coordinate.
1165 &quot;x&quot;: 3.14, # X coordinate.
1166 },
1167 ],
1168 &quot;vertices&quot;: [ # The bounding polygon vertices.
1169 { # A vertex represents a 2D point in the image.
1170 # NOTE: the vertex coordinates are in the same scale as the original image.
1171 &quot;y&quot;: 42, # Y coordinate.
1172 &quot;x&quot;: 42, # X coordinate.
1173 },
1174 ],
1175 },
1176 },
1177 ],
1178 &quot;cropHintsAnnotation&quot;: { # Set of crop hints that are used to generate new crops when serving images. # If present, crop hints have completed successfully.
1179 &quot;cropHints&quot;: [ # Crop hint results.
1180 { # Single crop hint that is used to generate a new crop when serving an image.
1181 &quot;confidence&quot;: 3.14, # Confidence of this being a salient region. Range [0, 1].
1182 &quot;importanceFraction&quot;: 3.14, # Fraction of importance of this salient region with respect to the original
1183 # image.
1184 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the crop region. The coordinates of the bounding
1185 # box are in the original image&#x27;s scale.
1186 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1187 { # A vertex represents a 2D point in the image.
1188 # NOTE: the normalized vertex coordinates are relative to the original image
1189 # and range from 0 to 1.
1190 &quot;y&quot;: 3.14, # Y coordinate.
1191 &quot;x&quot;: 3.14, # X coordinate.
1192 },
1193 ],
1194 &quot;vertices&quot;: [ # The bounding polygon vertices.
1195 { # A vertex represents a 2D point in the image.
1196 # NOTE: the vertex coordinates are in the same scale as the original image.
1197 &quot;y&quot;: 42, # Y coordinate.
1198 &quot;x&quot;: 42, # X coordinate.
1199 },
1200 ],
1201 },
1202 },
1203 ],
1204 },
1205 &quot;labelAnnotations&quot;: [ # If present, label detection has completed successfully.
1206 { # Set of detected entity features.
1207 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1208 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
1209 # `LocationInfo` elements can be present because one location may
1210 # indicate the location of the scene in the image, and another location
1211 # may indicate the location of the place where the image was taken.
1212 # Location information is usually present for landmarks.
1213 { # Detected entity location information.
1214 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
1215 # of doubles representing degrees latitude and degrees longitude. Unless
1216 # specified otherwise, this must conform to the
1217 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1218 # standard&lt;/a&gt;. Values must be within normalized ranges.
1219 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1220 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1221 },
1222 },
1223 ],
1224 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1225 # [Google Knowledge Graph Search
1226 # API](https://developers.google.com/knowledge-graph/).
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;y&quot;: 42, # Y coordinate.
1246 &quot;x&quot;: 42, # X coordinate.
1247 },
1248 ],
1249 },
1250 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1251 # `description` is expressed.
1252 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1253 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1254 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1255 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1256 # detected distant towering building, even though the confidence that
1257 # there is a tower in each image may be the same. Range [0, 1].
1258 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
1259 # fields, such a score or string that qualifies the entity.
1260 { # A `Property` consists of a user-supplied name/value pair.
1261 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1262 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1263 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
1264 },
1265 ],
1266 },
1267 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001268 },
1269 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001270 &quot;inputConfig&quot;: { # The desired input location and metadata. # Information about the file for which this response is generated.
1271 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
1272 # Note: As with all `bytes` fields, protobuffers use a pure binary
1273 # representation, whereas JSON representations use base64.
1274 #
1275 # Currently, this field only works for BatchAnnotateFiles requests. It does
1276 # not work for AsyncBatchAnnotateFiles requests.
1277 &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.
1278 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
1279 # Google Cloud Storage object. Wildcards are not currently supported.
1280 },
1281 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
1282 # &quot;image/gif&quot; are supported. Wildcards are not supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001283 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001284 &quot;totalPages&quot;: 42, # This field gives the total number of pages in the file.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001285 &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
1286 # `responses` field will not be set in this case.
1287 # different programming environments, including REST APIs and RPC APIs. It is
1288 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1289 # three pieces of data: error code, error message, and error details.
1290 #
1291 # You can find out more about this error model and how to work with it in the
1292 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1293 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1294 # message types for APIs to use.
1295 {
1296 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1297 },
1298 ],
1299 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1300 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1301 # user-facing error message should be localized and sent in the
1302 # google.rpc.Status.details field, or localized by the client.
1303 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001304 },
1305 ],
1306 }</pre>
1307</div>
1308
1309<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001310 <code class="details" id="asyncBatchAnnotate">asyncBatchAnnotate(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001311 <pre>Run asynchronous image detection and annotation for a list of generic
1312files, such as PDF files, which may contain multiple pages and multiple
1313images per page. Progress and results can be retrieved through the
1314`google.longrunning.Operations` interface.
1315`Operation.metadata` contains `OperationMetadata` (metadata).
1316`Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
1317
1318Args:
Dan O'Mearadd494642020-05-01 07:42:23 -07001319 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001320 The object takes the form of:
1321
1322{ # Multiple async file annotation requests are batched into a single service
1323 # call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001324 &quot;requests&quot;: [ # Required. Individual async file annotation requests for this batch.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001325 { # An offline file annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -07001326 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image(s) in the file.
1327 &quot;languageHints&quot;: [ # List of languages to use for TEXT_DETECTION. In most cases, an empty value
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001328 # yields the best results since it enables automatic language detection. For
1329 # languages based on the Latin alphabet, setting `language_hints` is not
1330 # needed. In rare cases, when the language of the text in the image is known,
1331 # setting a hint will help get better results (although it will be a
1332 # significant hindrance if the hint is wrong). Text detection returns an
1333 # error if one or more of the specified languages is not one of the
Dan O'Mearadd494642020-05-01 07:42:23 -07001334 # [supported languages](https://cloud.google.com/vision/docs/languages).
Bu Sun Kim65020912020-05-20 12:08:20 -07001335 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001336 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001337 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
1338 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
1339 },
1340 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
1341 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
1342 # of doubles representing degrees latitude and degrees longitude. Unless
1343 # specified otherwise, this must conform to the
1344 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1345 # standard&lt;/a&gt;. Values must be within normalized ranges.
1346 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1347 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1348 },
1349 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
1350 # of doubles representing degrees latitude and degrees longitude. Unless
1351 # specified otherwise, this must conform to the
1352 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
1353 # standard&lt;/a&gt;. Values must be within normalized ranges.
1354 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1355 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001356 },
1357 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001358 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
1359 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001360 # of the image. For example, if the desired aspect ratio is 4/3, the
1361 # corresponding float value should be 1.33333. If not specified, the
1362 # best possible crop is returned. The number of provided aspect ratios is
1363 # limited to a maximum of 16; any aspect ratios provided after the 16th are
1364 # ignored.
1365 3.14,
1366 ],
1367 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001368 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
Bu Sun Kim65020912020-05-20 12:08:20 -07001369 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
1370 # If it is not specified, system discretion will be applied.
1371 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1372 { # A vertex represents a 2D point in the image.
1373 # NOTE: the normalized vertex coordinates are relative to the original image
1374 # and range from 0 to 1.
1375 &quot;y&quot;: 3.14, # Y coordinate.
1376 &quot;x&quot;: 3.14, # X coordinate.
1377 },
1378 ],
1379 &quot;vertices&quot;: [ # The bounding polygon vertices.
1380 { # A vertex represents a 2D point in the image.
1381 # NOTE: the vertex coordinates are in the same scale as the original image.
1382 &quot;y&quot;: 42, # Y coordinate.
1383 &quot;x&quot;: 42, # X coordinate.
1384 },
1385 ],
1386 },
1387 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
1388 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
1389 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
1390 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
1391 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
1392 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
1393 # migrate existing products to these categories as well.
1394 &quot;A String&quot;,
1395 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001396 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
1397 # on Product labels. We currently support an AND of OR of key-value
1398 # expressions, where each expression within an OR must have the same key. An
1399 # &#x27;=&#x27; should be used to connect the key and value.
1400 #
1401 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
1402 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
1403 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
1404 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
1405 #
1406 # Format is:
1407 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001408 },
1409 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &quot;outputConfig&quot;: { # The desired output location and metadata. # Required. The desired output location and metadata (e.g. format).
1411 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output will be written to. # The Google Cloud Storage location to write the output(s) to.
1412 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI prefix where the results will be stored. Results
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001413 # will be in JSON format and preceded by its corresponding input URI prefix.
1414 # This field can either represent a gcs file prefix or gcs directory. In
1415 # either case, the uri should be unique because in order to get all of the
1416 # output files, you will need to do a wildcard gcs search on the uri prefix
1417 # you provide.
1418 #
1419 # Examples:
1420 #
1421 # * File Prefix: gs://bucket-name/here/filenameprefix The output files
1422 # will be created in gs://bucket-name/here/ and the names of the
Bu Sun Kim65020912020-05-20 12:08:20 -07001423 # output files will begin with &quot;filenameprefix&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001424 #
1425 # * Directory Prefix: gs://bucket-name/some/location/ The output files
1426 # will be created in gs://bucket-name/some/location/ and the names of the
1427 # output files could be anything because there was no filename prefix
1428 # specified.
1429 #
1430 # If multiple outputs, each response is still AnnotateFileResponse, each of
1431 # which contains some subset of the full list of AnnotateImageResponse.
1432 # Multiple outputs can happen if, for example, the output JSON is too large
1433 # and overflows into multiple sharded files.
1434 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001435 &quot;batchSize&quot;: 42, # The max number of response protos to put into each output JSON file on
1436 # Google Cloud Storage.
1437 # The valid range is [1, 100]. If not specified, the default value is 20.
1438 #
1439 # For example, for one pdf file with 100 pages, 100 response protos will
1440 # be generated. If `batch_size` = 20, then 5 json files each
1441 # containing 20 response protos will be written under the prefix
1442 # `gcs_destination`.`uri`.
1443 #
1444 # Currently, batch_size only applies to GcsDestination, with potential future
1445 # support for other output configurations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001446 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001447 &quot;inputConfig&quot;: { # The desired input location and metadata. # Required. Information about the input file.
1448 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001449 # Note: As with all `bytes` fields, protobuffers use a pure binary
1450 # representation, whereas JSON representations use base64.
1451 #
1452 # Currently, this field only works for BatchAnnotateFiles requests. It does
1453 # not work for AsyncBatchAnnotateFiles requests.
Bu Sun Kim65020912020-05-20 12:08:20 -07001454 &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.
1455 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001456 # Google Cloud Storage object. Wildcards are not currently supported.
1457 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001458 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
1459 # &quot;image/gif&quot; are supported. Wildcards are not supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001460 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001461 &quot;features&quot;: [ # Required. Requested features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 { # The type of Google Cloud Vision API detection to perform, and the maximum
1463 # number of results to return for that type. Multiple `Feature` objects can
1464 # be specified in the `features` list.
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 &quot;type&quot;: &quot;A String&quot;, # The feature type.
1466 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001467 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001468 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
1469 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
1470 # &quot;builtin/latest&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001471 },
1472 ],
1473 },
1474 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001475 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
Dan O'Mearadd494642020-05-01 07:42:23 -07001476 #
1477 # Format: `projects/{project-id}/locations/{location-id}`.
1478 #
1479 # If no parent is specified, a region will be chosen automatically.
1480 #
1481 # Supported location-ids:
1482 # `us`: USA country only,
1483 # `asia`: East asia areas, like Japan, Taiwan,
1484 # `eu`: The European Union.
1485 #
1486 # Example: `projects/project-A/locations/eu`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001487 }
1488
1489 x__xgafv: string, V1 error format.
1490 Allowed values
1491 1 - v1 error format
1492 2 - v2 error format
1493
1494Returns:
1495 An object of the form:
1496
1497 { # This resource represents a long-running operation that is the result of a
1498 # network API call.
Bu Sun Kim65020912020-05-20 12:08:20 -07001499 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1500 # different programming environments, including REST APIs and RPC APIs. It is
1501 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1502 # three pieces of data: error code, error message, and error details.
1503 #
1504 # You can find out more about this error model and how to work with it in the
1505 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim65020912020-05-20 12:08:20 -07001506 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1507 # message types for APIs to use.
1508 {
1509 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1510 },
1511 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001512 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1513 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1514 # user-facing error message should be localized and sent in the
1515 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001516 },
1517 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
1518 # contains progress information and common metadata such as create time.
1519 # Some services might not provide such metadata. Any method that returns a
1520 # long-running operation should document the metadata type, if any.
1521 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1522 },
1523 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
1524 # If `true`, the operation is completed, and either `error` or `response` is
1525 # available.
1526 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001527 # method returns no data on success, such as `Delete`, the response is
1528 # `google.protobuf.Empty`. If the original method is standard
1529 # `Get`/`Create`/`Update`, the response should be the resource. For other
1530 # methods, the response should have the type `XxxResponse`, where `Xxx`
1531 # is the original method name. For example, if the original method name
1532 # is `TakeSnapshot()`, the inferred response type is
1533 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001534 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001535 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001536 &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 -07001537 # originally returns it. If you use the default HTTP mapping, the
1538 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001539 }</pre>
1540</div>
1541
1542</body></html>