blob: d2e865c2ba36a5dcd782e9b6959cb5eedfadf2b2 [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_v1p2beta1.html">Cloud Vision API</a> . <a href="vision_v1p2beta1.files.html">files</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#annotate">annotate(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Service that performs image detection and annotation for a batch of files.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#asyncBatchAnnotate">asyncBatchAnnotate(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Run asynchronous image detection and annotation for a list of generic</p>
83<h3>Method Details</h3>
84<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070085 <code class="details" id="annotate">annotate(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086 <pre>Service that performs image detection and annotation for a batch of files.
Bu Sun Kim65020912020-05-20 12:08:20 -070087Now only &quot;application/pdf&quot;, &quot;image/tiff&quot; and &quot;image/gif&quot; are supported.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088
89This service will extract at most 5 (customers can specify which 5 in
90AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each
91file provided and perform detection and annotation for each image
92extracted.
93
94Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070095 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 The object takes the form of:
97
98{ # A list of requests to annotate files using the BatchAnnotateFiles API.
Bu Sun Kim65020912020-05-20 12:08:20 -070099 &quot;parent&quot;: &quot;A String&quot;, # Optional. Target project and location to make a call.
100 #
101 # Format: `projects/{project-id}/locations/{location-id}`.
102 #
103 # If no parent is specified, a region will be chosen automatically.
104 #
105 # Supported location-ids:
106 # `us`: USA country only,
107 # `asia`: East asia areas, like Japan, Taiwan,
108 # `eu`: The European Union.
109 #
110 # Example: `projects/project-A/locations/eu`.
111 &quot;requests&quot;: [ # Required. The list of file annotation requests. Right now we support only one
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 # AnnotateFileRequest in BatchAnnotateFilesRequest.
113 { # A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
Bu Sun Kim65020912020-05-20 12:08:20 -0700114 &quot;imageContext&quot;: { # Image context and/or feature-specific parameters. # Additional context that may accompany the image(s) in the file.
115 &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 -0700116 # yields the best results since it enables automatic language detection. For
117 # languages based on the Latin alphabet, setting `language_hints` is not
118 # needed. In rare cases, when the language of the text in the image is known,
119 # setting a hint will help get better results (although it will be a
120 # significant hindrance if the hint is wrong). Text detection returns an
121 # error if one or more of the specified languages is not one of the
Dan O'Mearadd494642020-05-01 07:42:23 -0700122 # [supported languages](https://cloud.google.com/vision/docs/languages).
Bu Sun Kim65020912020-05-20 12:08:20 -0700123 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700125 &quot;webDetectionParams&quot;: { # Parameters for web detection request. # Parameters for web detection.
126 &quot;includeGeoResults&quot;: True or False, # Whether to include results derived from the geo information in the image.
127 },
128 &quot;latLongRect&quot;: { # Rectangle determined by min and max `LatLng` pairs. # Not used.
129 &quot;minLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Min lat/long pair.
130 # of doubles representing degrees latitude and degrees longitude. Unless
131 # specified otherwise, this must conform to the
132 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
133 # standard&lt;/a&gt;. Values must be within normalized ranges.
134 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
135 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
136 },
137 &quot;maxLatLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # Max lat/long pair.
138 # of doubles representing degrees latitude and degrees longitude. Unless
139 # specified otherwise, this must conform to the
140 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
141 # standard&lt;/a&gt;. Values must be within normalized ranges.
142 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
143 &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 -0700144 },
145 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700146 &quot;cropHintsParams&quot;: { # Parameters for crop hints annotation request. # Parameters for crop hints annotation request.
147 &quot;aspectRatios&quot;: [ # Aspect ratios in floats, representing the ratio of the width to the height
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700148 # of the image. For example, if the desired aspect ratio is 4/3, the
149 # corresponding float value should be 1.33333. If not specified, the
150 # best possible crop is returned. The number of provided aspect ratios is
151 # limited to a maximum of 16; any aspect ratios provided after the 16th are
152 # ignored.
153 3.14,
154 ],
155 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 &quot;productSearchParams&quot;: { # Parameters for a product search request. # Parameters for product search.
157 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
158 #
159 # Format is:
160 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
161 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
162 # If it is not specified, system discretion will be applied.
163 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
164 { # A vertex represents a 2D point in the image.
165 # NOTE: the normalized vertex coordinates are relative to the original image
166 # and range from 0 to 1.
167 &quot;y&quot;: 3.14, # Y coordinate.
168 &quot;x&quot;: 3.14, # X coordinate.
169 },
170 ],
171 &quot;vertices&quot;: [ # The bounding polygon vertices.
172 { # A vertex represents a 2D point in the image.
173 # NOTE: the vertex coordinates are in the same scale as the original image.
174 &quot;y&quot;: 42, # Y coordinate.
175 &quot;x&quot;: 42, # X coordinate.
176 },
177 ],
178 },
179 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
180 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
181 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
182 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
183 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
184 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
185 # migrate existing products to these categories as well.
186 &quot;A String&quot;,
187 ],
188 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
189 # on Product labels. We currently support an AND of OR of key-value
190 # expressions, where each expression within an OR must have the same key. An
191 # &#x27;=&#x27; should be used to connect the key and value.
192 #
193 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
194 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
195 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700196 },
197 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700198 &quot;pages&quot;: [ # Pages of the file to perform image annotation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199 #
200 # Pages starts from 1, we assume the first page of the file is page 1.
201 # At most 5 pages are supported per request. Pages can be negative.
202 #
203 # Page 1 means the first page.
204 # Page 2 means the second page.
205 # Page -1 means the last page.
206 # Page -2 means the second to the last page.
207 #
208 # If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
209 #
210 # If this field is empty, by default the service performs image annotation
211 # for the first 5 pages of the file.
212 42,
213 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 &quot;inputConfig&quot;: { # The desired input location and metadata. # Required. Information about the input file.
215 &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.
216 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
217 # Google Cloud Storage object. Wildcards are not currently supported.
218 },
219 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
220 # &quot;image/gif&quot; are supported. Wildcards are not supported.
221 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700222 # Note: As with all `bytes` fields, protobuffers use a pure binary
223 # representation, whereas JSON representations use base64.
224 #
225 # Currently, this field only works for BatchAnnotateFiles requests. It does
226 # not work for AsyncBatchAnnotateFiles requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700228 &quot;features&quot;: [ # Required. Requested features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229 { # The type of Google Cloud Vision API detection to perform, and the maximum
230 # number of results to return for that type. Multiple `Feature` objects can
231 # be specified in the `features` list.
Bu Sun Kim65020912020-05-20 12:08:20 -0700232 &quot;type&quot;: &quot;A String&quot;, # The feature type.
233 &quot;maxResults&quot;: 42, # Maximum number of results of this type. Does not apply to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700234 # `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700235 &quot;model&quot;: &quot;A String&quot;, # Model to use for the feature.
236 # Supported values: &quot;builtin/stable&quot; (the default if unset) and
237 # &quot;builtin/latest&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700238 },
239 ],
240 },
241 ],
242 }
243
244 x__xgafv: string, V1 error format.
245 Allowed values
246 1 - v1 error format
247 2 - v2 error format
248
249Returns:
250 An object of the form:
251
252 { # A list of file annotation responses.
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 &quot;responses&quot;: [ # The list of file annotation responses, each response corresponding to each
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700254 # AnnotateFileRequest in BatchAnnotateFilesRequest.
255 { # Response to a single file annotation request. A file may contain one or more
256 # images, which individually have their own responses.
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 &quot;totalPages&quot;: 42, # This field gives the total number of pages in the file.
258 &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
259 # `responses` field will not be set in this case.
260 # different programming environments, including REST APIs and RPC APIs. It is
261 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
262 # three pieces of data: error code, error message, and error details.
263 #
264 # You can find out more about this error model and how to work with it in the
265 # [API Design Guide](https://cloud.google.com/apis/design/errors).
266 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
267 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
268 # user-facing error message should be localized and sent in the
269 # google.rpc.Status.details field, or localized by the client.
270 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
271 # message types for APIs to use.
272 {
273 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
274 },
275 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700276 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700277 &quot;responses&quot;: [ # Individual responses to images found within the file. This field will be
Dan O'Mearadd494642020-05-01 07:42:23 -0700278 # empty if the `error` field is set.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700279 { # Response to an image annotation request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 &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
281 # comes from.
282 # information about the source of that image.
283 &quot;uri&quot;: &quot;A String&quot;, # The URI of the file used to produce the image.
284 &quot;pageNumber&quot;: 42, # If the file was a PDF or TIFF, this field gives the page number within
285 # the file used to produce the image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 &quot;logoAnnotations&quot;: [ # If present, logo detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700288 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
290 # fields, such a score or string that qualifies the entity.
291 { # A `Property` consists of a user-supplied name/value pair.
292 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
293 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
294 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
295 },
296 ],
297 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
298 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700299 # `LocationInfo` elements can be present because one location may
300 # indicate the location of the scene in the image, and another location
301 # may indicate the location of the place where the image was taken.
302 # Location information is usually present for landmarks.
303 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -0700304 &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 -0700305 # of doubles representing degrees latitude and degrees longitude. Unless
306 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 # &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 -0700308 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
310 &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 -0700311 },
312 },
313 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700314 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
315 # [Google Knowledge Graph Search
316 # API](https://developers.google.com/knowledge-graph/).
317 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
318 # The accuracy of the entity detection in an image.
319 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
320 # this field represents the confidence that there is a tower in the query
321 # image. Range [0, 1].
322 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
323 # `description` is expressed.
324 &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 -0700325 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -0700326 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327 { # A vertex represents a 2D point in the image.
328 # NOTE: the normalized vertex coordinates are relative to the original image
329 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700330 &quot;y&quot;: 3.14, # Y coordinate.
331 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700332 },
333 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700335 { # A vertex represents a 2D point in the image.
336 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700337 &quot;y&quot;: 42, # Y coordinate.
338 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700339 },
340 ],
341 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700342 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
343 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
344 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
345 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
346 # detected distant towering building, even though the confidence that
347 # there is a tower in each image may be the same. Range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700348 },
349 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 &quot;webDetection&quot;: { # Relevant information for the image from the Internet. # If present, web detection has completed successfully.
351 &quot;webEntities&quot;: [ # Deduced entities from similar images on the Internet.
352 { # Entity deduced from similar images on the Internet.
353 &quot;entityId&quot;: &quot;A String&quot;, # Opaque entity ID.
354 &quot;description&quot;: &quot;A String&quot;, # Canonical description of the entity, in English.
355 &quot;score&quot;: 3.14, # Overall relevancy score for the entity.
356 # Not normalized and not comparable across different image queries.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700357 },
358 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 &quot;pagesWithMatchingImages&quot;: [ # Web pages containing the matching images from the Internet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700360 { # Metadata for web pages.
Bu Sun Kim65020912020-05-20 12:08:20 -0700361 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the web page.
362 &quot;partialMatchingImages&quot;: [ # Partial matching images on the page.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 # Those images are similar enough to share some key-point features. For
364 # example an original image will likely have partial matching for its
365 # crops.
366 { # Metadata for online images.
Bu Sun Kim65020912020-05-20 12:08:20 -0700367 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
368 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700369 },
370 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700371 &quot;url&quot;: &quot;A String&quot;, # The result web page URL.
372 &quot;pageTitle&quot;: &quot;A String&quot;, # Title for the web page, may contain HTML markups.
373 &quot;fullMatchingImages&quot;: [ # Fully matching images on the page.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 # Can include resized copies of the query image.
375 { # Metadata for online images.
Bu Sun Kim65020912020-05-20 12:08:20 -0700376 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
377 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700378 },
379 ],
380 },
381 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700382 &quot;partialMatchingImages&quot;: [ # Partial matching images from the Internet.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 # Those images are similar enough to share some key-point features. For
384 # example an original image will likely have partial matching for its crops.
385 { # Metadata for online images.
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
387 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 },
389 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700390 &quot;visuallySimilarImages&quot;: [ # The visually similar image results.
391 { # Metadata for online images.
392 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
393 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700394 },
395 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700396 &quot;bestGuessLabels&quot;: [ # The service&#x27;s best guess as to the topic of the request image.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700397 # Inferred from similar images on the open web.
398 { # Label to provide extra metadata for the web detection.
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 &quot;label&quot;: &quot;A String&quot;, # Label for extra metadata.
400 &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;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 # For more information, see
402 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 },
404 ],
405 &quot;fullMatchingImages&quot;: [ # Fully matching images from the Internet.
406 # Can include resized copies of the query image.
407 { # Metadata for online images.
408 &quot;score&quot;: 3.14, # (Deprecated) Overall relevancy score for the image.
409 &quot;url&quot;: &quot;A String&quot;, # The result image URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 },
411 ],
412 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700413 &quot;safeSearchAnnotation&quot;: { # Set of features pertaining to the image, computed by computer vision # If present, safe-search annotation has completed successfully.
414 # methods over safe-search verticals (for example, adult, spoof, medical,
415 # violence).
416 &quot;racy&quot;: &quot;A String&quot;, # Likelihood that the request image contains racy content. Racy content may
417 # include (but is not limited to) skimpy or sheer clothing, strategically
418 # covered nudity, lewd or provocative poses, or close-ups of sensitive
419 # body areas.
420 &quot;violence&quot;: &quot;A String&quot;, # Likelihood that this image contains violent content.
421 &quot;adult&quot;: &quot;A String&quot;, # Represents the adult content likelihood for the image. Adult content may
422 # contain elements such as nudity, pornographic images or cartoons, or
423 # sexual activities.
424 &quot;spoof&quot;: &quot;A String&quot;, # Spoof likelihood. The likelihood that an modification
425 # was made to the image&#x27;s canonical version to make it appear
426 # funny or offensive.
427 &quot;medical&quot;: &quot;A String&quot;, # Likelihood that this is a medical image.
428 },
429 &quot;landmarkAnnotations&quot;: [ # If present, landmark detection has completed successfully.
430 { # Set of detected entity features.
431 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
432 # fields, such a score or string that qualifies the entity.
433 { # A `Property` consists of a user-supplied name/value pair.
434 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
435 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
436 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
437 },
438 ],
439 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
440 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
441 # `LocationInfo` elements can be present because one location may
442 # indicate the location of the scene in the image, and another location
443 # may indicate the location of the place where the image was taken.
444 # Location information is usually present for landmarks.
445 { # Detected entity location information.
446 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
447 # of doubles representing degrees latitude and degrees longitude. Unless
448 # specified otherwise, this must conform to the
449 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
450 # standard&lt;/a&gt;. Values must be within normalized ranges.
451 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
452 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
453 },
454 },
455 ],
456 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
457 # [Google Knowledge Graph Search
458 # API](https://developers.google.com/knowledge-graph/).
459 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
460 # The accuracy of the entity detection in an image.
461 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
462 # this field represents the confidence that there is a tower in the query
463 # image. Range [0, 1].
464 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
465 # `description` is expressed.
466 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
467 # for `LABEL_DETECTION` features.
468 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 { # A vertex represents a 2D point in the image.
470 # NOTE: the normalized vertex coordinates are relative to the original image
471 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700472 &quot;y&quot;: 3.14, # Y coordinate.
473 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474 },
475 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700476 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700477 { # A vertex represents a 2D point in the image.
478 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700479 &quot;y&quot;: 42, # Y coordinate.
480 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700481 },
482 ],
483 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700484 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
485 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
486 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
487 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
488 # detected distant towering building, even though the confidence that
489 # there is a tower in each image may be the same. Range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 },
491 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700492 &quot;faceAnnotations&quot;: [ # If present, face detection has completed successfully.
493 { # A face annotation object contains the results of face detection.
494 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the face. The coordinates of the bounding box
495 # are in the original image&#x27;s scale.
496 # The bounding box is computed to &quot;frame&quot; the face in accordance with human
497 # expectations. It is based on the landmarker results.
498 # Note that one or more x and/or y coordinates may not be generated in the
499 # `BoundingPoly` (the polygon will be unbounded) if only a partial face
500 # appears in the image to be annotated.
501 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
502 { # A vertex represents a 2D point in the image.
503 # NOTE: the normalized vertex coordinates are relative to the original image
504 # and range from 0 to 1.
505 &quot;y&quot;: 3.14, # Y coordinate.
506 &quot;x&quot;: 3.14, # X coordinate.
507 },
508 ],
509 &quot;vertices&quot;: [ # The bounding polygon vertices.
510 { # A vertex represents a 2D point in the image.
511 # NOTE: the vertex coordinates are in the same scale as the original image.
512 &quot;y&quot;: 42, # Y coordinate.
513 &quot;x&quot;: 42, # X coordinate.
514 },
515 ],
516 },
517 &quot;rollAngle&quot;: 3.14, # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
518 # of the face relative to the image vertical about the axis perpendicular to
519 # the face. Range [-180,180].
520 &quot;sorrowLikelihood&quot;: &quot;A String&quot;, # Sorrow likelihood.
521 &quot;tiltAngle&quot;: 3.14, # Pitch angle, which indicates the upwards/downwards angle that the face is
522 # pointing relative to the image&#x27;s horizontal plane. Range [-180,180].
523 &quot;fdBoundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The `fd_bounding_poly` bounding polygon is tighter than the
524 # `boundingPoly`, and encloses only the skin part of the face. Typically, it
525 # is used to eliminate the face from any image analysis that detects the
526 # &quot;amount of skin&quot; visible in an image. It is not based on the
527 # landmarker results, only on the initial face detection, hence
528 # the &lt;code&gt;fd&lt;/code&gt; (face detection) prefix.
529 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
530 { # A vertex represents a 2D point in the image.
531 # NOTE: the normalized vertex coordinates are relative to the original image
532 # and range from 0 to 1.
533 &quot;y&quot;: 3.14, # Y coordinate.
534 &quot;x&quot;: 3.14, # X coordinate.
535 },
536 ],
537 &quot;vertices&quot;: [ # The bounding polygon vertices.
538 { # A vertex represents a 2D point in the image.
539 # NOTE: the vertex coordinates are in the same scale as the original image.
540 &quot;y&quot;: 42, # Y coordinate.
541 &quot;x&quot;: 42, # X coordinate.
542 },
543 ],
544 },
545 &quot;angerLikelihood&quot;: &quot;A String&quot;, # Anger likelihood.
546 &quot;landmarks&quot;: [ # Detected face landmarks.
547 { # A face-specific landmark (for example, a face feature).
548 &quot;position&quot;: { # A 3D position in the image, used primarily for Face detection landmarks. # Face landmark position.
549 # A valid Position must have both x and y coordinates.
550 # The position coordinates are in the same scale as the original image.
551 &quot;y&quot;: 3.14, # Y coordinate.
552 &quot;x&quot;: 3.14, # X coordinate.
553 &quot;z&quot;: 3.14, # Z coordinate (or depth).
554 },
555 &quot;type&quot;: &quot;A String&quot;, # Face landmark type.
556 },
557 ],
558 &quot;surpriseLikelihood&quot;: &quot;A String&quot;, # Surprise likelihood.
559 &quot;landmarkingConfidence&quot;: 3.14, # Face landmarking confidence. Range [0, 1].
560 &quot;joyLikelihood&quot;: &quot;A String&quot;, # Joy likelihood.
561 &quot;underExposedLikelihood&quot;: &quot;A String&quot;, # Under-exposed likelihood.
562 &quot;panAngle&quot;: 3.14, # Yaw angle, which indicates the leftward/rightward angle that the face is
563 # pointing relative to the vertical plane perpendicular to the image. Range
564 # [-180,180].
565 &quot;detectionConfidence&quot;: 3.14, # Detection confidence. Range [0, 1].
566 &quot;blurredLikelihood&quot;: &quot;A String&quot;, # Blurred likelihood.
567 &quot;headwearLikelihood&quot;: &quot;A String&quot;, # Headwear likelihood.
568 },
569 ],
570 &quot;cropHintsAnnotation&quot;: { # Set of crop hints that are used to generate new crops when serving images. # If present, crop hints have completed successfully.
571 &quot;cropHints&quot;: [ # Crop hint results.
572 { # Single crop hint that is used to generate a new crop when serving an image.
573 &quot;confidence&quot;: 3.14, # Confidence of this being a salient region. Range [0, 1].
574 &quot;importanceFraction&quot;: 3.14, # Fraction of importance of this salient region with respect to the original
575 # image.
576 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon for the crop region. The coordinates of the bounding
577 # box are in the original image&#x27;s scale.
578 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
579 { # A vertex represents a 2D point in the image.
580 # NOTE: the normalized vertex coordinates are relative to the original image
581 # and range from 0 to 1.
582 &quot;y&quot;: 3.14, # Y coordinate.
583 &quot;x&quot;: 3.14, # X coordinate.
584 },
585 ],
586 &quot;vertices&quot;: [ # The bounding polygon vertices.
587 { # A vertex represents a 2D point in the image.
588 # NOTE: the vertex coordinates are in the same scale as the original image.
589 &quot;y&quot;: 42, # Y coordinate.
590 &quot;x&quot;: 42, # X coordinate.
591 },
592 ],
593 },
594 },
595 ],
596 },
597 &quot;labelAnnotations&quot;: [ # If present, label detection has completed successfully.
598 { # Set of detected entity features.
599 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
600 # fields, such a score or string that qualifies the entity.
601 { # A `Property` consists of a user-supplied name/value pair.
602 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
603 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
604 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
605 },
606 ],
607 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
608 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
609 # `LocationInfo` elements can be present because one location may
610 # indicate the location of the scene in the image, and another location
611 # may indicate the location of the place where the image was taken.
612 # Location information is usually present for landmarks.
613 { # Detected entity location information.
614 &quot;latLng&quot;: { # An object representing a latitude/longitude pair. This is expressed as a pair # lat/long location coordinates.
615 # of doubles representing degrees latitude and degrees longitude. Unless
616 # specified otherwise, this must conform to the
617 # &lt;a href=&quot;http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf&quot;&gt;WGS84
618 # standard&lt;/a&gt;. Values must be within normalized ranges.
619 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
620 &quot;longitude&quot;: 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
621 },
622 },
623 ],
624 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
625 # [Google Knowledge Graph Search
626 # API](https://developers.google.com/knowledge-graph/).
627 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
628 # The accuracy of the entity detection in an image.
629 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
630 # this field represents the confidence that there is a tower in the query
631 # image. Range [0, 1].
632 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
633 # `description` is expressed.
634 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this entity belongs. Not produced
635 # for `LABEL_DETECTION` features.
636 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
637 { # A vertex represents a 2D point in the image.
638 # NOTE: the normalized vertex coordinates are relative to the original image
639 # and range from 0 to 1.
640 &quot;y&quot;: 3.14, # Y coordinate.
641 &quot;x&quot;: 3.14, # X coordinate.
642 },
643 ],
644 &quot;vertices&quot;: [ # The bounding polygon vertices.
645 { # A vertex represents a 2D point in the image.
646 # NOTE: the vertex coordinates are in the same scale as the original image.
647 &quot;y&quot;: 42, # Y coordinate.
648 &quot;x&quot;: 42, # X coordinate.
649 },
650 ],
651 },
652 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
653 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
654 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
655 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
656 # detected distant towering building, even though the confidence that
657 # there is a tower in each image may be the same. Range [0, 1].
658 },
659 ],
660 &quot;localizedObjectAnnotations&quot;: [ # If present, localized object detection has completed successfully.
661 # This will be sorted descending by confidence score.
662 { # Set of detected objects with bounding boxes.
663 &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
664 # information, see
665 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
666 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
667 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
668 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # Image region to which this object belongs. This must be populated.
669 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
670 { # A vertex represents a 2D point in the image.
671 # NOTE: the normalized vertex coordinates are relative to the original image
672 # and range from 0 to 1.
673 &quot;y&quot;: 3.14, # Y coordinate.
674 &quot;x&quot;: 3.14, # X coordinate.
675 },
676 ],
677 &quot;vertices&quot;: [ # The bounding polygon vertices.
678 { # A vertex represents a 2D point in the image.
679 # NOTE: the vertex coordinates are in the same scale as the original image.
680 &quot;y&quot;: 42, # Y coordinate.
681 &quot;x&quot;: 42, # X coordinate.
682 },
683 ],
684 },
685 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
686 },
687 ],
688 &quot;productSearchResults&quot;: { # Results for a product search request. # If present, product search has completed successfully.
689 &quot;indexTime&quot;: &quot;A String&quot;, # Timestamp of the index which provided these results. Products added to the
690 # product set and products removed from the product set after this time are
691 # not reflected in the current results.
692 &quot;productGroupedResults&quot;: [ # List of results grouped by products detected in the query image. Each entry
693 # corresponds to one bounding polygon in the query image, and contains the
694 # matching products specific to that region. There may be duplicate product
695 # matches in the union of all the per-product results.
696 { # Information about the products similar to a single product in a query
697 # image.
698 &quot;objectAnnotations&quot;: [ # List of generic predictions for the object in the bounding box.
699 { # Prediction for what the object in the bounding box is.
700 &quot;score&quot;: 3.14, # Score of the result. Range [0, 1].
701 &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
702 # information, see
703 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
704 &quot;mid&quot;: &quot;A String&quot;, # Object ID that should align with EntityAnnotation mid.
705 &quot;name&quot;: &quot;A String&quot;, # Object name, expressed in its `language_code` language.
706 },
707 ],
708 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the product detected in the query image.
709 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
710 { # A vertex represents a 2D point in the image.
711 # NOTE: the normalized vertex coordinates are relative to the original image
712 # and range from 0 to 1.
713 &quot;y&quot;: 3.14, # Y coordinate.
714 &quot;x&quot;: 3.14, # X coordinate.
715 },
716 ],
717 &quot;vertices&quot;: [ # The bounding polygon vertices.
718 { # A vertex represents a 2D point in the image.
719 # NOTE: the vertex coordinates are in the same scale as the original image.
720 &quot;y&quot;: 42, # Y coordinate.
721 &quot;x&quot;: 42, # X coordinate.
722 },
723 ],
724 },
725 &quot;results&quot;: [ # List of results, one for each product match.
726 { # Information about a product.
727 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
728 # to the query.
729 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
730 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
731 #
732 # Format is:
733 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
734 #
735 # This field is ignored when creating a product.
736 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
737 # 4096 characters long.
738 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
739 # characters long.
740 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
741 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
742 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
743 # not be used for new products.
744 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
745 # constraints can be specified based on the product_labels.
746 #
747 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
748 # strings with integer values can match a range-based restriction which is
749 # to be supported soon.
750 #
751 # Multiple values can be assigned to the same key. One product may have up to
752 # 500 product_labels.
753 #
754 # Notice that the total number of distinct product_labels over all products
755 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
756 # will refuse to work for that ProductSet.
757 { # A product label represented as a key-value pair.
758 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
759 # cannot exceed 128 bytes.
760 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
761 # exceed 128 bytes.
762 },
763 ],
764 },
765 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
766 # 1 (full confidence).
767 },
768 ],
769 },
770 ],
771 &quot;results&quot;: [ # List of results, one for each product match.
772 { # Information about a product.
773 &quot;image&quot;: &quot;A String&quot;, # The resource name of the image from the product that is the closest match
774 # to the query.
775 &quot;product&quot;: { # A Product contains ReferenceImages. # The Product.
776 &quot;name&quot;: &quot;A String&quot;, # The resource name of the product.
777 #
778 # Format is:
779 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
780 #
781 # This field is ignored when creating a product.
782 &quot;displayName&quot;: &quot;A String&quot;, # The user-provided name for this Product. Must not be empty. Must be at most
783 # 4096 characters long.
784 &quot;description&quot;: &quot;A String&quot;, # User-provided metadata to be stored with this product. Must be at most 4096
785 # characters long.
786 &quot;productCategory&quot;: &quot;A String&quot;, # Immutable. The category for the product identified by the reference image. This should
787 # be either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, or &quot;toys-v2&quot;. The legacy categories
788 # &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported, but these should
789 # not be used for new products.
790 &quot;productLabels&quot;: [ # Key-value pairs that can be attached to a product. At query time,
791 # constraints can be specified based on the product_labels.
792 #
793 # Note that integer values can be provided as strings, e.g. &quot;1199&quot;. Only
794 # strings with integer values can match a range-based restriction which is
795 # to be supported soon.
796 #
797 # Multiple values can be assigned to the same key. One product may have up to
798 # 500 product_labels.
799 #
800 # Notice that the total number of distinct product_labels over all products
801 # in one ProductSet cannot exceed 1M, otherwise the product search pipeline
802 # will refuse to work for that ProductSet.
803 { # A product label represented as a key-value pair.
804 &quot;value&quot;: &quot;A String&quot;, # The value of the label attached to the product. Cannot be empty and
805 # cannot exceed 128 bytes.
806 &quot;key&quot;: &quot;A String&quot;, # The key of the label attached to the product. Cannot be empty and cannot
807 # exceed 128 bytes.
808 },
809 ],
810 },
811 &quot;score&quot;: 3.14, # A confidence level on the match, ranging from 0 (no confidence) to
812 # 1 (full confidence).
813 },
814 ],
815 },
816 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # If set, represents the error message for the operation.
817 # Note that filled-in image annotations are guaranteed to be
818 # correct, even when `error` is set.
819 # different programming environments, including REST APIs and RPC APIs. It is
820 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
821 # three pieces of data: error code, error message, and error details.
822 #
823 # You can find out more about this error model and how to work with it in the
824 # [API Design Guide](https://cloud.google.com/apis/design/errors).
825 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
826 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
827 # user-facing error message should be localized and sent in the
828 # google.rpc.Status.details field, or localized by the client.
829 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
830 # message types for APIs to use.
831 {
832 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
833 },
834 ],
835 },
836 &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 -0700837 # completed successfully.
838 # This annotation provides the structural hierarchy for the OCR detected
839 # text.
840 # The hierarchy of an OCR extracted text structure is like this:
Dan O'Mearadd494642020-05-01 07:42:23 -0700841 # TextAnnotation -&gt; Page -&gt; Block -&gt; Paragraph -&gt; Word -&gt; Symbol
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700842 # Each structural component, starting from Page, may further have their own
843 # properties. Properties describe detected languages, breaks etc.. Please refer
844 # to the TextAnnotation.TextProperty message definition below for more
845 # detail.
Bu Sun Kim65020912020-05-20 12:08:20 -0700846 &quot;pages&quot;: [ # List of pages detected by OCR.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700847 { # Detected page from OCR.
Bu Sun Kim65020912020-05-20 12:08:20 -0700848 &quot;width&quot;: 42, # Page width. For PDFs the unit is points. For images (including
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700849 # TIFFs) the unit is pixels.
Bu Sun Kim65020912020-05-20 12:08:20 -0700850 &quot;blocks&quot;: [ # List of blocks of text, images etc on this page.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700851 { # Logical element on the page.
Bu Sun Kim65020912020-05-20 12:08:20 -0700852 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the block.
853 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
854 { # Detected language for a structural component.
855 &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
856 # information, see
857 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
858 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
859 },
860 ],
861 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
862 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
863 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
864 },
865 },
866 &quot;blockType&quot;: &quot;A String&quot;, # Detected block type (text, image etc) for this block.
867 &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 -0700868 # The vertices are in the order of top-left, top-right, bottom-right,
869 # bottom-left. When a rotation of the bounding box is detected the rotation
870 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700871 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700872 # For example:
873 #
874 # * when the text is horizontal it might look like:
875 #
876 # 0----1
877 # | |
878 # 3----2
879 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700881 #
882 # 2----3
883 # | |
884 # 1----0
885 #
886 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700887 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700888 { # A vertex represents a 2D point in the image.
889 # NOTE: the normalized vertex coordinates are relative to the original image
890 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700891 &quot;y&quot;: 3.14, # Y coordinate.
892 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700893 },
894 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700895 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 { # A vertex represents a 2D point in the image.
897 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700898 &quot;y&quot;: 42, # Y coordinate.
899 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700900 },
901 ],
902 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the block. Range [0, 1].
904 &quot;paragraphs&quot;: [ # List of paragraphs in this block (if this blocks is of type text).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700905 { # Structural unit of text representing a number of words in certain order.
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the paragraph.
907 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
908 { # Detected language for a structural component.
909 &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
910 # information, see
911 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
912 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
913 },
914 ],
915 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
916 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
917 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
918 },
919 },
920 &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 -0700921 # The vertices are in the order of top-left, top-right, bottom-right,
922 # bottom-left. When a rotation of the bounding box is detected the rotation
923 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700924 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700925 # For example:
926 # * when the text is horizontal it might look like:
927 # 0----1
928 # | |
929 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700930 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 # 2----3
932 # | |
933 # 1----0
934 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700935 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700936 { # A vertex represents a 2D point in the image.
937 # NOTE: the normalized vertex coordinates are relative to the original image
938 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 &quot;y&quot;: 3.14, # Y coordinate.
940 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700941 },
942 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700943 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700944 { # A vertex represents a 2D point in the image.
945 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700946 &quot;y&quot;: 42, # Y coordinate.
947 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700948 },
949 ],
950 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the paragraph. Range [0, 1].
952 &quot;words&quot;: [ # List of all words in this paragraph.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700953 { # A word representation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700954 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the word.
955 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
956 { # Detected language for a structural component.
957 &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
958 # information, see
959 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
960 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
961 },
962 ],
963 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
964 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
965 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
966 },
967 },
968 &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 -0700969 # The vertices are in the order of top-left, top-right, bottom-right,
970 # bottom-left. When a rotation of the bounding box is detected the rotation
971 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -0700972 # read in the &#x27;natural&#x27; orientation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700973 # For example:
974 # * when the text is horizontal it might look like:
975 # 0----1
976 # | |
977 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -0700978 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Dan O'Mearadd494642020-05-01 07:42:23 -0700979 # 2----3
980 # | |
981 # 1----0
982 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -0700983 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Dan O'Mearadd494642020-05-01 07:42:23 -0700984 { # A vertex represents a 2D point in the image.
985 # NOTE: the normalized vertex coordinates are relative to the original image
986 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -0700987 &quot;y&quot;: 3.14, # Y coordinate.
988 &quot;x&quot;: 3.14, # X coordinate.
Dan O'Mearadd494642020-05-01 07:42:23 -0700989 },
990 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700991 &quot;vertices&quot;: [ # The bounding polygon vertices.
Dan O'Mearadd494642020-05-01 07:42:23 -0700992 { # A vertex represents a 2D point in the image.
993 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700994 &quot;y&quot;: 42, # Y coordinate.
995 &quot;x&quot;: 42, # X coordinate.
Dan O'Mearadd494642020-05-01 07:42:23 -0700996 },
997 ],
998 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700999 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the word. Range [0, 1].
1000 &quot;symbols&quot;: [ # List of symbols in the word.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001001 # The order of the symbols follows the natural reading order.
1002 { # A single symbol representation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001003 &quot;boundingBox&quot;: { # A bounding polygon for the detected image annotation. # The bounding box for the symbol.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001004 # The vertices are in the order of top-left, top-right, bottom-right,
1005 # bottom-left. When a rotation of the bounding box is detected the rotation
1006 # is represented as around the top-left corner as defined when the text is
Bu Sun Kim65020912020-05-20 12:08:20 -07001007 # read in the &#x27;natural&#x27; orientation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001008 # For example:
1009 # * when the text is horizontal it might look like:
1010 # 0----1
1011 # | |
1012 # 3----2
Bu Sun Kim65020912020-05-20 12:08:20 -07001013 # * when it&#x27;s rotated 180 degrees around the top-left corner it becomes:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001014 # 2----3
1015 # | |
1016 # 1----0
Dan O'Mearadd494642020-05-01 07:42:23 -07001017 # and the vertex order will still be (0, 1, 2, 3).
Bu Sun Kim65020912020-05-20 12:08:20 -07001018 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001019 { # A vertex represents a 2D point in the image.
1020 # NOTE: the normalized vertex coordinates are relative to the original image
1021 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -07001022 &quot;y&quot;: 3.14, # Y coordinate.
1023 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001024 },
1025 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001026 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001027 { # A vertex represents a 2D point in the image.
1028 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001029 &quot;y&quot;: 42, # Y coordinate.
1030 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001031 },
1032 ],
1033 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 &quot;confidence&quot;: 3.14, # Confidence of the OCR results for the symbol. Range [0, 1].
1035 &quot;text&quot;: &quot;A String&quot;, # The actual UTF-8 representation of the symbol.
1036 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected for the symbol.
1037 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001038 { # Detected language for a structural component.
Bu Sun Kim65020912020-05-20 12:08:20 -07001039 &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 -07001040 # information, see
1041 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
Bu Sun Kim65020912020-05-20 12:08:20 -07001042 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001043 },
1044 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001045 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
1046 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
1047 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
1048 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001049 },
1050 },
1051 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 },
1053 ],
1054 },
1055 ],
1056 },
1057 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001058 &quot;property&quot;: { # Additional information detected on the structural component. # Additional information detected on the page.
1059 &quot;detectedLanguages&quot;: [ # A list of detected languages together with confidence.
1060 { # Detected language for a structural component.
1061 &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
1062 # information, see
1063 # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1064 &quot;confidence&quot;: 3.14, # Confidence of detected language. Range [0, 1].
1065 },
1066 ],
1067 &quot;detectedBreak&quot;: { # Detected start or end of a structural component. # Detected start or end of a text segment.
1068 &quot;type&quot;: &quot;A String&quot;, # Detected break type.
1069 &quot;isPrefix&quot;: True or False, # True if break prepends the element.
1070 },
1071 },
1072 &quot;confidence&quot;: 3.14, # Confidence of the OCR results on the page. Range [0, 1].
1073 &quot;height&quot;: 42, # Page height. For PDFs the unit is points. For images (including
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001074 # TIFFs) the unit is pixels.
1075 },
1076 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001077 &quot;text&quot;: &quot;A String&quot;, # UTF-8 text detected on the pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001078 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001079 &quot;textAnnotations&quot;: [ # If present, text (OCR) detection has completed successfully.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001080 { # Set of detected entity features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001081 &quot;properties&quot;: [ # Some entities may have optional user-supplied `Property` (name/value)
1082 # fields, such a score or string that qualifies the entity.
1083 { # A `Property` consists of a user-supplied name/value pair.
1084 &quot;uint64Value&quot;: &quot;A String&quot;, # Value of numeric properties.
1085 &quot;name&quot;: &quot;A String&quot;, # Name of the property.
1086 &quot;value&quot;: &quot;A String&quot;, # Value of the property.
1087 },
1088 ],
1089 &quot;score&quot;: 3.14, # Overall score of the result. Range [0, 1].
1090 &quot;locations&quot;: [ # The location information for the detected entity. Multiple
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001091 # `LocationInfo` elements can be present because one location may
1092 # indicate the location of the scene in the image, and another location
1093 # may indicate the location of the place where the image was taken.
1094 # Location information is usually present for landmarks.
1095 { # Detected entity location information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001096 &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 -07001097 # of doubles representing degrees latitude and degrees longitude. Unless
1098 # specified otherwise, this must conform to the
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 # &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 -07001100 # standard&lt;/a&gt;. Values must be within normalized ranges.
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 &quot;latitude&quot;: 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1102 &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 -07001103 },
1104 },
1105 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001106 &quot;mid&quot;: &quot;A String&quot;, # Opaque entity ID. Some IDs may be available in
1107 # [Google Knowledge Graph Search
1108 # API](https://developers.google.com/knowledge-graph/).
1109 &quot;confidence&quot;: 3.14, # **Deprecated. Use `score` instead.**
1110 # The accuracy of the entity detection in an image.
1111 # For example, for an image in which the &quot;Eiffel Tower&quot; entity is detected,
1112 # this field represents the confidence that there is a tower in the query
1113 # image. Range [0, 1].
1114 &quot;locale&quot;: &quot;A String&quot;, # The language code for the locale in which the entity textual
1115 # `description` is expressed.
1116 &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 -07001117 # for `LABEL_DETECTION` features.
Bu Sun Kim65020912020-05-20 12:08:20 -07001118 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001119 { # A vertex represents a 2D point in the image.
1120 # NOTE: the normalized vertex coordinates are relative to the original image
1121 # and range from 0 to 1.
Bu Sun Kim65020912020-05-20 12:08:20 -07001122 &quot;y&quot;: 3.14, # Y coordinate.
1123 &quot;x&quot;: 3.14, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001124 },
1125 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001126 &quot;vertices&quot;: [ # The bounding polygon vertices.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001127 { # A vertex represents a 2D point in the image.
1128 # NOTE: the vertex coordinates are in the same scale as the original image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001129 &quot;y&quot;: 42, # Y coordinate.
1130 &quot;x&quot;: 42, # X coordinate.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001131 },
1132 ],
1133 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 &quot;description&quot;: &quot;A String&quot;, # Entity textual description, expressed in its `locale` language.
1135 &quot;topicality&quot;: 3.14, # The relevancy of the ICA (Image Content Annotation) label to the
1136 # image. For example, the relevancy of &quot;tower&quot; is likely higher to an image
1137 # containing the detected &quot;Eiffel Tower&quot; than to an image containing a
1138 # detected distant towering building, even though the confidence that
1139 # there is a tower in each image may be the same. Range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001140 },
1141 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001142 &quot;imagePropertiesAnnotation&quot;: { # Stores image properties, such as dominant colors. # If present, image properties were extracted successfully.
1143 &quot;dominantColors&quot;: { # Set of dominant colors and their corresponding scores. # If present, dominant colors completed successfully.
1144 &quot;colors&quot;: [ # RGB color values with their score and pixel fraction.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 { # Color information consists of RGB channels, score, and the fraction of
1146 # the image that the color occupies in the image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001147 &quot;pixelFraction&quot;: 3.14, # The fraction of pixels the color occupies in the image.
1148 # Value in range [0, 1].
1149 &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 -07001150 # for simplicity of conversion to/from color representations in various
1151 # languages over compactness; for example, the fields of this representation
Bu Sun Kim65020912020-05-20 12:08:20 -07001152 # can be trivially provided to the constructor of &quot;java.awt.Color&quot; in Java; it
1153 # can also be trivially provided to UIColor&#x27;s &quot;+colorWithRed:green:blue:alpha&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001154 # method in iOS; and, with just a little work, it can be easily formatted into
Bu Sun Kim65020912020-05-20 12:08:20 -07001155 # a CSS &quot;rgba()&quot; string in JavaScript, as well.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001156 #
1157 # Note: this proto does not carry information about the absolute color space
1158 # that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,
1159 # DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the sRGB color
1160 # space.
1161 #
1162 # Example (Java):
1163 #
1164 # import com.google.type.Color;
1165 #
1166 # // ...
1167 # public static java.awt.Color fromProto(Color protocolor) {
1168 # float alpha = protocolor.hasAlpha()
1169 # ? protocolor.getAlpha().getValue()
1170 # : 1.0;
1171 #
1172 # return new java.awt.Color(
1173 # protocolor.getRed(),
1174 # protocolor.getGreen(),
1175 # protocolor.getBlue(),
1176 # alpha);
1177 # }
1178 #
1179 # public static Color toProto(java.awt.Color color) {
1180 # float red = (float) color.getRed();
1181 # float green = (float) color.getGreen();
1182 # float blue = (float) color.getBlue();
1183 # float denominator = 255.0;
1184 # Color.Builder resultBuilder =
1185 # Color
1186 # .newBuilder()
1187 # .setRed(red / denominator)
1188 # .setGreen(green / denominator)
1189 # .setBlue(blue / denominator);
1190 # int alpha = color.getAlpha();
1191 # if (alpha != 255) {
1192 # result.setAlpha(
1193 # FloatValue
1194 # .newBuilder()
1195 # .setValue(((float) alpha) / denominator)
1196 # .build());
1197 # }
1198 # return resultBuilder.build();
1199 # }
1200 # // ...
1201 #
1202 # Example (iOS / Obj-C):
1203 #
1204 # // ...
1205 # static UIColor* fromProto(Color* protocolor) {
1206 # float red = [protocolor red];
1207 # float green = [protocolor green];
1208 # float blue = [protocolor blue];
1209 # FloatValue* alpha_wrapper = [protocolor alpha];
1210 # float alpha = 1.0;
1211 # if (alpha_wrapper != nil) {
1212 # alpha = [alpha_wrapper value];
1213 # }
1214 # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
1215 # }
1216 #
1217 # static Color* toProto(UIColor* color) {
1218 # CGFloat red, green, blue, alpha;
Dan O'Mearadd494642020-05-01 07:42:23 -07001219 # if (![color getRed:&amp;red green:&amp;green blue:&amp;blue alpha:&amp;alpha]) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001220 # return nil;
1221 # }
1222 # Color* result = [[Color alloc] init];
1223 # [result setRed:red];
1224 # [result setGreen:green];
1225 # [result setBlue:blue];
Dan O'Mearadd494642020-05-01 07:42:23 -07001226 # if (alpha &lt;= 0.9999) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001227 # [result setAlpha:floatWrapperWithValue(alpha)];
1228 # }
1229 # [result autorelease];
1230 # return result;
1231 # }
1232 # // ...
1233 #
1234 # Example (JavaScript):
1235 #
1236 # // ...
1237 #
1238 # var protoToCssColor = function(rgb_color) {
1239 # var redFrac = rgb_color.red || 0.0;
1240 # var greenFrac = rgb_color.green || 0.0;
1241 # var blueFrac = rgb_color.blue || 0.0;
1242 # var red = Math.floor(redFrac * 255);
1243 # var green = Math.floor(greenFrac * 255);
1244 # var blue = Math.floor(blueFrac * 255);
1245 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 # if (!(&#x27;alpha&#x27; in rgb_color)) {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001247 # return rgbToCssColor_(red, green, blue);
1248 # }
1249 #
1250 # var alphaFrac = rgb_color.alpha.value || 0.0;
Bu Sun Kim65020912020-05-20 12:08:20 -07001251 # var rgbParams = [red, green, blue].join(&#x27;,&#x27;);
1252 # return [&#x27;rgba(&#x27;, rgbParams, &#x27;,&#x27;, alphaFrac, &#x27;)&#x27;].join(&#x27;&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001253 # };
1254 #
1255 # var rgbToCssColor_ = function(red, green, blue) {
Dan O'Mearadd494642020-05-01 07:42:23 -07001256 # var rgbNumber = new Number((red &lt;&lt; 16) | (green &lt;&lt; 8) | blue);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001257 # var hexString = rgbNumber.toString(16);
1258 # var missingZeros = 6 - hexString.length;
Bu Sun Kim65020912020-05-20 12:08:20 -07001259 # var resultBuilder = [&#x27;#&#x27;];
Dan O'Mearadd494642020-05-01 07:42:23 -07001260 # for (var i = 0; i &lt; missingZeros; i++) {
Bu Sun Kim65020912020-05-20 12:08:20 -07001261 # resultBuilder.push(&#x27;0&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001262 # }
1263 # resultBuilder.push(hexString);
Bu Sun Kim65020912020-05-20 12:08:20 -07001264 # return resultBuilder.join(&#x27;&#x27;);
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001265 # };
1266 #
1267 # // ...
Bu Sun Kim65020912020-05-20 12:08:20 -07001268 &quot;red&quot;: 3.14, # The amount of red in the color as a value in the interval [0, 1].
1269 &quot;green&quot;: 3.14, # The amount of green in the color as a value in the interval [0, 1].
1270 &quot;blue&quot;: 3.14, # The amount of blue in the color as a value in the interval [0, 1].
1271 &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 -07001272 # the final pixel color is defined by the equation:
1273 #
1274 # pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
1275 #
1276 # This means that a value of 1.0 corresponds to a solid color, whereas
1277 # a value of 0.0 corresponds to a completely transparent color. This
1278 # uses a wrapper message rather than a simple float scalar so that it is
1279 # possible to distinguish between a default value and the value being unset.
1280 # If omitted, this color object is to be rendered as a solid color
1281 # (as if the alpha value had been explicitly given with a value of 1.0).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001282 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001283 &quot;score&quot;: 3.14, # Image-specific score for this color. Value in range [0, 1].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001284 },
1285 ],
1286 },
1287 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001288 },
1289 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001290 &quot;inputConfig&quot;: { # The desired input location and metadata. # Information about the file for which this response is generated.
1291 &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.
1292 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
1293 # Google Cloud Storage object. Wildcards are not currently supported.
1294 },
1295 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
1296 # &quot;image/gif&quot; are supported. Wildcards are not supported.
1297 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
1298 # Note: As with all `bytes` fields, protobuffers use a pure binary
1299 # representation, whereas JSON representations use base64.
1300 #
1301 # Currently, this field only works for BatchAnnotateFiles requests. It does
1302 # not work for AsyncBatchAnnotateFiles requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001303 },
1304 },
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.
1369 &quot;productSet&quot;: &quot;A String&quot;, # The resource name of a ProductSet to be searched for similar images.
1370 #
1371 # Format is:
1372 # `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
1373 &quot;boundingPoly&quot;: { # A bounding polygon for the detected image annotation. # The bounding polygon around the area of interest in the image.
1374 # If it is not specified, system discretion will be applied.
1375 &quot;normalizedVertices&quot;: [ # The bounding polygon normalized vertices.
1376 { # A vertex represents a 2D point in the image.
1377 # NOTE: the normalized vertex coordinates are relative to the original image
1378 # and range from 0 to 1.
1379 &quot;y&quot;: 3.14, # Y coordinate.
1380 &quot;x&quot;: 3.14, # X coordinate.
1381 },
1382 ],
1383 &quot;vertices&quot;: [ # The bounding polygon vertices.
1384 { # A vertex represents a 2D point in the image.
1385 # NOTE: the vertex coordinates are in the same scale as the original image.
1386 &quot;y&quot;: 42, # Y coordinate.
1387 &quot;x&quot;: 42, # X coordinate.
1388 },
1389 ],
1390 },
1391 &quot;productCategories&quot;: [ # The list of product categories to search in. Currently, we only consider
1392 # the first category, and either &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;, &quot;toys-v2&quot;,
1393 # &quot;packagedgoods-v1&quot;, or &quot;general-v1&quot; should be specified. The legacy
1394 # categories &quot;homegoods&quot;, &quot;apparel&quot;, and &quot;toys&quot; are still supported but will
1395 # be deprecated. For new products, please use &quot;homegoods-v2&quot;, &quot;apparel-v2&quot;,
1396 # or &quot;toys-v2&quot; for better product search accuracy. It is recommended to
1397 # migrate existing products to these categories as well.
1398 &quot;A String&quot;,
1399 ],
1400 &quot;filter&quot;: &quot;A String&quot;, # The filtering expression. This can be used to restrict search results based
1401 # on Product labels. We currently support an AND of OR of key-value
1402 # expressions, where each expression within an OR must have the same key. An
1403 # &#x27;=&#x27; should be used to connect the key and value.
1404 #
1405 # For example, &quot;(color = red OR color = blue) AND brand = Google&quot; is
1406 # acceptable, but &quot;(color = red OR brand = Google)&quot; is not acceptable.
1407 # &quot;color: red&quot; is not acceptable because it uses a &#x27;:&#x27; instead of an &#x27;=&#x27;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001408 },
1409 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001410 &quot;outputConfig&quot;: { # The desired output location and metadata. # Required. The desired output location and metadata (e.g. format).
1411 &quot;gcsDestination&quot;: { # The Google Cloud Storage location where the output will be written to. # The Google Cloud Storage location to write the output(s) to.
1412 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI prefix where the results will be stored. Results
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001413 # will be in JSON format and preceded by its corresponding input URI prefix.
1414 # This field can either represent a gcs file prefix or gcs directory. In
1415 # either case, the uri should be unique because in order to get all of the
1416 # output files, you will need to do a wildcard gcs search on the uri prefix
1417 # you provide.
1418 #
1419 # Examples:
1420 #
1421 # * File Prefix: gs://bucket-name/here/filenameprefix The output files
1422 # will be created in gs://bucket-name/here/ and the names of the
Bu Sun Kim65020912020-05-20 12:08:20 -07001423 # output files will begin with &quot;filenameprefix&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001424 #
1425 # * Directory Prefix: gs://bucket-name/some/location/ The output files
1426 # will be created in gs://bucket-name/some/location/ and the names of the
1427 # output files could be anything because there was no filename prefix
1428 # specified.
1429 #
1430 # If multiple outputs, each response is still AnnotateFileResponse, each of
1431 # which contains some subset of the full list of AnnotateImageResponse.
1432 # Multiple outputs can happen if, for example, the output JSON is too large
1433 # and overflows into multiple sharded files.
1434 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001435 &quot;batchSize&quot;: 42, # The max number of response protos to put into each output JSON file on
1436 # Google Cloud Storage.
1437 # The valid range is [1, 100]. If not specified, the default value is 20.
1438 #
1439 # For example, for one pdf file with 100 pages, 100 response protos will
1440 # be generated. If `batch_size` = 20, then 5 json files each
1441 # containing 20 response protos will be written under the prefix
1442 # `gcs_destination`.`uri`.
1443 #
1444 # Currently, batch_size only applies to GcsDestination, with potential future
1445 # support for other output configurations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001446 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001447 &quot;inputConfig&quot;: { # The desired input location and metadata. # Required. Information about the input file.
1448 &quot;gcsSource&quot;: { # The Google Cloud Storage location where the input will be read from. # The Google Cloud Storage location to read the input from.
1449 &quot;uri&quot;: &quot;A String&quot;, # Google Cloud Storage URI for the input file. This must only be a
1450 # Google Cloud Storage object. Wildcards are not currently supported.
1451 },
1452 &quot;mimeType&quot;: &quot;A String&quot;, # The type of the file. Currently only &quot;application/pdf&quot;, &quot;image/tiff&quot; and
1453 # &quot;image/gif&quot; are supported. Wildcards are not supported.
1454 &quot;content&quot;: &quot;A String&quot;, # File content, represented as a stream of bytes.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001455 # Note: As with all `bytes` fields, protobuffers use a pure binary
1456 # representation, whereas JSON representations use base64.
1457 #
1458 # Currently, this field only works for BatchAnnotateFiles requests. It does
1459 # not work for AsyncBatchAnnotateFiles requests.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001460 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001461 &quot;features&quot;: [ # Required. Requested features.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001462 { # The type of Google Cloud Vision API detection to perform, and the maximum
1463 # number of results to return for that type. Multiple `Feature` objects can
1464 # be specified in the `features` list.
Bu Sun Kim65020912020-05-20 12:08:20 -07001465 &quot;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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001500 # 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;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1507 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001508 # user-facing error message should be localized and sent in the
1509 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001510 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001511 # message types for APIs to use.
1512 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001513 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001514 },
1515 ],
1516 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001517 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001524 # If `true`, the operation is completed, and either `error` or `response` is
1525 # available.
Bu Sun Kim65020912020-05-20 12:08:20 -07001526 &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}`.
1539 }</pre>
1540</div>
1541
1542</body></html>