@@ -16,7 +16,6 @@ syntax = "proto3";
1616
1717package google.cloud.retail.v2alpha ;
1818
19- import "google/api/annotations.proto" ;
2019import "google/api/field_behavior.proto" ;
2120import "google/api/resource.proto" ;
2221import "google/cloud/retail/v2alpha/common.proto" ;
@@ -85,6 +84,231 @@ message ProductLevelConfig {
8584 string merchant_center_product_id_field = 2 ;
8685}
8786
87+ // Catalog level attribute config for an attribute. For example, if customers
88+ // want to enable/disable facet for a specific attribute.
89+ message CatalogAttribute {
90+ // The type of an attribute.
91+ enum AttributeType {
92+ // The type of the attribute is unknown.
93+ //
94+ // Used when type cannot be derived from attribute that is not
95+ // [in_use][google.cloud.retail.v2alpha.CatalogAttribute.in_use].
96+ UNKNOWN = 0 ;
97+
98+ // Textual attribute.
99+ TEXTUAL = 1 ;
100+
101+ // Numerical attribute.
102+ NUMERICAL = 2 ;
103+ }
104+
105+ // The status of the indexable option of a catalog attribute.
106+ enum IndexableOption {
107+ // Value used when unset. Defaults to
108+ // [INDEXABLE_ENABLED][google.cloud.retail.v2alpha.CatalogAttribute.IndexableOption.INDEXABLE_ENABLED].
109+ INDEXABLE_OPTION_UNSPECIFIED = 0 ;
110+
111+ // Indexable option enabled for an attribute.
112+ INDEXABLE_ENABLED = 1 ;
113+
114+ // Indexable option disabled for an attribute.
115+ INDEXABLE_DISABLED = 2 ;
116+ }
117+
118+ // The status of the dynamic facetable option of a catalog attribute.
119+ enum DynamicFacetableOption {
120+ // Value used when unset. Defaults to
121+ // [DYNAMIC_FACETABLE_ENABLED][google.cloud.retail.v2alpha.CatalogAttribute.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED].
122+ DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0 ;
123+
124+ // Dynamic facetable option enabled for an attribute.
125+ DYNAMIC_FACETABLE_ENABLED = 1 ;
126+
127+ // Dynamic facetable option disabled for an attribute.
128+ DYNAMIC_FACETABLE_DISABLED = 2 ;
129+ }
130+
131+ // The status of the searchable option of a catalog attribute.
132+ enum SearchableOption {
133+ // Value used when unset. Defaults to
134+ // [SEARCHABLE_DISABLED][google.cloud.retail.v2alpha.CatalogAttribute.SearchableOption.SEARCHABLE_DISABLED].
135+ SEARCHABLE_OPTION_UNSPECIFIED = 0 ;
136+
137+ // Searchable option enabled for an attribute.
138+ SEARCHABLE_ENABLED = 1 ;
139+
140+ // Searchable option disabled for an attribute.
141+ SEARCHABLE_DISABLED = 2 ;
142+ }
143+
144+ // Required. Attribute name.
145+ // For example: `color`, `brands`, `attributes.custom_attribute`, such as
146+ // `attributes.xyz`.
147+ string key = 1 [(google.api.field_behavior ) = REQUIRED ];
148+
149+ // Output only. Indicates whether this attribute has been used by any
150+ // products. `True` if at least one
151+ // [Product][google.cloud.retail.v2alpha.Product] is using this attribute in
152+ // [Product.attributes][google.cloud.retail.v2alpha.Product.attributes].
153+ // Otherwise, this field is `False`.
154+ //
155+ // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] can be
156+ // pre-loaded by using [AddCatalogAttribute][], [ImportCatalogAttributes][],
157+ // or [UpdateAttributesConfig][] APIs. This field is `False` for pre-loaded
158+ // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s.
159+ //
160+ // Only [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that
161+ // are not in use by products can be deleted.
162+ // [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s that are
163+ // in use by products cannot be deleted; however, their configuration
164+ // properties will reset to default values upon removal request.
165+ //
166+ // After catalog changes, it takes about 10 minutes for this field to update.
167+ bool in_use = 9 [(google.api.field_behavior ) = OUTPUT_ONLY ];
168+
169+ // Output only. The type of this attribute. This is derived from the attribute
170+ // in [Product.attributes][google.cloud.retail.v2alpha.Product.attributes].
171+ AttributeType type = 10 [(google.api.field_behavior ) = OUTPUT_ONLY ];
172+
173+ // When
174+ // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
175+ // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
176+ // are indexed so that it can be filtered, faceted, or boosted in
177+ // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
178+ IndexableOption indexable_option = 5 ;
179+
180+ // If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic
181+ // facet. Could only be DYNAMIC_FACETABLE_DISABLED if
182+ // [CatalogAttribute.indexable_option][google.cloud.retail.v2alpha.CatalogAttribute.indexable_option]
183+ // is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
184+ DynamicFacetableOption dynamic_facetable_option = 6 ;
185+
186+ // When
187+ // [AttributesConfig.attribute_config_level][google.cloud.retail.v2alpha.AttributesConfig.attribute_config_level]
188+ // is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values
189+ // are searchable by text queries in
190+ // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search].
191+ //
192+ // If SEARCHABLE_ENABLED but attribute type is numerical, attribute values
193+ // will not be searchable by text queries in
194+ // [SearchService.Search][google.cloud.retail.v2alpha.SearchService.Search],
195+ // as there are no text values associated to numerical attributes.
196+ SearchableOption searchable_option = 7 ;
197+ }
198+
199+ // Catalog level attribute config.
200+ message AttributesConfig {
201+ option (google.api.resource ) = {
202+ type : "retail.googleapis.com/AttributesConfig"
203+ pattern : "projects/{project}/locations/{location}/catalogs/{catalog}/attributesConfig"
204+ };
205+
206+ // Required. Immutable. The fully qualified resource name of the attribute
207+ // config. Format: "projects/*/locations/*/catalogs/*/attributesConfig"
208+ string name = 1 [
209+ (google.api.field_behavior ) = REQUIRED ,
210+ (google.api.field_behavior ) = IMMUTABLE
211+ ];
212+
213+ // Enable attribute(s) config at catalog level.
214+ // For example, indexable, dynamic_facetable, or searchable for each
215+ // attribute.
216+ //
217+ // The key is catalog attribute's name.
218+ // For example: `color`, `brands`, `attributes.custom_attribute`, such as
219+ // `attributes.xyz`.
220+ //
221+ // The maximum number of catalog attributes allowed in a request is 1000.
222+ map <string , CatalogAttribute > catalog_attributes = 2 ;
223+
224+ // Output only. The
225+ // [AttributeConfigLevel][google.cloud.retail.v2alpha.AttributeConfigLevel]
226+ // used for this catalog.
227+ AttributeConfigLevel attribute_config_level = 3
228+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
229+ }
230+
231+ // Catalog level autocomplete config for customers to customize autocomplete
232+ // feature's settings.
233+ message CompletionConfig {
234+ option (google.api.resource ) = {
235+ type : "retail.googleapis.com/CompletionConfig"
236+ pattern : "projects/{project}/locations/{location}/catalogs/{catalog}/completionConfig"
237+ };
238+
239+ // Required. Immutable. Fully qualified name
240+ // projects/*/locations/*/catalogs/*/completionConfig
241+ string name = 1 [
242+ (google.api.field_behavior ) = REQUIRED ,
243+ (google.api.field_behavior ) = IMMUTABLE
244+ ];
245+
246+ // Specifies the matching order for autocomplete suggestions, e.g., a query
247+ // consisting of 'sh' with 'out-of-order' specified would suggest "women's
248+ // shoes", whereas a query of 'red s' with 'exact-prefix' specified would
249+ // suggest "red shoes". Currently supported values:
250+ //
251+ // * 'out-of-order'
252+ // * 'exact-prefix'
253+ //
254+ // Default value: 'exact-prefix'.
255+ string matching_order = 2 ;
256+
257+ // The maximum number of autocomplete suggestions returned per term. The
258+ // maximum allowed max suggestions is 20. Default value is 20. If left unset
259+ // or set to 0, then will fallback to default value.
260+ int32 max_suggestions = 3 ;
261+
262+ // The minimum number of characters needed to be typed in order to get
263+ // suggestions. Default value is 2. If left unset or set to 0, then will
264+ // fallback to default value.
265+ int32 min_prefix_length = 4 ;
266+
267+ // If set to true, the auto learning function is enabled. Auto learning uses
268+ // user data to generate suggestions using ML techniques. Default value is
269+ // false. Only after enabling auto learning can users use `cloud-retail`
270+ // data in
271+ // [CompleteQueryRequest][google.cloud.retail.v2alpha.CompleteQueryRequest].
272+ bool auto_learning = 11 ;
273+
274+ // Output only. The input config for the import of the source data that
275+ // contains the autocomplete phrases uploaded by the customer.
276+ CompletionDataInputConfig suggestions_input_config = 5
277+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
278+
279+ // Output only. Name of the LRO corresponding to the latest suggestion terms
280+ // list import.
281+ //
282+ // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
283+ // retrieve the latest state of the Long Running Operation.
284+ string last_suggestions_import_operation = 6
285+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
286+
287+ // Output only. The input config for the import of the source data that
288+ // contains the / autocomplete denylist phrases uploaded by the customer.
289+ CompletionDataInputConfig denylist_input_config = 7
290+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
291+
292+ // Output only. LRO corresponding to the latest denylist import.
293+ //
294+ // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
295+ // retrieve the latest state of the Long Running Operation.
296+ string last_denylist_import_operation = 8
297+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
298+
299+ // Output only. The input config for the import of the source data that
300+ // contains the autocomplete allowlist phrases uploaded by the customer.
301+ CompletionDataInputConfig allowlist_input_config = 9
302+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
303+
304+ // Output only. LRO corresponding to the latest allowlist import.
305+ //
306+ // Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
307+ // retrieve the latest state of the Long Running Operation.
308+ string last_allowlist_import_operation = 10
309+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
310+ }
311+
88312// Represents a link between a Merchant Center account and a branch.
89313// Once a link is established, products from the linked merchant center account
90314// will be streamed to the linked branch.
@@ -125,8 +349,9 @@ message MerchantCenterLink {
125349 // ISO 639-1.
126350 //
127351 // This specifies the language of offers in Merchant Center that will be
128- // accepted.
129- // If empty no language filtering will be performed.
352+ // accepted. If empty no language filtering will be performed.
353+ //
354+ // Example value: `en`.
130355 string language_code = 5 ;
131356}
132357
0 commit comments