@@ -99,9 +99,8 @@ message CustomAttribute {
9999 // The textual values of this custom attribute. For example, `["yellow",
100100 // "green"]` when the key is "color".
101101 //
102- // At most 400 values are allowed. Empty values are not allowed. Each value
103- // must be a UTF-8 encoded string with a length limit of 256 characters.
104- // Otherwise, an INVALID_ARGUMENT error is returned.
102+ // Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is
103+ // returned.
105104 //
106105 // Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or
107106 // [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set.
@@ -111,15 +110,16 @@ message CustomAttribute {
111110 // The numerical values of this custom attribute. For example, `[2.3, 15.4]`
112111 // when the key is "lengths_cm".
113112 //
114- // At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is
115- // returned.
116- //
117113 // Exactly one of [text][google.cloud.retail.v2.CustomAttribute.text] or
118114 // [numbers][google.cloud.retail.v2.CustomAttribute.numbers] should be set.
119115 // Otherwise, an INVALID_ARGUMENT error is returned.
120116 repeated double numbers = 2 ;
121117
122- // If true, custom attribute values are searchable by text queries in
118+ // This field will only be used when
119+ // [AttributesConfig.attribute_config_level][] of the
120+ // [Catalog][google.cloud.retail.v2.Catalog] is
121+ // 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
122+ // searchable by text queries in
123123 // [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
124124 //
125125 // This field is ignored in a [UserEvent][google.cloud.retail.v2.UserEvent].
@@ -128,8 +128,11 @@ message CustomAttribute {
128128 // set. Otherwise, a INVALID_ARGUMENT error is returned.
129129 optional bool searchable = 3 ;
130130
131- // If true, custom attribute values are indexed, so that it can be filtered,
132- // faceted or boosted in
131+ // This field will only be used when
132+ // [AttributesConfig.attribute_config_level][] of the
133+ // [Catalog][google.cloud.retail.v2.Catalog] is
134+ // 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are
135+ // indexed, so that it can be filtered, faceted or boosted in
133136 // [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
134137 //
135138 // This field is ignored in a [UserEvent][google.cloud.retail.v2.UserEvent].
@@ -178,7 +181,10 @@ message FulfillmentInfo {
178181 repeated string place_ids = 2 ;
179182}
180183
181- // [Product][google.cloud.retail.v2.Product] thumbnail/detail image.
184+ // [Product][google.cloud.retail.v2.Product] image. Recommendations AI and
185+ // Retail Search do not use product images to improve prediction and search
186+ // results. However, product images can be returned in results, and are shown in
187+ // prediction or search previews in the console.
182188message Image {
183189 // Required. URI of the image.
184190 //
@@ -274,7 +280,7 @@ message PriceInfo {
274280 //
275281 // Google Merchant Center property
276282 // [price](https://support.google.com/merchants/answer/6324371). Schema.org
277- // property [Offer.priceSpecification ](https://schema.org/priceSpecification ).
283+ // property [Offer.price ](https://schema.org/price ).
278284 float price = 2 ;
279285
280286 // Price of the product without any discount. If zero, by default set to be
@@ -364,19 +370,24 @@ message UserInfo {
364370 // Highly recommended for logged-in users. Unique identifier for logged-in
365371 // user, such as a user name.
366372 //
373+ // Always use a hashed value for this ID.
374+ //
367375 // The field must be a UTF-8 encoded string with a length limit of 128
368376 // characters. Otherwise, an INVALID_ARGUMENT error is returned.
369377 string user_id = 1 ;
370378
371- // The end user's IP address. Required for getting
372- // [SearchResponse.sponsored_results][google.cloud.retail.v2.SearchResponse.sponsored_results].
373- // This field is used to extract location information for personalization.
379+ // The end user's IP address. This field is used to extract location
380+ // information for personalization.
374381 //
375382 // This field must be either an IPv4 address (e.g. "104.133.9.80") or an IPv6
376383 // address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334"). Otherwise, an
377384 // INVALID_ARGUMENT error is returned.
378385 //
379- // This should not be set when using the JavaScript tag in
386+ // This should not be set when:
387+ //
388+ // * setting
389+ // [SearchRequest.user_info][google.cloud.retail.v2.SearchRequest.user_info].
390+ // * using the JavaScript tag in
380391 // [UserEventService.CollectUserEvent][google.cloud.retail.v2.UserEventService.CollectUserEvent]
381392 // or if
382393 // [direct_user_request][google.cloud.retail.v2.UserInfo.direct_user_request]
@@ -409,16 +420,60 @@ message UserInfo {
409420 bool direct_user_request = 4 ;
410421}
411422
412- // Promotion information.
413- message Promotion {
414- // ID of the promotion. For example, "free gift".
415- //
416- // The value value must be a UTF-8 encoded string with a length limit of 128
417- // characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example,
418- // id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
419- // returned.
423+ // The inventory information at a place (e.g. a store) identified
424+ // by a place ID.
425+ message LocalInventory {
426+ // The place ID for the current set of inventory information.
427+ string place_id = 1 ;
428+
429+ // Product price and cost information.
420430 //
421431 // Google Merchant Center property
422- // [promotion](https://support.google.com/merchants/answer/7050148).
423- string promotion_id = 1 ;
432+ // [price](https://support.google.com/merchants/answer/6324371).
433+ PriceInfo price_info = 2 ;
434+
435+ // Additional local inventory attributes, for example, store name, promotion
436+ // tags, etc.
437+ //
438+ // This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
439+ // error is returned:
440+ //
441+ // * At most 30 attributes are allowed.
442+ // * The key must be a UTF-8 encoded string with a length limit of 32
443+ // characters.
444+ // * The key must match the pattern: `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example,
445+ // key0LikeThis or KEY_1_LIKE_THIS.
446+ // * The attribute values must be of the same type (text or number).
447+ // * Only 1 value is allowed for each attribute.
448+ // * For text values, the length limit is 256 UTF-8 characters.
449+ // * The attribute does not support search. The `searchable` field should be
450+ // unset or set to false.
451+ // * The max summed total bytes of custom attribute keys and values per
452+ // product is 5MiB.
453+ map <string , CustomAttribute > attributes = 3 ;
454+
455+ // Input only. Supported fulfillment types. Valid fulfillment type values
456+ // include commonly used types (such as pickup in store and same day
457+ // delivery), and custom types. Customers have to map custom types to their
458+ // display names before rendering UI.
459+ //
460+ // Supported values:
461+ //
462+ // * "pickup-in-store"
463+ // * "ship-to-store"
464+ // * "same-day-delivery"
465+ // * "next-day-delivery"
466+ // * "custom-type-1"
467+ // * "custom-type-2"
468+ // * "custom-type-3"
469+ // * "custom-type-4"
470+ // * "custom-type-5"
471+ //
472+ // If this field is set to an invalid value other than these, an
473+ // INVALID_ARGUMENT error is returned.
474+ //
475+ // All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is
476+ // returned.
477+ repeated string fulfillment_types = 4
478+ [(google.api.field_behavior ) = INPUT_ONLY ];
424479}
0 commit comments