google-cloud-recommendation_engine-v1beta1 0.1.0 → 0.3.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/LICENSE.md +188 -190
- data/README.md +66 -2
- data/lib/google/cloud/recommendation_engine/v1beta1.rb +3 -0
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/client.rb +40 -34
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/operations.rb +95 -10
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/client.rb +26 -20
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/client.rb +16 -10
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/client.rb +36 -30
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/operations.rb +95 -10
- data/lib/google/cloud/recommendation_engine/v1beta1/version.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/catalog_service_services_pb.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service_services_pb.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/prediction_service_services_pb.rb +1 -1
- data/lib/google/cloud/recommendationengine/v1beta1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +6 -0
- 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/longrunning/operations.rb +17 -3
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- metadata +21 -11
@@ -60,7 +60,7 @@ module Google
|
|
60
60
|
parent_config = while namespace.any?
|
61
61
|
parent_name = namespace.join "::"
|
62
62
|
parent_const = const_get parent_name
|
63
|
-
break parent_const.configure if parent_const
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
64
|
namespace.pop
|
65
65
|
end
|
66
66
|
default_config = Client::Configuration.new parent_config
|
@@ -68,9 +68,9 @@ module Google
|
|
68
68
|
default_config.rpcs.predict.timeout = 600.0
|
69
69
|
default_config.rpcs.predict.retry_policy = {
|
70
70
|
initial_delay: 0.1,
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
max_delay: 60.0,
|
72
|
+
multiplier: 1.3,
|
73
|
+
retry_codes: [14, 4]
|
74
74
|
}
|
75
75
|
|
76
76
|
default_config
|
@@ -134,7 +134,13 @@ module Google
|
|
134
134
|
|
135
135
|
# Create credentials
|
136
136
|
credentials = @config.credentials
|
137
|
-
|
137
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
138
|
+
# but only if the default endpoint does not have a region prefix.
|
139
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
140
|
+
@config.endpoint == Client.configure.endpoint &&
|
141
|
+
!@config.endpoint.split(".").first.include?("-")
|
142
|
+
credentials ||= Credentials.default scope: @config.scope,
|
143
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
138
144
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
139
145
|
credentials = Credentials.new credentials, scope: @config.scope
|
140
146
|
end
|
@@ -175,7 +181,7 @@ module Google
|
|
175
181
|
#
|
176
182
|
# @param name [::String]
|
177
183
|
# Required. Full resource name of the format:
|
178
|
-
#
|
184
|
+
# `{name=projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/placements/*}`
|
179
185
|
# The id of the recommendation engine placement. This id is used to identify
|
180
186
|
# the set of models that will be used to make the prediction.
|
181
187
|
#
|
@@ -401,7 +407,7 @@ module Google
|
|
401
407
|
config_attr :scope, nil, ::String, ::Array, nil
|
402
408
|
config_attr :lib_name, nil, ::String, nil
|
403
409
|
config_attr :lib_version, nil, ::String, nil
|
404
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
410
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
405
411
|
config_attr :interceptors, nil, ::Array, nil
|
406
412
|
config_attr :timeout, nil, ::Numeric, nil
|
407
413
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -422,7 +428,7 @@ module Google
|
|
422
428
|
def rpcs
|
423
429
|
@rpcs ||= begin
|
424
430
|
parent_rpcs = nil
|
425
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
431
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
426
432
|
Rpcs.new parent_rpcs
|
427
433
|
end
|
428
434
|
end
|
@@ -434,7 +440,7 @@ module Google
|
|
434
440
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
435
441
|
# the following configuration fields:
|
436
442
|
#
|
437
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
443
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
438
444
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
439
445
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
440
446
|
# include the following keys:
|
@@ -453,7 +459,7 @@ module Google
|
|
453
459
|
|
454
460
|
# @private
|
455
461
|
def initialize parent_rpcs = nil
|
456
|
-
predict_config = parent_rpcs
|
462
|
+
predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict
|
457
463
|
@predict = ::Gapic::Config::Method.new predict_config
|
458
464
|
|
459
465
|
yield self if block_given?
|
@@ -60,7 +60,7 @@ module Google
|
|
60
60
|
parent_config = while namespace.any?
|
61
61
|
parent_name = namespace.join "::"
|
62
62
|
parent_const = const_get parent_name
|
63
|
-
break parent_const.configure if parent_const
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
64
|
namespace.pop
|
65
65
|
end
|
66
66
|
default_config = Client::Configuration.new parent_config
|
@@ -68,41 +68,41 @@ module Google
|
|
68
68
|
default_config.rpcs.write_user_event.timeout = 600.0
|
69
69
|
default_config.rpcs.write_user_event.retry_policy = {
|
70
70
|
initial_delay: 0.1,
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
max_delay: 60.0,
|
72
|
+
multiplier: 1.3,
|
73
|
+
retry_codes: [14, 4]
|
74
74
|
}
|
75
75
|
|
76
76
|
default_config.rpcs.collect_user_event.timeout = 600.0
|
77
77
|
default_config.rpcs.collect_user_event.retry_policy = {
|
78
78
|
initial_delay: 0.1,
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
max_delay: 60.0,
|
80
|
+
multiplier: 1.3,
|
81
|
+
retry_codes: [14, 4]
|
82
82
|
}
|
83
83
|
|
84
84
|
default_config.rpcs.list_user_events.timeout = 600.0
|
85
85
|
default_config.rpcs.list_user_events.retry_policy = {
|
86
86
|
initial_delay: 0.1,
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
max_delay: 60.0,
|
88
|
+
multiplier: 1.3,
|
89
|
+
retry_codes: [14, 4]
|
90
90
|
}
|
91
91
|
|
92
92
|
default_config.rpcs.purge_user_events.timeout = 600.0
|
93
93
|
default_config.rpcs.purge_user_events.retry_policy = {
|
94
94
|
initial_delay: 0.1,
|
95
|
-
|
96
|
-
|
97
|
-
|
95
|
+
max_delay: 60.0,
|
96
|
+
multiplier: 1.3,
|
97
|
+
retry_codes: [14, 4]
|
98
98
|
}
|
99
99
|
|
100
100
|
default_config.rpcs.import_user_events.timeout = 600.0
|
101
101
|
default_config.rpcs.import_user_events.retry_policy = {
|
102
102
|
initial_delay: 0.1,
|
103
|
-
|
104
|
-
|
105
|
-
|
103
|
+
max_delay: 60.0,
|
104
|
+
multiplier: 1.3,
|
105
|
+
retry_codes: [14, 4]
|
106
106
|
}
|
107
107
|
|
108
108
|
default_config
|
@@ -166,7 +166,13 @@ module Google
|
|
166
166
|
|
167
167
|
# Create credentials
|
168
168
|
credentials = @config.credentials
|
169
|
-
|
169
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
170
|
+
# but only if the default endpoint does not have a region prefix.
|
171
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
172
|
+
@config.endpoint == Client.configure.endpoint &&
|
173
|
+
!@config.endpoint.split(".").first.include?("-")
|
174
|
+
credentials ||= Credentials.default scope: @config.scope,
|
175
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
170
176
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
171
177
|
credentials = Credentials.new credentials, scope: @config.scope
|
172
178
|
end
|
@@ -216,7 +222,7 @@ module Google
|
|
216
222
|
#
|
217
223
|
# @param parent [::String]
|
218
224
|
# Required. The parent eventStore resource name, such as
|
219
|
-
#
|
225
|
+
# `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.
|
220
226
|
# @param user_event [::Google::Cloud::RecommendationEngine::V1beta1::UserEvent, ::Hash]
|
221
227
|
# Required. User event to write.
|
222
228
|
#
|
@@ -289,7 +295,7 @@ module Google
|
|
289
295
|
#
|
290
296
|
# @param parent [::String]
|
291
297
|
# Required. The parent eventStore name, such as
|
292
|
-
#
|
298
|
+
# `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.
|
293
299
|
# @param user_event [::String]
|
294
300
|
# Required. URL encoded UserEvent proto.
|
295
301
|
# @param uri [::String]
|
@@ -367,7 +373,7 @@ module Google
|
|
367
373
|
#
|
368
374
|
# @param parent [::String]
|
369
375
|
# Required. The parent eventStore resource name, such as
|
370
|
-
#
|
376
|
+
# `projects/*/locations/*/catalogs/default_catalog/eventStores/default_event_store`.
|
371
377
|
# @param page_size [::Integer]
|
372
378
|
# Optional. Maximum number of results to return per page. If zero, the
|
373
379
|
# service will choose a reasonable default.
|
@@ -477,7 +483,7 @@ module Google
|
|
477
483
|
# @param parent [::String]
|
478
484
|
# Required. The resource name of the event_store under which the events are
|
479
485
|
# created. The format is
|
480
|
-
#
|
486
|
+
# `projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}`
|
481
487
|
# @param filter [::String]
|
482
488
|
# Required. The filter string to specify the events to be deleted. Empty
|
483
489
|
# string filter is not allowed. This filter can also be used with
|
@@ -574,7 +580,7 @@ module Google
|
|
574
580
|
#
|
575
581
|
# @param parent [::String]
|
576
582
|
# Required.
|
577
|
-
#
|
583
|
+
# `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`
|
578
584
|
# @param request_id [::String]
|
579
585
|
# Optional. Unique identifier provided by client, within the ancestor
|
580
586
|
# dataset scope. Ensures idempotency for expensive long running operations.
|
@@ -725,7 +731,7 @@ module Google
|
|
725
731
|
config_attr :scope, nil, ::String, ::Array, nil
|
726
732
|
config_attr :lib_name, nil, ::String, nil
|
727
733
|
config_attr :lib_version, nil, ::String, nil
|
728
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
734
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
729
735
|
config_attr :interceptors, nil, ::Array, nil
|
730
736
|
config_attr :timeout, nil, ::Numeric, nil
|
731
737
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -746,7 +752,7 @@ module Google
|
|
746
752
|
def rpcs
|
747
753
|
@rpcs ||= begin
|
748
754
|
parent_rpcs = nil
|
749
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
755
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
750
756
|
Rpcs.new parent_rpcs
|
751
757
|
end
|
752
758
|
end
|
@@ -758,7 +764,7 @@ module Google
|
|
758
764
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
759
765
|
# the following configuration fields:
|
760
766
|
#
|
761
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
767
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
762
768
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
763
769
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
764
770
|
# include the following keys:
|
@@ -797,15 +803,15 @@ module Google
|
|
797
803
|
|
798
804
|
# @private
|
799
805
|
def initialize parent_rpcs = nil
|
800
|
-
write_user_event_config = parent_rpcs
|
806
|
+
write_user_event_config = parent_rpcs.write_user_event if parent_rpcs.respond_to? :write_user_event
|
801
807
|
@write_user_event = ::Gapic::Config::Method.new write_user_event_config
|
802
|
-
collect_user_event_config = parent_rpcs
|
808
|
+
collect_user_event_config = parent_rpcs.collect_user_event if parent_rpcs.respond_to? :collect_user_event
|
803
809
|
@collect_user_event = ::Gapic::Config::Method.new collect_user_event_config
|
804
|
-
list_user_events_config = parent_rpcs
|
810
|
+
list_user_events_config = parent_rpcs.list_user_events if parent_rpcs.respond_to? :list_user_events
|
805
811
|
@list_user_events = ::Gapic::Config::Method.new list_user_events_config
|
806
|
-
purge_user_events_config = parent_rpcs
|
812
|
+
purge_user_events_config = parent_rpcs.purge_user_events if parent_rpcs.respond_to? :purge_user_events
|
807
813
|
@purge_user_events = ::Gapic::Config::Method.new purge_user_events_config
|
808
|
-
import_user_events_config = parent_rpcs
|
814
|
+
import_user_events_config = parent_rpcs.import_user_events if parent_rpcs.respond_to? :import_user_events
|
809
815
|
@import_user_events = ::Gapic::Config::Method.new import_user_events_config
|
810
816
|
|
811
817
|
yield self if block_given?
|
@@ -103,8 +103,13 @@ module Google
|
|
103
103
|
# Lists operations that match the specified filter in the request. If the
|
104
104
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
105
105
|
#
|
106
|
-
# NOTE: the `name` binding
|
107
|
-
# to use different resource name schemes, such as `users/*/operations`.
|
106
|
+
# NOTE: the `name` binding allows API services to override the binding
|
107
|
+
# to use different resource name schemes, such as `users/*/operations`. To
|
108
|
+
# override the binding, API services can add a binding such as
|
109
|
+
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
110
|
+
# For backwards compatibility, the default name includes the operations
|
111
|
+
# collection id, however overriding users must ensure the name binding
|
112
|
+
# is the parent resource, without the operations collection id.
|
108
113
|
#
|
109
114
|
# @overload list_operations(request, options = nil)
|
110
115
|
# Pass arguments to `list_operations` via a request object, either of type
|
@@ -122,7 +127,7 @@ module Google
|
|
122
127
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
123
128
|
#
|
124
129
|
# @param name [::String]
|
125
|
-
# The name of the operation
|
130
|
+
# The name of the operation's parent resource.
|
126
131
|
# @param filter [::String]
|
127
132
|
# The standard list filter.
|
128
133
|
# @param page_size [::Integer]
|
@@ -390,6 +395,79 @@ module Google
|
|
390
395
|
raise ::Google::Cloud::Error.from_error(e)
|
391
396
|
end
|
392
397
|
|
398
|
+
##
|
399
|
+
# Waits for the specified long-running operation until it is done or reaches
|
400
|
+
# at most a specified timeout, returning the latest state. If the operation
|
401
|
+
# is already done, the latest state is immediately returned. If the timeout
|
402
|
+
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
|
+
# timeout is used. If the server does not support this method, it returns
|
404
|
+
# `google.rpc.Code.UNIMPLEMENTED`.
|
405
|
+
# Note that this method is on a best-effort basis. It may return the latest
|
406
|
+
# state before the specified timeout (including immediately), meaning even an
|
407
|
+
# immediate response is no guarantee that the operation is done.
|
408
|
+
#
|
409
|
+
# @overload wait_operation(request, options = nil)
|
410
|
+
# Pass arguments to `wait_operation` via a request object, either of type
|
411
|
+
# {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash.
|
412
|
+
#
|
413
|
+
# @param request [::Google::Longrunning::WaitOperationRequest, ::Hash]
|
414
|
+
# A request object representing the call parameters. Required. To specify no
|
415
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
416
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
417
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
418
|
+
#
|
419
|
+
# @overload wait_operation(name: nil, timeout: nil)
|
420
|
+
# Pass arguments to `wait_operation` via keyword arguments. Note that at
|
421
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
422
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
423
|
+
#
|
424
|
+
# @param name [::String]
|
425
|
+
# The name of the operation resource to wait on.
|
426
|
+
# @param timeout [::Google::Protobuf::Duration, ::Hash]
|
427
|
+
# The maximum duration to wait before timing out. If left blank, the wait
|
428
|
+
# will be at most the time permitted by the underlying HTTP/RPC protocol.
|
429
|
+
# If RPC context deadline is also specified, the shorter one will be used.
|
430
|
+
#
|
431
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
432
|
+
# @yieldparam response [::Gapic::Operation]
|
433
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
434
|
+
#
|
435
|
+
# @return [::Gapic::Operation]
|
436
|
+
#
|
437
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
438
|
+
#
|
439
|
+
def wait_operation request, options = nil
|
440
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
441
|
+
|
442
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest
|
443
|
+
|
444
|
+
# Converts hash and nil to an options object
|
445
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
446
|
+
|
447
|
+
# Customize the options with defaults
|
448
|
+
metadata = @config.rpcs.wait_operation.metadata.to_h
|
449
|
+
|
450
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
451
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
452
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
453
|
+
gapic_version: ::Google::Cloud::RecommendationEngine::V1beta1::VERSION
|
454
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
455
|
+
|
456
|
+
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
|
+
metadata: metadata,
|
458
|
+
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
+
options.apply_defaults metadata: @config.metadata,
|
460
|
+
retry_policy: @config.retry_policy
|
461
|
+
|
462
|
+
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
463
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
464
|
+
yield response, operation if block_given?
|
465
|
+
return response
|
466
|
+
end
|
467
|
+
rescue ::GRPC::BadStatus => e
|
468
|
+
raise ::Google::Cloud::Error.from_error(e)
|
469
|
+
end
|
470
|
+
|
393
471
|
##
|
394
472
|
# Configuration class for the Operations API.
|
395
473
|
#
|
@@ -482,7 +560,7 @@ module Google
|
|
482
560
|
config_attr :scope, nil, ::String, ::Array, nil
|
483
561
|
config_attr :lib_name, nil, ::String, nil
|
484
562
|
config_attr :lib_version, nil, ::String, nil
|
485
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
563
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
486
564
|
config_attr :interceptors, nil, ::Array, nil
|
487
565
|
config_attr :timeout, nil, ::Numeric, nil
|
488
566
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -503,7 +581,7 @@ module Google
|
|
503
581
|
def rpcs
|
504
582
|
@rpcs ||= begin
|
505
583
|
parent_rpcs = nil
|
506
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
584
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
507
585
|
Rpcs.new parent_rpcs
|
508
586
|
end
|
509
587
|
end
|
@@ -515,7 +593,7 @@ module Google
|
|
515
593
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
516
594
|
# the following configuration fields:
|
517
595
|
#
|
518
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
596
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
519
597
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
520
598
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
521
599
|
# include the following keys:
|
@@ -546,17 +624,24 @@ module Google
|
|
546
624
|
# @return [::Gapic::Config::Method]
|
547
625
|
#
|
548
626
|
attr_reader :cancel_operation
|
627
|
+
##
|
628
|
+
# RPC-specific configuration for `wait_operation`
|
629
|
+
# @return [::Gapic::Config::Method]
|
630
|
+
#
|
631
|
+
attr_reader :wait_operation
|
549
632
|
|
550
633
|
# @private
|
551
634
|
def initialize parent_rpcs = nil
|
552
|
-
list_operations_config = parent_rpcs
|
635
|
+
list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations
|
553
636
|
@list_operations = ::Gapic::Config::Method.new list_operations_config
|
554
|
-
get_operation_config = parent_rpcs
|
637
|
+
get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation
|
555
638
|
@get_operation = ::Gapic::Config::Method.new get_operation_config
|
556
|
-
delete_operation_config = parent_rpcs
|
639
|
+
delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation
|
557
640
|
@delete_operation = ::Gapic::Config::Method.new delete_operation_config
|
558
|
-
cancel_operation_config = parent_rpcs
|
641
|
+
cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation
|
559
642
|
@cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
|
643
|
+
wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation
|
644
|
+
@wait_operation = ::Gapic::Config::Method.new wait_operation_config
|
560
645
|
|
561
646
|
yield self if block_given?
|
562
647
|
end
|