@@ -16,7 +16,6 @@ syntax = "proto3";
1616
1717package google.cloud.retail.v2beta ;
1818
19- import "google/api/annotations.proto" ;
2019import "google/api/field_behavior.proto" ;
2120import "google/api/resource.proto" ;
2221import "google/cloud/retail/v2beta/common.proto" ;
@@ -85,6 +84,285 @@ 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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.Product] is using this attribute in
152+ // [Product.attributes][google.cloud.retail.v2beta.Product.attributes].
153+ // Otherwise, this field is `False`.
154+ //
155+ // [CatalogAttribute][google.cloud.retail.v2beta.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.v2beta.CatalogAttribute]s.
159+ //
160+ // Only [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s that
161+ // are not in use by products can be deleted.
162+ // [CatalogAttribute][google.cloud.retail.v2beta.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.v2beta.Product.attributes].
171+ AttributeType type = 10 [(google.api.field_behavior ) = OUTPUT_ONLY ];
172+
173+ // When
174+ // [AttributesConfig.attribute_config_level][google.cloud.retail.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.SearchService.Search], as
195+ // 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.v2beta.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.v2beta.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+
312+ // Represents a link between a Merchant Center account and a branch.
313+ // Once a link is established, products from the linked merchant center account
314+ // will be streamed to the linked branch.
315+ message MerchantCenterLink {
316+ // Required. The linked [Merchant center account
317+ // id](https://developers.google.com/shopping-content/guides/accountstatuses).
318+ // The account must be a standalone account or a sub-account of a MCA.
319+ int64 merchant_center_account_id = 1 [(google.api.field_behavior ) = REQUIRED ];
320+
321+ // The branch id (e.g. 0/1/2) within this catalog that products from
322+ // merchant_center_account_id are streamed to. When updating this field, an
323+ // empty value will use the currently configured default branch. However,
324+ // changing the default branch later on won't change the linked branch here.
325+ //
326+ // A single branch id can only have one linked merchant center account id.
327+ string branch_id = 2 ;
328+
329+ // String representing the destination to import for, all if left empty.
330+ // List of possible values can be found here.
331+ // [https://support.google.com/merchants/answer/7501026]
332+ // List of allowed string values:
333+ // "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
334+ // _ads", "Free_listings", "Free_local_listings"
335+ // NOTE: The string values are case sensitive.
336+ repeated string destinations = 3 ;
337+
338+ // Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2
339+ // code. List of values can be found
340+ // [here](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry)
341+ // under the `region` tag. If left blank no region filtering will be
342+ // performed.
343+ //
344+ // Example value: `US`.
345+ string region_code = 4 ;
346+
347+ // Language of the title/description and other string attributes. Use language
348+ // tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
349+ // ISO 639-1.
350+ //
351+ // This specifies the language of offers in Merchant Center that will be
352+ // accepted. If empty no language filtering will be performed.
353+ //
354+ // Example value: `en`.
355+ string language_code = 5 ;
356+ }
357+
358+ // Configures Merchant Center linking.
359+ // Links contained in the config will be used to sync data from a Merchant
360+ // Center account to a Cloud Retail branch.
361+ message MerchantCenterLinkingConfig {
362+ // Links between Merchant Center accounts and branches.
363+ repeated MerchantCenterLink links = 1 ;
364+ }
365+
88366// The catalog configuration.
89367message Catalog {
90368 option (google.api.resource ) = {
@@ -110,4 +388,10 @@ message Catalog {
110388 // Required. The product level configuration.
111389 ProductLevelConfig product_level_config = 4
112390 [(google.api.field_behavior ) = REQUIRED ];
391+
392+ // The Merchant Center linking configuration.
393+ // Once a link is added, the data stream from Merchant Center to Cloud Retail
394+ // will be enabled automatically. The requester must have access to the
395+ // merchant center account in order to make changes to this field.
396+ MerchantCenterLinkingConfig merchant_center_linking_config = 6 ;
113397}
0 commit comments