diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog.proto index 0e1b85f6af0..156e061ec94 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog.proto @@ -104,8 +104,7 @@ message CatalogAttribute { // The status of the indexable option of a catalog attribute. enum IndexableOption { - // Value used when unset. Defaults to - // [INDEXABLE_ENABLED][google.cloud.retail.v2.CatalogAttribute.IndexableOption.INDEXABLE_ENABLED]. + // Value used when unset. INDEXABLE_OPTION_UNSPECIFIED = 0; // Indexable option enabled for an attribute. @@ -117,8 +116,7 @@ message CatalogAttribute { // The status of the dynamic facetable option of a catalog attribute. enum DynamicFacetableOption { - // Value used when unset. Defaults to - // [DYNAMIC_FACETABLE_ENABLED][google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED]. + // Value used when unset. DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0; // Dynamic facetable option enabled for an attribute. @@ -130,8 +128,7 @@ message CatalogAttribute { // The status of the searchable option of a catalog attribute. enum SearchableOption { - // Value used when unset. Defaults to - // [SEARCHABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.SearchableOption.SEARCHABLE_DISABLED]. + // Value used when unset. SEARCHABLE_OPTION_UNSPECIFIED = 0; // Searchable option enabled for an attribute. @@ -141,6 +138,32 @@ message CatalogAttribute { SEARCHABLE_DISABLED = 2; } + // The status of the exact-searchable option of a catalog attribute. + enum ExactSearchableOption { + // Value used when unset. Defaults to + // [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED]. + EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0; + + // Exact searchable option enabled for an attribute. + EXACT_SEARCHABLE_ENABLED = 1; + + // Exact searchable option disabled for an attribute. + EXACT_SEARCHABLE_DISABLED = 2; + } + + // The status of the retrievable option of a catalog attribute. + enum RetrievableOption { + // Value used when unset. Defaults to + // [RETRIEVABLE_DISABLED][google.cloud.retail.v2.CatalogAttribute.RetrievableOption.RETRIEVABLE_DISABLED]. + RETRIEVABLE_OPTION_UNSPECIFIED = 0; + + // Retrievable option enabled for an attribute. + RETRIEVABLE_ENABLED = 1; + + // Retrievable option disabled for an attribute. + RETRIEVABLE_DISABLED = 2; + } + // Required. Attribute name. // For example: `color`, `brands`, `attributes.custom_attribute`, such as // `attributes.xyz`. @@ -164,13 +187,13 @@ message CatalogAttribute { // APIs. This field is `False` for pre-loaded // [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s. // - // Only pre-loaded - // [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are - // neither in use by products nor predefined can be deleted. - // [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are - // either in use by products or are predefined cannot be deleted; however, - // their configuration properties will reset to default values upon removal - // request. + // Only pre-loaded [catalog + // attributes][google.cloud.retail.v2.CatalogAttribute] that are neither in + // use by products nor predefined can be deleted. [Catalog + // attributes][google.cloud.retail.v2.CatalogAttribute] that are + // either in use by products or are predefined attributes cannot be deleted; + // however, their configuration properties will reset to default values upon + // removal request. // // After catalog changes, it takes about 10 minutes for this field to update. bool in_use = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -184,12 +207,16 @@ message CatalogAttribute { // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values // are indexed so that it can be filtered, faceted, or boosted in // [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. + // + // Must be specified, otherwise throws INVALID_FORMAT error. IndexableOption indexable_option = 5; // If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic // facet. Could only be DYNAMIC_FACETABLE_DISABLED if // [CatalogAttribute.indexable_option][google.cloud.retail.v2.CatalogAttribute.indexable_option] // is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. + // + // Must be specified, otherwise throws INVALID_FORMAT error. DynamicFacetableOption dynamic_facetable_option = 6; // When @@ -202,7 +229,18 @@ message CatalogAttribute { // will not be searchable by text queries in // [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as // there are no text values associated to numerical attributes. + // + // Must be specified, otherwise throws INVALID_FORMAT error. SearchableOption searchable_option = 7; + + // If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. + // This property only applies to textual custom attributes and requires + // indexable set to enabled to enable exact-searchable. + ExactSearchableOption exact_searchable_option = 11; + + // If RETRIEVABLE_ENABLED, attribute values are retrievable in the search + // results. + RetrievableOption retrievable_option = 12; } // Catalog level attribute config. diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog_service.proto index 4d667d1f9e3..da6f5a2b8d8 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/catalog_service.proto @@ -339,7 +339,7 @@ message GetDefaultBranchResponse { // method. message GetCompletionConfigRequest { // Required. Full CompletionConfig resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/common.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/common.proto index 9864ee7d64f..5db569dd8ab 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/common.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/common.proto @@ -83,8 +83,8 @@ message Condition { // Value cannot be empty. // Value can have at most 3 terms if specified as a partial match. Each // space separated string is considered as one term. - // Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - // allowed for partial match. + // For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + // and not allowed for a partial match. string value = 1; // Whether this is supposed to be a full or partial match. @@ -113,6 +113,7 @@ message Condition { } // A rule is a condition-action pair +// // * A condition defines when a rule is to be triggered. // * An action specifies what occurs on that trigger. // Currently rules only work for [controls][google.cloud.retail.v2.Control] with @@ -201,7 +202,8 @@ message Rule { } // Creates a set of terms that will be treated as synonyms of each other. - // Example: synonyms of "sneakers" and "shoes". + // Example: synonyms of "sneakers" and "shoes": + // // * "sneakers" will use a synonym of "shoes". // * "shoes" will use a synonym of "sneakers". message TwowaySynonymsAction { diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/completion_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/completion_service.proto index af0fac87e79..86493f8a2a6 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/completion_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/completion_service.proto @@ -36,7 +36,7 @@ option ruby_package = "Google::Cloud::Retail::V2"; // Auto-completion service for retail. // // This feature is only available for users who have Retail Search enabled. -// Please enable Retail Search on Cloud Console before using this feature. +// Enable Retail Search on Cloud Console before using this feature. service CompletionService { option (google.api.default_host) = "retail.googleapis.com"; option (google.api.oauth_scopes) = @@ -45,7 +45,7 @@ service CompletionService { // Completes the specified prefix with keyword suggestions. // // This feature is only available for users who have Retail Search enabled. - // Please enable Retail Search on Cloud Console before using this feature. + // Enable Retail Search on Cloud Console before using this feature. rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { option (google.api.http) = { get: "/v2/{catalog=projects/*/locations/*/catalogs/*}:completeQuery" @@ -60,7 +60,7 @@ service CompletionService { // are indexed successfully and ready for serving. The process takes hours. // // This feature is only available for users who have Retail Search enabled. - // Please enable Retail Search on Cloud Console before using this feature. + // Enable Retail Search on Cloud Console before using this feature. rpc ImportCompletionData(ImportCompletionDataRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -110,8 +110,10 @@ message CompleteQueryRequest { // number of language codes is 3. repeated string language_codes = 3; - // The device type context for completion suggestions. - // It is useful to apply different suggestions on different device types, e.g. + // The device type context for completion suggestions. We recommend that you + // leave this field empty. + // + // It can apply different suggestions on different device types, e.g. // `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device // types. // diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/control.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/control.proto index 5558e44dd8c..4dc94aa3892 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/control.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/control.proto @@ -60,9 +60,8 @@ message Control { // characters. Otherwise, an INVALID_ARGUMENT error is thrown. string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - // Output only. List of [serving - // configuration][google.cloud.retail.v2.ServingConfig] ids that are - // associated with this control in the same + // Output only. List of [serving config][google.cloud.retail.v2.ServingConfig] + // ids that are associated with this control in the same // [Catalog][google.cloud.retail.v2.Catalog]. // // Note the association is managed via the diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/prediction_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/prediction_service.proto index 717405b2b81..48b46bc812d 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/prediction_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/prediction_service.proto @@ -19,6 +19,7 @@ package google.cloud.retail.v2; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/retail/v2/user_event.proto"; import "google/protobuf/struct.proto"; @@ -61,7 +62,7 @@ message PredictRequest { // The ID of the Recommendations AI serving config or placement. // Before you can request predictions from your model, you must create at // least one serving config or placement for it. For more information, see - // [Managing serving configurations] + // [Manage serving configs] // (https://cloud.google.com/retail/docs/manage-configs). // // The full list of available serving configs can be seen at @@ -116,12 +117,11 @@ message PredictRequest { // * filterOutOfStockItems tag=(-"promotional") // * filterOutOfStockItems // - // If your filter blocks all prediction results, the API will return generic - // (unfiltered) popular products. If you only want results strictly matching - // the filters, set `strictFiltering` to True in `PredictRequest.params` to - // receive empty results instead. - // Note that the API will never return items with storageStatus of "EXPIRED" - // or "DELETED" regardless of filter choices. + // If your filter blocks all prediction results, the API will return *no* + // results. If instead you want empty result sets to return generic + // (unfiltered) popular products, set `strictFiltering` to False in + // `PredictRequest.params`. Note that the API will never return items with + // storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. // // If `filterSyntaxV2` is set to true under the `params` field, then // attribute-based expressions are expected instead of the above described @@ -148,7 +148,7 @@ message PredictRequest { // * `returnScore`: Boolean. If set to true, the prediction 'score' // corresponding to each returned product will be set in the // `results.metadata` field in the prediction response. The given - // 'score' indicates the probability of an product being clicked/purchased + // 'score' indicates the probability of a product being clicked/purchased // given the user's context and history. // * `strictFiltering`: Boolean. True by default. If set to false, the service // will return generic (unfiltered) popular products instead of empty if diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/product.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/product.proto index fe5d212cf07..5d61470d3c2 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/product.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/product.proto @@ -104,7 +104,13 @@ message Product { oneof expiration { // The timestamp when this product becomes unavailable for - // [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. + // [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note + // that this is only applicable to + // [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and + // [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and + // ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. + // In general, we suggest the users to delete the stale products explicitly, + // instead of using this field to determine staleness. // // If it is set, the [Product][google.cloud.retail.v2.Product] is not // available for @@ -124,7 +130,13 @@ message Product { // [expiration_date](https://support.google.com/merchants/answer/6324499). google.protobuf.Timestamp expire_time = 16; - // Input only. The TTL (time to live) of the product. + // Input only. The TTL (time to live) of the product. Note that this is only + // applicable to [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] + // and [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], + // and ignored for + // [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. In general, + // we suggest the users to delete the stale products explicitly, instead of + // using this field to determine staleness. // // If it is set, it must be a non-negative value, and // [expire_time][google.cloud.retail.v2.Product.expire_time] is set as @@ -226,7 +238,7 @@ message Product { // // // To represent full path of category, use '>' sign to separate different - // hierarchies. If '>' is part of the category name, please replace it with + // hierarchies. If '>' is part of the category name, replace it with // other character(s). // // For example, if a shoes product belongs to both @@ -356,7 +368,11 @@ message Product { // The timestamp when this [Product][google.cloud.retail.v2.Product] becomes // available for - // [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. + // [SearchService.Search][google.cloud.retail.v2.SearchService.Search]. Note + // that this is only applicable to + // [Type.PRIMARY][google.cloud.retail.v2.Product.Type.PRIMARY] and + // [Type.COLLECTION][google.cloud.retail.v2.Product.Type.COLLECTION], and + // ignored for [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT]. google.protobuf.Timestamp available_time = 18; // The online availability of the [Product][google.cloud.retail.v2.Product]. @@ -542,7 +558,9 @@ message Product { // Note: Returning more fields in // [SearchResponse][google.cloud.retail.v2.SearchResponse] can increase // response payload size and serving latency. - google.protobuf.FieldMask retrievable_fields = 30; + // + // This field is deprecated. Use the retrievable site-wide control instead. + google.protobuf.FieldMask retrievable_fields = 30 [deprecated = true]; // Output only. Product variants grouped together on primary product which // share similar product attributes. It's automatically grouped by @@ -559,7 +577,11 @@ message Product { // Output only. A list of local inventories specific to different places. // // This is only available for users who have Retail Search enabled, and it can - // be managed by [AddLocalInventories][] and [RemoveLocalInventories][] APIs. + // be managed by + // [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] + // and + // [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] + // APIs. repeated LocalInventory local_inventories = 35 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/product_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/product_service.proto index 5ca2cb32696..be83ad9fd2c 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/product_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/product_service.proto @@ -111,9 +111,9 @@ service ProductService { // // This process is asynchronous and does not require the // [Product][google.cloud.retail.v2.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 + // fulfillment information. If the request is valid, the update is enqueued + // and processed downstream. As a consequence, when a response is returned, + // updates are not immediately manifested in the // [Product][google.cloud.retail.v2.Product] queried by // [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] // or @@ -123,10 +123,10 @@ service ProductService { // [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] // and // [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], - // the specified inventory field value(s) will overwrite any existing value(s) + // the specified inventory field value(s) 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 + // update times for the specified inventory fields are overwritten by the + // times of the // [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] // or // [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] @@ -134,11 +134,11 @@ service ProductService { // // If no inventory fields are set in // [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], - // then any pre-existing inventory information for this product will be used. + // then any pre-existing inventory information for this product is used. // // If no inventory fields are set in // [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], - // then any existing inventory information will be preserved. + // then any existing inventory information is preserved. // // Pre-existing inventory information can only be updated with // [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], @@ -146,15 +146,17 @@ service ProductService { // and // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. // - // The returned [Operation][]s will be obsolete after 1 day, and - // [GetOperation][] API will return NOT_FOUND afterwards. + // The returned [Operation][google.longrunning.Operation]s is obsolete after + // one day, and the [GetOperation][google.longrunning.Operations.GetOperation] + // API returns `NOT_FOUND` afterwards. // - // If conflicting updates are issued, the [Operation][]s associated with the - // stale updates will not be marked as [done][Operation.done] until being - // obsolete. + // If conflicting updates are issued, the + // [Operation][google.longrunning.Operation]s associated with the stale + // updates are not marked as [done][google.longrunning.Operation.done] until + // they are obsolete. // // This feature is only available for users who have Retail Search enabled. - // Please enable Retail Search on Cloud Console before using this feature. + // Enable Retail Search on Cloud Console before using this feature. rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory" @@ -180,15 +182,17 @@ service ProductService { // or // [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. // - // The returned [Operation][]s will be obsolete after 1 day, and - // [GetOperation][] API will return NOT_FOUND afterwards. + // The returned [Operation][google.longrunning.Operation]s will be obsolete + // after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + // API will return NOT_FOUND afterwards. // - // If conflicting updates are issued, the [Operation][]s associated with the - // stale updates will not be marked as [done][Operation.done] until being - // obsolete. + // If conflicting updates are issued, the + // [Operation][google.longrunning.Operation]s associated with the stale + // updates will not be marked as [done][google.longrunning.Operation.done] + // until being obsolete. // // This feature is only available for users who have Retail Search enabled. - // Please enable Retail Search on Cloud Console before using this feature. + // Enable Retail Search on Cloud Console before using this feature. rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -215,15 +219,17 @@ service ProductService { // or // [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. // - // The returned [Operation][]s will be obsolete after 1 day, and - // [GetOperation][] API will return NOT_FOUND afterwards. + // The returned [Operation][google.longrunning.Operation]s will be obsolete + // after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + // API will return NOT_FOUND afterwards. // - // If conflicting updates are issued, the [Operation][]s associated with the - // stale updates will not be marked as [done][Operation.done] until being - // obsolete. + // If conflicting updates are issued, the + // [Operation][google.longrunning.Operation]s associated with the stale + // updates will not be marked as [done][google.longrunning.Operation.done] + // until being obsolete. // // This feature is only available for users who have Retail Search enabled. - // Please enable Retail Search on Cloud Console before using this feature. + // Enable Retail Search on Cloud Console before using this feature. rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -257,15 +263,17 @@ service ProductService { // [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] // has no effect on local inventories. // - // The returned [Operation][]s will be obsolete after 1 day, and - // [GetOperation][] API will return NOT_FOUND afterwards. + // The returned [Operation][google.longrunning.Operation]s will be obsolete + // after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + // API will return NOT_FOUND afterwards. // - // If conflicting updates are issued, the [Operation][]s associated with the - // stale updates will not be marked as [done][Operation.done] until being - // obsolete. + // If conflicting updates are issued, the + // [Operation][google.longrunning.Operation]s associated with the stale + // updates will not be marked as [done][google.longrunning.Operation.done] + // until being obsolete. // // This feature is only available for users who have Retail Search enabled. - // Please enable Retail Search on Cloud Console before using this feature. + // Enable Retail Search on Cloud Console before using this feature. rpc AddLocalInventories(AddLocalInventoriesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -297,15 +305,17 @@ service ProductService { // [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] // has no effect on local inventories. // - // The returned [Operation][]s will be obsolete after 1 day, and - // [GetOperation][] API will return NOT_FOUND afterwards. + // The returned [Operation][google.longrunning.Operation]s will be obsolete + // after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + // API will return NOT_FOUND afterwards. // - // If conflicting updates are issued, the [Operation][]s associated with the - // stale updates will not be marked as [done][Operation.done] until being - // obsolete. + // If conflicting updates are issued, the + // [Operation][google.longrunning.Operation]s associated with the stale + // updates will not be marked as [done][google.longrunning.Operation.done] + // until being obsolete. // // This feature is only available for users who have Retail Search enabled. - // Please enable Retail Search on Cloud Console before using this feature. + // Enable Retail Search on Cloud Console before using this feature. rpc RemoveLocalInventories(RemoveLocalInventoriesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/search_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/search_service.proto index 32de76da6f3..30c3c45a696 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/search_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/search_service.proto @@ -37,7 +37,7 @@ option ruby_package = "Google::Cloud::Retail::V2"; // Service for search. // // This feature is only available for users who have Retail Search enabled. -// Please enable Retail Search on Cloud Console before using this feature. +// Enable Retail Search on Cloud Console before using this feature. service SearchService { option (google.api.default_host) = "retail.googleapis.com"; option (google.api.oauth_scopes) = @@ -46,7 +46,7 @@ service SearchService { // Performs a search. // // This feature is only available for users who have Retail Search enabled. - // Please enable Retail Search on Cloud Console before using this feature. + // Enable Retail Search on Cloud Console before using this feature. rpc Search(SearchRequest) returns (SearchResponse) { option (google.api.http) = { post: "/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search" @@ -216,7 +216,7 @@ message SearchRequest { FacetKey facet_key = 1 [(google.api.field_behavior) = REQUIRED]; // Maximum of facet values that should be returned for this facet. If - // unspecified, defaults to 20. The maximum allowed value is 300. Values + // unspecified, defaults to 50. The maximum allowed value is 300. Values // above 300 will be coerced to 300. // // If this field is negative, an INVALID_ARGUMENT is returned. @@ -436,15 +436,20 @@ message SearchRequest { // The search mode of each search request. enum SearchMode { // Default value. In this case both product search and faceted search will - // be performed. Both [SearchResponse.SearchResult] and - // [SearchResponse.Facet] will be returned. + // be performed. Both + // [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult] + // and [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] + // will be returned. SEARCH_MODE_UNSPECIFIED = 0; // Only product search will be performed. The faceted search will be // disabled. // - // Only [SearchResponse.SearchResult] will be returned. - // [SearchResponse.Facet] will not be returned, even if + // Only + // [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult] + // will be returned. + // [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] will + // not be returned, even if // [SearchRequest.facet_specs][google.cloud.retail.v2.SearchRequest.facet_specs] // or // [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2.SearchRequest.dynamic_facet_spec] @@ -459,7 +464,9 @@ message SearchRequest { // and // [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2.SearchRequest.dynamic_facet_spec] // should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only - // [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult] + // [SearchResponse.Facet][google.cloud.retail.v2.SearchResponse.Facet] will + // be returned. + // [SearchResponse.SearchResult][google.cloud.retail.v2.SearchResponse.SearchResult] // will not be returned. FACETED_SEARCH_ONLY = 2; } @@ -468,7 +475,7 @@ message SearchRequest { // `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` // or the name of the legacy placement resource, such as // `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. - // This field is used to identify the serving configuration name and the set + // This field is used to identify the serving config name and the set // of models that will be used to make the search. string placement = 1 [(google.api.field_behavior) = REQUIRED]; @@ -671,7 +678,7 @@ message SearchRequest { // [UserEvent.page_categories][google.cloud.retail.v2.UserEvent.page_categories]; // // To represent full path of category, use '>' sign to separate different - // hierarchies. If '>' is part of the category name, please replace it with + // hierarchies. If '>' is part of the category name, replace it with // other character(s). // // Category pages include special pages such as sales or promotions. For diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/serving_config.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/serving_config.proto index 45f317d63b8..41e73beffc2 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/serving_config.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/serving_config.proto @@ -38,6 +38,18 @@ message ServingConfig { pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/servingConfigs/{serving_config}" }; + // What type of diversity - data or rule based. + enum DiversityType { + // Default value. + DIVERSITY_TYPE_UNSPECIFIED = 0; + + // Rule based diversity. + RULE_BASED_DIVERSITY = 2; + + // Data driven diversity. + DATA_DRIVEN_DIVERSITY = 3; + } + // Immutable. Fully qualified name // `projects/*/locations/global/catalogs/*/servingConfig/*` string name = 1 [(google.api.field_behavior) = IMMUTABLE]; @@ -67,13 +79,13 @@ message ServingConfig { // click-through and conversion rates. // Allowed values are: // - // * 'no-price-reranking' - // * 'low-price-raranking' - // * 'medium-price-reranking' - // * 'high-price-reranking' + // * `no-price-reranking` + // * `low-price-raranking` + // * `medium-price-reranking` + // * `high-price-reranking` // // If not specified, we choose default based on model type. Default value: - // 'no-price-reranking'. + // `no-price-reranking`. // // Can only be set if // [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is @@ -191,29 +203,34 @@ message ServingConfig { repeated string ignore_control_ids = 15; // How much diversity to use in recommendation model results e.g. - // 'medium-diversity' or 'high-diversity'. Currently supported values: + // `medium-diversity` or `high-diversity`. Currently supported values: // - // * 'no-diversity' - // * 'low-diversity' - // * 'medium-diversity' - // * 'high-diversity' - // * 'auto-diversity' + // * `no-diversity` + // * `low-diversity` + // * `medium-diversity` + // * `high-diversity` + // * `auto-diversity` // // If not specified, we choose default based on recommendation model - // type. Default value: 'no-diversity'. + // type. Default value: `no-diversity`. // // Can only be set if // [solution_types][google.cloud.retail.v2.ServingConfig.solution_types] is // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. string diversity_level = 8; - // Whether to add additional category filters on the 'similar-items' model. + // What kind of diversity to use - data driven or rule based. If unset, + // the server behavior defaults to + // [RULE_BASED_DIVERSITY][google.cloud.retail.v2.ServingConfig.DiversityType.RULE_BASED_DIVERSITY]. + DiversityType diversity_type = 20; + + // Whether to add additional category filters on the `similar-items` model. // If not specified, we enable it by default. // Allowed values are: // - // * 'no-category-match': No additional filtering of original results from + // * `no-category-match`: No additional filtering of original results from // the model and the customer's filters. - // * 'relaxed-category-match': Only keep results with categories that match + // * `relaxed-category-match`: Only keep results with categories that match // at least one item categories in the PredictRequests's context item. // * If customer also sends filters in the PredictRequest, then the results // will satisfy both conditions (user given and category match). diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/serving_config_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/serving_config_service.proto index a4cabe26ba2..b8dbc621d73 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/serving_config_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/serving_config_service.proto @@ -158,7 +158,7 @@ message UpdateServingConfigRequest { // Request for DeleteServingConfig method. message DeleteServingConfigRequest { // Required. The resource name of the ServingConfig to delete. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -170,7 +170,7 @@ message DeleteServingConfigRequest { // Request for GetServingConfig method. message GetServingConfigRequest { // Required. The resource name of the ServingConfig to get. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -182,7 +182,7 @@ message GetServingConfigRequest { // Request for ListServingConfigs method. message ListServingConfigsRequest { // Required. The catalog resource name. Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" } @@ -210,7 +210,7 @@ message ListServingConfigsResponse { // Request for AddControl method. message AddControlRequest { // Required. The source ServingConfig resource name . Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` string serving_config = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -226,7 +226,7 @@ message AddControlRequest { // Request for RemoveControl method. message RemoveControlRequest { // Required. The source ServingConfig resource name . Format: - // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` string serving_config = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/user_event.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/user_event.proto index fc315f88f1a..6093c9a5f31 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/user_event.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/user_event.proto @@ -226,7 +226,7 @@ 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, please replace it with + // hierarchies. If '>' is part of the category name, replace it with // other character(s). // // Category pages include special pages such as sales or promotions. For diff --git a/packages/google-cloud-retail/protos/google/cloud/retail/v2/user_event_service.proto b/packages/google-cloud-retail/protos/google/cloud/retail/v2/user_event_service.proto index 9a917bc6c6c..23049dafe27 100644 --- a/packages/google-cloud-retail/protos/google/cloud/retail/v2/user_event_service.proto +++ b/packages/google-cloud-retail/protos/google/cloud/retail/v2/user_event_service.proto @@ -20,6 +20,7 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/httpbody.proto"; +import "google/api/resource.proto"; import "google/cloud/retail/v2/import_config.proto"; import "google/cloud/retail/v2/purge_config.proto"; import "google/cloud/retail/v2/user_event.proto"; @@ -94,14 +95,14 @@ service UserEventService { }; } - // Starts a user event rejoin operation with latest product catalog. Events - // will not be annotated with detailed product information if product is - // missing from the catalog at the time the user event is ingested, and these - // events are stored as unjoined events with a limited usage on training and - // serving. This method can be used to start a join operation on specified - // events with latest version of product catalog. It can also be used to - // correct events joined with the wrong product catalog. A rejoin operation - // can take hours or days to complete. + // Starts a user-event rejoin operation with latest product catalog. Events + // are not annotated with detailed product information for products that are + // missing from the catalog when the user event is ingested. These + // events are stored as unjoined events with limited usage on training and + // serving. You can use this method to start a join operation on specified + // events with the latest version of product catalog. You can also use this + // method to correct events joined with the wrong product catalog. A rejoin + // operation can take hours or days to complete. rpc RejoinUserEvents(RejoinUserEventsRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -123,10 +124,24 @@ message WriteUserEventRequest { // Required. User event to write. UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED]; + + // If set to true, the user event will be written asynchronously after + // validation, and the API will respond without waiting for the write. + // Therefore, silent failures can occur even if the API returns success. In + // case of silent failures, error messages can be found in Stackdriver logs. + bool write_async = 3; } // Request message for CollectUserEvent method. message CollectUserEventRequest { + // The rule that can convert the raw_json to a user event. It is needed + // only when the raw_json is set. + oneof conversion_rule { + // The prebuilt rule name that can convert a specific type of raw_json. + // For example: "default_schema/v1.0" + string prebuilt_rule = 6; + } + // Required. The parent catalog name, such as // `projects/1234/locations/global/catalogs/default_catalog`. string parent = 1 [(google.api.field_behavior) = REQUIRED]; @@ -145,17 +160,23 @@ message CollectUserEventRequest { // otherwise identical get requests. The name is abbreviated to reduce the // payload bytes. int64 ets = 4; + + // An arbitrary serialized JSON string that contains necessary information + // that can comprise a user event. When this field is specified, the + // user_event field will be ignored. Note: line-delimited JSON is not + // supported, a single JSON only. + string raw_json = 5; } // Request message for RejoinUserEvents method. message RejoinUserEventsRequest { // The scope of user events to be rejoined with the latest product catalog. // If the rejoining aims at reducing number of unjoined events, set - // UserEventRejoinScope to UNJOINED_EVENTS. + // `UserEventRejoinScope` to `UNJOINED_EVENTS`. // If the rejoining aims at correcting product catalog information in joined - // events, set UserEventRejoinScope to JOINED_EVENTS. - // If all events needs to be rejoined, set UserEventRejoinScope to - // USER_EVENT_REJOIN_SCOPE_UNSPECIFIED. + // events, set `UserEventRejoinScope` to `JOINED_EVENTS`. + // If all events needs to be rejoined, set `UserEventRejoinScope` to + // `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED`. enum UserEventRejoinScope { // Rejoin all events with the latest product catalog, including both joined // events and unjoined events. @@ -174,16 +195,16 @@ message RejoinUserEventsRequest { // The type of the user event rejoin to define the scope and range of the user // events to be rejoined with the latest product catalog. Defaults to - // USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an - // invalid integer value. + // `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to + // an invalid integer value. UserEventRejoinScope user_event_rejoin_scope = 2; } -// Response message for RejoinUserEvents method. +// Response message for `RejoinUserEvents` method. message RejoinUserEventsResponse { // Number of user events that were joined with latest product catalog. int64 rejoined_user_events_count = 1; } -// Metadata for RejoinUserEvents method. +// Metadata for `RejoinUserEvents` method. message RejoinUserEventsMetadata {} diff --git a/packages/google-cloud-retail/protos/protos.d.ts b/packages/google-cloud-retail/protos/protos.d.ts index 6a5825b9f4b..bcdbe3e5c94 100644 --- a/packages/google-cloud-retail/protos/protos.d.ts +++ b/packages/google-cloud-retail/protos/protos.d.ts @@ -149,6 +149,12 @@ export namespace google { /** CatalogAttribute searchableOption */ searchableOption?: (google.cloud.retail.v2.CatalogAttribute.SearchableOption|keyof typeof google.cloud.retail.v2.CatalogAttribute.SearchableOption|null); + + /** CatalogAttribute exactSearchableOption */ + exactSearchableOption?: (google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption|keyof typeof google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption|null); + + /** CatalogAttribute retrievableOption */ + retrievableOption?: (google.cloud.retail.v2.CatalogAttribute.RetrievableOption|keyof typeof google.cloud.retail.v2.CatalogAttribute.RetrievableOption|null); } /** Represents a CatalogAttribute. */ @@ -178,6 +184,12 @@ export namespace google { /** CatalogAttribute searchableOption. */ public searchableOption: (google.cloud.retail.v2.CatalogAttribute.SearchableOption|keyof typeof google.cloud.retail.v2.CatalogAttribute.SearchableOption); + /** CatalogAttribute exactSearchableOption. */ + public exactSearchableOption: (google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption|keyof typeof google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption); + + /** CatalogAttribute retrievableOption. */ + public retrievableOption: (google.cloud.retail.v2.CatalogAttribute.RetrievableOption|keyof typeof google.cloud.retail.v2.CatalogAttribute.RetrievableOption); + /** * Creates a new CatalogAttribute instance using the specified properties. * @param [properties] Properties to set @@ -285,6 +297,20 @@ export namespace google { SEARCHABLE_ENABLED = 1, SEARCHABLE_DISABLED = 2 } + + /** ExactSearchableOption enum. */ + enum ExactSearchableOption { + EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0, + EXACT_SEARCHABLE_ENABLED = 1, + EXACT_SEARCHABLE_DISABLED = 2 + } + + /** RetrievableOption enum. */ + enum RetrievableOption { + RETRIEVABLE_OPTION_UNSPECIFIED = 0, + RETRIEVABLE_ENABLED = 1, + RETRIEVABLE_DISABLED = 2 + } } /** Properties of an AttributesConfig. */ @@ -13860,6 +13886,9 @@ export namespace google { /** ServingConfig diversityLevel */ diversityLevel?: (string|null); + /** ServingConfig diversityType */ + diversityType?: (google.cloud.retail.v2.ServingConfig.DiversityType|keyof typeof google.cloud.retail.v2.ServingConfig.DiversityType|null); + /** ServingConfig enableCategoryFilterLevel */ enableCategoryFilterLevel?: (string|null); @@ -13924,6 +13953,9 @@ export namespace google { /** ServingConfig diversityLevel. */ public diversityLevel: string; + /** ServingConfig diversityType. */ + public diversityType: (google.cloud.retail.v2.ServingConfig.DiversityType|keyof typeof google.cloud.retail.v2.ServingConfig.DiversityType); + /** ServingConfig enableCategoryFilterLevel. */ public enableCategoryFilterLevel: string; @@ -14011,6 +14043,16 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace ServingConfig { + + /** DiversityType enum. */ + enum DiversityType { + DIVERSITY_TYPE_UNSPECIFIED = 0, + RULE_BASED_DIVERSITY = 2, + DATA_DRIVEN_DIVERSITY = 3 + } + } + /** Represents a ServingConfigService */ class ServingConfigService extends $protobuf.rpc.Service { @@ -15143,6 +15185,9 @@ export namespace google { /** WriteUserEventRequest userEvent */ userEvent?: (google.cloud.retail.v2.IUserEvent|null); + + /** WriteUserEventRequest writeAsync */ + writeAsync?: (boolean|null); } /** Represents a WriteUserEventRequest. */ @@ -15160,6 +15205,9 @@ export namespace google { /** WriteUserEventRequest userEvent. */ public userEvent?: (google.cloud.retail.v2.IUserEvent|null); + /** WriteUserEventRequest writeAsync. */ + public writeAsync: boolean; + /** * Creates a new WriteUserEventRequest instance using the specified properties. * @param [properties] Properties to set @@ -15241,6 +15289,9 @@ export namespace google { /** Properties of a CollectUserEventRequest. */ interface ICollectUserEventRequest { + /** CollectUserEventRequest prebuiltRule */ + prebuiltRule?: (string|null); + /** CollectUserEventRequest parent */ parent?: (string|null); @@ -15252,6 +15303,9 @@ export namespace google { /** CollectUserEventRequest ets */ ets?: (number|Long|string|null); + + /** CollectUserEventRequest rawJson */ + rawJson?: (string|null); } /** Represents a CollectUserEventRequest. */ @@ -15263,6 +15317,9 @@ export namespace google { */ constructor(properties?: google.cloud.retail.v2.ICollectUserEventRequest); + /** CollectUserEventRequest prebuiltRule. */ + public prebuiltRule?: (string|null); + /** CollectUserEventRequest parent. */ public parent: string; @@ -15275,6 +15332,12 @@ export namespace google { /** CollectUserEventRequest ets. */ public ets: (number|Long|string); + /** CollectUserEventRequest rawJson. */ + public rawJson: string; + + /** CollectUserEventRequest conversionRule. */ + public conversionRule?: "prebuiltRule"; + /** * Creates a new CollectUserEventRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-retail/protos/protos.js b/packages/google-cloud-retail/protos/protos.js index a71cd30c3a5..e0932c02284 100644 --- a/packages/google-cloud-retail/protos/protos.js +++ b/packages/google-cloud-retail/protos/protos.js @@ -305,6 +305,8 @@ * @property {google.cloud.retail.v2.CatalogAttribute.IndexableOption|null} [indexableOption] CatalogAttribute indexableOption * @property {google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption|null} [dynamicFacetableOption] CatalogAttribute dynamicFacetableOption * @property {google.cloud.retail.v2.CatalogAttribute.SearchableOption|null} [searchableOption] CatalogAttribute searchableOption + * @property {google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption|null} [exactSearchableOption] CatalogAttribute exactSearchableOption + * @property {google.cloud.retail.v2.CatalogAttribute.RetrievableOption|null} [retrievableOption] CatalogAttribute retrievableOption */ /** @@ -370,6 +372,22 @@ */ CatalogAttribute.prototype.searchableOption = 0; + /** + * CatalogAttribute exactSearchableOption. + * @member {google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption} exactSearchableOption + * @memberof google.cloud.retail.v2.CatalogAttribute + * @instance + */ + CatalogAttribute.prototype.exactSearchableOption = 0; + + /** + * CatalogAttribute retrievableOption. + * @member {google.cloud.retail.v2.CatalogAttribute.RetrievableOption} retrievableOption + * @memberof google.cloud.retail.v2.CatalogAttribute + * @instance + */ + CatalogAttribute.prototype.retrievableOption = 0; + /** * Creates a new CatalogAttribute instance using the specified properties. * @function create @@ -406,6 +424,10 @@ writer.uint32(/* id 9, wireType 0 =*/72).bool(message.inUse); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 10, wireType 0 =*/80).int32(message.type); + if (message.exactSearchableOption != null && Object.hasOwnProperty.call(message, "exactSearchableOption")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.exactSearchableOption); + if (message.retrievableOption != null && Object.hasOwnProperty.call(message, "retrievableOption")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.retrievableOption); return writer; }; @@ -464,6 +486,14 @@ message.searchableOption = reader.int32(); break; } + case 11: { + message.exactSearchableOption = reader.int32(); + break; + } + case 12: { + message.retrievableOption = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -541,6 +571,24 @@ case 2: break; } + if (message.exactSearchableOption != null && message.hasOwnProperty("exactSearchableOption")) + switch (message.exactSearchableOption) { + default: + return "exactSearchableOption: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.retrievableOption != null && message.hasOwnProperty("retrievableOption")) + switch (message.retrievableOption) { + default: + return "retrievableOption: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -640,6 +688,46 @@ message.searchableOption = 2; break; } + switch (object.exactSearchableOption) { + default: + if (typeof object.exactSearchableOption === "number") { + message.exactSearchableOption = object.exactSearchableOption; + break; + } + break; + case "EXACT_SEARCHABLE_OPTION_UNSPECIFIED": + case 0: + message.exactSearchableOption = 0; + break; + case "EXACT_SEARCHABLE_ENABLED": + case 1: + message.exactSearchableOption = 1; + break; + case "EXACT_SEARCHABLE_DISABLED": + case 2: + message.exactSearchableOption = 2; + break; + } + switch (object.retrievableOption) { + default: + if (typeof object.retrievableOption === "number") { + message.retrievableOption = object.retrievableOption; + break; + } + break; + case "RETRIEVABLE_OPTION_UNSPECIFIED": + case 0: + message.retrievableOption = 0; + break; + case "RETRIEVABLE_ENABLED": + case 1: + message.retrievableOption = 1; + break; + case "RETRIEVABLE_DISABLED": + case 2: + message.retrievableOption = 2; + break; + } return message; }; @@ -663,6 +751,8 @@ object.searchableOption = options.enums === String ? "SEARCHABLE_OPTION_UNSPECIFIED" : 0; object.inUse = false; object.type = options.enums === String ? "UNKNOWN" : 0; + object.exactSearchableOption = options.enums === String ? "EXACT_SEARCHABLE_OPTION_UNSPECIFIED" : 0; + object.retrievableOption = options.enums === String ? "RETRIEVABLE_OPTION_UNSPECIFIED" : 0; } if (message.key != null && message.hasOwnProperty("key")) object.key = message.key; @@ -676,6 +766,10 @@ object.inUse = message.inUse; if (message.type != null && message.hasOwnProperty("type")) object.type = options.enums === String ? $root.google.cloud.retail.v2.CatalogAttribute.AttributeType[message.type] === undefined ? message.type : $root.google.cloud.retail.v2.CatalogAttribute.AttributeType[message.type] : message.type; + if (message.exactSearchableOption != null && message.hasOwnProperty("exactSearchableOption")) + object.exactSearchableOption = options.enums === String ? $root.google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption[message.exactSearchableOption] === undefined ? message.exactSearchableOption : $root.google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption[message.exactSearchableOption] : message.exactSearchableOption; + if (message.retrievableOption != null && message.hasOwnProperty("retrievableOption")) + object.retrievableOption = options.enums === String ? $root.google.cloud.retail.v2.CatalogAttribute.RetrievableOption[message.retrievableOption] === undefined ? message.retrievableOption : $root.google.cloud.retail.v2.CatalogAttribute.RetrievableOption[message.retrievableOption] : message.retrievableOption; return object; }; @@ -769,6 +863,38 @@ return values; })(); + /** + * ExactSearchableOption enum. + * @name google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption + * @enum {number} + * @property {number} EXACT_SEARCHABLE_OPTION_UNSPECIFIED=0 EXACT_SEARCHABLE_OPTION_UNSPECIFIED value + * @property {number} EXACT_SEARCHABLE_ENABLED=1 EXACT_SEARCHABLE_ENABLED value + * @property {number} EXACT_SEARCHABLE_DISABLED=2 EXACT_SEARCHABLE_DISABLED value + */ + CatalogAttribute.ExactSearchableOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXACT_SEARCHABLE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT_SEARCHABLE_ENABLED"] = 1; + values[valuesById[2] = "EXACT_SEARCHABLE_DISABLED"] = 2; + return values; + })(); + + /** + * RetrievableOption enum. + * @name google.cloud.retail.v2.CatalogAttribute.RetrievableOption + * @enum {number} + * @property {number} RETRIEVABLE_OPTION_UNSPECIFIED=0 RETRIEVABLE_OPTION_UNSPECIFIED value + * @property {number} RETRIEVABLE_ENABLED=1 RETRIEVABLE_ENABLED value + * @property {number} RETRIEVABLE_DISABLED=2 RETRIEVABLE_DISABLED value + */ + CatalogAttribute.RetrievableOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETRIEVABLE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "RETRIEVABLE_ENABLED"] = 1; + values[valuesById[2] = "RETRIEVABLE_DISABLED"] = 2; + return values; + })(); + return CatalogAttribute; })(); @@ -34311,6 +34437,7 @@ * @property {Array.|null} [replacementControlIds] ServingConfig replacementControlIds * @property {Array.|null} [ignoreControlIds] ServingConfig ignoreControlIds * @property {string|null} [diversityLevel] ServingConfig diversityLevel + * @property {google.cloud.retail.v2.ServingConfig.DiversityType|null} [diversityType] ServingConfig diversityType * @property {string|null} [enableCategoryFilterLevel] ServingConfig enableCategoryFilterLevel * @property {google.cloud.retail.v2.SearchRequest.IPersonalizationSpec|null} [personalizationSpec] ServingConfig personalizationSpec * @property {Array.|null} [solutionTypes] ServingConfig solutionTypes @@ -34461,6 +34588,14 @@ */ ServingConfig.prototype.diversityLevel = ""; + /** + * ServingConfig diversityType. + * @member {google.cloud.retail.v2.ServingConfig.DiversityType} diversityType + * @memberof google.cloud.retail.v2.ServingConfig + * @instance + */ + ServingConfig.prototype.diversityType = 0; + /** * ServingConfig enableCategoryFilterLevel. * @member {string} enableCategoryFilterLevel @@ -34556,6 +34691,8 @@ writer.int32(message.solutionTypes[i]); writer.ldelim(); } + if (message.diversityType != null && Object.hasOwnProperty.call(message, "diversityType")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.diversityType); if (message.personalizationSpec != null && Object.hasOwnProperty.call(message, "personalizationSpec")) $root.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.encode(message.personalizationSpec, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); return writer; @@ -34670,6 +34807,10 @@ message.diversityLevel = reader.string(); break; } + case 20: { + message.diversityType = reader.int32(); + break; + } case 16: { message.enableCategoryFilterLevel = reader.string(); break; @@ -34807,6 +34948,15 @@ if (message.diversityLevel != null && message.hasOwnProperty("diversityLevel")) if (!$util.isString(message.diversityLevel)) return "diversityLevel: string expected"; + if (message.diversityType != null && message.hasOwnProperty("diversityType")) + switch (message.diversityType) { + default: + return "diversityType: enum value expected"; + case 0: + case 2: + case 3: + break; + } if (message.enableCategoryFilterLevel != null && message.hasOwnProperty("enableCategoryFilterLevel")) if (!$util.isString(message.enableCategoryFilterLevel)) return "enableCategoryFilterLevel: string expected"; @@ -34921,6 +35071,26 @@ } if (object.diversityLevel != null) message.diversityLevel = String(object.diversityLevel); + switch (object.diversityType) { + default: + if (typeof object.diversityType === "number") { + message.diversityType = object.diversityType; + break; + } + break; + case "DIVERSITY_TYPE_UNSPECIFIED": + case 0: + message.diversityType = 0; + break; + case "RULE_BASED_DIVERSITY": + case 2: + message.diversityType = 2; + break; + case "DATA_DRIVEN_DIVERSITY": + case 3: + message.diversityType = 3; + break; + } if (object.enableCategoryFilterLevel != null) message.enableCategoryFilterLevel = String(object.enableCategoryFilterLevel); if (object.personalizationSpec != null) { @@ -34989,6 +35159,7 @@ object.dynamicFacetSpec = null; object.diversityLevel = ""; object.enableCategoryFilterLevel = ""; + object.diversityType = options.enums === String ? "DIVERSITY_TYPE_UNSPECIFIED" : 0; object.personalizationSpec = null; } if (message.name != null && message.hasOwnProperty("name")) @@ -35055,6 +35226,8 @@ for (var j = 0; j < message.solutionTypes.length; ++j) object.solutionTypes[j] = options.enums === String ? $root.google.cloud.retail.v2.SolutionType[message.solutionTypes[j]] === undefined ? message.solutionTypes[j] : $root.google.cloud.retail.v2.SolutionType[message.solutionTypes[j]] : message.solutionTypes[j]; } + if (message.diversityType != null && message.hasOwnProperty("diversityType")) + object.diversityType = options.enums === String ? $root.google.cloud.retail.v2.ServingConfig.DiversityType[message.diversityType] === undefined ? message.diversityType : $root.google.cloud.retail.v2.ServingConfig.DiversityType[message.diversityType] : message.diversityType; if (message.personalizationSpec != null && message.hasOwnProperty("personalizationSpec")) object.personalizationSpec = $root.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.toObject(message.personalizationSpec, options); return object; @@ -35086,6 +35259,22 @@ return typeUrlPrefix + "/google.cloud.retail.v2.ServingConfig"; }; + /** + * DiversityType enum. + * @name google.cloud.retail.v2.ServingConfig.DiversityType + * @enum {number} + * @property {number} DIVERSITY_TYPE_UNSPECIFIED=0 DIVERSITY_TYPE_UNSPECIFIED value + * @property {number} RULE_BASED_DIVERSITY=2 RULE_BASED_DIVERSITY value + * @property {number} DATA_DRIVEN_DIVERSITY=3 DATA_DRIVEN_DIVERSITY value + */ + ServingConfig.DiversityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIVERSITY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "RULE_BASED_DIVERSITY"] = 2; + values[valuesById[3] = "DATA_DRIVEN_DIVERSITY"] = 3; + return values; + })(); + return ServingConfig; })(); @@ -37413,6 +37602,7 @@ * @interface IWriteUserEventRequest * @property {string|null} [parent] WriteUserEventRequest parent * @property {google.cloud.retail.v2.IUserEvent|null} [userEvent] WriteUserEventRequest userEvent + * @property {boolean|null} [writeAsync] WriteUserEventRequest writeAsync */ /** @@ -37446,6 +37636,14 @@ */ WriteUserEventRequest.prototype.userEvent = null; + /** + * WriteUserEventRequest writeAsync. + * @member {boolean} writeAsync + * @memberof google.cloud.retail.v2.WriteUserEventRequest + * @instance + */ + WriteUserEventRequest.prototype.writeAsync = false; + /** * Creates a new WriteUserEventRequest instance using the specified properties. * @function create @@ -37474,6 +37672,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); if (message.userEvent != null && Object.hasOwnProperty.call(message, "userEvent")) $root.google.cloud.retail.v2.UserEvent.encode(message.userEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.writeAsync != null && Object.hasOwnProperty.call(message, "writeAsync")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.writeAsync); return writer; }; @@ -37516,6 +37716,10 @@ message.userEvent = $root.google.cloud.retail.v2.UserEvent.decode(reader, reader.uint32()); break; } + case 3: { + message.writeAsync = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -37559,6 +37763,9 @@ if (error) return "userEvent." + error; } + if (message.writeAsync != null && message.hasOwnProperty("writeAsync")) + if (typeof message.writeAsync !== "boolean") + return "writeAsync: boolean expected"; return null; }; @@ -37581,6 +37788,8 @@ throw TypeError(".google.cloud.retail.v2.WriteUserEventRequest.userEvent: object expected"); message.userEvent = $root.google.cloud.retail.v2.UserEvent.fromObject(object.userEvent); } + if (object.writeAsync != null) + message.writeAsync = Boolean(object.writeAsync); return message; }; @@ -37600,11 +37809,14 @@ if (options.defaults) { object.parent = ""; object.userEvent = null; + object.writeAsync = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; if (message.userEvent != null && message.hasOwnProperty("userEvent")) object.userEvent = $root.google.cloud.retail.v2.UserEvent.toObject(message.userEvent, options); + if (message.writeAsync != null && message.hasOwnProperty("writeAsync")) + object.writeAsync = message.writeAsync; return object; }; @@ -37643,10 +37855,12 @@ * Properties of a CollectUserEventRequest. * @memberof google.cloud.retail.v2 * @interface ICollectUserEventRequest + * @property {string|null} [prebuiltRule] CollectUserEventRequest prebuiltRule * @property {string|null} [parent] CollectUserEventRequest parent * @property {string|null} [userEvent] CollectUserEventRequest userEvent * @property {string|null} [uri] CollectUserEventRequest uri * @property {number|Long|null} [ets] CollectUserEventRequest ets + * @property {string|null} [rawJson] CollectUserEventRequest rawJson */ /** @@ -37664,6 +37878,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * CollectUserEventRequest prebuiltRule. + * @member {string|null|undefined} prebuiltRule + * @memberof google.cloud.retail.v2.CollectUserEventRequest + * @instance + */ + CollectUserEventRequest.prototype.prebuiltRule = null; + /** * CollectUserEventRequest parent. * @member {string} parent @@ -37696,6 +37918,28 @@ */ CollectUserEventRequest.prototype.ets = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * CollectUserEventRequest rawJson. + * @member {string} rawJson + * @memberof google.cloud.retail.v2.CollectUserEventRequest + * @instance + */ + CollectUserEventRequest.prototype.rawJson = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CollectUserEventRequest conversionRule. + * @member {"prebuiltRule"|undefined} conversionRule + * @memberof google.cloud.retail.v2.CollectUserEventRequest + * @instance + */ + Object.defineProperty(CollectUserEventRequest.prototype, "conversionRule", { + get: $util.oneOfGetter($oneOfFields = ["prebuiltRule"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CollectUserEventRequest instance using the specified properties. * @function create @@ -37728,6 +37972,10 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.uri); if (message.ets != null && Object.hasOwnProperty.call(message, "ets")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.ets); + if (message.rawJson != null && Object.hasOwnProperty.call(message, "rawJson")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.rawJson); + if (message.prebuiltRule != null && Object.hasOwnProperty.call(message, "prebuiltRule")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.prebuiltRule); return writer; }; @@ -37762,6 +38010,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 6: { + message.prebuiltRule = reader.string(); + break; + } case 1: { message.parent = reader.string(); break; @@ -37778,6 +38030,10 @@ message.ets = reader.int64(); break; } + case 5: { + message.rawJson = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -37813,6 +38069,12 @@ CollectUserEventRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.prebuiltRule != null && message.hasOwnProperty("prebuiltRule")) { + properties.conversionRule = 1; + if (!$util.isString(message.prebuiltRule)) + return "prebuiltRule: string expected"; + } if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; @@ -37825,6 +38087,9 @@ if (message.ets != null && message.hasOwnProperty("ets")) if (!$util.isInteger(message.ets) && !(message.ets && $util.isInteger(message.ets.low) && $util.isInteger(message.ets.high))) return "ets: integer|Long expected"; + if (message.rawJson != null && message.hasOwnProperty("rawJson")) + if (!$util.isString(message.rawJson)) + return "rawJson: string expected"; return null; }; @@ -37840,6 +38105,8 @@ if (object instanceof $root.google.cloud.retail.v2.CollectUserEventRequest) return object; var message = new $root.google.cloud.retail.v2.CollectUserEventRequest(); + if (object.prebuiltRule != null) + message.prebuiltRule = String(object.prebuiltRule); if (object.parent != null) message.parent = String(object.parent); if (object.userEvent != null) @@ -37855,6 +38122,8 @@ message.ets = object.ets; else if (typeof object.ets === "object") message.ets = new $util.LongBits(object.ets.low >>> 0, object.ets.high >>> 0).toNumber(); + if (object.rawJson != null) + message.rawJson = String(object.rawJson); return message; }; @@ -37880,6 +38149,7 @@ object.ets = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.ets = options.longs === String ? "0" : 0; + object.rawJson = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -37892,6 +38162,13 @@ object.ets = options.longs === String ? String(message.ets) : message.ets; else object.ets = options.longs === String ? $util.Long.prototype.toString.call(message.ets) : options.longs === Number ? new $util.LongBits(message.ets.low >>> 0, message.ets.high >>> 0).toNumber() : message.ets; + if (message.rawJson != null && message.hasOwnProperty("rawJson")) + object.rawJson = message.rawJson; + if (message.prebuiltRule != null && message.hasOwnProperty("prebuiltRule")) { + object.prebuiltRule = message.prebuiltRule; + if (options.oneofs) + object.conversionRule = "prebuiltRule"; + } return object; }; diff --git a/packages/google-cloud-retail/protos/protos.json b/packages/google-cloud-retail/protos/protos.json index 0c69647e16d..d08fabb0d56 100644 --- a/packages/google-cloud-retail/protos/protos.json +++ b/packages/google-cloud-retail/protos/protos.json @@ -66,6 +66,14 @@ "searchableOption": { "type": "SearchableOption", "id": 7 + }, + "exactSearchableOption": { + "type": "ExactSearchableOption", + "id": 11 + }, + "retrievableOption": { + "type": "RetrievableOption", + "id": 12 } }, "nested": { @@ -96,6 +104,20 @@ "SEARCHABLE_ENABLED": 1, "SEARCHABLE_DISABLED": 2 } + }, + "ExactSearchableOption": { + "values": { + "EXACT_SEARCHABLE_OPTION_UNSPECIFIED": 0, + "EXACT_SEARCHABLE_ENABLED": 1, + "EXACT_SEARCHABLE_DISABLED": 2 + } + }, + "RetrievableOption": { + "values": { + "RETRIEVABLE_OPTION_UNSPECIFIED": 0, + "RETRIEVABLE_ENABLED": 1, + "RETRIEVABLE_DISABLED": 2 + } } } }, @@ -1215,7 +1237,10 @@ }, "retrievableFields": { "type": "google.protobuf.FieldMask", - "id": 30 + "id": 30, + "options": { + "deprecated": true + } }, "variants": { "rule": "repeated", @@ -3505,6 +3530,10 @@ "type": "string", "id": 8 }, + "diversityType": { + "type": "DiversityType", + "id": 20 + }, "enableCategoryFilterLevel": { "type": "string", "id": 16 @@ -3521,6 +3550,15 @@ "(google.api.field_behavior)": "IMMUTABLE" } } + }, + "nested": { + "DiversityType": { + "values": { + "DIVERSITY_TYPE_UNSPECIFIED": 0, + "RULE_BASED_DIVERSITY": 2, + "DATA_DRIVEN_DIVERSITY": 3 + } + } } }, "ServingConfigService": { @@ -3932,11 +3970,26 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "writeAsync": { + "type": "bool", + "id": 3 } } }, "CollectUserEventRequest": { + "oneofs": { + "conversionRule": { + "oneof": [ + "prebuiltRule" + ] + } + }, "fields": { + "prebuiltRule": { + "type": "string", + "id": 6 + }, "parent": { "type": "string", "id": 1, @@ -3958,6 +4011,10 @@ "ets": { "type": "int64", "id": 4 + }, + "rawJson": { + "type": "string", + "id": 5 } } }, diff --git a/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_completion_config.js b/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_completion_config.js index 93696f792fe..b9c67326b19 100644 --- a/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_completion_config.js +++ b/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_completion_config.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Full CompletionConfig resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig` */ // const name = 'abc123' diff --git a/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js b/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js index cfddc591fa1..ea9a33a0b21 100644 --- a/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js +++ b/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js @@ -60,8 +60,9 @@ function main(catalog, query) { */ // const languageCodes = 'abc123' /** - * The device type context for completion suggestions. - * It is useful to apply different suggestions on different device types, e.g. + * The device type context for completion suggestions. We recommend that you + * leave this field empty. + * It can apply different suggestions on different device types, e.g. * `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device * types. * Supported formats: diff --git a/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js b/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js index 1bb9741aa90..ebec60694f7 100644 --- a/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js +++ b/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js @@ -38,7 +38,7 @@ function main(placement, userEvent) { * The ID of the Recommendations AI serving config or placement. * Before you can request predictions from your model, you must create at * least one serving config or placement for it. For more information, see - * Managing serving configurations + * Manage serving configs * (https://cloud.google.com/retail/docs/manage-configs). * The full list of available serving configs can be seen at * https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs @@ -89,12 +89,11 @@ function main(placement, userEvent) { * * tag=("Red" OR "Blue") tag="New-Arrival" tag=(NOT "promotional") * * filterOutOfStockItems tag=(-"promotional") * * filterOutOfStockItems - * If your filter blocks all prediction results, the API will return generic - * (unfiltered) popular products. If you only want results strictly matching - * the filters, set `strictFiltering` to True in `PredictRequest.params` to - * receive empty results instead. - * Note that the API will never return items with storageStatus of "EXPIRED" - * or "DELETED" regardless of filter choices. + * If your filter blocks all prediction results, the API will return *no* + * results. If instead you want empty result sets to return generic + * (unfiltered) popular products, set `strictFiltering` to False in + * `PredictRequest.params`. Note that the API will never return items with + * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. * If `filterSyntaxV2` is set to true under the `params` field, then * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: @@ -119,7 +118,7 @@ function main(placement, userEvent) { * * `returnScore`: Boolean. If set to true, the prediction 'score' * corresponding to each returned product will be set in the * `results.metadata` field in the prediction response. The given - * 'score' indicates the probability of an product being clicked/purchased + * 'score' indicates the probability of a product being clicked/purchased * given the user's context and history. * * `strictFiltering`: Boolean. True by default. If set to false, the service * will return generic (unfiltered) popular products instead of empty if diff --git a/packages/google-cloud-retail/samples/generated/v2/search_service.search.js b/packages/google-cloud-retail/samples/generated/v2/search_service.search.js index 744714838f9..46e5014b239 100644 --- a/packages/google-cloud-retail/samples/generated/v2/search_service.search.js +++ b/packages/google-cloud-retail/samples/generated/v2/search_service.search.js @@ -33,7 +33,7 @@ function main(placement, visitorId) { * `projects/* /locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/* /locations/global/catalogs/default_catalog/placements/default_search`. - * This field is used to identify the serving configuration name and the set + * This field is used to identify the serving config name and the set * of models that will be used to make the search. */ // const placement = 'abc123' @@ -224,7 +224,7 @@ function main(placement, visitorId) { * the same as * UserEvent.page_categories google.cloud.retail.v2.UserEvent.page_categories; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, 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/packages/google-cloud-retail/samples/generated/v2/serving_config_service.add_control.js b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.add_control.js index 0e0ee81f026..7dd92c5da6f 100644 --- a/packages/google-cloud-retail/samples/generated/v2/serving_config_service.add_control.js +++ b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.add_control.js @@ -30,7 +30,7 @@ function main(servingConfig, controlId) { */ /** * Required. The source ServingConfig resource name . Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` */ // const servingConfig = 'abc123' /** diff --git a/packages/google-cloud-retail/samples/generated/v2/serving_config_service.delete_serving_config.js b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.delete_serving_config.js index b9a3fe649c4..de87445a7d4 100644 --- a/packages/google-cloud-retail/samples/generated/v2/serving_config_service.delete_serving_config.js +++ b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.delete_serving_config.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. The resource name of the ServingConfig to delete. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` */ // const name = 'abc123' diff --git a/packages/google-cloud-retail/samples/generated/v2/serving_config_service.get_serving_config.js b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.get_serving_config.js index 0aea4a0429c..aba3b859c59 100644 --- a/packages/google-cloud-retail/samples/generated/v2/serving_config_service.get_serving_config.js +++ b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.get_serving_config.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. The resource name of the ServingConfig to get. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` */ // const name = 'abc123' diff --git a/packages/google-cloud-retail/samples/generated/v2/serving_config_service.list_serving_configs.js b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.list_serving_configs.js index 2aa4c4d944d..9e56da16d9a 100644 --- a/packages/google-cloud-retail/samples/generated/v2/serving_config_service.list_serving_configs.js +++ b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.list_serving_configs.js @@ -30,7 +30,7 @@ function main(parent) { */ /** * Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-retail/samples/generated/v2/serving_config_service.remove_control.js b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.remove_control.js index 2f32073bc1a..11138851395 100644 --- a/packages/google-cloud-retail/samples/generated/v2/serving_config_service.remove_control.js +++ b/packages/google-cloud-retail/samples/generated/v2/serving_config_service.remove_control.js @@ -30,7 +30,7 @@ function main(servingConfig, controlId) { */ /** * Required. The source ServingConfig resource name . Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` */ // const servingConfig = 'abc123' /** diff --git a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json index 8273b0d7a5b..43c1546f1b9 100644 --- a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json +++ b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json @@ -503,14 +503,14 @@ "regionTag": "retail_v2_generated_CompletionService_CompleteQuery_async", "title": "CatalogService completeQuery Sample", "origin": "API_DEFINITION", - "description": " Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.", + "description": " Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", "canonical": true, "file": "completion_service.complete_query.js", "language": "JAVASCRIPT", "segments": [ { "start": 25, - "end": 114, + "end": 115, "type": "FULL" } ], @@ -567,7 +567,7 @@ "regionTag": "retail_v2_generated_CompletionService_ImportCompletionData_async", "title": "CatalogService importCompletionData Sample", "origin": "API_DEFINITION", - "description": " Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.", + "description": " Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", "canonical": true, "file": "completion_service.import_completion_data.js", "language": "JAVASCRIPT", @@ -846,7 +846,7 @@ "segments": [ { "start": 25, - "end": 178, + "end": 177, "type": "FULL" } ], @@ -1203,7 +1203,7 @@ "regionTag": "retail_v2_generated_ProductService_SetInventory_async", "title": "CatalogService setInventory Sample", "origin": "API_DEFINITION", - "description": " Updates inventory information for a [Product][google.cloud.retail.v2.Product] while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. When inventory is updated with [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.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 [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. If no inventory fields are set in [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], then any pre-existing inventory information for this product will be used. If no inventory fields are set in [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], then any existing inventory information will be preserved. Pre-existing inventory information can only be updated with [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], and [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will return NOT_FOUND afterwards. If conflicting updates are issued, the [Operation][]s associated with the stale updates will not be marked as [done][Operation.done] until being obsolete. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.", + "description": " Updates inventory information for a [Product][google.cloud.retail.v2.Product] while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the [Product][google.cloud.retail.v2.Product] to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. When inventory is updated with [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request. If no inventory fields are set in [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], then any pre-existing inventory information for this product is used. If no inventory fields are set in [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], then any existing inventory information is preserved. Pre-existing inventory information can only be updated with [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory], [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], and [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the [GetOperation][google.longrunning.Operations.GetOperation] API returns `NOT_FOUND` afterwards. If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates are not marked as [done][google.longrunning.Operation.done] until they are obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", "canonical": true, "file": "product_service.set_inventory.js", "language": "JAVASCRIPT", @@ -1255,7 +1255,7 @@ "regionTag": "retail_v2_generated_ProductService_AddFulfillmentPlaces_async", "title": "CatalogService addFulfillmentPlaces Sample", "origin": "API_DEFINITION", - "description": " Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. This process is asynchronous and does not require the [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will return NOT_FOUND afterwards. If conflicting updates are issued, the [Operation][]s associated with the stale updates will not be marked as [done][Operation.done] until being obsolete. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.", + "description": " Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. This process is asynchronous and does not require the [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", "canonical": true, "file": "product_service.add_fulfillment_places.js", "language": "JAVASCRIPT", @@ -1311,7 +1311,7 @@ "regionTag": "retail_v2_generated_ProductService_RemoveFulfillmentPlaces_async", "title": "CatalogService removeFulfillmentPlaces Sample", "origin": "API_DEFINITION", - "description": " Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. This process is asynchronous and does not require the [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will return NOT_FOUND afterwards. If conflicting updates are issued, the [Operation][]s associated with the stale updates will not be marked as [done][Operation.done] until being obsolete. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.", + "description": " Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]. This process is asynchronous and does not require the [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", "canonical": true, "file": "product_service.remove_fulfillment_places.js", "language": "JAVASCRIPT", @@ -1367,7 +1367,7 @@ "regionTag": "retail_v2_generated_ProductService_AddLocalInventories_async", "title": "CatalogService addLocalInventories Sample", "origin": "API_DEFINITION", - "description": " Updates local inventory information for a [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. Local inventory information can only be modified using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories. The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will return NOT_FOUND afterwards. If conflicting updates are issued, the [Operation][]s associated with the stale updates will not be marked as [done][Operation.done] until being obsolete. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.", + "description": " Updates local inventory information for a [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. Local inventory information can only be modified using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories. The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", "canonical": true, "file": "product_service.add_local_inventories.js", "language": "JAVASCRIPT", @@ -1423,7 +1423,7 @@ "regionTag": "retail_v2_generated_ProductService_RemoveLocalInventories_async", "title": "CatalogService removeLocalInventories Sample", "origin": "API_DEFINITION", - "description": " Remove local inventory information for a [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. Local inventory information can only be removed using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories. The returned [Operation][]s will be obsolete after 1 day, and [GetOperation][] API will return NOT_FOUND afterwards. If conflicting updates are issued, the [Operation][]s associated with the stale updates will not be marked as [done][Operation.done] until being obsolete. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.", + "description": " Remove local inventory information for a [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]. Local inventory information can only be removed using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories. The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards. If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", "canonical": true, "file": "product_service.remove_local_inventories.js", "language": "JAVASCRIPT", @@ -1475,7 +1475,7 @@ "regionTag": "retail_v2_generated_SearchService_Search_async", "title": "CatalogService search Sample", "origin": "API_DEFINITION", - "description": " Performs a search. This feature is only available for users who have Retail Search enabled. Please enable Retail Search on Cloud Console before using this feature.", + "description": " Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", "canonical": true, "file": "search_service.search.js", "language": "JAVASCRIPT", @@ -1910,7 +1910,7 @@ "segments": [ { "start": 25, - "end": 59, + "end": 66, "type": "FULL" } ], @@ -1926,6 +1926,10 @@ { "name": "user_event", "type": ".google.cloud.retail.v2.UserEvent" + }, + { + "name": "write_async", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.retail.v2.UserEvent", @@ -1954,7 +1958,7 @@ "segments": [ { "start": 25, - "end": 73, + "end": 85, "type": "FULL" } ], @@ -1963,6 +1967,10 @@ "fullName": "google.cloud.retail.v2.UserEventService.CollectUserEvent", "async": true, "parameters": [ + { + "name": "prebuilt_rule", + "type": "TYPE_STRING" + }, { "name": "parent", "type": "TYPE_STRING" @@ -1978,6 +1986,10 @@ { "name": "ets", "type": "TYPE_INT64" + }, + { + "name": "raw_json", + "type": "TYPE_STRING" } ], "resultType": ".google.api.HttpBody", @@ -2095,7 +2107,7 @@ "regionTag": "retail_v2_generated_UserEventService_RejoinUserEvents_async", "title": "CatalogService rejoinUserEvents Sample", "origin": "API_DEFINITION", - "description": " Starts a user event rejoin operation with latest product catalog. Events will not be annotated with detailed product information if product is missing from the catalog at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This method can be used to start a join operation on specified events with latest version of product catalog. It can also be used to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", + "description": " Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", "canonical": true, "file": "user_event_service.rejoin_user_events.js", "language": "JAVASCRIPT", diff --git a/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js b/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js index 2763ab29838..394a46e80f1 100644 --- a/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js +++ b/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js @@ -28,6 +28,11 @@ function main(parent, userEvent) { * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ + /** + * The prebuilt rule name that can convert a specific type of raw_json. + * For example: "default_schema/v1.0" + */ + // const prebuiltRule = 'abc123' /** * Required. The parent catalog name, such as * `projects/1234/locations/global/catalogs/default_catalog`. @@ -51,6 +56,13 @@ function main(parent, userEvent) { * payload bytes. */ // const ets = 1234 + /** + * An arbitrary serialized JSON string that contains necessary information + * that can comprise a user event. When this field is specified, the + * user_event field will be ignored. Note: line-delimited JSON is not + * supported, a single JSON only. + */ + // const rawJson = 'abc123' // Imports the Retail library const {UserEventServiceClient} = require('@google-cloud/retail').v2; diff --git a/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js b/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js index 4aa66d96e2a..cb69641bd19 100644 --- a/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js +++ b/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js @@ -36,8 +36,8 @@ function main(parent) { /** * The type of the user event rejoin to define the scope and range of the user * events to be rejoined with the latest product catalog. Defaults to - * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an - * invalid integer value. + * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to + * an invalid integer value. */ // const userEventRejoinScope = {} diff --git a/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js b/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js index 9ebb728d75a..774ca968f29 100644 --- a/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js +++ b/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js @@ -37,6 +37,13 @@ function main(parent, userEvent) { * Required. User event to write. */ // const userEvent = {} + /** + * If set to true, the user event will be written asynchronously after + * validation, and the API will respond without waiting for the write. + * Therefore, silent failures can occur even if the API returns success. In + * case of silent failures, error messages can be found in Stackdriver logs. + */ + // const writeAsync = true // Imports the Retail library const {UserEventServiceClient} = require('@google-cloud/retail').v2; diff --git a/packages/google-cloud-retail/src/v2/catalog_service_client.ts b/packages/google-cloud-retail/src/v2/catalog_service_client.ts index 32de58815dc..c97c7d05dcc 100644 --- a/packages/google-cloud-retail/src/v2/catalog_service_client.ts +++ b/packages/google-cloud-retail/src/v2/catalog_service_client.ts @@ -737,7 +737,7 @@ export class CatalogServiceClient { * The request object that will be sent. * @param {string} request.name * Required. Full CompletionConfig resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/packages/google-cloud-retail/src/v2/completion_service_client.ts b/packages/google-cloud-retail/src/v2/completion_service_client.ts index 01413d5e601..467a448b5b2 100644 --- a/packages/google-cloud-retail/src/v2/completion_service_client.ts +++ b/packages/google-cloud-retail/src/v2/completion_service_client.ts @@ -43,7 +43,7 @@ const version = require('../../../package.json').version; * Auto-completion service for retail. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * @class * @memberof v2 */ @@ -398,7 +398,7 @@ export class CompletionServiceClient { * Completes the specified prefix with keyword suggestions. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * * @param {Object} request * The request object that will be sent. @@ -430,8 +430,10 @@ export class CompletionServiceClient { * Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum * number of language codes is 3. * @param {string} request.deviceType - * The device type context for completion suggestions. - * It is useful to apply different suggestions on different device types, e.g. + * The device type context for completion suggestions. We recommend that you + * leave this field empty. + * + * It can apply different suggestions on different device types, e.g. * `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device * types. * @@ -553,7 +555,7 @@ export class CompletionServiceClient { * are indexed successfully and ready for serving. The process takes hours. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-retail/src/v2/prediction_service_client.ts b/packages/google-cloud-retail/src/v2/prediction_service_client.ts index b7fd730333e..2cba6de4e28 100644 --- a/packages/google-cloud-retail/src/v2/prediction_service_client.ts +++ b/packages/google-cloud-retail/src/v2/prediction_service_client.ts @@ -390,7 +390,7 @@ export class PredictionServiceClient { * The ID of the Recommendations AI serving config or placement. * Before you can request predictions from your model, you must create at * least one serving config or placement for it. For more information, see - * [Managing serving configurations] + * [Manage serving configs] * (https://cloud.google.com/retail/docs/manage-configs). * * The full list of available serving configs can be seen at @@ -441,12 +441,11 @@ export class PredictionServiceClient { * * filterOutOfStockItems tag=(-"promotional") * * filterOutOfStockItems * - * If your filter blocks all prediction results, the API will return generic - * (unfiltered) popular products. If you only want results strictly matching - * the filters, set `strictFiltering` to True in `PredictRequest.params` to - * receive empty results instead. - * Note that the API will never return items with storageStatus of "EXPIRED" - * or "DELETED" regardless of filter choices. + * If your filter blocks all prediction results, the API will return *no* + * results. If instead you want empty result sets to return generic + * (unfiltered) popular products, set `strictFiltering` to False in + * `PredictRequest.params`. Note that the API will never return items with + * storageStatus of "EXPIRED" or "DELETED" regardless of filter choices. * * If `filterSyntaxV2` is set to true under the `params` field, then * attribute-based expressions are expected instead of the above described @@ -471,7 +470,7 @@ export class PredictionServiceClient { * * `returnScore`: Boolean. If set to true, the prediction 'score' * corresponding to each returned product will be set in the * `results.metadata` field in the prediction response. The given - * 'score' indicates the probability of an product being clicked/purchased + * 'score' indicates the probability of a product being clicked/purchased * given the user's context and history. * * `strictFiltering`: Boolean. True by default. If set to false, the service * will return generic (unfiltered) popular products instead of empty if diff --git a/packages/google-cloud-retail/src/v2/product_service_client.ts b/packages/google-cloud-retail/src/v2/product_service_client.ts index 570420c88f9..ab4d6bc8ab2 100644 --- a/packages/google-cloud-retail/src/v2/product_service_client.ts +++ b/packages/google-cloud-retail/src/v2/product_service_client.ts @@ -1076,9 +1076,9 @@ export class ProductServiceClient { * * This process is asynchronous and does not require the * {@link google.cloud.retail.v2.Product|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 + * fulfillment information. If the request is valid, the update is enqueued + * and processed downstream. As a consequence, when a response is returned, + * updates are not immediately manifested in the * {@link google.cloud.retail.v2.Product|Product} queried by * {@link google.cloud.retail.v2.ProductService.GetProduct|ProductService.GetProduct} * or @@ -1088,10 +1088,10 @@ export class ProductServiceClient { * {@link google.cloud.retail.v2.ProductService.CreateProduct|ProductService.CreateProduct} * and * {@link google.cloud.retail.v2.ProductService.UpdateProduct|ProductService.UpdateProduct}, - * the specified inventory field value(s) will overwrite any existing value(s) + * the specified inventory field value(s) 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 + * update times for the specified inventory fields are overwritten by the + * times of the * {@link google.cloud.retail.v2.ProductService.CreateProduct|ProductService.CreateProduct} * or * {@link google.cloud.retail.v2.ProductService.UpdateProduct|ProductService.UpdateProduct} @@ -1099,11 +1099,11 @@ export class ProductServiceClient { * * If no inventory fields are set in * {@link google.cloud.retail.v2.CreateProductRequest.product|CreateProductRequest.product}, - * then any pre-existing inventory information for this product will be used. + * then any pre-existing inventory information for this product is used. * * If no inventory fields are set in * {@link google.cloud.retail.v2.SetInventoryRequest.set_mask|SetInventoryRequest.set_mask}, - * then any existing inventory information will be preserved. + * then any existing inventory information is preserved. * * Pre-existing inventory information can only be updated with * {@link google.cloud.retail.v2.ProductService.SetInventory|ProductService.SetInventory}, @@ -1111,15 +1111,17 @@ export class ProductServiceClient { * and * {@link google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces|ProductService.RemoveFulfillmentPlaces}. * - * The returned {@link |Operation}s will be obsolete after 1 day, and - * {@link |GetOperation} API will return NOT_FOUND afterwards. + * The returned {@link google.longrunning.Operation|Operation}s is obsolete after + * one day, and the {@link google.longrunning.Operations.GetOperation|GetOperation} + * API returns `NOT_FOUND` afterwards. * - * If conflicting updates are issued, the {@link |Operation}s associated with the - * stale updates will not be marked as {@link Operation.done|done} until being - * obsolete. + * If conflicting updates are issued, the + * {@link google.longrunning.Operation|Operation}s associated with the stale + * updates are not marked as {@link google.longrunning.Operation.done|done} until + * they are obsolete. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * * @param {Object} request * The request object that will be sent. @@ -1346,15 +1348,17 @@ export class ProductServiceClient { * or * {@link google.cloud.retail.v2.ProductService.ListProducts|ProductService.ListProducts}. * - * The returned {@link |Operation}s will be obsolete after 1 day, and - * {@link |GetOperation} API will return NOT_FOUND afterwards. + * The returned {@link google.longrunning.Operation|Operation}s will be obsolete + * after 1 day, and {@link google.longrunning.Operations.GetOperation|GetOperation} + * API will return NOT_FOUND afterwards. * - * If conflicting updates are issued, the {@link |Operation}s associated with the - * stale updates will not be marked as {@link Operation.done|done} until being - * obsolete. + * If conflicting updates are issued, the + * {@link google.longrunning.Operation|Operation}s associated with the stale + * updates will not be marked as {@link google.longrunning.Operation.done|done} + * until being obsolete. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * * @param {Object} request * The request object that will be sent. @@ -1559,15 +1563,17 @@ export class ProductServiceClient { * or * {@link google.cloud.retail.v2.ProductService.ListProducts|ProductService.ListProducts}. * - * The returned {@link |Operation}s will be obsolete after 1 day, and - * {@link |GetOperation} API will return NOT_FOUND afterwards. + * The returned {@link google.longrunning.Operation|Operation}s will be obsolete + * after 1 day, and {@link google.longrunning.Operations.GetOperation|GetOperation} + * API will return NOT_FOUND afterwards. * - * If conflicting updates are issued, the {@link |Operation}s associated with the - * stale updates will not be marked as {@link Operation.done|done} until being - * obsolete. + * If conflicting updates are issued, the + * {@link google.longrunning.Operation|Operation}s associated with the stale + * updates will not be marked as {@link google.longrunning.Operation.done|done} + * until being obsolete. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * * @param {Object} request * The request object that will be sent. @@ -1778,15 +1784,17 @@ export class ProductServiceClient { * {@link google.cloud.retail.v2.ProductService.UpdateProduct|ProductService.UpdateProduct} * has no effect on local inventories. * - * The returned {@link |Operation}s will be obsolete after 1 day, and - * {@link |GetOperation} API will return NOT_FOUND afterwards. + * The returned {@link google.longrunning.Operation|Operation}s will be obsolete + * after 1 day, and {@link google.longrunning.Operations.GetOperation|GetOperation} + * API will return NOT_FOUND afterwards. * - * If conflicting updates are issued, the {@link |Operation}s associated with the - * stale updates will not be marked as {@link Operation.done|done} until being - * obsolete. + * If conflicting updates are issued, the + * {@link google.longrunning.Operation|Operation}s associated with the stale + * updates will not be marked as {@link google.longrunning.Operation.done|done} + * until being obsolete. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * * @param {Object} request * The request object that will be sent. @@ -1978,15 +1986,17 @@ export class ProductServiceClient { * {@link google.cloud.retail.v2.ProductService.UpdateProduct|ProductService.UpdateProduct} * has no effect on local inventories. * - * The returned {@link |Operation}s will be obsolete after 1 day, and - * {@link |GetOperation} API will return NOT_FOUND afterwards. + * The returned {@link google.longrunning.Operation|Operation}s will be obsolete + * after 1 day, and {@link google.longrunning.Operations.GetOperation|GetOperation} + * API will return NOT_FOUND afterwards. * - * If conflicting updates are issued, the {@link |Operation}s associated with the - * stale updates will not be marked as {@link Operation.done|done} until being - * obsolete. + * If conflicting updates are issued, the + * {@link google.longrunning.Operation|Operation}s associated with the stale + * updates will not be marked as {@link google.longrunning.Operation.done|done} + * until being obsolete. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * * @param {Object} request * The request object that will be sent. diff --git a/packages/google-cloud-retail/src/v2/search_service_client.ts b/packages/google-cloud-retail/src/v2/search_service_client.ts index 41cf783af71..3fc39be5ad3 100644 --- a/packages/google-cloud-retail/src/v2/search_service_client.ts +++ b/packages/google-cloud-retail/src/v2/search_service_client.ts @@ -44,7 +44,7 @@ const version = require('../../../package.json').version; * Service for search. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * @class * @memberof v2 */ @@ -399,7 +399,7 @@ export class SearchServiceClient { * Performs a search. * * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * * @param {Object} request * The request object that will be sent. @@ -408,7 +408,7 @@ export class SearchServiceClient { * `projects/* /locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/* /locations/global/catalogs/default_catalog/placements/default_search`. - * This field is used to identify the serving configuration name and the set + * This field is used to identify the serving config name and the set * of models that will be used to make the search. * @param {string} request.branch * The branch resource name, such as @@ -593,7 +593,7 @@ export class SearchServiceClient { * {@link google.cloud.retail.v2.UserEvent.page_categories|UserEvent.page_categories}; * * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * * Category pages include special pages such as sales or promotions. For @@ -723,7 +723,7 @@ export class SearchServiceClient { * `projects/* /locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/* /locations/global/catalogs/default_catalog/placements/default_search`. - * This field is used to identify the serving configuration name and the set + * This field is used to identify the serving config name and the set * of models that will be used to make the search. * @param {string} request.branch * The branch resource name, such as @@ -908,7 +908,7 @@ export class SearchServiceClient { * {@link google.cloud.retail.v2.UserEvent.page_categories|UserEvent.page_categories}; * * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * * Category pages include special pages such as sales or promotions. For @@ -994,7 +994,7 @@ export class SearchServiceClient { * `projects/* /locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` * or the name of the legacy placement resource, such as * `projects/* /locations/global/catalogs/default_catalog/placements/default_search`. - * This field is used to identify the serving configuration name and the set + * This field is used to identify the serving config name and the set * of models that will be used to make the search. * @param {string} request.branch * The branch resource name, such as @@ -1179,7 +1179,7 @@ export class SearchServiceClient { * {@link google.cloud.retail.v2.UserEvent.page_categories|UserEvent.page_categories}; * * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * * Category pages include special pages such as sales or promotions. For diff --git a/packages/google-cloud-retail/src/v2/serving_config_service_client.ts b/packages/google-cloud-retail/src/v2/serving_config_service_client.ts index 375df798169..30783a99d0a 100644 --- a/packages/google-cloud-retail/src/v2/serving_config_service_client.ts +++ b/packages/google-cloud-retail/src/v2/serving_config_service_client.ts @@ -509,7 +509,7 @@ export class ServingConfigServiceClient { * The request object that will be sent. * @param {string} request.name * Required. The resource name of the ServingConfig to delete. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -702,7 +702,7 @@ export class ServingConfigServiceClient { * The request object that will be sent. * @param {string} request.name * Required. The resource name of the ServingConfig to get. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -794,7 +794,7 @@ export class ServingConfigServiceClient { * The request object that will be sent. * @param {string} request.servingConfig * Required. The source ServingConfig resource name . Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @param {string} request.controlId * Required. The id of the control to apply. Assumed to be in the same catalog * as the serving config - if id is not found a NOT_FOUND error is returned. @@ -884,7 +884,7 @@ export class ServingConfigServiceClient { * The request object that will be sent. * @param {string} request.servingConfig * Required. The source ServingConfig resource name . Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @param {string} request.controlId * Required. The id of the control to apply. Assumed to be in the same catalog * as the serving config. @@ -974,7 +974,7 @@ export class ServingConfigServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` * @param {number} [request.pageSize] * Optional. Maximum number of results to return. If unspecified, defaults * to 100. If a value greater than 100 is provided, at most 100 results are @@ -1076,7 +1076,7 @@ export class ServingConfigServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` * @param {number} [request.pageSize] * Optional. Maximum number of results to return. If unspecified, defaults * to 100. If a value greater than 100 is provided, at most 100 results are @@ -1126,7 +1126,7 @@ export class ServingConfigServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` * @param {number} [request.pageSize] * Optional. Maximum number of results to return. If unspecified, defaults * to 100. If a value greater than 100 is provided, at most 100 results are diff --git a/packages/google-cloud-retail/src/v2/user_event_service_client.ts b/packages/google-cloud-retail/src/v2/user_event_service_client.ts index c9529b9fdb7..3f4785034d1 100644 --- a/packages/google-cloud-retail/src/v2/user_event_service_client.ts +++ b/packages/google-cloud-retail/src/v2/user_event_service_client.ts @@ -426,6 +426,11 @@ export class UserEventServiceClient { * `projects/1234/locations/global/catalogs/default_catalog`. * @param {google.cloud.retail.v2.UserEvent} request.userEvent * Required. User event to write. + * @param {boolean} request.writeAsync + * If set to true, the user event will be written asynchronously after + * validation, and the API will respond without waiting for the write. + * Therefore, silent failures can occur even if the API returns success. In + * case of silent failures, error messages can be found in Stackdriver logs. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -513,6 +518,9 @@ export class UserEventServiceClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.prebuiltRule + * The prebuilt rule name that can convert a specific type of raw_json. + * For example: "default_schema/v1.0" * @param {string} request.parent * Required. The parent catalog name, such as * `projects/1234/locations/global/catalogs/default_catalog`. @@ -528,6 +536,11 @@ export class UserEventServiceClient { * The event timestamp in milliseconds. This prevents browser caching of * otherwise identical get requests. The name is abbreviated to reduce the * payload bytes. + * @param {string} request.rawJson + * An arbitrary serialized JSON string that contains necessary information + * that can comprise a user event. When this field is specified, the + * user_event field will be ignored. Note: line-delimited JSON is not + * supported, a single JSON only. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -928,14 +941,14 @@ export class UserEventServiceClient { >; } /** - * Starts a user event rejoin operation with latest product catalog. Events - * will not be annotated with detailed product information if product is - * missing from the catalog at the time the user event is ingested, and these - * events are stored as unjoined events with a limited usage on training and - * serving. This method can be used to start a join operation on specified - * events with latest version of product catalog. It can also be used to - * correct events joined with the wrong product catalog. A rejoin operation - * can take hours or days to complete. + * Starts a user-event rejoin operation with latest product catalog. Events + * are not annotated with detailed product information for products that are + * missing from the catalog when the user event is ingested. These + * events are stored as unjoined events with limited usage on training and + * serving. You can use this method to start a join operation on specified + * events with the latest version of product catalog. You can also use this + * method to correct events joined with the wrong product catalog. A rejoin + * operation can take hours or days to complete. * * @param {Object} request * The request object that will be sent. @@ -945,8 +958,8 @@ export class UserEventServiceClient { * @param {google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope} request.userEventRejoinScope * The type of the user event rejoin to define the scope and range of the user * events to be rejoined with the latest product catalog. Defaults to - * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an - * invalid integer value. + * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to + * an invalid integer value. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array.