google-cloud-recommendation_engine-v1beta1 0.3.3 → 0.3.7
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.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/client.rb +181 -60
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/operations.rb +145 -33
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/client.rb +104 -48
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/client.rb +58 -40
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/client.rb +165 -56
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/operations.rb +145 -33
- data/lib/google/cloud/recommendation_engine/v1beta1/version.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/catalog_pb.rb +2 -2
- data/lib/google/cloud/recommendationengine/v1beta1/catalog_service_pb.rb +2 -2
- data/lib/google/cloud/recommendationengine/v1beta1/catalog_service_services_pb.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/common_pb.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/import_pb.rb +2 -2
- data/lib/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service_pb.rb +2 -2
- data/lib/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service_services_pb.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/prediction_service_pb.rb +2 -2
- data/lib/google/cloud/recommendationengine/v1beta1/prediction_service_services_pb.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/recommendationengine_resources_pb.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/user_event_pb.rb +2 -2
- data/lib/google/cloud/recommendationengine/v1beta1/user_event_service_pb.rb +2 -2
- data/lib/google/cloud/recommendationengine/v1beta1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/api/httpbody.rb +7 -3
- data/proto_docs/google/api/resource.rb +10 -71
- metadata +5 -5
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all PredictionService clients
|
47
|
+
# ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -99,19 +98,15 @@ module Google
|
|
99
98
|
##
|
100
99
|
# Create a new PredictionService client object.
|
101
100
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# To create a new PredictionService client with the default
|
105
|
-
# configuration:
|
101
|
+
# @example
|
106
102
|
#
|
107
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client.new
|
108
105
|
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
# config.timeout = 10.0
|
114
|
-
# end
|
106
|
+
# # Create a client using a custom configuration
|
107
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
115
110
|
#
|
116
111
|
# @yield [config] Configure the PredictionService client.
|
117
112
|
# @yieldparam config [Client::Configuration]
|
@@ -131,10 +126,9 @@ module Google
|
|
131
126
|
|
132
127
|
# Create credentials
|
133
128
|
credentials = @config.credentials
|
134
|
-
# Use self-signed JWT if the
|
129
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
135
130
|
# but only if the default endpoint does not have a region prefix.
|
136
|
-
enable_self_signed_jwt = @config.
|
137
|
-
@config.endpoint == Client.configure.endpoint &&
|
131
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
138
132
|
!@config.endpoint.split(".").first.include?("-")
|
139
133
|
credentials ||= Credentials.default scope: @config.scope,
|
140
134
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -274,6 +268,27 @@ module Google
|
|
274
268
|
#
|
275
269
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
276
270
|
#
|
271
|
+
# @example Basic example
|
272
|
+
# require "google/cloud/recommendation_engine/v1beta1"
|
273
|
+
#
|
274
|
+
# # Create a client object. The client can be reused for multiple calls.
|
275
|
+
# client = Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client.new
|
276
|
+
#
|
277
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
278
|
+
# request = Google::Cloud::RecommendationEngine::V1beta1::PredictRequest.new
|
279
|
+
#
|
280
|
+
# # Call the predict method.
|
281
|
+
# result = client.predict request
|
282
|
+
#
|
283
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
284
|
+
# # iterate over all elements by calling #each, and the enumerable
|
285
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
286
|
+
# # methods are also available for managing paging directly.
|
287
|
+
# result.each do |response|
|
288
|
+
# # Each element is of type ::Google::Cloud::RecommendationEngine::V1beta1::PredictResponse::PredictionResult.
|
289
|
+
# p response
|
290
|
+
# end
|
291
|
+
#
|
277
292
|
def predict request, options = nil
|
278
293
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
279
294
|
|
@@ -291,16 +306,20 @@ module Google
|
|
291
306
|
gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
|
292
307
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
293
308
|
|
294
|
-
header_params = {
|
295
|
-
|
296
|
-
|
309
|
+
header_params = {}
|
310
|
+
if request.name
|
311
|
+
header_params["name"] = request.name
|
312
|
+
end
|
313
|
+
|
297
314
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
298
315
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
299
316
|
|
300
317
|
options.apply_defaults timeout: @config.rpcs.predict.timeout,
|
301
318
|
metadata: metadata,
|
302
319
|
retry_policy: @config.rpcs.predict.retry_policy
|
303
|
-
|
320
|
+
|
321
|
+
options.apply_defaults timeout: @config.timeout,
|
322
|
+
metadata: @config.metadata,
|
304
323
|
retry_policy: @config.retry_policy
|
305
324
|
|
306
325
|
@prediction_service_stub.call_rpc :predict, request, options: options do |response, operation|
|
@@ -325,22 +344,21 @@ module Google
|
|
325
344
|
# Configuration can be applied globally to all clients, or to a single client
|
326
345
|
# on construction.
|
327
346
|
#
|
328
|
-
#
|
329
|
-
#
|
330
|
-
#
|
331
|
-
# to 20 seconds,
|
332
|
-
#
|
333
|
-
#
|
334
|
-
#
|
335
|
-
#
|
336
|
-
#
|
337
|
-
#
|
338
|
-
#
|
339
|
-
#
|
340
|
-
#
|
341
|
-
#
|
342
|
-
#
|
343
|
-
# end
|
347
|
+
# @example
|
348
|
+
#
|
349
|
+
# # Modify the global config, setting the timeout for
|
350
|
+
# # predict to 20 seconds,
|
351
|
+
# # and all remaining timeouts to 10 seconds.
|
352
|
+
# ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client.configure do |config|
|
353
|
+
# config.timeout = 10.0
|
354
|
+
# config.rpcs.predict.timeout = 20.0
|
355
|
+
# end
|
356
|
+
#
|
357
|
+
# # Apply the above configuration only to a new client.
|
358
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client.new do |config|
|
359
|
+
# config.timeout = 10.0
|
360
|
+
# config.rpcs.predict.timeout = 20.0
|
361
|
+
# end
|
344
362
|
#
|
345
363
|
# @!attribute [rw] endpoint
|
346
364
|
# The hostname or hostname:port of the service endpoint.
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all UserEventService clients
|
47
|
+
# ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -119,19 +118,15 @@ module Google
|
|
119
118
|
##
|
120
119
|
# Create a new UserEventService client object.
|
121
120
|
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
# To create a new UserEventService client with the default
|
125
|
-
# configuration:
|
126
|
-
#
|
127
|
-
# client = ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new
|
121
|
+
# @example
|
128
122
|
#
|
129
|
-
#
|
130
|
-
#
|
123
|
+
# # Create a client using the default configuration
|
124
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new
|
131
125
|
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
126
|
+
# # Create a client using a custom configuration
|
127
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new do |config|
|
128
|
+
# config.timeout = 10.0
|
129
|
+
# end
|
135
130
|
#
|
136
131
|
# @yield [config] Configure the UserEventService client.
|
137
132
|
# @yieldparam config [Client::Configuration]
|
@@ -151,10 +146,9 @@ module Google
|
|
151
146
|
|
152
147
|
# Create credentials
|
153
148
|
credentials = @config.credentials
|
154
|
-
# Use self-signed JWT if the
|
149
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
155
150
|
# but only if the default endpoint does not have a region prefix.
|
156
|
-
enable_self_signed_jwt = @config.
|
157
|
-
@config.endpoint == Client.configure.endpoint &&
|
151
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
158
152
|
!@config.endpoint.split(".").first.include?("-")
|
159
153
|
credentials ||= Credentials.default scope: @config.scope,
|
160
154
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -166,6 +160,7 @@ module Google
|
|
166
160
|
|
167
161
|
@operations_client = Operations.new do |config|
|
168
162
|
config.credentials = credentials
|
163
|
+
config.quota_project = @quota_project_id
|
169
164
|
config.endpoint = @config.endpoint
|
170
165
|
end
|
171
166
|
|
@@ -219,6 +214,21 @@ module Google
|
|
219
214
|
#
|
220
215
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
221
216
|
#
|
217
|
+
# @example Basic example
|
218
|
+
# require "google/cloud/recommendation_engine/v1beta1"
|
219
|
+
#
|
220
|
+
# # Create a client object. The client can be reused for multiple calls.
|
221
|
+
# client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new
|
222
|
+
#
|
223
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
224
|
+
# request = Google::Cloud::RecommendationEngine::V1beta1::WriteUserEventRequest.new
|
225
|
+
#
|
226
|
+
# # Call the write_user_event method.
|
227
|
+
# result = client.write_user_event request
|
228
|
+
#
|
229
|
+
# # The returned object is of type Google::Cloud::RecommendationEngine::V1beta1::UserEvent.
|
230
|
+
# p result
|
231
|
+
#
|
222
232
|
def write_user_event request, options = nil
|
223
233
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
224
234
|
|
@@ -236,16 +246,20 @@ module Google
|
|
236
246
|
gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
|
237
247
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
238
248
|
|
239
|
-
header_params = {
|
240
|
-
|
241
|
-
|
249
|
+
header_params = {}
|
250
|
+
if request.parent
|
251
|
+
header_params["parent"] = request.parent
|
252
|
+
end
|
253
|
+
|
242
254
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
243
255
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
244
256
|
|
245
257
|
options.apply_defaults timeout: @config.rpcs.write_user_event.timeout,
|
246
258
|
metadata: metadata,
|
247
259
|
retry_policy: @config.rpcs.write_user_event.retry_policy
|
248
|
-
|
260
|
+
|
261
|
+
options.apply_defaults timeout: @config.timeout,
|
262
|
+
metadata: @config.metadata,
|
249
263
|
retry_policy: @config.retry_policy
|
250
264
|
|
251
265
|
@user_event_service_stub.call_rpc :write_user_event, request, options: options do |response, operation|
|
@@ -301,6 +315,21 @@ module Google
|
|
301
315
|
#
|
302
316
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
303
317
|
#
|
318
|
+
# @example Basic example
|
319
|
+
# require "google/cloud/recommendation_engine/v1beta1"
|
320
|
+
#
|
321
|
+
# # Create a client object. The client can be reused for multiple calls.
|
322
|
+
# client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new
|
323
|
+
#
|
324
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
325
|
+
# request = Google::Cloud::RecommendationEngine::V1beta1::CollectUserEventRequest.new
|
326
|
+
#
|
327
|
+
# # Call the collect_user_event method.
|
328
|
+
# result = client.collect_user_event request
|
329
|
+
#
|
330
|
+
# # The returned object is of type Google::Api::HttpBody.
|
331
|
+
# p result
|
332
|
+
#
|
304
333
|
def collect_user_event request, options = nil
|
305
334
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
306
335
|
|
@@ -318,16 +347,20 @@ module Google
|
|
318
347
|
gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
|
319
348
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
320
349
|
|
321
|
-
header_params = {
|
322
|
-
|
323
|
-
|
350
|
+
header_params = {}
|
351
|
+
if request.parent
|
352
|
+
header_params["parent"] = request.parent
|
353
|
+
end
|
354
|
+
|
324
355
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
325
356
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
326
357
|
|
327
358
|
options.apply_defaults timeout: @config.rpcs.collect_user_event.timeout,
|
328
359
|
metadata: metadata,
|
329
360
|
retry_policy: @config.rpcs.collect_user_event.retry_policy
|
330
|
-
|
361
|
+
|
362
|
+
options.apply_defaults timeout: @config.timeout,
|
363
|
+
metadata: @config.metadata,
|
331
364
|
retry_policy: @config.retry_policy
|
332
365
|
|
333
366
|
@user_event_service_stub.call_rpc :collect_user_event, request, options: options do |response, operation|
|
@@ -406,6 +439,27 @@ module Google
|
|
406
439
|
#
|
407
440
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
408
441
|
#
|
442
|
+
# @example Basic example
|
443
|
+
# require "google/cloud/recommendation_engine/v1beta1"
|
444
|
+
#
|
445
|
+
# # Create a client object. The client can be reused for multiple calls.
|
446
|
+
# client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new
|
447
|
+
#
|
448
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
449
|
+
# request = Google::Cloud::RecommendationEngine::V1beta1::ListUserEventsRequest.new
|
450
|
+
#
|
451
|
+
# # Call the list_user_events method.
|
452
|
+
# result = client.list_user_events request
|
453
|
+
#
|
454
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
455
|
+
# # iterate over all elements by calling #each, and the enumerable
|
456
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
457
|
+
# # methods are also available for managing paging directly.
|
458
|
+
# result.each do |response|
|
459
|
+
# # Each element is of type ::Google::Cloud::RecommendationEngine::V1beta1::UserEvent.
|
460
|
+
# p response
|
461
|
+
# end
|
462
|
+
#
|
409
463
|
def list_user_events request, options = nil
|
410
464
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
411
465
|
|
@@ -423,16 +477,20 @@ module Google
|
|
423
477
|
gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
|
424
478
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
425
479
|
|
426
|
-
header_params = {
|
427
|
-
|
428
|
-
|
480
|
+
header_params = {}
|
481
|
+
if request.parent
|
482
|
+
header_params["parent"] = request.parent
|
483
|
+
end
|
484
|
+
|
429
485
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
430
486
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
431
487
|
|
432
488
|
options.apply_defaults timeout: @config.rpcs.list_user_events.timeout,
|
433
489
|
metadata: metadata,
|
434
490
|
retry_policy: @config.rpcs.list_user_events.retry_policy
|
435
|
-
|
491
|
+
|
492
|
+
options.apply_defaults timeout: @config.timeout,
|
493
|
+
metadata: @config.metadata,
|
436
494
|
retry_policy: @config.retry_policy
|
437
495
|
|
438
496
|
@user_event_service_stub.call_rpc :list_user_events, request, options: options do |response, operation|
|
@@ -501,6 +559,28 @@ module Google
|
|
501
559
|
#
|
502
560
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
503
561
|
#
|
562
|
+
# @example Basic example
|
563
|
+
# require "google/cloud/recommendation_engine/v1beta1"
|
564
|
+
#
|
565
|
+
# # Create a client object. The client can be reused for multiple calls.
|
566
|
+
# client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new
|
567
|
+
#
|
568
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
569
|
+
# request = Google::Cloud::RecommendationEngine::V1beta1::PurgeUserEventsRequest.new
|
570
|
+
#
|
571
|
+
# # Call the purge_user_events method.
|
572
|
+
# result = client.purge_user_events request
|
573
|
+
#
|
574
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
575
|
+
# # object to check the status of an operation, cancel it, or wait
|
576
|
+
# # for results. Here is how to block until completion:
|
577
|
+
# result.wait_until_done! timeout: 60
|
578
|
+
# if result.response?
|
579
|
+
# p result.response
|
580
|
+
# else
|
581
|
+
# puts "Error!"
|
582
|
+
# end
|
583
|
+
#
|
504
584
|
def purge_user_events request, options = nil
|
505
585
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
506
586
|
|
@@ -518,16 +598,20 @@ module Google
|
|
518
598
|
gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
|
519
599
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
520
600
|
|
521
|
-
header_params = {
|
522
|
-
|
523
|
-
|
601
|
+
header_params = {}
|
602
|
+
if request.parent
|
603
|
+
header_params["parent"] = request.parent
|
604
|
+
end
|
605
|
+
|
524
606
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
525
607
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
526
608
|
|
527
609
|
options.apply_defaults timeout: @config.rpcs.purge_user_events.timeout,
|
528
610
|
metadata: metadata,
|
529
611
|
retry_policy: @config.rpcs.purge_user_events.retry_policy
|
530
|
-
|
612
|
+
|
613
|
+
options.apply_defaults timeout: @config.timeout,
|
614
|
+
metadata: @config.metadata,
|
531
615
|
retry_policy: @config.retry_policy
|
532
616
|
|
533
617
|
@user_event_service_stub.call_rpc :purge_user_events, request, options: options do |response, operation|
|
@@ -586,6 +670,28 @@ module Google
|
|
586
670
|
#
|
587
671
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
588
672
|
#
|
673
|
+
# @example Basic example
|
674
|
+
# require "google/cloud/recommendation_engine/v1beta1"
|
675
|
+
#
|
676
|
+
# # Create a client object. The client can be reused for multiple calls.
|
677
|
+
# client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new
|
678
|
+
#
|
679
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
680
|
+
# request = Google::Cloud::RecommendationEngine::V1beta1::ImportUserEventsRequest.new
|
681
|
+
#
|
682
|
+
# # Call the import_user_events method.
|
683
|
+
# result = client.import_user_events request
|
684
|
+
#
|
685
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
686
|
+
# # object to check the status of an operation, cancel it, or wait
|
687
|
+
# # for results. Here is how to block until completion:
|
688
|
+
# result.wait_until_done! timeout: 60
|
689
|
+
# if result.response?
|
690
|
+
# p result.response
|
691
|
+
# else
|
692
|
+
# puts "Error!"
|
693
|
+
# end
|
694
|
+
#
|
589
695
|
def import_user_events request, options = nil
|
590
696
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
591
697
|
|
@@ -603,16 +709,20 @@ module Google
|
|
603
709
|
gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
|
604
710
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
605
711
|
|
606
|
-
header_params = {
|
607
|
-
|
608
|
-
|
712
|
+
header_params = {}
|
713
|
+
if request.parent
|
714
|
+
header_params["parent"] = request.parent
|
715
|
+
end
|
716
|
+
|
609
717
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
610
718
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
611
719
|
|
612
720
|
options.apply_defaults timeout: @config.rpcs.import_user_events.timeout,
|
613
721
|
metadata: metadata,
|
614
722
|
retry_policy: @config.rpcs.import_user_events.retry_policy
|
615
|
-
|
723
|
+
|
724
|
+
options.apply_defaults timeout: @config.timeout,
|
725
|
+
metadata: @config.metadata,
|
616
726
|
retry_policy: @config.retry_policy
|
617
727
|
|
618
728
|
@user_event_service_stub.call_rpc :import_user_events, request, options: options do |response, operation|
|
@@ -637,22 +747,21 @@ module Google
|
|
637
747
|
# Configuration can be applied globally to all clients, or to a single client
|
638
748
|
# on construction.
|
639
749
|
#
|
640
|
-
#
|
641
|
-
#
|
642
|
-
#
|
643
|
-
# to 20 seconds,
|
644
|
-
#
|
645
|
-
#
|
646
|
-
#
|
647
|
-
#
|
648
|
-
#
|
649
|
-
#
|
650
|
-
#
|
651
|
-
#
|
652
|
-
#
|
653
|
-
#
|
654
|
-
#
|
655
|
-
# end
|
750
|
+
# @example
|
751
|
+
#
|
752
|
+
# # Modify the global config, setting the timeout for
|
753
|
+
# # write_user_event to 20 seconds,
|
754
|
+
# # and all remaining timeouts to 10 seconds.
|
755
|
+
# ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.configure do |config|
|
756
|
+
# config.timeout = 10.0
|
757
|
+
# config.rpcs.write_user_event.timeout = 20.0
|
758
|
+
# end
|
759
|
+
#
|
760
|
+
# # Apply the above configuration only to a new client.
|
761
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new do |config|
|
762
|
+
# config.timeout = 10.0
|
763
|
+
# config.rpcs.write_user_event.timeout = 20.0
|
764
|
+
# end
|
656
765
|
#
|
657
766
|
# @!attribute [rw] endpoint
|
658
767
|
# The hostname or hostname:port of the service endpoint.
|