google-cloud-retail-v2 2.2.0 → 2.4.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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2/catalog_service/client.rb +35 -35
  3. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +35 -35
  4. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +30 -30
  5. data/lib/google/cloud/retail/v2/common_pb.rb +3 -1
  6. data/lib/google/cloud/retail/v2/conversational_search_service/client.rb +557 -0
  7. data/lib/google/cloud/retail/v2/conversational_search_service/credentials.rb +51 -0
  8. data/lib/google/cloud/retail/v2/conversational_search_service/paths.rb +54 -0
  9. data/lib/google/cloud/retail/v2/conversational_search_service/rest/client.rb +526 -0
  10. data/lib/google/cloud/retail/v2/conversational_search_service/rest/service_stub.rb +145 -0
  11. data/lib/google/cloud/retail/v2/conversational_search_service/rest.rb +56 -0
  12. data/lib/google/cloud/retail/v2/conversational_search_service.rb +59 -0
  13. data/lib/google/cloud/retail/v2/conversational_search_service_pb.rb +65 -0
  14. data/lib/google/cloud/retail/v2/conversational_search_service_services_pb.rb +52 -0
  15. data/lib/google/cloud/retail/v2/rest.rb +2 -1
  16. data/lib/google/cloud/retail/v2/safety_pb.rb +47 -0
  17. data/lib/google/cloud/retail/v2/search_service/client.rb +22 -1
  18. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +22 -1
  19. data/lib/google/cloud/retail/v2/search_service_pb.rb +1 -1
  20. data/lib/google/cloud/retail/v2/version.rb +1 -1
  21. data/lib/google/cloud/retail/v2.rb +2 -1
  22. data/proto_docs/google/cloud/retail/v2/common.rb +18 -0
  23. data/proto_docs/google/cloud/retail/v2/conversational_search_service.rb +358 -0
  24. data/proto_docs/google/cloud/retail/v2/safety.rb +96 -0
  25. data/proto_docs/google/cloud/retail/v2/search_service.rb +45 -1
  26. data/proto_docs/google/cloud/retail/v2/user_event.rb +1 -1
  27. metadata +16 -4
@@ -0,0 +1,358 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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
+ # Request message for
25
+ # {::Google::Cloud::Retail::V2::ConversationalSearchService::Client#conversational_search ConversationalSearchService.ConversationalSearch}
26
+ # method.
27
+ # @!attribute [rw] placement
28
+ # @return [::String]
29
+ # Required. The resource name of the search engine placement, such as
30
+ # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
31
+ # or
32
+ # `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
33
+ # This field is used to identify the serving config name and the set
34
+ # of models that will be used to make the search.
35
+ # @!attribute [rw] branch
36
+ # @return [::String]
37
+ # Required. The branch resource name, such as
38
+ # `projects/*/locations/global/catalogs/default_catalog/branches/0`.
39
+ #
40
+ # Use "default_branch" as the branch ID or leave this field empty, to search
41
+ # products under the default branch.
42
+ # @!attribute [rw] query
43
+ # @return [::String]
44
+ # Optional. Raw search query to be searched for.
45
+ #
46
+ # If this field is empty, the request is considered a category browsing
47
+ # request.
48
+ # @!attribute [rw] page_categories
49
+ # @return [::Array<::String>]
50
+ # Optional. The categories associated with a category page. Must be set for
51
+ # category navigation queries to achieve good search quality. The format
52
+ # should be the same as
53
+ # {::Google::Cloud::Retail::V2::UserEvent#page_categories UserEvent.page_categories};
54
+ #
55
+ # To represent full path of category, use '>' sign to separate different
56
+ # hierarchies. If '>' is part of the category name, replace it with
57
+ # other character(s).
58
+ #
59
+ # Category pages include special pages such as sales or promotions. For
60
+ # instance, a special sale page may have the category hierarchy:
61
+ # "pageCategories" : ["Sales > 2017 Black Friday Deals"].
62
+ # @!attribute [rw] conversation_id
63
+ # @return [::String]
64
+ # Optional. This field specifies the conversation id, which maintains the
65
+ # state of the conversation between client side and server side. Use the
66
+ # value from the previous
67
+ # {::Google::Cloud::Retail::V2::ConversationalSearchResponse#conversation_id ConversationalSearchResponse.conversation_id}.
68
+ # For the initial request, this should be empty.
69
+ # @!attribute [rw] search_params
70
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchRequest::SearchParams]
71
+ # Optional. Search parameters.
72
+ # @!attribute [rw] visitor_id
73
+ # @return [::String]
74
+ # Required. A unique identifier for tracking visitors. For example, this
75
+ # could be implemented with an HTTP cookie, which should be able to uniquely
76
+ # identify a visitor on a single device. This unique identifier should not
77
+ # change if the visitor logs in or out of the website.
78
+ #
79
+ # This should be the same identifier as
80
+ # {::Google::Cloud::Retail::V2::UserEvent#visitor_id UserEvent.visitor_id}.
81
+ #
82
+ # The field must be a UTF-8 encoded string with a length limit of 128
83
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
84
+ # @!attribute [rw] user_info
85
+ # @return [::Google::Cloud::Retail::V2::UserInfo]
86
+ # Optional. User information.
87
+ # @!attribute [rw] conversational_filtering_spec
88
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchRequest::ConversationalFilteringSpec]
89
+ # Optional. This field specifies all conversational filtering related
90
+ # parameters.
91
+ # @!attribute [rw] user_labels
92
+ # @return [::Google::Protobuf::Map{::String => ::String}]
93
+ # Optional. The user labels applied to a resource must meet the following
94
+ # requirements:
95
+ #
96
+ # * Each resource can have multiple labels, up to a maximum of 64.
97
+ # * Each label must be a key-value pair.
98
+ # * Keys have a minimum length of 1 character and a maximum length of 63
99
+ # characters and cannot be empty. Values can be empty and have a maximum
100
+ # length of 63 characters.
101
+ # * Keys and values can contain only lowercase letters, numeric characters,
102
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
103
+ # international characters are allowed.
104
+ # * The key portion of a label must be unique. However, you can use the same
105
+ # key with multiple resources.
106
+ # * Keys must start with a lowercase letter or international character.
107
+ #
108
+ # See [Google Cloud
109
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
110
+ # for more details.
111
+ # @!attribute [rw] safety_settings
112
+ # @return [::Array<::Google::Cloud::Retail::V2::SafetySetting>]
113
+ # Optional. The safety settings to be applied to the generated content.
114
+ class ConversationalSearchRequest
115
+ include ::Google::Protobuf::MessageExts
116
+ extend ::Google::Protobuf::MessageExts::ClassMethods
117
+
118
+ # Search parameters.
119
+ # @!attribute [rw] filter
120
+ # @return [::String]
121
+ # Optional. The filter string to restrict search results.
122
+ #
123
+ # The syntax of the filter string is the same as
124
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}.
125
+ # @!attribute [rw] canonical_filter
126
+ # @return [::String]
127
+ # Optional. The canonical filter string to restrict search results.
128
+ #
129
+ # The syntax of the canonical filter string is the same as
130
+ # {::Google::Cloud::Retail::V2::SearchRequest#canonical_filter SearchRequest.canonical_filter}.
131
+ # @!attribute [rw] sort_by
132
+ # @return [::String]
133
+ # Optional. The sort string to specify the sorting of search results.
134
+ #
135
+ # The syntax of the sort string is the same as
136
+ # [SearchRequest.sort][].
137
+ # @!attribute [rw] boost_spec
138
+ # @return [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec]
139
+ # Optional. The boost spec to specify the boosting of search results.
140
+ #
141
+ # The syntax of the boost spec is the same as
142
+ # {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}.
143
+ class SearchParams
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+ end
147
+
148
+ # This field specifies the current user answer during the conversational
149
+ # filtering search. This can be either user selected from suggested answers
150
+ # or user input plain text.
151
+ # @!attribute [rw] text_answer
152
+ # @return [::String]
153
+ # This field specifies the incremental input text from the user during
154
+ # the conversational search.
155
+ #
156
+ # Note: The following fields are mutually exclusive: `text_answer`, `selected_answer`. If a field in that set is populated, all other fields in the set will automatically be cleared.
157
+ # @!attribute [rw] selected_answer
158
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchRequest::UserAnswer::SelectedAnswer]
159
+ # Optional. This field specifies the selected answer during the
160
+ # conversational search. This should be a subset of
161
+ # [ConversationalSearchResponse.followup_question.suggested_answers][].
162
+ #
163
+ # Note: The following fields are mutually exclusive: `selected_answer`, `text_answer`. If a field in that set is populated, all other fields in the set will automatically be cleared.
164
+ class UserAnswer
165
+ include ::Google::Protobuf::MessageExts
166
+ extend ::Google::Protobuf::MessageExts::ClassMethods
167
+
168
+ # This field specifies the selected answers during the conversational
169
+ # search.
170
+ # @!attribute [rw] product_attribute_value
171
+ # @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
172
+ # Optional. This field specifies the selected answer which is a attribute
173
+ # key-value.
174
+ class SelectedAnswer
175
+ include ::Google::Protobuf::MessageExts
176
+ extend ::Google::Protobuf::MessageExts::ClassMethods
177
+ end
178
+ end
179
+
180
+ # This field specifies all conversational filtering related parameters
181
+ # addition to conversational retail search.
182
+ # @!attribute [rw] enable_conversational_filtering
183
+ # @deprecated This field is deprecated and may be removed in the next major version update.
184
+ # @return [::Boolean]
185
+ # Optional. This field is deprecated. Please use
186
+ # {::Google::Cloud::Retail::V2::ConversationalSearchRequest::ConversationalFilteringSpec#conversational_filtering_mode ConversationalFilteringSpec.conversational_filtering_mode}
187
+ # instead.
188
+ # @!attribute [rw] user_answer
189
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchRequest::UserAnswer]
190
+ # Optional. This field specifies the current user answer during the
191
+ # conversational filtering search. It can be either user selected from
192
+ # suggested answers or user input plain text.
193
+ # @!attribute [rw] conversational_filtering_mode
194
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchRequest::ConversationalFilteringSpec::Mode]
195
+ # Optional. Mode to control Conversational Filtering.
196
+ # Defaults to
197
+ # {::Google::Cloud::Retail::V2::ConversationalSearchRequest::ConversationalFilteringSpec::Mode::DISABLED Mode.DISABLED}
198
+ # if it's unset.
199
+ class ConversationalFilteringSpec
200
+ include ::Google::Protobuf::MessageExts
201
+ extend ::Google::Protobuf::MessageExts::ClassMethods
202
+
203
+ # Enum to control Conversational Filtering mode.
204
+ # A single conversation session including multiple turns supports modes for
205
+ # Conversational Search OR Conversational Filtering without
206
+ # Conversational Search, but not both.
207
+ module Mode
208
+ # Default value.
209
+ MODE_UNSPECIFIED = 0
210
+
211
+ # Disables Conversational Filtering when using Conversational Search.
212
+ DISABLED = 1
213
+
214
+ # Enables Conversational Filtering when using Conversational Search.
215
+ ENABLED = 2
216
+
217
+ # Enables Conversational Filtering without Conversational Search.
218
+ CONVERSATIONAL_FILTER_ONLY = 3
219
+ end
220
+ end
221
+
222
+ # @!attribute [rw] key
223
+ # @return [::String]
224
+ # @!attribute [rw] value
225
+ # @return [::String]
226
+ class UserLabelsEntry
227
+ include ::Google::Protobuf::MessageExts
228
+ extend ::Google::Protobuf::MessageExts::ClassMethods
229
+ end
230
+ end
231
+
232
+ # Response message for
233
+ # {::Google::Cloud::Retail::V2::ConversationalSearchService::Client#conversational_search ConversationalSearchService.ConversationalSearch}
234
+ # method.
235
+ # @!attribute [rw] user_query_types
236
+ # @return [::Array<::String>]
237
+ # The types Retail classifies the search query as.
238
+ #
239
+ # Supported values are:
240
+ #
241
+ # - "ORDER_SUPPORT"
242
+ # - "SIMPLE_PRODUCT_SEARCH"
243
+ # - "INTENT_REFINEMENT"
244
+ # - "PRODUCT_DETAILS"
245
+ # - "PRODUCT_COMPARISON"
246
+ # - "DEALS_AND_COUPONS"
247
+ # - "STORE_RELEVANT"
248
+ # - "BLOCKLISTED"
249
+ # - "BEST_PRODUCT"
250
+ # - "RETAIL_SUPPORT"
251
+ # - "DISABLED"
252
+ # @!attribute [rw] conversational_text_response
253
+ # @return [::String]
254
+ # The conversational answer-based text response generated by the Server.
255
+ # @!attribute [rw] followup_question
256
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchResponse::FollowupQuestion]
257
+ # The conversational followup question generated for Intent refinement.
258
+ # @!attribute [rw] conversation_id
259
+ # @return [::String]
260
+ # Conversation UUID. This field will be stored in client side storage to
261
+ # maintain the conversation session with server and will be used for next
262
+ # search request's
263
+ # {::Google::Cloud::Retail::V2::ConversationalSearchRequest#conversation_id ConversationalSearchRequest.conversation_id}
264
+ # to restore conversation state in server.
265
+ # @!attribute [rw] refined_search
266
+ # @return [::Array<::Google::Cloud::Retail::V2::ConversationalSearchResponse::RefinedSearch>]
267
+ # The proposed refined search queries. They can be used to fetch the relevant
268
+ # search results. When using CONVERSATIONAL_FILTER_ONLY mode, the
269
+ # refined_query from search response will be populated here.
270
+ # @!attribute [rw] conversational_filtering_result
271
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchResponse::ConversationalFilteringResult]
272
+ # This field specifies all related information that is needed on client
273
+ # side for UI rendering of conversational filtering search.
274
+ # @!attribute [r] state
275
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchResponse::State]
276
+ # Output only. The state of the response generation.
277
+ class ConversationalSearchResponse
278
+ include ::Google::Protobuf::MessageExts
279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
280
+
281
+ # The conversational followup question generated for Intent refinement.
282
+ # @!attribute [rw] followup_question
283
+ # @return [::String]
284
+ # The conversational followup question generated for Intent refinement.
285
+ # @!attribute [rw] suggested_answers
286
+ # @return [::Array<::Google::Cloud::Retail::V2::ConversationalSearchResponse::FollowupQuestion::SuggestedAnswer>]
287
+ # The answer options provided to client for the follow-up question.
288
+ class FollowupQuestion
289
+ include ::Google::Protobuf::MessageExts
290
+ extend ::Google::Protobuf::MessageExts::ClassMethods
291
+
292
+ # Suggested answers to the follow-up question.
293
+ # If it's numerical attribute, only ProductAttributeInterval will be set.
294
+ # If it's textual attribute, only productAttributeValue will be set.
295
+ # @!attribute [rw] product_attribute_value
296
+ # @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
297
+ # Product attribute value, including an attribute key and an
298
+ # attribute value. Other types can be added here in the future.
299
+ class SuggestedAnswer
300
+ include ::Google::Protobuf::MessageExts
301
+ extend ::Google::Protobuf::MessageExts::ClassMethods
302
+ end
303
+ end
304
+
305
+ # The proposed refined search for intent-refinement/bundled shopping
306
+ # conversation. When using CONVERSATIONAL_FILTER_ONLY mode, the
307
+ # refined_query from search response will be populated here.
308
+ # @!attribute [rw] query
309
+ # @return [::String]
310
+ # The query to be used for search.
311
+ class RefinedSearch
312
+ include ::Google::Protobuf::MessageExts
313
+ extend ::Google::Protobuf::MessageExts::ClassMethods
314
+ end
315
+
316
+ # This field specifies all related information that is needed on client
317
+ # side for UI rendering of conversational filtering search.
318
+ # @!attribute [rw] followup_question
319
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchResponse::FollowupQuestion]
320
+ # The conversational filtering question.
321
+ # @!attribute [rw] additional_filter
322
+ # @return [::Google::Cloud::Retail::V2::ConversationalSearchResponse::ConversationalFilteringResult::AdditionalFilter]
323
+ # This is the incremental additional filters implied from the current
324
+ # user answer. User should add the suggested addition filters to the
325
+ # previous [ConversationalSearchRequest.search_params.filter][] and
326
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter}, and
327
+ # use the merged filter in the follow up requests.
328
+ class ConversationalFilteringResult
329
+ include ::Google::Protobuf::MessageExts
330
+ extend ::Google::Protobuf::MessageExts::ClassMethods
331
+
332
+ # Additional filter that client side need to apply.
333
+ # @!attribute [rw] product_attribute_value
334
+ # @return [::Google::Cloud::Retail::V2::ProductAttributeValue]
335
+ # Product attribute value, including an attribute key and an
336
+ # attribute value. Other types can be added here in the future.
337
+ class AdditionalFilter
338
+ include ::Google::Protobuf::MessageExts
339
+ extend ::Google::Protobuf::MessageExts::ClassMethods
340
+ end
341
+ end
342
+
343
+ # The state of the response generation.
344
+ module State
345
+ # Unknown.
346
+ STATE_UNSPECIFIED = 0
347
+
348
+ # Response generation is being streamed.
349
+ STREAMING = 1
350
+
351
+ # Response generation has succeeded.
352
+ SUCCEEDED = 2
353
+ end
354
+ end
355
+ end
356
+ end
357
+ end
358
+ end
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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
+ # Safety settings.
25
+ # @!attribute [rw] category
26
+ # @return [::Google::Cloud::Retail::V2::HarmCategory]
27
+ # Harm category.
28
+ # @!attribute [rw] threshold
29
+ # @return [::Google::Cloud::Retail::V2::SafetySetting::HarmBlockThreshold]
30
+ # The harm block threshold.
31
+ # @!attribute [rw] method
32
+ # @return [::Google::Cloud::Retail::V2::SafetySetting::HarmBlockMethod]
33
+ # Optional. Specify if the threshold is used for probability or severity
34
+ # score. If not specified, the threshold is used for probability score.
35
+ class SafetySetting
36
+ include ::Google::Protobuf::MessageExts
37
+ extend ::Google::Protobuf::MessageExts::ClassMethods
38
+
39
+ # Probability based thresholds levels for blocking.
40
+ module HarmBlockThreshold
41
+ # Unspecified harm block threshold.
42
+ HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0
43
+
44
+ # Block low threshold and above (i.e. block more).
45
+ BLOCK_LOW_AND_ABOVE = 1
46
+
47
+ # Block medium threshold and above.
48
+ BLOCK_MEDIUM_AND_ABOVE = 2
49
+
50
+ # Block only high threshold (i.e. block less).
51
+ BLOCK_ONLY_HIGH = 3
52
+
53
+ # Block none.
54
+ BLOCK_NONE = 4
55
+
56
+ # Turn off the safety filter.
57
+ OFF = 5
58
+ end
59
+
60
+ # Probability vs severity.
61
+ module HarmBlockMethod
62
+ # The harm block method is unspecified.
63
+ HARM_BLOCK_METHOD_UNSPECIFIED = 0
64
+
65
+ # The harm block method uses both probability and severity scores.
66
+ SEVERITY = 1
67
+
68
+ # The harm block method uses the probability score.
69
+ PROBABILITY = 2
70
+ end
71
+ end
72
+
73
+ # Harm categories that will block the content.
74
+ module HarmCategory
75
+ # The harm category is unspecified.
76
+ HARM_CATEGORY_UNSPECIFIED = 0
77
+
78
+ # The harm category is hate speech.
79
+ HARM_CATEGORY_HATE_SPEECH = 1
80
+
81
+ # The harm category is dangerous content.
82
+ HARM_CATEGORY_DANGEROUS_CONTENT = 2
83
+
84
+ # The harm category is harassment.
85
+ HARM_CATEGORY_HARASSMENT = 3
86
+
87
+ # The harm category is sexually explicit content.
88
+ HARM_CATEGORY_SEXUALLY_EXPLICIT = 4
89
+
90
+ # The harm category is civic integrity.
91
+ HARM_CATEGORY_CIVIC_INTEGRITY = 5
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
@@ -359,6 +359,28 @@ module Google
359
359
  # product's
360
360
  # {::Google::Cloud::Retail::V2::LocalInventory#place_id LocalInventory.place_id}
361
361
  # for revenue optimization.
362
+ # @!attribute [rw] user_attributes
363
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::StringList}]
364
+ # Optional. The user attributes that could be used for personalization of
365
+ # search results.
366
+ # * Populate at most 100 key-value pairs per query.
367
+ # * Only supports string keys and repeated string values.
368
+ # * Duplcate keys are not allowed within a single query.
369
+ #
370
+ # Example:
371
+ # user_attributes: [
372
+ # { key: "pets"
373
+ # value {
374
+ # values: "dog"
375
+ # values: "cat"
376
+ # }
377
+ # },
378
+ # { key: "state"
379
+ # value {
380
+ # values: "CA"
381
+ # }
382
+ # }
383
+ # ]
362
384
  class SearchRequest
363
385
  include ::Google::Protobuf::MessageExts
364
386
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -689,7 +711,8 @@ module Google
689
711
  # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec::Condition::DISABLED Condition.DISABLED}.
690
712
  # @!attribute [rw] pin_unexpanded_results
691
713
  # @return [::Boolean]
692
- # Whether to pin unexpanded results. If this field is set to true,
714
+ # Whether to pin unexpanded results. The default value is false. If this
715
+ # field is set to true,
693
716
  # unexpanded products are always at the top of the search results, followed
694
717
  # by the expanded results.
695
718
  class QueryExpansionSpec
@@ -856,6 +879,15 @@ module Google
856
879
  extend ::Google::Protobuf::MessageExts::ClassMethods
857
880
  end
858
881
 
882
+ # @!attribute [rw] key
883
+ # @return [::String]
884
+ # @!attribute [rw] value
885
+ # @return [::Google::Cloud::Retail::V2::StringList]
886
+ class UserAttributesEntry
887
+ include ::Google::Protobuf::MessageExts
888
+ extend ::Google::Protobuf::MessageExts::ClassMethods
889
+ end
890
+
859
891
  # The search mode of each search request.
860
892
  module SearchMode
861
893
  # Default value. In this case both product search and faceted search will
@@ -1056,6 +1088,9 @@ module Google
1056
1088
  # Possible values:
1057
1089
  #
1058
1090
  # * `purchased`: Indicates that this product has been purchased before.
1091
+ # @!attribute [rw] model_scores
1092
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::DoubleList}]
1093
+ # Google provided available scores.
1059
1094
  class SearchResult
1060
1095
  include ::Google::Protobuf::MessageExts
1061
1096
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1077,6 +1112,15 @@ module Google
1077
1112
  include ::Google::Protobuf::MessageExts
1078
1113
  extend ::Google::Protobuf::MessageExts::ClassMethods
1079
1114
  end
1115
+
1116
+ # @!attribute [rw] key
1117
+ # @return [::String]
1118
+ # @!attribute [rw] value
1119
+ # @return [::Google::Cloud::Retail::V2::DoubleList]
1120
+ class ModelScoresEntry
1121
+ include ::Google::Protobuf::MessageExts
1122
+ extend ::Google::Protobuf::MessageExts::ClassMethods
1123
+ end
1080
1124
  end
1081
1125
 
1082
1126
  # A facet result.
@@ -61,7 +61,7 @@ module Google
61
61
  # 128 bytes. A session is an aggregation of an end user behavior in a time
62
62
  # span.
63
63
  #
64
- # A general guideline to populate the sesion_id:
64
+ # A general guideline to populate the session_id:
65
65
  # 1. If user has no activity for 30 min, a new session_id should be assigned.
66
66
  # 2. The session_id should be unique across users, suggest use uuid or add
67
67
  # visitor_id as prefix.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-retail-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '1.0'
18
+ version: '1.1'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: '1.0'
25
+ version: '1.1'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: google-cloud-errors
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -109,6 +109,15 @@ files:
109
109
  - lib/google/cloud/retail/v2/control_service/rest/service_stub.rb
110
110
  - lib/google/cloud/retail/v2/control_service_pb.rb
111
111
  - lib/google/cloud/retail/v2/control_service_services_pb.rb
112
+ - lib/google/cloud/retail/v2/conversational_search_service.rb
113
+ - lib/google/cloud/retail/v2/conversational_search_service/client.rb
114
+ - lib/google/cloud/retail/v2/conversational_search_service/credentials.rb
115
+ - lib/google/cloud/retail/v2/conversational_search_service/paths.rb
116
+ - lib/google/cloud/retail/v2/conversational_search_service/rest.rb
117
+ - lib/google/cloud/retail/v2/conversational_search_service/rest/client.rb
118
+ - lib/google/cloud/retail/v2/conversational_search_service/rest/service_stub.rb
119
+ - lib/google/cloud/retail/v2/conversational_search_service_pb.rb
120
+ - lib/google/cloud/retail/v2/conversational_search_service_services_pb.rb
112
121
  - lib/google/cloud/retail/v2/export_config_pb.rb
113
122
  - lib/google/cloud/retail/v2/generative_question_pb.rb
114
123
  - lib/google/cloud/retail/v2/generative_question_service.rb
@@ -157,6 +166,7 @@ files:
157
166
  - lib/google/cloud/retail/v2/promotion_pb.rb
158
167
  - lib/google/cloud/retail/v2/purge_config_pb.rb
159
168
  - lib/google/cloud/retail/v2/rest.rb
169
+ - lib/google/cloud/retail/v2/safety_pb.rb
160
170
  - lib/google/cloud/retail/v2/search_service.rb
161
171
  - lib/google/cloud/retail/v2/search_service/client.rb
162
172
  - lib/google/cloud/retail/v2/search_service/credentials.rb
@@ -201,6 +211,7 @@ files:
201
211
  - proto_docs/google/cloud/retail/v2/completion_service.rb
202
212
  - proto_docs/google/cloud/retail/v2/control.rb
203
213
  - proto_docs/google/cloud/retail/v2/control_service.rb
214
+ - proto_docs/google/cloud/retail/v2/conversational_search_service.rb
204
215
  - proto_docs/google/cloud/retail/v2/export_config.rb
205
216
  - proto_docs/google/cloud/retail/v2/generative_question.rb
206
217
  - proto_docs/google/cloud/retail/v2/generative_question_service.rb
@@ -212,6 +223,7 @@ files:
212
223
  - proto_docs/google/cloud/retail/v2/product_service.rb
213
224
  - proto_docs/google/cloud/retail/v2/promotion.rb
214
225
  - proto_docs/google/cloud/retail/v2/purge_config.rb
226
+ - proto_docs/google/cloud/retail/v2/safety.rb
215
227
  - proto_docs/google/cloud/retail/v2/search_service.rb
216
228
  - proto_docs/google/cloud/retail/v2/serving_config.rb
217
229
  - proto_docs/google/cloud/retail/v2/serving_config_service.rb
@@ -245,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
257
  - !ruby/object:Gem::Version
246
258
  version: '0'
247
259
  requirements: []
248
- rubygems_version: 3.6.8
260
+ rubygems_version: 3.6.9
249
261
  specification_version: 4
250
262
  summary: Vertex AI Search for commerce API is made up of Retail Search, Browse and
251
263
  Recommendations. These discovery AI solutions help you implement personalized search,