google-cloud-dialogflow-v2 0.11.0 → 0.11.1
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/dialogflow/v2/agents/client.rb +56 -45
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +30 -21
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +35 -38
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +47 -42
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +44 -41
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +44 -41
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +47 -42
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +30 -21
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +59 -46
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +30 -21
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +47 -42
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +35 -38
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +50 -43
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +30 -21
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +44 -41
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +50 -43
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +44 -41
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +35 -38
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +44 -41
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +4 -3
- 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: b4d2b29e726ce9b67ccde9f362e7ea72c2853e473e66c9044c46fcdc95ab3cd6
|
4
|
+
data.tar.gz: 10bea396d32d2e0c8d1fbbe12fe7e2bcc2102717f7e62303665247dce3981f0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59cc1ea02ae7620404dae8eed7eb51ee8c1922a905af1f893651cd63d4be95107f0750ffd112cda7df5a006c07849ac18b8192a2d1827e178c56a0151921f4ce
|
7
|
+
data.tar.gz: 4c48335d9393de2f5743c74a44877196af1c941201bf664b7fc8bb9b6b8ee382a6b9b54059485a07fc4a411f6d3b9451f8e98e564e36298e2aa7a6dbb6b71c63
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Dialogflow::V2::Agents::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 Agents clients
|
47
|
+
# ::Google::Cloud::Dialogflow::V2::Agents::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 Agents client object.
|
101
100
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# To create a new Agents client with the default
|
105
|
-
# configuration:
|
101
|
+
# @example
|
106
102
|
#
|
107
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::Agents::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::Dialogflow::V2::Agents::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
115
110
|
#
|
116
111
|
# @yield [config] Configure the Agents 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
|
@@ -223,7 +217,9 @@ module Google
|
|
223
217
|
options.apply_defaults timeout: @config.rpcs.get_agent.timeout,
|
224
218
|
metadata: metadata,
|
225
219
|
retry_policy: @config.rpcs.get_agent.retry_policy
|
226
|
-
|
220
|
+
|
221
|
+
options.apply_defaults timeout: @config.timeout,
|
222
|
+
metadata: @config.metadata,
|
227
223
|
retry_policy: @config.retry_policy
|
228
224
|
|
229
225
|
@agents_stub.call_rpc :get_agent, request, options: options do |response, operation|
|
@@ -295,7 +291,9 @@ module Google
|
|
295
291
|
options.apply_defaults timeout: @config.rpcs.set_agent.timeout,
|
296
292
|
metadata: metadata,
|
297
293
|
retry_policy: @config.rpcs.set_agent.retry_policy
|
298
|
-
|
294
|
+
|
295
|
+
options.apply_defaults timeout: @config.timeout,
|
296
|
+
metadata: @config.metadata,
|
299
297
|
retry_policy: @config.retry_policy
|
300
298
|
|
301
299
|
@agents_stub.call_rpc :set_agent, request, options: options do |response, operation|
|
@@ -362,7 +360,9 @@ module Google
|
|
362
360
|
options.apply_defaults timeout: @config.rpcs.delete_agent.timeout,
|
363
361
|
metadata: metadata,
|
364
362
|
retry_policy: @config.rpcs.delete_agent.retry_policy
|
365
|
-
|
363
|
+
|
364
|
+
options.apply_defaults timeout: @config.timeout,
|
365
|
+
metadata: @config.metadata,
|
366
366
|
retry_policy: @config.retry_policy
|
367
367
|
|
368
368
|
@agents_stub.call_rpc :delete_agent, request, options: options do |response, operation|
|
@@ -440,7 +440,9 @@ module Google
|
|
440
440
|
options.apply_defaults timeout: @config.rpcs.search_agents.timeout,
|
441
441
|
metadata: metadata,
|
442
442
|
retry_policy: @config.rpcs.search_agents.retry_policy
|
443
|
-
|
443
|
+
|
444
|
+
options.apply_defaults timeout: @config.timeout,
|
445
|
+
metadata: @config.metadata,
|
444
446
|
retry_policy: @config.retry_policy
|
445
447
|
|
446
448
|
@agents_stub.call_rpc :search_agents, request, options: options do |response, operation|
|
@@ -513,7 +515,9 @@ module Google
|
|
513
515
|
options.apply_defaults timeout: @config.rpcs.train_agent.timeout,
|
514
516
|
metadata: metadata,
|
515
517
|
retry_policy: @config.rpcs.train_agent.retry_policy
|
516
|
-
|
518
|
+
|
519
|
+
options.apply_defaults timeout: @config.timeout,
|
520
|
+
metadata: @config.metadata,
|
517
521
|
retry_policy: @config.retry_policy
|
518
522
|
|
519
523
|
@agents_stub.call_rpc :train_agent, request, options: options do |response, operation|
|
@@ -586,7 +590,9 @@ module Google
|
|
586
590
|
options.apply_defaults timeout: @config.rpcs.export_agent.timeout,
|
587
591
|
metadata: metadata,
|
588
592
|
retry_policy: @config.rpcs.export_agent.retry_policy
|
589
|
-
|
593
|
+
|
594
|
+
options.apply_defaults timeout: @config.timeout,
|
595
|
+
metadata: @config.metadata,
|
590
596
|
retry_policy: @config.retry_policy
|
591
597
|
|
592
598
|
@agents_stub.call_rpc :export_agent, request, options: options do |response, operation|
|
@@ -674,7 +680,9 @@ module Google
|
|
674
680
|
options.apply_defaults timeout: @config.rpcs.import_agent.timeout,
|
675
681
|
metadata: metadata,
|
676
682
|
retry_policy: @config.rpcs.import_agent.retry_policy
|
677
|
-
|
683
|
+
|
684
|
+
options.apply_defaults timeout: @config.timeout,
|
685
|
+
metadata: @config.metadata,
|
678
686
|
retry_policy: @config.retry_policy
|
679
687
|
|
680
688
|
@agents_stub.call_rpc :import_agent, request, options: options do |response, operation|
|
@@ -761,7 +769,9 @@ module Google
|
|
761
769
|
options.apply_defaults timeout: @config.rpcs.restore_agent.timeout,
|
762
770
|
metadata: metadata,
|
763
771
|
retry_policy: @config.rpcs.restore_agent.retry_policy
|
764
|
-
|
772
|
+
|
773
|
+
options.apply_defaults timeout: @config.timeout,
|
774
|
+
metadata: @config.metadata,
|
765
775
|
retry_policy: @config.retry_policy
|
766
776
|
|
767
777
|
@agents_stub.call_rpc :restore_agent, request, options: options do |response, operation|
|
@@ -836,7 +846,9 @@ module Google
|
|
836
846
|
options.apply_defaults timeout: @config.rpcs.get_validation_result.timeout,
|
837
847
|
metadata: metadata,
|
838
848
|
retry_policy: @config.rpcs.get_validation_result.retry_policy
|
839
|
-
|
849
|
+
|
850
|
+
options.apply_defaults timeout: @config.timeout,
|
851
|
+
metadata: @config.metadata,
|
840
852
|
retry_policy: @config.retry_policy
|
841
853
|
|
842
854
|
@agents_stub.call_rpc :get_validation_result, request, options: options do |response, operation|
|
@@ -860,22 +872,21 @@ module Google
|
|
860
872
|
# Configuration can be applied globally to all clients, or to a single client
|
861
873
|
# on construction.
|
862
874
|
#
|
863
|
-
#
|
864
|
-
#
|
865
|
-
#
|
866
|
-
# to 20 seconds,
|
867
|
-
#
|
868
|
-
#
|
869
|
-
#
|
870
|
-
#
|
871
|
-
#
|
872
|
-
#
|
873
|
-
#
|
874
|
-
#
|
875
|
-
#
|
876
|
-
#
|
877
|
-
#
|
878
|
-
# end
|
875
|
+
# @example
|
876
|
+
#
|
877
|
+
# # Modify the global config, setting the timeout for
|
878
|
+
# # get_agent to 20 seconds,
|
879
|
+
# # and all remaining timeouts to 10 seconds.
|
880
|
+
# ::Google::Cloud::Dialogflow::V2::Agents::Client.configure do |config|
|
881
|
+
# config.timeout = 10.0
|
882
|
+
# config.rpcs.get_agent.timeout = 20.0
|
883
|
+
# end
|
884
|
+
#
|
885
|
+
# # Apply the above configuration only to a new client.
|
886
|
+
# client = ::Google::Cloud::Dialogflow::V2::Agents::Client.new do |config|
|
887
|
+
# config.timeout = 10.0
|
888
|
+
# config.rpcs.get_agent.timeout = 20.0
|
889
|
+
# end
|
879
890
|
#
|
880
891
|
# @!attribute [rw] endpoint
|
881
892
|
# 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::Dialogflow::V2::AnswerRecords::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 AnswerRecords clients
|
47
|
+
# ::Google::Cloud::Dialogflow::V2::AnswerRecords::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 AnswerRecords client object.
|
101
100
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# To create a new AnswerRecords client with the default
|
105
|
-
# configuration:
|
106
|
-
#
|
107
|
-
# client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new
|
101
|
+
# @example
|
108
102
|
#
|
109
|
-
#
|
110
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new
|
111
105
|
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
106
|
+
# # Create a client using a custom configuration
|
107
|
+
# client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
115
110
|
#
|
116
111
|
# @yield [config] Configure the AnswerRecords 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
|
@@ -229,7 +223,9 @@ module Google
|
|
229
223
|
options.apply_defaults timeout: @config.rpcs.list_answer_records.timeout,
|
230
224
|
metadata: metadata,
|
231
225
|
retry_policy: @config.rpcs.list_answer_records.retry_policy
|
232
|
-
|
226
|
+
|
227
|
+
options.apply_defaults timeout: @config.timeout,
|
228
|
+
metadata: @config.metadata,
|
233
229
|
retry_policy: @config.retry_policy
|
234
230
|
|
235
231
|
@answer_records_stub.call_rpc :list_answer_records, request, options: options do |response, operation|
|
@@ -298,7 +294,9 @@ module Google
|
|
298
294
|
options.apply_defaults timeout: @config.rpcs.update_answer_record.timeout,
|
299
295
|
metadata: metadata,
|
300
296
|
retry_policy: @config.rpcs.update_answer_record.retry_policy
|
301
|
-
|
297
|
+
|
298
|
+
options.apply_defaults timeout: @config.timeout,
|
299
|
+
metadata: @config.metadata,
|
302
300
|
retry_policy: @config.retry_policy
|
303
301
|
|
304
302
|
@answer_records_stub.call_rpc :update_answer_record, request, options: options do |response, operation|
|
@@ -322,22 +320,21 @@ module Google
|
|
322
320
|
# Configuration can be applied globally to all clients, or to a single client
|
323
321
|
# on construction.
|
324
322
|
#
|
325
|
-
#
|
326
|
-
#
|
327
|
-
#
|
328
|
-
# to 20 seconds,
|
329
|
-
#
|
330
|
-
#
|
331
|
-
#
|
332
|
-
#
|
333
|
-
#
|
334
|
-
#
|
335
|
-
#
|
336
|
-
#
|
337
|
-
#
|
338
|
-
#
|
339
|
-
#
|
340
|
-
# end
|
323
|
+
# @example
|
324
|
+
#
|
325
|
+
# # Modify the global config, setting the timeout for
|
326
|
+
# # list_answer_records to 20 seconds,
|
327
|
+
# # and all remaining timeouts to 10 seconds.
|
328
|
+
# ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.configure do |config|
|
329
|
+
# config.timeout = 10.0
|
330
|
+
# config.rpcs.list_answer_records.timeout = 20.0
|
331
|
+
# end
|
332
|
+
#
|
333
|
+
# # Apply the above configuration only to a new client.
|
334
|
+
# client = ::Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new do |config|
|
335
|
+
# config.timeout = 10.0
|
336
|
+
# config.rpcs.list_answer_records.timeout = 20.0
|
337
|
+
# end
|
341
338
|
#
|
342
339
|
# @!attribute [rw] endpoint
|
343
340
|
# The hostname or hostname:port of the service endpoint.
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Dialogflow::V2::Contexts::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 Contexts clients
|
47
|
+
# ::Google::Cloud::Dialogflow::V2::Contexts::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 Contexts client object.
|
101
100
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# To create a new Contexts client with the default
|
105
|
-
# configuration:
|
101
|
+
# @example
|
106
102
|
#
|
107
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::Contexts::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::Dialogflow::V2::Contexts::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
115
110
|
#
|
116
111
|
# @yield [config] Configure the Contexts 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
|
@@ -220,7 +214,9 @@ module Google
|
|
220
214
|
options.apply_defaults timeout: @config.rpcs.list_contexts.timeout,
|
221
215
|
metadata: metadata,
|
222
216
|
retry_policy: @config.rpcs.list_contexts.retry_policy
|
223
|
-
|
217
|
+
|
218
|
+
options.apply_defaults timeout: @config.timeout,
|
219
|
+
metadata: @config.metadata,
|
224
220
|
retry_policy: @config.retry_policy
|
225
221
|
|
226
222
|
@contexts_stub.call_rpc :list_contexts, request, options: options do |response, operation|
|
@@ -292,7 +288,9 @@ module Google
|
|
292
288
|
options.apply_defaults timeout: @config.rpcs.get_context.timeout,
|
293
289
|
metadata: metadata,
|
294
290
|
retry_policy: @config.rpcs.get_context.retry_policy
|
295
|
-
|
291
|
+
|
292
|
+
options.apply_defaults timeout: @config.timeout,
|
293
|
+
metadata: @config.metadata,
|
296
294
|
retry_policy: @config.retry_policy
|
297
295
|
|
298
296
|
@contexts_stub.call_rpc :get_context, request, options: options do |response, operation|
|
@@ -367,7 +365,9 @@ module Google
|
|
367
365
|
options.apply_defaults timeout: @config.rpcs.create_context.timeout,
|
368
366
|
metadata: metadata,
|
369
367
|
retry_policy: @config.rpcs.create_context.retry_policy
|
370
|
-
|
368
|
+
|
369
|
+
options.apply_defaults timeout: @config.timeout,
|
370
|
+
metadata: @config.metadata,
|
371
371
|
retry_policy: @config.retry_policy
|
372
372
|
|
373
373
|
@contexts_stub.call_rpc :create_context, request, options: options do |response, operation|
|
@@ -435,7 +435,9 @@ module Google
|
|
435
435
|
options.apply_defaults timeout: @config.rpcs.update_context.timeout,
|
436
436
|
metadata: metadata,
|
437
437
|
retry_policy: @config.rpcs.update_context.retry_policy
|
438
|
-
|
438
|
+
|
439
|
+
options.apply_defaults timeout: @config.timeout,
|
440
|
+
metadata: @config.metadata,
|
439
441
|
retry_policy: @config.retry_policy
|
440
442
|
|
441
443
|
@contexts_stub.call_rpc :update_context, request, options: options do |response, operation|
|
@@ -506,7 +508,9 @@ module Google
|
|
506
508
|
options.apply_defaults timeout: @config.rpcs.delete_context.timeout,
|
507
509
|
metadata: metadata,
|
508
510
|
retry_policy: @config.rpcs.delete_context.retry_policy
|
509
|
-
|
511
|
+
|
512
|
+
options.apply_defaults timeout: @config.timeout,
|
513
|
+
metadata: @config.metadata,
|
510
514
|
retry_policy: @config.retry_policy
|
511
515
|
|
512
516
|
@contexts_stub.call_rpc :delete_context, request, options: options do |response, operation|
|
@@ -577,7 +581,9 @@ module Google
|
|
577
581
|
options.apply_defaults timeout: @config.rpcs.delete_all_contexts.timeout,
|
578
582
|
metadata: metadata,
|
579
583
|
retry_policy: @config.rpcs.delete_all_contexts.retry_policy
|
580
|
-
|
584
|
+
|
585
|
+
options.apply_defaults timeout: @config.timeout,
|
586
|
+
metadata: @config.metadata,
|
581
587
|
retry_policy: @config.retry_policy
|
582
588
|
|
583
589
|
@contexts_stub.call_rpc :delete_all_contexts, request, options: options do |response, operation|
|
@@ -601,22 +607,21 @@ module Google
|
|
601
607
|
# Configuration can be applied globally to all clients, or to a single client
|
602
608
|
# on construction.
|
603
609
|
#
|
604
|
-
#
|
605
|
-
#
|
606
|
-
#
|
607
|
-
# to 20 seconds,
|
608
|
-
#
|
609
|
-
#
|
610
|
-
#
|
611
|
-
#
|
612
|
-
#
|
613
|
-
#
|
614
|
-
#
|
615
|
-
#
|
616
|
-
#
|
617
|
-
#
|
618
|
-
#
|
619
|
-
# end
|
610
|
+
# @example
|
611
|
+
#
|
612
|
+
# # Modify the global config, setting the timeout for
|
613
|
+
# # list_contexts to 20 seconds,
|
614
|
+
# # and all remaining timeouts to 10 seconds.
|
615
|
+
# ::Google::Cloud::Dialogflow::V2::Contexts::Client.configure do |config|
|
616
|
+
# config.timeout = 10.0
|
617
|
+
# config.rpcs.list_contexts.timeout = 20.0
|
618
|
+
# end
|
619
|
+
#
|
620
|
+
# # Apply the above configuration only to a new client.
|
621
|
+
# client = ::Google::Cloud::Dialogflow::V2::Contexts::Client.new do |config|
|
622
|
+
# config.timeout = 10.0
|
623
|
+
# config.rpcs.list_contexts.timeout = 20.0
|
624
|
+
# end
|
620
625
|
#
|
621
626
|
# @!attribute [rw] endpoint
|
622
627
|
# The hostname or hostname:port of the service endpoint.
|