google-cloud-dialogflow-v2 0.11.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/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
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Dialogflow::V2::Participants::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 Participants clients
|
47
|
+
# ::Google::Cloud::Dialogflow::V2::Participants::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]
|
@@ -104,19 +103,15 @@ module Google
|
|
104
103
|
##
|
105
104
|
# Create a new Participants client object.
|
106
105
|
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# To create a new Participants client with the default
|
110
|
-
# configuration:
|
106
|
+
# @example
|
111
107
|
#
|
112
|
-
#
|
108
|
+
# # Create a client using the default configuration
|
109
|
+
# client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new
|
113
110
|
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
118
|
-
# config.timeout = 10.0
|
119
|
-
# end
|
111
|
+
# # Create a client using a custom configuration
|
112
|
+
# client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new do |config|
|
113
|
+
# config.timeout = 10.0
|
114
|
+
# end
|
120
115
|
#
|
121
116
|
# @yield [config] Configure the Participants client.
|
122
117
|
# @yieldparam config [Client::Configuration]
|
@@ -136,10 +131,9 @@ module Google
|
|
136
131
|
|
137
132
|
# Create credentials
|
138
133
|
credentials = @config.credentials
|
139
|
-
# Use self-signed JWT if the
|
134
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
140
135
|
# but only if the default endpoint does not have a region prefix.
|
141
|
-
enable_self_signed_jwt = @config.
|
142
|
-
@config.endpoint == Client.configure.endpoint &&
|
136
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
143
137
|
!@config.endpoint.split(".").first.include?("-")
|
144
138
|
credentials ||= Credentials.default scope: @config.scope,
|
145
139
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -219,7 +213,9 @@ module Google
|
|
219
213
|
options.apply_defaults timeout: @config.rpcs.create_participant.timeout,
|
220
214
|
metadata: metadata,
|
221
215
|
retry_policy: @config.rpcs.create_participant.retry_policy
|
222
|
-
|
216
|
+
|
217
|
+
options.apply_defaults timeout: @config.timeout,
|
218
|
+
metadata: @config.metadata,
|
223
219
|
retry_policy: @config.retry_policy
|
224
220
|
|
225
221
|
@participants_stub.call_rpc :create_participant, request, options: options do |response, operation|
|
@@ -287,7 +283,9 @@ module Google
|
|
287
283
|
options.apply_defaults timeout: @config.rpcs.get_participant.timeout,
|
288
284
|
metadata: metadata,
|
289
285
|
retry_policy: @config.rpcs.get_participant.retry_policy
|
290
|
-
|
286
|
+
|
287
|
+
options.apply_defaults timeout: @config.timeout,
|
288
|
+
metadata: @config.metadata,
|
291
289
|
retry_policy: @config.retry_policy
|
292
290
|
|
293
291
|
@participants_stub.call_rpc :get_participant, request, options: options do |response, operation|
|
@@ -360,7 +358,9 @@ module Google
|
|
360
358
|
options.apply_defaults timeout: @config.rpcs.list_participants.timeout,
|
361
359
|
metadata: metadata,
|
362
360
|
retry_policy: @config.rpcs.list_participants.retry_policy
|
363
|
-
|
361
|
+
|
362
|
+
options.apply_defaults timeout: @config.timeout,
|
363
|
+
metadata: @config.metadata,
|
364
364
|
retry_policy: @config.retry_policy
|
365
365
|
|
366
366
|
@participants_stub.call_rpc :list_participants, request, options: options do |response, operation|
|
@@ -429,7 +429,9 @@ module Google
|
|
429
429
|
options.apply_defaults timeout: @config.rpcs.update_participant.timeout,
|
430
430
|
metadata: metadata,
|
431
431
|
retry_policy: @config.rpcs.update_participant.retry_policy
|
432
|
-
|
432
|
+
|
433
|
+
options.apply_defaults timeout: @config.timeout,
|
434
|
+
metadata: @config.metadata,
|
433
435
|
retry_policy: @config.retry_policy
|
434
436
|
|
435
437
|
@participants_stub.call_rpc :update_participant, request, options: options do |response, operation|
|
@@ -518,7 +520,9 @@ module Google
|
|
518
520
|
options.apply_defaults timeout: @config.rpcs.analyze_content.timeout,
|
519
521
|
metadata: metadata,
|
520
522
|
retry_policy: @config.rpcs.analyze_content.retry_policy
|
521
|
-
|
523
|
+
|
524
|
+
options.apply_defaults timeout: @config.timeout,
|
525
|
+
metadata: @config.metadata,
|
522
526
|
retry_policy: @config.retry_policy
|
523
527
|
|
524
528
|
@participants_stub.call_rpc :analyze_content, request, options: options do |response, operation|
|
@@ -597,7 +601,9 @@ module Google
|
|
597
601
|
options.apply_defaults timeout: @config.rpcs.suggest_articles.timeout,
|
598
602
|
metadata: metadata,
|
599
603
|
retry_policy: @config.rpcs.suggest_articles.retry_policy
|
600
|
-
|
604
|
+
|
605
|
+
options.apply_defaults timeout: @config.timeout,
|
606
|
+
metadata: @config.metadata,
|
601
607
|
retry_policy: @config.retry_policy
|
602
608
|
|
603
609
|
@participants_stub.call_rpc :suggest_articles, request, options: options do |response, operation|
|
@@ -676,7 +682,9 @@ module Google
|
|
676
682
|
options.apply_defaults timeout: @config.rpcs.suggest_faq_answers.timeout,
|
677
683
|
metadata: metadata,
|
678
684
|
retry_policy: @config.rpcs.suggest_faq_answers.retry_policy
|
679
|
-
|
685
|
+
|
686
|
+
options.apply_defaults timeout: @config.timeout,
|
687
|
+
metadata: @config.metadata,
|
680
688
|
retry_policy: @config.retry_policy
|
681
689
|
|
682
690
|
@participants_stub.call_rpc :suggest_faq_answers, request, options: options do |response, operation|
|
@@ -700,22 +708,21 @@ module Google
|
|
700
708
|
# Configuration can be applied globally to all clients, or to a single client
|
701
709
|
# on construction.
|
702
710
|
#
|
703
|
-
#
|
704
|
-
#
|
705
|
-
#
|
706
|
-
# to 20 seconds,
|
707
|
-
#
|
708
|
-
#
|
709
|
-
#
|
710
|
-
#
|
711
|
-
#
|
712
|
-
#
|
713
|
-
#
|
714
|
-
#
|
715
|
-
#
|
716
|
-
#
|
717
|
-
#
|
718
|
-
# end
|
711
|
+
# @example
|
712
|
+
#
|
713
|
+
# # Modify the global config, setting the timeout for
|
714
|
+
# # create_participant to 20 seconds,
|
715
|
+
# # and all remaining timeouts to 10 seconds.
|
716
|
+
# ::Google::Cloud::Dialogflow::V2::Participants::Client.configure do |config|
|
717
|
+
# config.timeout = 10.0
|
718
|
+
# config.rpcs.create_participant.timeout = 20.0
|
719
|
+
# end
|
720
|
+
#
|
721
|
+
# # Apply the above configuration only to a new client.
|
722
|
+
# client = ::Google::Cloud::Dialogflow::V2::Participants::Client.new do |config|
|
723
|
+
# config.timeout = 10.0
|
724
|
+
# config.rpcs.create_participant.timeout = 20.0
|
725
|
+
# end
|
719
726
|
#
|
720
727
|
# @!attribute [rw] endpoint
|
721
728
|
# The hostname or hostname:port of the service endpoint.
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Dialogflow::V2::SessionEntityTypes::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 SessionEntityTypes clients
|
47
|
+
# ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::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 SessionEntityTypes client object.
|
101
100
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# To create a new SessionEntityTypes client with the default
|
105
|
-
# configuration:
|
106
|
-
#
|
107
|
-
# client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
|
101
|
+
# @example
|
108
102
|
#
|
109
|
-
#
|
110
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
|
111
105
|
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
106
|
+
# # Create a client using a custom configuration
|
107
|
+
# client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
115
110
|
#
|
116
111
|
# @yield [config] Configure the SessionEntityTypes 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
|
@@ -224,7 +218,9 @@ module Google
|
|
224
218
|
options.apply_defaults timeout: @config.rpcs.list_session_entity_types.timeout,
|
225
219
|
metadata: metadata,
|
226
220
|
retry_policy: @config.rpcs.list_session_entity_types.retry_policy
|
227
|
-
|
221
|
+
|
222
|
+
options.apply_defaults timeout: @config.timeout,
|
223
|
+
metadata: @config.metadata,
|
228
224
|
retry_policy: @config.retry_policy
|
229
225
|
|
230
226
|
@session_entity_types_stub.call_rpc :list_session_entity_types, request, options: options do |response, operation|
|
@@ -301,7 +297,9 @@ module Google
|
|
301
297
|
options.apply_defaults timeout: @config.rpcs.get_session_entity_type.timeout,
|
302
298
|
metadata: metadata,
|
303
299
|
retry_policy: @config.rpcs.get_session_entity_type.retry_policy
|
304
|
-
|
300
|
+
|
301
|
+
options.apply_defaults timeout: @config.timeout,
|
302
|
+
metadata: @config.metadata,
|
305
303
|
retry_policy: @config.retry_policy
|
306
304
|
|
307
305
|
@session_entity_types_stub.call_rpc :get_session_entity_type, request, options: options do |response, operation|
|
@@ -381,7 +379,9 @@ module Google
|
|
381
379
|
options.apply_defaults timeout: @config.rpcs.create_session_entity_type.timeout,
|
382
380
|
metadata: metadata,
|
383
381
|
retry_policy: @config.rpcs.create_session_entity_type.retry_policy
|
384
|
-
|
382
|
+
|
383
|
+
options.apply_defaults timeout: @config.timeout,
|
384
|
+
metadata: @config.metadata,
|
385
385
|
retry_policy: @config.retry_policy
|
386
386
|
|
387
387
|
@session_entity_types_stub.call_rpc :create_session_entity_type, request, options: options do |response, operation|
|
@@ -453,7 +453,9 @@ module Google
|
|
453
453
|
options.apply_defaults timeout: @config.rpcs.update_session_entity_type.timeout,
|
454
454
|
metadata: metadata,
|
455
455
|
retry_policy: @config.rpcs.update_session_entity_type.retry_policy
|
456
|
-
|
456
|
+
|
457
|
+
options.apply_defaults timeout: @config.timeout,
|
458
|
+
metadata: @config.metadata,
|
457
459
|
retry_policy: @config.retry_policy
|
458
460
|
|
459
461
|
@session_entity_types_stub.call_rpc :update_session_entity_type, request, options: options do |response, operation|
|
@@ -529,7 +531,9 @@ module Google
|
|
529
531
|
options.apply_defaults timeout: @config.rpcs.delete_session_entity_type.timeout,
|
530
532
|
metadata: metadata,
|
531
533
|
retry_policy: @config.rpcs.delete_session_entity_type.retry_policy
|
532
|
-
|
534
|
+
|
535
|
+
options.apply_defaults timeout: @config.timeout,
|
536
|
+
metadata: @config.metadata,
|
533
537
|
retry_policy: @config.retry_policy
|
534
538
|
|
535
539
|
@session_entity_types_stub.call_rpc :delete_session_entity_type, request, options: options do |response, operation|
|
@@ -553,22 +557,21 @@ module Google
|
|
553
557
|
# Configuration can be applied globally to all clients, or to a single client
|
554
558
|
# on construction.
|
555
559
|
#
|
556
|
-
#
|
557
|
-
#
|
558
|
-
#
|
559
|
-
# to 20 seconds,
|
560
|
-
#
|
561
|
-
#
|
562
|
-
#
|
563
|
-
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
#
|
567
|
-
#
|
568
|
-
#
|
569
|
-
#
|
570
|
-
#
|
571
|
-
# end
|
560
|
+
# @example
|
561
|
+
#
|
562
|
+
# # Modify the global config, setting the timeout for
|
563
|
+
# # list_session_entity_types to 20 seconds,
|
564
|
+
# # and all remaining timeouts to 10 seconds.
|
565
|
+
# ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
|
566
|
+
# config.timeout = 10.0
|
567
|
+
# config.rpcs.list_session_entity_types.timeout = 20.0
|
568
|
+
# end
|
569
|
+
#
|
570
|
+
# # Apply the above configuration only to a new client.
|
571
|
+
# client = ::Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
|
572
|
+
# config.timeout = 10.0
|
573
|
+
# config.rpcs.list_session_entity_types.timeout = 20.0
|
574
|
+
# end
|
572
575
|
#
|
573
576
|
# @!attribute [rw] endpoint
|
574
577
|
# The hostname or hostname:port of the service endpoint.
|
@@ -44,13 +44,12 @@ module Google
|
|
44
44
|
# See {::Google::Cloud::Dialogflow::V2::Sessions::Client::Configuration}
|
45
45
|
# for a description of the configuration fields.
|
46
46
|
#
|
47
|
-
#
|
47
|
+
# @example
|
48
48
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
# end
|
49
|
+
# # Modify the configuration for all Sessions clients
|
50
|
+
# ::Google::Cloud::Dialogflow::V2::Sessions::Client.configure do |config|
|
51
|
+
# config.timeout = 10.0
|
52
|
+
# end
|
54
53
|
#
|
55
54
|
# @yield [config] Configure the Client client.
|
56
55
|
# @yieldparam config [Client::Configuration]
|
@@ -109,19 +108,15 @@ module Google
|
|
109
108
|
##
|
110
109
|
# Create a new Sessions client object.
|
111
110
|
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
# To create a new Sessions client with the default
|
115
|
-
# configuration:
|
116
|
-
#
|
117
|
-
# client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new
|
111
|
+
# @example
|
118
112
|
#
|
119
|
-
#
|
120
|
-
#
|
113
|
+
# # Create a client using the default configuration
|
114
|
+
# client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new
|
121
115
|
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
116
|
+
# # Create a client using a custom configuration
|
117
|
+
# client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new do |config|
|
118
|
+
# config.timeout = 10.0
|
119
|
+
# end
|
125
120
|
#
|
126
121
|
# @yield [config] Configure the Sessions client.
|
127
122
|
# @yieldparam config [Client::Configuration]
|
@@ -141,10 +136,9 @@ module Google
|
|
141
136
|
|
142
137
|
# Create credentials
|
143
138
|
credentials = @config.credentials
|
144
|
-
# Use self-signed JWT if the
|
139
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
145
140
|
# but only if the default endpoint does not have a region prefix.
|
146
|
-
enable_self_signed_jwt = @config.
|
147
|
-
@config.endpoint == Client.configure.endpoint &&
|
141
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
148
142
|
!@config.endpoint.split(".").first.include?("-")
|
149
143
|
credentials ||= Credentials.default scope: @config.scope,
|
150
144
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -269,7 +263,9 @@ module Google
|
|
269
263
|
options.apply_defaults timeout: @config.rpcs.detect_intent.timeout,
|
270
264
|
metadata: metadata,
|
271
265
|
retry_policy: @config.rpcs.detect_intent.retry_policy
|
272
|
-
|
266
|
+
|
267
|
+
options.apply_defaults timeout: @config.timeout,
|
268
|
+
metadata: @config.metadata,
|
273
269
|
retry_policy: @config.retry_policy
|
274
270
|
|
275
271
|
@sessions_stub.call_rpc :detect_intent, request, options: options do |response, operation|
|
@@ -327,7 +323,9 @@ module Google
|
|
327
323
|
options.apply_defaults timeout: @config.rpcs.streaming_detect_intent.timeout,
|
328
324
|
metadata: metadata,
|
329
325
|
retry_policy: @config.rpcs.streaming_detect_intent.retry_policy
|
330
|
-
|
326
|
+
|
327
|
+
options.apply_defaults timeout: @config.timeout,
|
328
|
+
metadata: @config.metadata,
|
331
329
|
retry_policy: @config.retry_policy
|
332
330
|
|
333
331
|
@sessions_stub.call_rpc :streaming_detect_intent, request, options: options do |response, operation|
|
@@ -351,22 +349,21 @@ module Google
|
|
351
349
|
# Configuration can be applied globally to all clients, or to a single client
|
352
350
|
# on construction.
|
353
351
|
#
|
354
|
-
#
|
355
|
-
#
|
356
|
-
#
|
357
|
-
# to 20 seconds,
|
358
|
-
#
|
359
|
-
#
|
360
|
-
#
|
361
|
-
#
|
362
|
-
#
|
363
|
-
#
|
364
|
-
#
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
# end
|
352
|
+
# @example
|
353
|
+
#
|
354
|
+
# # Modify the global config, setting the timeout for
|
355
|
+
# # detect_intent to 20 seconds,
|
356
|
+
# # and all remaining timeouts to 10 seconds.
|
357
|
+
# ::Google::Cloud::Dialogflow::V2::Sessions::Client.configure do |config|
|
358
|
+
# config.timeout = 10.0
|
359
|
+
# config.rpcs.detect_intent.timeout = 20.0
|
360
|
+
# end
|
361
|
+
#
|
362
|
+
# # Apply the above configuration only to a new client.
|
363
|
+
# client = ::Google::Cloud::Dialogflow::V2::Sessions::Client.new do |config|
|
364
|
+
# config.timeout = 10.0
|
365
|
+
# config.rpcs.detect_intent.timeout = 20.0
|
366
|
+
# end
|
370
367
|
#
|
371
368
|
# @!attribute [rw] endpoint
|
372
369
|
# The hostname or hostname:port of the service endpoint.
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Dialogflow::V2::Versions::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 Versions clients
|
47
|
+
# ::Google::Cloud::Dialogflow::V2::Versions::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 Versions client object.
|
101
100
|
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# To create a new Versions client with the default
|
105
|
-
# configuration:
|
106
|
-
#
|
107
|
-
# client = ::Google::Cloud::Dialogflow::V2::Versions::Client.new
|
101
|
+
# @example
|
108
102
|
#
|
109
|
-
#
|
110
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::Versions::Client.new
|
111
105
|
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
106
|
+
# # Create a client using a custom configuration
|
107
|
+
# client = ::Google::Cloud::Dialogflow::V2::Versions::Client.new do |config|
|
108
|
+
# config.timeout = 10.0
|
109
|
+
# end
|
115
110
|
#
|
116
111
|
# @yield [config] Configure the Versions 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
|
@@ -219,7 +213,9 @@ module Google
|
|
219
213
|
options.apply_defaults timeout: @config.rpcs.list_versions.timeout,
|
220
214
|
metadata: metadata,
|
221
215
|
retry_policy: @config.rpcs.list_versions.retry_policy
|
222
|
-
|
216
|
+
|
217
|
+
options.apply_defaults timeout: @config.timeout,
|
218
|
+
metadata: @config.metadata,
|
223
219
|
retry_policy: @config.retry_policy
|
224
220
|
|
225
221
|
@versions_stub.call_rpc :list_versions, request, options: options do |response, operation|
|
@@ -291,7 +287,9 @@ module Google
|
|
291
287
|
options.apply_defaults timeout: @config.rpcs.get_version.timeout,
|
292
288
|
metadata: metadata,
|
293
289
|
retry_policy: @config.rpcs.get_version.retry_policy
|
294
|
-
|
290
|
+
|
291
|
+
options.apply_defaults timeout: @config.timeout,
|
292
|
+
metadata: @config.metadata,
|
295
293
|
retry_policy: @config.retry_policy
|
296
294
|
|
297
295
|
@versions_stub.call_rpc :get_version, request, options: options do |response, operation|
|
@@ -365,7 +363,9 @@ module Google
|
|
365
363
|
options.apply_defaults timeout: @config.rpcs.create_version.timeout,
|
366
364
|
metadata: metadata,
|
367
365
|
retry_policy: @config.rpcs.create_version.retry_policy
|
368
|
-
|
366
|
+
|
367
|
+
options.apply_defaults timeout: @config.timeout,
|
368
|
+
metadata: @config.metadata,
|
369
369
|
retry_policy: @config.retry_policy
|
370
370
|
|
371
371
|
@versions_stub.call_rpc :create_version, request, options: options do |response, operation|
|
@@ -442,7 +442,9 @@ module Google
|
|
442
442
|
options.apply_defaults timeout: @config.rpcs.update_version.timeout,
|
443
443
|
metadata: metadata,
|
444
444
|
retry_policy: @config.rpcs.update_version.retry_policy
|
445
|
-
|
445
|
+
|
446
|
+
options.apply_defaults timeout: @config.timeout,
|
447
|
+
metadata: @config.metadata,
|
446
448
|
retry_policy: @config.retry_policy
|
447
449
|
|
448
450
|
@versions_stub.call_rpc :update_version, request, options: options do |response, operation|
|
@@ -513,7 +515,9 @@ module Google
|
|
513
515
|
options.apply_defaults timeout: @config.rpcs.delete_version.timeout,
|
514
516
|
metadata: metadata,
|
515
517
|
retry_policy: @config.rpcs.delete_version.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
|
@versions_stub.call_rpc :delete_version, request, options: options do |response, operation|
|
@@ -537,22 +541,21 @@ module Google
|
|
537
541
|
# Configuration can be applied globally to all clients, or to a single client
|
538
542
|
# on construction.
|
539
543
|
#
|
540
|
-
#
|
541
|
-
#
|
542
|
-
#
|
543
|
-
# to 20 seconds,
|
544
|
-
#
|
545
|
-
#
|
546
|
-
#
|
547
|
-
#
|
548
|
-
#
|
549
|
-
#
|
550
|
-
#
|
551
|
-
#
|
552
|
-
#
|
553
|
-
#
|
554
|
-
#
|
555
|
-
# end
|
544
|
+
# @example
|
545
|
+
#
|
546
|
+
# # Modify the global config, setting the timeout for
|
547
|
+
# # list_versions to 20 seconds,
|
548
|
+
# # and all remaining timeouts to 10 seconds.
|
549
|
+
# ::Google::Cloud::Dialogflow::V2::Versions::Client.configure do |config|
|
550
|
+
# config.timeout = 10.0
|
551
|
+
# config.rpcs.list_versions.timeout = 20.0
|
552
|
+
# end
|
553
|
+
#
|
554
|
+
# # Apply the above configuration only to a new client.
|
555
|
+
# client = ::Google::Cloud::Dialogflow::V2::Versions::Client.new do |config|
|
556
|
+
# config.timeout = 10.0
|
557
|
+
# config.rpcs.list_versions.timeout = 20.0
|
558
|
+
# end
|
556
559
|
#
|
557
560
|
# @!attribute [rw] endpoint
|
558
561
|
# The hostname or hostname:port of the service endpoint.
|