google-cloud-retail-v2 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/retail/v2/catalog_pb.rb +55 -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_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 +4 -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_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/product_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +42 -12
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +35 -0
- data/lib/google/cloud/retail/v2/search_service/client.rb +12 -1
- data/lib/google/cloud/retail/v2/search_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +44 -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 +2 -2
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +2 -0
- data/proto_docs/google/cloud/retail/v2/catalog.rb +233 -0
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +133 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +314 -4
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +2 -1
- data/proto_docs/google/cloud/retail/v2/control.rb +76 -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/product.rb +7 -1
- data/proto_docs/google/cloud/retail/v2/search_service.rb +29 -2
- data/proto_docs/google/cloud/retail/v2/serving_config.rb +238 -0
- data/proto_docs/google/cloud/retail/v2/serving_config_service.rb +143 -0
- metadata +20 -2
|
@@ -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,274 @@ 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
|
+
# Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not
|
|
52
|
+
# allowed for 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
|
+
# * A condition defines when a rule is to be triggered.
|
|
77
|
+
# * An action specifies what occurs on that trigger.
|
|
78
|
+
# Currently rules only work for {::Google::Cloud::Retail::V2::Control controls} with
|
|
79
|
+
# {::Google::Cloud::Retail::V2::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH}.
|
|
80
|
+
# @!attribute [rw] boost_action
|
|
81
|
+
# @return [::Google::Cloud::Retail::V2::Rule::BoostAction]
|
|
82
|
+
# A boost action.
|
|
83
|
+
# @!attribute [rw] redirect_action
|
|
84
|
+
# @return [::Google::Cloud::Retail::V2::Rule::RedirectAction]
|
|
85
|
+
# Redirects a shopper to a specific page.
|
|
86
|
+
# @!attribute [rw] oneway_synonyms_action
|
|
87
|
+
# @return [::Google::Cloud::Retail::V2::Rule::OnewaySynonymsAction]
|
|
88
|
+
# Treats specific term as a synonym with a group of terms.
|
|
89
|
+
# Group of terms will not be treated as synonyms with the specific term.
|
|
90
|
+
# @!attribute [rw] do_not_associate_action
|
|
91
|
+
# @return [::Google::Cloud::Retail::V2::Rule::DoNotAssociateAction]
|
|
92
|
+
# Prevents term from being associated with other terms.
|
|
93
|
+
# @!attribute [rw] replacement_action
|
|
94
|
+
# @return [::Google::Cloud::Retail::V2::Rule::ReplacementAction]
|
|
95
|
+
# Replaces specific terms in the query.
|
|
96
|
+
# @!attribute [rw] ignore_action
|
|
97
|
+
# @return [::Google::Cloud::Retail::V2::Rule::IgnoreAction]
|
|
98
|
+
# Ignores specific terms from query during search.
|
|
99
|
+
# @!attribute [rw] filter_action
|
|
100
|
+
# @return [::Google::Cloud::Retail::V2::Rule::FilterAction]
|
|
101
|
+
# Filters results.
|
|
102
|
+
# @!attribute [rw] twoway_synonyms_action
|
|
103
|
+
# @return [::Google::Cloud::Retail::V2::Rule::TwowaySynonymsAction]
|
|
104
|
+
# Treats a set of terms as synonyms of one another.
|
|
105
|
+
# @!attribute [rw] condition
|
|
106
|
+
# @return [::Google::Cloud::Retail::V2::Condition]
|
|
107
|
+
# Required. The condition that triggers the rule.
|
|
108
|
+
# If the condition is empty, the rule will always apply.
|
|
109
|
+
class Rule
|
|
110
|
+
include ::Google::Protobuf::MessageExts
|
|
111
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
112
|
+
|
|
113
|
+
# A boost action to apply to results matching condition specified above.
|
|
114
|
+
# @!attribute [rw] boost
|
|
115
|
+
# @return [::Float]
|
|
116
|
+
# Strength of the condition boost, which must be in [-1, 1]. Negative
|
|
117
|
+
# boost means demotion. Default is 0.0.
|
|
118
|
+
#
|
|
119
|
+
# Setting to 1.0 gives the item a big promotion. However, it does not
|
|
120
|
+
# necessarily mean that the boosted item will be the top result at all
|
|
121
|
+
# times, nor that other items will be excluded. Results could still be
|
|
122
|
+
# shown even when none of them matches the condition. And results that
|
|
123
|
+
# are significantly more relevant to the search query can still trump
|
|
124
|
+
# your heavily favored but irrelevant items.
|
|
125
|
+
#
|
|
126
|
+
# Setting to -1.0 gives the item a big demotion. However, results that
|
|
127
|
+
# are deeply relevant might still be shown. The item will have an
|
|
128
|
+
# upstream battle to get a fairly high ranking, but it is not blocked out
|
|
129
|
+
# completely.
|
|
130
|
+
#
|
|
131
|
+
# Setting to 0.0 means no boost applied. The boosting condition is
|
|
132
|
+
# ignored.
|
|
133
|
+
# @!attribute [rw] products_filter
|
|
134
|
+
# @return [::String]
|
|
135
|
+
# The filter can have a max size of 5000 characters.
|
|
136
|
+
# An expression which specifies which products to apply an action to.
|
|
137
|
+
# The syntax and supported fields are the same as a filter expression. See
|
|
138
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter} for
|
|
139
|
+
# detail syntax and limitations.
|
|
140
|
+
#
|
|
141
|
+
# Examples:
|
|
142
|
+
#
|
|
143
|
+
# * To boost products with product ID "product_1" or "product_2", and
|
|
144
|
+
# color
|
|
145
|
+
# "Red" or "Blue":<br>
|
|
146
|
+
# *(id: ANY("product_1", "product_2"))<br>*
|
|
147
|
+
# *AND<br>*
|
|
148
|
+
# *(colorFamilies: ANY("Red", "Blue"))<br>*
|
|
149
|
+
class BoostAction
|
|
150
|
+
include ::Google::Protobuf::MessageExts
|
|
151
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# * Rule Condition:
|
|
155
|
+
# - No
|
|
156
|
+
# {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
|
|
157
|
+
# provided is a global match.
|
|
158
|
+
# - 1 or more
|
|
159
|
+
# {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}
|
|
160
|
+
# provided are combined with OR operator.
|
|
161
|
+
# * Action Input: The request query and filter that are applied to the
|
|
162
|
+
# retrieved products, in addition to any filters already provided with the
|
|
163
|
+
# SearchRequest. The AND operator is used to combine the query's existing
|
|
164
|
+
# filters with the filter rule(s). NOTE: May result in 0 results when
|
|
165
|
+
# filters conflict.
|
|
166
|
+
# * Action Result: Filters the returned objects to be ONLY those that passed
|
|
167
|
+
# the filter.
|
|
168
|
+
# @!attribute [rw] filter
|
|
169
|
+
# @return [::String]
|
|
170
|
+
# A filter to apply on the matching condition results. Supported features:
|
|
171
|
+
#
|
|
172
|
+
# * {::Google::Cloud::Retail::V2::Rule::FilterAction#filter filter} must be set.
|
|
173
|
+
# * Filter syntax is identical to
|
|
174
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}. See
|
|
175
|
+
# more
|
|
176
|
+
# details at the Retail Search
|
|
177
|
+
# [user guide](/retail/search/docs/filter-and-order#filter).
|
|
178
|
+
# * To filter products with product ID "product_1" or "product_2", and
|
|
179
|
+
# color
|
|
180
|
+
# "Red" or "Blue":<br>
|
|
181
|
+
# *(id: ANY("product_1", "product_2"))<br>*
|
|
182
|
+
# *AND<br>*
|
|
183
|
+
# *(colorFamilies: ANY("Red", "Blue"))<br>*
|
|
184
|
+
class FilterAction
|
|
185
|
+
include ::Google::Protobuf::MessageExts
|
|
186
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Redirects a shopper to a specific page.
|
|
190
|
+
#
|
|
191
|
+
# * Rule Condition:
|
|
192
|
+
# - Must specify
|
|
193
|
+
# {::Google::Cloud::Retail::V2::Condition#query_terms Condition.query_terms}.
|
|
194
|
+
# * Action Input: Request Query
|
|
195
|
+
# * Action Result: Redirects shopper to provided uri.
|
|
196
|
+
# @!attribute [rw] redirect_uri
|
|
197
|
+
# @return [::String]
|
|
198
|
+
# URL must have length equal or less than 2000 characters.
|
|
199
|
+
class RedirectAction
|
|
200
|
+
include ::Google::Protobuf::MessageExts
|
|
201
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Creates a set of terms that will be treated as synonyms of each other.
|
|
205
|
+
# Example: synonyms of "sneakers" and "shoes".
|
|
206
|
+
# * "sneakers" will use a synonym of "shoes".
|
|
207
|
+
# * "shoes" will use a synonym of "sneakers".
|
|
208
|
+
# @!attribute [rw] synonyms
|
|
209
|
+
# @return [::Array<::String>]
|
|
210
|
+
# Defines a set of synonyms.
|
|
211
|
+
# Can specify up to 100 synonyms.
|
|
212
|
+
# Must specify at least 2 synonyms.
|
|
213
|
+
class TwowaySynonymsAction
|
|
214
|
+
include ::Google::Protobuf::MessageExts
|
|
215
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Maps a set of terms to a set of synonyms.
|
|
219
|
+
# Set of synonyms will be treated as synonyms of each query term only.
|
|
220
|
+
# `query_terms` will not be treated as synonyms of each other.
|
|
221
|
+
# Example: "sneakers" will use a synonym of "shoes".
|
|
222
|
+
# "shoes" will not use a synonym of "sneakers".
|
|
223
|
+
# @!attribute [rw] query_terms
|
|
224
|
+
# @return [::Array<::String>]
|
|
225
|
+
# Terms from the search query.
|
|
226
|
+
# Will treat synonyms as their synonyms.
|
|
227
|
+
# Not themselves synonyms of the synonyms.
|
|
228
|
+
# Can specify up to 100 terms.
|
|
229
|
+
# @!attribute [rw] synonyms
|
|
230
|
+
# @return [::Array<::String>]
|
|
231
|
+
# Defines a set of synonyms.
|
|
232
|
+
# Cannot contain duplicates.
|
|
233
|
+
# Can specify up to 100 synonyms.
|
|
234
|
+
# @!attribute [rw] oneway_terms
|
|
235
|
+
# @return [::Array<::String>]
|
|
236
|
+
# Will be [deprecated = true] post migration;
|
|
237
|
+
class OnewaySynonymsAction
|
|
238
|
+
include ::Google::Protobuf::MessageExts
|
|
239
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Prevents `query_term` from being associated with specified terms during
|
|
243
|
+
# search.
|
|
244
|
+
# Example: Don't associate "gShoe" and "cheap".
|
|
245
|
+
# @!attribute [rw] query_terms
|
|
246
|
+
# @return [::Array<::String>]
|
|
247
|
+
# Terms from the search query.
|
|
248
|
+
# Will not consider do_not_associate_terms for search if in search query.
|
|
249
|
+
# Can specify up to 100 terms.
|
|
250
|
+
# @!attribute [rw] do_not_associate_terms
|
|
251
|
+
# @return [::Array<::String>]
|
|
252
|
+
# Cannot contain duplicates or the query term.
|
|
253
|
+
# Can specify up to 100 terms.
|
|
254
|
+
# @!attribute [rw] terms
|
|
255
|
+
# @return [::Array<::String>]
|
|
256
|
+
# Will be [deprecated = true] post migration;
|
|
257
|
+
class DoNotAssociateAction
|
|
258
|
+
include ::Google::Protobuf::MessageExts
|
|
259
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Replaces a term in the query. Multiple replacement candidates can be
|
|
263
|
+
# specified. All `query_terms` will be replaced with the replacement term.
|
|
264
|
+
# Example: Replace "gShoe" with "google shoe".
|
|
265
|
+
# @!attribute [rw] query_terms
|
|
266
|
+
# @return [::Array<::String>]
|
|
267
|
+
# Terms from the search query.
|
|
268
|
+
# Will be replaced by replacement term.
|
|
269
|
+
# Can specify up to 100 terms.
|
|
270
|
+
# @!attribute [rw] replacement_term
|
|
271
|
+
# @return [::String]
|
|
272
|
+
# Term that will be used for replacement.
|
|
273
|
+
# @!attribute [rw] term
|
|
274
|
+
# @return [::String]
|
|
275
|
+
# Will be [deprecated = true] post migration;
|
|
276
|
+
class ReplacementAction
|
|
277
|
+
include ::Google::Protobuf::MessageExts
|
|
278
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Prevents a term in the query from being used in search.
|
|
282
|
+
# Example: Don't search for "shoddy".
|
|
283
|
+
# @!attribute [rw] ignore_terms
|
|
284
|
+
# @return [::Array<::String>]
|
|
285
|
+
# Terms to ignore in the search query.
|
|
286
|
+
class IgnoreAction
|
|
287
|
+
include ::Google::Protobuf::MessageExts
|
|
288
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
289
|
+
end
|
|
290
|
+
end
|
|
291
|
+
|
|
24
292
|
# An intended audience of the {::Google::Cloud::Retail::V2::Product Product} for
|
|
25
293
|
# whom it's sold.
|
|
26
294
|
# @!attribute [rw] genders
|
|
@@ -116,8 +384,8 @@ module Google
|
|
|
116
384
|
# @!attribute [rw] searchable
|
|
117
385
|
# @return [::Boolean]
|
|
118
386
|
# This field is normally ignored unless
|
|
119
|
-
#
|
|
120
|
-
# {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
|
387
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level AttributesConfig.attribute_config_level}
|
|
388
|
+
# of the {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
|
121
389
|
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level
|
|
122
390
|
# attribute configuration, see [Configuration
|
|
123
391
|
# modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
|
|
@@ -131,8 +399,8 @@ module Google
|
|
|
131
399
|
# @!attribute [rw] indexable
|
|
132
400
|
# @return [::Boolean]
|
|
133
401
|
# This field is normally ignored unless
|
|
134
|
-
#
|
|
135
|
-
# {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
|
402
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level AttributesConfig.attribute_config_level}
|
|
403
|
+
# of the {::Google::Cloud::Retail::V2::Catalog Catalog} is set to the deprecated
|
|
136
404
|
# 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level
|
|
137
405
|
# attribute configuration, see [Configuration
|
|
138
406
|
# modes](https://cloud.google.com/retail/docs/attribute-config#config-modes).
|
|
@@ -507,6 +775,48 @@ module Google
|
|
|
507
775
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
508
776
|
end
|
|
509
777
|
end
|
|
778
|
+
|
|
779
|
+
# At which level we offer configuration for attributes.
|
|
780
|
+
module AttributeConfigLevel
|
|
781
|
+
# Value used when unset. In this case, server behavior defaults to
|
|
782
|
+
# {::Google::Cloud::Retail::V2::AttributeConfigLevel::CATALOG_LEVEL_ATTRIBUTE_CONFIG CATALOG_LEVEL_ATTRIBUTE_CONFIG}.
|
|
783
|
+
ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED = 0
|
|
784
|
+
|
|
785
|
+
# At this level, we honor the attribute configurations set in
|
|
786
|
+
# {::Google::Cloud::Retail::V2::Product#attributes Product.attributes}.
|
|
787
|
+
PRODUCT_LEVEL_ATTRIBUTE_CONFIG = 1
|
|
788
|
+
|
|
789
|
+
# At this level, we honor the attribute configurations set in
|
|
790
|
+
# [CatalogConfig.attribute_configs][].
|
|
791
|
+
CATALOG_LEVEL_ATTRIBUTE_CONFIG = 2
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
# The type of solution.
|
|
795
|
+
module SolutionType
|
|
796
|
+
# Default value.
|
|
797
|
+
SOLUTION_TYPE_UNSPECIFIED = 0
|
|
798
|
+
|
|
799
|
+
# Used for Recommendations AI.
|
|
800
|
+
SOLUTION_TYPE_RECOMMENDATION = 1
|
|
801
|
+
|
|
802
|
+
# Used for Retail Search.
|
|
803
|
+
SOLUTION_TYPE_SEARCH = 2
|
|
804
|
+
end
|
|
805
|
+
|
|
806
|
+
# The use case of Cloud Retail Search.
|
|
807
|
+
module SearchSolutionUseCase
|
|
808
|
+
# The value when it's unspecified. In this case, server behavior defaults to
|
|
809
|
+
# {::Google::Cloud::Retail::V2::SearchSolutionUseCase::SEARCH_SOLUTION_USE_CASE_SEARCH SEARCH_SOLUTION_USE_CASE_SEARCH}.
|
|
810
|
+
SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0
|
|
811
|
+
|
|
812
|
+
# Search use case. Expects the traffic has a non-empty
|
|
813
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#query query}.
|
|
814
|
+
SEARCH_SOLUTION_USE_CASE_SEARCH = 1
|
|
815
|
+
|
|
816
|
+
# Browse use case. Expects the traffic has an empty
|
|
817
|
+
# {::Google::Cloud::Retail::V2::SearchRequest#query query}.
|
|
818
|
+
SEARCH_SOLUTION_USE_CASE_BROWSE = 2
|
|
819
|
+
end
|
|
510
820
|
end
|
|
511
821
|
end
|
|
512
822
|
end
|
|
@@ -87,7 +87,8 @@ module Google
|
|
|
87
87
|
# @!attribute [rw] max_suggestions
|
|
88
88
|
# @return [::Integer]
|
|
89
89
|
# Completion max suggestions. If left unset or set to 0, then will fallback
|
|
90
|
-
# to the configured value
|
|
90
|
+
# to the configured value
|
|
91
|
+
# {::Google::Cloud::Retail::V2::CompletionConfig#max_suggestions CompletionConfig.max_suggestions}.
|
|
91
92
|
#
|
|
92
93
|
# The maximum allowed max suggestions is 20. If it is set higher, it will be
|
|
93
94
|
# capped by 20.
|
|
@@ -0,0 +1,76 @@
|
|
|
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 [serving
|
|
45
|
+
# configuration][google.cloud.retail.v2.ServingConfig] ids that are
|
|
46
|
+
# associated with this control in the same
|
|
47
|
+
# {::Google::Cloud::Retail::V2::Catalog Catalog}.
|
|
48
|
+
#
|
|
49
|
+
# Note the association is managed via the
|
|
50
|
+
# {::Google::Cloud::Retail::V2::ServingConfig ServingConfig}, this is an output
|
|
51
|
+
# only denormalized view.
|
|
52
|
+
# @!attribute [rw] solution_types
|
|
53
|
+
# @return [::Array<::Google::Cloud::Retail::V2::SolutionType>]
|
|
54
|
+
# Required. Immutable. The solution types that the control is used for.
|
|
55
|
+
# Currently we support setting only one type of solution at creation time.
|
|
56
|
+
#
|
|
57
|
+
# Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
|
|
58
|
+
# If no solution type is provided at creation time, will default to
|
|
59
|
+
# {::Google::Cloud::Retail::V2::SolutionType::SOLUTION_TYPE_SEARCH SOLUTION_TYPE_SEARCH}.
|
|
60
|
+
# @!attribute [rw] search_solution_use_case
|
|
61
|
+
# @return [::Array<::Google::Cloud::Retail::V2::SearchSolutionUseCase>]
|
|
62
|
+
# Specifies the use case for the control.
|
|
63
|
+
# Affects what condition fields can be set.
|
|
64
|
+
# Only settable by search controls.
|
|
65
|
+
# Will default to
|
|
66
|
+
# {::Google::Cloud::Retail::V2::SearchSolutionUseCase::SEARCH_SOLUTION_USE_CASE_SEARCH SEARCH_SOLUTION_USE_CASE_SEARCH}
|
|
67
|
+
# if not specified. Currently only allow one search_solution_use_case per
|
|
68
|
+
# control.
|
|
69
|
+
class Control
|
|
70
|
+
include ::Google::Protobuf::MessageExts
|
|
71
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|