8000 feat: release Control and ServingConfig serivces to v2 version · googleapis/googleapis@e9bcb6c · GitHub
[go: up one dir, main page]

Skip to content

Commit e9bcb6c

Browse files
Google APIscopybara-github
authored andcommitted
feat: release Control and ServingConfig serivces to v2 version
feat: release AttributesConfig APIs to v2 version feat: release CompletionConfig APIs to v2 version feat: add local inventories info to the Product resource docs: Improved documentation for Fullfillment and Inventory API in ProductService docs: minor documentation format and typo fixes PiperOrigin-RevId: 469399525
1 parent 49de9d5 commit e9bcb6c

15 files changed

+1631
-45
lines changed

google/cloud/retail/v2/BUILD.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@ proto_library(
2525
"catalog_service.proto",
2626
"common.proto",
2727
"completion_service.proto",
28+
"control.proto",
29+
"control_service.proto",
2830
"import_config.proto",
2931
"prediction_service.proto",
3032
"product.proto",
3133
"product_service.proto",
3234
"promotion.proto",
3335
"purge_config.proto",
3436
"search_service.proto",
37+
"serving_config.proto",
38+
"serving_config_service.proto",
3539
"user_event.proto",
3640
"user_event_service.proto",
3741
],
@@ -105,6 +109,8 @@ java_gapic_test(
105109
test_classes = [
106110
"com.google.cloud.retail.v2.CatalogServiceClientHttpJsonTest",
107111
"com.google.cloud.retail.v2.CatalogServiceClientTest",
112+
"com.google.cloud.retail.v2.ControlServiceClientHttpJsonTest",
113+
"com.google.cloud.retail.v2.ControlServiceClientTest",
108114
"com.google.cloud.retail.v2.CompletionServiceClientHttpJsonTest",
109115
"com.google.cloud.retail.v2.CompletionServiceClientTest",
110116
"com.google.cloud.retail.v2.PredictionServiceClientHttpJsonTest",
@@ -113,6 +119,8 @@ java_gapic_test(
113119
"com.google.cloud.retail.v2.ProductServiceClientTest",
114120
"com.google.cloud.retail.v2.SearchServiceClientHttpJsonTest",
115121
"com.google.cloud.retail.v2.SearchServiceClientTest",
122+
"com.google.cloud.retail.v2.ServingConfigServiceClientHttpJsonTest",
123+
"com.google.cloud.retail.v2.ServingConfigServiceClientTest",
116124
"com.google.cloud.retail.v2.UserEventServiceClientHttpJsonTest",
117125
"com.google.cloud.retail.v2.UserEventServiceClientTest",
118126
],

google/cloud/retail/v2/catalog.proto

Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ package google.cloud.retail.v2;
1818

1919
import "google/api/field_behavior.proto";
2020
import "google/api/resource.proto";
21+
import "google/cloud/retail/v2/common.proto";
22+
import "google/cloud/retail/v2/import_config.proto";
2123

2224
option csharp_namespace = "Google.Cloud.Retail.V2";
2325
option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2;retail";
@@ -82,6 +84,244 @@ message ProductLevelConfig {
8284
string merchant_center_product_id_field = 2;
8385
}
8486

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.v2.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.v2.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.v2.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.v2.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+
// To be indexable, the attribute name can contain only alpha-numeric
148+
// characters and underscores. For example, an attribute named
149+
// `attributes.abc_xyz` can be indexed, but an attribute named
150+
// `attributes.abc-xyz` cannot be indexed.
151+
string key = 1 [(google.api.field_behavior) = REQUIRED];
152+
153+
// Output only. Indicates whether this attribute has been used by any
154+
// products. `True` if at least one [Product][google.cloud.retail.v2.Product]
155+
// is using this attribute in
156+
// [Product.attributes][google.cloud.retail.v2.Product.attributes]. Otherwise,
157+
// this field is `False`.
158+
//
159+
// [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] can be
160+
// pre-loaded by using
161+
// [CatalogService.AddCatalogAttribute][google.cloud.retail.v2.CatalogService.AddCatalogAttribute],
162+
// [CatalogService.ImportCatalogAttributes][], or
163+
// [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2.CatalogService.UpdateAttributesConfig]
164+
// APIs. This field is `False` for pre-loaded
165+
// [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s.
166+
//
167+
// Only pre-loaded
168+
// [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
169+
// neither in use by products nor predefined can be deleted.
170+
// [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute]s that are
171+
// either in use by products or are predefined cannot be deleted; however,
172+
// their configuration properties will reset to default values upon removal
173+
// request.
174+
//
175+
// After catalog changes, it takes about 10 minutes for this field to update.
176+
bool in_use = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
177+
178+
// Output only. The type of this attribute. This is derived from the attribute
179+
// in [Product.attributes][google.cloud.retail.v2.Product.attributes].
180+
AttributeType type = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
181+
182+
// When
183+
// [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level]
184+
// is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
185+
// are indexed so that it can be filtered, faceted, or boosted in
186+
// [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
187+
IndexableOption indexable_option = 5;
188+
189+
// If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic
190+
// facet. Could only be DYNAMIC_FACETABLE_DISABLED if
191+
// [CatalogAttribute.indexable_option][google.cloud.retail.v2.CatalogAttribute.indexable_option]
192+
// is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
193+
DynamicFacetableOption dynamic_facetable_option = 6;
194+
195+
// When
196+
// [AttributesConfig.attribute_config_level][google.cloud.retail.v2.AttributesConfig.attribute_config_level]
197+
// is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values
198+
// are searchable by text queries in
199+
// [SearchService.Search][google.cloud.retail.v2.SearchService.Search].
200+
//
201+
// If SEARCHABLE_ENABLED but attribute type is numerical, attribute values
202+
// will not be searchable by text queries in
203+
// [SearchService.Search][google.cloud.retail.v2.SearchService.Search], as
204+
// there are no text values associated to numerical attributes.
205+
SearchableOption searchable_option = 7;
206+
}
207+
208+
// Catalog level attribute config.
209+
message AttributesConfig {
210+
option (google.api.resource) = {
211+
type: "retail.googleapis.com/AttributesConfig"
212+
pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/attributesConfig"
213+
};
214+
215+
// Required. Immutable. The fully qualified resource name of the attribute
216+
// config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`
217+
string name = 1 [
218+
(google.api.field_behavior) = REQUIRED,
219+
(google.api.field_behavior) = IMMUTABLE
220+
];
221+
222+
// Enable attribute(s) config at catalog level.
223+
// For example, indexable, dynamic_facetable, or searchable for each
224+
// attribute.
225+
//
226+
// The key is catalog attribute's name.
227+
// For example: `color`, `brands`, `attributes.custom_attribute`, such as
228+
// `attributes.xyz`.
229+
//
230+
// The maximum number of catalog attributes allowed in a request is 1000.
231+
map<string, CatalogAttribute> catalog_attributes = 2;
232+
233+
// Output only. The
234+
// [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
235+
// for this catalog.
236+
AttributeConfigLevel attribute_config_level = 3
237+
[(google.api.field_behavior) = OUTPUT_ONLY];
238+
}
239+
240+
// Catalog level autocomplete config for customers to customize autocomplete
241+
// feature's settings.
242+
message CompletionConfig {
243+
option (google.api.resource) = {
244+
type: "retail.googleapis.com/CompletionConfig"
245+
pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/completionConfig"
246+
};
247+
248+
// Required. Immutable. Fully qualified name
249+
// `projects/*/locations/*/catalogs/*/completionConfig`
250+
string name = 1 [
251+
(google.api.field_behavior) = REQUIRED,
252+
(google.api.field_behavior) = IMMUTABLE
253+
];
254+
255+
// Specifies the matching order for autocomplete suggestions, e.g., a query
256+
// consisting of 'sh' with 'out-of-order' specified would suggest "women's
257+
// shoes", whereas a query of 'red s' with 'exact-prefix' specified would
258+
// suggest "red shoes". Currently supported values:
259+
//
260+
// * 'out-of-order'
261+
// * 'exact-prefix'
262+
//
263+
// Default value: 'exact-prefix'.
264+
string matching_order = 2;
265+
266+
// The maximum number of autocomplete suggestions returned per term. Default
267+
// value is 20. If left unset or set to 0, then will fallback to default
268+
// value.
269+
//
270+
// Value range is 1 to 20.
271+
int32 max_suggestions = 3;
272+
273+
// The minimum number of characters needed to be typed in order to get
274+
// suggestions. Default value is 2. If left unset or set to 0, then will
275+
// fallback to default value.
276+
//
277+
// Value range is 1 to 20.
278+
int32 min_prefix_length = 4;
279+
280+
// If set to true, the auto learning function is enabled. Auto learning uses
281+
// user data to generate suggestions using ML techniques. Default value is
282+
// false. Only after enabling auto learning can users use `cloud-retail`
283+
// data in
284+
// [CompleteQueryRequest][google.cloud.retail.v2.CompleteQueryRequest].
285+
bool auto_learning = 11;
286+
287+
// Output only. The source data for the latest import of the autocomplete
288+
// suggestion phrases.
289+
CompletionDataInputConfig suggestions_input_config = 5
290+
[(google.api.field_behavior) = OUTPUT_ONLY];
291+
292+
// Output only. Name of the LRO corresponding to the latest suggestion terms
293+
// list import.
294+
//
295+
// Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
296+
// retrieve the latest state of the Long Running Operation.
297+
string last_suggestions_import_operation = 6
298+
[(google.api.field_behavior) = OUTPUT_ONLY];
299+
300+
// Output only. The source data for the latest import of the autocomplete
301+
// denylist phrases.
302+
CompletionDataInputConfig denylist_input_config = 7
303+
[(google.api.field_behavior) = OUTPUT_ONLY];
304+
305+
// Output only. Name of the LRO corresponding to the latest denylist import.
306+
//
307+
// Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
308+
// retrieve the latest state of the Long Running Operation.
309+
string last_denylist_import_operation = 8
310+
[(google.api.field_behavior) = OUTPUT_ONLY];
311+
312+
// Output only. The source data for the latest import of the autocomplete
313+
// allowlist phrases.
314+
CompletionDataInputConfig allowlist_input_config = 9
315+
[(google.api.field_behavior) = OUTPUT_ONLY];
316+
317+
// Output only. Name of the LRO corresponding to the latest allowlist import.
318+
//
319+
// Can use [GetOperation][google.longrunning.Operations.GetOperation] API to
320+
// retrieve the latest state of the Long Running Operation.
321+
string last_allowlist_import_operation = 10
322+
[(google.api.field_behavior) = OUTPUT_ONLY];
323+
}
324+
85325
// The catalog configuration.
86326
message Catalog {
87327
option (google.api.resource) = {

0 commit comments

Comments
 (0)
0