google-cloud-retail-v2 0.10.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +1 -1
- data/lib/google/cloud/retail/v2/catalog_pb.rb +69 -0
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +718 -0
- data/lib/google/cloud/retail/v2/catalog_service/paths.rb +38 -0
- data/lib/google/cloud/retail/v2/catalog_service.rb +1 -1
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +34 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +38 -0
- data/lib/google/cloud/retail/v2/common_pb.rb +86 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +11 -8
- data/lib/google/cloud/retail/v2/completion_service.rb +2 -2
- data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +3 -3
- data/lib/google/cloud/retail/v2/control_pb.rb +33 -0
- data/lib/google/cloud/retail/v2/control_service/client.rb +807 -0
- data/lib/google/cloud/retail/v2/control_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/control_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/control_service.rb +49 -0
- data/lib/google/cloud/retail/v2/control_service_pb.rb +57 -0
- data/lib/google/cloud/retail/v2/control_service_services_pb.rb +65 -0
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +7 -8
- data/lib/google/cloud/retail/v2/prediction_service.rb +1 -1
- data/lib/google/cloud/retail/v2/product_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +65 -25
- data/lib/google/cloud/retail/v2/product_service.rb +1 -1
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +58 -13
- data/lib/google/cloud/retail/v2/search_service/client.rb +16 -5
- data/lib/google/cloud/retail/v2/search_service.rb +2 -2
- data/lib/google/cloud/retail/v2/search_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +51 -0
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +998 -0
- data/lib/google/cloud/retail/v2/serving_config_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/serving_config_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/serving_config_service.rb +49 -0
- data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +66 -0
- data/lib/google/cloud/retail/v2/serving_config_service_services_pb.rb +74 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +27 -14
- data/lib/google/cloud/retail/v2/user_event_service.rb +1 -1
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +5 -0
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +10 -10
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +4 -2
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/retail/v2/catalog.rb +271 -0
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +133 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +316 -4
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +6 -3
- data/proto_docs/google/cloud/retail/v2/control.rb +75 -0
- data/proto_docs/google/cloud/retail/v2/control_service.rb +122 -0
- data/proto_docs/google/cloud/retail/v2/import_config.rb +20 -35
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +7 -8
- data/proto_docs/google/cloud/retail/v2/product.rb +33 -5
- data/proto_docs/google/cloud/retail/v2/search_service.rb +44 -10
- data/proto_docs/google/cloud/retail/v2/serving_config.rb +255 -0
- data/proto_docs/google/cloud/retail/v2/serving_config_service.rb +143 -0
- data/proto_docs/google/cloud/retail/v2/user_event.rb +1 -1
- data/proto_docs/google/cloud/retail/v2/user_event_service.rb +24 -8
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +24 -4
@@ -158,6 +158,139 @@ module Google
|
|
158
158
|
include ::Google::Protobuf::MessageExts
|
159
159
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
160
160
|
end
|
161
|
+
|
162
|
+
# Request for
|
163
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#get_completion_config CatalogService.GetCompletionConfig}
|
164
|
+
# method.
|
165
|
+
# @!attribute [rw] name
|
166
|
+
# @return [::String]
|
167
|
+
# Required. Full CompletionConfig resource name. Format:
|
168
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
|
169
|
+
class GetCompletionConfigRequest
|
170
|
+
include ::Google::Protobuf::MessageExts
|
171
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
172
|
+
end
|
173
|
+
|
174
|
+
# Request for
|
175
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#update_completion_config CatalogService.UpdateCompletionConfig}
|
176
|
+
# method.
|
177
|
+
# @!attribute [rw] completion_config
|
178
|
+
# @return [::Google::Cloud::Retail::V2::CompletionConfig]
|
179
|
+
# Required. The {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig}
|
180
|
+
# to update.
|
181
|
+
#
|
182
|
+
# If the caller does not have permission to update the
|
183
|
+
# {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig}, then a
|
184
|
+
# PERMISSION_DENIED error is returned.
|
185
|
+
#
|
186
|
+
# If the {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig} to
|
187
|
+
# update does not exist, a NOT_FOUND error is returned.
|
188
|
+
# @!attribute [rw] update_mask
|
189
|
+
# @return [::Google::Protobuf::FieldMask]
|
190
|
+
# Indicates which fields in the provided
|
191
|
+
# {::Google::Cloud::Retail::V2::CompletionConfig CompletionConfig} to update. The
|
192
|
+
# following are the only supported fields:
|
193
|
+
#
|
194
|
+
# * {::Google::Cloud::Retail::V2::CompletionConfig#matching_order CompletionConfig.matching_order}
|
195
|
+
# * {::Google::Cloud::Retail::V2::CompletionConfig#max_suggestions CompletionConfig.max_suggestions}
|
196
|
+
# * {::Google::Cloud::Retail::V2::CompletionConfig#min_prefix_length CompletionConfig.min_prefix_length}
|
197
|
+
# * {::Google::Cloud::Retail::V2::CompletionConfig#auto_learning CompletionConfig.auto_learning}
|
198
|
+
#
|
199
|
+
# If not set, all supported fields are updated.
|
200
|
+
class UpdateCompletionConfigRequest
|
201
|
+
include ::Google::Protobuf::MessageExts
|
202
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
203
|
+
end
|
204
|
+
|
205
|
+
# Request for
|
206
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#get_attributes_config CatalogService.GetAttributesConfig}
|
207
|
+
# method.
|
208
|
+
# @!attribute [rw] name
|
209
|
+
# @return [::String]
|
210
|
+
# Required. Full AttributesConfig resource name. Format:
|
211
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
|
212
|
+
class GetAttributesConfigRequest
|
213
|
+
include ::Google::Protobuf::MessageExts
|
214
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
215
|
+
end
|
216
|
+
|
217
|
+
# Request for
|
218
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#update_attributes_config CatalogService.UpdateAttributesConfig}
|
219
|
+
# method.
|
220
|
+
# @!attribute [rw] attributes_config
|
221
|
+
# @return [::Google::Cloud::Retail::V2::AttributesConfig]
|
222
|
+
# Required. The {::Google::Cloud::Retail::V2::AttributesConfig AttributesConfig}
|
223
|
+
# to update.
|
224
|
+
# @!attribute [rw] update_mask
|
225
|
+
# @return [::Google::Protobuf::FieldMask]
|
226
|
+
# Indicates which fields in the provided
|
227
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig AttributesConfig} to update. The
|
228
|
+
# following is the only supported field:
|
229
|
+
#
|
230
|
+
# * {::Google::Cloud::Retail::V2::AttributesConfig#catalog_attributes AttributesConfig.catalog_attributes}
|
231
|
+
#
|
232
|
+
# If not set, all supported fields are updated.
|
233
|
+
class UpdateAttributesConfigRequest
|
234
|
+
include ::Google::Protobuf::MessageExts
|
235
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
236
|
+
end
|
237
|
+
|
238
|
+
# Request for
|
239
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#add_catalog_attribute CatalogService.AddCatalogAttribute}
|
240
|
+
# method.
|
241
|
+
# @!attribute [rw] attributes_config
|
242
|
+
# @return [::String]
|
243
|
+
# Required. Full AttributesConfig resource name. Format:
|
244
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
|
245
|
+
# @!attribute [rw] catalog_attribute
|
246
|
+
# @return [::Google::Cloud::Retail::V2::CatalogAttribute]
|
247
|
+
# Required. The {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}
|
248
|
+
# to add.
|
249
|
+
class AddCatalogAttributeRequest
|
250
|
+
include ::Google::Protobuf::MessageExts
|
251
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
252
|
+
end
|
253
|
+
|
254
|
+
# Request for
|
255
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#remove_catalog_attribute CatalogService.RemoveCatalogAttribute}
|
256
|
+
# method.
|
257
|
+
# @!attribute [rw] attributes_config
|
258
|
+
# @return [::String]
|
259
|
+
# Required. Full AttributesConfig resource name. Format:
|
260
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
|
261
|
+
# @!attribute [rw] key
|
262
|
+
# @return [::String]
|
263
|
+
# Required. The attribute name key of the
|
264
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} to remove.
|
265
|
+
class RemoveCatalogAttributeRequest
|
266
|
+
include ::Google::Protobuf::MessageExts
|
267
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
268
|
+
end
|
269
|
+
|
270
|
+
# Request for
|
271
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#replace_catalog_attribute CatalogService.ReplaceCatalogAttribute}
|
272
|
+
# method.
|
273
|
+
# @!attribute [rw] attributes_config
|
274
|
+
# @return [::String]
|
275
|
+
# Required. Full AttributesConfig resource name. Format:
|
276
|
+
# `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
|
277
|
+
# @!attribute [rw] catalog_attribute
|
278
|
+
# @return [::Google::Cloud::Retail::V2::CatalogAttribute]
|
279
|
+
# Required. The updated
|
280
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}.
|
281
|
+
# @!attribute [rw] update_mask
|
282
|
+
# @return [::Google::Protobuf::FieldMask]
|
283
|
+
# Indicates which fields in the provided
|
284
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} to update. The
|
285
|
+
# following are NOT supported:
|
286
|
+
#
|
287
|
+
# * {::Google::Cloud::Retail::V2::CatalogAttribute#key CatalogAttribute.key}
|
288
|
+
#
|
289
|
+
# If not set, all supported fields are updated.
|
290
|
+
class ReplaceCatalogAttributeRequest
|
291
|
+
include ::Google::Protobuf::MessageExts
|
292
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
293
|
+
end
|
161
294
|
end
|
162
295
|
end
|
163
296
|
end
|
@@ -21,6 +21,276 @@ module Google
|
|
21
21
|
module Cloud
|
22
22
|
module Retail
|
23
23
|
module V2
|
24
|
+
# Metadata that is used to define a condition that triggers an action.
|
25
|
+
# A valid condition must specify at least one of 'query_terms' or
|
26
|
+
# 'products_filter'. If multiple fields are specified, the condition is met if
|
27
|
+
# all the fields are satisfied e.g. if a set of query terms and product_filter
|
28
|
+
# are set, then only items matching the product_filter for requests with a
|
29
|
+
# query matching the query terms wil get boosted.
|
30
|
+
# @!attribute [rw] query_terms
|
31
|
+
# @return [::Array<::Google::Cloud::Retail::V2::Condition::QueryTerm>]
|
32
|
+
# A list (up to 10 entries) of terms to match the query on. If not
|
33
|
+
# specified, match all queries.
|
34
|
+
# If many query terms are specified, the condition
|
35
|
+
# is matched if any of the terms is a match (i.e. using the OR operator).
|
36
|
+
# @!attribute [rw] active_time_range
|
37
|
+
# @return [::Array<::Google::Cloud::Retail::V2::Condition::TimeRange>]
|
38
|
+
# Range of time(s) specifying when Condition is active.
|
39
|
+
# Condition true if any time range matches.
|
40
|
+
class Condition
|
41
|
+
include ::Google::Protobuf::MessageExts
|
42
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
43
|
+
|
44
|
+
# Query terms that we want to match on.
|
45
|
+
# @!attribute [rw] value
|
46
|
+
# @return [::String]
|
47
|
+
# The value of the term to match on.
|
48
|
+
# Value cannot be empty.
|
49
|
+
# Value can have at most 3 terms if specified as a partial match. Each
|
50
|
+
# space separated string is considered as one term.
|
51
|
+
# For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms
|
52
|
+
# and not allowed for a partial match.
|
53
|
+
# @!attribute [rw] full_match
|
54
|
+
# @return [::Boolean]
|
55
|
+
# Whether this is supposed to be a full or partial match.
|
56
|
+
class QueryTerm
|
57
|
+
include ::Google::Protobuf::MessageExts
|
58
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
59
|
+
end
|
60
|
+
|
61
|
+
# Used for time-dependent conditions.
|
62
|
+
# Example: Want to have rule applied for week long sale.
|
63
|
+
# @!attribute [rw] start_time
|
64
|
+
# @return [::Google::Protobuf::Timestamp]
|
65
|
+
# Start of time range. Range is inclusive.
|
66
|
+
# @!attribute [rw] end_time
|
67
|
+
# @return [::Google::Protobuf::Timestamp]
|
68
|
+
# End of time range. Range is inclusive.
|
69
|
+
class TimeRange
|
70
|
+
include ::Google::Protobuf::MessageExts
|
71
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# A rule is a condition-action pair
|
76
|
+
#
|
77
|
+
# * A condition defines when a rule is to be triggered.
|
78
|
+
# * An action specifies what occurs on that trigger.
|
79
|
+
# Currently rules only work for {::Google::Cloud::Retail::V2::Control controls} with
|
80
|
+
# {::Google::Cloud::Retail::V2::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH}.
|
81
|
+
# @!attribute [rw] boost_action
|
82
|
+
# @return [::Google::Cloud::Retail::V2::Rule::BoostAction]
|
83
|
+
# A boost action.
|
84
|
+
# @!attribute [rw] redirect_action
|
85
|
+
# @return [::Google::Cloud::Retail::V2::Rule::RedirectAction]
|
86
|
+
# Redirects a shopper to a specific page.
|
87
|
+
# @!attribute [rw] oneway_synonyms_action
|
88
|
+
# @return [::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction]
|
89
|
+
# Treats specific term as a synonym with a group of terms.
|
90
|
+
# Group of terms will not be treated as synonyms with the specific term.
|
91
|
+
# @!attribute [rw] do_not_associate_action
|
92
|
+
# @return [::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction]
|
93
|
+
# Prevents term from being associated with other terms.
|
94
|
+
# @!attribute [rw] replacement_action
|
95
|
+
# @return [::Google::Cloud::Retail::V2::Rule::ReplacementAction]
|
96
|
+
# Replaces specific terms in the query.
|
97
|
+
# @!attribute [rw] ignore_action
|
98
|
+
# @return [::Google::Cloud::Retail::V2::Rule::IgnoreAction]
|
99
|
+
# Ignores specific terms from query during search.
|
100
|
+
# @!attribute [rw] filter_action
|
101
|
+
# @return [::Google::Cloud::Retail::V2::Rule::FilterAction]
|
102
|
+
# Filters results.
|
103
|
+
# @!attribute [rw] twoway_synonyms_action
|
104
|
+
# @return [::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction]
|
105
|
+
# Treats a set of terms as synonyms of one another.
|
106
|
+
# @!attribute [rw] condition
|
107
|
+
# @return [::Google::Cloud::Retail::V2::Condition]
|
108
|
+
# Required. The condition that triggers the rule.
|
109
|
+
# If the condition is empty, the rule will always apply.
|
110
|
+
class Rule
|
111
|
+
include ::Google::Protobuf::MessageExts
|
112
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
113
|
+
|
114
|
+
# A boost action to apply to results matching condition specified above.
|
115
|
+
# @!attribute [rw] boost
|
116
|
+
# @return [::Float]
|
117
|
+
# Strength of the condition boost, which must be in [-1, 1]. Negative
|
118
|
+
# boost means demotion. Default is 0.0.
|
119
|
+
#
|
120
|
+
# Setting to 1.0 gives the item a big promotion. However, it does not
|
121
|
+
# necessarily mean that the boosted item will be the top result at all
|
122
|
+
# times, nor that other items will be excluded. Results could still be
|
123
|
+
# shown even when none of them matches the condition. And results that
|
124
|
+
# are significantly more relevant to the search query can still trump
|
125
|
+
# your heavily favored but irrelevant items.
|
126
|
+
#
|
127
|
+
# Setting to -1.0 gives the item a big demotion. However, results that
|
128
|
+
# are deeply relevant might still be shown. The item will have an
|
129
|
+
# upstream battle to get a fairly high ranking, but it is not blocked out
|
130
|
+
# completely.
|
131
|
+
#
|
132
|
+
# Setting to 0.0 means no boost applied. The boosting condition is
|
133
|
+
# ignored.
|
134
|
+
# @!attribute [rw] products_filter
|
135
|
+
# @return [::String]
|
136
|
+
# The filter can have a max size of 5000 characters.
|
137
|
+
# An expression which specifies which products to apply an action to.
|
138
|
+
# The syntax and supported fields are the same as a filter expression. See
|
139
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter} for
|
140
|
+
# detail syntax and limitations.
|
141
|
+
#
|
142
|
+
# Examples:
|
143
|
+
#
|
144
|
+
# * To boost products with product ID "product_1" or "product_2", and
|
145
|
+
# color
|
146
|
+
# "Red" or "Blue":<br>
|
147
|
+
# *(id: ANY("product_1", "product_2"))<br>*
|
148
|
+
# *AND<br>*
|
149
|
+
# *(colorFamilies: ANY("Red", "Blue"))<br>*
|
150
|
+
class BoostAction
|
151
|
+
include ::Google::Protobuf::MessageExts
|
152
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
153
|
+
end
|
154
|
+
|
155
|
+
# * Rule Condition:
|
156
|
+
# - No
|
157
|
+
# {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
|
158
|
+
# provided is a global match.
|
159
|
+
# - 1 or more
|
160
|
+
# {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
|
161
|
+
# provided are combined with OR operator.
|
162
|
+
# * Action Input: The request query and filter that are applied to the
|
163
|
+
# retrieved products, in addition to any filters already provided with the
|
164
|
+
# SearchRequest. The AND operator is used to combine the query's existing
|
165
|
+
# filters with the filter rule(s). NOTE: May result in 0 results when
|
166
|
+
# filters conflict.
|
167
|
+
# * Action Result: Filters the returned objects to be ONLY those that passed
|
168
|
+
# the filter.
|
169
|
+
# @!attribute [rw] filter
|
170
|
+
# @return [::String]
|
171
|
+
# A filter to apply on the matching condition results. Supported features:
|
172
|
+
#
|
173
|
+
# * {::Google::Cloud::Retail::V2::Rule::FilterAction#filter filter} must be set.
|
174
|
+
# * Filter syntax is identical to
|
175
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}. See
|
176
|
+
# more
|
177
|
+
# details at the Retail Search
|
178
|
+
# [user guide](/retail/search/docs/filter-and-order#filter).
|
179
|
+
# * To filter products with product ID "product_1" or "product_2", and
|
180
|
+
# color
|
181
|
+
# "Red" or "Blue":<br>
|
182
|
+
# *(id: ANY("product_1", "product_2"))<br>*
|
183
|
+
# *AND<br>*
|
184
|
+
# *(colorFamilies: ANY("Red", "Blue"))<br>*
|
185
|
+
class FilterAction
|
186
|
+
include ::Google::Protobuf::MessageExts
|
187
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
188
|
+
end
|
189
|
+
|
190
|
+
# Redirects a shopper to a specific page.
|
191
|
+
#
|
192
|
+
# * Rule Condition:
|
193
|
+
# - Must specify
|
194
|
+
# {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}.
|
195
|
+
# * Action Input: Request Query
|
196
|
+
# * Action Result: Redirects shopper to provided uri.
|
197
|
+
# @!attribute [rw] redirect_uri
|
198
|
+
# @return [::String]
|
199
|
+
# URL must have length equal or less than 2000 characters.
|
200
|
+
class RedirectAction
|
201
|
+
include ::Google::Protobuf::MessageExts
|
202
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
203
|
+
end
|
204
|
+
|
205
|
+
# Creates a set of terms that will be treated as synonyms of each other.
|
206
|
+
# Example: synonyms of "sneakers" and "shoes":
|
207
|
+
#
|
208
|
+
# * "sneakers" will use a synonym of "shoes".
|
209
|
+
# * "shoes" will use a synonym of "sneakers".
|
210
|
+
# @!attribute [rw] synonyms
|
211
|
+
# @return [::Array<::String>]
|
212
|
+
# Defines a set of synonyms.
|
213
|
+
# Can specify up to 100 synonyms.
|
214
|
+
# Must specify at least 2 synonyms.
|
215
|
+
class TwowaySynonymsAction
|
216
|
+
include ::Google::Protobuf::MessageExts
|
217
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
218
|
+
end
|
219
|
+
|
220
|
+
# Maps a set of terms to a set of synonyms.
|
221
|
+
# Set of synonyms will be treated as synonyms of each query term only.
|
222
|
+
# `query_terms` will not be treated as synonyms of each other.
|
223
|
+
# Example: "sneakers" will use a synonym of "shoes".
|
224
|
+
# "shoes" will not use a synonym of "sneakers".
|
225
|
+
# @!attribute [rw] query_terms
|
226
|
+
# @return [::Array<::String>]
|
227
|
+
# Terms from the search query.
|
228
|
+
# Will treat synonyms as their synonyms.
|
229
|
+
# Not themselves synonyms of the synonyms.
|
230
|
+
# Can specify up to 100 terms.
|
231
|
+
# @!attribute [rw] synonyms
|
232
|
+
# @return [::Array<::String>]
|
233
|
+
# Defines a set of synonyms.
|
234
|
+
# Cannot contain duplicates.
|
235
|
+
# Can specify up to 100 synonyms.
|
236
|
+
# @!attribute [rw] oneway_terms
|
237
|
+
# @return [::Array<::String>]
|
238
|
+
# Will be [deprecated = true] post migration;
|
239
|
+
class OnewaySynonymsAction
|
240
|
+
include ::Google::Protobuf::MessageExts
|
241
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
242
|
+
end
|
243
|
+
|
244
|
+
# Prevents `query_term` from being associated with specified terms during
|
245
|
+
# search.
|
246
|
+
# Example: Don't associate "gShoe" and "cheap".
|
247
|
+
# @!attribute [rw] query_terms
|
248
|
+
# @return [::Array<::String>]
|
249
|
+
# Terms from the search query.
|
250
|
+
# Will not consider do_not_associate_terms for search if in search query.
|
251
|
+
# Can specify up to 100 terms.
|
252
|
+
# @!attribute [rw] do_not_associate_terms
|
253
|
+
# @return [::Array<::String>]
|
254
|
+
# Cannot contain duplicates or the query term.
|
255
|
+
# Can specify up to 100 terms.
|
256
|
+
# @!attribute [rw] terms
|
257
|
+
# @return [::Array<::String>]
|
258
|
+
# Will be [deprecated = true] post migration;
|
259
|
+
class DoNotAssociateAction
|
260
|
+
include ::Google::Protobuf::MessageExts
|
261
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
262
|
+
end
|
263
|
+
|
264
|
+
# Replaces a term in the query. Multiple replacement candidates can be
|
265
|
+
# specified. All `query_terms` will be replaced with the replacement term.
|
266
|
+
# Example: Replace "gShoe" with "google shoe".
|
267
|
+
# @!attribute [rw] query_terms
|
268
|
+
# @return [::Array<::String>]
|
269
|
+
# Terms from the search query.
|
270
|
+
# Will be replaced by replacement term.
|
271
|
+
# Can specify up to 100 terms.
|
272
|
+
# @!attribute [rw] replacement_term
|
273
|
+
# @return [::String]
|
274
|
+
# Term that will be used for replacement.
|
275
|
+
# @!attribute [rw] term
|
276
|
+
# @return [::String]
|
277
|
+
# Will be [deprecated = true] post migration;
|
278
|
+
class ReplacementAction
|
279
|
+
include ::Google::Protobuf::MessageExts
|
280
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
281
|
+
end
|
282
|
+
|
283
|
+
# Prevents a term in the query from being used in search.
|
284
|
+
# Example: Don't search for "shoddy".
|
285
|
+
# @!attribute [rw] ignore_terms
|
286
|
+
# @return [::Array<::String>]
|
287
|
+
# Terms to ignore in the search query.
|
288
|
+
class IgnoreAction
|
289
|
+
include ::Google::Protobuf::MessageExts
|
290
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
24
294
|
# An intended audience of the {::Google::Cloud::Retail::V2::Product Product} for
|
25
295
|
# whom it's sold.
|
26
296
|
# @!attribute [rw] genders
|
@@ -116,8 +386,8 @@ module Google
|
|
116
386
|
# @!attribute [rw] searchable
|
117
387
|
# @return [::Boolean]
|
118
388
|
# This field is normally ignored unless
|
119
|
-
#
|
120
|
-
# {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
389
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level AttributesConfig.attribute_config_level}
|
390
|
+
# of the {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
121
391
|
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level
|
122
392
|
# attribute configuration, see [Configuration
|
123
393
|
# modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
|
@@ -131,8 +401,8 @@ module Google
|
|
131
401
|
# @!attribute [rw] indexable
|
132
402
|
# @return [::Boolean]
|
133
403
|
# This field is normally ignored unless
|
134
|
-
#
|
135
|
-
# {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
404
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level AttributesConfig.attribute_config_level}
|
405
|
+
# of the {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
136
406
|
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level
|
137
407
|
# attribute configuration, see [Configuration
|
138
408
|
# modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
|
@@ -507,6 +777,48 @@ module Google
|
|
507
777
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
508
778
|
end
|
509
779
|
end
|
780
|
+
|
781
|
+
# At which level we offer configuration for attributes.
|
782
|
+
module AttributeConfigLevel
|
783
|
+
# Value used when unset. In this case, server behavior defaults to
|
784
|
+
# {::Google::Cloud::Retail::V2::AttributeConfigLevel::CATALOG_LEVEL_ATTRIBUTE_CONFIG CATALOG_LEVEL_ATTRIBUTE_CONFIG}.
|
785
|
+
ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED = 0
|
786
|
+
|
787
|
+
# At this level, we honor the attribute configurations set in
|
788
|
+
# {::Google::Cloud::Retail::V2::Product#attributes Product.attributes}.
|
789
|
+
PRODUCT_LEVEL_ATTRIBUTE_CONFIG = 1
|
790
|
+
|
791
|
+
# At this level, we honor the attribute configurations set in
|
792
|
+
# [CatalogConfig.attribute_configs][].
|
793
|
+
CATALOG_LEVEL_ATTRIBUTE_CONFIG = 2
|
794
|
+
end
|
795
|
+
|
796
|
+
# The type of solution.
|
797
|
+
module SolutionType
|
798
|
+
# Default value.
|
799
|
+
SOLUTION_TYPE_UNSPECIFIED = 0
|
800
|
+
|
801
|
+
# Used for Recommendations AI.
|
802
|
+
SOLUTION_TYPE_RECOMMENDATION = 1
|
803
|
+
|
804
|
+
# Used for Retail Search.
|
805
|
+
SOLUTION_TYPE_SEARCH = 2
|
806
|
+
end
|
807
|
+
|
808
|
+
# The use case of Cloud Retail Search.
|
809
|
+
module SearchSolutionUseCase
|
810
|
+
# The value when it's unspecified. In this case, server behavior defaults to
|
811
|
+
# {::Google::Cloud::Retail::V2::SearchSolutionUseCase::SEARCH_SOLUTION_USE_CASE_SEARCH SEARCH_SOLUTION_USE_CASE_SEARCH}.
|
812
|
+
SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0
|
813
|
+
|
814
|
+
# Search use case. Expects the traffic has a non-empty
|
815
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#query query}.
|
816
|
+
SEARCH_SOLUTION_USE_CASE_SEARCH = 1
|
817
|
+
|
818
|
+
# Browse use case. Expects the traffic has an empty
|
819
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#query query}.
|
820
|
+
SEARCH_SOLUTION_USE_CASE_BROWSE = 2
|
821
|
+
end
|
510
822
|
end
|
511
823
|
end
|
512
824
|
end
|
@@ -55,8 +55,10 @@ module Google
|
|
55
55
|
# number of language codes is 3.
|
56
56
|
# @!attribute [rw] device_type
|
57
57
|
# @return [::String]
|
58
|
-
# The device type context for completion suggestions.
|
59
|
-
#
|
58
|
+
# The device type context for completion suggestions. We recommend that you
|
59
|
+
# leave this field empty.
|
60
|
+
#
|
61
|
+
# It can apply different suggestions on different device types, e.g.
|
60
62
|
# `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device
|
61
63
|
# types.
|
62
64
|
#
|
@@ -87,7 +89,8 @@ module Google
|
|
87
89
|
# @!attribute [rw] max_suggestions
|
88
90
|
# @return [::Integer]
|
89
91
|
# Completion max suggestions. If left unset or set to 0, then will fallback
|
90
|
-
# to the configured value
|
92
|
+
# to the configured value
|
93
|
+
# {::Google::Cloud::Retail::V2::CompletionConfig#max_suggestions CompletionConfig.max_suggestions}.
|
91
94
|
#
|
92
95
|
# The maximum allowed max suggestions is 20. If it is set higher, it will be
|
93
96
|
# capped by 20.
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Retail
|
23
|
+
module V2
|
24
|
+
# Configures dynamic metadata that can be linked to a
|
25
|
+
# {::Google::Cloud::Retail::V2::ServingConfig ServingConfig} and affect search or
|
26
|
+
# recommendation results at serving time.
|
27
|
+
# @!attribute [rw] rule
|
28
|
+
# @return [::Google::Cloud::Retail::V2::Rule]
|
29
|
+
# A rule control - a condition-action pair.
|
30
|
+
# Enacts a set action when the condition is triggered.
|
31
|
+
# For example: Boost "gShoe" when query full matches "Running Shoes".
|
32
|
+
# @!attribute [rw] name
|
33
|
+
# @return [::String]
|
34
|
+
# Immutable. Fully qualified name
|
35
|
+
# `projects/*/locations/global/catalogs/*/controls/*`
|
36
|
+
# @!attribute [rw] display_name
|
37
|
+
# @return [::String]
|
38
|
+
# Required. The human readable control display name. Used in Retail UI.
|
39
|
+
#
|
40
|
+
# This field must be a UTF-8 encoded string with a length limit of 128
|
41
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is thrown.
|
42
|
+
# @!attribute [r] associated_serving_config_ids
|
43
|
+
# @return [::Array<::String>]
|
44
|
+
# Output only. List of {::Google::Cloud::Retail::V2::ServingConfig serving config}
|
45
|
+
# ids that are associated with this control in the same
|
46
|
+
# {::Google::Cloud::Retail::V2::Catalog Catalog}.
|
47
|
+
#
|
48
|
+
# Note the association is managed via the
|
49
|
+
# {::Google::Cloud::Retail::V2::ServingConfig ServingConfig}, this is an output
|
50
|
+
# only denormalized view.
|
51
|
+
# @!attribute [rw] solution_types
|
52
|
+
# @return [::Array<::Google::Cloud::Retail::V2::SolutionType>]
|
53
|
+
# Required. Immutable. The solution types that the control is used for.
|
54
|
+
# Currently we support setting only one type of solution at creation time.
|
55
|
+
#
|
56
|
+
# Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
|
57
|
+
# If no solution type is provided at creation time, will default to
|
58
|
+
# {::Google::Cloud::Retail::V2::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH}.
|
59
|
+
# @!attribute [rw] search_solution_use_case
|
60
|
+
# @return [::Array<::Google::Cloud::Retail::V2::SearchSolutionUseCase>]
|
61
|
+
# Specifies the use case for the control.
|
62
|
+
# Affects what condition fields can be set.
|
63
|
+
# Only settable by search controls.
|
64
|
+
# Will default to
|
65
|
+
# {::Google::Cloud::Retail::V2::SearchSolutionUseCase::SEARCH_SOLUTION_USE_CASE_SEARCH SEARCH_SOLUTION_USE_CASE_SEARCH}
|
66
|
+
# if not specified. Currently only allow one search_solution_use_case per
|
67
|
+
# control.
|
68
|
+
class Control
|
69
|
+
include ::Google::Protobuf::MessageExts
|
70
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|