google-cloud-retail-v2 0.4.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2/catalog_service/client.rb +47 -46
  3. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +4 -4
  4. data/lib/google/cloud/retail/v2/completion_service/client.rb +49 -50
  5. data/lib/google/cloud/retail/v2/completion_service/operations.rb +30 -21
  6. data/lib/google/cloud/retail/v2/completion_service.rb +2 -2
  7. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +6 -6
  8. data/lib/google/cloud/retail/v2/prediction_service/client.rb +34 -39
  9. data/lib/google/cloud/retail/v2/product_service/client.rb +69 -53
  10. data/lib/google/cloud/retail/v2/product_service/operations.rb +30 -21
  11. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +6 -6
  12. data/lib/google/cloud/retail/v2/search_service/client.rb +83 -77
  13. data/lib/google/cloud/retail/v2/search_service.rb +2 -2
  14. data/lib/google/cloud/retail/v2/search_service_pb.rb +2 -0
  15. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +4 -4
  16. data/lib/google/cloud/retail/v2/user_event_service/client.rb +56 -43
  17. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +30 -21
  18. data/lib/google/cloud/retail/v2/version.rb +1 -1
  19. data/proto_docs/google/cloud/retail/v2/completion_service.rb +9 -7
  20. data/proto_docs/google/cloud/retail/v2/import_config.rb +4 -4
  21. data/proto_docs/google/cloud/retail/v2/product.rb +11 -8
  22. data/proto_docs/google/cloud/retail/v2/search_service.rb +103 -218
  23. data/proto_docs/google/cloud/retail/v2/user_event.rb +15 -3
  24. metadata +4 -4
@@ -169,7 +169,9 @@ module Google
169
169
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
170
  metadata: metadata,
171
171
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
172
+
173
+ options.apply_defaults timeout: @config.timeout,
174
+ metadata: @config.metadata,
173
175
  retry_policy: @config.retry_policy
174
176
 
175
177
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -239,7 +241,9 @@ module Google
239
241
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
242
  metadata: metadata,
241
243
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
243
247
  retry_policy: @config.retry_policy
244
248
 
245
249
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -309,7 +313,9 @@ module Google
309
313
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
314
  metadata: metadata,
311
315
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
313
319
  retry_policy: @config.retry_policy
314
320
 
315
321
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -384,7 +390,9 @@ module Google
384
390
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
391
  metadata: metadata,
386
392
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
388
396
  retry_policy: @config.retry_policy
389
397
 
390
398
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -456,7 +464,9 @@ module Google
456
464
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
465
  metadata: metadata,
458
466
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
460
470
  retry_policy: @config.retry_policy
461
471
 
462
472
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +491,21 @@ module Google
481
491
  # Configuration can be applied globally to all clients, or to a single client
482
492
  # on construction.
483
493
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # list_operations to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Longrunning::Operations::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.list_operations.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.list_operations.timeout = 20.0
508
+ # end
500
509
  #
501
510
  # @!attribute [rw] endpoint
502
511
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- VERSION = "0.4.0"
24
+ VERSION = "0.5.1"
25
25
  end
26
26
  end
27
27
  end
@@ -80,13 +80,15 @@ module Google
80
80
  # * user-data
81
81
  #
82
82
  # * cloud-retail
83
- # This option is not automatically enabled. Before using cloud-retail,
84
- # contact retail-search-support@google.com first.
83
+ # This option requires additional allowlisting. Before using cloud-retail,
84
+ # contact Cloud Retail support team first.
85
85
  # @!attribute [rw] max_suggestions
86
86
  # @return [::Integer]
87
- # Completion max suggestions.
87
+ # Completion max suggestions. If left unset or set to 0, then will fallback
88
+ # to the configured value [CompletionConfig.max_suggestions][].
88
89
  #
89
- # The maximum allowed max suggestions is 20. The default value is 20.
90
+ # The maximum allowed max suggestions is 20. If it is set higher, it will be
91
+ # capped by 20.
90
92
  class CompleteQueryRequest
91
93
  include ::Google::Protobuf::MessageExts
92
94
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -105,9 +107,9 @@ module Google
105
107
  # performance.
106
108
  # @!attribute [rw] recent_search_results
107
109
  # @return [::Array<::Google::Cloud::Retail::V2::CompleteQueryResponse::RecentSearchResult>]
108
- # Matched recent searches of this user. This field is a restricted feature.
109
- # Contact Retail Support (retail-search-support@google.com) if you are
110
- # interested in enabling it.
110
+ # Matched recent searches of this user. The maximum number of recent searches
111
+ # is 10. This field is a restricted feature. Contact Retail Search support
112
+ # team if you are interested in enabling it.
111
113
  #
112
114
  # This feature is only available when
113
115
  # {::Google::Cloud::Retail::V2::CompleteQueryRequest#visitor_id CompleteQueryRequest.visitor_id}
@@ -201,13 +201,13 @@ module Google
201
201
  # Can only be while using
202
202
  # {::Google::Cloud::Retail::V2::BigQuerySource BigQuerySource}.
203
203
  #
204
- # Add the IAM permission BigQuery Data Viewer for
204
+ # Add the IAM permission "BigQuery Data Viewer" for
205
205
  # cloud-retail-customer-data-access@system.gserviceaccount.com before
206
206
  # using this feature otherwise an error is thrown.
207
207
  #
208
208
  # This feature is only available for users who have Retail Search enabled.
209
- # Contact Retail Support (retail-search-support@google.com) if you are
210
- # interested in using Retail Search.
209
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
210
+ # cloud sales if you are interested in using Retail Search.
211
211
  FULL = 2
212
212
  end
213
213
  end
@@ -284,7 +284,7 @@ module Google
284
284
  # @return [::Google::Cloud::Retail::V2::BigQuerySource]
285
285
  # Required. BigQuery input source.
286
286
  #
287
- # Add the IAM permission BigQuery Data Viewer for
287
+ # Add the IAM permission "BigQuery Data Viewer" for
288
288
  # cloud-retail-customer-data-access@system.gserviceaccount.com before
289
289
  # using this feature otherwise an error is thrown.
290
290
  class CompletionDataInputConfig
@@ -120,6 +120,9 @@ module Google
120
120
  # This field must be a UTF-8 encoded string with a length limit of 128
121
121
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
122
122
  #
123
+ # This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is
124
+ # returned.
125
+ #
123
126
  # Google Merchant Center property
124
127
  # [gtin](https://support.google.com/merchants/answer/6324461).
125
128
  # Schema.org property
@@ -230,13 +233,9 @@ module Google
230
233
  # This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT
231
234
  # error is returned:
232
235
  #
233
- # * Max entries count: 200 by default; 100 for
234
- # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}.
236
+ # * Max entries count: 200.
235
237
  # * The key must be a UTF-8 encoded string with a length limit of 128
236
238
  # characters.
237
- # * Max indexable entries count: 200 by default; 40 for
238
- # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Type.VARIANT}.
239
- # * Max searchable entries count: 30.
240
239
  # * For indexable attribute, the key must match the pattern:
241
240
  # [a-zA-Z0-9][a-zA-Z0-9_]*. For example, key0LikeThis or KEY_1_LIKE_THIS.
242
241
  # @!attribute [rw] tags
@@ -346,7 +345,7 @@ module Google
346
345
  # @return [::Array<::String>]
347
346
  # The material of the product. For example, "leather", "wooden".
348
347
  #
349
- # A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
348
+ # A maximum of 20 values are allowed. Each value must be a UTF-8 encoded
350
349
  # string with a length limit of 128 characters. Otherwise, an
351
350
  # INVALID_ARGUMENT error is returned.
352
351
  #
@@ -358,7 +357,7 @@ module Google
358
357
  # The pattern or graphic print of the product. For example, "striped", "polka
359
358
  # dot", "paisley".
360
359
  #
361
- # A maximum of 5 values are allowed per
360
+ # A maximum of 20 values are allowed per
362
361
  # {::Google::Cloud::Retail::V2::Product Product}. Each value must be a UTF-8
363
362
  # encoded string with a length limit of 128 characters. Otherwise, an
364
363
  # INVALID_ARGUMENT error is returned.
@@ -445,8 +444,12 @@ module Google
445
444
  # * {::Google::Cloud::Retail::V2::Product#name name}
446
445
  # * {::Google::Cloud::Retail::V2::Product#color_info color_info}
447
446
  #
448
- # Maximum number of paths is 20. Otherwise, an INVALID_ARGUMENT error is
447
+ # Maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is
449
448
  # returned.
449
+ #
450
+ # Note: Returning more fields in
451
+ # {::Google::Cloud::Retail::V2::SearchResponse SearchResponse} may increase
452
+ # response payload size and serving latency.
450
453
  # @!attribute [r] variants
451
454
  # @return [::Array<::Google::Cloud::Retail::V2::Product>]
452
455
  # Output only. Product variants grouped together on primary product which
@@ -87,8 +87,7 @@ module Google
87
87
  # @return [::String]
88
88
  # The filter syntax consists of an expression language for constructing a
89
89
  # predicate from one or more fields of the products being filtered. Filter
90
- # expression is case-sensitive. See more details at this [user
91
- # guide](/retail/private/docs/filter-and-order#filter).
90
+ # expression is case-sensitive.
92
91
  #
93
92
  # If this field is unrecognizable, an INVALID_ARGUMENT is returned.
94
93
  # @!attribute [rw] canonical_filter
@@ -106,9 +105,7 @@ module Google
106
105
  # @return [::String]
107
106
  # The order in which products are returned. Products can be ordered by
108
107
  # a field in an {::Google::Cloud::Retail::V2::Product Product} object. Leave it
109
- # unset if ordered by relevance. OrderBy expression is case-sensitive. See
110
- # more details at this [user
111
- # guide](/retail/private/docs/filter-and-order#order).
108
+ # unset if ordered by relevance. OrderBy expression is case-sensitive.
112
109
  #
113
110
  # If this field is unrecognizable, an INVALID_ARGUMENT is returned.
114
111
  # @!attribute [rw] facet_specs
@@ -122,18 +119,15 @@ module Google
122
119
  # The specification for dynamically generated facets. Notice that only
123
120
  # textual facets can be dynamically generated.
124
121
  #
125
- # This feature requires additional allowlisting. Contact Retail Support
126
- # (retail-search-support@google.com) if you are interested in using dynamic
127
- # facet feature.
122
+ # This feature requires additional allowlisting. Contact Retail Search
123
+ # support team if you are interested in using dynamic facet feature.
128
124
  # @!attribute [rw] boost_spec
129
125
  # @return [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec]
130
- # Boost specification to boost certain products. See more details at this
131
- # [user guide](/retail/private/docs/boosting).
126
+ # Boost specification to boost certain products.
132
127
  # @!attribute [rw] query_expansion_spec
133
128
  # @return [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec]
134
129
  # The query expansion specification that specifies the conditions under which
135
- # query expansion will occur. See more details at this [user
136
- # guide](/retail/private/docs/result-size#query_expansion).
130
+ # query expansion will occur.
137
131
  # @!attribute [rw] variant_rollup_keys
138
132
  # @return [::Array<::String>]
139
133
  # The keys to fetch and rollup the matching
@@ -145,10 +139,9 @@ module Google
145
139
  # {::Google::Cloud::Retail::V2::Product Product}s attributes will lead to extra
146
140
  # query latency. Maximum number of keys is 10.
147
141
  #
148
- # For
149
- # {::Google::Cloud::Retail::V2::Product#fulfillment_info Product.fulfillment_info},
150
- # a fulfillment type and a fulfillment ID must be provided in the format of
151
- # "fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123",
142
+ # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, a
143
+ # fulfillment type and a fulfillment ID must be provided in the format of
144
+ # "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
152
145
  # "pickupInStore" is fulfillment type and "store123" is the store ID.
153
146
  #
154
147
  # Supported keys are:
@@ -159,24 +152,42 @@ module Google
159
152
  # * discount
160
153
  # * attributes.key, where key is any key in the
161
154
  # {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
162
- # * pickupInStore.id, where id is any [FulfillmentInfo.ids][] for type
163
- # [FulfillmentInfo.Type.PICKUP_IN_STORE][].
164
- # * shipToStore.id, where id is any [FulfillmentInfo.ids][] for type
165
- # [FulfillmentInfo.Type.SHIP_TO_STORE][].
166
- # * sameDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
167
- # [FulfillmentInfo.Type.SAME_DAY_DELIVERY][].
168
- # * nextDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
169
- # [FulfillmentInfo.Type.NEXT_DAY_DELIVERY][].
170
- # * customFulfillment1.id, where id is any [FulfillmentInfo.ids][] for type
171
- # [FulfillmentInfo.Type.CUSTOM_TYPE_1][].
172
- # * customFulfillment2.id, where id is any [FulfillmentInfo.ids][] for type
173
- # [FulfillmentInfo.Type.CUSTOM_TYPE_2][].
174
- # * customFulfillment3.id, where id is any [FulfillmentInfo.ids][] for type
175
- # [FulfillmentInfo.Type.CUSTOM_TYPE_3][].
176
- # * customFulfillment4.id, where id is any [FulfillmentInfo.ids][] for type
177
- # [FulfillmentInfo.Type.CUSTOM_TYPE_4][].
178
- # * customFulfillment5.id, where id is any [FulfillmentInfo.ids][] for type
179
- # [FulfillmentInfo.Type.CUSTOM_TYPE_5][].
155
+ # * pickupInStore.id, where id is any
156
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
157
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
158
+ # "pickup-in-store".
159
+ # * shipToStore.id, where id is any
160
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
161
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
162
+ # "ship-to-store".
163
+ # * sameDayDelivery.id, where id is any
164
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
165
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
166
+ # "same-day-delivery".
167
+ # * nextDayDelivery.id, where id is any
168
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
169
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
170
+ # "next-day-delivery".
171
+ # * customFulfillment1.id, where id is any
172
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
173
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
174
+ # "custom-type-1".
175
+ # * customFulfillment2.id, where id is any
176
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
177
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
178
+ # "custom-type-2".
179
+ # * customFulfillment3.id, where id is any
180
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
181
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
182
+ # "custom-type-3".
183
+ # * customFulfillment4.id, where id is any
184
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
185
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
186
+ # "custom-type-4".
187
+ # * customFulfillment5.id, where id is any
188
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
189
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
190
+ # "custom-type-5".
180
191
  #
181
192
  # If this field is set to an invalid value other than these, an
182
193
  # INVALID_ARGUMENT error is returned.
@@ -274,172 +285,35 @@ module Google
274
285
  # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#query FacetKey.query}
275
286
  # is not specified:
276
287
  #
277
- # * textual_field =<br>
278
- # <font color='grey'>
279
- # *# The
280
- # {::Google::Cloud::Retail::V2::Product#brands Product.brands}.<br>*
281
- # </font>
282
- # "brands";
283
- # <br>
284
- # <font color='categories'>
285
- # *# The
286
- # {::Google::Cloud::Retail::V2::Product#categories Product.categories}.<br>*
287
- # </font>
288
- # "categories";
289
- # <br>
290
- # <font color='grey'>
291
- # *# The
292
- # {::Google::Cloud::Retail::V2::Audience#genders Audience.genders}.<br>*
293
- # </font>
294
- # | "genders";
295
- # <br>
296
- # <font color='grey'>
297
- # *# The
298
- # {::Google::Cloud::Retail::V2::Audience#age_groups Audience.age_groups}.<br>*
299
- # </font>
300
- # | "ageGroups";
301
- # <br>
302
- # <font color='grey'>
303
- # *# The
304
- # {::Google::Cloud::Retail::V2::Product#availability Product.availability}.
305
- # Value is one of<br>*
306
- # *# "IN_STOCK", "OUT_OF_STOCK", PREORDER", "BACKORDER".<br>*
307
- # </font>
308
- # | "availability";
309
- # <br>
310
- # <font color='grey'>
311
- # *# The
312
- # {::Google::Cloud::Retail::V2::ColorInfo#color_families ColorInfo.color_families}.<br>*
313
- # </font>
314
- # | "colorFamilies";
315
- # <br>
316
- # <font color='grey'>
317
- # *# The
318
- # {::Google::Cloud::Retail::V2::ColorInfo#colors ColorInfo.colors}.<br>*
319
- # </font>
320
- # | "colors";
321
- # <br>
322
- # <font color='grey'>
323
- # *# The {::Google::Cloud::Retail::V2::Product#sizes Product.sizes}.<br>*
324
- # </font>
325
- # | "sizes";
326
- # <br>
327
- # <font color='grey'>
328
- # *# The
329
- # {::Google::Cloud::Retail::V2::Product#materials Product.materials}.<br>*
330
- # </font>
331
- # | "materials";
332
- # <br>
333
- # <font color='grey'>
334
- # *# The
335
- # {::Google::Cloud::Retail::V2::Product#patterns Product.patterns}.<br>*
336
- # </font>
337
- # | "patterns";
338
- # <br>
339
- # <font color='grey'>
340
- # *# The
341
- # {::Google::Cloud::Retail::V2::Product#conditions Product.conditions}.<br>*
342
- # </font>
343
- # | "conditions";
344
- # <br>
345
- # <font color='grey'>
346
- # *# The textual custom attribute in
347
- # {::Google::Cloud::Retail::V2::Product Product} object. Key can<br>*
348
- # *# be any key in the
349
- # {::Google::Cloud::Retail::V2::Product#attributes Product.attributes}
350
- # map<br>*
351
- # *# if the attribute values are textual.<br>*
352
- # *# map.<br>*
353
- # </font>
354
- # | "attributes.key";
355
- # <br>
356
- # <font color='grey'>
357
- # *# The [FulfillmentInfo.ids][] for type
358
- # *# [FulfillmentInfo.Type.PICKUP_IN_STORE][].<br>*
359
- # </font>
360
- # | "pickupInStore";
361
- # <br>
362
- # <font color='grey'>
363
- # *# The [FulfillmentInfo.ids][] for type
364
- # *# [FulfillmentInfo.Type.SHIP_TO_STORE][].<br>*
365
- # </font>
366
- # | "shipToStore";
367
- # <br>
368
- # <font color='grey'>
369
- # *# The [FulfillmentInfo.ids][] for type
370
- # *# [FulfillmentInfo.Type.SAME_DAY_DELIVERY][].<br>*
371
- # </font>
372
- # | "sameDayDelivery";
373
- # <br>
374
- # <font color='grey'>
375
- # *# The [FulfillmentInfo.ids][] for type
376
- # *# [FulfillmentInfo.Type.NEXT_DAY_DELIVERY][].<br>*
377
- # </font>
378
- # | "nextDayDelivery";
379
- # <br>
380
- # <font color='grey'>
381
- # *# The [FulfillmentInfo.ids][] for type
382
- # *# [FulfillmentInfo.Type.CUSTOM_TYPE_1][].<br>*
383
- # </font>
384
- # | "customFulfillment1";
385
- # <br>
386
- # <font color='grey'>
387
- # *# The [FulfillmentInfo.ids][] for type
388
- # *# [FulfillmentInfo.Type.CUSTOM_TYPE_2][].<br>*
389
- # </font>
390
- # | "customFulfillment2";
391
- # <br>
392
- # <font color='grey'>
393
- # *# The [FulfillmentInfo.ids][] for type
394
- # *# [FulfillmentInfo.Type.CUSTOM_TYPE_3][].<br>*
395
- # </font>
396
- # | "customFulfillment3";
397
- # <br>
398
- # <font color='grey'>
399
- # *# The [FulfillmentInfo.ids][] for type
400
- # *# [FulfillmentInfo.Type.CUSTOM_TYPE_4][].<br>*
401
- # </font>
402
- # | "customFulfillment4";
403
- # <br>
404
- # <font color='grey'>
405
- # *# The [FulfillmentInfo.ids][] for type
406
- # *# [FulfillmentInfo.Type.CUSTOM_TYPE_5][].<br>*
407
- # </font>
408
- # | "customFulfillment5";
288
+ # * textual_field =
289
+ # * "brands"
290
+ # * "categories"
291
+ # * "genders"
292
+ # * "ageGroups"
293
+ # * "availability"
294
+ # * "colorFamilies"
295
+ # * "colors"
296
+ # * "sizes"
297
+ # * "materials"
298
+ # * "patterns"
299
+ # * "conditions"
300
+ # * "attributes.key"
301
+ # * "pickupInStore"
302
+ # * "shipToStore"
303
+ # * "sameDayDelivery"
304
+ # * "nextDayDelivery"
305
+ # * "customFulfillment1"
306
+ # * "customFulfillment2"
307
+ # * "customFulfillment3"
308
+ # * "customFulfillment4"
309
+ # * "customFulfillment5"
409
310
  #
410
- # * numerical_field =<br>
411
- # <font color='grey'>
412
- # *# The
413
- # {::Google::Cloud::Retail::V2::PriceInfo#price PriceInfo.price}.<br>*
414
- # </font>
415
- # "price";
416
- # <br>
417
- # <font color='grey'>
418
- # *# The discount. Computed by (original_price-price)/price <br>*
419
- # </font>
420
- # "discount";
421
- # <br>
422
- # <font color='grey'>
423
- # *# The
424
- # {::Google::Cloud::Retail::V2::Rating#average_rating Rating.average_rating}.<br>*
425
- # </font>
426
- # "rating";
427
- # <br>
428
- # <font color='grey'>
429
- # *# The
430
- # {::Google::Cloud::Retail::V2::Rating#rating_count Rating.rating_count}.<br>*
431
- # </font>
432
- # "ratingCount";
433
- # <br>
434
- # <font color='grey'>
435
- # *# The numerical custom attribute in
436
- # {::Google::Cloud::Retail::V2::Product Product} object. Key can<br>*
437
- # *# be any key in the
438
- # {::Google::Cloud::Retail::V2::Product#attributes Product.attributes}
439
- # map<br>*
440
- # *# if the attribute values are numerical.<br>*
441
- # </font>
442
- # | "attributes.key";
311
+ # * numerical_field =
312
+ # * "price"
313
+ # * "discount"
314
+ # * "rating"
315
+ # * "ratingCount"
316
+ # * "attributes.key"
443
317
  # @!attribute [rw] intervals
444
318
  # @return [::Array<::Google::Cloud::Retail::V2::Interval>]
445
319
  # Set only if values should be bucketized into intervals. Must be set
@@ -503,7 +377,8 @@ module Google
503
377
  # order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical
504
378
  # intervals are sorted in the order given by
505
379
  # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#intervals FacetSpec.FacetKey.intervals};
506
- # [FulfillmentInfo.ids][] are sorted in the order given by
380
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
381
+ # are sorted in the order given by
507
382
  # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#restricted_values FacetSpec.FacetKey.restricted_values}.
508
383
  # @!attribute [rw] query
509
384
  # @return [::String]
@@ -580,10 +455,9 @@ module Google
580
455
  #
581
456
  # * To boost products with product ID "product_1" or "product_2", and
582
457
  # color
583
- # "Red" or "Blue":<br>
584
- # *(id: ANY("product_1", "product_2"))<br>*
585
- # *AND<br>*
586
- # *(colorFamilies: ANY("Red", "Blue"))<br>*
458
+ # "Red" or "Blue":
459
+ # * (id: ANY("product_1", "product_2")) AND (colorFamilies:
460
+ # ANY("Red","Blue"))
587
461
  # @!attribute [rw] boost
588
462
  # @return [::Float]
589
463
  # Strength of the condition boost, which should be in [-1, 1]. Negative
@@ -615,6 +489,11 @@ module Google
615
489
  # @return [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec::Condition]
616
490
  # The condition under which query expansion should occur. Default to
617
491
  # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec::Condition::DISABLED Condition.DISABLED}.
492
+ # @!attribute [rw] pin_unexpanded_results
493
+ # @return [::Boolean]
494
+ # Whether to pin unexpanded results. If this field is set to true,
495
+ # unexpanded products are always at the top of the search results, followed
496
+ # by the expanded results.
618
497
  class QueryExpansionSpec
619
498
  include ::Google::Protobuf::MessageExts
620
499
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -735,21 +614,22 @@ module Google
735
614
  # string or double values with type
736
615
  # {::Google::Protobuf::ListValue google.protobuf.ListValue}. For example, if
737
616
  # there are two variants with colors "red" and "blue", the rollup values
738
- # are { key: "colorFamilies"
739
- # value {
740
- # list_value {
741
- # values { string_value: "red" }
742
- # values { string_value: "blue" }
743
- # }
744
- # }
745
- # }
617
+ # are
618
+ #
619
+ # { key: "colorFamilies"
620
+ # value {
621
+ # list_value {
622
+ # values { string_value: "red" }
623
+ # values { string_value: "blue" }
624
+ # }
625
+ # }
626
+ # }
746
627
  #
747
- # For
748
- # {::Google::Cloud::Retail::V2::Product#fulfillment_info Product.fulfillment_info},
749
- # the rollup values is a double value with type
750
- # {::Google::Protobuf::Value google.protobuf.Value}. For example, {key:
751
- # "pickupInStore.store1" value { number_value: 10 }} means a there are 10
752
- # variants in this product are available in the store "store1".
628
+ # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, the rollup
629
+ # values is a double value with type
630
+ # {::Google::Protobuf::Value google.protobuf.Value}. For example,
631
+ # `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
632
+ # are 10 variants in this product are available in the store "store1".
753
633
  class SearchResult
754
634
  include ::Google::Protobuf::MessageExts
755
635
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -809,6 +689,11 @@ module Google
809
689
  # @!attribute [rw] expanded_query
810
690
  # @return [::Boolean]
811
691
  # Bool describing whether query expansion has occurred.
692
+ # @!attribute [rw] pinned_result_count
693
+ # @return [::Integer]
694
+ # Number of pinned results. This field will only be set when expansion
695
+ # happens and [SearchRequest.query_expansion_spec.pin_unexpanded_results][]
696
+ # is set to true.
812
697
  class QueryExpansionInfo
813
698
  include ::Google::Protobuf::MessageExts
814
699
  extend ::Google::Protobuf::MessageExts::ClassMethods