Patch
|
|||||
|
|
||||
Makes changes to a Product resource.
Only the display_name, description, and labels fields can be updated
right now.
If labels are updated, the change will not be reflected in queries until the next index time.
Possible errors:
- Returns NOT_FOUND if the Product does not exist.
- Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from the request or longer than 4096 characters.
- Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 characters.
- Returns INVALID_ARGUMENT if product_category is present in update_mask
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- View and manage your data across Google Cloud Platform services
- Apply machine learning models to understand and label images
Input
This building block consumes 9 input parameters
| Name | Format | Description |
|---|---|---|
name Required |
STRING |
The resource name of the product. Format is:
This field is ignored when creating a product |
updateMask |
ANY |
The FieldMask that specifies which fields
to update.
If update_mask isn't specified, all mutable fields are to be updated.
Valid mask paths include |
name |
STRING |
The resource name of the product. Format is:
This field is ignored when creating a product |
displayName |
STRING |
The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long |
description |
STRING |
User-provided metadata to be stored with this product. Must be at most 4096 characters long |
productCategory |
STRING |
The category for the product identified by the reference image. This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products. This field is immutable |
productLabels[] |
OBJECT |
A product label represented as a key-value pair |
productLabels[].value |
STRING |
The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes |
productLabels[].key |
STRING |
The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes |
= Parameter name
= Format
|
name STRING Required The resource name of the product. Format is:
This field is ignored when creating a product |
|
updateMask ANY The FieldMask that specifies which fields
to update.
If update_mask isn't specified, all mutable fields are to be updated.
Valid mask paths include |
|
name STRING The resource name of the product. Format is:
This field is ignored when creating a product |
|
displayName STRING The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long |
|
description STRING User-provided metadata to be stored with this product. Must be at most 4096 characters long |
|
productCategory STRING The category for the product identified by the reference image. This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products. This field is immutable |
|
productLabels[] OBJECT A product label represented as a key-value pair |
|
productLabels[].value STRING The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes |
|
productLabels[].key STRING The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes |
Output
This building block provides 7 output parameters
| Name | Format | Description |
|---|---|---|
name |
STRING |
The resource name of the product. Format is:
This field is ignored when creating a product |
displayName |
STRING |
The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long |
description |
STRING |
User-provided metadata to be stored with this product. Must be at most 4096 characters long |
productCategory |
STRING |
The category for the product identified by the reference image. This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products. This field is immutable |
productLabels[] |
OBJECT |
A product label represented as a key-value pair |
productLabels[].value |
STRING |
The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes |
productLabels[].key |
STRING |
The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes |
= Parameter name
= Format
|
name STRING The resource name of the product. Format is:
This field is ignored when creating a product |
|
displayName STRING The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long |
|
description STRING User-provided metadata to be stored with this product. Must be at most 4096 characters long |
|
productCategory STRING The category for the product identified by the reference image. This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products. This field is immutable |
|
productLabels[] OBJECT A product label represented as a key-value pair |
|
productLabels[].value STRING The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes |
|
productLabels[].key STRING The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes |