1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="vision_v1.html">Cloud Vision API</a> . <a href="vision_v1.projects.html">projects</a> . <a href="vision_v1.projects.locations.html">locations</a> . <a href="vision_v1.projects.locations.products.html">products</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="vision_v1.projects.locations.products.referenceImages.html">referenceImages()</a></code> 79</p> 80<p class="firstline">Returns the referenceImages Resource.</p> 81 82<p class="toc_element"> 83 <code><a href="#create">create(parent, body, x__xgafv=None, productId=None)</a></code></p> 84<p class="firstline">Creates and returns a new product resource.</p> 85<p class="toc_element"> 86 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> 87<p class="firstline">Permanently deletes a product and its reference images.</p> 88<p class="toc_element"> 89 <code><a href="#get">get(name, x__xgafv=None)</a></code></p> 90<p class="firstline">Gets information associated with a Product.</p> 91<p class="toc_element"> 92 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 93<p class="firstline">Lists products in an unspecified order.</p> 94<p class="toc_element"> 95 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 96<p class="firstline">Retrieves the next page of results.</p> 97<p class="toc_element"> 98 <code><a href="#patch">patch(name, body, updateMask=None, x__xgafv=None)</a></code></p> 99<p class="firstline">Makes changes to a Product resource.</p> 100<h3>Method Details</h3> 101<div class="method"> 102 <code class="details" id="create">create(parent, body, x__xgafv=None, productId=None)</code> 103 <pre>Creates and returns a new product resource. 104 105Possible errors: 106 107* Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 108 characters. 109* Returns INVALID_ARGUMENT if description is longer than 4096 characters. 110* Returns INVALID_ARGUMENT if product_category is missing or invalid. 111 112Args: 113 parent: string, The project in which the Product should be created. 114 115Format is 116`projects/PROJECT_ID/locations/LOC_ID`. (required) 117 body: object, The request body. (required) 118 The object takes the form of: 119 120{ # A Product contains ReferenceImages. 121 "productLabels": [ # Key-value pairs that can be attached to a product. At query time, 122 # constraints can be specified based on the product_labels. 123 # 124 # Note that integer values can be provided as strings, e.g. "1199". Only 125 # strings with integer values can match a range-based restriction which is 126 # to be supported soon. 127 # 128 # Multiple values can be assigned to the same key. One product may have up to 129 # 100 product_labels. 130 { # A product label represented as a key-value pair. 131 "key": "A String", # The key of the label attached to the product. Cannot be empty and cannot 132 # exceed 128 bytes. 133 "value": "A String", # The value of the label attached to the product. Cannot be empty and 134 # cannot exceed 128 bytes. 135 }, 136 ], 137 "displayName": "A String", # The user-provided name for this Product. Must not be empty. Must be at most 138 # 4096 characters long. 139 "name": "A String", # The resource name of the product. 140 # 141 # Format is: 142 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. 143 # 144 # This field is ignored when creating a product. 145 "productCategory": "A String", # The category for the product identified by the reference image. This should 146 # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories 147 # "homegoods", "apparel", and "toys" are still supported, but these should 148 # not be used for new products. 149 # 150 # This field is immutable. 151 "description": "A String", # User-provided metadata to be stored with this product. Must be at most 4096 152 # characters long. 153} 154 155 x__xgafv: string, V1 error format. 156 Allowed values 157 1 - v1 error format 158 2 - v2 error format 159 productId: string, A user-supplied resource id for this Product. If set, the server will 160attempt to use this value as the resource id. If it is already in use, an 161error is returned with code ALREADY_EXISTS. Must be at most 128 characters 162long. It cannot contain the character `/`. 163 164Returns: 165 An object of the form: 166 167 { # A Product contains ReferenceImages. 168 "productLabels": [ # Key-value pairs that can be attached to a product. At query time, 169 # constraints can be specified based on the product_labels. 170 # 171 # Note that integer values can be provided as strings, e.g. "1199". Only 172 # strings with integer values can match a range-based restriction which is 173 # to be supported soon. 174 # 175 # Multiple values can be assigned to the same key. One product may have up to 176 # 100 product_labels. 177 { # A product label represented as a key-value pair. 178 "key": "A String", # The key of the label attached to the product. Cannot be empty and cannot 179 # exceed 128 bytes. 180 "value": "A String", # The value of the label attached to the product. Cannot be empty and 181 # cannot exceed 128 bytes. 182 }, 183 ], 184 "displayName": "A String", # The user-provided name for this Product. Must not be empty. Must be at most 185 # 4096 characters long. 186 "name": "A String", # The resource name of the product. 187 # 188 # Format is: 189 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. 190 # 191 # This field is ignored when creating a product. 192 "productCategory": "A String", # The category for the product identified by the reference image. This should 193 # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories 194 # "homegoods", "apparel", and "toys" are still supported, but these should 195 # not be used for new products. 196 # 197 # This field is immutable. 198 "description": "A String", # User-provided metadata to be stored with this product. Must be at most 4096 199 # characters long. 200 }</pre> 201</div> 202 203<div class="method"> 204 <code class="details" id="delete">delete(name, x__xgafv=None)</code> 205 <pre>Permanently deletes a product and its reference images. 206 207Metadata of the product and all its images will be deleted right away, but 208search queries against ProductSets containing the product may still work 209until all related caches are refreshed. 210 211Args: 212 name: string, Resource name of product to delete. 213 214Format is: 215`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` (required) 216 x__xgafv: string, V1 error format. 217 Allowed values 218 1 - v1 error format 219 2 - v2 error format 220 221Returns: 222 An object of the form: 223 224 { # A generic empty message that you can re-use to avoid defining duplicated 225 # empty messages in your APIs. A typical example is to use it as the request 226 # or the response type of an API method. For instance: 227 # 228 # service Foo { 229 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 230 # } 231 # 232 # The JSON representation for `Empty` is empty JSON object `{}`. 233 }</pre> 234</div> 235 236<div class="method"> 237 <code class="details" id="get">get(name, x__xgafv=None)</code> 238 <pre>Gets information associated with a Product. 239 240Possible errors: 241 242* Returns NOT_FOUND if the Product does not exist. 243 244Args: 245 name: string, Resource name of the Product to get. 246 247Format is: 248`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` (required) 249 x__xgafv: string, V1 error format. 250 Allowed values 251 1 - v1 error format 252 2 - v2 error format 253 254Returns: 255 An object of the form: 256 257 { # A Product contains ReferenceImages. 258 "productLabels": [ # Key-value pairs that can be attached to a product. At query time, 259 # constraints can be specified based on the product_labels. 260 # 261 # Note that integer values can be provided as strings, e.g. "1199". Only 262 # strings with integer values can match a range-based restriction which is 263 # to be supported soon. 264 # 265 # Multiple values can be assigned to the same key. One product may have up to 266 # 100 product_labels. 267 { # A product label represented as a key-value pair. 268 "key": "A String", # The key of the label attached to the product. Cannot be empty and cannot 269 # exceed 128 bytes. 270 "value": "A String", # The value of the label attached to the product. Cannot be empty and 271 # cannot exceed 128 bytes. 272 }, 273 ], 274 "displayName": "A String", # The user-provided name for this Product. Must not be empty. Must be at most 275 # 4096 characters long. 276 "name": "A String", # The resource name of the product. 277 # 278 # Format is: 279 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. 280 # 281 # This field is ignored when creating a product. 282 "productCategory": "A String", # The category for the product identified by the reference image. This should 283 # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories 284 # "homegoods", "apparel", and "toys" are still supported, but these should 285 # not be used for new products. 286 # 287 # This field is immutable. 288 "description": "A String", # User-provided metadata to be stored with this product. Must be at most 4096 289 # characters long. 290 }</pre> 291</div> 292 293<div class="method"> 294 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> 295 <pre>Lists products in an unspecified order. 296 297Possible errors: 298 299* Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. 300 301Args: 302 parent: string, The project OR ProductSet from which Products should be listed. 303 304Format: 305`projects/PROJECT_ID/locations/LOC_ID` (required) 306 pageSize: integer, The maximum number of items to return. Default 10, maximum 100. 307 pageToken: string, The next_page_token returned from a previous List request, if any. 308 x__xgafv: string, V1 error format. 309 Allowed values 310 1 - v1 error format 311 2 - v2 error format 312 313Returns: 314 An object of the form: 315 316 { # Response message for the `ListProducts` method. 317 "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more 318 # results in the list. 319 "products": [ # List of products. 320 { # A Product contains ReferenceImages. 321 "productLabels": [ # Key-value pairs that can be attached to a product. At query time, 322 # constraints can be specified based on the product_labels. 323 # 324 # Note that integer values can be provided as strings, e.g. "1199". Only 325 # strings with integer values can match a range-based restriction which is 326 # to be supported soon. 327 # 328 # Multiple values can be assigned to the same key. One product may have up to 329 # 100 product_labels. 330 { # A product label represented as a key-value pair. 331 "key": "A String", # The key of the label attached to the product. Cannot be empty and cannot 332 # exceed 128 bytes. 333 "value": "A String", # The value of the label attached to the product. Cannot be empty and 334 # cannot exceed 128 bytes. 335 }, 336 ], 337 "displayName": "A String", # The user-provided name for this Product. Must not be empty. Must be at most 338 # 4096 characters long. 339 "name": "A String", # The resource name of the product. 340 # 341 # Format is: 342 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. 343 # 344 # This field is ignored when creating a product. 345 "productCategory": "A String", # The category for the product identified by the reference image. This should 346 # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories 347 # "homegoods", "apparel", and "toys" are still supported, but these should 348 # not be used for new products. 349 # 350 # This field is immutable. 351 "description": "A String", # User-provided metadata to be stored with this product. Must be at most 4096 352 # characters long. 353 }, 354 ], 355 }</pre> 356</div> 357 358<div class="method"> 359 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 360 <pre>Retrieves the next page of results. 361 362Args: 363 previous_request: The request for the previous page. (required) 364 previous_response: The response from the request for the previous page. (required) 365 366Returns: 367 A request object that you can call 'execute()' on to request the next 368 page. Returns None if there are no more items in the collection. 369 </pre> 370</div> 371 372<div class="method"> 373 <code class="details" id="patch">patch(name, body, updateMask=None, x__xgafv=None)</code> 374 <pre>Makes changes to a Product resource. 375Only the `display_name`, `description`, and `labels` fields can be updated 376right now. 377 378If labels are updated, the change will not be reflected in queries until 379the next index time. 380 381Possible errors: 382 383* Returns NOT_FOUND if the Product does not exist. 384* Returns INVALID_ARGUMENT if display_name is present in update_mask but is 385 missing from the request or longer than 4096 characters. 386* Returns INVALID_ARGUMENT if description is present in update_mask but is 387 longer than 4096 characters. 388* Returns INVALID_ARGUMENT if product_category is present in update_mask. 389 390Args: 391 name: string, The resource name of the product. 392 393Format is: 394`projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. 395 396This field is ignored when creating a product. (required) 397 body: object, The request body. (required) 398 The object takes the form of: 399 400{ # A Product contains ReferenceImages. 401 "productLabels": [ # Key-value pairs that can be attached to a product. At query time, 402 # constraints can be specified based on the product_labels. 403 # 404 # Note that integer values can be provided as strings, e.g. "1199". Only 405 # strings with integer values can match a range-based restriction which is 406 # to be supported soon. 407 # 408 # Multiple values can be assigned to the same key. One product may have up to 409 # 100 product_labels. 410 { # A product label represented as a key-value pair. 411 "key": "A String", # The key of the label attached to the product. Cannot be empty and cannot 412 # exceed 128 bytes. 413 "value": "A String", # The value of the label attached to the product. Cannot be empty and 414 # cannot exceed 128 bytes. 415 }, 416 ], 417 "displayName": "A String", # The user-provided name for this Product. Must not be empty. Must be at most 418 # 4096 characters long. 419 "name": "A String", # The resource name of the product. 420 # 421 # Format is: 422 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. 423 # 424 # This field is ignored when creating a product. 425 "productCategory": "A String", # The category for the product identified by the reference image. This should 426 # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories 427 # "homegoods", "apparel", and "toys" are still supported, but these should 428 # not be used for new products. 429 # 430 # This field is immutable. 431 "description": "A String", # User-provided metadata to be stored with this product. Must be at most 4096 432 # characters long. 433} 434 435 updateMask: string, The FieldMask that specifies which fields 436to update. 437If update_mask isn't specified, all mutable fields are to be updated. 438Valid mask paths include `product_labels`, `display_name`, and 439`description`. 440 x__xgafv: string, V1 error format. 441 Allowed values 442 1 - v1 error format 443 2 - v2 error format 444 445Returns: 446 An object of the form: 447 448 { # A Product contains ReferenceImages. 449 "productLabels": [ # Key-value pairs that can be attached to a product. At query time, 450 # constraints can be specified based on the product_labels. 451 # 452 # Note that integer values can be provided as strings, e.g. "1199". Only 453 # strings with integer values can match a range-based restriction which is 454 # to be supported soon. 455 # 456 # Multiple values can be assigned to the same key. One product may have up to 457 # 100 product_labels. 458 { # A product label represented as a key-value pair. 459 "key": "A String", # The key of the label attached to the product. Cannot be empty and cannot 460 # exceed 128 bytes. 461 "value": "A String", # The value of the label attached to the product. Cannot be empty and 462 # cannot exceed 128 bytes. 463 }, 464 ], 465 "displayName": "A String", # The user-provided name for this Product. Must not be empty. Must be at most 466 # 4096 characters long. 467 "name": "A String", # The resource name of the product. 468 # 469 # Format is: 470 # `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. 471 # 472 # This field is ignored when creating a product. 473 "productCategory": "A String", # The category for the product identified by the reference image. This should 474 # be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories 475 # "homegoods", "apparel", and "toys" are still supported, but these should 476 # not be used for new products. 477 # 478 # This field is immutable. 479 "description": "A String", # User-provided metadata to be stored with this product. Must be at most 4096 480 # characters long. 481 }</pre> 482</div> 483 484</body></html>