google-cloud-retail-v2 0.4.1 → 0.4.2
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/lib/google/cloud/retail/v2/catalog_service/client.rb +41 -40
- data/lib/google/cloud/retail/v2/completion_service/client.rb +35 -38
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +30 -21
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +32 -37
- data/lib/google/cloud/retail/v2/product_service/client.rb +56 -45
- data/lib/google/cloud/retail/v2/product_service/operations.rb +30 -21
- data/lib/google/cloud/retail/v2/search_service/client.rb +32 -37
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +44 -41
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +30 -21
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b07d919181d8706e180a703f7cecd52fb464e69cfa4fd0ede43cf5b351a0e88e
|
|
4
|
+
data.tar.gz: 04bee385524f62ef1d40025669309f5d094b228e5ec833805baad6bacd1d2365
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f41c60eb5f15c54e8f4ac41a94be47f87013ece357de71a7699a3b6a8af7ddb0f5d955092c446df68c06ea1aad20d162aca6aa5785680ecf619af408e494a284
|
|
7
|
+
data.tar.gz: 536710d9c52c19162bc9a2effd65d2f7861b1b81a50ad3c659a4b1d4034a9acbfbcdb4a205a4de36df434a338ceb076ee68de0566cc29d259449568d876c557f
|
|
@@ -41,13 +41,12 @@ module Google
|
|
|
41
41
|
# See {::Google::Cloud::Retail::V2::CatalogService::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 CatalogService clients
|
|
47
|
+
# ::Google::Cloud::Retail::V2::CatalogService::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 CatalogService client object.
|
|
101
100
|
#
|
|
102
|
-
#
|
|
103
|
-
#
|
|
104
|
-
# To create a new CatalogService client with the default
|
|
105
|
-
# configuration:
|
|
106
|
-
#
|
|
107
|
-
# client = ::Google::Cloud::Retail::V2::CatalogService::Client.new
|
|
101
|
+
# @example
|
|
108
102
|
#
|
|
109
|
-
#
|
|
110
|
-
#
|
|
103
|
+
# # Create a client using the default configuration
|
|
104
|
+
# client = ::Google::Cloud::Retail::V2::CatalogService::Client.new
|
|
111
105
|
#
|
|
112
|
-
#
|
|
113
|
-
#
|
|
114
|
-
#
|
|
106
|
+
# # Create a client using a custom configuration
|
|
107
|
+
# client = ::Google::Cloud::Retail::V2::CatalogService::Client.new do |config|
|
|
108
|
+
# config.timeout = 10.0
|
|
109
|
+
# end
|
|
115
110
|
#
|
|
116
111
|
# @yield [config] Configure the CatalogService 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
|
|
@@ -233,7 +227,9 @@ module Google
|
|
|
233
227
|
options.apply_defaults timeout: @config.rpcs.list_catalogs.timeout,
|
|
234
228
|
metadata: metadata,
|
|
235
229
|
retry_policy: @config.rpcs.list_catalogs.retry_policy
|
|
236
|
-
|
|
230
|
+
|
|
231
|
+
options.apply_defaults timeout: @config.timeout,
|
|
232
|
+
metadata: @config.metadata,
|
|
237
233
|
retry_policy: @config.retry_policy
|
|
238
234
|
|
|
239
235
|
@catalog_service_stub.call_rpc :list_catalogs, request, options: options do |response, operation|
|
|
@@ -313,7 +309,9 @@ module Google
|
|
|
313
309
|
options.apply_defaults timeout: @config.rpcs.update_catalog.timeout,
|
|
314
310
|
metadata: metadata,
|
|
315
311
|
retry_policy: @config.rpcs.update_catalog.retry_policy
|
|
316
|
-
|
|
312
|
+
|
|
313
|
+
options.apply_defaults timeout: @config.timeout,
|
|
314
|
+
metadata: @config.metadata,
|
|
317
315
|
retry_policy: @config.retry_policy
|
|
318
316
|
|
|
319
317
|
@catalog_service_stub.call_rpc :update_catalog, request, options: options do |response, operation|
|
|
@@ -428,7 +426,9 @@ module Google
|
|
|
428
426
|
options.apply_defaults timeout: @config.rpcs.set_default_branch.timeout,
|
|
429
427
|
metadata: metadata,
|
|
430
428
|
retry_policy: @config.rpcs.set_default_branch.retry_policy
|
|
431
|
-
|
|
429
|
+
|
|
430
|
+
options.apply_defaults timeout: @config.timeout,
|
|
431
|
+
metadata: @config.metadata,
|
|
432
432
|
retry_policy: @config.retry_policy
|
|
433
433
|
|
|
434
434
|
@catalog_service_stub.call_rpc :set_default_branch, request, options: options do |response, operation|
|
|
@@ -501,7 +501,9 @@ module Google
|
|
|
501
501
|
options.apply_defaults timeout: @config.rpcs.get_default_branch.timeout,
|
|
502
502
|
metadata: metadata,
|
|
503
503
|
retry_policy: @config.rpcs.get_default_branch.retry_policy
|
|
504
|
-
|
|
504
|
+
|
|
505
|
+
options.apply_defaults timeout: @config.timeout,
|
|
506
|
+
metadata: @config.metadata,
|
|
505
507
|
retry_policy: @config.retry_policy
|
|
506
508
|
|
|
507
509
|
@catalog_service_stub.call_rpc :get_default_branch, request, options: options do |response, operation|
|
|
@@ -525,22 +527,21 @@ module Google
|
|
|
525
527
|
# Configuration can be applied globally to all clients, or to a single client
|
|
526
528
|
# on construction.
|
|
527
529
|
#
|
|
528
|
-
#
|
|
529
|
-
#
|
|
530
|
-
#
|
|
531
|
-
# to 20 seconds,
|
|
532
|
-
#
|
|
533
|
-
#
|
|
534
|
-
#
|
|
535
|
-
#
|
|
536
|
-
#
|
|
537
|
-
#
|
|
538
|
-
#
|
|
539
|
-
#
|
|
540
|
-
#
|
|
541
|
-
#
|
|
542
|
-
#
|
|
543
|
-
# end
|
|
530
|
+
# @example
|
|
531
|
+
#
|
|
532
|
+
# # Modify the global config, setting the timeout for
|
|
533
|
+
# # list_catalogs to 20 seconds,
|
|
534
|
+
# # and all remaining timeouts to 10 seconds.
|
|
535
|
+
# ::Google::Cloud::Retail::V2::CatalogService::Client.configure do |config|
|
|
536
|
+
# config.timeout = 10.0
|
|
537
|
+
# config.rpcs.list_catalogs.timeout = 20.0
|
|
538
|
+
# end
|
|
539
|
+
#
|
|
540
|
+
# # Apply the above configuration only to a new client.
|
|
541
|
+
# client = ::Google::Cloud::Retail::V2::CatalogService::Client.new do |config|
|
|
542
|
+
# config.timeout = 10.0
|
|
543
|
+
# config.rpcs.list_catalogs.timeout = 20.0
|
|
544
|
+
# end
|
|
544
545
|
#
|
|
545
546
|
# @!attribute [rw] endpoint
|
|
546
547
|
# The hostname or hostname:port of the service endpoint.
|
|
@@ -45,13 +45,12 @@ module Google
|
|
|
45
45
|
# See {::Google::Cloud::Retail::V2::CompletionService::Client::Configuration}
|
|
46
46
|
# for a description of the configuration fields.
|
|
47
47
|
#
|
|
48
|
-
#
|
|
48
|
+
# @example
|
|
49
49
|
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
# end
|
|
50
|
+
# # Modify the configuration for all CompletionService clients
|
|
51
|
+
# ::Google::Cloud::Retail::V2::CompletionService::Client.configure do |config|
|
|
52
|
+
# config.timeout = 10.0
|
|
53
|
+
# end
|
|
55
54
|
#
|
|
56
55
|
# @yield [config] Configure the Client client.
|
|
57
56
|
# @yieldparam config [Client::Configuration]
|
|
@@ -103,19 +102,15 @@ module Google
|
|
|
103
102
|
##
|
|
104
103
|
# Create a new CompletionService client object.
|
|
105
104
|
#
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
# To create a new CompletionService client with the default
|
|
109
|
-
# configuration:
|
|
110
|
-
#
|
|
111
|
-
# client = ::Google::Cloud::Retail::V2::CompletionService::Client.new
|
|
105
|
+
# @example
|
|
112
106
|
#
|
|
113
|
-
#
|
|
114
|
-
#
|
|
107
|
+
# # Create a client using the default configuration
|
|
108
|
+
# client = ::Google::Cloud::Retail::V2::CompletionService::Client.new
|
|
115
109
|
#
|
|
116
|
-
#
|
|
117
|
-
#
|
|
118
|
-
#
|
|
110
|
+
# # Create a client using a custom configuration
|
|
111
|
+
# client = ::Google::Cloud::Retail::V2::CompletionService::Client.new do |config|
|
|
112
|
+
# config.timeout = 10.0
|
|
113
|
+
# end
|
|
119
114
|
#
|
|
120
115
|
# @yield [config] Configure the CompletionService client.
|
|
121
116
|
# @yieldparam config [Client::Configuration]
|
|
@@ -135,10 +130,9 @@ module Google
|
|
|
135
130
|
|
|
136
131
|
# Create credentials
|
|
137
132
|
credentials = @config.credentials
|
|
138
|
-
# Use self-signed JWT if the
|
|
133
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
139
134
|
# but only if the default endpoint does not have a region prefix.
|
|
140
|
-
enable_self_signed_jwt = @config.
|
|
141
|
-
@config.endpoint == Client.configure.endpoint &&
|
|
135
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
|
142
136
|
!@config.endpoint.split(".").first.include?("-")
|
|
143
137
|
credentials ||= Credentials.default scope: @config.scope,
|
|
144
138
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
@@ -286,7 +280,9 @@ module Google
|
|
|
286
280
|
options.apply_defaults timeout: @config.rpcs.complete_query.timeout,
|
|
287
281
|
metadata: metadata,
|
|
288
282
|
retry_policy: @config.rpcs.complete_query.retry_policy
|
|
289
|
-
|
|
283
|
+
|
|
284
|
+
options.apply_defaults timeout: @config.timeout,
|
|
285
|
+
metadata: @config.metadata,
|
|
290
286
|
retry_policy: @config.retry_policy
|
|
291
287
|
|
|
292
288
|
@completion_service_stub.call_rpc :complete_query, request, options: options do |response, operation|
|
|
@@ -368,7 +364,9 @@ module Google
|
|
|
368
364
|
options.apply_defaults timeout: @config.rpcs.import_completion_data.timeout,
|
|
369
365
|
metadata: metadata,
|
|
370
366
|
retry_policy: @config.rpcs.import_completion_data.retry_policy
|
|
371
|
-
|
|
367
|
+
|
|
368
|
+
options.apply_defaults timeout: @config.timeout,
|
|
369
|
+
metadata: @config.metadata,
|
|
372
370
|
retry_policy: @config.retry_policy
|
|
373
371
|
|
|
374
372
|
@completion_service_stub.call_rpc :import_completion_data, request, options: options do |response, operation|
|
|
@@ -393,22 +391,21 @@ module Google
|
|
|
393
391
|
# Configuration can be applied globally to all clients, or to a single client
|
|
394
392
|
# on construction.
|
|
395
393
|
#
|
|
396
|
-
#
|
|
397
|
-
#
|
|
398
|
-
#
|
|
399
|
-
# to 20 seconds,
|
|
400
|
-
#
|
|
401
|
-
#
|
|
402
|
-
#
|
|
403
|
-
#
|
|
404
|
-
#
|
|
405
|
-
#
|
|
406
|
-
#
|
|
407
|
-
#
|
|
408
|
-
#
|
|
409
|
-
#
|
|
410
|
-
#
|
|
411
|
-
# end
|
|
394
|
+
# @example
|
|
395
|
+
#
|
|
396
|
+
# # Modify the global config, setting the timeout for
|
|
397
|
+
# # complete_query to 20 seconds,
|
|
398
|
+
# # and all remaining timeouts to 10 seconds.
|
|
399
|
+
# ::Google::Cloud::Retail::V2::CompletionService::Client.configure do |config|
|
|
400
|
+
# config.timeout = 10.0
|
|
401
|
+
# config.rpcs.complete_query.timeout = 20.0
|
|
402
|
+
# end
|
|
403
|
+
#
|
|
404
|
+
# # Apply the above configuration only to a new client.
|
|
405
|
+
# client = ::Google::Cloud::Retail::V2::CompletionService::Client.new do |config|
|
|
406
|
+
# config.timeout = 10.0
|
|
407
|
+
# config.rpcs.complete_query.timeout = 20.0
|
|
408
|
+
# end
|
|
412
409
|
#
|
|
413
410
|
# @!attribute [rw] endpoint
|
|
414
411
|
# The hostname or hostname:port of the service endpoint.
|
|
@@ -169,7 +169,9 @@ module Google
|
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
|
170
170
|
metadata: metadata,
|
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
|
172
|
-
|
|
172
|
+
|
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
|
174
|
+
metadata: @config.metadata,
|
|
173
175
|
retry_policy: @config.retry_policy
|
|
174
176
|
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
|
@@ -239,7 +241,9 @@ module Google
|
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
|
240
242
|
metadata: metadata,
|
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
|
242
|
-
|
|
244
|
+
|
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
|
246
|
+
metadata: @config.metadata,
|
|
243
247
|
retry_policy: @config.retry_policy
|
|
244
248
|
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
|
@@ -309,7 +313,9 @@ module Google
|
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
|
310
314
|
metadata: metadata,
|
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
|
312
|
-
|
|
316
|
+
|
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
|
318
|
+
metadata: @config.metadata,
|
|
313
319
|
retry_policy: @config.retry_policy
|
|
314
320
|
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
|
@@ -384,7 +390,9 @@ module Google
|
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
|
385
391
|
metadata: metadata,
|
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
|
387
|
-
|
|
393
|
+
|
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
|
395
|
+
metadata: @config.metadata,
|
|
388
396
|
retry_policy: @config.retry_policy
|
|
389
397
|
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
|
@@ -456,7 +464,9 @@ module Google
|
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
|
457
465
|
metadata: metadata,
|
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
|
459
|
-
|
|
467
|
+
|
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
|
469
|
+
metadata: @config.metadata,
|
|
460
470
|
retry_policy: @config.retry_policy
|
|
461
471
|
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
|
@@ -481,22 +491,21 @@ module Google
|
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
|
482
492
|
# on construction.
|
|
483
493
|
#
|
|
484
|
-
#
|
|
485
|
-
#
|
|
486
|
-
#
|
|
487
|
-
# to 20 seconds,
|
|
488
|
-
#
|
|
489
|
-
#
|
|
490
|
-
#
|
|
491
|
-
#
|
|
492
|
-
#
|
|
493
|
-
#
|
|
494
|
-
#
|
|
495
|
-
#
|
|
496
|
-
#
|
|
497
|
-
#
|
|
498
|
-
#
|
|
499
|
-
# end
|
|
494
|
+
# @example
|
|
495
|
+
#
|
|
496
|
+
# # Modify the global config, setting the timeout for
|
|
497
|
+
# # list_operations to 20 seconds,
|
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
|
500
|
+
# config.timeout = 10.0
|
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
|
502
|
+
# end
|
|
503
|
+
#
|
|
504
|
+
# # Apply the above configuration only to a new client.
|
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
506
|
+
# config.timeout = 10.0
|
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
|
508
|
+
# end
|
|
500
509
|
#
|
|
501
510
|
# @!attribute [rw] endpoint
|
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
|
@@ -41,13 +41,12 @@ module Google
|
|
|
41
41
|
# See {::Google::Cloud::Retail::V2::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::Retail::V2::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::Retail::V2::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::Retail::V2::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
|
|
@@ -306,7 +300,9 @@ module Google
|
|
|
306
300
|
options.apply_defaults timeout: @config.rpcs.predict.timeout,
|
|
307
301
|
metadata: metadata,
|
|
308
302
|
retry_policy: @config.rpcs.predict.retry_policy
|
|
309
|
-
|
|
303
|
+
|
|
304
|
+
options.apply_defaults timeout: @config.timeout,
|
|
305
|
+
metadata: @config.metadata,
|
|
310
306
|
retry_policy: @config.retry_policy
|
|
311
307
|
|
|
312
308
|
@prediction_service_stub.call_rpc :predict, request, options: options do |response, operation|
|
|
@@ -330,22 +326,21 @@ module Google
|
|
|
330
326
|
# Configuration can be applied globally to all clients, or to a single client
|
|
331
327
|
# on construction.
|
|
332
328
|
#
|
|
333
|
-
#
|
|
334
|
-
#
|
|
335
|
-
#
|
|
336
|
-
# to 20 seconds,
|
|
337
|
-
#
|
|
338
|
-
#
|
|
339
|
-
#
|
|
340
|
-
#
|
|
341
|
-
#
|
|
342
|
-
#
|
|
343
|
-
#
|
|
344
|
-
#
|
|
345
|
-
#
|
|
346
|
-
#
|
|
347
|
-
#
|
|
348
|
-
# end
|
|
329
|
+
# @example
|
|
330
|
+
#
|
|
331
|
+
# # Modify the global config, setting the timeout for
|
|
332
|
+
# # predict to 20 seconds,
|
|
333
|
+
# # and all remaining timeouts to 10 seconds.
|
|
334
|
+
# ::Google::Cloud::Retail::V2::PredictionService::Client.configure do |config|
|
|
335
|
+
# config.timeout = 10.0
|
|
336
|
+
# config.rpcs.predict.timeout = 20.0
|
|
337
|
+
# end
|
|
338
|
+
#
|
|
339
|
+
# # Apply the above configuration only to a new client.
|
|
340
|
+
# client = ::Google::Cloud::Retail::V2::PredictionService::Client.new do |config|
|
|
341
|
+
# config.timeout = 10.0
|
|
342
|
+
# config.rpcs.predict.timeout = 20.0
|
|
343
|
+
# end
|
|
349
344
|
#
|
|
350
345
|
# @!attribute [rw] endpoint
|
|
351
346
|
# The hostname or hostname:port of the service endpoint.
|
|
@@ -42,13 +42,12 @@ module Google
|
|
|
42
42
|
# See {::Google::Cloud::Retail::V2::ProductService::Client::Configuration}
|
|
43
43
|
# for a description of the configuration fields.
|
|
44
44
|
#
|
|
45
|
-
#
|
|
45
|
+
# @example
|
|
46
46
|
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# end
|
|
47
|
+
# # Modify the configuration for all ProductService clients
|
|
48
|
+
# ::Google::Cloud::Retail::V2::ProductService::Client.configure do |config|
|
|
49
|
+
# config.timeout = 10.0
|
|
50
|
+
# end
|
|
52
51
|
#
|
|
53
52
|
# @yield [config] Configure the Client client.
|
|
54
53
|
# @yieldparam config [Client::Configuration]
|
|
@@ -100,19 +99,15 @@ module Google
|
|
|
100
99
|
##
|
|
101
100
|
# Create a new ProductService client object.
|
|
102
101
|
#
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
# To create a new ProductService client with the default
|
|
106
|
-
# configuration:
|
|
102
|
+
# @example
|
|
107
103
|
#
|
|
108
|
-
#
|
|
104
|
+
# # Create a client using the default configuration
|
|
105
|
+
# client = ::Google::Cloud::Retail::V2::ProductService::Client.new
|
|
109
106
|
#
|
|
110
|
-
#
|
|
111
|
-
#
|
|
112
|
-
#
|
|
113
|
-
#
|
|
114
|
-
# config.timeout = 10.0
|
|
115
|
-
# end
|
|
107
|
+
# # Create a client using a custom configuration
|
|
108
|
+
# client = ::Google::Cloud::Retail::V2::ProductService::Client.new do |config|
|
|
109
|
+
# config.timeout = 10.0
|
|
110
|
+
# end
|
|
116
111
|
#
|
|
117
112
|
# @yield [config] Configure the ProductService client.
|
|
118
113
|
# @yieldparam config [Client::Configuration]
|
|
@@ -132,10 +127,9 @@ module Google
|
|
|
132
127
|
|
|
133
128
|
# Create credentials
|
|
134
129
|
credentials = @config.credentials
|
|
135
|
-
# Use self-signed JWT if the
|
|
130
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
136
131
|
# but only if the default endpoint does not have a region prefix.
|
|
137
|
-
enable_self_signed_jwt = @config.
|
|
138
|
-
@config.endpoint == Client.configure.endpoint &&
|
|
132
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
|
139
133
|
!@config.endpoint.split(".").first.include?("-")
|
|
140
134
|
credentials ||= Credentials.default scope: @config.scope,
|
|
141
135
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
@@ -242,7 +236,9 @@ module Google
|
|
|
242
236
|
options.apply_defaults timeout: @config.rpcs.create_product.timeout,
|
|
243
237
|
metadata: metadata,
|
|
244
238
|
retry_policy: @config.rpcs.create_product.retry_policy
|
|
245
|
-
|
|
239
|
+
|
|
240
|
+
options.apply_defaults timeout: @config.timeout,
|
|
241
|
+
metadata: @config.metadata,
|
|
246
242
|
retry_policy: @config.retry_policy
|
|
247
243
|
|
|
248
244
|
@product_service_stub.call_rpc :create_product, request, options: options do |response, operation|
|
|
@@ -317,7 +313,9 @@ module Google
|
|
|
317
313
|
options.apply_defaults timeout: @config.rpcs.get_product.timeout,
|
|
318
314
|
metadata: metadata,
|
|
319
315
|
retry_policy: @config.rpcs.get_product.retry_policy
|
|
320
|
-
|
|
316
|
+
|
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
|
318
|
+
metadata: @config.metadata,
|
|
321
319
|
retry_policy: @config.retry_policy
|
|
322
320
|
|
|
323
321
|
@product_service_stub.call_rpc :get_product, request, options: options do |response, operation|
|
|
@@ -454,7 +452,9 @@ module Google
|
|
|
454
452
|
options.apply_defaults timeout: @config.rpcs.list_products.timeout,
|
|
455
453
|
metadata: metadata,
|
|
456
454
|
retry_policy: @config.rpcs.list_products.retry_policy
|
|
457
|
-
|
|
455
|
+
|
|
456
|
+
options.apply_defaults timeout: @config.timeout,
|
|
457
|
+
metadata: @config.metadata,
|
|
458
458
|
retry_policy: @config.retry_policy
|
|
459
459
|
|
|
460
460
|
@product_service_stub.call_rpc :list_products, request, options: options do |response, operation|
|
|
@@ -542,7 +542,9 @@ module Google
|
|
|
542
542
|
options.apply_defaults timeout: @config.rpcs.update_product.timeout,
|
|
543
543
|
metadata: metadata,
|
|
544
544
|
retry_policy: @config.rpcs.update_product.retry_policy
|
|
545
|
-
|
|
545
|
+
|
|
546
|
+
options.apply_defaults timeout: @config.timeout,
|
|
547
|
+
metadata: @config.metadata,
|
|
546
548
|
retry_policy: @config.retry_policy
|
|
547
549
|
|
|
548
550
|
@product_service_stub.call_rpc :update_product, request, options: options do |response, operation|
|
|
@@ -628,7 +630,9 @@ module Google
|
|
|
628
630
|
options.apply_defaults timeout: @config.rpcs.delete_product.timeout,
|
|
629
631
|
metadata: metadata,
|
|
630
632
|
retry_policy: @config.rpcs.delete_product.retry_policy
|
|
631
|
-
|
|
633
|
+
|
|
634
|
+
options.apply_defaults timeout: @config.timeout,
|
|
635
|
+
metadata: @config.metadata,
|
|
632
636
|
retry_policy: @config.retry_policy
|
|
633
637
|
|
|
634
638
|
@product_service_stub.call_rpc :delete_product, request, options: options do |response, operation|
|
|
@@ -735,7 +739,9 @@ module Google
|
|
|
735
739
|
options.apply_defaults timeout: @config.rpcs.import_products.timeout,
|
|
736
740
|
metadata: metadata,
|
|
737
741
|
retry_policy: @config.rpcs.import_products.retry_policy
|
|
738
|
-
|
|
742
|
+
|
|
743
|
+
options.apply_defaults timeout: @config.timeout,
|
|
744
|
+
metadata: @config.metadata,
|
|
739
745
|
retry_policy: @config.retry_policy
|
|
740
746
|
|
|
741
747
|
@product_service_stub.call_rpc :import_products, request, options: options do |response, operation|
|
|
@@ -893,7 +899,9 @@ module Google
|
|
|
893
899
|
options.apply_defaults timeout: @config.rpcs.set_inventory.timeout,
|
|
894
900
|
metadata: metadata,
|
|
895
901
|
retry_policy: @config.rpcs.set_inventory.retry_policy
|
|
896
|
-
|
|
902
|
+
|
|
903
|
+
options.apply_defaults timeout: @config.timeout,
|
|
904
|
+
metadata: @config.metadata,
|
|
897
905
|
retry_policy: @config.retry_policy
|
|
898
906
|
|
|
899
907
|
@product_service_stub.call_rpc :set_inventory, request, options: options do |response, operation|
|
|
@@ -1027,7 +1035,9 @@ module Google
|
|
|
1027
1035
|
options.apply_defaults timeout: @config.rpcs.add_fulfillment_places.timeout,
|
|
1028
1036
|
metadata: metadata,
|
|
1029
1037
|
retry_policy: @config.rpcs.add_fulfillment_places.retry_policy
|
|
1030
|
-
|
|
1038
|
+
|
|
1039
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1040
|
+
metadata: @config.metadata,
|
|
1031
1041
|
retry_policy: @config.retry_policy
|
|
1032
1042
|
|
|
1033
1043
|
@product_service_stub.call_rpc :add_fulfillment_places, request, options: options do |response, operation|
|
|
@@ -1156,7 +1166,9 @@ module Google
|
|
|
1156
1166
|
options.apply_defaults timeout: @config.rpcs.remove_fulfillment_places.timeout,
|
|
1157
1167
|
metadata: metadata,
|
|
1158
1168
|
retry_policy: @config.rpcs.remove_fulfillment_places.retry_policy
|
|
1159
|
-
|
|
1169
|
+
|
|
1170
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1171
|
+
metadata: @config.metadata,
|
|
1160
1172
|
retry_policy: @config.retry_policy
|
|
1161
1173
|
|
|
1162
1174
|
@product_service_stub.call_rpc :remove_fulfillment_places, request, options: options do |response, operation|
|
|
@@ -1181,22 +1193,21 @@ module Google
|
|
|
1181
1193
|
# Configuration can be applied globally to all clients, or to a single client
|
|
1182
1194
|
# on construction.
|
|
1183
1195
|
#
|
|
1184
|
-
#
|
|
1185
|
-
#
|
|
1186
|
-
#
|
|
1187
|
-
# to 20 seconds,
|
|
1188
|
-
#
|
|
1189
|
-
#
|
|
1190
|
-
#
|
|
1191
|
-
#
|
|
1192
|
-
#
|
|
1193
|
-
#
|
|
1194
|
-
#
|
|
1195
|
-
#
|
|
1196
|
-
#
|
|
1197
|
-
#
|
|
1198
|
-
#
|
|
1199
|
-
# end
|
|
1196
|
+
# @example
|
|
1197
|
+
#
|
|
1198
|
+
# # Modify the global config, setting the timeout for
|
|
1199
|
+
# # create_product to 20 seconds,
|
|
1200
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1201
|
+
# ::Google::Cloud::Retail::V2::ProductService::Client.configure do |config|
|
|
1202
|
+
# config.timeout = 10.0
|
|
1203
|
+
# config.rpcs.create_product.timeout = 20.0
|
|
1204
|
+
# end
|
|
1205
|
+
#
|
|
1206
|
+
# # Apply the above configuration only to a new client.
|
|
1207
|
+
# client = ::Google::Cloud::Retail::V2::ProductService::Client.new do |config|
|
|
1208
|
+
# config.timeout = 10.0
|
|
1209
|
+
# config.rpcs.create_product.timeout = 20.0
|
|
1210
|
+
# end
|
|
1200
1211
|
#
|
|
1201
1212
|
# @!attribute [rw] endpoint
|
|
1202
1213
|
# The hostname or hostname:port of the service endpoint.
|
|
@@ -169,7 +169,9 @@ module Google
|
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
|
170
170
|
metadata: metadata,
|
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
|
172
|
-
|
|
172
|
+
|
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
|
174
|
+
metadata: @config.metadata,
|
|
173
175
|
retry_policy: @config.retry_policy
|
|
174
176
|
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
|
@@ -239,7 +241,9 @@ module Google
|
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
|
240
242
|
metadata: metadata,
|
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
|
242
|
-
|
|
244
|
+
|
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
|
246
|
+
metadata: @config.metadata,
|
|
243
247
|
retry_policy: @config.retry_policy
|
|
244
248
|
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
|
@@ -309,7 +313,9 @@ module Google
|
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
|
310
314
|
metadata: metadata,
|
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
|
312
|
-
|
|
316
|
+
|
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
|
318
|
+
metadata: @config.metadata,
|
|
313
319
|
retry_policy: @config.retry_policy
|
|
314
320
|
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
|
@@ -384,7 +390,9 @@ module Google
|
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
|
385
391
|
metadata: metadata,
|
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
|
387
|
-
|
|
393
|
+
|
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
|
395
|
+
metadata: @config.metadata,
|
|
388
396
|
retry_policy: @config.retry_policy
|
|
389
397
|
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
|
@@ -456,7 +464,9 @@ module Google
|
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
|
457
465
|
metadata: metadata,
|
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
|
459
|
-
|
|
467
|
+
|
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
|
469
|
+
metadata: @config.metadata,
|
|
460
470
|
retry_policy: @config.retry_policy
|
|
461
471
|
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
|
@@ -481,22 +491,21 @@ module Google
|
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
|
482
492
|
# on construction.
|
|
483
493
|
#
|
|
484
|
-
#
|
|
485
|
-
#
|
|
486
|
-
#
|
|
487
|
-
# to 20 seconds,
|
|
488
|
-
#
|
|
489
|
-
#
|
|
490
|
-
#
|
|
491
|
-
#
|
|
492
|
-
#
|
|
493
|
-
#
|
|
494
|
-
#
|
|
495
|
-
#
|
|
496
|
-
#
|
|
497
|
-
#
|
|
498
|
-
#
|
|
499
|
-
# end
|
|
494
|
+
# @example
|
|
495
|
+
#
|
|
496
|
+
# # Modify the global config, setting the timeout for
|
|
497
|
+
# # list_operations to 20 seconds,
|
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
|
500
|
+
# config.timeout = 10.0
|
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
|
502
|
+
# end
|
|
503
|
+
#
|
|
504
|
+
# # Apply the above configuration only to a new client.
|
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
506
|
+
# config.timeout = 10.0
|
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
|
508
|
+
# end
|
|
500
509
|
#
|
|
501
510
|
# @!attribute [rw] endpoint
|
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
|
@@ -45,13 +45,12 @@ module Google
|
|
|
45
45
|
# See {::Google::Cloud::Retail::V2::SearchService::Client::Configuration}
|
|
46
46
|
# for a description of the configuration fields.
|
|
47
47
|
#
|
|
48
|
-
#
|
|
48
|
+
# @example
|
|
49
49
|
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
# end
|
|
50
|
+
# # Modify the configuration for all SearchService clients
|
|
51
|
+
# ::Google::Cloud::Retail::V2::SearchService::Client.configure do |config|
|
|
52
|
+
# config.timeout = 10.0
|
|
53
|
+
# end
|
|
55
54
|
#
|
|
56
55
|
# @yield [config] Configure the Client client.
|
|
57
56
|
# @yieldparam config [Client::Configuration]
|
|
@@ -103,19 +102,15 @@ module Google
|
|
|
103
102
|
##
|
|
104
103
|
# Create a new SearchService client object.
|
|
105
104
|
#
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
# To create a new SearchService client with the default
|
|
109
|
-
# configuration:
|
|
105
|
+
# @example
|
|
110
106
|
#
|
|
111
|
-
#
|
|
107
|
+
# # Create a client using the default configuration
|
|
108
|
+
# client = ::Google::Cloud::Retail::V2::SearchService::Client.new
|
|
112
109
|
#
|
|
113
|
-
#
|
|
114
|
-
#
|
|
115
|
-
#
|
|
116
|
-
#
|
|
117
|
-
# config.timeout = 10.0
|
|
118
|
-
# end
|
|
110
|
+
# # Create a client using a custom configuration
|
|
111
|
+
# client = ::Google::Cloud::Retail::V2::SearchService::Client.new do |config|
|
|
112
|
+
# config.timeout = 10.0
|
|
113
|
+
# end
|
|
119
114
|
#
|
|
120
115
|
# @yield [config] Configure the SearchService client.
|
|
121
116
|
# @yieldparam config [Client::Configuration]
|
|
@@ -135,10 +130,9 @@ module Google
|
|
|
135
130
|
|
|
136
131
|
# Create credentials
|
|
137
132
|
credentials = @config.credentials
|
|
138
|
-
# Use self-signed JWT if the
|
|
133
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
139
134
|
# but only if the default endpoint does not have a region prefix.
|
|
140
|
-
enable_self_signed_jwt = @config.
|
|
141
|
-
@config.endpoint == Client.configure.endpoint &&
|
|
135
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
|
142
136
|
!@config.endpoint.split(".").first.include?("-")
|
|
143
137
|
credentials ||= Credentials.default scope: @config.scope,
|
|
144
138
|
enable_self_signed_jwt: enable_self_signed_jwt
|
|
@@ -365,7 +359,9 @@ module Google
|
|
|
365
359
|
options.apply_defaults timeout: @config.rpcs.search.timeout,
|
|
366
360
|
metadata: metadata,
|
|
367
361
|
retry_policy: @config.rpcs.search.retry_policy
|
|
368
|
-
|
|
362
|
+
|
|
363
|
+
options.apply_defaults timeout: @config.timeout,
|
|
364
|
+
metadata: @config.metadata,
|
|
369
365
|
retry_policy: @config.retry_policy
|
|
370
366
|
|
|
371
367
|
@search_service_stub.call_rpc :search, request, options: options do |response, operation|
|
|
@@ -390,22 +386,21 @@ module Google
|
|
|
390
386
|
# Configuration can be applied globally to all clients, or to a single client
|
|
391
387
|
# on construction.
|
|
392
388
|
#
|
|
393
|
-
#
|
|
394
|
-
#
|
|
395
|
-
#
|
|
396
|
-
# to 20 seconds,
|
|
397
|
-
#
|
|
398
|
-
#
|
|
399
|
-
#
|
|
400
|
-
#
|
|
401
|
-
#
|
|
402
|
-
#
|
|
403
|
-
#
|
|
404
|
-
#
|
|
405
|
-
#
|
|
406
|
-
#
|
|
407
|
-
#
|
|
408
|
-
# end
|
|
389
|
+
# @example
|
|
390
|
+
#
|
|
391
|
+
# # Modify the global config, setting the timeout for
|
|
392
|
+
# # search to 20 seconds,
|
|
393
|
+
# # and all remaining timeouts to 10 seconds.
|
|
394
|
+
# ::Google::Cloud::Retail::V2::SearchService::Client.configure do |config|
|
|
395
|
+
# config.timeout = 10.0
|
|
396
|
+
# config.rpcs.search.timeout = 20.0
|
|
397
|
+
# end
|
|
398
|
+
#
|
|
399
|
+
# # Apply the above configuration only to a new client.
|
|
400
|
+
# client = ::Google::Cloud::Retail::V2::SearchService::Client.new do |config|
|
|
401
|
+
# config.timeout = 10.0
|
|
402
|
+
# config.rpcs.search.timeout = 20.0
|
|
403
|
+
# end
|
|
409
404
|
#
|
|
410
405
|
# @!attribute [rw] endpoint
|
|
411
406
|
# The hostname or hostname:port of the service endpoint.
|
|
@@ -41,13 +41,12 @@ module Google
|
|
|
41
41
|
# See {::Google::Cloud::Retail::V2::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::Retail::V2::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]
|
|
@@ -99,19 +98,15 @@ module Google
|
|
|
99
98
|
##
|
|
100
99
|
# Create a new UserEventService client object.
|
|
101
100
|
#
|
|
102
|
-
#
|
|
103
|
-
#
|
|
104
|
-
# To create a new UserEventService client with the default
|
|
105
|
-
# configuration:
|
|
106
|
-
#
|
|
107
|
-
# client = ::Google::Cloud::Retail::V2::UserEventService::Client.new
|
|
101
|
+
# @example
|
|
108
102
|
#
|
|
109
|
-
#
|
|
110
|
-
#
|
|
103
|
+
# # Create a client using the default configuration
|
|
104
|
+
# client = ::Google::Cloud::Retail::V2::UserEventService::Client.new
|
|
111
105
|
#
|
|
112
|
-
#
|
|
113
|
-
#
|
|
114
|
-
#
|
|
106
|
+
# # Create a client using a custom configuration
|
|
107
|
+
# client = ::Google::Cloud::Retail::V2::UserEventService::Client.new do |config|
|
|
108
|
+
# config.timeout = 10.0
|
|
109
|
+
# end
|
|
115
110
|
#
|
|
116
111
|
# @yield [config] Configure the UserEventService 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
|
|
@@ -225,7 +219,9 @@ module Google
|
|
|
225
219
|
options.apply_defaults timeout: @config.rpcs.write_user_event.timeout,
|
|
226
220
|
metadata: metadata,
|
|
227
221
|
retry_policy: @config.rpcs.write_user_event.retry_policy
|
|
228
|
-
|
|
222
|
+
|
|
223
|
+
options.apply_defaults timeout: @config.timeout,
|
|
224
|
+
metadata: @config.metadata,
|
|
229
225
|
retry_policy: @config.retry_policy
|
|
230
226
|
|
|
231
227
|
@user_event_service_stub.call_rpc :write_user_event, request, options: options do |response, operation|
|
|
@@ -308,7 +304,9 @@ module Google
|
|
|
308
304
|
options.apply_defaults timeout: @config.rpcs.collect_user_event.timeout,
|
|
309
305
|
metadata: metadata,
|
|
310
306
|
retry_policy: @config.rpcs.collect_user_event.retry_policy
|
|
311
|
-
|
|
307
|
+
|
|
308
|
+
options.apply_defaults timeout: @config.timeout,
|
|
309
|
+
metadata: @config.metadata,
|
|
312
310
|
retry_policy: @config.retry_policy
|
|
313
311
|
|
|
314
312
|
@user_event_service_stub.call_rpc :collect_user_event, request, options: options do |response, operation|
|
|
@@ -407,7 +405,9 @@ module Google
|
|
|
407
405
|
options.apply_defaults timeout: @config.rpcs.purge_user_events.timeout,
|
|
408
406
|
metadata: metadata,
|
|
409
407
|
retry_policy: @config.rpcs.purge_user_events.retry_policy
|
|
410
|
-
|
|
408
|
+
|
|
409
|
+
options.apply_defaults timeout: @config.timeout,
|
|
410
|
+
metadata: @config.metadata,
|
|
411
411
|
retry_policy: @config.retry_policy
|
|
412
412
|
|
|
413
413
|
@user_event_service_stub.call_rpc :purge_user_events, request, options: options do |response, operation|
|
|
@@ -485,7 +485,9 @@ module Google
|
|
|
485
485
|
options.apply_defaults timeout: @config.rpcs.import_user_events.timeout,
|
|
486
486
|
metadata: metadata,
|
|
487
487
|
retry_policy: @config.rpcs.import_user_events.retry_policy
|
|
488
|
-
|
|
488
|
+
|
|
489
|
+
options.apply_defaults timeout: @config.timeout,
|
|
490
|
+
metadata: @config.metadata,
|
|
489
491
|
retry_policy: @config.retry_policy
|
|
490
492
|
|
|
491
493
|
@user_event_service_stub.call_rpc :import_user_events, request, options: options do |response, operation|
|
|
@@ -564,7 +566,9 @@ module Google
|
|
|
564
566
|
options.apply_defaults timeout: @config.rpcs.rejoin_user_events.timeout,
|
|
565
567
|
metadata: metadata,
|
|
566
568
|
retry_policy: @config.rpcs.rejoin_user_events.retry_policy
|
|
567
|
-
|
|
569
|
+
|
|
570
|
+
options.apply_defaults timeout: @config.timeout,
|
|
571
|
+
metadata: @config.metadata,
|
|
568
572
|
retry_policy: @config.retry_policy
|
|
569
573
|
|
|
570
574
|
@user_event_service_stub.call_rpc :rejoin_user_events, request, options: options do |response, operation|
|
|
@@ -589,22 +593,21 @@ module Google
|
|
|
589
593
|
# Configuration can be applied globally to all clients, or to a single client
|
|
590
594
|
# on construction.
|
|
591
595
|
#
|
|
592
|
-
#
|
|
593
|
-
#
|
|
594
|
-
#
|
|
595
|
-
# to 20 seconds,
|
|
596
|
-
#
|
|
597
|
-
#
|
|
598
|
-
#
|
|
599
|
-
#
|
|
600
|
-
#
|
|
601
|
-
#
|
|
602
|
-
#
|
|
603
|
-
#
|
|
604
|
-
#
|
|
605
|
-
#
|
|
606
|
-
#
|
|
607
|
-
# end
|
|
596
|
+
# @example
|
|
597
|
+
#
|
|
598
|
+
# # Modify the global config, setting the timeout for
|
|
599
|
+
# # write_user_event to 20 seconds,
|
|
600
|
+
# # and all remaining timeouts to 10 seconds.
|
|
601
|
+
# ::Google::Cloud::Retail::V2::UserEventService::Client.configure do |config|
|
|
602
|
+
# config.timeout = 10.0
|
|
603
|
+
# config.rpcs.write_user_event.timeout = 20.0
|
|
604
|
+
# end
|
|
605
|
+
#
|
|
606
|
+
# # Apply the above configuration only to a new client.
|
|
607
|
+
# client = ::Google::Cloud::Retail::V2::UserEventService::Client.new do |config|
|
|
608
|
+
# config.timeout = 10.0
|
|
609
|
+
# config.rpcs.write_user_event.timeout = 20.0
|
|
610
|
+
# end
|
|
608
611
|
#
|
|
609
612
|
# @!attribute [rw] endpoint
|
|
610
613
|
# The hostname or hostname:port of the service endpoint.
|
|
@@ -169,7 +169,9 @@ module Google
|
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
|
170
170
|
metadata: metadata,
|
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
|
172
|
-
|
|
172
|
+
|
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
|
174
|
+
metadata: @config.metadata,
|
|
173
175
|
retry_policy: @config.retry_policy
|
|
174
176
|
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
|
@@ -239,7 +241,9 @@ module Google
|
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
|
240
242
|
metadata: metadata,
|
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
|
242
|
-
|
|
244
|
+
|
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
|
246
|
+
metadata: @config.metadata,
|
|
243
247
|
retry_policy: @config.retry_policy
|
|
244
248
|
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
|
@@ -309,7 +313,9 @@ module Google
|
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
|
310
314
|
metadata: metadata,
|
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
|
312
|
-
|
|
316
|
+
|
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
|
318
|
+
metadata: @config.metadata,
|
|
313
319
|
retry_policy: @config.retry_policy
|
|
314
320
|
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
|
@@ -384,7 +390,9 @@ module Google
|
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
|
385
391
|
metadata: metadata,
|
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
|
387
|
-
|
|
393
|
+
|
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
|
395
|
+
metadata: @config.metadata,
|
|
388
396
|
retry_policy: @config.retry_policy
|
|
389
397
|
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
|
@@ -456,7 +464,9 @@ module Google
|
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
|
457
465
|
metadata: metadata,
|
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
|
459
|
-
|
|
467
|
+
|
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
|
469
|
+
metadata: @config.metadata,
|
|
460
470
|
retry_policy: @config.retry_policy
|
|
461
471
|
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
|
@@ -481,22 +491,21 @@ module Google
|
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
|
482
492
|
# on construction.
|
|
483
493
|
#
|
|
484
|
-
#
|
|
485
|
-
#
|
|
486
|
-
#
|
|
487
|
-
# to 20 seconds,
|
|
488
|
-
#
|
|
489
|
-
#
|
|
490
|
-
#
|
|
491
|
-
#
|
|
492
|
-
#
|
|
493
|
-
#
|
|
494
|
-
#
|
|
495
|
-
#
|
|
496
|
-
#
|
|
497
|
-
#
|
|
498
|
-
#
|
|
499
|
-
# end
|
|
494
|
+
# @example
|
|
495
|
+
#
|
|
496
|
+
# # Modify the global config, setting the timeout for
|
|
497
|
+
# # list_operations to 20 seconds,
|
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
|
500
|
+
# config.timeout = 10.0
|
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
|
502
|
+
# end
|
|
503
|
+
#
|
|
504
|
+
# # Apply the above configuration only to a new client.
|
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
506
|
+
# config.timeout = 10.0
|
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
|
508
|
+
# end
|
|
500
509
|
#
|
|
501
510
|
# @!attribute [rw] endpoint
|
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-retail-v2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-08-
|
|
11
|
+
date: 2021-08-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gapic-common
|
|
@@ -16,7 +16,7 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0.
|
|
19
|
+
version: '0.7'
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
22
|
version: 2.a
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '0.
|
|
29
|
+
version: '0.7'
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: 2.a
|