google-cloud-retail-v2 0.4.2 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -2
  3. data/lib/google/cloud/retail/v2/catalog_service/client.rb +26 -18
  4. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +2 -2
  5. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +5 -5
  6. data/lib/google/cloud/retail/v2/common_pb.rb +2 -2
  7. data/lib/google/cloud/retail/v2/completion_service/client.rb +29 -23
  8. data/lib/google/cloud/retail/v2/completion_service/operations.rb +20 -12
  9. data/lib/google/cloud/retail/v2/completion_service.rb +2 -2
  10. data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -2
  11. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
  12. data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -2
  13. data/lib/google/cloud/retail/v2/prediction_service/client.rb +7 -5
  14. data/lib/google/cloud/retail/v2/prediction_service_pb.rb +2 -2
  15. data/lib/google/cloud/retail/v2/prediction_service_services_pb.rb +1 -1
  16. data/lib/google/cloud/retail/v2/product_pb.rb +2 -2
  17. data/lib/google/cloud/retail/v2/product_service/client.rb +66 -43
  18. data/lib/google/cloud/retail/v2/product_service/operations.rb +20 -12
  19. data/lib/google/cloud/retail/v2/product_service_pb.rb +3 -2
  20. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +7 -7
  21. data/lib/google/cloud/retail/v2/purge_config_pb.rb +2 -2
  22. data/lib/google/cloud/retail/v2/search_service/client.rb +74 -45
  23. data/lib/google/cloud/retail/v2/search_service.rb +2 -2
  24. data/lib/google/cloud/retail/v2/search_service_pb.rb +11 -2
  25. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +5 -5
  26. data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -2
  27. data/lib/google/cloud/retail/v2/user_event_service/client.rb +37 -17
  28. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +20 -12
  29. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +2 -2
  30. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +1 -1
  31. data/lib/google/cloud/retail/v2/version.rb +1 -1
  32. data/proto_docs/google/api/httpbody.rb +7 -3
  33. data/proto_docs/google/cloud/retail/v2/common.rb +6 -5
  34. data/proto_docs/google/cloud/retail/v2/completion_service.rb +14 -12
  35. data/proto_docs/google/cloud/retail/v2/import_config.rb +5 -5
  36. data/proto_docs/google/cloud/retail/v2/product.rb +23 -17
  37. data/proto_docs/google/cloud/retail/v2/product_service.rb +8 -8
  38. data/proto_docs/google/cloud/retail/v2/search_service.rb +141 -74
  39. data/proto_docs/google/cloud/retail/v2/user_event.rb +19 -7
  40. metadata +2 -2
@@ -65,9 +65,14 @@ module Google
65
65
  end
66
66
  default_config = Client::Configuration.new parent_config
67
67
 
68
- default_config.timeout = 60.0
68
+ default_config.timeout = 30.0
69
69
  default_config.retry_policy = {
70
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
70
+ initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [14, 4]
71
+ }
72
+
73
+ default_config.rpcs.import_products.timeout = 300.0
74
+ default_config.rpcs.import_products.retry_policy = {
75
+ initial_delay: 0.1, max_delay: 300.0, multiplier: 1.3, retry_codes: [14, 4]
71
76
  }
72
77
 
73
78
  default_config
@@ -227,9 +232,11 @@ module Google
227
232
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
228
233
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
229
234
 
230
- header_params = {
231
- "parent" => request.parent
232
- }
235
+ header_params = {}
236
+ if request.parent
237
+ header_params["parent"] = request.parent
238
+ end
239
+
233
240
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
234
241
  metadata[:"x-goog-request-params"] ||= request_params_header
235
242
 
@@ -304,9 +311,11 @@ module Google
304
311
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
305
312
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
313
 
307
- header_params = {
308
- "name" => request.name
309
- }
314
+ header_params = {}
315
+ if request.name
316
+ header_params["name"] = request.name
317
+ end
318
+
310
319
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
320
  metadata[:"x-goog-request-params"] ||= request_params_header
312
321
 
@@ -443,9 +452,11 @@ module Google
443
452
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
444
453
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
445
454
 
446
- header_params = {
447
- "parent" => request.parent
448
- }
455
+ header_params = {}
456
+ if request.parent
457
+ header_params["parent"] = request.parent
458
+ end
459
+
449
460
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
450
461
  metadata[:"x-goog-request-params"] ||= request_params_header
451
462
 
@@ -533,9 +544,11 @@ module Google
533
544
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
534
545
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
535
546
 
536
- header_params = {
537
- "product.name" => request.product.name
538
- }
547
+ header_params = {}
548
+ if request.product&.name
549
+ header_params["product.name"] = request.product.name
550
+ end
551
+
539
552
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
540
553
  metadata[:"x-goog-request-params"] ||= request_params_header
541
554
 
@@ -621,9 +634,11 @@ module Google
621
634
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
622
635
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
623
636
 
624
- header_params = {
625
- "name" => request.name
626
- }
637
+ header_params = {}
638
+ if request.name
639
+ header_params["name"] = request.name
640
+ end
641
+
627
642
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
628
643
  metadata[:"x-goog-request-params"] ||= request_params_header
629
644
 
@@ -677,7 +692,7 @@ module Google
677
692
  # Unique identifier provided by client, within the ancestor
678
693
  # dataset scope. Ensures idempotency and used for request deduplication.
679
694
  # Server-generated if unspecified. Up to 128 characters long and must match
680
- # the pattern: "[a-zA-Z0-9_]+". This is returned as [Operation.name][] in
695
+ # the pattern: `[a-zA-Z0-9_]+`. This is returned as [Operation.name][] in
681
696
  # {::Google::Cloud::Retail::V2::ImportMetadata ImportMetadata}.
682
697
  #
683
698
  # Only supported when
@@ -730,9 +745,11 @@ module Google
730
745
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
731
746
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
732
747
 
733
- header_params = {
734
- "parent" => request.parent
735
- }
748
+ header_params = {}
749
+ if request.parent
750
+ header_params["parent"] = request.parent
751
+ end
752
+
736
753
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
737
754
  metadata[:"x-goog-request-params"] ||= request_params_header
738
755
 
@@ -792,8 +809,8 @@ module Google
792
809
  # {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places RemoveFulfillmentPlaces}.
793
810
  #
794
811
  # This feature is only available for users who have Retail Search enabled.
795
- # Contact Retail Support (retail-search-support@google.com) if you are
796
- # interested in using Retail Search.
812
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
813
+ # cloud sales if you are interested in using Retail Search.
797
814
  #
798
815
  # @overload set_inventory(request, options = nil)
799
816
  # Pass arguments to `set_inventory` via a request object, either of type
@@ -862,7 +879,7 @@ module Google
862
879
  # {::Google::Cloud::Retail::V2::Product#name Product.name} is not found, the
863
880
  # inventory update will still be processed and retained for at most 1 day
864
881
  # until the {::Google::Cloud::Retail::V2::Product Product} is created. If set to
865
- # false, an INVALID_ARGUMENT error is returned if the
882
+ # false, a NOT_FOUND error is returned if the
866
883
  # {::Google::Cloud::Retail::V2::Product Product} is not found.
867
884
  #
868
885
  # @yield [response, operation] Access the result along with the RPC operation
@@ -890,9 +907,11 @@ module Google
890
907
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
891
908
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
892
909
 
893
- header_params = {
894
- "inventory.name" => request.inventory.name
895
- }
910
+ header_params = {}
911
+ if request.inventory&.name
912
+ header_params["inventory.name"] = request.inventory.name
913
+ end
914
+
896
915
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
897
916
  metadata[:"x-goog-request-params"] ||= request_params_header
898
917
 
@@ -927,8 +946,8 @@ module Google
927
946
  # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ListProducts}.
928
947
  #
929
948
  # This feature is only available for users who have Retail Search enabled.
930
- # Contact Retail Support (retail-search-support@google.com) if you are
931
- # interested in using Retail Search.
949
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
950
+ # cloud sales if you are interested in using Retail Search.
932
951
  #
933
952
  # @overload add_fulfillment_places(request, options = nil)
934
953
  # Pass arguments to `add_fulfillment_places` via a request object, either of type
@@ -983,7 +1002,7 @@ module Google
983
1002
  #
984
1003
  # At least 1 value is required, and a maximum of 2000 values are allowed.
985
1004
  # Each value must be a string with a length limit of 10 characters, matching
986
- # the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an
1005
+ # the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an
987
1006
  # INVALID_ARGUMENT error is returned.
988
1007
  #
989
1008
  # If the total number of place IDs exceeds 2000 for this
@@ -997,8 +1016,8 @@ module Google
997
1016
  # If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
998
1017
  # found, the fulfillment information will still be processed and retained for
999
1018
  # at most 1 day and processed once the
1000
- # {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, an
1001
- # INVALID_ARGUMENT error is returned if the
1019
+ # {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, a
1020
+ # NOT_FOUND error is returned if the
1002
1021
  # {::Google::Cloud::Retail::V2::Product Product} is not found.
1003
1022
  #
1004
1023
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1026,9 +1045,11 @@ module Google
1026
1045
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
1027
1046
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1028
1047
 
1029
- header_params = {
1030
- "product" => request.product
1031
- }
1048
+ header_params = {}
1049
+ if request.product
1050
+ header_params["product"] = request.product
1051
+ end
1052
+
1032
1053
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1033
1054
  metadata[:"x-goog-request-params"] ||= request_params_header
1034
1055
 
@@ -1063,8 +1084,8 @@ module Google
1063
1084
  # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ListProducts}.
1064
1085
  #
1065
1086
  # This feature is only available for users who have Retail Search enabled.
1066
- # Contact Retail Support (retail-search-support@google.com) if you are
1067
- # interested in using Retail Search.
1087
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
1088
+ # cloud sales if you are interested in using Retail Search.
1068
1089
  #
1069
1090
  # @overload remove_fulfillment_places(request, options = nil)
1070
1091
  # Pass arguments to `remove_fulfillment_places` via a request object, either of type
@@ -1118,7 +1139,7 @@ module Google
1118
1139
  #
1119
1140
  # At least 1 value is required, and a maximum of 2000 values are allowed.
1120
1141
  # Each value must be a string with a length limit of 10 characters, matching
1121
- # the pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an
1142
+ # the pattern `[a-zA-Z0-9_-]+`, such as "store1" or "REGION-2". Otherwise, an
1122
1143
  # INVALID_ARGUMENT error is returned.
1123
1144
  # @param remove_time [::Google::Protobuf::Timestamp, ::Hash]
1124
1145
  # The time when the fulfillment updates are issued, used to prevent
@@ -1128,8 +1149,8 @@ module Google
1128
1149
  # If set to true, and the {::Google::Cloud::Retail::V2::Product Product} is not
1129
1150
  # found, the fulfillment information will still be processed and retained for
1130
1151
  # at most 1 day and processed once the
1131
- # {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, an
1132
- # INVALID_ARGUMENT error is returned if the
1152
+ # {::Google::Cloud::Retail::V2::Product Product} is created. If set to false, a
1153
+ # NOT_FOUND error is returned if the
1133
1154
  # {::Google::Cloud::Retail::V2::Product Product} is not found.
1134
1155
  #
1135
1156
  # @yield [response, operation] Access the result along with the RPC operation
@@ -1157,9 +1178,11 @@ module Google
1157
1178
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
1158
1179
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1159
1180
 
1160
- header_params = {
1161
- "product" => request.product
1162
- }
1181
+ header_params = {}
1182
+ if request.product
1183
+ header_params["product"] = request.product
1184
+ end
1185
+
1163
1186
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1164
1187
  metadata[:"x-goog-request-params"] ||= request_params_header
1165
1188
 
@@ -160,9 +160,11 @@ module Google
160
160
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
161
161
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
162
 
163
- header_params = {
164
- "name" => request.name
165
- }
163
+ header_params = {}
164
+ if request.name
165
+ header_params["name"] = request.name
166
+ end
167
+
166
168
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
169
  metadata[:"x-goog-request-params"] ||= request_params_header
168
170
 
@@ -232,9 +234,11 @@ module Google
232
234
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
233
235
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
236
 
235
- header_params = {
236
- "name" => request.name
237
- }
237
+ header_params = {}
238
+ if request.name
239
+ header_params["name"] = request.name
240
+ end
241
+
238
242
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
243
  metadata[:"x-goog-request-params"] ||= request_params_header
240
244
 
@@ -304,9 +308,11 @@ module Google
304
308
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
305
309
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
310
 
307
- header_params = {
308
- "name" => request.name
309
- }
311
+ header_params = {}
312
+ if request.name
313
+ header_params["name"] = request.name
314
+ end
315
+
310
316
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
317
  metadata[:"x-goog-request-params"] ||= request_params_header
312
318
 
@@ -381,9 +387,11 @@ module Google
381
387
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
382
388
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
389
 
384
- header_params = {
385
- "name" => request.name
386
- }
390
+ header_params = {}
391
+ if request.name
392
+ header_params["name"] = request.name
393
+ end
394
+
387
395
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
396
  metadata[:"x-goog-request-params"] ||= request_params_header
389
397
 
@@ -1,12 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/product_service.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
9
7
  require 'google/api/resource_pb'
8
+ require 'google/cloud/retail/v2/common_pb'
10
9
  require 'google/cloud/retail/v2/import_config_pb'
11
10
  require 'google/cloud/retail/v2/product_pb'
12
11
  require 'google/cloud/retail/v2/purge_config_pb'
@@ -14,6 +13,8 @@ require 'google/longrunning/operations_pb'
14
13
  require 'google/protobuf/empty_pb'
15
14
  require 'google/protobuf/field_mask_pb'
16
15
  require 'google/protobuf/timestamp_pb'
16
+ require 'google/protobuf'
17
+
17
18
  Google::Protobuf::DescriptorPool.generated_pool.build do
18
19
  add_file("google/cloud/retail/v2/product_service.proto", :syntax => :proto3) do
19
20
  add_message "google.cloud.retail.v2.CreateProductRequest" do
@@ -28,7 +28,7 @@ module Google
28
28
  # of the customer's website.
29
29
  class Service
30
30
 
31
- include GRPC::GenericService
31
+ include ::GRPC::GenericService
32
32
 
33
33
  self.marshal_class_method = :encode
34
34
  self.unmarshal_class_method = :decode
@@ -90,8 +90,8 @@ module Google
90
90
  # [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
91
91
  #
92
92
  # This feature is only available for users who have Retail Search enabled.
93
- # Contact Retail Support (retail-search-support@google.com) if you are
94
- # interested in using Retail Search.
93
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
94
+ # cloud sales if you are interested in using Retail Search.
95
95
  rpc :SetInventory, ::Google::Cloud::Retail::V2::SetInventoryRequest, ::Google::Longrunning::Operation
96
96
  # Incrementally adds place IDs to
97
97
  # [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].
@@ -106,8 +106,8 @@ module Google
106
106
  # [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
107
107
  #
108
108
  # This feature is only available for users who have Retail Search enabled.
109
- # Contact Retail Support (retail-search-support@google.com) if you are
110
- # interested in using Retail Search.
109
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
110
+ # cloud sales if you are interested in using Retail Search.
111
111
  rpc :AddFulfillmentPlaces, ::Google::Cloud::Retail::V2::AddFulfillmentPlacesRequest, ::Google::Longrunning::Operation
112
112
  # Incrementally removes place IDs from a
113
113
  # [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].
@@ -122,8 +122,8 @@ module Google
122
122
  # [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
123
123
  #
124
124
  # This feature is only available for users who have Retail Search enabled.
125
- # Contact Retail Support (retail-search-support@google.com) if you are
126
- # interested in using Retail Search.
125
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
126
+ # cloud sales if you are interested in using Retail Search.
127
127
  rpc :RemoveFulfillmentPlaces, ::Google::Cloud::Retail::V2::RemoveFulfillmentPlacesRequest, ::Google::Longrunning::Operation
128
128
  end
129
129
 
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/purge_config.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/field_behavior_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/retail/v2/purge_config.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.retail.v2.PurgeMetadata" do
@@ -30,8 +30,8 @@ module Google
30
30
  # Service for search.
31
31
  #
32
32
  # This feature is only available for users who have Retail Search enabled.
33
- # Contact Retail Support (retail-search-support@google.com) if you are
34
- # interested in using Retail Search.
33
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
34
+ # cloud sales if you are interested in using Retail Search.
35
35
  #
36
36
  class Client
37
37
  include Paths
@@ -68,9 +68,9 @@ module Google
68
68
  end
69
69
  default_config = Client::Configuration.new parent_config
70
70
 
71
- default_config.timeout = 60.0
71
+ default_config.timeout = 5.0
72
72
  default_config.retry_policy = {
73
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
73
+ initial_delay: 0.1, max_delay: 5.0, multiplier: 1.3, retry_codes: [14, 4]
74
74
  }
75
75
 
76
76
  default_config
@@ -157,8 +157,8 @@ module Google
157
157
  # Performs a search.
158
158
  #
159
159
  # This feature is only available for users who have Retail Search enabled.
160
- # Contact Retail Support (retail-search-support@google.com) if you are
161
- # interested in using Retail Search.
160
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
161
+ # cloud sales if you are interested in using Retail Search.
162
162
  #
163
163
  # @overload search(request, options = nil)
164
164
  # Pass arguments to `search` via a request object, either of type
@@ -170,7 +170,7 @@ module Google
170
170
  # @param options [::Gapic::CallOptions, ::Hash]
171
171
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
172
172
  #
173
- # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil)
173
+ # @overload search(placement: nil, branch: nil, query: nil, visitor_id: nil, user_info: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, canonical_filter: nil, order_by: nil, facet_specs: nil, dynamic_facet_spec: nil, boost_spec: nil, query_expansion_spec: nil, variant_rollup_keys: nil, page_categories: nil, search_mode: nil)
174
174
  # Pass arguments to `search` via keyword arguments. Note that at
175
175
  # least one keyword argument is required. To specify no parameters, or to keep all
176
176
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -178,12 +178,8 @@ module Google
178
178
  # @param placement [::String]
179
179
  # Required. The resource name of the search engine placement, such as
180
180
  # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
181
- # This field is used to identify the set of models that will be used to make
182
- # the search.
183
- #
184
- # We currently support one placement with the following ID:
185
- #
186
- # * `default_search`.
181
+ # This field is used to identify the serving configuration name and the set
182
+ # of models that will be used to make the search.
187
183
  # @param branch [::String]
188
184
  # The branch resource name, such as
189
185
  # `projects/*/locations/global/catalogs/default_catalog/branches/0`.
@@ -230,7 +226,8 @@ module Google
230
226
  # @param filter [::String]
231
227
  # The filter syntax consists of an expression language for constructing a
232
228
  # predicate from one or more fields of the products being filtered. Filter
233
- # expression is case-sensitive.
229
+ # expression is case-sensitive. See more details at this [user
230
+ # guide](https://cloud.google.com/retail/docs/filter-and-order#filter).
234
231
  #
235
232
  # If this field is unrecognizable, an INVALID_ARGUMENT is returned.
236
233
  # @param canonical_filter [::String]
@@ -246,7 +243,9 @@ module Google
246
243
  # @param order_by [::String]
247
244
  # The order in which products are returned. Products can be ordered by
248
245
  # a field in an {::Google::Cloud::Retail::V2::Product Product} object. Leave it
249
- # unset if ordered by relevance. OrderBy expression is case-sensitive.
246
+ # unset if ordered by relevance. OrderBy expression is case-sensitive. See
247
+ # more details at this [user
248
+ # guide](https://cloud.google.com/retail/docs/filter-and-order#order).
250
249
  #
251
250
  # If this field is unrecognizable, an INVALID_ARGUMENT is returned.
252
251
  # @param facet_specs [::Array<::Google::Cloud::Retail::V2::SearchRequest::FacetSpec, ::Hash>]
@@ -258,14 +257,21 @@ module Google
258
257
  # The specification for dynamically generated facets. Notice that only
259
258
  # textual facets can be dynamically generated.
260
259
  #
261
- # This feature requires additional allowlisting. Contact Retail Support
262
- # (retail-search-support@google.com) if you are interested in using dynamic
263
- # facet feature.
260
+ # This feature requires additional allowlisting. Contact Retail Search
261
+ # support team if you are interested in using dynamic facet feature.
264
262
  # @param boost_spec [::Google::Cloud::Retail::V2::SearchRequest::BoostSpec, ::Hash]
265
- # Boost specification to boost certain products.
263
+ # Boost specification to boost certain products. See more details at this
264
+ # [user guide](https://cloud.google.com/retail/docs/boosting).
265
+ #
266
+ # Notice that if both [ServingConfig.boost_control_ids][] and
267
+ # [SearchRequest.boost_spec] are set, the boost conditions from both places
268
+ # are evaluated. If a search request matches multiple boost conditions,
269
+ # the final boost score is equal to the sum of the boost scores from all
270
+ # matched boost conditions.
266
271
  # @param query_expansion_spec [::Google::Cloud::Retail::V2::SearchRequest::QueryExpansionSpec, ::Hash]
267
272
  # The query expansion specification that specifies the conditions under which
268
- # query expansion will occur.
273
+ # query expansion will occur. See more details at this [user
274
+ # guide](https://cloud.google.com/retail/docs/result-size#query_expansion).
269
275
  # @param variant_rollup_keys [::Array<::String>]
270
276
  # The keys to fetch and rollup the matching
271
277
  # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
@@ -276,10 +282,9 @@ module Google
276
282
  # {::Google::Cloud::Retail::V2::Product Product}s attributes will lead to extra
277
283
  # query latency. Maximum number of keys is 10.
278
284
  #
279
- # For
280
- # {::Google::Cloud::Retail::V2::Product#fulfillment_info Product.fulfillment_info},
281
- # a fulfillment type and a fulfillment ID must be provided in the format of
282
- # "fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123",
285
+ # For {::Google::Cloud::Retail::V2::FulfillmentInfo FulfillmentInfo}, a
286
+ # fulfillment type and a fulfillment ID must be provided in the format of
287
+ # "fulfillmentType.fulfillmentId". E.g., in "pickupInStore.store123",
283
288
  # "pickupInStore" is fulfillment type and "store123" is the store ID.
284
289
  #
285
290
  # Supported keys are:
@@ -288,26 +293,45 @@ module Google
288
293
  # * price
289
294
  # * originalPrice
290
295
  # * discount
296
+ # * inventory(place_id,price)
291
297
  # * attributes.key, where key is any key in the
292
298
  # {::Google::Cloud::Retail::V2::Product#attributes Product.attributes} map.
293
- # * pickupInStore.id, where id is any [FulfillmentInfo.ids][] for type
294
- # [FulfillmentInfo.Type.PICKUP_IN_STORE][].
295
- # * shipToStore.id, where id is any [FulfillmentInfo.ids][] for type
296
- # [FulfillmentInfo.Type.SHIP_TO_STORE][].
297
- # * sameDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
298
- # [FulfillmentInfo.Type.SAME_DAY_DELIVERY][].
299
- # * nextDayDelivery.id, where id is any [FulfillmentInfo.ids][] for type
300
- # [FulfillmentInfo.Type.NEXT_DAY_DELIVERY][].
301
- # * customFulfillment1.id, where id is any [FulfillmentInfo.ids][] for type
302
- # [FulfillmentInfo.Type.CUSTOM_TYPE_1][].
303
- # * customFulfillment2.id, where id is any [FulfillmentInfo.ids][] for type
304
- # [FulfillmentInfo.Type.CUSTOM_TYPE_2][].
305
- # * customFulfillment3.id, where id is any [FulfillmentInfo.ids][] for type
306
- # [FulfillmentInfo.Type.CUSTOM_TYPE_3][].
307
- # * customFulfillment4.id, where id is any [FulfillmentInfo.ids][] for type
308
- # [FulfillmentInfo.Type.CUSTOM_TYPE_4][].
309
- # * customFulfillment5.id, where id is any [FulfillmentInfo.ids][] for type
310
- # [FulfillmentInfo.Type.CUSTOM_TYPE_5][].
299
+ # * pickupInStore.id, where id is any
300
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
301
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
302
+ # "pickup-in-store".
303
+ # * shipToStore.id, where id is any
304
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
305
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
306
+ # "ship-to-store".
307
+ # * sameDayDelivery.id, where id is any
308
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
309
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
310
+ # "same-day-delivery".
311
+ # * nextDayDelivery.id, where id is any
312
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
313
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
314
+ # "next-day-delivery".
315
+ # * customFulfillment1.id, where id is any
316
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
317
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
318
+ # "custom-type-1".
319
+ # * customFulfillment2.id, where id is any
320
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
321
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
322
+ # "custom-type-2".
323
+ # * customFulfillment3.id, where id is any
324
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
325
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
326
+ # "custom-type-3".
327
+ # * customFulfillment4.id, where id is any
328
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
329
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
330
+ # "custom-type-4".
331
+ # * customFulfillment5.id, where id is any
332
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids FulfillmentInfo.place_ids}
333
+ # for {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type}
334
+ # "custom-type-5".
311
335
  #
312
336
  # If this field is set to an invalid value other than these, an
313
337
  # INVALID_ARGUMENT error is returned.
@@ -324,6 +348,9 @@ module Google
324
348
  # Category pages include special pages such as sales or promotions. For
325
349
  # instance, a special sale page may have the category hierarchy:
326
350
  # "pageCategories" : ["Sales > 2017 Black Friday Deals"].
351
+ # @param search_mode [::Google::Cloud::Retail::V2::SearchRequest::SearchMode]
352
+ # The search mode of the search request. If not specified, a single search
353
+ # request triggers both product search and faceted search.
327
354
  #
328
355
  # @yield [response, operation] Access the result along with the RPC operation
329
356
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Retail::V2::SearchResponse::SearchResult>]
@@ -350,9 +377,11 @@ module Google
350
377
  gapic_version: ::Google::Cloud::Retail::V2::VERSION
351
378
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
352
379
 
353
- header_params = {
354
- "placement" => request.placement
355
- }
380
+ header_params = {}
381
+ if request.placement
382
+ header_params["placement"] = request.placement
383
+ end
384
+
356
385
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
357
386
  metadata[:"x-goog-request-params"] ||= request_params_header
358
387
 
@@ -34,8 +34,8 @@ module Google
34
34
  # Service for search.
35
35
  #
36
36
  # This feature is only available for users who have Retail Search enabled.
37
- # Contact Retail Support (retail-search-support@google.com) if you are
38
- # interested in using Retail Search.
37
+ # Please submit a form [here](https://cloud.google.com/contact) to contact
38
+ # cloud sales if you are interested in using Retail Search.
39
39
  #
40
40
  # To load this service and instantiate a client:
41
41
  #