Skip to content

Commit e361532

Browse files
gcf-owl-bot[bot]quirogaspearigee
authored
feat: [css] add product rating fields to CSS API v1. This is in (#7611)
* feat: add product rating fields to CSS API v1. This is in preparation for an upcoming feature and the new fields are not yet used. docs: A comment for field `name` in message `.google.shopping.css.v1.AccountLabel` is changed docs: A comment for field `size_types` in message `.google.shopping.css.v1.Attributes` is changed docs: A comment for field `name` in message `.google.shopping.css.v1.CssProductInput` is changed docs: A comment for field `name` in message `.google.shopping.css.v1.GetCssProductRequest` is changed PiperOrigin-RevId: 882470295 Source-Link: googleapis/googleapis@aa3a93a Source-Link: googleapis/googleapis-gen@d60ff5d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXNob3BwaW5nLWNzcy8uT3dsQm90LnlhbWwiLCJoIjoiZDYwZmY1ZDliYzJhYzcwOGVjNTI5OTMxNmIwMTQ4YjJkZTlmZWQyYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Santiago Quiroga <22756465+quirogas@users.noreply.github.com> Co-authored-by: Gabe Pearhill <86282859+pearigee@users.noreply.github.com>
1 parent 6f9f14b commit e361532

13 files changed

Lines changed: 369 additions & 21 deletions

packages/google-shopping-css/protos/google/shopping/css/v1/accounts.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-shopping-css/protos/google/shopping/css/v1/accounts_labels.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -93,9 +93,9 @@ message AccountLabel {
9393
AUTOMATIC = 2;
9494
}
9595

96-
// The resource name of the label.
96+
// Identifier. The resource name of the label.
9797
// Format: accounts/{account}/labels/{label}
98-
string name = 1;
98+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
9999

100100
// Output only. The ID of the label.
101101
int64 label_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

packages/google-shopping-css/protos/google/shopping/css/v1/css_product_common.proto

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -137,7 +137,7 @@ message Attributes {
137137

138138
// The cut of the item. It can be used to represent combined size types for
139139
// apparel items. Maximum two of size types can be provided (see
140-
// [https://support.google.com/merchants/answer/6324497](size type)).
140+
// [size type](https://support.google.com/merchants/answer/6324497).
141141
repeated string size_types = 28;
142142

143143
// Shared identifier for all variants of the same product.
@@ -212,6 +212,31 @@ message Attributes {
212212
// Number of periods (months or years) and amount of payment per period
213213
// for an item with an associated subscription contract.
214214
HeadlineOfferSubscriptionCost headline_offer_subscription_cost = 52;
215+
216+
// Number of reviews of the product. Required if
217+
// [`rating`][google.shopping.css.v1.Attributes.rating] is provided.
218+
// This field is for an upcoming feature and is not yet used.
219+
optional int64 review_count = 54;
220+
221+
// Minimum rating score of the product. Required if
222+
// [`rating`][google.shopping.css.v1.Attributes.rating] is provided.
223+
// This field is for an upcoming feature and is not yet used.
224+
optional int64 min_rating = 55;
225+
226+
// Maximum rating score of the product. Required if
227+
// [`rating`][google.shopping.css.v1.Attributes.rating] is provided.
228+
// This field is for an upcoming feature and is not yet used.
229+
optional int64 max_rating = 56;
230+
231+
// Average rating score of the product. The value must be within the
232+
// range of [`min_rating`, `max_rating`], inclusive. When displayed on the
233+
// product page, this rating is normalized to a scale of [1, 5] with one
234+
// decimal place. If provided,
235+
// [`review_count`][google.shopping.css.v1.Attributes.review_count],
236+
// [`min_rating`][google.shopping.css.v1.Attributes.min_rating], and
237+
// [`max_rating`][google.shopping.css.v1.Attributes.max_rating] are also
238+
// required. This field is for an upcoming feature and is not yet used.
239+
optional double rating = 57;
215240
}
216241

217242
// The certification for the product. Use the this attribute to describe

packages/google-shopping-css/protos/google/shopping/css/v1/css_product_inputs.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -89,13 +89,13 @@ message CssProductInput {
8989
pattern: "accounts/{account}/cssProductInputs/{css_product_input}"
9090
};
9191

92-
// The name of the CSS Product input.
92+
// Identifier. The name of the CSS Product input.
9393
// Format:
9494
// `accounts/{account}/cssProductInputs/{css_product_input}`, where the
9595
// last section `css_product_input` consists of 3 parts:
9696
// contentLanguage~feedLabel~offerId. Example:
9797
// accounts/123/cssProductInputs/de~DE~rawProvidedId123
98-
string name = 1;
98+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
9999

100100
// Output only. The name of the processed CSS Product.
101101
// Format:

packages/google-shopping-css/protos/google/shopping/css/v1/css_products.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -66,6 +66,7 @@ service CssProductsService {
6666
// The request message for the `GetCssProduct` method.
6767
message GetCssProductRequest {
6868
// Required. The name of the CSS product to retrieve.
69+
// Format: `accounts/{account}/cssProducts/{css_product}`
6970
string name = 1 [
7071
(google.api.field_behavior) = REQUIRED,
7172
(google.api.resource_reference) = { type: "css.googleapis.com/CssProduct" }

packages/google-shopping-css/protos/google/shopping/css/v1/quota.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-shopping-css/protos/google/shopping/type/types.proto

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -79,7 +79,6 @@ message CustomAttribute {
7979
//
8080
// Destinations are used in Merchant Center to allow you to control where the
8181
// products from your data feed should be displayed.
82-
//
8382
message Destination {
8483
// Destination values.
8584
enum DestinationEnum {
@@ -105,6 +104,25 @@ message Destination {
105104

106105
// [YouTube Shopping](https://support.google.com/merchants/answer/12362804).
107106
YOUTUBE_SHOPPING = 6;
107+
108+
// Youtube shopping checkout.
109+
YOUTUBE_SHOPPING_CHECKOUT = 7;
110+
111+
// [Youtube Affiliate](https://support.google.com/youtube/answer/13376398).
112+
YOUTUBE_AFFILIATE = 8;
113+
114+
// [Free vehicle
115+
// listings](https://support.google.com/merchants/answer/11189169).
116+
FREE_VEHICLE_LISTINGS = 9;
117+
118+
// [Vehicle ads](https://support.google.com/merchants/answer/11189169).
119+
VEHICLE_ADS = 10;
120+
121+
// [Cloud retail](https://cloud.google.com/solutions/retail).
122+
CLOUD_RETAIL = 11;
123+
124+
// [Local cloud retail](https://cloud.google.com/solutions/retail).
125+
LOCAL_CLOUD_RETAIL = 12;
108126
}
109127
}
110128

@@ -115,7 +133,6 @@ message Destination {
115133
// ads](https://support.google.com/merchants/answer/6149970)) or a subset of
116134
// formats within a destination (for example, [Demand Gen
117135
// ads](https://support.google.com/merchants/answer/13389785)).
118-
//
119136
message ReportingContext {
120137
// Reporting context values.
121138
enum ReportingContextEnum {
@@ -155,6 +172,10 @@ message ReportingContext {
155172
// listings](https://support.google.com/merchants/answer/9199328).
156173
FREE_LISTINGS = 7;
157174

175+
// [Free product listings on UCP
176+
// checkout](https://developers.google.com/merchant/ucp).
177+
FREE_LISTINGS_UCP_CHECKOUT = 19;
178+
158179
// [Free local product
159180
// listings](https://support.google.com/merchants/answer/9825611).
160181
FREE_LOCAL_LISTINGS = 8;
@@ -163,6 +184,9 @@ message ReportingContext {
163184
// listings](https://support.google.com/merchants/answer/11544533).
164185
FREE_LOCAL_VEHICLE_LISTINGS = 9;
165186

187+
// [Youtube Affiliate](https://support.google.com/youtube/answer/13376398).
188+
YOUTUBE_AFFILIATE = 18;
189+
166190
// [YouTube
167191
// Shopping](https://support.google.com/merchants/answer/13478370).
168192
YOUTUBE_SHOPPING = 10;
@@ -172,6 +196,18 @@ message ReportingContext {
172196

173197
// [Local cloud retail](https://cloud.google.com/solutions/retail).
174198
LOCAL_CLOUD_RETAIL = 12;
199+
200+
// [Product
201+
// Reviews](https://support.google.com/merchants/answer/14620732).
202+
PRODUCT_REVIEWS = 15;
203+
204+
// [Merchant
205+
// Reviews](https://developers.google.com/merchant-review-feeds).
206+
MERCHANT_REVIEWS = 16;
207+
208+
// YouTube Checkout
209+
// .
210+
YOUTUBE_CHECKOUT = 17;
175211
}
176212
}
177213

packages/google-shopping-css/protos/protos.d.ts

Lines changed: 37 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)