From 7f31f40209008ad24058579e7112e45fc9d5715e Mon Sep 17 00:00:00 2001 From: Google APIs Date: Fri, 30 Oct 2020 14:22:32 -0700 Subject: [PATCH] fix: Change categories field in Product.proto from a required field to an optional field. fix: remove variant_retrievable_fields and materials fields from the product.proto fix: minor API doc change on removing the '>' sign escaping. PiperOrigin-RevId: 339939234 --- google/cloud/retail/v2/product.proto | 44 +++------------ google/cloud/retail/v2/user_event.proto | 4 +- google/cloud/retail/v2alpha/product.proto | 58 ++++---------------- google/cloud/retail/v2alpha/user_event.proto | 4 +- google/cloud/retail/v2beta/product.proto | 45 ++++----------- google/cloud/retail/v2beta/user_event.proto | 4 +- 6 files changed, 36 insertions(+), 123 deletions(-) diff --git a/google/cloud/retail/v2/product.proto b/google/cloud/retail/v2/product.proto index 90d81d8a..77cc1c2e 100644 --- a/google/cloud/retail/v2/product.proto +++ b/google/cloud/retail/v2/product.proto @@ -110,9 +110,9 @@ message Product { // more](/recommendations-ai/docs/catalog#item-group-id). string primary_product_id = 4; - // Required. Product categories. This field is repeated for supporting one - // product belonging to several parallel categories. Each value is either the - // full path of the category, or the [category + // Product categories. This field is repeated for supporting one product + // belonging to several parallel categories. Each value is either the full + // path of the category, or the [category // // ID](https: // //www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt). @@ -120,8 +120,8 @@ message Product { // quality. // // To represent full path of category, use '>' sign to separate different - // hierarchies. If '>' is part of the category name, you should escape it with - // '\x3E'. + // hierarchies. If '>' is part of the category name, please replace it with + // other character(s). // // For example, if a shoes product belongs to both // ["Shoes & Accessories" -> "Shoes"] and @@ -133,6 +133,9 @@ message Product { // "Sports & Fitness > Athletic Clothing > Shoes" // ] // + // Must be set for [Type.PRIMARY][] [Product][google.cloud.retail.v2.Product] + // otherwise an INVALID_ARGUMENT error is returned. + // // At most 250 values are allowed per // [Product][google.cloud.retail.v2.Product]. Empty values are not allowed. // Each value must be a UTF-8 encoded string with a length limit of 5,000 @@ -143,7 +146,7 @@ message Product { // [google_product_category](https: // //support.google.com/merchants/answer/6324436). // Schema.org property [Product.category] (https://schema.org/category). - repeated string categories = 7 [(google.api.field_behavior) = REQUIRED]; + repeated string categories = 7; // Required. Product title. // @@ -240,33 +243,4 @@ message Product { // [image_link](https://support.google.com/merchants/answer/6324350). // Schema.org property [Product.image](https://schema.org/image). repeated Image images = 23; - - // Indicates which fields in the [variants][] are retrievable in [Search][]. - // If not set or empty, the following fields are returned: - // - // * [name][google.cloud.retail.v2.Product.name] - // * [availability][google.cloud.retail.v2.Product.availability] - // * [color_info][] - // - // Supported fields: - // - // * [name][google.cloud.retail.v2.Product.name] - // * [availability][google.cloud.retail.v2.Product.availability] - // * [color_info][] - // * [gtin][] - // * [price_info][google.cloud.retail.v2.Product.price_info] - // * [sizes][] - // * [materials][] - // * [patterns][] - // * [conditions][] - // * [images][google.cloud.retail.v2.Product.images] - // * [attributes][google.cloud.retail.v2.Product.attributes] - // - // To mark custom attributes as retrievable, include paths of the form - // "attributes.key" where "key" is the key of a custom attribute, as - // specified in [attributes][google.cloud.retail.v2.Product.attributes]. - // - // Maximum number of paths is 10. Otherwise, an INVALID_ARGUMENT error is - // returned. - google.protobuf.FieldMask variant_retrievable_fields = 30; } diff --git a/google/cloud/retail/v2/user_event.proto b/google/cloud/retail/v2/user_event.proto index 3ad74f5b..40883abd 100644 --- a/google/cloud/retail/v2/user_event.proto +++ b/google/cloud/retail/v2/user_event.proto @@ -135,8 +135,8 @@ message UserEvent { // The categories associated with a category page. // // To represent full path of category, use '>' sign to separate different - // hierarchies. If '>' is part of the category name, you should escape it with - // '\x3E'. + // hierarchies. If '>' is part of the category name, please replace it with + // other character(s). // // Category pages include special pages such as sales or promotions. For // instance, a special sale page may have the category hierarchy: diff --git a/google/cloud/retail/v2alpha/product.proto b/google/cloud/retail/v2alpha/product.proto index 55d0004c..49d46cdf 100644 --- a/google/cloud/retail/v2alpha/product.proto +++ b/google/cloud/retail/v2alpha/product.proto @@ -113,9 +113,9 @@ message Product { // more](/recommendations-ai/docs/catalog#item-group-id). string primary_product_id = 4; - // Required. Product categories. This field is repeated for supporting one - // product belonging to several parallel categories. Each value is either the - // full path of the category, or the [category + // Product categories. This field is repeated for supporting one product + // belonging to several parallel categories. Each value is either the full + // path of the category, or the [category // // ID](https: // //www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt). @@ -123,8 +123,8 @@ message Product { // quality. // // To represent full path of category, use '>' sign to separate different - // hierarchies. If '>' is part of the category name, you should escape it with - // '\x3E'. + // hierarchies. If '>' is part of the category name, please replace it with + // other character(s). // // For example, if a shoes product belongs to both // ["Shoes & Accessories" -> "Shoes"] and @@ -136,6 +136,11 @@ message Product { // "Sports & Fitness > Athletic Clothing > Shoes" // ] // + // Must be set for + // [Type.PRIMARY][google.cloud.retail.v2alpha.Product.Type.PRIMARY] + // [Product][google.cloud.retail.v2alpha.Product] otherwise an + // INVALID_ARGUMENT error is returned. + // // At most 250 values are allowed per // [Product][google.cloud.retail.v2alpha.Product]. Empty values are not // allowed. Each value must be a UTF-8 encoded string with a length limit of @@ -146,7 +151,7 @@ message Product { // [google_product_category](https: // //support.google.com/merchants/answer/6324436). // Schema.org property [Product.category] (https://schema.org/category). - repeated string categories = 7 [(google.api.field_behavior) = REQUIRED]; + repeated string categories = 7; // Required. Product title. // @@ -246,45 +251,4 @@ message Product { // [image_link](https://support.google.com/merchants/answer/6324350). // Schema.org property [Product.image](https://schema.org/image). repeated Image images = 23; - - // The material of the product. For example, "leather", "wooden". - // - // 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 - // [material](https://support.google.com/merchants/answer/6324410). Schema.org - // property [Product.material](https://schema.org/material). - repeated string materials = 27; - - // Indicates which fields in the - // [variants][google.cloud.retail.v2alpha.Product.variants] are retrievable in - // [Search][]. If not set or empty, the following fields are returned: - // - // * [name][google.cloud.retail.v2alpha.Product.name] - // * [availability][google.cloud.retail.v2alpha.Product.availability] - // * [color_info][google.cloud.retail.v2alpha.Product.color_info] - // - // Supported fields: - // - // * [name][google.cloud.retail.v2alpha.Product.name] - // * [availability][google.cloud.retail.v2alpha.Product.availability] - // * [color_info][google.cloud.retail.v2alpha.Product.color_info] - // * [gtin][google.cloud.retail.v2alpha.Product.gtin] - // * [price_info][google.cloud.retail.v2alpha.Product.price_info] - // * [sizes][google.cloud.retail.v2alpha.Product.sizes] - // * [materials][google.cloud.retail.v2alpha.Product.materials] - // * [patterns][google.cloud.retail.v2alpha.Product.patterns] - // * [conditions][google.cloud.retail.v2alpha.Product.conditions] - // * [images][google.cloud.retail.v2alpha.Product.images] - // * [attributes][google.cloud.retail.v2alpha.Product.attributes] - // - // To mark custom attributes as retrievable, include paths of the form - // "attributes.key" where "key" is the key of a custom attribute, as - // specified in [attributes][google.cloud.retail.v2alpha.Product.attributes]. - // - // Maximum number of paths is 10. Otherwise, an INVALID_ARGUMENT error is - // returned. - google.protobuf.FieldMask variant_retrievable_fields = 30; } diff --git a/google/cloud/retail/v2alpha/user_event.proto b/google/cloud/retail/v2alpha/user_event.proto index 403bf40a..488d1d05 100644 --- a/google/cloud/retail/v2alpha/user_event.proto +++ b/google/cloud/retail/v2alpha/user_event.proto @@ -135,8 +135,8 @@ message UserEvent { // The categories associated with a category page. // // To represent full path of category, use '>' sign to separate different - // hierarchies. If '>' is part of the category name, you should escape it with - // '\x3E'. + // hierarchies. If '>' is part of the category name, please replace it with + // other character(s). // // Category pages include special pages such as sales or promotions. For // instance, a special sale page may have the category hierarchy: diff --git a/google/cloud/retail/v2beta/product.proto b/google/cloud/retail/v2beta/product.proto index 60705b3b..81945035 100644 --- a/google/cloud/retail/v2beta/product.proto +++ b/google/cloud/retail/v2beta/product.proto @@ -110,9 +110,9 @@ message Product { // more](/recommendations-ai/docs/catalog#item-group-id). string primary_product_id = 4; - // Required. Product categories. This field is repeated for supporting one - // product belonging to several parallel categories. Each value is either the - // full path of the category, or the [category + // Product categories. This field is repeated for supporting one product + // belonging to several parallel categories. Each value is either the full + // path of the category, or the [category // // ID](https: // //www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt). @@ -120,8 +120,8 @@ message Product { // quality. // // To represent full path of category, use '>' sign to separate different - // hierarchies. If '>' is part of the category name, you should escape it with - // '\x3E'. + // hierarchies. If '>' is part of the category name, please replace it with + // other character(s). // // For example, if a shoes product belongs to both // ["Shoes & Accessories" -> "Shoes"] and @@ -133,6 +133,10 @@ message Product { // "Sports & Fitness > Athletic Clothing > Shoes" // ] // + // Must be set for [Type.PRIMARY][] + // [Product][google.cloud.retail.v2beta.Product] otherwise an INVALID_ARGUMENT + // error is returned. + // // At most 250 values are allowed per // [Product][google.cloud.retail.v2beta.Product]. Empty values are not // allowed. Each value must be a UTF-8 encoded string with a length limit of @@ -143,7 +147,7 @@ message Product { // [google_product_category](https: // //support.google.com/merchants/answer/6324436). // Schema.org property [Product.category] (https://schema.org/category). - repeated string categories = 7 [(google.api.field_behavior) = REQUIRED]; + repeated string categories = 7; // Required. Product title. // @@ -241,33 +245,4 @@ message Product { // [image_link](https://support.google.com/merchants/answer/6324350). // Schema.org property [Product.image](https://schema.org/image). repeated Image images = 23; - - // Indicates which fields in the [variants][] are retrievable in [Search][]. - // If not set or empty, the following fields are returned: - // - // * [name][google.cloud.retail.v2beta.Product.name] - // * [availability][google.cloud.retail.v2beta.Product.availability] - // * [color_info][] - // - // Supported fields: - // - // * [name][google.cloud.retail.v2beta.Product.name] - // * [availability][google.cloud.retail.v2beta.Product.availability] - // * [color_info][] - // * [gtin][] - // * [price_info][google.cloud.retail.v2beta.Product.price_info] - // * [sizes][] - // * [materials][] - // * [patterns][] - // * [conditions][] - // * [images][google.cloud.retail.v2beta.Product.images] - // * [attributes][google.cloud.retail.v2beta.Product.attributes] - // - // To mark custom attributes as retrievable, include paths of the form - // "attributes.key" where "key" is the key of a custom attribute, as - // specified in [attributes][google.cloud.retail.v2beta.Product.attributes]. - // - // Maximum number of paths is 10. Otherwise, an INVALID_ARGUMENT error is - // returned. - google.protobuf.FieldMask variant_retrievable_fields = 30; } diff --git a/google/cloud/retail/v2beta/user_event.proto b/google/cloud/retail/v2beta/user_event.proto index 42b6efd7..3f0a6d1f 100644 --- a/google/cloud/retail/v2beta/user_event.proto +++ b/google/cloud/retail/v2beta/user_event.proto @@ -135,8 +135,8 @@ message UserEvent { // The categories associated with a category page. // // To represent full path of category, use '>' sign to separate different - // hierarchies. If '>' is part of the category name, you should escape it with - // '\x3E'. + // hierarchies. If '>' is part of the category name, please replace it with + // other character(s). // // Category pages include special pages such as sales or promotions. For // instance, a special sale page may have the category hierarchy: