google-cloud-dialogflow-v2 0.9.0 → 0.11.1
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/dialogflow/v2/agent_services_pb.rb +17 -6
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +74 -55
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +37 -43
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +49 -47
- data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +49 -47
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +29 -8
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +89 -58
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +7 -7
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +69 -56
- data/lib/google/cloud/dialogflow/v2/environments/paths.rb +41 -0
- data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +37 -43
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +21 -3
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +72 -50
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +34 -25
- data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +53 -52
- data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +46 -46
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +38 -47
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +51 -46
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +21 -3
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +4 -3
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +3 -0
- data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/version.rb +6 -0
- metadata +4 -4
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Service for managing [Conversations][google.cloud.dialogflow.v2.Conversation].
|
28
28
|
class Service
|
29
29
|
|
30
|
-
include
|
30
|
+
include GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Dialogflow::V2::Conversations::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 Conversations clients
|
47
|
+
# ::Google::Cloud::Dialogflow::V2::Conversations::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.timeout = 60.0
|
69
68
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
69
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
70
|
}
|
75
71
|
|
76
72
|
default_config
|
@@ -102,19 +98,15 @@ module Google
|
|
102
98
|
##
|
103
99
|
# Create a new Conversations client object.
|
104
100
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
# To create a new Conversations client with the default
|
108
|
-
# configuration:
|
109
|
-
#
|
110
|
-
# client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
101
|
+
# @example
|
111
102
|
#
|
112
|
-
#
|
113
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
114
105
|
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
106
|
+
# # Create a client using a custom configuration
|
107
|
+
# client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
118
110
|
#
|
119
111
|
# @yield [config] Configure the Conversations 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
|
@@ -244,7 +235,9 @@ module Google
|
|
244
235
|
options.apply_defaults timeout: @config.rpcs.create_conversation.timeout,
|
245
236
|
metadata: metadata,
|
246
237
|
retry_policy: @config.rpcs.create_conversation.retry_policy
|
247
|
-
|
238
|
+
|
239
|
+
options.apply_defaults timeout: @config.timeout,
|
240
|
+
metadata: @config.metadata,
|
248
241
|
retry_policy: @config.retry_policy
|
249
242
|
|
250
243
|
@conversations_stub.call_rpc :create_conversation, request, options: options do |response, operation|
|
@@ -334,7 +327,9 @@ module Google
|
|
334
327
|
options.apply_defaults timeout: @config.rpcs.list_conversations.timeout,
|
335
328
|
metadata: metadata,
|
336
329
|
retry_policy: @config.rpcs.list_conversations.retry_policy
|
337
|
-
|
330
|
+
|
331
|
+
options.apply_defaults timeout: @config.timeout,
|
332
|
+
metadata: @config.metadata,
|
338
333
|
retry_policy: @config.retry_policy
|
339
334
|
|
340
335
|
@conversations_stub.call_rpc :list_conversations, request, options: options do |response, operation|
|
@@ -403,7 +398,9 @@ module Google
|
|
403
398
|
options.apply_defaults timeout: @config.rpcs.get_conversation.timeout,
|
404
399
|
metadata: metadata,
|
405
400
|
retry_policy: @config.rpcs.get_conversation.retry_policy
|
406
|
-
|
401
|
+
|
402
|
+
options.apply_defaults timeout: @config.timeout,
|
403
|
+
metadata: @config.metadata,
|
407
404
|
retry_policy: @config.retry_policy
|
408
405
|
|
409
406
|
@conversations_stub.call_rpc :get_conversation, request, options: options do |response, operation|
|
@@ -472,7 +469,9 @@ module Google
|
|
472
469
|
options.apply_defaults timeout: @config.rpcs.complete_conversation.timeout,
|
473
470
|
metadata: metadata,
|
474
471
|
retry_policy: @config.rpcs.complete_conversation.retry_policy
|
475
|
-
|
472
|
+
|
473
|
+
options.apply_defaults timeout: @config.timeout,
|
474
|
+
metadata: @config.metadata,
|
476
475
|
retry_policy: @config.retry_policy
|
477
476
|
|
478
477
|
@conversations_stub.call_rpc :complete_conversation, request, options: options do |response, operation|
|
@@ -558,7 +557,9 @@ module Google
|
|
558
557
|
options.apply_defaults timeout: @config.rpcs.list_messages.timeout,
|
559
558
|
metadata: metadata,
|
560
559
|
retry_policy: @config.rpcs.list_messages.retry_policy
|
561
|
-
|
560
|
+
|
561
|
+
options.apply_defaults timeout: @config.timeout,
|
562
|
+
metadata: @config.metadata,
|
562
563
|
retry_policy: @config.retry_policy
|
563
564
|
|
564
565
|
@conversations_stub.call_rpc :list_messages, request, options: options do |response, operation|
|
@@ -583,22 +584,21 @@ module Google
|
|
583
584
|
# Configuration can be applied globally to all clients, or to a single client
|
584
585
|
# on construction.
|
585
586
|
#
|
586
|
-
#
|
587
|
-
#
|
588
|
-
#
|
589
|
-
# to 20 seconds,
|
590
|
-
#
|
591
|
-
#
|
592
|
-
#
|
593
|
-
#
|
594
|
-
#
|
595
|
-
#
|
596
|
-
#
|
597
|
-
#
|
598
|
-
#
|
599
|
-
#
|
600
|
-
#
|
601
|
-
# end
|
587
|
+
# @example
|
588
|
+
#
|
589
|
+
# # Modify the global config, setting the timeout for
|
590
|
+
# # create_conversation to 20 seconds,
|
591
|
+
# # and all remaining timeouts to 10 seconds.
|
592
|
+
# ::Google::Cloud::Dialogflow::V2::Conversations::Client.configure do |config|
|
593
|
+
# config.timeout = 10.0
|
594
|
+
# config.rpcs.create_conversation.timeout = 20.0
|
595
|
+
# end
|
596
|
+
#
|
597
|
+
# # Apply the above configuration only to a new client.
|
598
|
+
# client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new do |config|
|
599
|
+
# config.timeout = 10.0
|
600
|
+
# config.rpcs.create_conversation.timeout = 20.0
|
601
|
+
# end
|
602
602
|
#
|
603
603
|
# @!attribute [rw] endpoint
|
604
604
|
# The hostname or hostname:port of the service endpoint.
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Service for managing knowledge [Documents][google.cloud.dialogflow.v2.Document].
|
28
28
|
class Service
|
29
29
|
|
30
|
-
include
|
30
|
+
include GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Dialogflow::V2::Documents::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 Documents clients
|
47
|
+
# ::Google::Cloud::Dialogflow::V2::Documents::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.timeout = 60.0
|
69
68
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
69
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
70
|
}
|
75
71
|
|
76
72
|
default_config
|
@@ -102,19 +98,15 @@ module Google
|
|
102
98
|
##
|
103
99
|
# Create a new Documents client object.
|
104
100
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
# To create a new Documents client with the default
|
108
|
-
# configuration:
|
101
|
+
# @example
|
109
102
|
#
|
110
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::Documents::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::Dialogflow::V2::Documents::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
118
110
|
#
|
119
111
|
# @yield [config] Configure the Documents 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
|
@@ -232,7 +223,9 @@ module Google
|
|
232
223
|
options.apply_defaults timeout: @config.rpcs.list_documents.timeout,
|
233
224
|
metadata: metadata,
|
234
225
|
retry_policy: @config.rpcs.list_documents.retry_policy
|
235
|
-
|
226
|
+
|
227
|
+
options.apply_defaults timeout: @config.timeout,
|
228
|
+
metadata: @config.metadata,
|
236
229
|
retry_policy: @config.retry_policy
|
237
230
|
|
238
231
|
@documents_stub.call_rpc :list_documents, request, options: options do |response, operation|
|
@@ -301,7 +294,9 @@ module Google
|
|
301
294
|
options.apply_defaults timeout: @config.rpcs.get_document.timeout,
|
302
295
|
metadata: metadata,
|
303
296
|
retry_policy: @config.rpcs.get_document.retry_policy
|
304
|
-
|
297
|
+
|
298
|
+
options.apply_defaults timeout: @config.timeout,
|
299
|
+
metadata: @config.metadata,
|
305
300
|
retry_policy: @config.retry_policy
|
306
301
|
|
307
302
|
@documents_stub.call_rpc :get_document, request, options: options do |response, operation|
|
@@ -374,7 +369,9 @@ module Google
|
|
374
369
|
options.apply_defaults timeout: @config.rpcs.create_document.timeout,
|
375
370
|
metadata: metadata,
|
376
371
|
retry_policy: @config.rpcs.create_document.retry_policy
|
377
|
-
|
372
|
+
|
373
|
+
options.apply_defaults timeout: @config.timeout,
|
374
|
+
metadata: @config.metadata,
|
378
375
|
retry_policy: @config.retry_policy
|
379
376
|
|
380
377
|
@documents_stub.call_rpc :create_document, request, options: options do |response, operation|
|
@@ -446,7 +443,9 @@ module Google
|
|
446
443
|
options.apply_defaults timeout: @config.rpcs.delete_document.timeout,
|
447
444
|
metadata: metadata,
|
448
445
|
retry_policy: @config.rpcs.delete_document.retry_policy
|
449
|
-
|
446
|
+
|
447
|
+
options.apply_defaults timeout: @config.timeout,
|
448
|
+
metadata: @config.metadata,
|
450
449
|
retry_policy: @config.retry_policy
|
451
450
|
|
452
451
|
@documents_stub.call_rpc :delete_document, request, options: options do |response, operation|
|
@@ -520,7 +519,9 @@ module Google
|
|
520
519
|
options.apply_defaults timeout: @config.rpcs.update_document.timeout,
|
521
520
|
metadata: metadata,
|
522
521
|
retry_policy: @config.rpcs.update_document.retry_policy
|
523
|
-
|
522
|
+
|
523
|
+
options.apply_defaults timeout: @config.timeout,
|
524
|
+
metadata: @config.metadata,
|
524
525
|
retry_policy: @config.retry_policy
|
525
526
|
|
526
527
|
@documents_stub.call_rpc :update_document, request, options: options do |response, operation|
|
@@ -604,7 +605,9 @@ module Google
|
|
604
605
|
options.apply_defaults timeout: @config.rpcs.reload_document.timeout,
|
605
606
|
metadata: metadata,
|
606
607
|
retry_policy: @config.rpcs.reload_document.retry_policy
|
607
|
-
|
608
|
+
|
609
|
+
options.apply_defaults timeout: @config.timeout,
|
610
|
+
metadata: @config.metadata,
|
608
611
|
retry_policy: @config.retry_policy
|
609
612
|
|
610
613
|
@documents_stub.call_rpc :reload_document, request, options: options do |response, operation|
|
@@ -629,22 +632,21 @@ module Google
|
|
629
632
|
# Configuration can be applied globally to all clients, or to a single client
|
630
633
|
# on construction.
|
631
634
|
#
|
632
|
-
#
|
633
|
-
#
|
634
|
-
#
|
635
|
-
# to 20 seconds,
|
636
|
-
#
|
637
|
-
#
|
638
|
-
#
|
639
|
-
#
|
640
|
-
#
|
641
|
-
#
|
642
|
-
#
|
643
|
-
#
|
644
|
-
#
|
645
|
-
#
|
646
|
-
#
|
647
|
-
# end
|
635
|
+
# @example
|
636
|
+
#
|
637
|
+
# # Modify the global config, setting the timeout for
|
638
|
+
# # list_documents to 20 seconds,
|
639
|
+
# # and all remaining timeouts to 10 seconds.
|
640
|
+
# ::Google::Cloud::Dialogflow::V2::Documents::Client.configure do |config|
|
641
|
+
# config.timeout = 10.0
|
642
|
+
# config.rpcs.list_documents.timeout = 20.0
|
643
|
+
# end
|
644
|
+
#
|
645
|
+
# # Apply the above configuration only to a new client.
|
646
|
+
# client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new do |config|
|
647
|
+
# config.timeout = 10.0
|
648
|
+
# config.rpcs.list_documents.timeout = 20.0
|
649
|
+
# end
|
648
650
|
#
|
649
651
|
# @!attribute [rw] endpoint
|
650
652
|
# 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.
|