google-cloud-dialogflow-v2 0.11.0 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/dialogflow/v2/agent_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +39 -5
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +94 -49
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +30 -21
- data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +35 -38
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +3 -2
- data/lib/google/cloud/dialogflow/v2/context_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +47 -42
- data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +44 -41
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +44 -41
- data/lib/google/cloud/dialogflow/v2/document_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +27 -10
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +73 -51
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +30 -21
- data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +45 -1
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +102 -46
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +30 -21
- data/lib/google/cloud/dialogflow/v2/environment_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +47 -42
- data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +35 -38
- data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +16 -1
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +65 -43
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +30 -21
- data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +44 -41
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +50 -43
- data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +2 -2
- 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 +44 -41
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +15 -1
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +49 -38
- data/lib/google/cloud/dialogflow/v2/validation_result_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +44 -41
- data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +2 -2
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +4 -3
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +4 -3
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +38 -33
- metadata +8 -7
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/context.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
|
|
10
8
|
require 'google/protobuf/empty_pb'
|
11
9
|
require 'google/protobuf/field_mask_pb'
|
12
10
|
require 'google/protobuf/struct_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/cloud/dialogflow/v2/context.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.cloud.dialogflow.v2.Context" do
|
@@ -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.
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/conversation_event.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/cloud/dialogflow/v2/participant_pb'
|
7
5
|
require 'google/rpc/status_pb'
|
8
6
|
require 'google/api/annotations_pb'
|
7
|
+
require 'google/protobuf'
|
8
|
+
|
9
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
10
|
add_file("google/cloud/dialogflow/v2/conversation_event.proto", :syntax => :proto3) do
|
11
11
|
add_message "google.cloud.dialogflow.v2.ConversationEvent" do
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/conversation.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
|
|
10
8
|
require 'google/cloud/dialogflow/v2/participant_pb'
|
11
9
|
require 'google/protobuf/empty_pb'
|
12
10
|
require 'google/protobuf/timestamp_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/cloud/dialogflow/v2/conversation.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.cloud.dialogflow.v2.Conversation" do
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/conversation_profile.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -13,6 +11,8 @@ require 'google/longrunning/operations_pb'
|
|
13
11
|
require 'google/protobuf/empty_pb'
|
14
12
|
require 'google/protobuf/field_mask_pb'
|
15
13
|
require 'google/protobuf/timestamp_pb'
|
14
|
+
require 'google/protobuf'
|
15
|
+
|
16
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
17
|
add_file("google/cloud/dialogflow/v2/conversation_profile.proto", :syntax => :proto3) do
|
18
18
|
add_message "google.cloud.dialogflow.v2.ConversationProfile" do
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# Service for managing [ConversationProfiles][google.cloud.dialogflow.v2.ConversationProfile].
|
28
28
|
class Service
|
29
29
|
|
30
|
-
include GRPC::GenericService
|
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::ConversationProfiles::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 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
|
-
#
|
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
|
-
#
|
110
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client.new
|
111
105
|
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
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
|
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
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
#
|
526
|
-
#
|
527
|
-
#
|
528
|
-
# to 20 seconds,
|
529
|
-
#
|
530
|
-
#
|
531
|
-
#
|
532
|
-
#
|
533
|
-
#
|
534
|
-
#
|
535
|
-
#
|
536
|
-
#
|
537
|
-
#
|
538
|
-
#
|
539
|
-
#
|
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.
|
@@ -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 GRPC::GenericService
|
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]
|
@@ -99,19 +98,15 @@ module Google
|
|
99
98
|
##
|
100
99
|
# Create a new Conversations client object.
|
101
100
|
#
|
102
|
-
#
|
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
|
-
#
|
110
|
-
#
|
103
|
+
# # Create a client using the default configuration
|
104
|
+
# client = ::Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
111
105
|
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
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
|
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
|
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
#
|
584
|
-
#
|
585
|
-
#
|
586
|
-
# to 20 seconds,
|
587
|
-
#
|
588
|
-
#
|
589
|
-
#
|
590
|
-
#
|
591
|
-
#
|
592
|
-
#
|
593
|
-
#
|
594
|
-
#
|
595
|
-
#
|
596
|
-
#
|
597
|
-
#
|
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.
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/dialogflow/v2/document.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -11,6 +9,8 @@ require 'google/longrunning/operations_pb'
|
|
11
9
|
require 'google/protobuf/field_mask_pb'
|
12
10
|
require 'google/protobuf/timestamp_pb'
|
13
11
|
require 'google/rpc/status_pb'
|
12
|
+
require 'google/protobuf'
|
13
|
+
|
14
14
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
15
15
|
add_file("google/cloud/dialogflow/v2/document.proto", :syntax => :proto3) do
|
16
16
|
add_message "google.cloud.dialogflow.v2.Document" do
|
@@ -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 GRPC::GenericService
|
30
|
+
include ::GRPC::GenericService
|
31
31
|
|
32
32
|
self.marshal_class_method = :encode
|
33
33
|
self.unmarshal_class_method = :decode
|
@@ -39,29 +39,46 @@ module Google
|
|
39
39
|
rpc :GetDocument, ::Google::Cloud::Dialogflow::V2::GetDocumentRequest, ::Google::Cloud::Dialogflow::V2::Document
|
40
40
|
# Creates a new document.
|
41
41
|
#
|
42
|
-
#
|
43
|
-
#
|
42
|
+
# This method is a [long-running
|
43
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
44
|
+
# The returned `Operation` type has the following method-specific fields:
|
45
|
+
#
|
46
|
+
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
47
|
+
# - `response`: [Document][google.cloud.dialogflow.v2.Document]
|
44
48
|
rpc :CreateDocument, ::Google::Cloud::Dialogflow::V2::CreateDocumentRequest, ::Google::Longrunning::Operation
|
45
49
|
# Deletes the specified document.
|
46
50
|
#
|
47
|
-
#
|
48
|
-
#
|
51
|
+
# This method is a [long-running
|
52
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
53
|
+
# The returned `Operation` type has the following method-specific fields:
|
54
|
+
#
|
55
|
+
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
56
|
+
# - `response`: An [Empty
|
57
|
+
# message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
|
49
58
|
rpc :DeleteDocument, ::Google::Cloud::Dialogflow::V2::DeleteDocumentRequest, ::Google::Longrunning::Operation
|
50
59
|
# Updates the specified document.
|
51
60
|
#
|
52
|
-
#
|
53
|
-
#
|
61
|
+
# This method is a [long-running
|
62
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
63
|
+
# The returned `Operation` type has the following method-specific fields:
|
64
|
+
#
|
65
|
+
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
66
|
+
# - `response`: [Document][google.cloud.dialogflow.v2.Document]
|
54
67
|
rpc :UpdateDocument, ::Google::Cloud::Dialogflow::V2::UpdateDocumentRequest, ::Google::Longrunning::Operation
|
55
68
|
# Reloads the specified document from its specified source, content_uri or
|
56
69
|
# content. The previously loaded content of the document will be deleted.
|
57
70
|
# Note: Even when the content of the document has not changed, there still
|
58
71
|
# may be side effects because of internal implementation changes.
|
59
72
|
#
|
73
|
+
# This method is a [long-running
|
74
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
75
|
+
# The returned `Operation` type has the following method-specific fields:
|
76
|
+
#
|
77
|
+
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
78
|
+
# - `response`: [Document][google.cloud.dialogflow.v2.Document]
|
79
|
+
#
|
60
80
|
# Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
|
61
81
|
# only use `projects.knowledgeBases.documents`.
|
62
|
-
#
|
63
|
-
# Operation <response: [Document][google.cloud.dialogflow.v2.Document],
|
64
|
-
# metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]>
|
65
82
|
rpc :ReloadDocument, ::Google::Cloud::Dialogflow::V2::ReloadDocumentRequest, ::Google::Longrunning::Operation
|
66
83
|
end
|
67
84
|
|