google-cloud-retail-v2 0.16.1 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2/catalog_service/client.rb +10 -1
  3. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +180 -0
  4. data/lib/google/cloud/retail/v2/completion_service/client.rb +10 -1
  5. data/lib/google/cloud/retail/v2/completion_service/operations.rb +10 -1
  6. data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +39 -0
  7. data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +75 -0
  8. data/lib/google/cloud/retail/v2/control_service/client.rb +10 -1
  9. data/lib/google/cloud/retail/v2/control_service/rest/client.rb +84 -0
  10. data/lib/google/cloud/retail/v2/model_service/client.rb +10 -1
  11. data/lib/google/cloud/retail/v2/model_service/operations.rb +10 -1
  12. data/lib/google/cloud/retail/v2/model_service/rest/client.rb +146 -0
  13. data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +75 -0
  14. data/lib/google/cloud/retail/v2/prediction_service/client.rb +10 -1
  15. data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +16 -0
  16. data/lib/google/cloud/retail/v2/product_service/client.rb +10 -1
  17. data/lib/google/cloud/retail/v2/product_service/operations.rb +10 -1
  18. data/lib/google/cloud/retail/v2/product_service/rest/client.rb +222 -0
  19. data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +75 -0
  20. data/lib/google/cloud/retail/v2/search_service/client.rb +10 -1
  21. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +20 -0
  22. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +10 -1
  23. data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +116 -0
  24. data/lib/google/cloud/retail/v2/user_event_service/client.rb +10 -1
  25. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +10 -1
  26. data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +101 -0
  27. data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +75 -0
  28. data/lib/google/cloud/retail/v2/version.rb +1 -1
  29. data/proto_docs/google/api/field_behavior.rb +14 -0
  30. metadata +5 -5
@@ -219,6 +219,22 @@ module Google
219
219
  # @return [::Google::Cloud::Retail::V2::Product]
220
220
  #
221
221
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
222
+ #
223
+ # @example Basic example
224
+ # require "google/cloud/retail/v2"
225
+ #
226
+ # # Create a client object. The client can be reused for multiple calls.
227
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
228
+ #
229
+ # # Create a request. To set request fields, pass in keyword arguments.
230
+ # request = Google::Cloud::Retail::V2::CreateProductRequest.new
231
+ #
232
+ # # Call the create_product method.
233
+ # result = client.create_product request
234
+ #
235
+ # # The returned object is of type Google::Cloud::Retail::V2::Product.
236
+ # p result
237
+ #
222
238
  def create_product request, options = nil
223
239
  raise ::ArgumentError, "request must be provided" if request.nil?
224
240
 
@@ -290,6 +306,22 @@ module Google
290
306
  # @return [::Google::Cloud::Retail::V2::Product]
291
307
  #
292
308
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
309
+ #
310
+ # @example Basic example
311
+ # require "google/cloud/retail/v2"
312
+ #
313
+ # # Create a client object. The client can be reused for multiple calls.
314
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
315
+ #
316
+ # # Create a request. To set request fields, pass in keyword arguments.
317
+ # request = Google::Cloud::Retail::V2::GetProductRequest.new
318
+ #
319
+ # # Call the get_product method.
320
+ # result = client.get_product request
321
+ #
322
+ # # The returned object is of type Google::Cloud::Retail::V2::Product.
323
+ # p result
324
+ #
293
325
  def get_product request, options = nil
294
326
  raise ::ArgumentError, "request must be provided" if request.nil?
295
327
 
@@ -423,6 +455,26 @@ module Google
423
455
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Retail::V2::Product>]
424
456
  #
425
457
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
458
+ #
459
+ # @example Basic example
460
+ # require "google/cloud/retail/v2"
461
+ #
462
+ # # Create a client object. The client can be reused for multiple calls.
463
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
464
+ #
465
+ # # Create a request. To set request fields, pass in keyword arguments.
466
+ # request = Google::Cloud::Retail::V2::ListProductsRequest.new
467
+ #
468
+ # # Call the list_products method.
469
+ # result = client.list_products request
470
+ #
471
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
472
+ # # over elements, and API calls will be issued to fetch pages as needed.
473
+ # result.each do |item|
474
+ # # Each element is of type ::Google::Cloud::Retail::V2::Product.
475
+ # p item
476
+ # end
477
+ #
426
478
  def list_products request, options = nil
427
479
  raise ::ArgumentError, "request must be provided" if request.nil?
428
480
 
@@ -512,6 +564,22 @@ module Google
512
564
  # @return [::Google::Cloud::Retail::V2::Product]
513
565
  #
514
566
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
567
+ #
568
+ # @example Basic example
569
+ # require "google/cloud/retail/v2"
570
+ #
571
+ # # Create a client object. The client can be reused for multiple calls.
572
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
573
+ #
574
+ # # Create a request. To set request fields, pass in keyword arguments.
575
+ # request = Google::Cloud::Retail::V2::UpdateProductRequest.new
576
+ #
577
+ # # Call the update_product method.
578
+ # result = client.update_product request
579
+ #
580
+ # # The returned object is of type Google::Cloud::Retail::V2::Product.
581
+ # p result
582
+ #
515
583
  def update_product request, options = nil
516
584
  raise ::ArgumentError, "request must be provided" if request.nil?
517
585
 
@@ -594,6 +662,22 @@ module Google
594
662
  # @return [::Google::Protobuf::Empty]
595
663
  #
596
664
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
665
+ #
666
+ # @example Basic example
667
+ # require "google/cloud/retail/v2"
668
+ #
669
+ # # Create a client object. The client can be reused for multiple calls.
670
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
671
+ #
672
+ # # Create a request. To set request fields, pass in keyword arguments.
673
+ # request = Google::Cloud::Retail::V2::DeleteProductRequest.new
674
+ #
675
+ # # Call the delete_product method.
676
+ # result = client.delete_product request
677
+ #
678
+ # # The returned object is of type Google::Protobuf::Empty.
679
+ # p result
680
+ #
597
681
  def delete_product request, options = nil
598
682
  raise ::ArgumentError, "request must be provided" if request.nil?
599
683
 
@@ -691,6 +775,29 @@ module Google
691
775
  # @return [::Gapic::Operation]
692
776
  #
693
777
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
778
+ #
779
+ # @example Basic example
780
+ # require "google/cloud/retail/v2"
781
+ #
782
+ # # Create a client object. The client can be reused for multiple calls.
783
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
784
+ #
785
+ # # Create a request. To set request fields, pass in keyword arguments.
786
+ # request = Google::Cloud::Retail::V2::ImportProductsRequest.new
787
+ #
788
+ # # Call the import_products method.
789
+ # result = client.import_products request
790
+ #
791
+ # # The returned object is of type Gapic::Operation. You can use it to
792
+ # # check the status of an operation, cancel it, or wait for results.
793
+ # # Here is how to wait for a response.
794
+ # result.wait_until_done! timeout: 60
795
+ # if result.response?
796
+ # p result.response
797
+ # else
798
+ # puts "No response received."
799
+ # end
800
+ #
694
801
  def import_products request, options = nil
695
802
  raise ::ArgumentError, "request must be provided" if request.nil?
696
803
 
@@ -878,6 +985,29 @@ module Google
878
985
  # @return [::Gapic::Operation]
879
986
  #
880
987
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
988
+ #
989
+ # @example Basic example
990
+ # require "google/cloud/retail/v2"
991
+ #
992
+ # # Create a client object. The client can be reused for multiple calls.
993
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
994
+ #
995
+ # # Create a request. To set request fields, pass in keyword arguments.
996
+ # request = Google::Cloud::Retail::V2::SetInventoryRequest.new
997
+ #
998
+ # # Call the set_inventory method.
999
+ # result = client.set_inventory request
1000
+ #
1001
+ # # The returned object is of type Gapic::Operation. You can use it to
1002
+ # # check the status of an operation, cancel it, or wait for results.
1003
+ # # Here is how to wait for a response.
1004
+ # result.wait_until_done! timeout: 60
1005
+ # if result.response?
1006
+ # p result.response
1007
+ # else
1008
+ # puts "No response received."
1009
+ # end
1010
+ #
881
1011
  def set_inventory request, options = nil
882
1012
  raise ::ArgumentError, "request must be provided" if request.nil?
883
1013
 
@@ -1023,6 +1153,29 @@ module Google
1023
1153
  # @return [::Gapic::Operation]
1024
1154
  #
1025
1155
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1156
+ #
1157
+ # @example Basic example
1158
+ # require "google/cloud/retail/v2"
1159
+ #
1160
+ # # Create a client object. The client can be reused for multiple calls.
1161
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
1162
+ #
1163
+ # # Create a request. To set request fields, pass in keyword arguments.
1164
+ # request = Google::Cloud::Retail::V2::AddFulfillmentPlacesRequest.new
1165
+ #
1166
+ # # Call the add_fulfillment_places method.
1167
+ # result = client.add_fulfillment_places request
1168
+ #
1169
+ # # The returned object is of type Gapic::Operation. You can use it to
1170
+ # # check the status of an operation, cancel it, or wait for results.
1171
+ # # Here is how to wait for a response.
1172
+ # result.wait_until_done! timeout: 60
1173
+ # if result.response?
1174
+ # p result.response
1175
+ # else
1176
+ # puts "No response received."
1177
+ # end
1178
+ #
1026
1179
  def add_fulfillment_places request, options = nil
1027
1180
  raise ::ArgumentError, "request must be provided" if request.nil?
1028
1181
 
@@ -1163,6 +1316,29 @@ module Google
1163
1316
  # @return [::Gapic::Operation]
1164
1317
  #
1165
1318
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1319
+ #
1320
+ # @example Basic example
1321
+ # require "google/cloud/retail/v2"
1322
+ #
1323
+ # # Create a client object. The client can be reused for multiple calls.
1324
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
1325
+ #
1326
+ # # Create a request. To set request fields, pass in keyword arguments.
1327
+ # request = Google::Cloud::Retail::V2::RemoveFulfillmentPlacesRequest.new
1328
+ #
1329
+ # # Call the remove_fulfillment_places method.
1330
+ # result = client.remove_fulfillment_places request
1331
+ #
1332
+ # # The returned object is of type Gapic::Operation. You can use it to
1333
+ # # check the status of an operation, cancel it, or wait for results.
1334
+ # # Here is how to wait for a response.
1335
+ # result.wait_until_done! timeout: 60
1336
+ # if result.response?
1337
+ # p result.response
1338
+ # else
1339
+ # puts "No response received."
1340
+ # end
1341
+ #
1166
1342
  def remove_fulfillment_places request, options = nil
1167
1343
  raise ::ArgumentError, "request must be provided" if request.nil?
1168
1344
 
@@ -1289,6 +1465,29 @@ module Google
1289
1465
  # @return [::Gapic::Operation]
1290
1466
  #
1291
1467
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1468
+ #
1469
+ # @example Basic example
1470
+ # require "google/cloud/retail/v2"
1471
+ #
1472
+ # # Create a client object. The client can be reused for multiple calls.
1473
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
1474
+ #
1475
+ # # Create a request. To set request fields, pass in keyword arguments.
1476
+ # request = Google::Cloud::Retail::V2::AddLocalInventoriesRequest.new
1477
+ #
1478
+ # # Call the add_local_inventories method.
1479
+ # result = client.add_local_inventories request
1480
+ #
1481
+ # # The returned object is of type Gapic::Operation. You can use it to
1482
+ # # check the status of an operation, cancel it, or wait for results.
1483
+ # # Here is how to wait for a response.
1484
+ # result.wait_until_done! timeout: 60
1485
+ # if result.response?
1486
+ # p result.response
1487
+ # else
1488
+ # puts "No response received."
1489
+ # end
1490
+ #
1292
1491
  def add_local_inventories request, options = nil
1293
1492
  raise ::ArgumentError, "request must be provided" if request.nil?
1294
1493
 
@@ -1397,6 +1596,29 @@ module Google
1397
1596
  # @return [::Gapic::Operation]
1398
1597
  #
1399
1598
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1599
+ #
1600
+ # @example Basic example
1601
+ # require "google/cloud/retail/v2"
1602
+ #
1603
+ # # Create a client object. The client can be reused for multiple calls.
1604
+ # client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
1605
+ #
1606
+ # # Create a request. To set request fields, pass in keyword arguments.
1607
+ # request = Google::Cloud::Retail::V2::RemoveLocalInventoriesRequest.new
1608
+ #
1609
+ # # Call the remove_local_inventories method.
1610
+ # result = client.remove_local_inventories request
1611
+ #
1612
+ # # The returned object is of type Gapic::Operation. You can use it to
1613
+ # # check the status of an operation, cancel it, or wait for results.
1614
+ # # Here is how to wait for a response.
1615
+ # result.wait_until_done! timeout: 60
1616
+ # if result.response?
1617
+ # p result.response
1618
+ # else
1619
+ # puts "No response received."
1620
+ # end
1621
+ #
1400
1622
  def remove_local_inventories request, options = nil
1401
1623
  raise ::ArgumentError, "request must be provided" if request.nil?
1402
1624
 
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -153,7 +153,8 @@ module Google
153
153
  credentials: credentials,
154
154
  endpoint: @config.endpoint,
155
155
  channel_args: @config.channel_args,
156
- interceptors: @config.interceptors
156
+ interceptors: @config.interceptors,
157
+ channel_pool_config: @config.channel_pool
157
158
  )
158
159
  end
159
160
 
@@ -614,6 +615,14 @@ module Google
614
615
  end
615
616
  end
616
617
 
618
+ ##
619
+ # Configuration for the channel pool
620
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
621
+ #
622
+ def channel_pool
623
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
624
+ end
625
+
617
626
  ##
618
627
  # Configuration RPC class for the SearchService API.
619
628
  #
@@ -423,6 +423,26 @@ module Google
423
423
  # @return [::Google::Cloud::Retail::V2::SearchResponse]
424
424
  #
425
425
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
426
+ #
427
+ # @example Basic example
428
+ # require "google/cloud/retail/v2"
429
+ #
430
+ # # Create a client object. The client can be reused for multiple calls.
431
+ # client = Google::Cloud::Retail::V2::SearchService::Rest::Client.new
432
+ #
433
+ # # Create a request. To set request fields, pass in keyword arguments.
434
+ # request = Google::Cloud::Retail::V2::SearchRequest.new
435
+ #
436
+ # # Call the search method.
437
+ # result = client.search request
438
+ #
439
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
440
+ # # over elements, and API calls will be issued to fetch pages as needed.
441
+ # result.each do |item|
442
+ # # Each element is of type ::Google::Cloud::Retail::V2::SearchResponse::SearchResult.
443
+ # p item
444
+ # end
445
+ #
426
446
  def search request, options = nil
427
447
  raise ::ArgumentError, "request must be provided" if request.nil?
428
448
 
@@ -145,7 +145,8 @@ module Google
145
145
  credentials: credentials,
146
146
  endpoint: @config.endpoint,
147
147
  channel_args: @config.channel_args,
148
- interceptors: @config.interceptors
148
+ interceptors: @config.interceptors,
149
+ channel_pool_config: @config.channel_pool
149
150
  )
150
151
  end
151
152
 
@@ -929,6 +930,14 @@ module Google
929
930
  end
930
931
  end
931
932
 
933
+ ##
934
+ # Configuration for the channel pool
935
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
936
+ #
937
+ def channel_pool
938
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
939
+ end
940
+
932
941
  ##
933
942
  # Configuration RPC class for the ServingConfigService API.
934
943
  #
@@ -189,6 +189,22 @@ module Google
189
189
  # @return [::Google::Cloud::Retail::V2::ServingConfig]
190
190
  #
191
191
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
192
+ #
193
+ # @example Basic example
194
+ # require "google/cloud/retail/v2"
195
+ #
196
+ # # Create a client object. The client can be reused for multiple calls.
197
+ # client = Google::Cloud::Retail::V2::ServingConfigService::Rest::Client.new
198
+ #
199
+ # # Create a request. To set request fields, pass in keyword arguments.
200
+ # request = Google::Cloud::Retail::V2::CreateServingConfigRequest.new
201
+ #
202
+ # # Call the create_serving_config method.
203
+ # result = client.create_serving_config request
204
+ #
205
+ # # The returned object is of type Google::Cloud::Retail::V2::ServingConfig.
206
+ # p result
207
+ #
192
208
  def create_serving_config request, options = nil
193
209
  raise ::ArgumentError, "request must be provided" if request.nil?
194
210
 
@@ -254,6 +270,22 @@ module Google
254
270
  # @return [::Google::Protobuf::Empty]
255
271
  #
256
272
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
273
+ #
274
+ # @example Basic example
275
+ # require "google/cloud/retail/v2"
276
+ #
277
+ # # Create a client object. The client can be reused for multiple calls.
278
+ # client = Google::Cloud::Retail::V2::ServingConfigService::Rest::Client.new
279
+ #
280
+ # # Create a request. To set request fields, pass in keyword arguments.
281
+ # request = Google::Cloud::Retail::V2::DeleteServingConfigRequest.new
282
+ #
283
+ # # Call the delete_serving_config method.
284
+ # result = client.delete_serving_config request
285
+ #
286
+ # # The returned object is of type Google::Protobuf::Empty.
287
+ # p result
288
+ #
257
289
  def delete_serving_config request, options = nil
258
290
  raise ::ArgumentError, "request must be provided" if request.nil?
259
291
 
@@ -324,6 +356,22 @@ module Google
324
356
  # @return [::Google::Cloud::Retail::V2::ServingConfig]
325
357
  #
326
358
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
359
+ #
360
+ # @example Basic example
361
+ # require "google/cloud/retail/v2"
362
+ #
363
+ # # Create a client object. The client can be reused for multiple calls.
364
+ # client = Google::Cloud::Retail::V2::ServingConfigService::Rest::Client.new
365
+ #
366
+ # # Create a request. To set request fields, pass in keyword arguments.
367
+ # request = Google::Cloud::Retail::V2::UpdateServingConfigRequest.new
368
+ #
369
+ # # Call the update_serving_config method.
370
+ # result = client.update_serving_config request
371
+ #
372
+ # # The returned object is of type Google::Cloud::Retail::V2::ServingConfig.
373
+ # p result
374
+ #
327
375
  def update_serving_config request, options = nil
328
376
  raise ::ArgumentError, "request must be provided" if request.nil?
329
377
 
@@ -389,6 +437,22 @@ module Google
389
437
  # @return [::Google::Cloud::Retail::V2::ServingConfig]
390
438
  #
391
439
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
440
+ #
441
+ # @example Basic example
442
+ # require "google/cloud/retail/v2"
443
+ #
444
+ # # Create a client object. The client can be reused for multiple calls.
445
+ # client = Google::Cloud::Retail::V2::ServingConfigService::Rest::Client.new
446
+ #
447
+ # # Create a request. To set request fields, pass in keyword arguments.
448
+ # request = Google::Cloud::Retail::V2::GetServingConfigRequest.new
449
+ #
450
+ # # Call the get_serving_config method.
451
+ # result = client.get_serving_config request
452
+ #
453
+ # # The returned object is of type Google::Cloud::Retail::V2::ServingConfig.
454
+ # p result
455
+ #
392
456
  def get_serving_config request, options = nil
393
457
  raise ::ArgumentError, "request must be provided" if request.nil?
394
458
 
@@ -459,6 +523,26 @@ module Google
459
523
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Retail::V2::ServingConfig>]
460
524
  #
461
525
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
526
+ #
527
+ # @example Basic example
528
+ # require "google/cloud/retail/v2"
529
+ #
530
+ # # Create a client object. The client can be reused for multiple calls.
531
+ # client = Google::Cloud::Retail::V2::ServingConfigService::Rest::Client.new
532
+ #
533
+ # # Create a request. To set request fields, pass in keyword arguments.
534
+ # request = Google::Cloud::Retail::V2::ListServingConfigsRequest.new
535
+ #
536
+ # # Call the list_serving_configs method.
537
+ # result = client.list_serving_configs request
538
+ #
539
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
540
+ # # over elements, and API calls will be issued to fetch pages as needed.
541
+ # result.each do |item|
542
+ # # Each element is of type ::Google::Cloud::Retail::V2::ServingConfig.
543
+ # p item
544
+ # end
545
+ #
462
546
  def list_serving_configs request, options = nil
463
547
  raise ::ArgumentError, "request must be provided" if request.nil?
464
548
 
@@ -532,6 +616,22 @@ module Google
532
616
  # @return [::Google::Cloud::Retail::V2::ServingConfig]
533
617
  #
534
618
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
619
+ #
620
+ # @example Basic example
621
+ # require "google/cloud/retail/v2"
622
+ #
623
+ # # Create a client object. The client can be reused for multiple calls.
624
+ # client = Google::Cloud::Retail::V2::ServingConfigService::Rest::Client.new
625
+ #
626
+ # # Create a request. To set request fields, pass in keyword arguments.
627
+ # request = Google::Cloud::Retail::V2::AddControlRequest.new
628
+ #
629
+ # # Call the add_control method.
630
+ # result = client.add_control request
631
+ #
632
+ # # The returned object is of type Google::Cloud::Retail::V2::ServingConfig.
633
+ # p result
634
+ #
535
635
  def add_control request, options = nil
536
636
  raise ::ArgumentError, "request must be provided" if request.nil?
537
637
 
@@ -601,6 +701,22 @@ module Google
601
701
  # @return [::Google::Cloud::Retail::V2::ServingConfig]
602
702
  #
603
703
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
704
+ #
705
+ # @example Basic example
706
+ # require "google/cloud/retail/v2"
707
+ #
708
+ # # Create a client object. The client can be reused for multiple calls.
709
+ # client = Google::Cloud::Retail::V2::ServingConfigService::Rest::Client.new
710
+ #
711
+ # # Create a request. To set request fields, pass in keyword arguments.
712
+ # request = Google::Cloud::Retail::V2::RemoveControlRequest.new
713
+ #
714
+ # # Call the remove_control method.
715
+ # result = client.remove_control request
716
+ #
717
+ # # The returned object is of type Google::Cloud::Retail::V2::ServingConfig.
718
+ # p result
719
+ #
604
720
  def remove_control request, options = nil
605
721
  raise ::ArgumentError, "request must be provided" if request.nil?
606
722
 
@@ -166,7 +166,8 @@ module Google
166
166
  credentials: credentials,
167
167
  endpoint: @config.endpoint,
168
168
  channel_args: @config.channel_args,
169
- interceptors: @config.interceptors
169
+ interceptors: @config.interceptors,
170
+ channel_pool_config: @config.channel_pool
170
171
  )
171
172
  end
172
173
 
@@ -844,6 +845,14 @@ module Google
844
845
  end
845
846
  end
846
847
 
848
+ ##
849
+ # Configuration for the channel pool
850
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
851
+ #
852
+ def channel_pool
853
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
854
+ end
855
+
847
856
  ##
848
857
  # Configuration RPC class for the UserEventService API.
849
858
  #