docs: Keep the API doc up-to-date

PiperOrigin-RevId: 391605108
pull/672/head
Google APIs 4 years ago committed by Copybara-Service
parent 853cfd33b6
commit 62d50355df
  1. 2
      google/cloud/retail/v2/catalog.proto
  2. 10
      google/cloud/retail/v2/catalog_service.proto
  3. 2
      google/cloud/retail/v2/common.proto
  4. 30
      google/cloud/retail/v2/completion_service.proto
  5. 10
      google/cloud/retail/v2/import_config.proto
  6. 2
      google/cloud/retail/v2/prediction_service.proto
  7. 16
      google/cloud/retail/v2/product.proto
  8. 14
      google/cloud/retail/v2/product_service.proto
  9. 2
      google/cloud/retail/v2/purge_config.proto
  10. 2
      google/cloud/retail/v2/retail_v2.yaml
  11. 176
      google/cloud/retail/v2/search_service.proto
  12. 20
      google/cloud/retail/v2/user_event.proto
  13. 2
      google/cloud/retail/v2/user_event_service.proto
  14. 2
      google/cloud/retail/v2alpha/catalog.proto
  15. 8
      google/cloud/retail/v2alpha/catalog_service.proto
  16. 36
      google/cloud/retail/v2alpha/completion_service.proto
  17. 8
      google/cloud/retail/v2alpha/import_config.proto
  18. 14
      google/cloud/retail/v2alpha/product.proto
  19. 12
      google/cloud/retail/v2alpha/product_service.proto
  20. 190
      google/cloud/retail/v2alpha/search_service.proto
  21. 18
      google/cloud/retail/v2alpha/user_event.proto
  22. 8
      google/cloud/retail/v2beta/catalog_service.proto
  23. 28
      google/cloud/retail/v2beta/completion_service.proto
  24. 8
      google/cloud/retail/v2beta/import_config.proto
  25. 14
      google/cloud/retail/v2beta/product.proto
  26. 12
      google/cloud/retail/v2beta/product_service.proto
  27. 178
      google/cloud/retail/v2beta/search_service.proto
  28. 18
      google/cloud/retail/v2beta/user_event.proto

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.
@ -93,8 +93,8 @@ service CatalogService {
// {newBranch}.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// 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,8 +109,8 @@ service CatalogService {
// method under a specified parent catalog.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// 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) = {

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.
@ -36,8 +36,8 @@ option ruby_package = "Google::Cloud::Retail::V2";
// Auto-completion service for retail.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
service CompletionService {
option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) =
@ -46,8 +46,8 @@ service CompletionService {
// Completes the specified prefix with keyword suggestions.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
option (google.api.http) = {
get: "/v2/{catalog=projects/*/locations/*/catalogs/*}:completeQuery"
@ -59,8 +59,8 @@ service CompletionService {
// Request processing may be synchronous. Partial updating is not supported.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc ImportCompletionData(ImportCompletionDataRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
@ -135,13 +135,15 @@ message CompleteQueryRequest {
// * user-data
//
// * cloud-retail
// This option is not automatically enabled. Before using cloud-retail,
// contact retail-search-support@google.com first.
// This option requires additional allowlisting. Before using cloud-retail,
// contact Cloud Retail support team first.
string dataset = 6;
// Completion max suggestions.
// Completion max suggestions. If left unset or set to 0, then will fallback
// to the configured value [CompletionConfig.max_suggestions][].
//
// The maximum allowed max suggestions is 20. The default value is 20.
// The maximum allowed max suggestions is 20. If it is set higher, it will be
// capped by 20.
int32 max_suggestions = 5;
}
@ -172,9 +174,9 @@ message CompleteQueryResponse {
// performance.
string attribution_token = 2;
// Matched recent searches of this user. This field is a restricted feature.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in enabling it.
// Matched recent searches of this user. The maximum number of recent searches
// is 10. This field is a restricted feature. Contact Retail Search support
// team if you are interested in enabling it.
//
// This feature is only available when
// [CompleteQueryRequest.visitor_id][google.cloud.retail.v2.CompleteQueryRequest.visitor_id]

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.
@ -160,13 +160,13 @@ message ImportProductsRequest {
// Can only be while using
// [BigQuerySource][google.cloud.retail.v2.BigQuerySource].
//
// Add the IAM permission BigQuery Data Viewer for
// 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.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
FULL = 2;
}
@ -303,7 +303,7 @@ message CompletionDataInputConfig {
oneof source {
// Required. BigQuery input source.
//
// Add the IAM permission BigQuery Data Viewer for
// 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.
BigQuerySource big_query_source = 1

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.
@ -310,13 +310,9 @@ message Product {
// This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
// error is returned:
//
// * Max entries count: 200 by default; 100 for
// [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
// * Max entries count: 200.
// * The key must be a UTF-8 encoded string with a length limit of 128
// characters.
// * Max indexable entries count: 200 by default; 40 for
// [Type.VARIANT][google.cloud.retail.v2.Product.Type.VARIANT].
// * Max searchable entries count: 30.
// * For indexable attribute, the key must match the pattern:
// [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS.
map<string, CustomAttribute> attributes = 12;
@ -426,7 +422,7 @@ message Product {
// The material of the product. For example, "leather", "wooden".
//
// A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
// 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
// INVALID_ARGUMENT error is returned.
//
@ -525,8 +521,12 @@ message Product {
// * [name][google.cloud.retail.v2.Product.name]
// * [color_info][google.cloud.retail.v2.Product.color_info]
//
// Maximum number of paths is 20. Otherwise, an INVALID_ARGUMENT error is
// Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
// returned.
//
// Note: Returning more fields in
// [SearchResponse][google.cloud.retail.v2.SearchResponse] may increase
// response payload size and serving latency.
google.protobuf.FieldMask retrievable_fields = 30;
// Output only. Product variants grouped together on primary product which

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.
@ -143,8 +143,8 @@ service ProductService {
// [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory"
@ -170,8 +170,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
@ -198,8 +198,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.

@ -59,8 +59,8 @@ http:
- selector: google.longrunning.Operations.GetOperation
get: '/v2/{name=projects/*/locations/*/operations/*}'
additional_bindings:
- get: '/v2/{name=projects/*/locations/*/catalogs/*/operations/*}'
- get: '/v2/{name=projects/*/locations/*/catalogs/*/branches/*/operations/*}'
- get: '/v2/{name=projects/*/locations/*/catalogs/*/operations/*}'
- selector: google.longrunning.Operations.ListOperations
get: '/v2/{name=projects/*/locations/*}/operations'
additional_bindings:

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.
@ -39,8 +39,8 @@ option ruby_package = "Google::Cloud::Retail::V2";
// Service for search.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
service SearchService {
option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) =
@ -49,8 +49,8 @@ service SearchService {
// Performs a search.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc Search(SearchRequest) returns (SearchResponse) {
option (google.api.http) = {
post: "/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search"
@ -74,35 +74,35 @@ message SearchRequest {
// [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
// is not specified:
//
// Textual facet keys:
// * brands
// * categories
// * genders
// * ageGroups
// * availability
// * colorFamilies
// * colors
// * sizes
// * materials
// * patterns
// * conditions
// * attributes.key
// * pickupInStore
// * shipToStore
// * sameDayDelivery
// * nextDayDelivery
// * customFulfillment1
// * customFulfillment2
// * customFulfillment3
// * customFulfillment4
// * customFulfillment5
// * textual_field =
// * "brands"
// * "categories"
// * "genders"
// * "ageGroups"
// * "availability"
// * "colorFamilies"
// * "colors"
// * "sizes"
// * "materials"
// * "patterns"
// * "conditions"
// * "attributes.key"
// * "pickupInStore"
// * "shipToStore"
// * "sameDayDelivery"
// * "nextDayDelivery"
// * "customFulfillment1"
// * "customFulfillment2"
// * "customFulfillment3"
// * "customFulfillment4"
// * "customFulfillment5"
//
// Numeric facet keys:
// * price
// * discount
// * rating
// * ratingCount
// * attributes.key
// * numerical_field =
// * "price"
// * "discount"
// * "rating"
// * "ratingCount"
// * "attributes.key"
string key = 1 [(google.api.field_behavior) = REQUIRED];
// Set only if values should be bucketized into intervals. Must be set
@ -166,7 +166,8 @@ message SearchRequest {
// order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
// intervals are sorted in the order given by
// [FacetSpec.FacetKey.intervals][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.intervals];
// [FulfillmentInfo.ids][] are sorted in the order given by
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// are sorted in the order given by
// [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.restricted_values].
string order_by = 4;
@ -287,12 +288,11 @@ message SearchRequest {
// Examples:
//
// * To boost products with product ID "product_1" or "product_2", and
// color "Red" or "Blue":
// ```
// (id: ANY("product_1", "product_2"))
// AND
// (colorFamilies: ANY("Red", "Blue"))
// ```
// color
// "Red" or "Blue":<br>
// *(id: ANY("product_1", "product_2"))<br>*
// *AND<br>*
// *(colorFamilies: ANY("Red", "Blue"))<br>*
string condition = 1;
// Strength of the condition boost, which should be in [-1, 1]. Negative
@ -343,6 +343,11 @@ message SearchRequest {
// The condition under which query expansion should occur. Default to
// [Condition.DISABLED][google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
Condition condition = 1;
// Whether to pin unexpanded results. If this field is set to true,
// unexpanded products are always at the top of the search results, followed
// by the expanded results.
bool pin_unexpanded_results = 2;
}
// Required. The resource name of the search engine placement, such as
@ -409,7 +414,8 @@ message SearchRequest {
// The filter syntax consists of an expression language for constructing a
// predicate from one or more fields of the products being filtered. Filter
// expression is case-sensitive.
// expression is case-sensitive. See more details at this [user
// guide](/retail/private/docs/filter-and-order#filter).
//
// If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string filter = 10;
@ -427,7 +433,9 @@ message SearchRequest {
// The order in which products are returned. Products can be ordered by
// a field in an [Product][google.cloud.retail.v2.Product] object. Leave it
// unset if ordered by relevance. OrderBy expression is case-sensitive.
// unset if ordered by relevance. OrderBy expression is case-sensitive. See
// more details at this [user
// guide](/retail/private/docs/filter-and-order#order).
//
// If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string order_by = 11;
@ -441,16 +449,17 @@ message SearchRequest {
// The specification for dynamically generated facets. Notice that only
// textual facets can be dynamically generated.
//
// This feature requires additional allowlisting. Contact Retail Support
// (retail-search-support@google.com) if you are interested in using dynamic
// facet feature.
// This feature requires additional allowlisting. Contact Retail Search
// support team if you are interested in using dynamic facet feature.
DynamicFacetSpec dynamic_facet_spec = 21;
// Boost specification to boost certain products.
// Boost specification to boost certain products. See more details at this
// [user guide](/retail/private/docs/boosting).
BoostSpec boost_spec = 13;
// The query expansion specification that specifies the conditions under which
// query expansion will occur.
// query expansion will occur. See more details at this [user
// guide](/retail/private/docs/result-size#query_expansion).
QueryExpansionSpec query_expansion_spec = 14;
// The keys to fetch and rollup the matching
@ -462,10 +471,9 @@ message SearchRequest {
// [Product][google.cloud.retail.v2.Product]s attributes will lead to extra
// query latency. Maximum number of keys is 10.
//
// For
// [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info],
// a fulfillment type and a fulfillment ID must be provided in the format of
// "fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123",
// For [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo], a
// fulfillment type and a fulfillment ID must be provided in the format of
// "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
// "pickupInStore" is fulfillment type and "store123" is the store ID.
//
// Supported keys are:
@ -476,24 +484,42 @@ message SearchRequest {
// * discount
// * attributes.key, where key is any key in the
// [Product.attributes][google.cloud.retail.v2.Product.attributes] map.
// * pickupInStore.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.PICKUP_IN_STORE][].
// * shipToStore.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.SHIP_TO_STORE][].
// * sameDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.SAME_DAY_DELIVERY][].
// * nextDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.NEXT_DAY_DELIVERY][].
// * customFulfillment1.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_1][].
// * customFulfillment2.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_2][].
// * customFulfillment3.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_3][].
// * customFulfillment4.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_4][].
// * customFulfillment5.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_5][].
// * pickupInStore.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "pickup-in-store".
// * shipToStore.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "ship-to-store".
// * sameDayDelivery.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "same-day-delivery".
// * nextDayDelivery.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "next-day-delivery".
// * customFulfillment1.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-1".
// * customFulfillment2.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-2".
// * customFulfillment3.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-3".
// * customFulfillment4.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-4".
// * customFulfillment5.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2.FulfillmentInfo.type]
// "custom-type-5".
//
// If this field is set to an invalid value other than these, an
// INVALID_ARGUMENT error is returned.
@ -583,10 +609,9 @@ message SearchResponse {
// }
// }
//
// For
// [Product.fulfillment_info][google.cloud.retail.v2.Product.fulfillment_info],
// the rollup values is a double value with type
// [google.protobuf.Value][google.protobuf.Value]. For example:
// For [FulfillmentInfo][google.cloud.retail.v2.FulfillmentInfo], the rollup
// values is a double value with type
// [google.protobuf.Value][google.protobuf.Value]. For example,
// `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
// are 10 variants in this product are available in the store "store1".
map<string, google.protobuf.Value> variant_rollup_values = 5;
@ -625,6 +650,11 @@ message SearchResponse {
message QueryExpansionInfo {
// Bool describing whether query expansion has occurred.
bool expanded_query = 1;
// Number of pinned results. This field will only be set when expansion
// happens and [SearchRequest.query_expansion_spec.pin_unexpanded_results][]
// is set to true.
int64 pinned_result_count = 2;
}
// A list of matched items. The order represents the ranking.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.
@ -258,9 +258,21 @@ message UserEvent {
message ProductDetail {
// Required. [Product][google.cloud.retail.v2.Product] information.
//
// Only [Product.id][google.cloud.retail.v2.Product.id] field is used when
// ingesting an event, all other product fields are ignored as we will look
// them up from the catalog.
// Required field(s):
//
// * [Product.id][google.cloud.retail.v2.Product.id]
//
// Optional override field(s):
//
// * [Product.price_info][google.cloud.retail.v2.Product.price_info]
//
// If any supported optional fields are provided, we will treat them as a full
// override when looking up product information from the catalog. Thus, it is
// important to ensure that the overriding fields are accurate and
// complete.
//
// All other product fields are ignored and instead populated via catalog
// lookup after event ingestion.
Product product = 1 [(google.api.field_behavior) = REQUIRED];
// Quantity of the product associated with the user event.

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// 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.

@ -104,7 +104,7 @@ message MerchantCenterLink {
// String representing the destination to import for, all if left empty.
// List of possible values can be found here.
// [https://support.google.com/merchants/answer/7501026?hl=en]
// [https://support.google.com/merchants/answer/7501026]
// List of allowed string values:
// "shopping-ads", "buy-on-google-listings", "display-ads", "local-inventory
// -ads", "free-listings", "free-local-listings"

@ -93,8 +93,8 @@ service CatalogService {
// {newBranch}.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// 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,8 +109,8 @@ service CatalogService {
// method under a specified parent catalog.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// 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) = {

@ -36,8 +36,8 @@ option ruby_package = "Google::Cloud::Retail::V2alpha";
// Auto-completion service for retail.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
service CompletionService {
option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) =
@ -46,8 +46,8 @@ service CompletionService {
// Completes the specified prefix with keyword suggestions.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
option (google.api.http) = {
get: "/v2alpha/{catalog=projects/*/locations/*/catalogs/*}:completeQuery"
@ -59,8 +59,8 @@ service CompletionService {
// Request processing may be synchronous. Partial updating is not supported.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc ImportCompletionData(ImportCompletionDataRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
@ -125,22 +125,26 @@ message CompleteQueryRequest {
string device_type = 4;
// Determines which dataset to use for fetching completion. "user-data" will
// use the imported dataset through [ImportCompletionData][]. "cloud-retail"
// will use the dataset generated by cloud retail based on user events. If
// leave empty, it will use the "user-data".
// use the imported dataset through
// [CompletionService.ImportCompletionData][google.cloud.retail.v2alpha.CompletionService.ImportCompletionData].
// "cloud-retail" will use the dataset generated by cloud retail based on user
// events. If leave empty, it will use the "user-data".
//
// Current supported values:
//
// * user-data
//
// * cloud-retail
// This option is not automatically enabled. Before using cloud-retail,
// contact retail-search-support@google.com first.
// This option requires additional allowlisting. Before using cloud-retail,
// contact Cloud Retail support team first.
string dataset = 6;
// Completion max suggestions.
// Completion max suggestions. If left unset or set to 0, then will fallback
// to the configured value
// [CompletionConfig.max_suggestions][google.cloud.retail.v2alpha.CompletionConfig.max_suggestions].
//
// The maximum allowed max suggestions is 20. The default value is 20.
// The maximum allowed max suggestions is 20. If it is set higher, it will be
// capped by 20.
int32 max_suggestions = 5;
}
@ -171,9 +175,9 @@ message CompleteQueryResponse {
// performance.
string attribution_token = 2;
// Matched recent searches of this user. This field is a restricted feature.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in enabling it.
// Matched recent searches of this user. The maximum number of recent searches
// is 10. This field is a restricted feature. Contact Retail Search support
// team if you are interested in enabling it.
//
// This feature is only available when
// [CompleteQueryRequest.visitor_id][google.cloud.retail.v2alpha.CompleteQueryRequest.visitor_id]

@ -160,13 +160,13 @@ message ImportProductsRequest {
// Can only be while using
// [BigQuerySource][google.cloud.retail.v2alpha.BigQuerySource].
//
// Add the IAM permission BigQuery Data Viewer for
// 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.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
FULL = 2;
}
@ -303,7 +303,7 @@ message CompletionDataInputConfig {
oneof source {
// Required. BigQuery input source.
//
// Add the IAM permission BigQuery Data Viewer for
// 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.
BigQuerySource big_query_source = 1

@ -316,13 +316,9 @@ message Product {
// This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
// error is returned:
//
// * Max entries count: 200 by default; 100 for
// [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT].
// * Max entries count: 200.
// * The key must be a UTF-8 encoded string with a length limit of 128
// characters.
// * Max indexable entries count: 200 by default; 40 for
// [Type.VARIANT][google.cloud.retail.v2alpha.Product.Type.VARIANT].
// * Max searchable entries count: 30.
// * For indexable attribute, the key must match the pattern:
// [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS.
map<string, CustomAttribute> attributes = 12;
@ -432,7 +428,7 @@ message Product {
// The material of the product. For example, "leather", "wooden".
//
// A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
// 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
// INVALID_ARGUMENT error is returned.
//
@ -533,8 +529,12 @@ message Product {
// * [name][google.cloud.retail.v2alpha.Product.name]
// * [color_info][google.cloud.retail.v2alpha.Product.color_info]
//
// Maximum number of paths is 20. Otherwise, an INVALID_ARGUMENT error is
// Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
// returned.
//
// Note: Returning more fields in
// [SearchResponse][google.cloud.retail.v2alpha.SearchResponse] may increase
// response payload size and serving latency.
google.protobuf.FieldMask retrievable_fields = 30;
// Output only. Product variants grouped together on primary product which

@ -146,8 +146,8 @@ service ProductService {
// [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2alpha/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory"
@ -173,8 +173,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
@ -201,8 +201,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {

@ -39,8 +39,8 @@ option ruby_package = "Google::Cloud::Retail::V2alpha";
// Service for search.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
service SearchService {
option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) =
@ -49,8 +49,8 @@ service SearchService {
// Performs a search.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc Search(SearchRequest) returns (SearchResponse) {
option (google.api.http) = {
post: "/v2alpha/{placement=projects/*/locations/*/catalogs/*/placements/*}:search"
@ -68,42 +68,42 @@ message SearchRequest {
// Specifies how a facet is computed.
message FacetKey {
// Required. Supported textual and numerical facet keys in
// [Product][google.cloud.retail.v2alpha.Product] object, over which the
// facet values are computed. Facet key is case-sensitive.
// [Product][google.cloud.retail.v2.Product] object, over which the facet
// values are computed. Facet key is case-sensitive.
//
// Allowed facet keys when
// [FacetKey.query][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.query]
// [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
// is not specified:
//
// Textual facet keys:
// * brands
// * categories
// * genders
// * ageGroups
// * availability
// * colorFamilies
// * colors
// * sizes
// * materials
// * patterns
// * conditions
// * attributes.key
// * pickupInStore
// * shipToStore
// * sameDayDelivery
// * nextDayDelivery
// * customFulfillment1
// * customFulfillment2
// * customFulfillment3
// * customFulfillment4
// * customFulfillment5
// * textual_field =
// * "brands"
// * "categories"
// * "genders"
// * "ageGroups"
// * "availability"
// * "colorFamilies"
// * "colors"
// * "sizes"
// * "materials"
// * "patterns"
// * "conditions"
// * "attributes.key"
// * "pickupInStore"
// * "shipToStore"
// * "sameDayDelivery"
// * "nextDayDelivery"
// * "customFulfillment1"
// * "customFulfillment2"
// * "customFulfillment3"
// * "customFulfillment4"
// * "customFulfillment5"
//
// Numeric facet keys:
// * price
// * discount
// * rating
// * ratingCount
// * attributes.key
// * numerical_field =
// * "price"
// * "discount"
// * "rating"
// * "ratingCount"
// * "attributes.key"
string key = 1 [(google.api.field_behavior) = REQUIRED];
// Set only if values should be bucketized into intervals. Must be set
@ -167,7 +167,8 @@ message SearchRequest {
// order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
// intervals are sorted in the order given by
// [FacetSpec.FacetKey.intervals][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.intervals];
// [FulfillmentInfo.ids][] are sorted in the order given by
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// are sorted in the order given by
// [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.restricted_values].
string order_by = 4;
@ -289,12 +290,11 @@ message SearchRequest {
// Examples:
//
// * To boost products with product ID "product_1" or "product_2", and
// color "Red" or "Blue":
// ```
// (id: ANY("product_1", "product_2"))
// AND
// (colorFamilies: ANY("Red", "Blue"))
// ```
// color
// "Red" or "Blue":<br>
// *(id: ANY("product_1", "product_2"))<br>*
// *AND<br>*
// *(colorFamilies: ANY("Red", "Blue"))<br>*
string condition = 1;
// Strength of the condition boost, which should be in [-1, 1]. Negative
@ -345,6 +345,11 @@ message SearchRequest {
// The condition under which query expansion should occur. Default to
// [Condition.DISABLED][google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
Condition condition = 1;
// Whether to pin unexpanded results. If this field is set to true,
// unexpanded products are always at the top of the search results, followed
// by the expanded results.
bool pin_unexpanded_results = 2;
}
// The relevance threshold of the search results. The higher relevance
@ -433,7 +438,8 @@ message SearchRequest {
// The filter syntax consists of an expression language for constructing a
// predicate from one or more fields of the products being filtered. Filter
// expression is case-sensitive.
// expression is case-sensitive. See more details at this [user
// guide](/retail/private/docs/filter-and-order#filter).
//
// If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string filter = 10;
@ -452,7 +458,9 @@ message SearchRequest {
// The order in which products are returned. Products can be ordered by
// a field in an [Product][google.cloud.retail.v2alpha.Product] object. Leave
// it unset if ordered by relevance. OrderBy expression is case-sensitive.
// it unset if ordered by relevance. OrderBy expression is case-sensitive. See
// more details at this [user
// guide](/retail/private/docs/filter-and-order#order).
//
// If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string order_by = 11;
@ -466,16 +474,17 @@ message SearchRequest {
// The specification for dynamically generated facets. Notice that only
// textual facets can be dynamically generated.
//
// This feature requires additional allowlisting. Contact Retail Support
// (retail-search-support@google.com) if you are interested in using dynamic
// facet feature.
// This feature requires additional allowlisting. Contact Retail Search
// support team if you are interested in using dynamic facet feature.
DynamicFacetSpec dynamic_facet_spec = 21;
// Boost specification to boost certain products.
// Boost specification to boost certain products. See more details at this
// [user guide](/retail/private/docs/boosting).
BoostSpec boost_spec = 13;
// The query expansion specification that specifies the conditions under which
// query expansion will occur.
// query expansion will occur. See more details at this [user
// guide](/retail/private/docs/result-size#query_expansion).
QueryExpansionSpec query_expansion_spec = 14;
// The relevance threshold of the search results.
@ -483,7 +492,8 @@ message SearchRequest {
// Defaults to
// [RelevanceThreshold.HIGH][google.cloud.retail.v2alpha.SearchRequest.RelevanceThreshold.HIGH],
// which means only the most relevant results are shown, and the least number
// of results are returned.
// of results are returned. See more details at this [user
// guide](/retail/private/docs/result-size#relevance_thresholding).
RelevanceThreshold relevance_threshold = 15;
// The keys to fetch and rollup the matching
@ -497,10 +507,9 @@ message SearchRequest {
// [Product][google.cloud.retail.v2alpha.Product]s attributes will lead to
// extra query latency. Maximum number of keys is 10.
//
// For
// [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info],
// a fulfillment type and a fulfillment ID must be provided in the format of
// "fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123",
// For [FulfillmentInfo][google.cloud.retail.v2alpha.FulfillmentInfo], a
// fulfillment type and a fulfillment ID must be provided in the format of
// "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
// "pickupInStore" is fulfillment type and "store123" is the store ID.
//
// Supported keys are:
@ -511,24 +520,51 @@ message SearchRequest {
// * discount
// * attributes.key, where key is any key in the
// [Product.attributes][google.cloud.retail.v2alpha.Product.attributes] map.
// * pickupInStore.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.PICKUP_IN_STORE][].
// * shipToStore.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.SHIP_TO_STORE][].
// * sameDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.SAME_DAY_DELIVERY][].
// * nextDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.NEXT_DAY_DELIVERY][].
// * customFulfillment1.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_1][].
// * customFulfillment2.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_2][].
// * customFulfillment3.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_3][].
// * customFulfillment4.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_4][].
// * customFulfillment5.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_5][].
// * pickupInStore.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "pickup-in-store".
// * shipToStore.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "ship-to-store".
// * sameDayDelivery.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "same-day-delivery".
// * nextDayDelivery.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "next-day-delivery".
// * customFulfillment1.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-1".
// * customFulfillment2.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-2".
// * customFulfillment3.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-3".
// * customFulfillment4.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-4".
// * customFulfillment5.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids]
// for
// [FulfillmentInfo.type][google.cloud.retail.v2alpha.FulfillmentInfo.type]
// "custom-type-5".
//
// If this field is set to an invalid value other than these, an
// INVALID_ARGUMENT error is returned.
@ -620,9 +656,8 @@ message SearchResponse {
// }
// }
//
// For
// [Product.fulfillment_info][google.cloud.retail.v2alpha.Product.fulfillment_info],
// the rollup values is a double value with type
// For [FulfillmentInfo][google.cloud.retail.v2alpha.FulfillmentInfo], the
// rollup values is a double value with type
// [google.protobuf.Value][google.protobuf.Value]. For example,
// `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
// are 10 variants in this product are available in the store "store1".
@ -662,6 +697,11 @@ message SearchResponse {
message QueryExpansionInfo {
// Bool describing whether query expansion has occurred.
bool expanded_query = 1;
// Number of pinned results. This field will only be set when expansion
// happens and [SearchRequest.query_expansion_spec.pin_unexpanded_results][]
// is set to true.
int64 pinned_result_count = 2;
}
// A list of matched items. The order represents the ranking.

@ -261,9 +261,21 @@ message UserEvent {
message ProductDetail {
// Required. [Product][google.cloud.retail.v2alpha.Product] information.
//
// Only [Product.id][google.cloud.retail.v2alpha.Product.id] field is used
// when ingesting an event, all other product fields are ignored as we will
// look them up from the catalog.
// Required field(s):
//
// * [Product.id][google.cloud.retail.v2alpha.Product.id]
//
// Optional override field(s):
//
// * [Product.price_info][google.cloud.retail.v2alpha.Product.price_info]
//
// If any supported optional fields are provided, we will treat them as a full
// override when looking up product information from the catalog. Thus, it is
// important to ensure that the overriding fields are accurate and
// complete.
//
// All other product fields are ignored and instead populated via catalog
// lookup after event ingestion.
Product product = 1 [(google.api.field_behavior) = REQUIRED];
// Quantity of the product associated with the user event.

@ -93,8 +93,8 @@ service CatalogService {
// {newBranch}.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// 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,8 +109,8 @@ service CatalogService {
// method under a specified parent catalog.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// 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) = {

@ -36,8 +36,8 @@ option ruby_package = "Google::Cloud::Retail::V2beta";
// Auto-completion service for retail.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
service CompletionService {
option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) =
@ -46,8 +46,8 @@ service CompletionService {
// Completes the specified prefix with keyword suggestions.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
option (google.api.http) = {
get: "/v2beta/{catalog=projects/*/locations/*/catalogs/*}:completeQuery"
@ -59,8 +59,8 @@ service CompletionService {
// Request processing may be synchronous. Partial updating is not supported.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc ImportCompletionData(ImportCompletionDataRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
@ -135,13 +135,15 @@ message CompleteQueryRequest {
// * user-data
//
// * cloud-retail
// This option is not automatically enabled. Before using cloud-retail,
// contact retail-search-support@google.com first.
// This option requires additional allowlisting. Before using cloud-retail,
// contact Cloud Retail support team first.
string dataset = 6;
// Completion max suggestions.
// Completion max suggestions. If left unset or set to 0, then will fallback
// to the configured value [CompletionConfig.max_suggestions][].
//
// The maximum allowed max suggestions is 20. The default value is 20.
// The maximum allowed max suggestions is 20. If it is set higher, it will be
// capped by 20.
int32 max_suggestions = 5;
}
@ -172,9 +174,9 @@ message CompleteQueryResponse {
// performance.
string attribution_token = 2;
// Matched recent searches of this user. This field is a restricted feature.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in enabling it.
// Matched recent searches of this user. The maximum number of recent searches
// is 10. This field is a restricted feature. Contact Retail Search support
// team if you are interested in enabling it.
//
// This feature is only available when
// [CompleteQueryRequest.visitor_id][google.cloud.retail.v2beta.CompleteQueryRequest.visitor_id]

@ -160,13 +160,13 @@ message ImportProductsRequest {
// Can only be while using
// [BigQuerySource][google.cloud.retail.v2beta.BigQuerySource].
//
// Add the IAM permission BigQuery Data Viewer for
// 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.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
FULL = 2;
}
@ -303,7 +303,7 @@ message CompletionDataInputConfig {
oneof source {
// Required. BigQuery input source.
//
// Add the IAM permission BigQuery Data Viewer for
// 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.
BigQuerySource big_query_source = 1

@ -315,13 +315,9 @@ message Product {
// This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
// error is returned:
//
// * Max entries count: 200 by default; 100 for
// [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT].
// * Max entries count: 200.
// * The key must be a UTF-8 encoded string with a length limit of 128
// characters.
// * Max indexable entries count: 200 by default; 40 for
// [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT].
// * Max searchable entries count: 30.
// * For indexable attribute, the key must match the pattern:
// [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS.
map<string, CustomAttribute> attributes = 12;
@ -431,7 +427,7 @@ message Product {
// The material of the product. For example, "leather", "wooden".
//
// A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
// 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
// INVALID_ARGUMENT error is returned.
//
@ -532,8 +528,12 @@ message Product {
// * [name][google.cloud.retail.v2beta.Product.name]
// * [color_info][google.cloud.retail.v2beta.Product.color_info]
//
// Maximum number of paths is 20. Otherwise, an INVALID_ARGUMENT error is
// Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
// returned.
//
// Note: Returning more fields in
// [SearchResponse][google.cloud.retail.v2beta.SearchResponse] may increase
// response payload size and serving latency.
google.protobuf.FieldMask retrievable_fields = 30;
// Output only. Product variants grouped together on primary product which

@ -145,8 +145,8 @@ service ProductService {
// [RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2beta/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory"
@ -172,8 +172,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
@ -200,8 +200,8 @@ service ProductService {
// [ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {

@ -39,8 +39,8 @@ option ruby_package = "Google::Cloud::Retail::V2beta";
// Service for search.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
service SearchService {
option (google.api.default_host) = "retail.googleapis.com";
option (google.api.oauth_scopes) =
@ -49,8 +49,8 @@ service SearchService {
// Performs a search.
//
// This feature is only available for users who have Retail Search enabled.
// Contact Retail Support (retail-search-support@google.com) if you are
// interested in using Retail Search.
// Please submit a form [here](https://cloud.google.com/contact) to contact
// cloud sales if you are interested in using Retail Search.
rpc Search(SearchRequest) returns (SearchResponse) {
option (google.api.http) = {
post: "/v2beta/{placement=projects/*/locations/*/catalogs/*/placements/*}:search"
@ -68,42 +68,42 @@ message SearchRequest {
// Specifies how a facet is computed.
message FacetKey {
// Required. Supported textual and numerical facet keys in
// [Product][google.cloud.retail.v2beta.Product] object, over which the
// facet values are computed. Facet key is case-sensitive.
// [Product][google.cloud.retail.v2.Product] object, over which the facet
// values are computed. Facet key is case-sensitive.
//
// Allowed facet keys when
// [FacetKey.query][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.query]
// [FacetKey.query][google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.query]
// is not specified:
//
// Textual facet keys:
// * brands
// * categories
// * genders
// * ageGroups
// * availability
// * colorFamilies
// * colors
// * sizes
// * materials
// * patterns
// * conditions
// * attributes.key
// * pickupInStore
// * shipToStore
// * sameDayDelivery
// * nextDayDelivery
// * customFulfillment1
// * customFulfillment2
// * customFulfillment3
// * customFulfillment4
// * customFulfillment5
// * textual_field =
// * "brands"
// * "categories"
// * "genders"
// * "ageGroups"
// * "availability"
// * "colorFamilies"
// * "colors"
// * "sizes"
// * "materials"
// * "patterns"
// * "conditions"
// * "attributes.key"
// * "pickupInStore"
// * "shipToStore"
// * "sameDayDelivery"
// * "nextDayDelivery"
// * "customFulfillment1"
// * "customFulfillment2"
// * "customFulfillment3"
// * "customFulfillment4"
// * "customFulfillment5"
//
// Numeric facet keys:
// * price
// * discount
// * rating
// * ratingCount
// * attributes.key
// * numerical_field =
// * "price"
// * "discount"
// * "rating"
// * "ratingCount"
// * "attributes.key"
string key = 1 [(google.api.field_behavior) = REQUIRED];
// Set only if values should be bucketized into intervals. Must be set
@ -167,7 +167,8 @@ message SearchRequest {
// order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
// intervals are sorted in the order given by
// [FacetSpec.FacetKey.intervals][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.intervals];
// [FulfillmentInfo.ids][] are sorted in the order given by
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// are sorted in the order given by
// [FacetSpec.FacetKey.restricted_values][google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.restricted_values].
string order_by = 4;
@ -289,12 +290,11 @@ message SearchRequest {
// Examples:
//
// * To boost products with product ID "product_1" or "product_2", and
// color "Red" or "Blue":
// ```
// (id: ANY("product_1", "product_2"))
// AND
// (colorFamilies: ANY("Red", "Blue"))
// ```
// color
// "Red" or "Blue":<br>
// *(id: ANY("product_1", "product_2"))<br>*
// *AND<br>*
// *(colorFamilies: ANY("Red", "Blue"))<br>*
string condition = 1;
// Strength of the condition boost, which should be in [-1, 1]. Negative
@ -345,6 +345,11 @@ message SearchRequest {
// The condition under which query expansion should occur. Default to
// [Condition.DISABLED][google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
Condition condition = 1;
// Whether to pin unexpanded results. If this field is set to true,
// unexpanded products are always at the top of the search results, followed
// by the expanded results.
bool pin_unexpanded_results = 2;
}
// Required. The resource name of the search engine placement, such as
@ -411,7 +416,8 @@ message SearchRequest {
// The filter syntax consists of an expression language for constructing a
// predicate from one or more fields of the products being filtered. Filter
// expression is case-sensitive.
// expression is case-sensitive. See more details at this [user
// guide](/retail/private/docs/filter-and-order#filter).
//
// If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string filter = 10;
@ -429,7 +435,9 @@ message SearchRequest {
// The order in which products are returned. Products can be ordered by
// a field in an [Product][google.cloud.retail.v2beta.Product] object. Leave
// it unset if ordered by relevance. OrderBy expression is case-sensitive.
// it unset if ordered by relevance. OrderBy expression is case-sensitive. See
// more details at this [user
// guide](/retail/private/docs/filter-and-order#order).
//
// If this field is unrecognizable, an INVALID_ARGUMENT is returned.
string order_by = 11;
@ -443,16 +451,17 @@ message SearchRequest {
// The specification for dynamically generated facets. Notice that only
// textual facets can be dynamically generated.
//
// This feature requires additional allowlisting. Contact Retail Support
// (retail-search-support@google.com) if you are interested in using dynamic
// facet feature.
// This feature requires additional allowlisting. Contact Retail Search
// support team if you are interested in using dynamic facet feature.
DynamicFacetSpec dynamic_facet_spec = 21;
// Boost specification to boost certain products.
// Boost specification to boost certain products. See more details at this
// [user guide](/retail/private/docs/boosting).
BoostSpec boost_spec = 13;
// The query expansion specification that specifies the conditions under which
// query expansion will occur.
// query expansion will occur. See more details at this [user
// guide](/retail/private/docs/result-size#query_expansion).
QueryExpansionSpec query_expansion_spec = 14;
// The keys to fetch and rollup the matching
@ -466,10 +475,9 @@ message SearchRequest {
// [Product][google.cloud.retail.v2beta.Product]s attributes will lead to
// extra query latency. Maximum number of keys is 10.
//
// For
// [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info],
// a fulfillment type and a fulfillment ID must be provided in the format of
// "fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123",
// For [FulfillmentInfo][google.cloud.retail.v2beta.FulfillmentInfo], a
// fulfillment type and a fulfillment ID must be provided in the format of
// "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
// "pickupInStore" is fulfillment type and "store123" is the store ID.
//
// Supported keys are:
@ -480,24 +488,42 @@ message SearchRequest {
// * discount
// * attributes.key, where key is any key in the
// [Product.attributes][google.cloud.retail.v2beta.Product.attributes] map.
// * pickupInStore.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.PICKUP_IN_STORE][].
// * shipToStore.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.SHIP_TO_STORE][].
// * sameDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.SAME_DAY_DELIVERY][].
// * nextDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.NEXT_DAY_DELIVERY][].
// * customFulfillment1.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_1][].
// * customFulfillment2.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_2][].
// * customFulfillment3.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_3][].
// * customFulfillment4.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_4][].
// * customFulfillment5.id, where id is any [FulfillmentInfo.ids][] for type
// [FulfillmentInfo.Type.CUSTOM_TYPE_5][].
// * pickupInStore.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "pickup-in-store".
// * shipToStore.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "ship-to-store".
// * sameDayDelivery.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "same-day-delivery".
// * nextDayDelivery.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "next-day-delivery".
// * customFulfillment1.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-1".
// * customFulfillment2.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-2".
// * customFulfillment3.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-3".
// * customFulfillment4.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-4".
// * customFulfillment5.id, where id is any
// [FulfillmentInfo.place_ids][google.cloud.retail.v2beta.FulfillmentInfo.place_ids]
// for [FulfillmentInfo.type][google.cloud.retail.v2beta.FulfillmentInfo.type]
// "custom-type-5".
//
// If this field is set to an invalid value other than these, an
// INVALID_ARGUMENT error is returned.
@ -589,9 +615,8 @@ message SearchResponse {
// }
// }
//
// For
// [Product.fulfillment_info][google.cloud.retail.v2beta.Product.fulfillment_info],
// the rollup values is a double value with type
// For [FulfillmentInfo][google.cloud.retail.v2beta.FulfillmentInfo], the
// rollup values is a double value with type
// [google.protobuf.Value][google.protobuf.Value]. For example,
// `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
// are 10 variants in this product are available in the store "store1".
@ -631,6 +656,11 @@ message SearchResponse {
message QueryExpansionInfo {
// Bool describing whether query expansion has occurred.
bool expanded_query = 1;
// Number of pinned results. This field will only be set when expansion
// happens and [SearchRequest.query_expansion_spec.pin_unexpanded_results][]
// is set to true.
int64 pinned_result_count = 2;
}
// A list of matched items. The order represents the ranking.

@ -259,9 +259,21 @@ message UserEvent {
message ProductDetail {
// Required. [Product][google.cloud.retail.v2beta.Product] information.
//
// Only [Product.id][google.cloud.retail.v2beta.Product.id] field is used when
// ingesting an event, all other product fields are ignored as we will look
// them up from the catalog.
// Required field(s):
//
// * [Product.id][google.cloud.retail.v2beta.Product.id]
//
// Optional override field(s):
//
// * [Product.price_info][google.cloud.retail.v2beta.Product.price_info]
//
// If any supported optional fields are provided, we will treat them as a full
// override when looking up product information from the catalog. Thus, it is
// important to ensure that the overriding fields are accurate and
// complete.
//
// All other product fields are ignored and instead populated via catalog
// lookup after event ingestion.
Product product = 1 [(google.api.field_behavior) = REQUIRED];
// Quantity of the product associated with the user event.

Loading…
Cancel
Save