Skip to content

Commit 02dcec3

Browse files
Google APIscopybara-github
authored andcommitted
feat: support async write mode for WriteUserEvent API
feat: support collect and import GA4 event format with prebuilt whistle rule feat: support exact searchable and retrievable in catalog attribute config feat: deprecate retrievable_fields in product attribute feat: support diversity type in serving config feat: allow set feed id in merchant center link feat: support data output to GCS docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 495893148
1 parent 1945f7c commit 02dcec3

13 files changed

Lines changed: 156 additions & 41 deletions

google/cloud/retail/v2beta/catalog.proto

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ message CatalogAttribute {
104104

105105
// The status of the indexable option of a catalog attribute.
106106
enum IndexableOption {
107-
// Value used when unset. Defaults to
108-
// [INDEXABLE_ENABLED][google.cloud.retail.v2beta.CatalogAttribute.IndexableOption.INDEXABLE_ENABLED].
107+
// Value used when unset.
109108
INDEXABLE_OPTION_UNSPECIFIED = 0;
110109

111110
// Indexable option enabled for an attribute.
@@ -117,8 +116,7 @@ message CatalogAttribute {
117116

118117
// The status of the dynamic facetable option of a catalog attribute.
119118
enum DynamicFacetableOption {
120-
// Value used when unset. Defaults to
121-
// [DYNAMIC_FACETABLE_ENABLED][google.cloud.retail.v2beta.CatalogAttribute.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED].
119+
// Value used when unset.
122120
DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0;
123121

124122
// Dynamic facetable option enabled for an attribute.
@@ -130,8 +128,7 @@ message CatalogAttribute {
130128

131129
// The status of the searchable option of a catalog attribute.
132130
enum SearchableOption {
133-
// Value used when unset. Defaults to
134-
// [SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.SearchableOption.SEARCHABLE_DISABLED].
131+
// Value used when unset.
135132
SEARCHABLE_OPTION_UNSPECIFIED = 0;
136133

137134
// Searchable option enabled for an attribute.
@@ -154,6 +151,19 @@ message CatalogAttribute {
154151
EXACT_SEARCHABLE_DISABLED = 2;
155152
}
156153

154+
// The status of the retrievable option of a catalog attribute.
155+
enum RetrievableOption {
156+
// Value used when unset. Defaults to
157+
// [RETRIEVABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED].
158+
RETRIEVABLE_OPTION_UNSPECIFIED = 0;
159+
160+
// Retrievable option enabled for an attribute.
161+
RETRIEVABLE_ENABLED = 1;
162+
163+
// Retrievable option disabled for an attribute.
164+
RETRIEVABLE_DISABLED = 2;
165+
}
166+
157167
// Required. Attribute name.
158168
// For example: `color`, `brands`, `attributes.custom_attribute`, such as
159169
// `attributes.xyz`.
@@ -177,13 +187,13 @@ message CatalogAttribute {
177187
// APIs. This field is `False` for pre-loaded
178188
// [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s.
179189
//
180-
// Only pre-loaded
181-
// [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are
182-
// neither in use by products nor predefined can be deleted.
183-
// [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that are
184-
// either in use by products or are predefined cannot be deleted; however,
185-
// their configuration properties will reset to default values upon removal
186-
// request.
190+
// Only pre-loaded [catalog
191+
// attributes][google.cloud.retail.v2beta.CatalogAttribute] that are neither
192+
// in use by products nor predefined can be deleted. [Catalog
193+
// attributes][google.cloud.retail.v2beta.CatalogAttribute] that are
194+
// either in use by products or are predefined attributes cannot be deleted;
195+
// however, their configuration properties will reset to default values upon
196+
// removal request.
187197
//
188198
// After catalog changes, it takes about 10 minutes for this field to update.
189199
bool in_use = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -197,12 +207,16 @@ message CatalogAttribute {
197207
// is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
198208
// are indexed so that it can be filtered, faceted, or boosted in
199209
// [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
210+
//
211+
// Must be specified, otherwise throws INVALID_FORMAT error.
200212
IndexableOption indexable_option = 5;
201213

202214
// If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic
203215
// facet. Could only be DYNAMIC_FACETABLE_DISABLED if
204216
// [CatalogAttribute.indexable_option][google.cloud.retail.v2beta.CatalogAttribute.indexable_option]
205217
// is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
218+
//
219+
// Must be specified, otherwise throws INVALID_FORMAT error.
206220
DynamicFacetableOption dynamic_facetable_option = 6;
207221

208222
// When
@@ -215,6 +229,8 @@ message CatalogAttribute {
215229
// will not be searchable by text queries in
216230
// [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], as
217231
// there are no text values associated to numerical attributes.
232+
//
233+
// Must be specified, otherwise throws INVALID_FORMAT error.
218234
SearchableOption searchable_option = 7;
219235

220236
// When
@@ -229,6 +245,10 @@ message CatalogAttribute {
229245
// This property only applies to textual custom attributes and requires
230246
// indexable set to enabled to enable exact-searchable.
231247
ExactSearchableOption exact_searchable_option = 11;
248+
249+
// If RETRIEVABLE_ENABLED, attribute values are retrievable in the search
250+
// results.
251+
RetrievableOption retrievable_option = 12;
232252
}
233253

234254
// Catalog level attribute config.
@@ -353,16 +373,16 @@ message CompletionConfig {
353373
// will be streamed to the linked branch.
354374
message MerchantCenterLink {
355375
// Required. The linked [Merchant center account
356-
// id](https://developers.google.com/shopping-content/guides/accountstatuses).
376+
// ID](https://developers.google.com/shopping-content/guides/accountstatuses).
357377
// The account must be a standalone account or a sub-account of a MCA.
358378
int64 merchant_center_account_id = 1 [(google.api.field_behavior) = REQUIRED];
359379

360-
// The branch id (e.g. 0/1/2) within this catalog that products from
380+
// The branch ID (e.g. 0/1/2) within this catalog that products from
361381
// merchant_center_account_id are streamed to. When updating this field, an
362382
// empty value will use the currently configured default branch. However,
363383
// changing the default branch later on won't change the linked branch here.
364384
//
365-
// A single branch id can only have one linked merchant center account id.
385+
// A single branch ID can only have one linked merchant center account ID.
366386
string branch_id = 2;
367387

368388
// String representing the destination to import for, all if left empty.
@@ -392,6 +412,21 @@ message MerchantCenterLink {
392412
//
393413
// Example value: `en`.
394414
string language_code = 5;
415+
416+
// Criteria for the Merchant Center feeds to be ingested via the link.
417+
// All offers will be ingested if the list is empty.
418+
// Otherwise the offers will be ingested from selected feeds.
419+
repeated MerchantCenterFeedFilter feeds = 6;
420+
}
421+
422+
// Merchant Center Feed filter criterion.
423+
message MerchantCenterFeedFilter {
424+
// Merchant Center primary feed ID.
425+
int64 primary_feed_id = 1;
426+
427+
// Merchant Center primary feed name. The name is used for the display
428+
// purposes only.
429+
string primary_feed_name = 2;
395430
}
396431

397432
// Configures Merchant Center linking.

google/cloud/retail/v2beta/catalog_service.proto

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,13 +483,18 @@ message BatchRemoveCatalogAttributesRequest {
483483
// Response of the
484484
// [CatalogService.BatchRemoveCatalogAttributes][google.cloud.retail.v2beta.CatalogService.BatchRemoveCatalogAttributes].
485485
message BatchRemoveCatalogAttributesResponse {
486-
// Catalog attributes that were deleted. Only attributes that are not [in
487-
// use][CatalogAttribute.in_use] by products can be deleted.
486+
// Catalog attributes that were deleted. Only pre-loaded [catalog
487+
// attributes][google.cloud.retail.v2beta.CatalogAttribute] that are
488+
// neither [in
489+
// use][google.cloud.retail.v2beta.CatalogAttribute.in_use] by
490+
// products nor predefined can be deleted.
488491
repeated string deleted_catalog_attributes = 1;
489492

490-
// Catalog attributes that were reset. Attributes that are [in
491-
// use][CatalogAttribute.in_use] by products cannot be deleted, however their
492-
// configuration properties will reset to default values upon removal request.
493+
// Catalog attributes that were reset. [Catalog
494+
// attributes][google.cloud.retail.v2beta.CatalogAttribute] that are either
495+
// [in use][google.cloud.retail.v2beta.CatalogAttribute.in_use] by products or
496+
// are predefined attributes cannot be deleted; however, their configuration
497+
// properties will reset to default values upon removal request.
493498
repeated string reset_catalog_attributes = 2;
494499
}
495500

google/cloud/retail/v2beta/common.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ message Rule {
218218
}
219219

220220
// Creates a set of terms that will be treated as synonyms of each other.
221-
// Example: synonyms of "sneakers" and "shoes".
221+
// Example: synonyms of "sneakers" and "shoes":
222+
//
222223
// * "sneakers" will use a synonym of "shoes".
223224
// * "shoes" will use a synonym of "sneakers".
224225
message TwowaySynonymsAction {

google/cloud/retail/v2beta/completion_service.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ message CompleteQueryRequest {
110110
// number of language codes is 3.
111111
repeated string language_codes = 3;
112112

113-
// The device type context for completion suggestions.
114-
// It is useful to apply different suggestions on different device types, e.g.
113+
// The device type context for completion suggestions. We recommend that you
114+
// leave this field empty.
115+
//
116+
// It can apply different suggestions on different device types, e.g.
115117
// `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device
116118
// types.
117119
//

google/cloud/retail/v2beta/control.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ message Control {
6868
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
6969

7070
// Output only. List of [serving
71-
// configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
72-
// associated with this control in the same
71+
// config][google.cloud.retail.v2beta.ServingConfig] ids that are associated
72+
// with this control in the same
7373
// [Catalog][google.cloud.retail.v2beta.Catalog].
7474
//
7575
// Note the association is managed via the

google/cloud/retail/v2beta/export_config.proto

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,14 @@ message ExportUserEventsResponse {
8181
OutputResult output_result = 3;
8282
}
8383

84-
// Output result.
84+
// Output result that stores the information about where the exported data is
85+
// stored.
8586
message OutputResult {
86-
// Export result in BigQuery.
87+
// The BigQuery location where the result is stored.
8788
repeated BigQueryOutputResult bigquery_result = 1;
89+
90+
// The Google Cloud Storage location where the result is stored.
91+
repeated GcsOutputResult gcs_result = 2;
8892
}
8993

9094
// A BigQuery output result.
@@ -95,3 +99,9 @@ message BigQueryOutputResult {
9599
// The ID of a BigQuery Table.
96100
string table_id = 2;
97101
}
102+
103+
// A Gcs output result.
104+
message GcsOutputResult {
105+
// The uri of Gcs output
106+
string output_uri = 1;
107+
}

google/cloud/retail/v2beta/model.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ message Model {
160160
//
161161
// Currently supported values: `recommended-for-you`, `others-you-may-like`,
162162
// `frequently-bought-together`, `page-optimization`, `similar-items`,
163-
// `buy-it-again`, and `recently-viewed`(readonly value).
163+
// `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value).
164+
//
164165
//
165166
// This field together with
166167
// [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]

google/cloud/retail/v2beta/prediction_service.proto

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ message PredictRequest {
6262
// The ID of the Recommendations AI serving config or placement.
6363
// Before you can request predictions from your model, you must create at
6464
// least one serving config or placement for it. For more information, see
65-
// [Managing serving configurations]
65+
// [Manage serving configs]
6666
// (https://cloud.google.com/retail/docs/manage-configs).
6767
//
6868
// The full list of available serving configs can be seen at
@@ -117,12 +117,11 @@ message PredictRequest {
117117
// * filterOutOfStockItems tag=(-"promotional")
118118
// * filterOutOfStockItems
119119
//
120-
// If your filter blocks all prediction results, the API will return generic
121-
// (unfiltered) popular products. If you only want results strictly matching
122-
// the filters, set `strictFiltering` to True in `PredictRequest.params` to
123-
// receive empty results instead.
124-
// Note that the API will never return items with storageStatus of "EXPIRED"
125-
// or "DELETED" regardless of filter choices.
120+
// If your filter blocks all prediction results, the API will return *no*
121+
// results. If instead you want empty result sets to return generic
122+
// (unfiltered) popular products, set `strictFiltering` to False in
123+
// `PredictRequest.params`. Note that the API will never return items with
124+
// storageStatus of "EXPIRED" or "DELETED" regardless of filter choices.
126125
//
127126
// If `filterSyntaxV2` is set to true under the `params` field, then
128127
// attribute-based expressions are expected instead of the above described
@@ -149,7 +148,7 @@ message PredictRequest {
149148
// * `returnScore`: Boolean. If set to true, the prediction 'score'
150149
// corresponding to each returned product will be set in the
151150
// `results.metadata` field in the prediction response. The given
152-
// 'score' indicates the probability of an product being clicked/purchased
151+
// 'score' indicates the probability of a product being clicked/purchased
153152
// given the user's context and history.
154153
// * `strictFiltering`: Boolean. True by default. If set to false, the service
155154
// will return generic (unfiltered) popular products instead of empty if

google/cloud/retail/v2beta/product.proto

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ message Product {
105105
oneof expiration {
106106
// The timestamp when this product becomes unavailable for
107107
// [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
108+
// Note that this is only applicable to
109+
// [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
110+
// [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
111+
// and ignored for
112+
// [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
113+
// general, we suggest the users to delete the stale products explicitly,
114+
// instead of using this field to determine staleness.
108115
//
109116
// If it is set, the [Product][google.cloud.retail.v2beta.Product] is not
110117
// available for
@@ -125,7 +132,14 @@ message Product {
125132
// [expiration_date](https://support.google.com/merchants/answer/6324499).
126133
google.protobuf.Timestamp expire_time = 16;
127134

128-
// Input only. The TTL (time to live) of the product.
135+
// Input only. The TTL (time to live) of the product. Note that this is only
136+
// applicable to
137+
// [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
138+
// [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION],
139+
// and ignored for
140+
// [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT]. In
141+
// general, we suggest the users to delete the stale products explicitly,
142+
// instead of using this field to determine staleness.
129143
//
130144
// If it is set, it must be a non-negative value, and
131145
// [expire_time][google.cloud.retail.v2beta.Product.expire_time] is set as
@@ -363,6 +377,11 @@ message Product {
363377
// The timestamp when this [Product][google.cloud.retail.v2beta.Product]
364378
// becomes available for
365379
// [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search].
380+
// Note that this is only applicable to
381+
// [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] and
382+
// [Type.COLLECTION][google.cloud.retail.v2beta.Product.Type.COLLECTION], and
383+
// ignored for
384+
// [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT].
366385
google.protobuf.Timestamp available_time = 18;
367386

368387
// The online availability of the
@@ -550,7 +569,9 @@ message Product {
550569
// Note: Returning more fields in
551570
// [SearchResponse][google.cloud.retail.v2beta.SearchResponse] can increase
552571
// response payload size and serving latency.
553-
google.protobuf.FieldMask retrievable_fields = 30;
572+
//
573+
// This field is deprecated. Use the retrievable site-wide control instead.
574+
google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true];
554575

555576
// Output only. Product variants grouped together on primary product which
556577
// share similar product attributes. It's automatically grouped by

google/cloud/retail/v2beta/retail_grpc_service_config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
"DEADLINE_EXCEEDED"
3636
]
3737
}
38+
}, {
39+
"name": [
40+
{ "service": "google.cloud.retail.v2alpha.ModelService" }
41+
],
42+
"timeout": "60s",
43+
"retryPolicy": {
44+
"initialBackoff": "0.100s",
45+
"maxBackoff": "60s",
46+
"backoffMultiplier": 1.3,
47+
"retryableStatusCodes": ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
48+
}
3849
}, {
3950
"name": [
4051
{

0 commit comments

Comments
 (0)