blob: d8ab78c0d71bac9d1802d139779f0568e8b16e4e [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="retail_v2alpha.html">Retail API</a> . <a href="retail_v2alpha.projects.html">projects</a> . <a href="retail_v2alpha.projects.locations.html">locations</a> . <a href="retail_v2alpha.projects.locations.catalogs.html">catalogs</a> . <a href="retail_v2alpha.projects.locations.catalogs.branches.html">branches</a> . <a href="retail_v2alpha.projects.locations.catalogs.branches.products.html">products</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#addFulfillmentPlaces">addFulfillmentPlaces(product, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.</p>
<p class="toc_element">
<code><a href="#addLocalInventories">addLocalInventories(product, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by GetProduct or ListProducts. Local inventory information can only be modified using this method. CreateProduct and UpdateProduct has no effect on local inventories. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact Cloud sales if you are interested in using Retail Search.</p>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#create">create(parent, body=None, productId=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a Product.</p>
<p class="toc_element">
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes a Product.</p>
<p class="toc_element">
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets a Product.</p>
<p class="toc_element">
<code><a href="#import_">import_(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Bulk import of multiple Products. Request processing may be synchronous. No partial updating is supported. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated.</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, readMask=None, requireTotalSize=None, x__xgafv=None)</a></code></p>
<p class="firstline">Gets a list of Products.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#patch">patch(name, allowMissing=None, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a Product.</p>
<p class="toc_element">
<code><a href="#removeFulfillmentPlaces">removeFulfillmentPlaces(product, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.</p>
<p class="toc_element">
<code><a href="#removeLocalInventories">removeLocalInventories(product, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by GetProduct or ListProducts. Local inventory information can only be removed using this method. CreateProduct and UpdateProduct has no effect on local inventories. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact Cloud sales if you are interested in using Retail Search.</p>
<p class="toc_element">
<code><a href="#setInventory">setInventory(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by GetProduct or ListProducts. When inventory is updated with CreateProduct and UpdateProduct, the specified inventory field value(s) will overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update time for the specified inventory fields will be overwritten to the time of the CreateProduct or UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product will be used. If no inventory fields are set in UpdateProductRequest.set_mask, then any existing inventory information will be preserved. Pre-existing inventory information can only be updated with SetInventory, AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.</p>
<p class="toc_element">
<code><a href="#setLocalInventories">setLocalInventories(product, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Set local inventory information for a Product with the provided list of places at a set timestamp. If a place in the provided list does not exist, the place will be created. If a place in the provided list already exists, it will be updated while respecting the last update timestamps of each inventory field. If an existing place is not in the provided list, it will be removed. This process is asynchronous. If the request is valid, the set operation will be enqueued and processed downstream. As a consequence, when a response is returned, set operations are not immediately manifested in the Product queried by GetProduct or ListProducts. When applying the set operation, this process takes a snapshot of currently existing places and their corresponding timestamps to determine the places to update. Avoid concurrent AddLocalInventories and RemoveLocalInventories calls, since they can introduce asynchronous updates that could be missed by the set operation. Local inventory information can only be updated with this method and other local inventory-specific methods. CreateProduct and UpdateProduct has no effect on local inventories. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact Cloud sales if you are interested in using Retail Search.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="addFulfillmentPlaces">addFulfillmentPlaces(product, body=None, x__xgafv=None)</code>
<pre>Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.
Args:
product: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for AddFulfillmentPlaces method.
&quot;addTime&quot;: &quot;A String&quot;, # The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used.
&quot;allowMissing&quot;: True or False, # If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.
&quot;placeIds&quot;: [ # Required. The IDs for this type, such as the store IDs for &quot;pickup-in-store&quot; or the region IDs for &quot;same-day-delivery&quot; to be added for this type. Duplicate IDs will be automatically ignored. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned. If the total number of place IDs exceeds 2000 for this type after adding, then the update will be rejected.
&quot;A String&quot;,
],
&quot;type&quot;: &quot;A String&quot;, # Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>
<div class="method">
<code class="details" id="addLocalInventories">addLocalInventories(product, body=None, x__xgafv=None)</code>
<pre>Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by GetProduct or ListProducts. Local inventory information can only be modified using this method. CreateProduct and UpdateProduct has no effect on local inventories. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact Cloud sales if you are interested in using Retail Search.
Args:
product: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for AddLocalInventories method.
&quot;addMask&quot;: &quot;A String&quot;, # Indicates which inventory fields in the provided list of LocalInventory to update. The field is updated to the provided value. If a field is set while the place does not have a previous local inventory, the local inventory at that store is created. If a field is set while the value of that field is not provided, the original field value, if it exists, is deleted. If the mask is not set or set with empty paths, all inventory fields will be updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.
&quot;addTime&quot;: &quot;A String&quot;, # The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used.
&quot;allowMissing&quot;: True or False, # If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.
&quot;localInventories&quot;: [ # Required. A list of inventory information at difference places. Each place is identified by its place ID. At most 3000 inventories are allowed per request.
{ # The inventory information at a place (e.g. a store) identified by a place ID.
&quot;attributes&quot;: { # Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * The max number of values per attribute is 10. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;placeId&quot;: &quot;A String&quot;, # The place ID for the current set of inventory information.
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
},
],
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="create">create(parent, body=None, productId=None, x__xgafv=None)</code>
<pre>Creates a Product.
Args:
parent: string, Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. (required)
body: object, The request body.
The object takes the form of:
{ # Product captures all metadata information of items to be recommended or searched.
&quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
&quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
&quot;A String&quot;,
],
&quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
&quot;A String&quot;,
],
},
&quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
&quot;availableQuantity&quot;: 42, # The available quantity of the item.
&quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search.
&quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
&quot;A String&quot;,
],
&quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
&quot;A String&quot;,
],
&quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
&quot;A String&quot;,
],
&quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
&quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
},
&quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
&quot;A String&quot;,
],
&quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
&quot;expireTime&quot;: &quot;A String&quot;, # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
&quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
{ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
&quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
&quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
&quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
&quot;images&quot;: [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
{ # Product thumbnail/detail image.
&quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
&quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
},
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
&quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
&quot;A String&quot;,
],
&quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
&quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
&quot;A String&quot;,
],
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
&quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
&quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product.
{ # Promotion information.
&quot;promotionId&quot;: &quot;A String&quot;, # ID of the promotion. For example, &quot;free gift&quot;. The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148).
},
],
&quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
&quot;rating&quot;: { # The rating of a Product. # The rating of this product.
&quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
42,
],
},
&quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency.
&quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
&quot;A String&quot;,
],
&quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
&quot;A String&quot;,
],
&quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
&quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
&quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
&quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
&quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
# Object with schema name: GoogleCloudRetailV2alphaProduct
],
}
productId: string, Required. The ID to use for the Product, which will become the final component of the Product.name. If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Product captures all metadata information of items to be recommended or searched.
&quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
&quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
&quot;A String&quot;,
],
&quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
&quot;A String&quot;,
],
},
&quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
&quot;availableQuantity&quot;: 42, # The available quantity of the item.
&quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search.
&quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
&quot;A String&quot;,
],
&quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
&quot;A String&quot;,
],
&quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
&quot;A String&quot;,
],
&quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
&quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
},
&quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
&quot;A String&quot;,
],
&quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
&quot;expireTime&quot;: &quot;A String&quot;, # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
&quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
{ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
&quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
&quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
&quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
&quot;images&quot;: [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
{ # Product thumbnail/detail image.
&quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
&quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
},
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
&quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
&quot;A String&quot;,
],
&quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
&quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
&quot;A String&quot;,
],
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
&quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
&quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product.
{ # Promotion information.
&quot;promotionId&quot;: &quot;A String&quot;, # ID of the promotion. For example, &quot;free gift&quot;. The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148).
},
],
&quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
&quot;rating&quot;: { # The rating of a Product. # The rating of this product.
&quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
42,
],
},
&quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency.
&quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
&quot;A String&quot;,
],
&quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
&quot;A String&quot;,
],
&quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
&quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
&quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
&quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
&quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
# Object with schema name: GoogleCloudRetailV2alphaProduct
],
}</pre>
</div>
<div class="method">
<code class="details" id="delete">delete(name, x__xgafv=None)</code>
<pre>Deletes a Product.
Args:
name: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named Product will be deleted. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
}</pre>
</div>
<div class="method">
<code class="details" id="get">get(name, x__xgafv=None)</code>
<pre>Gets a Product.
Args:
name: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Product does not exist, a NOT_FOUND error is returned. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Product captures all metadata information of items to be recommended or searched.
&quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
&quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
&quot;A String&quot;,
],
&quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
&quot;A String&quot;,
],
},
&quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
&quot;availableQuantity&quot;: 42, # The available quantity of the item.
&quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search.
&quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
&quot;A String&quot;,
],
&quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
&quot;A String&quot;,
],
&quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
&quot;A String&quot;,
],
&quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
&quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
},
&quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
&quot;A String&quot;,
],
&quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
&quot;expireTime&quot;: &quot;A String&quot;, # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
&quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
{ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
&quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
&quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
&quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
&quot;images&quot;: [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
{ # Product thumbnail/detail image.
&quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
&quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
},
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
&quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
&quot;A String&quot;,
],
&quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
&quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
&quot;A String&quot;,
],
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
&quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
&quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product.
{ # Promotion information.
&quot;promotionId&quot;: &quot;A String&quot;, # ID of the promotion. For example, &quot;free gift&quot;. The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148).
},
],
&quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
&quot;rating&quot;: { # The rating of a Product. # The rating of this product.
&quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
42,
],
},
&quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency.
&quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
&quot;A String&quot;,
],
&quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
&quot;A String&quot;,
],
&quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
&quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
&quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
&quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
&quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
# Object with schema name: GoogleCloudRetailV2alphaProduct
],
}</pre>
</div>
<div class="method">
<code class="details" id="import_">import_(parent, body=None, x__xgafv=None)</code>
<pre>Bulk import of multiple Products. Request processing may be synchronous. No partial updating is supported. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated.
Args:
parent: string, Required. `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for Import methods.
&quot;errorsConfig&quot;: { # Configuration of destination for Import related errors. # The desired location of errors incurred during the Import.
&quot;gcsPrefix&quot;: &quot;A String&quot;, # Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.
},
&quot;inputConfig&quot;: { # The input config source for products. # Required. The desired input location of the data.
&quot;bigQuerySource&quot;: { # BigQuery source import data from. # BigQuery input source.
&quot;dataSchema&quot;: &quot;A String&quot;, # The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: Using https://support.google.com/analytics/answer/3437719.
&quot;datasetId&quot;: &quot;A String&quot;, # Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.
&quot;gcsStagingDir&quot;: &quot;A String&quot;, # Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.
&quot;partitionDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values * A month and day value, with a zero year, such as an anniversary * A year on its own, with zero month and day values * A year and month value, with a zero day, such as a credit card expiration date Related types are google.type.TimeOfDay and `google.protobuf.Timestamp`. # BigQuery time partitioned table&#x27;s _PARTITIONDATE in YYYY-MM-DD format. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.
&quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
&quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
&quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
},
&quot;projectId&quot;: &quot;A String&quot;, # The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.
&quot;tableId&quot;: &quot;A String&quot;, # Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.
},
&quot;gcsSource&quot;: { # Google Cloud Storage location for input content. format. # Google Cloud Storage location for the input content.
&quot;dataSchema&quot;: &quot;A String&quot;, # The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: Using https://support.google.com/analytics/answer/3437719. Supported values for control imports: * &#x27;control&#x27; (default): One JSON Control per line.
&quot;inputUris&quot;: [ # Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files, and each file can be up to 2 GB. See [Importing product information](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog) for the expected file format and setup instructions.
&quot;A String&quot;,
],
},
&quot;productInlineSource&quot;: { # The inline source for the input config for ImportProducts method. # The Inline source for the input content for products.
&quot;products&quot;: [ # Required. A list of products to update/create. Each product must have a valid Product.id. Recommended max of 100 items.
{ # Product captures all metadata information of items to be recommended or searched.
&quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
&quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
&quot;A String&quot;,
],
&quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
&quot;A String&quot;,
],
},
&quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
&quot;availableQuantity&quot;: 42, # The available quantity of the item.
&quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search.
&quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
&quot;A String&quot;,
],
&quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
&quot;A String&quot;,
],
&quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
&quot;A String&quot;,
],
&quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
&quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
},
&quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
&quot;A String&quot;,
],
&quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
&quot;expireTime&quot;: &quot;A String&quot;, # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
&quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
{ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
&quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
&quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
&quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
&quot;images&quot;: [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
{ # Product thumbnail/detail image.
&quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
&quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
},
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
&quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
&quot;A String&quot;,
],
&quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
&quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
&quot;A String&quot;,
],
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
&quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
&quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product.
{ # Promotion information.
&quot;promotionId&quot;: &quot;A String&quot;, # ID of the promotion. For example, &quot;free gift&quot;. The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148).
},
],
&quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
&quot;rating&quot;: { # The rating of a Product. # The rating of this product.
&quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
42,
],
},
&quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency.
&quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
&quot;A String&quot;,
],
&quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
&quot;A String&quot;,
],
&quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
&quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
&quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
&quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
&quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
# Object with schema name: GoogleCloudRetailV2alphaProduct
],
},
],
},
},
&quot;notificationPubsubTopic&quot;: &quot;A String&quot;, # Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification will be sent to specified Pub/Sub topic. The message data will be JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.
&quot;reconciliationMode&quot;: &quot;A String&quot;, # The mode of reconciliation between existing products and the products to be imported. Defaults to ReconciliationMode.INCREMENTAL.
&quot;requestId&quot;: &quot;A String&quot;, # Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128 characters long and must match the pattern: `[a-zA-Z0-9_]+`. This is returned as Operation.name in ImportMetadata. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.
&quot;updateMask&quot;: &quot;A String&quot;, # Indicates which fields in the provided imported &#x27;products&#x27; to update. If not set, will by default update all fields.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, readMask=None, requireTotalSize=None, x__xgafv=None)</code>
<pre>Gets a list of Products.
Args:
parent: string, Required. The parent branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list Products under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. (required)
filter: string, A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List Product.Type.VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: `primary_product_id = &quot;some_product_id&quot;` * List Products bundled in a Product.Type.COLLECTION Product. For example: `collection_product_id = &quot;some_product_id&quot;` * List Products with a partibular type. For example: `type = &quot;PRIMARY&quot;` `type = &quot;VARIANT&quot;` `type = &quot;COLLECTION&quot;` If the field is unrecognizable, an INVALID_ARGUMENT error is returned. If the specified Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist, a NOT_FOUND error is returned.
pageSize: integer, Maximum number of Products to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.
pageToken: string, A page token ListProductsResponse.next_page_token, received from a previous ProductService.ListProducts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ProductService.ListProducts must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.
readMask: string, The fields of Product to return in the responses. If not set or empty, the following fields are returned: * Product.name * Product.id * Product.title * Product.uri * Product.images * Product.price_info * Product.brands If &quot;*&quot; is provided, all fields are returned. Product.name is always returned no matter what mask is set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.
requireTotalSize: boolean, If true and page_token is empty, ListProductsResponse.total_size is set to the total count of matched items irrespective of pagination. Notice that setting this field to true affects the performance.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for ProductService.ListProducts method.
&quot;nextPageToken&quot;: &quot;A String&quot;, # A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
&quot;products&quot;: [ # The Products.
{ # Product captures all metadata information of items to be recommended or searched.
&quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
&quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
&quot;A String&quot;,
],
&quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
&quot;A String&quot;,
],
},
&quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
&quot;availableQuantity&quot;: 42, # The available quantity of the item.
&quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search.
&quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
&quot;A String&quot;,
],
&quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
&quot;A String&quot;,
],
&quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
&quot;A String&quot;,
],
&quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
&quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
},
&quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
&quot;A String&quot;,
],
&quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
&quot;expireTime&quot;: &quot;A String&quot;, # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
&quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
{ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
&quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
&quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
&quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
&quot;images&quot;: [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
{ # Product thumbnail/detail image.
&quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
&quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
},
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
&quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
&quot;A String&quot;,
],
&quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
&quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
&quot;A String&quot;,
],
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
&quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
&quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product.
{ # Promotion information.
&quot;promotionId&quot;: &quot;A String&quot;, # ID of the promotion. For example, &quot;free gift&quot;. The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148).
},
],
&quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
&quot;rating&quot;: { # The rating of a Product. # The rating of this product.
&quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
42,
],
},
&quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency.
&quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
&quot;A String&quot;,
],
&quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
&quot;A String&quot;,
],
&quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
&quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
&quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
&quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
&quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
# Object with schema name: GoogleCloudRetailV2alphaProduct
],
},
],
&quot;totalSize&quot;: 42, # The total count of matched Products irrespective of pagination. The total number of Products returned by pagination may be less than the total_size that matches. This field is ignored if ListProductsRequest.require_total_size is not set or ListProductsRequest.page_token is not empty.
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
<div class="method">
<code class="details" id="patch">patch(name, allowMissing=None, body=None, updateMask=None, x__xgafv=None)</code>
<pre>Updates a Product.
Args:
name: string, Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. (required)
body: object, The request body.
The object takes the form of:
{ # Product captures all metadata information of items to be recommended or searched.
&quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
&quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
&quot;A String&quot;,
],
&quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
&quot;A String&quot;,
],
},
&quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
&quot;availableQuantity&quot;: 42, # The available quantity of the item.
&quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search.
&quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
&quot;A String&quot;,
],
&quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
&quot;A String&quot;,
],
&quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
&quot;A String&quot;,
],
&quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
&quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
},
&quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
&quot;A String&quot;,
],
&quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
&quot;expireTime&quot;: &quot;A String&quot;, # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
&quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
{ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
&quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
&quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
&quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
&quot;images&quot;: [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
{ # Product thumbnail/detail image.
&quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
&quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
},
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
&quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
&quot;A String&quot;,
],
&quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
&quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
&quot;A String&quot;,
],
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
&quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
&quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product.
{ # Promotion information.
&quot;promotionId&quot;: &quot;A String&quot;, # ID of the promotion. For example, &quot;free gift&quot;. The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148).
},
],
&quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
&quot;rating&quot;: { # The rating of a Product. # The rating of this product.
&quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
42,
],
},
&quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency.
&quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
&quot;A String&quot;,
],
&quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
&quot;A String&quot;,
],
&quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
&quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
&quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
&quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
&quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
# Object with schema name: GoogleCloudRetailV2alphaProduct
],
}
allowMissing: boolean, If set to true, and the Product is not found, a new Product will be created. In this situation, `update_mask` is ignored.
updateMask: string, Indicates which fields in the provided Product to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Product captures all metadata information of items to be recommended or searched.
&quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
&quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
&quot;A String&quot;,
],
&quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
&quot;A String&quot;,
],
},
&quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
&quot;availableQuantity&quot;: 42, # The available quantity of the item.
&quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search.
&quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
&quot;A String&quot;,
],
&quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
&quot;A String&quot;,
],
&quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
&quot;A String&quot;,
],
&quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
&quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
},
&quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
&quot;A String&quot;,
],
&quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
&quot;expireTime&quot;: &quot;A String&quot;, # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
&quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
{ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
&quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
&quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
&quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
&quot;images&quot;: [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
{ # Product thumbnail/detail image.
&quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
&quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
},
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
&quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
&quot;A String&quot;,
],
&quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
&quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
&quot;A String&quot;,
],
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
&quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
&quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product.
{ # Promotion information.
&quot;promotionId&quot;: &quot;A String&quot;, # ID of the promotion. For example, &quot;free gift&quot;. The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148).
},
],
&quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
&quot;rating&quot;: { # The rating of a Product. # The rating of this product.
&quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
42,
],
},
&quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency.
&quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
&quot;A String&quot;,
],
&quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
&quot;A String&quot;,
],
&quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
&quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
&quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
&quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
&quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
# Object with schema name: GoogleCloudRetailV2alphaProduct
],
}</pre>
</div>
<div class="method">
<code class="details" id="removeFulfillmentPlaces">removeFulfillmentPlaces(product, body=None, x__xgafv=None)</code>
<pre>Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by GetProduct or ListProducts. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.
Args:
product: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for RemoveFulfillmentPlaces method.
&quot;allowMissing&quot;: True or False, # If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.
&quot;placeIds&quot;: [ # Required. The IDs for this type, such as the store IDs for &quot;pickup-in-store&quot; or the region IDs for &quot;same-day-delivery&quot;, to be removed for this type. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
&quot;removeTime&quot;: &quot;A String&quot;, # The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used.
&quot;type&quot;: &quot;A String&quot;, # Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>
<div class="method">
<code class="details" id="removeLocalInventories">removeLocalInventories(product, body=None, x__xgafv=None)</code>
<pre>Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by GetProduct or ListProducts. Local inventory information can only be removed using this method. CreateProduct and UpdateProduct has no effect on local inventories. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact Cloud sales if you are interested in using Retail Search.
Args:
product: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for RemoveLocalInventories method.
&quot;allowMissing&quot;: True or False, # If set to true, and the Product is not found, the local inventory removal request will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.
&quot;placeIds&quot;: [ # Required. A list of place IDs to have their inventory deleted. At most 3000 place IDs are allowed per request.
&quot;A String&quot;,
],
&quot;removeTime&quot;: &quot;A String&quot;, # The time when the inventory deletions are issued. Used to prevent out-of-order updates and deletions on local inventory fields. If not provided, the internal system time will be used.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>
<div class="method">
<code class="details" id="setInventory">setInventory(name, body=None, x__xgafv=None)</code>
<pre>Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by GetProduct or ListProducts. When inventory is updated with CreateProduct and UpdateProduct, the specified inventory field value(s) will overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update time for the specified inventory fields will be overwritten to the time of the CreateProduct or UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product will be used. If no inventory fields are set in UpdateProductRequest.set_mask, then any existing inventory information will be preserved. Pre-existing inventory information can only be updated with SetInventory, AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact cloud sales if you are interested in using Retail Search.
Args:
name: string, Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for SetInventory method.
&quot;allowMissing&quot;: True or False, # If set to true, and the Product with name Product.name is not found, the inventory update will still be processed and retained for at most 1 day until the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.
&quot;inventory&quot;: { # Product captures all metadata information of items to be recommended or searched. # Required. The inventory information to update. The allowable fields to update are: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info The updated inventory fields must be specified in SetInventoryRequest.set_mask. If SetInventoryRequest.inventory.name is empty or invalid, an INVALID_ARGUMENT error is returned. If the caller does not have permission to update the Product named in Product.name, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to update does not have existing inventory information, the provided inventory information will be inserted. If the Product to update has existing inventory information, the provided inventory information will be merged while respecting the last update time for each inventory field, using the provided or default value for SetInventoryRequest.set_time. The last update time is recorded for the following inventory fields: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info If a full overwrite of inventory information while ignoring timestamps is needed, UpdateProduct should be invoked instead.
&quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
&quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
&quot;A String&quot;,
],
&quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
&quot;A String&quot;,
],
},
&quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
&quot;availableQuantity&quot;: 42, # The available quantity of the item.
&quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search.
&quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
&quot;A String&quot;,
],
&quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, please replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
&quot;A String&quot;,
],
&quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
&quot;A String&quot;,
],
&quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
&quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 25 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
&quot;A String&quot;,
],
},
&quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 5 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
&quot;A String&quot;,
],
&quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
&quot;expireTime&quot;: &quot;A String&quot;, # The timestamp when this product becomes unavailable for SearchService.Search. If it is set, the Product is not available for SearchService.Search after expire_time. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
&quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
{ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
&quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
&quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
},
],
&quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
&quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
&quot;images&quot;: [ # Product images for the product.Highly recommended to put the main image to the first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
{ # Product thumbnail/detail image.
&quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
&quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
},
],
&quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
&quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
&quot;A String&quot;,
],
&quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
&quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
&quot;A String&quot;,
],
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
&quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
&quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product.
{ # Promotion information.
&quot;promotionId&quot;: &quot;A String&quot;, # ID of the promotion. For example, &quot;free gift&quot;. The value value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion](https://support.google.com/merchants/answer/7050148).
},
],
&quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
&quot;rating&quot;: { # The rating of a Product. # The rating of this product.
&quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
42,
],
},
&quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse may increase response payload size and serving latency.
&quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
&quot;A String&quot;,
],
&quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
&quot;A String&quot;,
],
&quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
&quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
&quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
&quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
&quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
# Object with schema name: GoogleCloudRetailV2alphaProduct
],
},
&quot;setMask&quot;: &quot;A String&quot;, # Indicates which inventory fields in the provided Product to update. At least one field must be provided. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.
&quot;setTime&quot;: &quot;A String&quot;, # The time when the request is issued, used to prevent out-of-order updates on inventory fields with the last update time recorded. If not provided, the internal system time will be used.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>
<div class="method">
<code class="details" id="setLocalInventories">setLocalInventories(product, body=None, x__xgafv=None)</code>
<pre>Set local inventory information for a Product with the provided list of places at a set timestamp. If a place in the provided list does not exist, the place will be created. If a place in the provided list already exists, it will be updated while respecting the last update timestamps of each inventory field. If an existing place is not in the provided list, it will be removed. This process is asynchronous. If the request is valid, the set operation will be enqueued and processed downstream. As a consequence, when a response is returned, set operations are not immediately manifested in the Product queried by GetProduct or ListProducts. When applying the set operation, this process takes a snapshot of currently existing places and their corresponding timestamps to determine the places to update. Avoid concurrent AddLocalInventories and RemoveLocalInventories calls, since they can introduce asynchronous updates that could be missed by the set operation. Local inventory information can only be updated with this method and other local inventory-specific methods. CreateProduct and UpdateProduct has no effect on local inventories. This feature is only available for users who have Retail Search enabled. Please submit a form [here](https://cloud.google.com/contact) to contact Cloud sales if you are interested in using Retail Search.
Args:
product: string, Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for SetLocalInventories method.
&quot;allowMissing&quot;: True or False, # If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.
&quot;localInventories&quot;: [ # A list of inventory information at difference places. Each place is identified by its place ID. For example, if `place1` and `place2` are stored, and this list is `[place1, place3]` with a fresher set timestamp, then the stored places will become `place1` and `place3`. An empty list removes all existing places with staler fields. At most 3000 inventories are allowed per request.
{ # The inventory information at a place (e.g. a store) identified by a place ID.
&quot;attributes&quot;: { # Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * The max number of values per attribute is 10. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.
&quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
&quot;indexable&quot;: True or False, # If true, custom attribute values are indexed, so that it can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
&quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
3.14,
],
&quot;searchable&quot;: True or False, # If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
&quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
&quot;A String&quot;,
],
},
},
&quot;placeId&quot;: &quot;A String&quot;, # The place ID for the current set of inventory information.
&quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
&quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
&quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
&quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price.
&quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
&quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
&quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
&quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
&quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
&quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
&quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
&quot;maximum&quot;: 3.14, # Inclusive upper bound.
&quot;minimum&quot;: 3.14, # Inclusive lower bound.
},
},
},
},
],
&quot;setTime&quot;: &quot;A String&quot;, # The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>
</body></html>