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