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.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all ConversationProfiles clients:
47
- #
48
- # ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all ConversationProfiles clients
47
+ # ::Google::Cloud::Dialogflow::V2::ConversationProfiles::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 ConversationProfiles client object.
101
100
  #
102
- # ## Examples
103
- #
104
- # To create a new ConversationProfiles client with the default
105
- # configuration:
106
- #
107
- # client = ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.new
101
+ # @example
108
102
  #
109
- # To create a new ConversationProfiles client with a custom
110
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.new
111
105
  #
112
- # client = ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.new do |config|
113
- # config.timeout = 10.0
114
- # end
106
+ # # Create a client using a custom configuration
107
+ # client = ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.new do |config|
108
+ # config.timeout = 10.0
109
+ # end
115
110
  #
116
111
  # @yield [config] Configure the ConversationProfiles 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 scope and endpoint are unchanged from default,
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.scope == Client.configure.scope &&
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
@@ -216,7 +210,9 @@ module Google
216
210
  options.apply_defaults timeout: @config.rpcs.list_conversation_profiles.timeout,
217
211
  metadata: metadata,
218
212
  retry_policy: @config.rpcs.list_conversation_profiles.retry_policy
219
- options.apply_defaults metadata: @config.metadata,
213
+
214
+ options.apply_defaults timeout: @config.timeout,
215
+ metadata: @config.metadata,
220
216
  retry_policy: @config.retry_policy
221
217
 
222
218
  @conversation_profiles_stub.call_rpc :list_conversation_profiles, request, options: options do |response, operation|
@@ -285,7 +281,9 @@ module Google
285
281
  options.apply_defaults timeout: @config.rpcs.get_conversation_profile.timeout,
286
282
  metadata: metadata,
287
283
  retry_policy: @config.rpcs.get_conversation_profile.retry_policy
288
- options.apply_defaults metadata: @config.metadata,
284
+
285
+ options.apply_defaults timeout: @config.timeout,
286
+ metadata: @config.metadata,
289
287
  retry_policy: @config.retry_policy
290
288
 
291
289
  @conversation_profiles_stub.call_rpc :get_conversation_profile, request, options: options do |response, operation|
@@ -358,7 +356,9 @@ module Google
358
356
  options.apply_defaults timeout: @config.rpcs.create_conversation_profile.timeout,
359
357
  metadata: metadata,
360
358
  retry_policy: @config.rpcs.create_conversation_profile.retry_policy
361
- options.apply_defaults metadata: @config.metadata,
359
+
360
+ options.apply_defaults timeout: @config.timeout,
361
+ metadata: @config.metadata,
362
362
  retry_policy: @config.retry_policy
363
363
 
364
364
  @conversation_profiles_stub.call_rpc :create_conversation_profile, request, options: options do |response, operation|
@@ -430,7 +430,9 @@ module Google
430
430
  options.apply_defaults timeout: @config.rpcs.update_conversation_profile.timeout,
431
431
  metadata: metadata,
432
432
  retry_policy: @config.rpcs.update_conversation_profile.retry_policy
433
- options.apply_defaults metadata: @config.metadata,
433
+
434
+ options.apply_defaults timeout: @config.timeout,
435
+ metadata: @config.metadata,
434
436
  retry_policy: @config.retry_policy
435
437
 
436
438
  @conversation_profiles_stub.call_rpc :update_conversation_profile, request, options: options do |response, operation|
@@ -498,7 +500,9 @@ module Google
498
500
  options.apply_defaults timeout: @config.rpcs.delete_conversation_profile.timeout,
499
501
  metadata: metadata,
500
502
  retry_policy: @config.rpcs.delete_conversation_profile.retry_policy
501
- options.apply_defaults metadata: @config.metadata,
503
+
504
+ options.apply_defaults timeout: @config.timeout,
505
+ metadata: @config.metadata,
502
506
  retry_policy: @config.retry_policy
503
507
 
504
508
  @conversation_profiles_stub.call_rpc :delete_conversation_profile, request, options: options do |response, operation|
@@ -522,22 +526,21 @@ module Google
522
526
  # Configuration can be applied globally to all clients, or to a single client
523
527
  # on construction.
524
528
  #
525
- # # Examples
526
- #
527
- # To modify the global config, setting the timeout for list_conversation_profiles
528
- # to 20 seconds, and all remaining timeouts to 10 seconds:
529
- #
530
- # ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.configure do |config|
531
- # config.timeout = 10.0
532
- # config.rpcs.list_conversation_profiles.timeout = 20.0
533
- # end
534
- #
535
- # To apply the above configuration only to a new client:
536
- #
537
- # client = ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.new do |config|
538
- # config.timeout = 10.0
539
- # config.rpcs.list_conversation_profiles.timeout = 20.0
540
- # end
529
+ # @example
530
+ #
531
+ # # Modify the global config, setting the timeout for
532
+ # # list_conversation_profiles to 20 seconds,
533
+ # # and all remaining timeouts to 10 seconds.
534
+ # ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.configure do |config|
535
+ # config.timeout = 10.0
536
+ # config.rpcs.list_conversation_profiles.timeout = 20.0
537
+ # end
538
+ #
539
+ # # Apply the above configuration only to a new client.
540
+ # client = ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.new do |config|
541
+ # config.timeout = 10.0
542
+ # config.rpcs.list_conversation_profiles.timeout = 20.0
543
+ # end
541
544
  #
542
545
  # @!attribute [rw] endpoint
543
546
  # The hostname or hostname:port of the service endpoint.
@@ -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
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all Conversations clients:
47
- #
48
- # ::Google::Cloud::Dialogflow::V2::Conversations::Client.configure do |config|
49
- # config.timeout = 10.0
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]
@@ -99,19 +98,15 @@ module Google
99
98
  ##
100
99
  # Create a new Conversations client object.
101
100
  #
102
- # ## Examples
103
- #
104
- # To create a new Conversations client with the default
105
- # configuration:
106
- #
107
- # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new
101
+ # @example
108
102
  #
109
- # To create a new Conversations client with a custom
110
- # configuration:
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new
111
105
  #
112
- # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new do |config|
113
- # config.timeout = 10.0
114
- # end
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
115
110
  #
116
111
  # @yield [config] Configure the Conversations 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 scope and endpoint are unchanged from default,
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.scope == Client.configure.scope &&
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
@@ -241,7 +235,9 @@ module Google
241
235
  options.apply_defaults timeout: @config.rpcs.create_conversation.timeout,
242
236
  metadata: metadata,
243
237
  retry_policy: @config.rpcs.create_conversation.retry_policy
244
- options.apply_defaults metadata: @config.metadata,
238
+
239
+ options.apply_defaults timeout: @config.timeout,
240
+ metadata: @config.metadata,
245
241
  retry_policy: @config.retry_policy
246
242
 
247
243
  @conversations_stub.call_rpc :create_conversation, request, options: options do |response, operation|
@@ -331,7 +327,9 @@ module Google
331
327
  options.apply_defaults timeout: @config.rpcs.list_conversations.timeout,
332
328
  metadata: metadata,
333
329
  retry_policy: @config.rpcs.list_conversations.retry_policy
334
- options.apply_defaults metadata: @config.metadata,
330
+
331
+ options.apply_defaults timeout: @config.timeout,
332
+ metadata: @config.metadata,
335
333
  retry_policy: @config.retry_policy
336
334
 
337
335
  @conversations_stub.call_rpc :list_conversations, request, options: options do |response, operation|
@@ -400,7 +398,9 @@ module Google
400
398
  options.apply_defaults timeout: @config.rpcs.get_conversation.timeout,
401
399
  metadata: metadata,
402
400
  retry_policy: @config.rpcs.get_conversation.retry_policy
403
- options.apply_defaults metadata: @config.metadata,
401
+
402
+ options.apply_defaults timeout: @config.timeout,
403
+ metadata: @config.metadata,
404
404
  retry_policy: @config.retry_policy
405
405
 
406
406
  @conversations_stub.call_rpc :get_conversation, request, options: options do |response, operation|
@@ -469,7 +469,9 @@ module Google
469
469
  options.apply_defaults timeout: @config.rpcs.complete_conversation.timeout,
470
470
  metadata: metadata,
471
471
  retry_policy: @config.rpcs.complete_conversation.retry_policy
472
- options.apply_defaults metadata: @config.metadata,
472
+
473
+ options.apply_defaults timeout: @config.timeout,
474
+ metadata: @config.metadata,
473
475
  retry_policy: @config.retry_policy
474
476
 
475
477
  @conversations_stub.call_rpc :complete_conversation, request, options: options do |response, operation|
@@ -555,7 +557,9 @@ module Google
555
557
  options.apply_defaults timeout: @config.rpcs.list_messages.timeout,
556
558
  metadata: metadata,
557
559
  retry_policy: @config.rpcs.list_messages.retry_policy
558
- options.apply_defaults metadata: @config.metadata,
560
+
561
+ options.apply_defaults timeout: @config.timeout,
562
+ metadata: @config.metadata,
559
563
  retry_policy: @config.retry_policy
560
564
 
561
565
  @conversations_stub.call_rpc :list_messages, request, options: options do |response, operation|
@@ -580,22 +584,21 @@ module Google
580
584
  # Configuration can be applied globally to all clients, or to a single client
581
585
  # on construction.
582
586
  #
583
- # # Examples
584
- #
585
- # To modify the global config, setting the timeout for create_conversation
586
- # to 20 seconds, and all remaining timeouts to 10 seconds:
587
- #
588
- # ::Google::Cloud::Dialogflow::V2::Conversations::Client.configure do |config|
589
- # config.timeout = 10.0
590
- # config.rpcs.create_conversation.timeout = 20.0
591
- # end
592
- #
593
- # To apply the above configuration only to a new client:
594
- #
595
- # client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new do |config|
596
- # config.timeout = 10.0
597
- # config.rpcs.create_conversation.timeout = 20.0
598
- # 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
599
602
  #
600
603
  # @!attribute [rw] endpoint
601
604
  # The hostname or hostname:port of the service endpoint.
@@ -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
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all Documents clients:
47
- #
48
- # ::Google::Cloud::Dialogflow::V2::Documents::Client.configure do |config|
49
- # config.timeout = 10.0
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]
@@ -99,19 +98,15 @@ module Google
99
98
  ##
100
99
  # Create a new Documents client object.
101
100
  #
102
- # ## Examples
103
- #
104
- # To create a new Documents client with the default
105
- # configuration:
101
+ # @example
106
102
  #
107
- # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new
103
+ # # Create a client using the default configuration
104
+ # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new
108
105
  #
109
- # To create a new Documents client with a custom
110
- # configuration:
111
- #
112
- # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new do |config|
113
- # config.timeout = 10.0
114
- # 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
115
110
  #
116
111
  # @yield [config] Configure the Documents 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 scope and endpoint are unchanged from default,
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.scope == Client.configure.scope &&
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_documents.timeout,
230
224
  metadata: metadata,
231
225
  retry_policy: @config.rpcs.list_documents.retry_policy
232
- options.apply_defaults metadata: @config.metadata,
226
+
227
+ options.apply_defaults timeout: @config.timeout,
228
+ metadata: @config.metadata,
233
229
  retry_policy: @config.retry_policy
234
230
 
235
231
  @documents_stub.call_rpc :list_documents, request, options: options do |response, operation|
@@ -298,7 +294,9 @@ module Google
298
294
  options.apply_defaults timeout: @config.rpcs.get_document.timeout,
299
295
  metadata: metadata,
300
296
  retry_policy: @config.rpcs.get_document.retry_policy
301
- options.apply_defaults metadata: @config.metadata,
297
+
298
+ options.apply_defaults timeout: @config.timeout,
299
+ metadata: @config.metadata,
302
300
  retry_policy: @config.retry_policy
303
301
 
304
302
  @documents_stub.call_rpc :get_document, request, options: options do |response, operation|
@@ -371,7 +369,9 @@ module Google
371
369
  options.apply_defaults timeout: @config.rpcs.create_document.timeout,
372
370
  metadata: metadata,
373
371
  retry_policy: @config.rpcs.create_document.retry_policy
374
- options.apply_defaults metadata: @config.metadata,
372
+
373
+ options.apply_defaults timeout: @config.timeout,
374
+ metadata: @config.metadata,
375
375
  retry_policy: @config.retry_policy
376
376
 
377
377
  @documents_stub.call_rpc :create_document, request, options: options do |response, operation|
@@ -443,7 +443,9 @@ module Google
443
443
  options.apply_defaults timeout: @config.rpcs.delete_document.timeout,
444
444
  metadata: metadata,
445
445
  retry_policy: @config.rpcs.delete_document.retry_policy
446
- options.apply_defaults metadata: @config.metadata,
446
+
447
+ options.apply_defaults timeout: @config.timeout,
448
+ metadata: @config.metadata,
447
449
  retry_policy: @config.retry_policy
448
450
 
449
451
  @documents_stub.call_rpc :delete_document, request, options: options do |response, operation|
@@ -517,7 +519,9 @@ module Google
517
519
  options.apply_defaults timeout: @config.rpcs.update_document.timeout,
518
520
  metadata: metadata,
519
521
  retry_policy: @config.rpcs.update_document.retry_policy
520
- options.apply_defaults metadata: @config.metadata,
522
+
523
+ options.apply_defaults timeout: @config.timeout,
524
+ metadata: @config.metadata,
521
525
  retry_policy: @config.retry_policy
522
526
 
523
527
  @documents_stub.call_rpc :update_document, request, options: options do |response, operation|
@@ -601,7 +605,9 @@ module Google
601
605
  options.apply_defaults timeout: @config.rpcs.reload_document.timeout,
602
606
  metadata: metadata,
603
607
  retry_policy: @config.rpcs.reload_document.retry_policy
604
- options.apply_defaults metadata: @config.metadata,
608
+
609
+ options.apply_defaults timeout: @config.timeout,
610
+ metadata: @config.metadata,
605
611
  retry_policy: @config.retry_policy
606
612
 
607
613
  @documents_stub.call_rpc :reload_document, request, options: options do |response, operation|
@@ -626,22 +632,21 @@ module Google
626
632
  # Configuration can be applied globally to all clients, or to a single client
627
633
  # on construction.
628
634
  #
629
- # # Examples
630
- #
631
- # To modify the global config, setting the timeout for list_documents
632
- # to 20 seconds, and all remaining timeouts to 10 seconds:
633
- #
634
- # ::Google::Cloud::Dialogflow::V2::Documents::Client.configure do |config|
635
- # config.timeout = 10.0
636
- # config.rpcs.list_documents.timeout = 20.0
637
- # end
638
- #
639
- # To apply the above configuration only to a new client:
640
- #
641
- # client = ::Google::Cloud::Dialogflow::V2::Documents::Client.new do |config|
642
- # config.timeout = 10.0
643
- # config.rpcs.list_documents.timeout = 20.0
644
- # 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
645
650
  #
646
651
  # @!attribute [rw] endpoint
647
652
  # The hostname or hostname:port of the service endpoint.