google-cloud-recommendation_engine-v1beta1 0.3.0 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/client.rb +59 -72
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/operations.rb +34 -25
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/client.rb +45 -55
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/client.rb +35 -43
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/client.rb +55 -67
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/operations.rb +34 -25
- data/lib/google/cloud/recommendation_engine/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/httpbody.rb +4 -3
- data/proto_docs/google/cloud/recommendationengine/v1beta1/catalog_service.rb +4 -4
- data/proto_docs/google/cloud/recommendationengine/v1beta1/import.rb +4 -4
- data/proto_docs/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service.rb +3 -3
- data/proto_docs/google/cloud/recommendationengine/v1beta1/prediction_service.rb +1 -1
- data/proto_docs/google/cloud/recommendationengine/v1beta1/user_event_service.rb +4 -4
- data/proto_docs/google/type/date.rb +14 -11
- metadata +13 -7
@@ -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]
|
@@ -67,10 +66,7 @@ module Google
|
|
67
66
|
|
68
67
|
default_config.rpcs.predict.timeout = 600.0
|
69
68
|
default_config.rpcs.predict.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14, 4]
|
69
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
74
70
|
}
|
75
71
|
|
76
72
|
default_config
|
@@ -102,19 +98,15 @@ module Google
|
|
102
98
|
##
|
103
99
|
# Create a new PredictionService client object.
|
104
100
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
# To create a new PredictionService client with the default
|
108
|
-
# configuration:
|
101
|
+
# @example
|
109
102
|
#
|
110
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client.new
|
111
105
|
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
# config.timeout = 10.0
|
117
|
-
# 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
|
118
110
|
#
|
119
111
|
# @yield [config] Configure the PredictionService client.
|
120
112
|
# @yieldparam config [Client::Configuration]
|
@@ -134,14 +126,13 @@ module Google
|
|
134
126
|
|
135
127
|
# Create credentials
|
136
128
|
credentials = @config.credentials
|
137
|
-
# Use self-signed JWT if the
|
129
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
138
130
|
# but only if the default endpoint does not have a region prefix.
|
139
|
-
enable_self_signed_jwt = @config.
|
140
|
-
@config.endpoint == Client.configure.endpoint &&
|
131
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
141
132
|
!@config.endpoint.split(".").first.include?("-")
|
142
133
|
credentials ||= Credentials.default scope: @config.scope,
|
143
134
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
135
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
136
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
137
|
end
|
147
138
|
@quota_project_id = @config.quota_project
|
@@ -181,7 +172,7 @@ module Google
|
|
181
172
|
#
|
182
173
|
# @param name [::String]
|
183
174
|
# Required. Full resource name of the format:
|
184
|
-
#
|
175
|
+
# `{name=projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/placements/*}`
|
185
176
|
# The id of the recommendation engine placement. This id is used to identify
|
186
177
|
# the set of models that will be used to make the prediction.
|
187
178
|
#
|
@@ -303,7 +294,9 @@ module Google
|
|
303
294
|
options.apply_defaults timeout: @config.rpcs.predict.timeout,
|
304
295
|
metadata: metadata,
|
305
296
|
retry_policy: @config.rpcs.predict.retry_policy
|
306
|
-
|
297
|
+
|
298
|
+
options.apply_defaults timeout: @config.timeout,
|
299
|
+
metadata: @config.metadata,
|
307
300
|
retry_policy: @config.retry_policy
|
308
301
|
|
309
302
|
@prediction_service_stub.call_rpc :predict, request, options: options do |response, operation|
|
@@ -328,22 +321,21 @@ module Google
|
|
328
321
|
# Configuration can be applied globally to all clients, or to a single client
|
329
322
|
# on construction.
|
330
323
|
#
|
331
|
-
#
|
332
|
-
#
|
333
|
-
#
|
334
|
-
# to 20 seconds,
|
335
|
-
#
|
336
|
-
#
|
337
|
-
#
|
338
|
-
#
|
339
|
-
#
|
340
|
-
#
|
341
|
-
#
|
342
|
-
#
|
343
|
-
#
|
344
|
-
#
|
345
|
-
#
|
346
|
-
# end
|
324
|
+
# @example
|
325
|
+
#
|
326
|
+
# # Modify the global config, setting the timeout for
|
327
|
+
# # predict to 20 seconds,
|
328
|
+
# # and all remaining timeouts to 10 seconds.
|
329
|
+
# ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client.configure do |config|
|
330
|
+
# config.timeout = 10.0
|
331
|
+
# config.rpcs.predict.timeout = 20.0
|
332
|
+
# end
|
333
|
+
#
|
334
|
+
# # Apply the above configuration only to a new client.
|
335
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Client.new do |config|
|
336
|
+
# config.timeout = 10.0
|
337
|
+
# config.rpcs.predict.timeout = 20.0
|
338
|
+
# end
|
347
339
|
#
|
348
340
|
# @!attribute [rw] endpoint
|
349
341
|
# 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]
|
@@ -67,42 +66,27 @@ module Google
|
|
67
66
|
|
68
67
|
default_config.rpcs.write_user_event.timeout = 600.0
|
69
68
|
default_config.rpcs.write_user_event.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14, 4]
|
69
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
74
70
|
}
|
75
71
|
|
76
72
|
default_config.rpcs.collect_user_event.timeout = 600.0
|
77
73
|
default_config.rpcs.collect_user_event.retry_policy = {
|
78
|
-
initial_delay: 0.1,
|
79
|
-
max_delay: 60.0,
|
80
|
-
multiplier: 1.3,
|
81
|
-
retry_codes: [14, 4]
|
74
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
82
75
|
}
|
83
76
|
|
84
77
|
default_config.rpcs.list_user_events.timeout = 600.0
|
85
78
|
default_config.rpcs.list_user_events.retry_policy = {
|
86
|
-
initial_delay: 0.1,
|
87
|
-
max_delay: 60.0,
|
88
|
-
multiplier: 1.3,
|
89
|
-
retry_codes: [14, 4]
|
79
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
90
80
|
}
|
91
81
|
|
92
82
|
default_config.rpcs.purge_user_events.timeout = 600.0
|
93
83
|
default_config.rpcs.purge_user_events.retry_policy = {
|
94
|
-
initial_delay: 0.1,
|
95
|
-
max_delay: 60.0,
|
96
|
-
multiplier: 1.3,
|
97
|
-
retry_codes: [14, 4]
|
84
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
98
85
|
}
|
99
86
|
|
100
87
|
default_config.rpcs.import_user_events.timeout = 600.0
|
101
88
|
default_config.rpcs.import_user_events.retry_policy = {
|
102
|
-
initial_delay: 0.1,
|
103
|
-
max_delay: 60.0,
|
104
|
-
multiplier: 1.3,
|
105
|
-
retry_codes: [14, 4]
|
89
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
106
90
|
}
|
107
91
|
|
108
92
|
default_config
|
@@ -134,19 +118,15 @@ module Google
|
|
134
118
|
##
|
135
119
|
# Create a new UserEventService client object.
|
136
120
|
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
# To create a new UserEventService client with the default
|
140
|
-
# configuration:
|
141
|
-
#
|
142
|
-
# client = ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new
|
121
|
+
# @example
|
143
122
|
#
|
144
|
-
#
|
145
|
-
#
|
123
|
+
# # Create a client using the default configuration
|
124
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new
|
146
125
|
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
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
|
150
130
|
#
|
151
131
|
# @yield [config] Configure the UserEventService client.
|
152
132
|
# @yieldparam config [Client::Configuration]
|
@@ -166,14 +146,13 @@ module Google
|
|
166
146
|
|
167
147
|
# Create credentials
|
168
148
|
credentials = @config.credentials
|
169
|
-
# Use self-signed JWT if the
|
149
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
170
150
|
# but only if the default endpoint does not have a region prefix.
|
171
|
-
enable_self_signed_jwt = @config.
|
172
|
-
@config.endpoint == Client.configure.endpoint &&
|
151
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
173
152
|
!@config.endpoint.split(".").first.include?("-")
|
174
153
|
credentials ||= Credentials.default scope: @config.scope,
|
175
154
|
enable_self_signed_jwt: enable_self_signed_jwt
|
176
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
155
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
177
156
|
credentials = Credentials.new credentials, scope: @config.scope
|
178
157
|
end
|
179
158
|
@quota_project_id = @config.quota_project
|
@@ -222,7 +201,7 @@ module Google
|
|
222
201
|
#
|
223
202
|
# @param parent [::String]
|
224
203
|
# Required. The parent eventStore resource name, such as
|
225
|
-
#
|
204
|
+
# `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.
|
226
205
|
# @param user_event [::Google::Cloud::RecommendationEngine::V1beta1::UserEvent, ::Hash]
|
227
206
|
# Required. User event to write.
|
228
207
|
#
|
@@ -260,7 +239,9 @@ module Google
|
|
260
239
|
options.apply_defaults timeout: @config.rpcs.write_user_event.timeout,
|
261
240
|
metadata: metadata,
|
262
241
|
retry_policy: @config.rpcs.write_user_event.retry_policy
|
263
|
-
|
242
|
+
|
243
|
+
options.apply_defaults timeout: @config.timeout,
|
244
|
+
metadata: @config.metadata,
|
264
245
|
retry_policy: @config.retry_policy
|
265
246
|
|
266
247
|
@user_event_service_stub.call_rpc :write_user_event, request, options: options do |response, operation|
|
@@ -295,7 +276,7 @@ module Google
|
|
295
276
|
#
|
296
277
|
# @param parent [::String]
|
297
278
|
# Required. The parent eventStore name, such as
|
298
|
-
#
|
279
|
+
# `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.
|
299
280
|
# @param user_event [::String]
|
300
281
|
# Required. URL encoded UserEvent proto.
|
301
282
|
# @param uri [::String]
|
@@ -342,7 +323,9 @@ module Google
|
|
342
323
|
options.apply_defaults timeout: @config.rpcs.collect_user_event.timeout,
|
343
324
|
metadata: metadata,
|
344
325
|
retry_policy: @config.rpcs.collect_user_event.retry_policy
|
345
|
-
|
326
|
+
|
327
|
+
options.apply_defaults timeout: @config.timeout,
|
328
|
+
metadata: @config.metadata,
|
346
329
|
retry_policy: @config.retry_policy
|
347
330
|
|
348
331
|
@user_event_service_stub.call_rpc :collect_user_event, request, options: options do |response, operation|
|
@@ -373,7 +356,7 @@ module Google
|
|
373
356
|
#
|
374
357
|
# @param parent [::String]
|
375
358
|
# Required. The parent eventStore resource name, such as
|
376
|
-
#
|
359
|
+
# `projects/*/locations/*/catalogs/default_catalog/eventStores/default_event_store`.
|
377
360
|
# @param page_size [::Integer]
|
378
361
|
# Optional. Maximum number of results to return per page. If zero, the
|
379
362
|
# service will choose a reasonable default.
|
@@ -447,7 +430,9 @@ module Google
|
|
447
430
|
options.apply_defaults timeout: @config.rpcs.list_user_events.timeout,
|
448
431
|
metadata: metadata,
|
449
432
|
retry_policy: @config.rpcs.list_user_events.retry_policy
|
450
|
-
|
433
|
+
|
434
|
+
options.apply_defaults timeout: @config.timeout,
|
435
|
+
metadata: @config.metadata,
|
451
436
|
retry_policy: @config.retry_policy
|
452
437
|
|
453
438
|
@user_event_service_stub.call_rpc :list_user_events, request, options: options do |response, operation|
|
@@ -483,7 +468,7 @@ module Google
|
|
483
468
|
# @param parent [::String]
|
484
469
|
# Required. The resource name of the event_store under which the events are
|
485
470
|
# created. The format is
|
486
|
-
#
|
471
|
+
# `projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}`
|
487
472
|
# @param filter [::String]
|
488
473
|
# Required. The filter string to specify the events to be deleted. Empty
|
489
474
|
# string filter is not allowed. This filter can also be used with
|
@@ -542,7 +527,9 @@ module Google
|
|
542
527
|
options.apply_defaults timeout: @config.rpcs.purge_user_events.timeout,
|
543
528
|
metadata: metadata,
|
544
529
|
retry_policy: @config.rpcs.purge_user_events.retry_policy
|
545
|
-
|
530
|
+
|
531
|
+
options.apply_defaults timeout: @config.timeout,
|
532
|
+
metadata: @config.metadata,
|
546
533
|
retry_policy: @config.retry_policy
|
547
534
|
|
548
535
|
@user_event_service_stub.call_rpc :purge_user_events, request, options: options do |response, operation|
|
@@ -580,7 +567,7 @@ module Google
|
|
580
567
|
#
|
581
568
|
# @param parent [::String]
|
582
569
|
# Required.
|
583
|
-
#
|
570
|
+
# `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`
|
584
571
|
# @param request_id [::String]
|
585
572
|
# Optional. Unique identifier provided by client, within the ancestor
|
586
573
|
# dataset scope. Ensures idempotency for expensive long running operations.
|
@@ -627,7 +614,9 @@ module Google
|
|
627
614
|
options.apply_defaults timeout: @config.rpcs.import_user_events.timeout,
|
628
615
|
metadata: metadata,
|
629
616
|
retry_policy: @config.rpcs.import_user_events.retry_policy
|
630
|
-
|
617
|
+
|
618
|
+
options.apply_defaults timeout: @config.timeout,
|
619
|
+
metadata: @config.metadata,
|
631
620
|
retry_policy: @config.retry_policy
|
632
621
|
|
633
622
|
@user_event_service_stub.call_rpc :import_user_events, request, options: options do |response, operation|
|
@@ -652,22 +641,21 @@ module Google
|
|
652
641
|
# Configuration can be applied globally to all clients, or to a single client
|
653
642
|
# on construction.
|
654
643
|
#
|
655
|
-
#
|
656
|
-
#
|
657
|
-
#
|
658
|
-
# to 20 seconds,
|
659
|
-
#
|
660
|
-
#
|
661
|
-
#
|
662
|
-
#
|
663
|
-
#
|
664
|
-
#
|
665
|
-
#
|
666
|
-
#
|
667
|
-
#
|
668
|
-
#
|
669
|
-
#
|
670
|
-
# end
|
644
|
+
# @example
|
645
|
+
#
|
646
|
+
# # Modify the global config, setting the timeout for
|
647
|
+
# # write_user_event to 20 seconds,
|
648
|
+
# # and all remaining timeouts to 10 seconds.
|
649
|
+
# ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.configure do |config|
|
650
|
+
# config.timeout = 10.0
|
651
|
+
# config.rpcs.write_user_event.timeout = 20.0
|
652
|
+
# end
|
653
|
+
#
|
654
|
+
# # Apply the above configuration only to a new client.
|
655
|
+
# client = ::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Client.new do |config|
|
656
|
+
# config.timeout = 10.0
|
657
|
+
# config.rpcs.write_user_event.timeout = 20.0
|
658
|
+
# end
|
671
659
|
#
|
672
660
|
# @!attribute [rw] endpoint
|
673
661
|
# The hostname or hostname:port of the service endpoint.
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -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|
|
@@ -396,9 +404,9 @@ module Google
|
|
396
404
|
end
|
397
405
|
|
398
406
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
407
|
+
# Waits until the specified long-running operation is done or reaches at most
|
408
|
+
# a specified timeout, returning the latest state. If the operation is
|
409
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
410
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
411
|
# timeout is used. If the server does not support this method, it returns
|
404
412
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -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.
|