google-cloud-dialogflow-v2 0.11.3 → 0.13.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/contexts/client.rb +126 -18
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +4 -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 +13 -0
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +10 -0
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +303 -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 +4 -0
- 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 +9 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +155 -24
- 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/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +4 -3
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +4 -1
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +28 -8
- data/proto_docs/google/cloud/dialogflow/v2/document.rb +53 -0
- data/proto_docs/google/cloud/dialogflow/v2/gcs.rb +39 -0
- data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +28 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +69 -0
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +38 -33
- 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"
|
@@ -61,10 +63,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
61
63
|
end
|
62
64
|
add_message "google.cloud.dialogflow.v2.ReloadDocumentRequest" do
|
63
65
|
optional :name, :string, 1
|
66
|
+
optional :import_gcs_custom_metadata, :bool, 4
|
67
|
+
optional :smart_messaging_partial_update, :bool, 5
|
64
68
|
oneof :source do
|
65
69
|
optional :content_uri, :string, 3
|
66
70
|
end
|
67
71
|
end
|
72
|
+
add_message "google.cloud.dialogflow.v2.ExportDocumentRequest" do
|
73
|
+
optional :name, :string, 1
|
74
|
+
optional :export_full_content, :bool, 3
|
75
|
+
optional :smart_messaging_partial_update, :bool, 5
|
76
|
+
oneof :destination do
|
77
|
+
optional :gcs_destination, :message, 2, "google.cloud.dialogflow.v2.GcsDestination"
|
78
|
+
end
|
79
|
+
end
|
68
80
|
add_message "google.cloud.dialogflow.v2.KnowledgeOperationMetadata" do
|
69
81
|
optional :state, :enum, 1, "google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State"
|
70
82
|
end
|
@@ -91,6 +103,7 @@ module Google
|
|
91
103
|
DeleteDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.DeleteDocumentRequest").msgclass
|
92
104
|
UpdateDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.UpdateDocumentRequest").msgclass
|
93
105
|
ReloadDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ReloadDocumentRequest").msgclass
|
106
|
+
ExportDocumentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ExportDocumentRequest").msgclass
|
94
107
|
KnowledgeOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.KnowledgeOperationMetadata").msgclass
|
95
108
|
KnowledgeOperationMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State").enummodule
|
96
109
|
end
|
@@ -80,6 +80,16 @@ module Google
|
|
80
80
|
# Note: The `projects.agent.knowledgeBases.documents` resource is deprecated;
|
81
81
|
# only use `projects.knowledgeBases.documents`.
|
82
82
|
rpc :ReloadDocument, ::Google::Cloud::Dialogflow::V2::ReloadDocumentRequest, ::Google::Longrunning::Operation
|
83
|
+
# Exports a smart messaging candidate document into the specified
|
84
|
+
# destination.
|
85
|
+
#
|
86
|
+
# This method is a [long-running
|
87
|
+
# operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
|
88
|
+
# The returned `Operation` type has the following method-specific fields:
|
89
|
+
#
|
90
|
+
# - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
|
91
|
+
# - `response`: [Document][google.cloud.dialogflow.v2.Document]
|
92
|
+
rpc :ExportDocument, ::Google::Cloud::Dialogflow::V2::ExportDocumentRequest, ::Google::Longrunning::Operation
|
83
93
|
end
|
84
94
|
|
85
95
|
Stub = Service.rpc_stub_class
|