google-cloud-retail-v2 0.7.0 → 0.10.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -5
  3. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -1
  4. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +2 -1
  5. data/lib/google/cloud/retail/v2/common_pb.rb +2 -1
  6. data/lib/google/cloud/retail/v2/completion_service/client.rb +6 -3
  7. data/lib/google/cloud/retail/v2/completion_service/operations.rb +3 -0
  8. data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -1
  9. data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -1
  10. data/lib/google/cloud/retail/v2/prediction_service/client.rb +39 -14
  11. data/lib/google/cloud/retail/v2/prediction_service_pb.rb +3 -1
  12. data/lib/google/cloud/retail/v2/product_pb.rb +2 -1
  13. data/lib/google/cloud/retail/v2/product_service/client.rb +63 -35
  14. data/lib/google/cloud/retail/v2/product_service/operations.rb +3 -0
  15. data/lib/google/cloud/retail/v2/product_service_pb.rb +2 -1
  16. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +34 -25
  17. data/lib/google/cloud/retail/v2/purge_config_pb.rb +2 -1
  18. data/lib/google/cloud/retail/v2/search_service/client.rb +37 -8
  19. data/lib/google/cloud/retail/v2/search_service_pb.rb +18 -1
  20. data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -1
  21. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +3 -0
  22. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +2 -1
  23. data/lib/google/cloud/retail/v2/version.rb +1 -1
  24. data/proto_docs/google/cloud/retail/v2/catalog.rb +8 -8
  25. data/proto_docs/google/cloud/retail/v2/common.rb +22 -10
  26. data/proto_docs/google/cloud/retail/v2/completion_service.rb +16 -5
  27. data/proto_docs/google/cloud/retail/v2/import_config.rb +9 -2
  28. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +40 -15
  29. data/proto_docs/google/cloud/retail/v2/product.rb +2 -2
  30. data/proto_docs/google/cloud/retail/v2/product_service.rb +73 -29
  31. data/proto_docs/google/cloud/retail/v2/search_service.rb +141 -29
  32. data/proto_docs/google/cloud/retail/v2/user_event.rb +6 -3
  33. data/proto_docs/google/protobuf/any.rb +3 -3
  34. data/proto_docs/google/protobuf/empty.rb +0 -2
  35. data/proto_docs/google/protobuf/struct.rb +2 -2
  36. metadata +12 -12
@@ -21,7 +21,9 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- # Request message for [CreateProduct][] method.
24
+ # Request message for
25
+ # {::Google::Cloud::Retail::V2::ProductService::Client#create_product ProductService.CreateProduct}
26
+ # method.
25
27
  # @!attribute [rw] parent
26
28
  # @return [::String]
27
29
  # Required. The parent catalog resource name, such as
@@ -51,7 +53,9 @@ module Google
51
53
  extend ::Google::Protobuf::MessageExts::ClassMethods
52
54
  end
53
55
 
54
- # Request message for [GetProduct][] method.
56
+ # Request message for
57
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
58
+ # method.
55
59
  # @!attribute [rw] name
56
60
  # @return [::String]
57
61
  # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
@@ -69,7 +73,9 @@ module Google
69
73
  extend ::Google::Protobuf::MessageExts::ClassMethods
70
74
  end
71
75
 
72
- # Request message for [UpdateProduct][] method.
76
+ # Request message for
77
+ # {::Google::Cloud::Retail::V2::ProductService::Client#update_product ProductService.UpdateProduct}
78
+ # method.
73
79
  # @!attribute [rw] product
74
80
  # @return [::Google::Cloud::Retail::V2::Product]
75
81
  # Required. The product to update/create.
@@ -91,6 +97,11 @@ module Google
91
97
  #
92
98
  # If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
93
99
  # is returned.
100
+ #
101
+ # The attribute key can be updated by setting the mask path as
102
+ # "attributes.$\\{key_name}". If a key name is present in the mask but not in
103
+ # the patching product from the request, this key will be deleted after the
104
+ # update.
94
105
  # @!attribute [rw] allow_missing
95
106
  # @return [::Boolean]
96
107
  # If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
@@ -101,7 +112,9 @@ module Google
101
112
  extend ::Google::Protobuf::MessageExts::ClassMethods
102
113
  end
103
114
 
104
- # Request message for [DeleteProduct][] method.
115
+ # Request message for
116
+ # {::Google::Cloud::Retail::V2::ProductService::Client#delete_product ProductService.DeleteProduct}
117
+ # method.
105
118
  # @!attribute [rw] name
106
119
  # @return [::String]
107
120
  # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
@@ -233,11 +246,14 @@ module Google
233
246
  extend ::Google::Protobuf::MessageExts::ClassMethods
234
247
  end
235
248
 
236
- # Request message for [SetInventory][] method.
249
+ # Request message for
250
+ # {::Google::Cloud::Retail::V2::ProductService::Client#set_inventory ProductService.SetInventory}
251
+ # method.
237
252
  # @!attribute [rw] inventory
238
253
  # @return [::Google::Cloud::Retail::V2::Product]
239
254
  # Required. The inventory information to update. The allowable fields to
240
255
  # update are:
256
+ #
241
257
  # * {::Google::Cloud::Retail::V2::Product#price_info Product.price_info}
242
258
  # * {::Google::Cloud::Retail::V2::Product#availability Product.availability}
243
259
  # * {::Google::Cloud::Retail::V2::Product#available_quantity Product.available_quantity}
@@ -245,8 +261,9 @@ module Google
245
261
  # The updated inventory fields must be specified in
246
262
  # {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}.
247
263
  #
248
- # If [SetInventoryRequest.inventory.name][] is empty or invalid, an
249
- # INVALID_ARGUMENT error is returned.
264
+ # If
265
+ # {::Google::Cloud::Retail::V2::Product#name SetInventoryRequest.inventory.name}
266
+ # is empty or invalid, an INVALID_ARGUMENT error is returned.
250
267
  #
251
268
  # If the caller does not have permission to update the
252
269
  # {::Google::Cloud::Retail::V2::Product Product} named in
@@ -269,7 +286,8 @@ module Google
269
286
  # * Adds "fulfillment_info" in
270
287
  # {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}
271
288
  # * Specifies only the desired fulfillment types and corresponding place IDs
272
- # to update in [SetInventoryRequest.inventory.fulfillment_info][]
289
+ # to update in
290
+ # {::Google::Cloud::Retail::V2::Product#fulfillment_info SetInventoryRequest.inventory.fulfillment_info}
273
291
  #
274
292
  # The caller can clear all place IDs from a subset of fulfillment types in
275
293
  # the following ways:
@@ -277,9 +295,9 @@ module Google
277
295
  # * Adds "fulfillment_info" in
278
296
  # {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}
279
297
  # * Specifies only the desired fulfillment types to clear in
280
- # [SetInventoryRequest.inventory.fulfillment_info][]
298
+ # {::Google::Cloud::Retail::V2::Product#fulfillment_info SetInventoryRequest.inventory.fulfillment_info}
281
299
  # * Checks that only the desired fulfillment info types have empty
282
- # [SetInventoryRequest.inventory.fulfillment_info.place_ids][]
300
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids SetInventoryRequest.inventory.fulfillment_info.place_ids}
283
301
  #
284
302
  # The last update time is recorded for the following inventory fields:
285
303
  # * {::Google::Cloud::Retail::V2::Product#price_info Product.price_info}
@@ -288,7 +306,9 @@ module Google
288
306
  # * {::Google::Cloud::Retail::V2::Product#fulfillment_info Product.fulfillment_info}
289
307
  #
290
308
  # If a full overwrite of inventory information while ignoring timestamps is
291
- # needed, [UpdateProduct][] should be invoked instead.
309
+ # needed,
310
+ # {::Google::Cloud::Retail::V2::ProductService::Client#update_product ProductService.UpdateProduct}
311
+ # should be invoked instead.
292
312
  # @!attribute [rw] set_mask
293
313
  # @return [::Google::Protobuf::FieldMask]
294
314
  # Indicates which inventory fields in the provided
@@ -318,21 +338,25 @@ module Google
318
338
 
319
339
  # Metadata related to the progress of the SetInventory operation.
320
340
  # Currently empty because there is no meaningful metadata populated from the
321
- # [SetInventory][] method.
341
+ # {::Google::Cloud::Retail::V2::ProductService::Client#set_inventory ProductService.SetInventory}
342
+ # method.
322
343
  class SetInventoryMetadata
323
344
  include ::Google::Protobuf::MessageExts
324
345
  extend ::Google::Protobuf::MessageExts::ClassMethods
325
346
  end
326
347
 
327
348
  # Response of the SetInventoryRequest. Currently empty because
328
- # there is no meaningful response populated from the [SetInventory][]
349
+ # there is no meaningful response populated from the
350
+ # {::Google::Cloud::Retail::V2::ProductService::Client#set_inventory ProductService.SetInventory}
329
351
  # method.
330
352
  class SetInventoryResponse
331
353
  include ::Google::Protobuf::MessageExts
332
354
  extend ::Google::Protobuf::MessageExts::ClassMethods
333
355
  end
334
356
 
335
- # Request message for [AddFulfillmentPlaces][] method.
357
+ # Request message for
358
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
359
+ # method.
336
360
  # @!attribute [rw] product
337
361
  # @return [::String]
338
362
  # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
@@ -362,7 +386,8 @@ module Google
362
386
  # If this field is set to an invalid value other than these, an
363
387
  # INVALID_ARGUMENT error is returned.
364
388
  #
365
- # This field directly corresponds to [Product.fulfillment_info.type][].
389
+ # This field directly corresponds to
390
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#type Product.fulfillment_info.type}.
366
391
  # @!attribute [rw] place_ids
367
392
  # @return [::Array<::String>]
368
393
  # Required. The IDs for this
@@ -400,21 +425,25 @@ module Google
400
425
 
401
426
  # Metadata related to the progress of the AddFulfillmentPlaces operation.
402
427
  # Currently empty because there is no meaningful metadata populated from the
403
- # [AddFulfillmentPlaces][] method.
428
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
429
+ # method.
404
430
  class AddFulfillmentPlacesMetadata
405
431
  include ::Google::Protobuf::MessageExts
406
432
  extend ::Google::Protobuf::MessageExts::ClassMethods
407
433
  end
408
434
 
409
435
  # Response of the AddFulfillmentPlacesRequest. Currently empty because
410
- # there is no meaningful response populated from the [AddFulfillmentPlaces][]
436
+ # there is no meaningful response populated from the
437
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
411
438
  # method.
412
439
  class AddFulfillmentPlacesResponse
413
440
  include ::Google::Protobuf::MessageExts
414
441
  extend ::Google::Protobuf::MessageExts::ClassMethods
415
442
  end
416
443
 
417
- # Request message for [AddLocalInventories][] method.
444
+ # Request message for
445
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
446
+ # method.
418
447
  # @!attribute [rw] product
419
448
  # @return [::String]
420
449
  # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
@@ -465,21 +494,27 @@ module Google
465
494
 
466
495
  # Metadata related to the progress of the AddLocalInventories operation.
467
496
  # Currently empty because there is no meaningful metadata populated from the
468
- # [AddLocalInventories][] method.
497
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
498
+ # method.
469
499
  class AddLocalInventoriesMetadata
470
500
  include ::Google::Protobuf::MessageExts
471
501
  extend ::Google::Protobuf::MessageExts::ClassMethods
472
502
  end
473
503
 
474
- # Response of the [AddLocalInventories][] API. Currently empty because
475
- # there is no meaningful response populated from the [AddLocalInventories][]
504
+ # Response of the
505
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
506
+ # API. Currently empty because there is no meaningful response populated from
507
+ # the
508
+ # {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
476
509
  # method.
477
510
  class AddLocalInventoriesResponse
478
511
  include ::Google::Protobuf::MessageExts
479
512
  extend ::Google::Protobuf::MessageExts::ClassMethods
480
513
  end
481
514
 
482
- # Request message for [RemoveLocalInventories][] method.
515
+ # Request message for
516
+ # {::Google::Cloud::Retail::V2::ProductService::Client#remove_local_inventories ProductService.RemoveLocalInventories}
517
+ # method.
483
518
  # @!attribute [rw] product
484
519
  # @return [::String]
485
520
  # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
@@ -513,21 +548,27 @@ module Google
513
548
 
514
549
  # Metadata related to the progress of the RemoveLocalInventories operation.
515
550
  # Currently empty because there is no meaningful metadata populated from the
516
- # [RemoveLocalInventories][] method.
551
+ # {::Google::Cloud::Retail::V2::ProductService::Client#remove_local_inventories ProductService.RemoveLocalInventories}
552
+ # method.
517
553
  class RemoveLocalInventoriesMetadata
518
554
  include ::Google::Protobuf::MessageExts
519
555
  extend ::Google::Protobuf::MessageExts::ClassMethods
520
556
  end
521
557
 
522
- # Response of the [RemoveLocalInventories][] API. Currently empty because
523
- # there is no meaningful response populated from the [RemoveLocalInventories][]
558
+ # Response of the
559
+ # {::Google::Cloud::Retail::V2::ProductService::Client#remove_local_inventories ProductService.RemoveLocalInventories}
560
+ # API. Currently empty because there is no meaningful response populated from
561
+ # the
562
+ # {::Google::Cloud::Retail::V2::ProductService::Client#remove_local_inventories ProductService.RemoveLocalInventories}
524
563
  # method.
525
564
  class RemoveLocalInventoriesResponse
526
565
  include ::Google::Protobuf::MessageExts
527
566
  extend ::Google::Protobuf::MessageExts::ClassMethods
528
567
  end
529
568
 
530
- # Request message for [RemoveFulfillmentPlaces][] method.
569
+ # Request message for
570
+ # {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places ProductService.RemoveFulfillmentPlaces}
571
+ # method.
531
572
  # @!attribute [rw] product
532
573
  # @return [::String]
533
574
  # Required. Full resource name of {::Google::Cloud::Retail::V2::Product Product},
@@ -557,7 +598,8 @@ module Google
557
598
  # If this field is set to an invalid value other than these, an
558
599
  # INVALID_ARGUMENT error is returned.
559
600
  #
560
- # This field directly corresponds to [Product.fulfillment_info.type][].
601
+ # This field directly corresponds to
602
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#type Product.fulfillment_info.type}.
561
603
  # @!attribute [rw] place_ids
562
604
  # @return [::Array<::String>]
563
605
  # Required. The IDs for this
@@ -590,14 +632,16 @@ module Google
590
632
 
591
633
  # Metadata related to the progress of the RemoveFulfillmentPlaces operation.
592
634
  # Currently empty because there is no meaningful metadata populated from the
593
- # [RemoveFulfillmentPlaces][] method.
635
+ # {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places ProductService.RemoveFulfillmentPlaces}
636
+ # method.
594
637
  class RemoveFulfillmentPlacesMetadata
595
638
  include ::Google::Protobuf::MessageExts
596
639
  extend ::Google::Protobuf::MessageExts::ClassMethods
597
640
  end
598
641
 
599
642
  # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
600
- # is no meaningful response populated from the [RemoveFulfillmentPlaces][]
643
+ # is no meaningful response populated from the
644
+ # {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places ProductService.RemoveFulfillmentPlaces}
601
645
  # method.
602
646
  class RemoveFulfillmentPlacesResponse
603
647
  include ::Google::Protobuf::MessageExts
@@ -25,8 +25,10 @@ module Google
25
25
  # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search} method.
26
26
  # @!attribute [rw] placement
27
27
  # @return [::String]
28
- # Required. The resource name of the search engine placement, such as
29
- # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`
28
+ # Required. The resource name of the Retail Search serving config, such as
29
+ # `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
30
+ # or the name of the legacy placement resource, such as
31
+ # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
30
32
  # This field is used to identify the serving configuration name and the set
31
33
  # of models that will be used to make the search.
32
34
  # @!attribute [rw] branch
@@ -39,6 +41,11 @@ module Google
39
41
  # @!attribute [rw] query
40
42
  # @return [::String]
41
43
  # Raw search query.
44
+ #
45
+ # If this field is empty, the request is considered a category browsing
46
+ # request and returned results are based on
47
+ # {::Google::Cloud::Retail::V2::SearchRequest#filter filter} and
48
+ # {::Google::Cloud::Retail::V2::SearchRequest#page_categories page_categories}.
42
49
  # @!attribute [rw] visitor_id
43
50
  # @return [::String]
44
51
  # Required. A unique identifier for tracking visitors. For example, this
@@ -132,10 +139,10 @@ module Google
132
139
  # [user guide](https://cloud.google.com/retail/docs/boosting).
133
140
  #
134
141
  # Notice that if both [ServingConfig.boost_control_ids][] and
135
- # [SearchRequest.boost_spec] are set, the boost conditions from both places
136
- # are evaluated. If a search request matches multiple boost conditions,
137
- # the final boost score is equal to the sum of the boost scores from all
138
- # matched boost conditions.
142
+ # {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
143
+ # are set, the boost conditions from both places are evaluated. If a search
144
+ # request matches multiple boost conditions, the final boost score is equal
145
+ # to the sum of the boost scores from all matched boost conditions.
139
146
  # @!attribute [rw] query_expansion_spec
140
147
  # @return [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec]
141
148
  # The query expansion specification that specifies the conditions under which
@@ -170,7 +177,8 @@ module Google
170
177
  # * inventory(place_id,price)
171
178
  # * inventory(place_id,original_price)
172
179
  # * inventory(place_id,attributes.key), where key is any key in the
173
- # [Product.inventories.attributes][] map.
180
+ # {::Google::Cloud::Retail::V2::LocalInventory#attributes Product.local_inventories.attributes}
181
+ # map.
174
182
  # * attributes.key, where key is any key in the
175
183
  # {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
176
184
  # * pickupInStore.id, where id is any
@@ -233,6 +241,29 @@ module Google
233
241
  # @!attribute [rw] personalization_spec
234
242
  # @return [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec]
235
243
  # The specification for personalization.
244
+ # @!attribute [rw] labels
245
+ # @return [::Google::Protobuf::Map{::String => ::String}]
246
+ # The labels applied to a resource must meet the following requirements:
247
+ #
248
+ # * Each resource can have multiple labels, up to a maximum of 64.
249
+ # * Each label must be a key-value pair.
250
+ # * Keys have a minimum length of 1 character and a maximum length of 63
251
+ # characters and cannot be empty. Values can be empty and have a maximum
252
+ # length of 63 characters.
253
+ # * Keys and values can contain only lowercase letters, numeric characters,
254
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
255
+ # international characters are allowed.
256
+ # * The key portion of a label must be unique. However, you can use the same
257
+ # key with multiple resources.
258
+ # * Keys must start with a lowercase letter or international character.
259
+ #
260
+ # See [Google Cloud
261
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
262
+ # for more details.
263
+ # @!attribute [rw] spell_correction_spec
264
+ # @return [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec]
265
+ # The spell correction specification that specifies the mode under
266
+ # which spell correction will take effect.
236
267
  class SearchRequest
237
268
  include ::Google::Protobuf::MessageExts
238
269
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -252,19 +283,29 @@ module Google
252
283
  # @return [::Array<::String>]
253
284
  # List of keys to exclude when faceting.
254
285
  #
286
+ #
255
287
  # By default,
256
288
  # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
257
289
  # is not excluded from the filter unless it is listed in this field.
258
290
  #
259
- # For example, suppose there are 100 products with color facet "Red" and
260
- # 200 products with color facet "Blue". A query containing the filter
261
- # "colorFamilies:ANY("Red")" and have "colorFamilies" as
291
+ # Listing a facet key in this field allows its values to appear as facet
292
+ # results, even when they are filtered out of search results. Using this
293
+ # field does not affect what search results are returned.
294
+ #
295
+ # For example, suppose there are 100 products with the color facet "Red"
296
+ # and 200 products with the color facet "Blue". A query containing the
297
+ # filter "colorFamilies:ANY("Red")" and having "colorFamilies" as
262
298
  # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
263
- # will by default return the "Red" with count 100.
299
+ # would by default return only "Red" products in the search results, and
300
+ # also return "Red" with count 100 as the only color facet. Although there
301
+ # are also blue products available, "Blue" would not be shown as an
302
+ # available facet value.
264
303
  #
265
- # If this field contains "colorFamilies", then the query returns both the
266
- # "Red" with count 100 and "Blue" with count 200, because the
267
- # "colorFamilies" key is now excluded from the filter.
304
+ # If "colorFamilies" is listed in "excludedFilterKeys", then the query
305
+ # returns the facet values "Red" with count 100 and "Blue" with count
306
+ # 200, because the "colorFamilies" key is now excluded from the filter.
307
+ # Because this field doesn't affect search results, the search results
308
+ # are still correctly filtered to return only "Red" products.
268
309
  #
269
310
  # A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error
270
311
  # is returned.
@@ -356,8 +397,8 @@ module Google
356
397
  # Only get facet for the given restricted values. For example, when using
357
398
  # "pickupInStore" as key and set restricted values to
358
399
  # ["store123", "store456"], only facets for "store123" and "store456" are
359
- # returned. Only supported on textual fields and fulfillments.
360
- # Maximum is 20.
400
+ # returned. Only supported on predefined textual fields, custom textual
401
+ # attributes and fulfillments. Maximum is 20.
361
402
  #
362
403
  # Must be set for the fulfillment facet keys:
363
404
  #
@@ -392,16 +433,24 @@ module Google
392
433
  # "Women > Dress" and "Men > Shoe". If set "contains" to "Shoe", the
393
434
  # "categories" facet will give only "Women > Shoe" and "Men > Shoe".
394
435
  # Only supported on textual fields. Maximum is 10.
436
+ # @!attribute [rw] case_insensitive
437
+ # @return [::Boolean]
438
+ # True to make facet keys case insensitive when getting faceting
439
+ # values with prefixes or contains; false otherwise.
395
440
  # @!attribute [rw] order_by
396
441
  # @return [::String]
397
- # The order in which [Facet.values][] are returned.
442
+ # The order in which
443
+ # {::Google::Cloud::Retail::V2::SearchResponse::Facet#values SearchResponse.Facet.values}
444
+ # are returned.
398
445
  #
399
446
  # Allowed values are:
400
447
  #
401
- # * "count desc", which means order by [Facet.FacetValue.count][]
448
+ # * "count desc", which means order by
449
+ # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#count SearchResponse.Facet.values.count}
402
450
  # descending.
403
451
  #
404
- # * "value desc", which means order by [Facet.FacetValue.value][]
452
+ # * "value desc", which means order by
453
+ # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#value SearchResponse.Facet.values.value}
405
454
  # descending.
406
455
  # Only applies to textual facets.
407
456
  #
@@ -422,9 +471,11 @@ module Google
422
471
  # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#key FacetKey.key}
423
472
  # when query is specified.
424
473
  #
425
- # In the response, [FacetValue.value][] will be always "1" and
426
- # [FacetValue.count][] will be the number of results that matches the
427
- # query.
474
+ # In the response,
475
+ # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#value SearchResponse.Facet.values.value}
476
+ # will be always "1" and
477
+ # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#count SearchResponse.Facet.values.count}
478
+ # will be the number of results that match the query.
428
479
  #
429
480
  # For example, you can set a customized facet for "shipToStore",
430
481
  # where
@@ -434,6 +485,10 @@ module Google
434
485
  # is "availability: ANY(\"IN_STOCK\") AND shipToStore: ANY(\"123\")".
435
486
  # Then the facet will count the products that are both in stock and ship
436
487
  # to store "123".
488
+ # @!attribute [rw] return_min_max
489
+ # @return [::Boolean]
490
+ # Returns the min and max value for each numerical facet intervals.
491
+ # Ignored for textual facets.
437
492
  class FacetKey
438
493
  include ::Google::Protobuf::MessageExts
439
494
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -470,7 +525,7 @@ module Google
470
525
  # Condition boost specifications. If a product matches multiple conditions
471
526
  # in the specifictions, boost scores from these specifications are all
472
527
  # applied and combined in a non-linear way. Maximum number of
473
- # specifications is 10.
528
+ # specifications is 20.
474
529
  # @!attribute [rw] skip_boost_spec_validation
475
530
  # @return [::Boolean]
476
531
  # Whether to skip boostspec validation. If this field is set to true,
@@ -540,7 +595,8 @@ module Google
540
595
 
541
596
  # Enum describing under which condition query expansion should occur.
542
597
  module Condition
543
- # Unspecified query expansion condition. This defaults to
598
+ # Unspecified query expansion condition. In this case, server behavior
599
+ # defaults to
544
600
  # {::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec::Condition::DISABLED Condition.DISABLED}.
545
601
  CONDITION_UNSPECIFIED = 0
546
602
 
@@ -565,7 +621,7 @@ module Google
565
621
 
566
622
  # The personalization mode of each search request.
567
623
  module Mode
568
- # Default value. Defaults to
624
+ # Default value. In this case, server behavior defaults to
569
625
  # {::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec::Mode::AUTO Mode.AUTO}.
570
626
  MODE_UNSPECIFIED = 0
571
627
 
@@ -577,6 +633,44 @@ module Google
577
633
  end
578
634
  end
579
635
 
636
+ # The specification for query spell correction.
637
+ # @!attribute [rw] mode
638
+ # @return [::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec::Mode]
639
+ # The mode under which spell correction should take effect to
640
+ # replace the original search query. Default to
641
+ # {::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
642
+ class SpellCorrectionSpec
643
+ include ::Google::Protobuf::MessageExts
644
+ extend ::Google::Protobuf::MessageExts::ClassMethods
645
+
646
+ # Enum describing under which mode spell correction should occur.
647
+ module Mode
648
+ # Unspecified spell correction mode. In this case, server behavior
649
+ # defaults to
650
+ # {::Google::Cloud::Retail::V2::SearchRequest::SpellCorrectionSpec::Mode::AUTO Mode.AUTO}.
651
+ MODE_UNSPECIFIED = 0
652
+
653
+ # Google Retail Search will try to find a spell suggestion if there
654
+ # is any and put in the
655
+ # {::Google::Cloud::Retail::V2::SearchResponse#corrected_query SearchResponse.corrected_query}.
656
+ # The spell suggestion will not be used as the search query.
657
+ SUGGESTION_ONLY = 1
658
+
659
+ # Automatic spell correction built by Google Retail Search. Search will
660
+ # be based on the corrected query if found.
661
+ AUTO = 2
662
+ end
663
+ end
664
+
665
+ # @!attribute [rw] key
666
+ # @return [::String]
667
+ # @!attribute [rw] value
668
+ # @return [::String]
669
+ class LabelsEntry
670
+ include ::Google::Protobuf::MessageExts
671
+ extend ::Google::Protobuf::MessageExts::ClassMethods
672
+ end
673
+
580
674
  # The search mode of each search request.
581
675
  module SearchMode
582
676
  # Default value. In this case both product search and faceted search will
@@ -598,7 +692,9 @@ module Google
598
692
  # Only faceted search will be performed. The product search will be
599
693
  # disabled.
600
694
  #
601
- # When in this mode, one or both of [SearchRequest.facet_spec][] and
695
+ # When in this mode, one or both of
696
+ # {::Google::Cloud::Retail::V2::SearchRequest#facet_specs SearchRequest.facet_specs}
697
+ # and
602
698
  # {::Google::Cloud::Retail::V2::SearchRequest#dynamic_facet_spec SearchRequest.dynamic_facet_spec}
603
699
  # should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
604
700
  # [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
@@ -624,7 +720,9 @@ module Google
624
720
  # matches.
625
721
  # @!attribute [rw] corrected_query
626
722
  # @return [::String]
627
- # If spell correction applies, the corrected query. Otherwise, empty.
723
+ # Contains the spell corrected query, if found. If the spell correction type
724
+ # is AUTOMATIC, then the search results are based on corrected_query.
725
+ # Otherwise the original query is used for search.
628
726
  # @!attribute [rw] attribution_token
629
727
  # @return [::String]
630
728
  # A unique search token. This should be included in the
@@ -642,10 +740,10 @@ module Google
642
740
  # @!attribute [rw] redirect_uri
643
741
  # @return [::String]
644
742
  # The URI of a customer-defined redirect page. If redirect action is
645
- # triggered, no search will be performed, and only
743
+ # triggered, no search is performed, and only
646
744
  # {::Google::Cloud::Retail::V2::SearchResponse#redirect_uri redirect_uri} and
647
745
  # {::Google::Cloud::Retail::V2::SearchResponse#attribution_token attribution_token}
648
- # will be set in the response.
746
+ # are set in the response.
649
747
  # @!attribute [rw] applied_controls
650
748
  # @return [::Array<::String>]
651
749
  # The fully qualified resource name of applied
@@ -779,6 +877,20 @@ module Google
779
877
  # @!attribute [rw] count
780
878
  # @return [::Integer]
781
879
  # Number of items that have this facet value.
880
+ # @!attribute [rw] min_value
881
+ # @return [::Float]
882
+ # The minimum value in the
883
+ # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}.
884
+ # Only supported on numerical facets and returned if
885
+ # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max}
886
+ # is true.
887
+ # @!attribute [rw] max_value
888
+ # @return [::Float]
889
+ # The maximum value in the
890
+ # {::Google::Cloud::Retail::V2::SearchResponse::Facet::FacetValue#interval FacetValue.interval}.
891
+ # Only supported on numerical facets and returned if
892
+ # {::Google::Cloud::Retail::V2::SearchRequest::FacetSpec::FacetKey#return_min_max SearchRequest.FacetSpec.FacetKey.return_min_max}
893
+ # is true.
782
894
  class FacetValue
783
895
  include ::Google::Protobuf::MessageExts
784
896
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -45,11 +45,15 @@ module Google
45
45
  # able to uniquely identify a visitor on a single device. This unique
46
46
  # identifier should not change if the visitor log in/out of the website.
47
47
  #
48
+ # Don't set the field to the same fixed ID for different users. This mixes
49
+ # the event history of those users together, which results in degraded model
50
+ # quality.
51
+ #
48
52
  # The field must be a UTF-8 encoded string with a length limit of 128
49
53
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
50
54
  #
51
55
  # The field should not contain PII or user-data. We recommend to use Google
52
- # Analystics [Client
56
+ # Analytics [Client
53
57
  # ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
54
58
  # for this field.
55
59
  # @!attribute [rw] session_id
@@ -102,12 +106,11 @@ module Google
102
106
  # @return [::Array<::Google::Cloud::Retail::V2::ProductDetail>]
103
107
  # The main product details related to the event.
104
108
  #
105
- # This field is required for the following event types:
109
+ # This field is optional except for the following event types:
106
110
  #
107
111
  # * `add-to-cart`
108
112
  # * `detail-page-view`
109
113
  # * `purchase-complete`
110
- # * `search`
111
114
  #
112
115
  # In a `search` event, this field represents the products returned to the end
113
116
  # user on the current page (the end user may have not finished browsing the
@@ -44,7 +44,7 @@ module Google
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
46
  #
47
- # Example 3: Pack and unpack a message in Python.
47
+ # Example 3: Pack and unpack a message in Python.
48
48
  #
49
49
  # foo = Foo(...)
50
50
  # any = Any()
@@ -54,7 +54,7 @@ module Google
54
54
  # any.Unpack(foo)
55
55
  # ...
56
56
  #
57
- # Example 4: Pack and unpack a message in Go
57
+ # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
60
  # any, err := anypb.New(foo)
@@ -75,7 +75,7 @@ module Google
75
75
  #
76
76
  #
77
77
  # JSON
78
- # ====
78
+ #
79
79
  # The JSON representation of an `Any` value uses the regular
80
80
  # representation of the deserialized, embedded message, with an
81
81
  # additional field `@type` which contains the type URL. Example:
@@ -26,8 +26,6 @@ module Google
26
26
  # service Foo {
27
27
  # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
28
28
  # }
29
- #
30
- # The JSON representation for `Empty` is empty JSON object `{}`.
31
29
  class Empty
32
30
  include ::Google::Protobuf::MessageExts
33
31
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -46,8 +46,8 @@ module Google
46
46
 
47
47
  # `Value` represents a dynamically typed value which can be either
48
48
  # null, a number, a string, a boolean, a recursive struct value, or a
49
- # list of values. A producer of value is expected to set one of that
50
- # variants, absence of any variant indicates an error.
49
+ # list of values. A producer of value is expected to set one of these
50
+ # variants. Absence of any variant indicates an error.
51
51
  #
52
52
  # The JSON representation for `Value` is JSON value.
53
53
  # @!attribute [rw] null_value