google-cloud-dialogflow-v2 0.11.4 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +215 -27
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +46 -6
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +126 -18
- data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +9 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +112 -15
- data/lib/google/cloud/dialogflow/v2/document_pb.rb +33 -0
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +21 -0
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +426 -20
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +242 -30
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +132 -18
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +40 -6
- data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +9 -1
- data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +161 -21
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +134 -16
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +31 -0
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +3 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +268 -28
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +44 -3
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +4 -1
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +41 -8
- data/proto_docs/google/cloud/dialogflow/v2/document.rb +118 -0
- data/proto_docs/google/cloud/dialogflow/v2/gcs.rb +50 -0
- data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +28 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +157 -6
- metadata +4 -3
@@ -209,6 +209,21 @@ module Google
|
|
209
209
|
#
|
210
210
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
211
211
|
#
|
212
|
+
# @example Basic example
|
213
|
+
# require "google/cloud/dialogflow/v2"
|
214
|
+
#
|
215
|
+
# # Create a client object. The client can be reused for multiple calls.
|
216
|
+
# client = Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
217
|
+
#
|
218
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
219
|
+
# request = Google::Cloud::Dialogflow::V2::CreateConversationRequest.new
|
220
|
+
#
|
221
|
+
# # Call the create_conversation method.
|
222
|
+
# result = client.create_conversation request
|
223
|
+
#
|
224
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Conversation.
|
225
|
+
# p result
|
226
|
+
#
|
212
227
|
def create_conversation request, options = nil
|
213
228
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
214
229
|
|
@@ -226,9 +241,11 @@ module Google
|
|
226
241
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
227
242
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
228
243
|
|
229
|
-
header_params = {
|
230
|
-
|
231
|
-
|
244
|
+
header_params = {}
|
245
|
+
if request.parent
|
246
|
+
header_params["parent"] = request.parent
|
247
|
+
end
|
248
|
+
|
232
249
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
233
250
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
234
251
|
|
@@ -301,6 +318,27 @@ module Google
|
|
301
318
|
#
|
302
319
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
303
320
|
#
|
321
|
+
# @example Basic example
|
322
|
+
# require "google/cloud/dialogflow/v2"
|
323
|
+
#
|
324
|
+
# # Create a client object. The client can be reused for multiple calls.
|
325
|
+
# client = Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
326
|
+
#
|
327
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
328
|
+
# request = Google::Cloud::Dialogflow::V2::ListConversationsRequest.new
|
329
|
+
#
|
330
|
+
# # Call the list_conversations method.
|
331
|
+
# result = client.list_conversations request
|
332
|
+
#
|
333
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
334
|
+
# # iterate over all elements by calling #each, and the enumerable
|
335
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
336
|
+
# # methods are also available for managing paging directly.
|
337
|
+
# result.each do |response|
|
338
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::Conversation.
|
339
|
+
# p response
|
340
|
+
# end
|
341
|
+
#
|
304
342
|
def list_conversations request, options = nil
|
305
343
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
306
344
|
|
@@ -318,9 +356,11 @@ module Google
|
|
318
356
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
319
357
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
320
358
|
|
321
|
-
header_params = {
|
322
|
-
|
323
|
-
|
359
|
+
header_params = {}
|
360
|
+
if request.parent
|
361
|
+
header_params["parent"] = request.parent
|
362
|
+
end
|
363
|
+
|
324
364
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
325
365
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
326
366
|
|
@@ -372,6 +412,21 @@ module Google
|
|
372
412
|
#
|
373
413
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
374
414
|
#
|
415
|
+
# @example Basic example
|
416
|
+
# require "google/cloud/dialogflow/v2"
|
417
|
+
#
|
418
|
+
# # Create a client object. The client can be reused for multiple calls.
|
419
|
+
# client = Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
420
|
+
#
|
421
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
422
|
+
# request = Google::Cloud::Dialogflow::V2::GetConversationRequest.new
|
423
|
+
#
|
424
|
+
# # Call the get_conversation method.
|
425
|
+
# result = client.get_conversation request
|
426
|
+
#
|
427
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Conversation.
|
428
|
+
# p result
|
429
|
+
#
|
375
430
|
def get_conversation request, options = nil
|
376
431
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
377
432
|
|
@@ -389,9 +444,11 @@ module Google
|
|
389
444
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
390
445
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
391
446
|
|
392
|
-
header_params = {
|
393
|
-
|
394
|
-
|
447
|
+
header_params = {}
|
448
|
+
if request.name
|
449
|
+
header_params["name"] = request.name
|
450
|
+
end
|
451
|
+
|
395
452
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
396
453
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
397
454
|
|
@@ -443,6 +500,21 @@ module Google
|
|
443
500
|
#
|
444
501
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
445
502
|
#
|
503
|
+
# @example Basic example
|
504
|
+
# require "google/cloud/dialogflow/v2"
|
505
|
+
#
|
506
|
+
# # Create a client object. The client can be reused for multiple calls.
|
507
|
+
# client = Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
508
|
+
#
|
509
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
510
|
+
# request = Google::Cloud::Dialogflow::V2::CompleteConversationRequest.new
|
511
|
+
#
|
512
|
+
# # Call the complete_conversation method.
|
513
|
+
# result = client.complete_conversation request
|
514
|
+
#
|
515
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Conversation.
|
516
|
+
# p result
|
517
|
+
#
|
446
518
|
def complete_conversation request, options = nil
|
447
519
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
448
520
|
|
@@ -460,9 +532,11 @@ module Google
|
|
460
532
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
461
533
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
462
534
|
|
463
|
-
header_params = {
|
464
|
-
|
465
|
-
|
535
|
+
header_params = {}
|
536
|
+
if request.name
|
537
|
+
header_params["name"] = request.name
|
538
|
+
end
|
539
|
+
|
466
540
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
467
541
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
468
542
|
|
@@ -531,6 +605,27 @@ module Google
|
|
531
605
|
#
|
532
606
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
533
607
|
#
|
608
|
+
# @example Basic example
|
609
|
+
# require "google/cloud/dialogflow/v2"
|
610
|
+
#
|
611
|
+
# # Create a client object. The client can be reused for multiple calls.
|
612
|
+
# client = Google::Cloud::Dialogflow::V2::Conversations::Client.new
|
613
|
+
#
|
614
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
615
|
+
# request = Google::Cloud::Dialogflow::V2::ListMessagesRequest.new
|
616
|
+
#
|
617
|
+
# # Call the list_messages method.
|
618
|
+
# result = client.list_messages request
|
619
|
+
#
|
620
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
621
|
+
# # iterate over all elements by calling #each, and the enumerable
|
622
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
623
|
+
# # methods are also available for managing paging directly.
|
624
|
+
# result.each do |response|
|
625
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::Message.
|
626
|
+
# p response
|
627
|
+
# end
|
628
|
+
#
|
534
629
|
def list_messages request, options = nil
|
535
630
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
536
631
|
|
@@ -548,9 +643,11 @@ module Google
|
|
548
643
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
549
644
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
550
645
|
|
551
|
-
header_params = {
|
552
|
-
|
553
|
-
|
646
|
+
header_params = {}
|
647
|
+
if request.parent
|
648
|
+
header_params["parent"] = request.parent
|
649
|
+
end
|
650
|
+
|
554
651
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
555
652
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
556
653
|
|
@@ -5,6 +5,7 @@ require 'google/api/annotations_pb'
|
|
5
5
|
require 'google/api/client_pb'
|
6
6
|
require 'google/api/field_behavior_pb'
|
7
7
|
require 'google/api/resource_pb'
|
8
|
+
require 'google/cloud/dialogflow/v2/gcs_pb'
|
8
9
|
require 'google/longrunning/operations_pb'
|
9
10
|
require 'google/protobuf/field_mask_pb'
|
10
11
|
require 'google/protobuf/timestamp_pb'
|
@@ -43,6 +44,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
43
44
|
optional :parent, :string, 1
|
44
45
|
optional :page_size, :int32, 2
|
45
46
|
optional :page_token, :string, 3
|
47
|
+
optional :filter, :string, 4
|
46
48
|
end
|
47
49
|
add_message "google.cloud.dialogflow.v2.ListDocumentsResponse" do
|
48
50
|
repeated :documents, :message, 1, "google.cloud.dialogflow.v2.Document"
|
@@ -52,6 +54,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
52
54
|
optional :parent, :string, 1
|
53
55
|
optional :document, :message, 2, "google.cloud.dialogflow.v2.Document"
|
54
56
|
end
|
57
|
+
add_message "google.cloud.dialogflow.v2.ImportDocumentsRequest" do
|
58
|
+
optional :parent, :string, 1
|
59
|
+
optional :document_template, :message, 3, "google.cloud.dialogflow.v2.ImportDocumentTemplate"
|
60
|
+
optional :import_gcs_custom_metadata, :bool, 4
|
61
|
+
oneof :source do
|
62
|
+
optional :gcs_source, :message, 2, "google.cloud.dialogflow.v2.GcsSources"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
add_message "google.cloud.dialogflow.v2.ImportDocumentTemplate" do
|
66
|
+
optional :mime_type, :string, 1
|
67
|
+
repeated :knowledge_types, :enum, 2, "google.cloud.dialogflow.v2.Document.KnowledgeType"
|
68
|
+
map :metadata, :string, :string, 3
|
69
|
+
end
|
70
|
+
add_message "google.cloud.dialogflow.v2.ImportDocumentsResponse" do
|
71
|
+
repeated :warnings, :message, 1, "google.rpc.Status"
|
72
|
+
end
|
55
73
|
add_message "google.cloud.dialogflow.v2.DeleteDocumentRequest" do
|
56
74
|
optional :name, :string, 1
|
57
75
|
end
|
@@ -61,12 +79,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
61
79
|
end
|
62
80
|
add_message "google.cloud.dialogflow.v2.ReloadDocumentRequest" do
|
63
81
|
optional :name, :string, 1
|
82
|
+
optional :import_gcs_custom_metadata, :bool, 4
|
83
|
+
optional :smart_messaging_partial_update, :bool, 5
|
64
84
|
oneof :source do
|
65
85
|
optional :content_uri, :string, 3
|
66
86
|
end
|
67
87
|
end
|
88
|
+
add_message "google.cloud.dialogflow.v2.ExportDocumentRequest" do
|
89
|
+
optional :name, :string, 1
|
90
|
+
optional :export_full_content, :bool, 3
|
91
|
+
optional :smart_messaging_partial_update, :bool, 5
|
92
|
+
oneof :destination do
|
93
|
+
optional :gcs_destination, :message, 2, "google.cloud.dialogflow.v2.GcsDestination"
|
94
|
+
end
|
95
|
+
end
|
68
96
|
add_message "google.cloud.dialogflow.v2.KnowledgeOperationMetadata" do
|
69
97
|
optional :state, :enum, 1, "google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State"
|
98
|
+
optional :knowledge_base, :string, 3
|
70
99
|
end
|
71
100
|
add_enum "google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State" do
|
72
101
|
value :STATE_UNSPECIFIED, 0
|
@@ -88,9 +117,13 @@ module Google
|
|
88
117
|
ListDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListDocumentsRequest").msgclass
|
89
118
|
ListDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListDocumentsResponse").msgclass
|
90
119
|
CreateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.CreateDocumentRequest").msgclass
|
120
|
+
ImportDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ImportDocumentsRequest").msgclass
|
121
|
+
ImportDocumentTemplate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ImportDocumentTemplate").msgclass
|
122
|
+
ImportDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ImportDocumentsResponse").msgclass
|
91
123
|
DeleteDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.DeleteDocumentRequest").msgclass
|
92
124
|
UpdateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.UpdateDocumentRequest").msgclass
|
93
125
|
ReloadDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ReloadDocumentRequest").msgclass
|
126
|
+
ExportDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ExportDocumentRequest").msgclass
|
94
127
|
KnowledgeOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.KnowledgeOperationMetadata").msgclass
|
95
128
|
KnowledgeOperationMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State").enummodule
|
96
129
|
end
|
@@ -46,6 +46,17 @@ module Google
|
|
46
46
|
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
47
47
|
# - `response`: [Document][google.cloud.dialogflow.v2.Document]
|
48
48
|
rpc :CreateDocument, ::Google::Cloud::Dialogflow::V2::CreateDocumentRequest, ::Google::Longrunning::Operation
|
49
|
+
# Creates documents by importing data from external sources.
|
50
|
+
# Dialogflow supports up to 350 documents in each request. If you try to
|
51
|
+
# import more, Dialogflow will return an error.
|
52
|
+
#
|
53
|
+
# This method is a [long-running
|
54
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
55
|
+
# The returned `Operation` type has the following method-specific fields:
|
56
|
+
#
|
57
|
+
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
58
|
+
# - `response`: [ImportDocumentsResponse][google.cloud.dialogflow.v2.ImportDocumentsResponse]
|
59
|
+
rpc :ImportDocuments, ::Google::Cloud::Dialogflow::V2::ImportDocumentsRequest, ::Google::Longrunning::Operation
|
49
60
|
# Deletes the specified document.
|
50
61
|
#
|
51
62
|
# This method is a [long-running
|
@@ -80,6 +91,16 @@ module Google
|
|
80
91
|
# Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
|
81
92
|
# only use `projects.knowledgeBases.documents`.
|
82
93
|
rpc :ReloadDocument, ::Google::Cloud::Dialogflow::V2::ReloadDocumentRequest, ::Google::Longrunning::Operation
|
94
|
+
# Exports a smart messaging candidate document into the specified
|
95
|
+
# destination.
|
96
|
+
#
|
97
|
+
# This method is a [long-running
|
98
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
99
|
+
# The returned `Operation` type has the following method-specific fields:
|
100
|
+
#
|
101
|
+
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
102
|
+
# - `response`: [Document][google.cloud.dialogflow.v2.Document]
|
103
|
+
rpc :ExportDocument, ::Google::Cloud::Dialogflow::V2::ExportDocumentRequest, ::Google::Longrunning::Operation
|
83
104
|
end
|
84
105
|
|
85
106
|
Stub = Service.rpc_stub_class
|