diff --git a/google/cloud/retail/v2alpha/BUILD.bazel b/google/cloud/retail/v2alpha/BUILD.bazel index d0963b3a60f9a..81f7cbf453a55 100644 --- a/google/cloud/retail/v2alpha/BUILD.bazel +++ b/google/cloud/retail/v2alpha/BUILD.bazel @@ -25,13 +25,18 @@ proto_library( "catalog_service.proto", "common.proto", "completion_service.proto", + "control.proto", + "control_service.proto", "export_config.proto", "import_config.proto", "prediction_service.proto", "product.proto", "product_service.proto", + "promotion.proto", "purge_config.proto", "search_service.proto", + "serving_config.proto", + "serving_config_service.proto", "user_event.proto", "user_event_service.proto", ], @@ -87,7 +92,9 @@ java_grpc_library( java_gapic_library( name = "retail_java_gapic", srcs = [":retail_proto_with_info"], + gapic_yaml = "retail_gapic.yaml", grpc_service_config = "retail_grpc_service_config.json", + service_yaml = "retail_v2alpha.yaml", test_deps = [ ":retail_java_grpc", ], @@ -102,9 +109,11 @@ java_gapic_test( test_classes = [ "com.google.cloud.retail.v2alpha.CatalogServiceClientTest", "com.google.cloud.retail.v2alpha.CompletionServiceClientTest", + "com.google.cloud.retail.v2alpha.ControlServiceClientTest", "com.google.cloud.retail.v2alpha.PredictionServiceClientTest", "com.google.cloud.retail.v2alpha.ProductServiceClientTest", "com.google.cloud.retail.v2alpha.SearchServiceClientTest", + "com.google.cloud.retail.v2alpha.ServingConfigServiceClientTest", "com.google.cloud.retail.v2alpha.UserEventServiceClientTest", ], runtime_deps = [":retail_java_gapic_test"], @@ -366,4 +375,20 @@ csharp_gapic_assembly_pkg( ############################################################################## # C++ ############################################################################## -# Put your C++ rules here +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "retail_cc_proto", + deps = [":retail_proto"], +) + +cc_grpc_library( + name = "retail_cc_grpc", + srcs = [":retail_proto"], + grpc_only = True, + deps = [":retail_cc_proto"], +) diff --git a/google/cloud/retail/v2alpha/catalog.proto b/google/cloud/retail/v2alpha/catalog.proto index 7cb4da0eca6e5..8dcb23f60d543 100644 --- a/google/cloud/retail/v2alpha/catalog.proto +++ b/google/cloud/retail/v2alpha/catalog.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.retail.v2alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/common.proto"; @@ -85,6 +84,231 @@ message ProductLevelConfig { string merchant_center_product_id_field = 2; } +// Catalog level attribute config for an attribute. For example, if customers +// want to enable/disable facet for a specific attribute. +message CatalogAttribute { + // The type of an attribute. + enum AttributeType { + // The type of the attribute is unknown. + // + // Used when type cannot be derived from attribute that is not + // [in_use][google.cloud.retail.v2alpha.CatalogAttribute.in_use]. + UNKNOWN = 0; + + // Textual attribute. + TEXTUAL = 1; + + // Numerical attribute. + NUMERICAL = 2; + } + + // The status of the indexable option of a catalog attribute. + enum IndexableOption { + // Value used when unset. Defaults to + // [INDEXABLE_ENABLED][google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption.INDEXABLE_ENABLED]. + INDEXABLE_OPTION_UNSPECIFIED = 0; + + // Indexable option enabled for an attribute. + INDEXABLE_ENABLED = 1; + + // Indexable option disabled for an attribute. + INDEXABLE_DISABLED = 2; + } + + // 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.v2alpha.CatalogAttribute.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED]. + DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0; + + // Dynamic facetable option enabled for an attribute. + DYNAMIC_FACETABLE_ENABLED = 1; + + // Dynamic facetable option disabled for an attribute. + DYNAMIC_FACETABLE_DISABLED = 2; + } + + // The status of the searchable option of a catalog attribute. + enum SearchableOption { + // Value used when unset. Defaults to + // [SEARCHABLE_DISABLED][google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption.SEARCHABLE_DISABLED]. + SEARCHABLE_OPTION_UNSPECIFIED = 0; + + // Searchable option enabled for an attribute. + SEARCHABLE_ENABLED = 1; + + // Searchable option disabled for an attribute. + SEARCHABLE_DISABLED = 2; + } + + // Required. Attribute name. + // For example: `color`, `brands`, `attributes.custom_attribute`, such as + // `attributes.xyz`. + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Indicates whether this attribute has been used by any + // products. `True` if at least one + // [Product][google.cloud.retail.v2alpha.Product] is using this attribute in + // [Product.attributes][google.cloud.retail.v2alpha.Product.attributes]. + // Otherwise, this field is `False`. + // + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] can be + // pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][], + // or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s. + // + // Only [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that + // are not in use by products can be deleted. + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are + // in use by products 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]; + + // Output only. The type of this attribute. This is derived from the attribute + // in [Product.attributes][google.cloud.retail.v2alpha.Product.attributes]. + AttributeType type = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // When + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + // 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.v2alpha.SearchService.Search]. + 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.v2alpha.CatalogAttribute.indexable_option] + // is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. + DynamicFacetableOption dynamic_facetable_option = 6; + + // When + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values + // are searchable by text queries in + // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. + // + // If SEARCHABLE_ENABLED but attribute type is numerical, attribute values + // will not be searchable by text queries in + // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search], + // as there are no text values associated to numerical attributes. + SearchableOption searchable_option = 7; +} + +// Catalog level attribute config. +message AttributesConfig { + option (google.api.resource) = { + type: "retail.googleapis.com/AttributesConfig" + pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/attributesConfig" + }; + + // Required. Immutable. The fully qualified resource name of the attribute + // config. Format: "projects/*/locations/*/catalogs/*/attributesConfig" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Enable attribute(s) config at catalog level. + // For example, indexable, dynamic_facetable, or searchable for each + // attribute. + // + // The key is catalog attribute's name. + // For example: `color`, `brands`, `attributes.custom_attribute`, such as + // `attributes.xyz`. + // + // The maximum number of catalog attributes allowed in a request is 1000. + map catalog_attributes = 2; + + // Output only. The + // [AttributeConfigLevel][google.cloud.retail.v2alpha.AttributeConfigLevel] + // used for this catalog. + AttributeConfigLevel attribute_config_level = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Catalog level autocomplete config for customers to customize autocomplete +// feature's settings. +message CompletionConfig { + option (google.api.resource) = { + type: "retail.googleapis.com/CompletionConfig" + pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/completionConfig" + }; + + // Required. Immutable. Fully qualified name + // projects/*/locations/*/catalogs/*/completionConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Specifies the matching order for autocomplete suggestions, e.g., a query + // consisting of 'sh' with 'out-of-order' specified would suggest "women's + // shoes", whereas a query of 'red s' with 'exact-prefix' specified would + // suggest "red shoes". Currently supported values: + // + // * 'out-of-order' + // * 'exact-prefix' + // + // Default value: 'exact-prefix'. + string matching_order = 2; + + // The maximum number of autocomplete suggestions returned per term. The + // maximum allowed max suggestions is 20. Default value is 20. If left unset + // or set to 0, then will fallback to default value. + int32 max_suggestions = 3; + + // The minimum number of characters needed to be typed in order to get + // suggestions. Default value is 2. If left unset or set to 0, then will + // fallback to default value. + int32 min_prefix_length = 4; + + // If set to true, the auto learning function is enabled. Auto learning uses + // user data to generate suggestions using ML techniques. Default value is + // false. Only after enabling auto learning can users use `cloud-retail` + // data in + // [CompleteQueryRequest][google.cloud.retail.v2alpha.CompleteQueryRequest]. + bool auto_learning = 11; + + // Output only. The input config for the import of the source data that + // contains the autocomplete phrases uploaded by the customer. + CompletionDataInputConfig suggestions_input_config = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the LRO corresponding to the latest suggestion terms + // list import. + // + // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to + // retrieve the latest state of the Long Running Operation. + string last_suggestions_import_operation = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The input config for the import of the source data that + // contains the / autocomplete denylist phrases uploaded by the customer. + CompletionDataInputConfig denylist_input_config = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. LRO corresponding to the latest denylist import. + // + // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to + // retrieve the latest state of the Long Running Operation. + string last_denylist_import_operation = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The input config for the import of the source data that + // contains the autocomplete allowlist phrases uploaded by the customer. + CompletionDataInputConfig allowlist_input_config = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. LRO corresponding to the latest allowlist import. + // + // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to + // retrieve the latest state of the Long Running Operation. + string last_allowlist_import_operation = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Represents a link between a Merchant Center account and a branch. // Once a link is established, products from the linked merchant center account // will be streamed to the linked branch. @@ -125,8 +349,9 @@ message MerchantCenterLink { // ISO 639-1. // // This specifies the language of offers in Merchant Center that will be - // accepted. - // If empty no language filtering will be performed. + // accepted. If empty no language filtering will be performed. + // + // Example value: `en`. string language_code = 5; } diff --git a/google/cloud/retail/v2alpha/catalog_service.proto b/google/cloud/retail/v2alpha/catalog_service.proto index bd7265ac927fa..6ecab7251c30c 100644 --- a/google/cloud/retail/v2alpha/catalog_service.proto +++ b/google/cloud/retail/v2alpha/catalog_service.proto @@ -21,8 +21,6 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/catalog.proto"; -import "google/cloud/retail/v2alpha/import_config.proto"; -import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -93,10 +91,6 @@ service CatalogService { // (if branch is not explicitly set). // * UserEventService will only join events with products from branch // {newBranch}. - // - // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // cloud sales if you are interested in using Retail Search. rpc SetDefaultBranch(SetDefaultBranchRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -109,10 +103,6 @@ service CatalogService { // Get which branch is currently default branch set by // [CatalogService.SetDefaultBranch][google.cloud.retail.v2alpha.CatalogService.SetDefaultBranch] // method under a specified parent catalog. - // - // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // cloud sales if you are interested in using Retail Search. rpc GetDefaultBranch(GetDefaultBranchRequest) returns (GetDefaultBranchResponse) { option (google.api.http) = { @@ -120,6 +110,97 @@ service CatalogService { }; option (google.api.method_signature) = "catalog"; } + + // Gets a [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig]. + rpc GetCompletionConfig(GetCompletionConfigRequest) + returns (CompletionConfig) { + option (google.api.http) = { + get: "/v2alpha/{name=projects/*/locations/*/catalogs/*/completionConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the + // [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig]s. + rpc UpdateCompletionConfig(UpdateCompletionConfigRequest) + returns (CompletionConfig) { + option (google.api.http) = { + patch: "/v2alpha/{completion_config.name=projects/*/locations/*/catalogs/*/completionConfig}" + body: "completion_config" + }; + option (google.api.method_signature) = "completion_config,update_mask"; + } + + // Gets an [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig]. + rpc GetAttributesConfig(GetAttributesConfigRequest) + returns (AttributesConfig) { + option (google.api.http) = { + get: "/v2alpha/{name=projects/*/locations/*/catalogs/*/attributesConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the + // [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig]. + // + // The catalog attributes in the request will be updated in the catalog, or + // inserted if they do not exist. Existing catalog attributes not included in + // the request will remain unchanged. Attributes that are assigned to + // products, but do not exist at the catalog level, are always included in the + // response. The product attribute is assigned default values for missing + // catalog attribute fields, e.g., searchable and dynamic facetable options. + rpc UpdateAttributesConfig(UpdateAttributesConfigRequest) + returns (AttributesConfig) { + option (google.api.http) = { + patch: "/v2alpha/{attributes_config.name=projects/*/locations/*/catalogs/*/attributesConfig}" + body: "attributes_config" + }; + option (google.api.method_signature) = "attributes_config,update_mask"; + } + + // Adds the specified + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to the + // [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig]. + // + // If the [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to + // add already exists, an ALREADY_EXISTS error is returned. + rpc AddCatalogAttribute(AddCatalogAttributeRequest) + returns (AttributesConfig) { + option (google.api.http) = { + post: "/v2alpha/{attributes_config=projects/*/locations/*/catalogs/*/attributesConfig}:addCatalogAttribute" + body: "*" + }; + } + + // Removes the specified + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] from the + // [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig]. + // + // If the [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to + // remove does not exist, a NOT_FOUND error is returned. + rpc RemoveCatalogAttribute(RemoveCatalogAttributeRequest) + returns (AttributesConfig) { + option (google.api.http) = { + post: "/v2alpha/{attributes_config=projects/*/locations/*/catalogs/*/attributesConfig}:removeCatalogAttribute" + body: "*" + }; + } + + // Replaces the specified + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] in the + // [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig] by + // updating the catalog attribute with the same + // [CatalogAttribute.key][google.cloud.retail.v2alpha.CatalogAttribute.key]. + // + // If the [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to + // replace does not exist, a NOT_FOUND error is returned. + rpc ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest) + returns (AttributesConfig) { + option (google.api.http) = { + post: "/v2alpha/{attributes_config=projects/*/locations/*/catalogs/*/attributesConfig}:replaceCatalogAttribute" + body: "*" + }; + } } // Request for @@ -207,6 +288,10 @@ message SetDefaultBranchRequest { // // This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT // error is returned. + // + // If there are no sufficient active products in the targeted branch and + // [force][google.cloud.retail.v2alpha.SetDefaultBranchRequest.force] is not + // set, a FAILED_PRECONDITION error is returned. string branch_id = 2 [ (google.api.resource_reference) = { type: "retail.googleapis.com/Branch" } ]; @@ -218,6 +303,11 @@ message SetDefaultBranchRequest { // This field must be a UTF-8 encoded string with a length limit of 1,000 // characters. Otherwise, an INVALID_ARGUMENT error is returned. string note = 3; + + // If set to true, it permits switching to a branch with + // [branch_id][google.cloud.retail.v2alpha.SetDefaultBranchRequest.branch_id] + // even if it has no sufficient active products. + bool force = 4; } // Request message to show which branch is currently the default branch. @@ -245,3 +335,144 @@ message GetDefaultBranchResponse { // field, when this branch was set as default. string note = 3; } + +// Request for +// [CatalogService.GetCompletionConfig][google.cloud.retail.v2alpha.CatalogService.GetCompletionConfig] +// method. +message GetCompletionConfigRequest { + // Required. Full CompletionConfig resource name. Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "retail.googleapis.com/CompletionConfig" + } + ]; +} + +// Request for +// [CatalogService.UpdateCompletionConfig][google.cloud.retail.v2alpha.CatalogService.UpdateCompletionConfig] +// method. +message UpdateCompletionConfigRequest { + // Required. The + // [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig] to update. + // + // If the caller does not have permission to update the + // [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig], then a + // PERMISSION_DENIED error is returned. + // + // If the [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig] to + // update does not exist, a NOT_FOUND error is returned. + CompletionConfig completion_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Indicates which fields in the provided + // [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig] to update. + // The following are the only supported fields: + // + // * [CompletionConfig.matching_order][google.cloud.retail.v2alpha.CompletionConfig.matching_order] + // * [CompletionConfig.max_suggestions][google.cloud.retail.v2alpha.CompletionConfig.max_suggestions] + // * [CompletionConfig.min_prefix_length][google.cloud.retail.v2alpha.CompletionConfig.min_prefix_length] + // * [CompletionConfig.auto_learning][google.cloud.retail.v2alpha.CompletionConfig.auto_learning] + // + // If not set, all supported fields are updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request for +// [CatalogService.GetAttributesConfig][google.cloud.retail.v2alpha.CatalogService.GetAttributesConfig] +// method. +message GetAttributesConfigRequest { + // Required. Full AttributesConfig resource name. Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "retail.googleapis.com/AttributesConfig" + } + ]; +} + +// Request for +// [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2alpha.CatalogService.UpdateAttributesConfig] +// method. +message UpdateAttributesConfigRequest { + // Required. The + // [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig] to update. + AttributesConfig attributes_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Indicates which fields in the provided + // [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig] to update. + // The following is the only supported field: + // + // * [AttributesConfig.catalog_attributes][google.cloud.retail.v2alpha.AttributesConfig.catalog_attributes] + // + // If not set, all supported fields are updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request for +// [CatalogService.AddCatalogAttribute][google.cloud.retail.v2alpha.CatalogService.AddCatalogAttribute] +// method. +message AddCatalogAttributeRequest { + // Required. Full AttributesConfig resource name. Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + string attributes_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "retail.googleapis.com/AttributesConfig" + } + ]; + + // Required. The + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to add. + CatalogAttribute catalog_attribute = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request for +// [CatalogService.RemoveCatalogAttribute][google.cloud.retail.v2alpha.CatalogService.RemoveCatalogAttribute] +// method. +message RemoveCatalogAttributeRequest { + // Required. Full AttributesConfig resource name. Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + string attributes_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "retail.googleapis.com/AttributesConfig" + } + ]; + + // Required. The attribute name key of the + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to remove. + string key = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for +// [CatalogService.ReplaceCatalogAttribute][google.cloud.retail.v2alpha.CatalogService.ReplaceCatalogAttribute] +// method. +message ReplaceCatalogAttributeRequest { + // Required. Full AttributesConfig resource name. Format: + // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig + string attributes_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "retail.googleapis.com/AttributesConfig" + } + ]; + + // Required. The updated + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]. + CatalogAttribute catalog_attribute = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Indicates which fields in the provided + // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to update. + // The following are NOT supported: + // + // * [CatalogAttribute.key][google.cloud.retail.v2alpha.CatalogAttribute.key] + // + // If not set, all supported fields are updated. + google.protobuf.FieldMask update_mask = 3; +} diff --git a/google/cloud/retail/v2alpha/common.proto b/google/cloud/retail/v2alpha/common.proto index 696bd73f2bcae..ae33d3f60b4de 100644 --- a/google/cloud/retail/v2alpha/common.proto +++ b/google/cloud/retail/v2alpha/common.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.retail.v2alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; @@ -29,6 +28,21 @@ option objc_class_prefix = "RETAIL"; option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; option ruby_package = "Google::Cloud::Retail::V2alpha"; +// At which level we offer configuration for attributes. +enum AttributeConfigLevel { + // Value used when unset. Defaults to + // [CATALOG_LEVEL_ATTRIBUTE_CONFIG][google.cloud.retail.v2alpha.AttributeConfigLevel.CATALOG_LEVEL_ATTRIBUTE_CONFIG]. + ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED = 0; + + // At this level, we honor the attribute configurations set in + // [Product.attributes][google.cloud.retail.v2alpha.Product.attributes]. + PRODUCT_LEVEL_ATTRIBUTE_CONFIG = 1; + + // At this level, we honor the attribute configurations set in + // [CatalogConfig.attribute_configs][google.cloud.retail.v2alpha.CatalogConfig.attribute_configs]. + CATALOG_LEVEL_ATTRIBUTE_CONFIG = 2; +} + // The type of solution. enum SolutionType { // Default value. @@ -41,6 +55,21 @@ enum SolutionType { SOLUTION_TYPE_SEARCH = 2; } +// The use case of Cloud Retail Search. +enum SearchSolutionUseCase { + // The value when it's unspecified. Defaults to + // [SEARCH][]. + SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0; + + // Search use case. Expects the traffic has a non-empty + // [query][google.cloud.retail.v2alpha.SearchRequest.query]. + SEARCH_SOLUTION_USE_CASE_SEARCH = 1; + + // Browse use case. Expects the traffic has an empty + // [query][google.cloud.retail.v2alpha.SearchRequest.query]. + SEARCH_SOLUTION_USE_CASE_BROWSE = 2; +} + // Metadata that is used to define a condition that triggers an action. // A valid condition must specify at least one of 'query_terms' or // 'products_filter'. If multiple fields are specified, the condition is met if @@ -343,6 +372,9 @@ message CustomAttribute { // The textual values of this custom attribute. For example, `["yellow", // "green"]` when the key is "color". // + // Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is + // returned. + // // Exactly one of [text][google.cloud.retail.v2alpha.CustomAttribute.text] or // [numbers][google.cloud.retail.v2alpha.CustomAttribute.numbers] should be // set. Otherwise, an INVALID_ARGUMENT error is returned. @@ -356,7 +388,11 @@ message CustomAttribute { // set. Otherwise, an INVALID_ARGUMENT error is returned. repeated double numbers = 2; - // If true, custom attribute values are searchable by text queries in + // This field will only be used when + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + // of the [Catalog][google.cloud.retail.v2alpha.Catalog] is + // 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are + // searchable by text queries in // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. // // This field is ignored in a @@ -366,8 +402,11 @@ message CustomAttribute { // is set. Otherwise, a INVALID_ARGUMENT error is returned. optional bool searchable = 3; - // If true, custom attribute values are indexed, so that it can be filtered, - // faceted or boosted in + // This field will only be used when + // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level] + // of the [Catalog][google.cloud.retail.v2alpha.Catalog] is + // 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG', if true, custom attribute values are + // indexed, so that it can be filtered, faceted or boosted in // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search]. // // This field is ignored in a @@ -418,7 +457,10 @@ message FulfillmentInfo { repeated string place_ids = 2; } -// [Product][google.cloud.retail.v2alpha.Product] thumbnail/detail image. +// [Product][google.cloud.retail.v2alpha.Product] image. Recommendations AI and +// Retail Search do not use product images to improve prediction and search +// results. However, product images can be returned in results, and are shown in +// prediction or search previews in the console. message Image { // Required. URI of the image. // @@ -610,19 +652,24 @@ message UserInfo { // Highly recommended for logged-in users. Unique identifier for logged-in // user, such as a user name. // + // Always use a hashed value for this ID. + // // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an INVALID_ARGUMENT error is returned. string user_id = 1; - // The end user's IP address. Required for getting - // [SearchResponse.sponsored_results][google.cloud.retail.v2alpha.SearchResponse.sponsored_results]. - // This field is used to extract location information for personalization. + // The end user's IP address. This field is used to extract location + // information for personalization. // // This field must be either an IPv4 address (e.g. "104.133.9.80") or an IPv6 // address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334"). Otherwise, an // INVALID_ARGUMENT error is returned. // - // This should not be set when using the JavaScript tag in + // This should not be set when: + // + // * setting + // [SearchRequest.user_info][google.cloud.retail.v2alpha.SearchRequest.user_info]. + // * using the JavaScript tag in // [UserEventService.CollectUserEvent][google.cloud.retail.v2alpha.UserEventService.CollectUserEvent] // or if // [direct_user_request][google.cloud.retail.v2alpha.UserInfo.direct_user_request] @@ -655,20 +702,6 @@ message UserInfo { bool direct_user_request = 4; } -// Promotion information. -message Promotion { - // ID of the promotion. For example, "free gift". - // - // The value value must be a UTF-8 encoded string with a length limit of 128 - // characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, - // id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is - // returned. - // - // Google Merchant Center property - // [promotion](https://support.google.com/merchants/answer/7050148). - string promotion_id = 1; -} - // The inventory information at a place (e.g. a store) identified // by a place ID. message LocalInventory { @@ -693,11 +726,36 @@ message LocalInventory { // * The key must match the pattern: `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, // key0LikeThis or KEY_1_LIKE_THIS. // * The attribute values must be of the same type (text or number). - // * The max number of values per attribute is 10. + // * Only 1 value is allowed for each attribute. // * For text values, the length limit is 256 UTF-8 characters. // * The attribute does not support search. The `searchable` field should be // unset or set to false. // * The max summed total bytes of custom attribute keys and values per // product is 5MiB. map attributes = 3; + + // Input only. Supported fulfillment types. Valid fulfillment type values + // include commonly used types (such as pickup in store and same day + // delivery), and custom types. Customers have to map custom types to their + // display names before rendering UI. + // + // Supported values: + // + // * "pickup-in-store" + // * "ship-to-store" + // * "same-day-delivery" + // * "next-day-delivery" + // * "custom-type-1" + // * "custom-type-2" + // * "custom-type-3" + // * "custom-type-4" + // * "custom-type-5" + // + // If this field is set to an invalid value other than these, an + // INVALID_ARGUMENT error is returned. + // + // All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is + // returned. + repeated string fulfillment_types = 4 + [(google.api.field_behavior) = INPUT_ONLY]; } diff --git a/google/cloud/retail/v2alpha/completion_service.proto b/google/cloud/retail/v2alpha/completion_service.proto index 6cd364e95d301..a91aa6187349d 100644 --- a/google/cloud/retail/v2alpha/completion_service.proto +++ b/google/cloud/retail/v2alpha/completion_service.proto @@ -36,8 +36,7 @@ option ruby_package = "Google::Cloud::Retail::V2alpha"; // Auto-completion service for retail. // // This feature is only available for users who have Retail Search enabled. -// Please submit a form [here](https://cloud.google.com/contact) to contact -// cloud sales if you are interested in using Retail Search. +// Please 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) = @@ -46,8 +45,7 @@ service CompletionService { // Completes the specified prefix with keyword suggestions. // // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // cloud sales if you are interested in using Retail Search. + // Please enable Retail Search on Cloud Console before using this feature. rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { option (google.api.http) = { get: "/v2alpha/{catalog=projects/*/locations/*/catalogs/*}:completeQuery" @@ -56,11 +54,13 @@ service CompletionService { // Bulk import of processed completion dataset. // - // Request processing may be synchronous. Partial updating is not supported. + // 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 submit a form [here](https://cloud.google.com/contact) to contact - // cloud sales if you are interested in using Retail Search. + // Please enable Retail Search on Cloud Console before using this feature. rpc ImportCompletionData(ImportCompletionDataRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -90,22 +90,21 @@ message CompleteQueryRequest { // The maximum number of allowed characters is 255. string query = 2 [(google.api.field_behavior) = REQUIRED]; - // A unique identifier for tracking visitors. For example, this could be - // implemented with an HTTP cookie, which should be able to uniquely identify - // a visitor on a single device. This unique identifier should not change if - // the visitor logs in or out of the website. + // Required field. A unique identifier for tracking visitors. For example, + // this could be implemented with an HTTP cookie, which should be able to + // uniquely identify a visitor on a single device. This unique identifier + // should not change if the visitor logs in or out of the website. // // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an INVALID_ARGUMENT error is returned. string visitor_id = 7; - // The list of languages of the query. This is - // the BCP-47 language code, such as "en-US" or "sr-Latn". - // For more information, see - // [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). - // - // The maximum number of allowed characters is 255. - // Only "en-US" is currently supported. + // The language filters applied to the output suggestions. If set, it should + // contain the language of the query. If not set, suggestions are returned + // without considering language restrictions. This is the BCP-47 language + // code, such as "en-US" or "sr-Latn". For more information, see [Tags for + // Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum + // number of language codes is 3. repeated string language_codes = 3; // The device type context for completion suggestions. @@ -155,7 +154,11 @@ message CompleteQueryResponse { // The suggestion for the query. string suggestion = 1; - // Additional custom attributes ingested through BigQuery. + // Custom attributes for the suggestion term. + // * For "user-data", the attributes are additional custom attributes + // ingested through BigQuery. + // * For "cloud-retail", the attributes are product attributes generated + // by Cloud Retail. map attributes = 2; } @@ -170,9 +173,9 @@ message CompleteQueryResponse { repeated CompletionResult completion_results = 1; // A unique complete token. This should be included in the - // [SearchRequest][google.cloud.retail.v2alpha.SearchRequest] resulting from - // this completion, which enables accurate attribution of complete model - // performance. + // [UserEvent.completion_detail][google.cloud.retail.v2alpha.UserEvent.completion_detail] + // for search events resulting from this completion, which enables accurate + // attribution of complete model performance. string attribution_token = 2; // Matched recent searches of this user. The maximum number of recent searches diff --git a/google/cloud/retail/v2alpha/control.proto b/google/cloud/retail/v2alpha/control.proto index da5fcc9ffa1c5..4d85015e4d8f5 100644 --- a/google/cloud/retail/v2alpha/control.proto +++ b/google/cloud/retail/v2alpha/control.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.retail.v2alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/common.proto"; @@ -76,8 +75,18 @@ message Control { // time. // // Only `SOLUTION_TYPE_SEARCH` value is supported at the moment. + // If no solution type is provided at creation time, will default to + // SOLUTION_TYPE_SEARCH. repeated SolutionType solution_types = 6 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; + + // Required. Specifies the use case for the control. + // Affects what condition fields can be set. + // Only settable by search controls. + // Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. + // Currently only allow one search_solution_use_case per control. + repeated SearchSolutionUseCase search_solution_use_case = 7 + [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/retail/v2alpha/control_service.proto b/google/cloud/retail/v2alpha/control_service.proto index 8ac8f3c9538b1..6372aca6a39e7 100644 --- a/google/cloud/retail/v2alpha/control_service.proto +++ b/google/cloud/retail/v2alpha/control_service.proto @@ -21,8 +21,6 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/control.proto"; -import "google/cloud/retail/v2alpha/import_config.proto"; -import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -34,10 +32,6 @@ option java_package = "com.google.cloud.retail.v2alpha"; option objc_class_prefix = "RETAIL"; option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; option ruby_package = "Google::Cloud::Retail::V2alpha"; -option (google.api.resource_definition) = { - type: "retail.googleapis.com/Catalog" - pattern: "projects/{project}/locations/{location}/catalogs/{catalog}" -}; // Service for modifying Control. service ControlService { diff --git a/google/cloud/retail/v2alpha/export_config.proto b/google/cloud/retail/v2alpha/export_config.proto index 6b3934fa2cb62..f29c7f9a3fbb3 100644 --- a/google/cloud/retail/v2alpha/export_config.proto +++ b/google/cloud/retail/v2alpha/export_config.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.retail.v2alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; diff --git a/google/cloud/retail/v2alpha/import_config.proto b/google/cloud/retail/v2alpha/import_config.proto index b8cc15f89e361..a1fcf240c4688 100644 --- a/google/cloud/retail/v2alpha/import_config.proto +++ b/google/cloud/retail/v2alpha/import_config.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.retail.v2alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/product.proto"; @@ -122,8 +121,19 @@ message BigQuerySource { // // * `user_event` (default): One JSON // [UserEvent][google.cloud.retail.v2alpha.UserEvent] per line. - // * `user_event_ga360`: Using + // * `user_event_ga360`: + // The schema is available here: // https://support.google.com/analytics/answer/3437719. + // * `user_event_ga4`: This feature is in private preview. Please contact the + // support team for importing Google Analytics 4 events. + // The schema is available here: + // https://support.google.com/analytics/answer/7029846. + // + // Supported values for auto-completion imports: + // + // * `suggestions` (default): One JSON completion suggestion per line. + // * `denylist`: One JSON deny suggestion per line. + // * `allowlist`: One JSON allow suggestion per line. string data_schema = 4; } @@ -145,9 +155,9 @@ message UserEventInlineSource { message ImportErrorsConfig { // Required. Errors destination. oneof destination { - // Google Cloud Storage path for import errors. This must be an empty, - // existing Cloud Storage bucket. Import errors will be written to a file in - // this bucket, one per line, as a JSON-encoded + // Google Cloud Storage prefix for import errors. This must be an empty, + // existing Cloud Storage directory. Import errors will be written to + // sharded files in this directory, one per line, as a JSON-encoded // `google.rpc.Status` message. string gcs_prefix = 1; } @@ -167,16 +177,15 @@ message ImportProductsRequest { // Calculates diff and replaces the entire product dataset. Existing // products may be deleted if they are not present in the source location. // - // Can only be while using - // [BigQuerySource][google.cloud.retail.v2alpha.BigQuerySource]. + // Can only be set while using + // [BigQuerySource][google.cloud.retail.v2alpha.BigQuerySource]. And the + // BigQuery dataset must be created in the data location "us (multiple + // regions in United States)", otherwise a PERMISSION_DENIED error is + // thrown. // // Add the IAM permission "BigQuery Data Viewer" for // cloud-retail-customer-data-access@system.gserviceaccount.com before // using this feature otherwise an error is thrown. - // - // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // cloud sales if you are interested in using Retail Search. FULL = 2; } @@ -190,16 +199,8 @@ message ImportProductsRequest { (google.api.resource_reference) = { type: "retail.googleapis.com/Branch" } ]; - // Unique identifier provided by client, within the ancestor - // dataset scope. Ensures idempotency and used for request deduplication. - // Server-generated if unspecified. Up to 128 characters long and must match - // the pattern: `[a-zA-Z0-9_]+`. This is returned as [Operation.name][] in - // [ImportMetadata][google.cloud.retail.v2alpha.ImportMetadata]. - // - // Only supported when - // [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2alpha.ImportProductsRequest.reconciliation_mode] - // is set to `FULL`. - string request_id = 6; + // Deprecated. This field has no effect. + string request_id = 6 [deprecated = true]; // Required. The desired input location of the data. ProductInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; @@ -337,9 +338,8 @@ message ImportMetadata { // Count of entries that encountered errors while processing. int64 failure_count = 4; - // Id of the request / operation. This is parroting back the requestId - // that was passed in the request. - string request_id = 5; + // Deprecated. This field is never set. + string request_id = 5 [deprecated = true]; // Pub/Sub topic for receiving notification. If this field is set, // when the import is finished, a notification will be sent to diff --git a/google/cloud/retail/v2alpha/prediction_service.proto b/google/cloud/retail/v2alpha/prediction_service.proto index b293caf76f09b..5b89bceb40fb1 100644 --- a/google/cloud/retail/v2alpha/prediction_service.proto +++ b/google/cloud/retail/v2alpha/prediction_service.proto @@ -97,9 +97,12 @@ message PredictRequest { // * filterOutOfStockItems tag=(-"promotional") // * filterOutOfStockItems // - // If your filter blocks all prediction results, nothing will be returned. If - // you want generic (unfiltered) popular products to be returned instead, set - // `strictFiltering` to false in `PredictRequest.params`. + // 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. string filter = 5; // Use validate only mode for this prediction query. If set to true, a diff --git a/google/cloud/retail/v2alpha/product.proto b/google/cloud/retail/v2alpha/product.proto index 0d6fef3e97ed3..cbadc568119d0 100644 --- a/google/cloud/retail/v2alpha/product.proto +++ b/google/cloud/retail/v2alpha/product.proto @@ -16,10 +16,10 @@ syntax = "proto3"; package google.cloud.retail.v2alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/common.proto"; +import "google/cloud/retail/v2alpha/promotion.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -332,8 +332,8 @@ message Product { // `[a-zA-Z0-9][a-zA-Z0-9_]*`. For example, `key0LikeThis` or // `KEY_1_LIKE_THIS`. // * For text attributes, at most 400 values are allowed. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length limit of - // 256 characters. + // allowed. Each value must be a non-empty UTF-8 encoded string with a + // length limit of 256 characters. // * For number attributes, at most 400 values are allowed. map attributes = 12; @@ -399,8 +399,8 @@ message Product { // property [Offer.url](https://schema.org/url). string uri = 22; - // Product images for the product.Highly recommended to put the main image - // to the first. + // Product images for the product. We highly recommend putting the main + // image first. // // A maximum of 300 images are allowed. // @@ -443,7 +443,7 @@ message Product { // The material of the product. For example, "leather", "wooden". // // A maximum of 20 values are allowed. Each value must be a UTF-8 encoded - // string with a length limit of 128 characters. Otherwise, an + // string with a length limit of 200 characters. Otherwise, an // INVALID_ARGUMENT error is returned. // // Corresponding properties: Google Merchant Center property @@ -479,7 +479,9 @@ message Product { repeated string conditions = 29; // The promotions applied to the product. A maximum of 10 values are allowed - // per [Product][google.cloud.retail.v2alpha.Product]. + // per [Product][google.cloud.retail.v2alpha.Product]. Only + // [Promotion.promotion_id][google.cloud.retail.v2alpha.Promotion.promotion_id] + // will be used, other fields will be ignored if set. repeated Promotion promotions = 34; // The timestamp when the product is published by the retailer for the first diff --git a/google/cloud/retail/v2alpha/product_service.proto b/google/cloud/retail/v2alpha/product_service.proto index 23bb0ff69f85f..7bced3fb3dd60 100644 --- a/google/cloud/retail/v2alpha/product_service.proto +++ b/google/cloud/retail/v2alpha/product_service.proto @@ -21,7 +21,6 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/common.proto"; -import "google/cloud/retail/v2alpha/export_config.proto"; import "google/cloud/retail/v2alpha/import_config.proto"; import "google/cloud/retail/v2alpha/product.proto"; import "google/cloud/retail/v2alpha/purge_config.proto"; @@ -88,6 +87,34 @@ service ProductService { option (google.api.method_signature) = "name"; } + // Permanently deletes all selected + // [Product][google.cloud.retail.v2alpha.Product]s under a branch. + // + // This process is asynchronous. If the request is valid, the removal will be + // enqueued and processed offline. Depending on the number of + // [Product][google.cloud.retail.v2alpha.Product]s, this operation could take + // hours to complete. Before the operation completes, some + // [Product][google.cloud.retail.v2alpha.Product]s may still be returned by + // [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or + // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. + // + // Depending on the number of [Product][google.cloud.retail.v2alpha.Product]s, + // this operation could take hours to complete. To get a sample of + // [Product][google.cloud.retail.v2alpha.Product]s that would be deleted, set + // [PurgeProductsRequest.force][google.cloud.retail.v2alpha.PurgeProductsRequest.force] + // to false. + rpc PurgeProducts(PurgeProductsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v2alpha/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:purge" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.retail.v2alpha.PurgeProductsResponse" + metadata_type: "google.cloud.retail.v2alpha.PurgeProductsMetadata" + }; + } + // Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s. // // Request processing may be synchronous. No partial updating is supported. @@ -137,7 +164,8 @@ service ProductService { // [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product], // then any pre-existing inventory information for this product will be used. // - // If no inventory fields are set in [UpdateProductRequest.set_mask][], + // If no inventory fields are set in + // [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask], // then any existing inventory information will be preserved. // // Pre-existing inventory information can only be updated with @@ -147,8 +175,7 @@ service ProductService { // [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces]. // // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // cloud sales if you are interested in using Retail Search. + // Please enable Retail Search on Cloud Console before using this feature. rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2alpha/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory" @@ -174,8 +201,7 @@ service ProductService { // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // cloud sales if you are interested in using Retail Search. + // Please enable Retail Search on Cloud Console before using this feature. rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -202,8 +228,7 @@ service ProductService { // [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts]. // // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // cloud sales if you are interested in using Retail Search. + // Please enable Retail Search on Cloud Console before using this feature. rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -237,8 +262,7 @@ service ProductService { // has no effect on local inventories. // // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // Cloud sales if you are interested in using Retail Search. + // Please enable Retail Search on Cloud Console before using this feature. rpc AddLocalInventories(AddLocalInventoriesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -270,8 +294,7 @@ service ProductService { // has no effect on local inventories. // // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // Cloud sales if you are interested in using Retail Search. + // Please enable Retail Search on Cloud Console before using this feature. rpc RemoveLocalInventories(RemoveLocalInventoriesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -547,6 +570,24 @@ message SetInventoryRequest { // using the provided or default value for // [SetInventoryRequest.set_time][google.cloud.retail.v2alpha.SetInventoryRequest.set_time]. // + // The caller can replace place IDs for a subset of fulfillment types in the + // following ways: + // + // * Adds "fulfillment_info" in + // [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] + // * Specifies only the desired fulfillment types and corresponding place IDs + // to update in [SetInventoryRequest.inventory.fulfillment_info][] + // + // The caller can clear all place IDs from a subset of fulfillment types in + // the following ways: + // + // * Adds "fulfillment_info" in + // [SetInventoryRequest.set_mask][google.cloud.retail.v2alpha.SetInventoryRequest.set_mask] + // * Specifies only the desired fulfillment types to clear in + // [SetInventoryRequest.inventory.fulfillment_info][] + // * Checks that only the desired fulfillment info types have empty + // [SetInventoryRequest.inventory.fulfillment_info.place_ids][] + // // The last update time is recorded for the following inventory fields: // * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info] // * [Product.availability][google.cloud.retail.v2alpha.Product.availability] diff --git a/google/cloud/retail/v2alpha/promotion.proto b/google/cloud/retail/v2alpha/promotion.proto new file mode 100644 index 0000000000000..879449a42bb9b --- /dev/null +++ b/google/cloud/retail/v2alpha/promotion.proto @@ -0,0 +1,40 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.retail.v2alpha; + +option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; +option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2alpha;retail"; +option java_multiple_files = true; +option java_outer_classname = "PromotionProto"; +option java_package = "com.google.cloud.retail.v2alpha"; +option objc_class_prefix = "RETAIL"; +option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; +option ruby_package = "Google::Cloud::Retail::V2alpha"; + +// Promotion information. +message Promotion { + // ID of the promotion. For example, "free gift". + // + // The value must be a UTF-8 encoded string with a length limit of 128 + // characters, and match the pattern: `[a-zA-Z][a-zA-Z0-9_]*`. For example, + // id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is + // returned. + // + // Google Merchant Center property + // [promotion](https://support.google.com/merchants/answer/7050148). + string promotion_id = 1; +} diff --git a/google/cloud/retail/v2alpha/purge_config.proto b/google/cloud/retail/v2alpha/purge_config.proto index 638e8f67b840b..6b929f268c696 100644 --- a/google/cloud/retail/v2alpha/purge_config.proto +++ b/google/cloud/retail/v2alpha/purge_config.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.retail.v2alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; @@ -34,6 +33,96 @@ option ruby_package = "Google::Cloud::Retail::V2alpha"; // This will be returned by the google.longrunning.Operation.metadata field. message PurgeMetadata {} +// Metadata related to the progress of the PurgeProducts operation. +// This will be returned by the google.longrunning.Operation.metadata field. +message PurgeProductsMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of entries that were deleted successfully. + int64 success_count = 3; + + // Count of entries that encountered errors while processing. + int64 failure_count = 4; +} + +// Request message for PurgeProducts method. +message PurgeProductsRequest { + // Required. The resource name of the branch under which the products are + // created. The format is + // `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "retail.googleapis.com/Branch" } + ]; + + // Required. The filter string to specify the products to be deleted with a + // length limit of 5,000 characters. + // + // Empty string filter is not allowed. "*" implies delete all items in a + // branch. + // + // The eligible fields for filtering are: + // + // * `availability`: Double quoted + // [Product.availability][google.cloud.retail.v2alpha.Product.availability] + // string. + // * `create_time` : in ISO 8601 "zulu" format. + // + // Supported syntax: + // + // * Comparators (">", "<", ">=", "<=", "="). + // Examples: + // * create_time <= "2015-02-13T17:05:46Z" + // * availability = "IN_STOCK" + // + // * Conjunctions ("AND") + // Examples: + // * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER" + // + // * Disjunctions ("OR") + // Examples: + // * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK" + // + // * Can support nested queries. + // Examples: + // * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER") + // OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK") + // + // * Filter Limits: + // * Filter should not contain more than 6 conditions. + // * Max nesting depth should not exceed 2 levels. + // + // Examples queries: + // * Delete back order products created before a timestamp. + // create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER" + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Actually perform the purge. + // If `force` is set to false, the method will return the expected purge count + // without deleting any products. + bool force = 3; +} + +// Response of the PurgeProductsRequest. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +message PurgeProductsResponse { + // The total count of products purged as a result of the operation. + int64 purge_count = 1; + + // A sample of the product names that will be deleted. + // Only populated if `force` is set to false. A max of 100 names will be + // returned and the names are chosen at random. + repeated string purge_sample = 2 [ + (google.api.resource_reference) = { type: "retail.googleapis.com/Product" } + ]; +} + // Request message for PurgeUserEvents method. message PurgeUserEventsRequest { // Required. The resource name of the catalog under which the events are diff --git a/google/cloud/retail/v2alpha/retail_v2alpha.yaml b/google/cloud/retail/v2alpha/retail_v2alpha.yaml index 28c5abf72a4d0..208fe57e2e0bf 100644 --- a/google/cloud/retail/v2alpha/retail_v2alpha.yaml +++ b/google/cloud/retail/v2alpha/retail_v2alpha.yaml @@ -6,15 +6,19 @@ title: Retail API apis: - name: google.cloud.retail.v2alpha.CatalogService - name: google.cloud.retail.v2alpha.CompletionService +- name: google.cloud.retail.v2alpha.ControlService - name: google.cloud.retail.v2alpha.PredictionService - name: google.cloud.retail.v2alpha.ProductService - name: google.cloud.retail.v2alpha.SearchService +- name: google.cloud.retail.v2alpha.ServingConfigService - name: google.cloud.retail.v2alpha.UserEventService types: - name: google.cloud.retail.logging.ErrorLog - name: google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata - name: google.cloud.retail.v2alpha.AddFulfillmentPlacesResponse +- name: google.cloud.retail.v2alpha.AddLocalInventoriesMetadata +- name: google.cloud.retail.v2alpha.AddLocalInventoriesResponse - name: google.cloud.retail.v2alpha.ExportErrorsConfig - name: google.cloud.retail.v2alpha.ExportMetadata - name: google.cloud.retail.v2alpha.ExportProductsResponse @@ -25,11 +29,15 @@ types: - name: google.cloud.retail.v2alpha.ImportProductsResponse - name: google.cloud.retail.v2alpha.ImportUserEventsResponse - name: google.cloud.retail.v2alpha.PurgeMetadata +- name: google.cloud.retail.v2alpha.PurgeProductsMetadata +- name: google.cloud.retail.v2alpha.PurgeProductsResponse - name: google.cloud.retail.v2alpha.PurgeUserEventsResponse - name: google.cloud.retail.v2alpha.RejoinUserEventsMetadata - name: google.cloud.retail.v2alpha.RejoinUserEventsResponse - name: google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata - name: google.cloud.retail.v2alpha.RemoveFulfillmentPlacesResponse +- name: google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata +- name: google.cloud.retail.v2alpha.RemoveLocalInventoriesResponse - name: google.cloud.retail.v2alpha.SetInventoryMetadata - name: google.cloud.retail.v2alpha.SetInventoryResponse @@ -47,6 +55,8 @@ documentation: backend: rules: + - selector: google.cloud.retail.v2alpha.CatalogService.UpdateCatalog + deadline: 10.0 - selector: 'google.cloud.retail.v2alpha.ProductService.*' deadline: 30.0 - selector: google.cloud.retail.v2alpha.ProductService.ImportProducts @@ -61,14 +71,16 @@ backend: http: rules: - selector: google.longrunning.Operations.GetOperation - get: '/v2alpha/{name=projects/*/locations/*/operations/*}' + get: '/v2alpha/{name=projects/*/locations/*/catalogs/*/branches/*/operations/*}' additional_bindings: - get: '/v2alpha/{name=projects/*/locations/*/catalogs/*/operations/*}' - - get: '/v2alpha/{name=projects/*/locations/*/catalogs/*/branches/*/operations/*}' + - get: '/v2alpha/{name=projects/*/locations/*/operations/*}' + - get: '/v2alpha/{name=projects/*/operations/*}' - selector: google.longrunning.Operations.ListOperations - get: '/v2alpha/{name=projects/*/locations/*}/operations' + get: '/v2alpha/{name=projects/*/locations/*/catalogs/*}/operations' additional_bindings: - - get: '/v2alpha/{name=projects/*/locations/*/catalogs/*}/operations' + - get: '/v2alpha/{name=projects/*/locations/*}/operations' + - get: '/v2alpha/{name=projects/*}/operations' authentication: rules: @@ -92,6 +104,10 @@ authentication: oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.retail.v2alpha.ControlService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform - selector: google.cloud.retail.v2alpha.PredictionService.Predict oauth: canonical_scopes: |- @@ -104,6 +120,10 @@ authentication: oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform + - selector: 'google.cloud.retail.v2alpha.ServingConfigService.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform - selector: 'google.cloud.retail.v2alpha.UserEventService.*' oauth: canonical_scopes: |- diff --git a/google/cloud/retail/v2alpha/search_service.proto b/google/cloud/retail/v2alpha/search_service.proto index aec89f85c4521..f9612734dbf15 100644 --- a/google/cloud/retail/v2alpha/search_service.proto +++ b/google/cloud/retail/v2alpha/search_service.proto @@ -24,8 +24,6 @@ import "google/cloud/retail/v2alpha/common.proto"; import "google/cloud/retail/v2alpha/product.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Cloud.Retail.V2Alpha"; option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2alpha;retail"; @@ -39,8 +37,7 @@ option ruby_package = "Google::Cloud::Retail::V2alpha"; // Service for search. // // This feature is only available for users who have Retail Search enabled. -// Please submit a form [here](https://cloud.google.com/contact) to contact -// cloud sales if you are interested in using Retail Search. +// Please 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) = @@ -49,8 +46,7 @@ service SearchService { // Performs a search. // // This feature is only available for users who have Retail Search enabled. - // Please submit a form [here](https://cloud.google.com/contact) to contact - // cloud sales if you are interested in using Retail Search. + // Please enable Retail Search on Cloud Console before using this feature. rpc Search(SearchRequest) returns (SearchResponse) { option (google.api.http) = { post: "/v2alpha/{placement=projects/*/locations/*/catalogs/*/placements/*}:search" @@ -325,6 +321,14 @@ message SearchRequest { // applied and combined in a non-linear way. Maximum number of // specifications is 10. repeated ConditionBoostSpec condition_boost_specs = 1; + + // Whether to skip boostspec validation. If this field is set to true, + // invalid + // [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs] + // will be ignored and valid + // [BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs] + // will still be applied. + optional bool skip_boost_spec_validation = 2; } // Specification to determine under which conditions query expansion should @@ -355,6 +359,26 @@ message SearchRequest { bool pin_unexpanded_results = 2; } + // The specification for personalization. + message PersonalizationSpec { + // The personalization mode of each search request. + enum Mode { + // Default value. Defaults to + // [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.Mode.AUTO]. + MODE_UNSPECIFIED = 0; + + // Let CRS decide whether to use personalization. + AUTO = 1; + + // Disable personalization. + DISABLED = 2; + } + + // Defaults to + // [Mode.AUTO][google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.Mode.AUTO]. + Mode mode = 1; + } + // The relevance threshold of the search results. The higher relevance // threshold is, the higher relevant results are shown and the less number of // results are returned. @@ -406,7 +430,7 @@ message SearchRequest { } // Required. The resource name of the search engine placement, such as - // `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. + // `projects/*/locations/global/catalogs/default_catalog/placements/default_search` // This field is used to identify the serving configuration name and the set // of models that will be used to make the search. string placement = 1 [(google.api.field_behavior) = REQUIRED]; @@ -475,6 +499,9 @@ message SearchRequest { // If this field is unrecognizable, an INVALID_ARGUMENT is returned. string filter = 10; + // The default filter that is applied when a user performs a search without + // checking any filters on the search page. + // // The filter applied to every search request when quality improvement such as // query expansion is needed. For example, if a query does not have enough // results, an expanded query with @@ -502,12 +529,12 @@ message SearchRequest { // is returned. repeated FacetSpec facet_specs = 12; + // Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic + // to enable dynamic facets. Do not set this field. + // // The specification for dynamically generated facets. Notice that only // textual facets can be dynamically generated. - // - // This feature requires additional allowlisting. Contact Retail Search - // support team if you are interested in using dynamic facet feature. - DynamicFacetSpec dynamic_facet_spec = 21; + DynamicFacetSpec dynamic_facet_spec = 21 [deprecated = true]; // Boost specification to boost certain products. See more details at this // [user guide](https://cloud.google.com/retail/docs/boosting). @@ -631,6 +658,9 @@ message SearchRequest { // The search mode of the search request. If not specified, a single search // request triggers both product search and faceted search. SearchMode search_mode = 31; + + // The specification for personalization. + PersonalizationSpec personalization_spec = 32; } // Response message for @@ -793,4 +823,10 @@ message SearchResponse { // The fully qualified resource name of applied // [controls](https://cloud.google.com/retail/docs/serving-control-rules). repeated string applied_controls = 12; + + // The invalid + // [SearchRequest.BoostSpec.condition_boost_specs][google.cloud.retail.v2alpha.SearchRequest.BoostSpec.condition_boost_specs] + // that are not applied during serving. + repeated SearchRequest.BoostSpec.ConditionBoostSpec + invalid_condition_boost_specs = 14; } diff --git a/google/cloud/retail/v2alpha/serving_config.proto b/google/cloud/retail/v2alpha/serving_config.proto index e4005517c9dff..c339f3106d486 100644 --- a/google/cloud/retail/v2alpha/serving_config.proto +++ b/google/cloud/retail/v2alpha/serving_config.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.retail.v2alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/common.proto"; @@ -111,7 +110,7 @@ message ServingConfig { // Condition boost specifications. If a product matches multiple conditions // in the specifications, boost scores from these specifications are all // applied and combined in a non-linear way. Maximum number of - // specifications is 10. + // specifications is 100. // // Notice that if both // [ServingConfig.boost_control_ids][google.cloud.retail.v2alpha.ServingConfig.boost_control_ids] @@ -139,7 +138,7 @@ message ServingConfig { // Condition redirect specifications. Only the first triggered redirect action // is applied, even if multiple apply. Maximum number of specifications is - // 100. + // 1000. // // Can only be set if // [solution_types][google.cloud.retail.v2alpha.ServingConfig.solution_types] diff --git a/google/cloud/retail/v2alpha/serving_config_service.proto b/google/cloud/retail/v2alpha/serving_config_service.proto index 91fd32b7d3143..4828679766ee2 100644 --- a/google/cloud/retail/v2alpha/serving_config_service.proto +++ b/google/cloud/retail/v2alpha/serving_config_service.proto @@ -32,10 +32,6 @@ option java_package = "com.google.cloud.retail.v2alpha"; option objc_class_prefix = "RETAIL"; option php_namespace = "Google\\Cloud\\Retail\\V2alpha"; option ruby_package = "Google::Cloud::Retail::V2alpha"; -option (google.api.resource_definition) = { - type: "retail.googleapis.com/Catalog" - pattern: "projects/{project}/locations/{location}/catalogs/{catalog}" -}; // Service for modifying ServingConfig. service ServingConfigService { diff --git a/google/cloud/retail/v2alpha/user_event.proto b/google/cloud/retail/v2alpha/user_event.proto index 6b2d048e1ec30..94f728791f964 100644 --- a/google/cloud/retail/v2alpha/user_event.proto +++ b/google/cloud/retail/v2alpha/user_event.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.retail.v2alpha; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/cloud/retail/v2alpha/common.proto"; import "google/cloud/retail/v2alpha/product.proto"; @@ -136,6 +135,13 @@ message UserEvent { // Extra user event features to include in the recommendation model. // + // If you provide custom attributes for ingested user events, also include + // them in the user events that you associate with prediction requests. Custom + // attribute formatting must be consistent between imported events and events + // provided with prediction requests. This lets the Retail API use + // those custom attributes when training models and serving predictions, which + // helps improve recommendation quality. + // // This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT // error is returned: // @@ -146,10 +152,10 @@ message UserEvent { // 256 characters. // * For number attributes, at most 400 values are allowed. // - // For product recommendation, an example of extra user information is - // traffic_channel, i.e. how user arrives at the site. Users can arrive - // at the site by coming to the site directly, or coming through Google - // search, and etc. + // For product recommendations, an example of extra user information is + // traffic_channel, which is how a user arrives at the site. Users can arrive + // at the site by coming to the site directly, coming through Google + // search, or in other ways. map attributes = 7; // The ID or name of the associated shopping cart. This ID is used diff --git a/google/cloud/retail/v2alpha/user_event_service.proto b/google/cloud/retail/v2alpha/user_event_service.proto index 2e91984a99b4d..af97dad9dbc6c 100644 --- a/google/cloud/retail/v2alpha/user_event_service.proto +++ b/google/cloud/retail/v2alpha/user_event_service.proto @@ -20,7 +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/cloud/retail/v2alpha/export_config.proto"; +import "google/api/resource.proto"; import "google/cloud/retail/v2alpha/import_config.proto"; import "google/cloud/retail/v2alpha/purge_config.proto"; import "google/cloud/retail/v2alpha/user_event.proto"; @@ -95,13 +95,14 @@ service UserEventService { }; } - // Triggers a user event rejoin operation with latest product catalog. Events + // 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 API can be used to trigger a 'join' operation on specified + // 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 wrong product catalog. + // 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) = {