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.
- checksums.yaml +4 -4
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +10 -1
- data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +180 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +10 -1
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +10 -1
- data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +39 -0
- data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +75 -0
- data/lib/google/cloud/retail/v2/control_service/client.rb +10 -1
- data/lib/google/cloud/retail/v2/control_service/rest/client.rb +84 -0
- data/lib/google/cloud/retail/v2/model_service/client.rb +10 -1
- data/lib/google/cloud/retail/v2/model_service/operations.rb +10 -1
- data/lib/google/cloud/retail/v2/model_service/rest/client.rb +146 -0
- data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +75 -0
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +10 -1
- data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +16 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +10 -1
- data/lib/google/cloud/retail/v2/product_service/operations.rb +10 -1
- data/lib/google/cloud/retail/v2/product_service/rest/client.rb +222 -0
- data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +75 -0
- data/lib/google/cloud/retail/v2/search_service/client.rb +10 -1
- data/lib/google/cloud/retail/v2/search_service/rest/client.rb +20 -0
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +10 -1
- data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +116 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +10 -1
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +10 -1
- data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +101 -0
- data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +75 -0
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- metadata +5 -5
@@ -93,7 +93,8 @@ module Google
|
|
93
93
|
credentials: credentials,
|
94
94
|
endpoint: @config.endpoint,
|
95
95
|
channel_args: @config.channel_args,
|
96
|
-
interceptors: @config.interceptors
|
96
|
+
interceptors: @config.interceptors,
|
97
|
+
channel_pool_config: @config.channel_pool
|
97
98
|
)
|
98
99
|
|
99
100
|
# Used by an LRO wrapper for some methods of this service
|
@@ -701,6 +702,14 @@ module Google
|
|
701
702
|
end
|
702
703
|
end
|
703
704
|
|
705
|
+
##
|
706
|
+
# Configuration for the channel pool
|
707
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
708
|
+
#
|
709
|
+
def channel_pool
|
710
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
711
|
+
end
|
712
|
+
|
704
713
|
##
|
705
714
|
# Configuration RPC class for the Operations API.
|
706
715
|
#
|
@@ -212,6 +212,29 @@ module Google
|
|
212
212
|
# @return [::Gapic::Operation]
|
213
213
|
#
|
214
214
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
215
|
+
#
|
216
|
+
# @example Basic example
|
217
|
+
# require "google/cloud/retail/v2"
|
218
|
+
#
|
219
|
+
# # Create a client object. The client can be reused for multiple calls.
|
220
|
+
# client = Google::Cloud::Retail::V2::ModelService::Rest::Client.new
|
221
|
+
#
|
222
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
223
|
+
# request = Google::Cloud::Retail::V2::CreateModelRequest.new
|
224
|
+
#
|
225
|
+
# # Call the create_model method.
|
226
|
+
# result = client.create_model request
|
227
|
+
#
|
228
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
229
|
+
# # check the status of an operation, cancel it, or wait for results.
|
230
|
+
# # Here is how to wait for a response.
|
231
|
+
# result.wait_until_done! timeout: 60
|
232
|
+
# if result.response?
|
233
|
+
# p result.response
|
234
|
+
# else
|
235
|
+
# puts "No response received."
|
236
|
+
# end
|
237
|
+
#
|
215
238
|
def create_model request, options = nil
|
216
239
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
217
240
|
|
@@ -277,6 +300,22 @@ module Google
|
|
277
300
|
# @return [::Google::Cloud::Retail::V2::Model]
|
278
301
|
#
|
279
302
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
303
|
+
#
|
304
|
+
# @example Basic example
|
305
|
+
# require "google/cloud/retail/v2"
|
306
|
+
#
|
307
|
+
# # Create a client object. The client can be reused for multiple calls.
|
308
|
+
# client = Google::Cloud::Retail::V2::ModelService::Rest::Client.new
|
309
|
+
#
|
310
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
311
|
+
# request = Google::Cloud::Retail::V2::GetModelRequest.new
|
312
|
+
#
|
313
|
+
# # Call the get_model method.
|
314
|
+
# result = client.get_model request
|
315
|
+
#
|
316
|
+
# # The returned object is of type Google::Cloud::Retail::V2::Model.
|
317
|
+
# p result
|
318
|
+
#
|
280
319
|
def get_model request, options = nil
|
281
320
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
282
321
|
|
@@ -341,6 +380,22 @@ module Google
|
|
341
380
|
# @return [::Google::Cloud::Retail::V2::Model]
|
342
381
|
#
|
343
382
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
383
|
+
#
|
384
|
+
# @example Basic example
|
385
|
+
# require "google/cloud/retail/v2"
|
386
|
+
#
|
387
|
+
# # Create a client object. The client can be reused for multiple calls.
|
388
|
+
# client = Google::Cloud::Retail::V2::ModelService::Rest::Client.new
|
389
|
+
#
|
390
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
391
|
+
# request = Google::Cloud::Retail::V2::PauseModelRequest.new
|
392
|
+
#
|
393
|
+
# # Call the pause_model method.
|
394
|
+
# result = client.pause_model request
|
395
|
+
#
|
396
|
+
# # The returned object is of type Google::Cloud::Retail::V2::Model.
|
397
|
+
# p result
|
398
|
+
#
|
344
399
|
def pause_model request, options = nil
|
345
400
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
346
401
|
|
@@ -405,6 +460,22 @@ module Google
|
|
405
460
|
# @return [::Google::Cloud::Retail::V2::Model]
|
406
461
|
#
|
407
462
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
463
|
+
#
|
464
|
+
# @example Basic example
|
465
|
+
# require "google/cloud/retail/v2"
|
466
|
+
#
|
467
|
+
# # Create a client object. The client can be reused for multiple calls.
|
468
|
+
# client = Google::Cloud::Retail::V2::ModelService::Rest::Client.new
|
469
|
+
#
|
470
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
471
|
+
# request = Google::Cloud::Retail::V2::ResumeModelRequest.new
|
472
|
+
#
|
473
|
+
# # Call the resume_model method.
|
474
|
+
# result = client.resume_model request
|
475
|
+
#
|
476
|
+
# # The returned object is of type Google::Cloud::Retail::V2::Model.
|
477
|
+
# p result
|
478
|
+
#
|
408
479
|
def resume_model request, options = nil
|
409
480
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
410
481
|
|
@@ -469,6 +540,22 @@ module Google
|
|
469
540
|
# @return [::Google::Protobuf::Empty]
|
470
541
|
#
|
471
542
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
543
|
+
#
|
544
|
+
# @example Basic example
|
545
|
+
# require "google/cloud/retail/v2"
|
546
|
+
#
|
547
|
+
# # Create a client object. The client can be reused for multiple calls.
|
548
|
+
# client = Google::Cloud::Retail::V2::ModelService::Rest::Client.new
|
549
|
+
#
|
550
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
551
|
+
# request = Google::Cloud::Retail::V2::DeleteModelRequest.new
|
552
|
+
#
|
553
|
+
# # Call the delete_model method.
|
554
|
+
# result = client.delete_model request
|
555
|
+
#
|
556
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
557
|
+
# p result
|
558
|
+
#
|
472
559
|
def delete_model request, options = nil
|
473
560
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
474
561
|
|
@@ -539,6 +626,26 @@ module Google
|
|
539
626
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Retail::V2::Model>]
|
540
627
|
#
|
541
628
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
629
|
+
#
|
630
|
+
# @example Basic example
|
631
|
+
# require "google/cloud/retail/v2"
|
632
|
+
#
|
633
|
+
# # Create a client object. The client can be reused for multiple calls.
|
634
|
+
# client = Google::Cloud::Retail::V2::ModelService::Rest::Client.new
|
635
|
+
#
|
636
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
637
|
+
# request = Google::Cloud::Retail::V2::ListModelsRequest.new
|
638
|
+
#
|
639
|
+
# # Call the list_models method.
|
640
|
+
# result = client.list_models request
|
641
|
+
#
|
642
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
643
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
644
|
+
# result.each do |item|
|
645
|
+
# # Each element is of type ::Google::Cloud::Retail::V2::Model.
|
646
|
+
# p item
|
647
|
+
# end
|
648
|
+
#
|
542
649
|
def list_models request, options = nil
|
543
650
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
544
651
|
|
@@ -608,6 +715,22 @@ module Google
|
|
608
715
|
# @return [::Google::Cloud::Retail::V2::Model]
|
609
716
|
#
|
610
717
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
718
|
+
#
|
719
|
+
# @example Basic example
|
720
|
+
# require "google/cloud/retail/v2"
|
721
|
+
#
|
722
|
+
# # Create a client object. The client can be reused for multiple calls.
|
723
|
+
# client = Google::Cloud::Retail::V2::ModelService::Rest::Client.new
|
724
|
+
#
|
725
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
726
|
+
# request = Google::Cloud::Retail::V2::UpdateModelRequest.new
|
727
|
+
#
|
728
|
+
# # Call the update_model method.
|
729
|
+
# result = client.update_model request
|
730
|
+
#
|
731
|
+
# # The returned object is of type Google::Cloud::Retail::V2::Model.
|
732
|
+
# p result
|
733
|
+
#
|
611
734
|
def update_model request, options = nil
|
612
735
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
613
736
|
|
@@ -672,6 +795,29 @@ module Google
|
|
672
795
|
# @return [::Gapic::Operation]
|
673
796
|
#
|
674
797
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
798
|
+
#
|
799
|
+
# @example Basic example
|
800
|
+
# require "google/cloud/retail/v2"
|
801
|
+
#
|
802
|
+
# # Create a client object. The client can be reused for multiple calls.
|
803
|
+
# client = Google::Cloud::Retail::V2::ModelService::Rest::Client.new
|
804
|
+
#
|
805
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
806
|
+
# request = Google::Cloud::Retail::V2::TuneModelRequest.new
|
807
|
+
#
|
808
|
+
# # Call the tune_model method.
|
809
|
+
# result = client.tune_model request
|
810
|
+
#
|
811
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
812
|
+
# # check the status of an operation, cancel it, or wait for results.
|
813
|
+
# # Here is how to wait for a response.
|
814
|
+
# result.wait_until_done! timeout: 60
|
815
|
+
# if result.response?
|
816
|
+
# p result.response
|
817
|
+
# else
|
818
|
+
# puts "No response received."
|
819
|
+
# end
|
820
|
+
#
|
675
821
|
def tune_model request, options = nil
|
676
822
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
677
823
|
|
@@ -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
|
|
@@ -150,7 +150,8 @@ module Google
|
|
150
150
|
credentials: credentials,
|
151
151
|
endpoint: @config.endpoint,
|
152
152
|
channel_args: @config.channel_args,
|
153
|
-
interceptors: @config.interceptors
|
153
|
+
interceptors: @config.interceptors,
|
154
|
+
channel_pool_config: @config.channel_pool
|
154
155
|
)
|
155
156
|
end
|
156
157
|
|
@@ -493,6 +494,14 @@ module Google
|
|
493
494
|
end
|
494
495
|
end
|
495
496
|
|
497
|
+
##
|
498
|
+
# Configuration for the channel pool
|
499
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
500
|
+
#
|
501
|
+
def channel_pool
|
502
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
503
|
+
end
|
504
|
+
|
496
505
|
##
|
497
506
|
# Configuration RPC class for the PredictionService API.
|
498
507
|
#
|
@@ -307,6 +307,22 @@ module Google
|
|
307
307
|
# @return [::Google::Cloud::Retail::V2::PredictResponse]
|
308
308
|
#
|
309
309
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
310
|
+
#
|
311
|
+
# @example Basic example
|
312
|
+
# require "google/cloud/retail/v2"
|
313
|
+
#
|
314
|
+
# # Create a client object. The client can be reused for multiple calls.
|
315
|
+
# client = Google::Cloud::Retail::V2::PredictionService::Rest::Client.new
|
316
|
+
#
|
317
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
318
|
+
# request = Google::Cloud::Retail::V2::PredictRequest.new
|
319
|
+
#
|
320
|
+
# # Call the predict method.
|
321
|
+
# result = client.predict request
|
322
|
+
#
|
323
|
+
# # The returned object is of type Google::Cloud::Retail::V2::PredictResponse.
|
324
|
+
# p result
|
325
|
+
#
|
310
326
|
def predict request, options = nil
|
311
327
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
312
328
|
|
@@ -162,7 +162,8 @@ module Google
|
|
162
162
|
credentials: credentials,
|
163
163
|
endpoint: @config.endpoint,
|
164
164
|
channel_args: @config.channel_args,
|
165
|
-
interceptors: @config.interceptors
|
165
|
+
interceptors: @config.interceptors,
|
166
|
+
channel_pool_config: @config.channel_pool
|
166
167
|
)
|
167
168
|
end
|
168
169
|
|
@@ -1860,6 +1861,14 @@ module Google
|
|
1860
1861
|
end
|
1861
1862
|
end
|
1862
1863
|
|
1864
|
+
##
|
1865
|
+
# Configuration for the channel pool
|
1866
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
1867
|
+
#
|
1868
|
+
def channel_pool
|
1869
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
1870
|
+
end
|
1871
|
+
|
1863
1872
|
##
|
1864
1873
|
# Configuration RPC class for the ProductService API.
|
1865
1874
|
#
|
@@ -93,7 +93,8 @@ module Google
|
|
93
93
|
credentials: credentials,
|
94
94
|
endpoint: @config.endpoint,
|
95
95
|
channel_args: @config.channel_args,
|
96
|
-
interceptors: @config.interceptors
|
96
|
+
interceptors: @config.interceptors,
|
97
|
+
channel_pool_config: @config.channel_pool
|
97
98
|
)
|
98
99
|
|
99
100
|
# Used by an LRO wrapper for some methods of this service
|
@@ -701,6 +702,14 @@ module Google
|
|
701
702
|
end
|
702
703
|
end
|
703
704
|
|
705
|
+
##
|
706
|
+
# Configuration for the channel pool
|
707
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
708
|
+
#
|
709
|
+
def channel_pool
|
710
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
711
|
+
end
|
712
|
+
|
704
713
|
##
|
705
714
|
# Configuration RPC class for the Operations API.
|
706
715
|
#
|