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
@@ -187,6 +187,21 @@ module Google
|
|
187
187
|
#
|
188
188
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
189
189
|
#
|
190
|
+
# @example Basic example
|
191
|
+
# require "google/cloud/dialogflow/v2"
|
192
|
+
#
|
193
|
+
# # Create a client object. The client can be reused for multiple calls.
|
194
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Client.new
|
195
|
+
#
|
196
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
197
|
+
# request = Google::Cloud::Dialogflow::V2::CreateParticipantRequest.new
|
198
|
+
#
|
199
|
+
# # Call the create_participant method.
|
200
|
+
# result = client.create_participant request
|
201
|
+
#
|
202
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Participant.
|
203
|
+
# p result
|
204
|
+
#
|
190
205
|
def create_participant request, options = nil
|
191
206
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
192
207
|
|
@@ -204,9 +219,11 @@ module Google
|
|
204
219
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
205
220
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
206
221
|
|
207
|
-
header_params = {
|
208
|
-
|
209
|
-
|
222
|
+
header_params = {}
|
223
|
+
if request.parent
|
224
|
+
header_params["parent"] = request.parent
|
225
|
+
end
|
226
|
+
|
210
227
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
211
228
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
212
229
|
|
@@ -257,6 +274,21 @@ module Google
|
|
257
274
|
#
|
258
275
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
259
276
|
#
|
277
|
+
# @example Basic example
|
278
|
+
# require "google/cloud/dialogflow/v2"
|
279
|
+
#
|
280
|
+
# # Create a client object. The client can be reused for multiple calls.
|
281
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Client.new
|
282
|
+
#
|
283
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
284
|
+
# request = Google::Cloud::Dialogflow::V2::GetParticipantRequest.new
|
285
|
+
#
|
286
|
+
# # Call the get_participant method.
|
287
|
+
# result = client.get_participant request
|
288
|
+
#
|
289
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Participant.
|
290
|
+
# p result
|
291
|
+
#
|
260
292
|
def get_participant request, options = nil
|
261
293
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
262
294
|
|
@@ -274,9 +306,11 @@ module Google
|
|
274
306
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
275
307
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
276
308
|
|
277
|
-
header_params = {
|
278
|
-
|
279
|
-
|
309
|
+
header_params = {}
|
310
|
+
if request.name
|
311
|
+
header_params["name"] = request.name
|
312
|
+
end
|
313
|
+
|
280
314
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
281
315
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
282
316
|
|
@@ -332,6 +366,27 @@ module Google
|
|
332
366
|
#
|
333
367
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
334
368
|
#
|
369
|
+
# @example Basic example
|
370
|
+
# require "google/cloud/dialogflow/v2"
|
371
|
+
#
|
372
|
+
# # Create a client object. The client can be reused for multiple calls.
|
373
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Client.new
|
374
|
+
#
|
375
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
376
|
+
# request = Google::Cloud::Dialogflow::V2::ListParticipantsRequest.new
|
377
|
+
#
|
378
|
+
# # Call the list_participants method.
|
379
|
+
# result = client.list_participants request
|
380
|
+
#
|
381
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
382
|
+
# # iterate over all elements by calling #each, and the enumerable
|
383
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
384
|
+
# # methods are also available for managing paging directly.
|
385
|
+
# result.each do |response|
|
386
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::Participant.
|
387
|
+
# p response
|
388
|
+
# end
|
389
|
+
#
|
335
390
|
def list_participants request, options = nil
|
336
391
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
337
392
|
|
@@ -349,9 +404,11 @@ module Google
|
|
349
404
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
350
405
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
351
406
|
|
352
|
-
header_params = {
|
353
|
-
|
354
|
-
|
407
|
+
header_params = {}
|
408
|
+
if request.parent
|
409
|
+
header_params["parent"] = request.parent
|
410
|
+
end
|
411
|
+
|
355
412
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
356
413
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
357
414
|
|
@@ -403,6 +460,21 @@ module Google
|
|
403
460
|
#
|
404
461
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
405
462
|
#
|
463
|
+
# @example Basic example
|
464
|
+
# require "google/cloud/dialogflow/v2"
|
465
|
+
#
|
466
|
+
# # Create a client object. The client can be reused for multiple calls.
|
467
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Client.new
|
468
|
+
#
|
469
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
470
|
+
# request = Google::Cloud::Dialogflow::V2::UpdateParticipantRequest.new
|
471
|
+
#
|
472
|
+
# # Call the update_participant method.
|
473
|
+
# result = client.update_participant request
|
474
|
+
#
|
475
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Participant.
|
476
|
+
# p result
|
477
|
+
#
|
406
478
|
def update_participant request, options = nil
|
407
479
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
408
480
|
|
@@ -420,9 +492,11 @@ module Google
|
|
420
492
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
421
493
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
422
494
|
|
423
|
-
header_params = {
|
424
|
-
|
425
|
-
|
495
|
+
header_params = {}
|
496
|
+
if request.participant&.name
|
497
|
+
header_params["participant.name"] = request.participant.name
|
498
|
+
end
|
499
|
+
|
426
500
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
427
501
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
428
502
|
|
@@ -460,7 +534,7 @@ module Google
|
|
460
534
|
# @param options [::Gapic::CallOptions, ::Hash]
|
461
535
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
462
536
|
#
|
463
|
-
# @overload analyze_content(participant: nil, text_input: nil, event_input: nil, reply_audio_config: nil, query_params: nil, request_id: nil)
|
537
|
+
# @overload analyze_content(participant: nil, text_input: nil, event_input: nil, reply_audio_config: nil, query_params: nil, assist_query_params: nil, request_id: nil)
|
464
538
|
# Pass arguments to `analyze_content` via keyword arguments. Note that at
|
465
539
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
466
540
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -481,6 +555,8 @@ module Google
|
|
481
555
|
# is disabled.
|
482
556
|
# @param query_params [::Google::Cloud::Dialogflow::V2::QueryParameters, ::Hash]
|
483
557
|
# Parameters for a Dialogflow virtual-agent query.
|
558
|
+
# @param assist_query_params [::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash]
|
559
|
+
# Parameters for a human assist query.
|
484
560
|
# @param request_id [::String]
|
485
561
|
# A unique identifier for this request. Restricted to 36 ASCII characters.
|
486
562
|
# A random UUID is recommended.
|
@@ -494,6 +570,21 @@ module Google
|
|
494
570
|
#
|
495
571
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
496
572
|
#
|
573
|
+
# @example Basic example
|
574
|
+
# require "google/cloud/dialogflow/v2"
|
575
|
+
#
|
576
|
+
# # Create a client object. The client can be reused for multiple calls.
|
577
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Client.new
|
578
|
+
#
|
579
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
580
|
+
# request = Google::Cloud::Dialogflow::V2::AnalyzeContentRequest.new
|
581
|
+
#
|
582
|
+
# # Call the analyze_content method.
|
583
|
+
# result = client.analyze_content request
|
584
|
+
#
|
585
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::AnalyzeContentResponse.
|
586
|
+
# p result
|
587
|
+
#
|
497
588
|
def analyze_content request, options = nil
|
498
589
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
499
590
|
|
@@ -511,9 +602,11 @@ module Google
|
|
511
602
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
512
603
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
513
604
|
|
514
|
-
header_params = {
|
515
|
-
|
516
|
-
|
605
|
+
header_params = {}
|
606
|
+
if request.participant
|
607
|
+
header_params["participant"] = request.participant
|
608
|
+
end
|
609
|
+
|
517
610
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
518
611
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
519
612
|
|
@@ -547,7 +640,7 @@ module Google
|
|
547
640
|
# @param options [::Gapic::CallOptions, ::Hash]
|
548
641
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
549
642
|
#
|
550
|
-
# @overload suggest_articles(parent: nil, latest_message: nil, context_size: nil)
|
643
|
+
# @overload suggest_articles(parent: nil, latest_message: nil, context_size: nil, assist_query_params: nil)
|
551
644
|
# Pass arguments to `suggest_articles` via keyword arguments. Note that at
|
552
645
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
553
646
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -566,6 +659,8 @@ module Google
|
|
566
659
|
# Max number of messages prior to and including
|
567
660
|
# {::Google::Cloud::Dialogflow::V2::SuggestArticlesRequest#latest_message latest_message} to use as context
|
568
661
|
# when compiling the suggestion. By default 20 and at most 50.
|
662
|
+
# @param assist_query_params [::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash]
|
663
|
+
# Parameters for a human assist query.
|
569
664
|
#
|
570
665
|
# @yield [response, operation] Access the result along with the RPC operation
|
571
666
|
# @yieldparam response [::Google::Cloud::Dialogflow::V2::SuggestArticlesResponse]
|
@@ -575,6 +670,21 @@ module Google
|
|
575
670
|
#
|
576
671
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
577
672
|
#
|
673
|
+
# @example Basic example
|
674
|
+
# require "google/cloud/dialogflow/v2"
|
675
|
+
#
|
676
|
+
# # Create a client object. The client can be reused for multiple calls.
|
677
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Client.new
|
678
|
+
#
|
679
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
680
|
+
# request = Google::Cloud::Dialogflow::V2::SuggestArticlesRequest.new
|
681
|
+
#
|
682
|
+
# # Call the suggest_articles method.
|
683
|
+
# result = client.suggest_articles request
|
684
|
+
#
|
685
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::SuggestArticlesResponse.
|
686
|
+
# p result
|
687
|
+
#
|
578
688
|
def suggest_articles request, options = nil
|
579
689
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
580
690
|
|
@@ -592,9 +702,11 @@ module Google
|
|
592
702
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
593
703
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
594
704
|
|
595
|
-
header_params = {
|
596
|
-
|
597
|
-
|
705
|
+
header_params = {}
|
706
|
+
if request.parent
|
707
|
+
header_params["parent"] = request.parent
|
708
|
+
end
|
709
|
+
|
598
710
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
599
711
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
600
712
|
|
@@ -628,7 +740,7 @@ module Google
|
|
628
740
|
# @param options [::Gapic::CallOptions, ::Hash]
|
629
741
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
630
742
|
#
|
631
|
-
# @overload suggest_faq_answers(parent: nil, latest_message: nil, context_size: nil)
|
743
|
+
# @overload suggest_faq_answers(parent: nil, latest_message: nil, context_size: nil, assist_query_params: nil)
|
632
744
|
# Pass arguments to `suggest_faq_answers` via keyword arguments. Note that at
|
633
745
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
634
746
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -647,6 +759,8 @@ module Google
|
|
647
759
|
# Max number of messages prior to and including
|
648
760
|
# [latest_message] to use as context when compiling the
|
649
761
|
# suggestion. By default 20 and at most 50.
|
762
|
+
# @param assist_query_params [::Google::Cloud::Dialogflow::V2::AssistQueryParameters, ::Hash]
|
763
|
+
# Parameters for a human assist query.
|
650
764
|
#
|
651
765
|
# @yield [response, operation] Access the result along with the RPC operation
|
652
766
|
# @yieldparam response [::Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse]
|
@@ -656,6 +770,21 @@ module Google
|
|
656
770
|
#
|
657
771
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
658
772
|
#
|
773
|
+
# @example Basic example
|
774
|
+
# require "google/cloud/dialogflow/v2"
|
775
|
+
#
|
776
|
+
# # Create a client object. The client can be reused for multiple calls.
|
777
|
+
# client = Google::Cloud::Dialogflow::V2::Participants::Client.new
|
778
|
+
#
|
779
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
780
|
+
# request = Google::Cloud::Dialogflow::V2::SuggestFaqAnswersRequest.new
|
781
|
+
#
|
782
|
+
# # Call the suggest_faq_answers method.
|
783
|
+
# result = client.suggest_faq_answers request
|
784
|
+
#
|
785
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse.
|
786
|
+
# p result
|
787
|
+
#
|
659
788
|
def suggest_faq_answers request, options = nil
|
660
789
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
661
790
|
|
@@ -673,9 +802,11 @@ module Google
|
|
673
802
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
674
803
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
675
804
|
|
676
|
-
header_params = {
|
677
|
-
|
678
|
-
|
805
|
+
header_params = {}
|
806
|
+
if request.parent
|
807
|
+
header_params["parent"] = request.parent
|
808
|
+
end
|
809
|
+
|
679
810
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
680
811
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
681
812
|
|
@@ -192,6 +192,27 @@ module Google
|
|
192
192
|
#
|
193
193
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
194
194
|
#
|
195
|
+
# @example Basic example
|
196
|
+
# require "google/cloud/dialogflow/v2"
|
197
|
+
#
|
198
|
+
# # Create a client object. The client can be reused for multiple calls.
|
199
|
+
# client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
|
200
|
+
#
|
201
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
202
|
+
# request = Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest.new
|
203
|
+
#
|
204
|
+
# # Call the list_session_entity_types method.
|
205
|
+
# result = client.list_session_entity_types request
|
206
|
+
#
|
207
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
208
|
+
# # iterate over all elements by calling #each, and the enumerable
|
209
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
210
|
+
# # methods are also available for managing paging directly.
|
211
|
+
# result.each do |response|
|
212
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::SessionEntityType.
|
213
|
+
# p response
|
214
|
+
# end
|
215
|
+
#
|
195
216
|
def list_session_entity_types request, options = nil
|
196
217
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
197
218
|
|
@@ -209,9 +230,11 @@ module Google
|
|
209
230
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
210
231
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
211
232
|
|
212
|
-
header_params = {
|
213
|
-
|
214
|
-
|
233
|
+
header_params = {}
|
234
|
+
if request.parent
|
235
|
+
header_params["parent"] = request.parent
|
236
|
+
end
|
237
|
+
|
215
238
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
216
239
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
217
240
|
|
@@ -271,6 +294,21 @@ module Google
|
|
271
294
|
#
|
272
295
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
273
296
|
#
|
297
|
+
# @example Basic example
|
298
|
+
# require "google/cloud/dialogflow/v2"
|
299
|
+
#
|
300
|
+
# # Create a client object. The client can be reused for multiple calls.
|
301
|
+
# client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
|
302
|
+
#
|
303
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
304
|
+
# request = Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest.new
|
305
|
+
#
|
306
|
+
# # Call the get_session_entity_type method.
|
307
|
+
# result = client.get_session_entity_type request
|
308
|
+
#
|
309
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::SessionEntityType.
|
310
|
+
# p result
|
311
|
+
#
|
274
312
|
def get_session_entity_type request, options = nil
|
275
313
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
276
314
|
|
@@ -288,9 +326,11 @@ module Google
|
|
288
326
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
289
327
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
290
328
|
|
291
|
-
header_params = {
|
292
|
-
|
293
|
-
|
329
|
+
header_params = {}
|
330
|
+
if request.name
|
331
|
+
header_params["name"] = request.name
|
332
|
+
end
|
333
|
+
|
294
334
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
295
335
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
296
336
|
|
@@ -353,6 +393,21 @@ module Google
|
|
353
393
|
#
|
354
394
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
355
395
|
#
|
396
|
+
# @example Basic example
|
397
|
+
# require "google/cloud/dialogflow/v2"
|
398
|
+
#
|
399
|
+
# # Create a client object. The client can be reused for multiple calls.
|
400
|
+
# client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
|
401
|
+
#
|
402
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
403
|
+
# request = Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest.new
|
404
|
+
#
|
405
|
+
# # Call the create_session_entity_type method.
|
406
|
+
# result = client.create_session_entity_type request
|
407
|
+
#
|
408
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::SessionEntityType.
|
409
|
+
# p result
|
410
|
+
#
|
356
411
|
def create_session_entity_type request, options = nil
|
357
412
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
358
413
|
|
@@ -370,9 +425,11 @@ module Google
|
|
370
425
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
371
426
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
372
427
|
|
373
|
-
header_params = {
|
374
|
-
|
375
|
-
|
428
|
+
header_params = {}
|
429
|
+
if request.parent
|
430
|
+
header_params["parent"] = request.parent
|
431
|
+
end
|
432
|
+
|
376
433
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
377
434
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
378
435
|
|
@@ -427,6 +484,21 @@ module Google
|
|
427
484
|
#
|
428
485
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
429
486
|
#
|
487
|
+
# @example Basic example
|
488
|
+
# require "google/cloud/dialogflow/v2"
|
489
|
+
#
|
490
|
+
# # Create a client object. The client can be reused for multiple calls.
|
491
|
+
# client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
|
492
|
+
#
|
493
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
494
|
+
# request = Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest.new
|
495
|
+
#
|
496
|
+
# # Call the update_session_entity_type method.
|
497
|
+
# result = client.update_session_entity_type request
|
498
|
+
#
|
499
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::SessionEntityType.
|
500
|
+
# p result
|
501
|
+
#
|
430
502
|
def update_session_entity_type request, options = nil
|
431
503
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
432
504
|
|
@@ -444,9 +516,11 @@ module Google
|
|
444
516
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
445
517
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
446
518
|
|
447
|
-
header_params = {
|
448
|
-
|
449
|
-
|
519
|
+
header_params = {}
|
520
|
+
if request.session_entity_type&.name
|
521
|
+
header_params["session_entity_type.name"] = request.session_entity_type.name
|
522
|
+
end
|
523
|
+
|
450
524
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
451
525
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
452
526
|
|
@@ -505,6 +579,21 @@ module Google
|
|
505
579
|
#
|
506
580
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
507
581
|
#
|
582
|
+
# @example Basic example
|
583
|
+
# require "google/cloud/dialogflow/v2"
|
584
|
+
#
|
585
|
+
# # Create a client object. The client can be reused for multiple calls.
|
586
|
+
# client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
|
587
|
+
#
|
588
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
589
|
+
# request = Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest.new
|
590
|
+
#
|
591
|
+
# # Call the delete_session_entity_type method.
|
592
|
+
# result = client.delete_session_entity_type request
|
593
|
+
#
|
594
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
595
|
+
# p result
|
596
|
+
#
|
508
597
|
def delete_session_entity_type request, options = nil
|
509
598
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
510
599
|
|
@@ -522,9 +611,11 @@ module Google
|
|
522
611
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
523
612
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
524
613
|
|
525
|
-
header_params = {
|
526
|
-
|
527
|
-
|
614
|
+
header_params = {}
|
615
|
+
if request.name
|
616
|
+
header_params["name"] = request.name
|
617
|
+
end
|
618
|
+
|
528
619
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
529
620
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
530
621
|
|
@@ -7,6 +7,7 @@ require 'google/api/field_behavior_pb'
|
|
7
7
|
require 'google/api/resource_pb'
|
8
8
|
require 'google/cloud/dialogflow/v2/audio_config_pb'
|
9
9
|
require 'google/cloud/dialogflow/v2/context_pb'
|
10
|
+
require 'google/cloud/dialogflow/v2/gcs_pb'
|
10
11
|
require 'google/cloud/dialogflow/v2/intent_pb'
|
11
12
|
require 'google/cloud/dialogflow/v2/session_entity_type_pb'
|
12
13
|
require 'google/protobuf/duration_pb'
|
@@ -244,6 +244,21 @@ module Google
|
|
244
244
|
#
|
245
245
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
246
246
|
#
|
247
|
+
# @example Basic example
|
248
|
+
# require "google/cloud/dialogflow/v2"
|
249
|
+
#
|
250
|
+
# # Create a client object. The client can be reused for multiple calls.
|
251
|
+
# client = Google::Cloud::Dialogflow::V2::Sessions::Client.new
|
252
|
+
#
|
253
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
254
|
+
# request = Google::Cloud::Dialogflow::V2::DetectIntentRequest.new
|
255
|
+
#
|
256
|
+
# # Call the detect_intent method.
|
257
|
+
# result = client.detect_intent request
|
258
|
+
#
|
259
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::DetectIntentResponse.
|
260
|
+
# p result
|
261
|
+
#
|
247
262
|
def detect_intent request, options = nil
|
248
263
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
249
264
|
|
@@ -261,9 +276,11 @@ module Google
|
|
261
276
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
262
277
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
263
278
|
|
264
|
-
header_params = {
|
265
|
-
|
266
|
-
|
279
|
+
header_params = {}
|
280
|
+
if request.session
|
281
|
+
header_params["session"] = request.session
|
282
|
+
end
|
283
|
+
|
267
284
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
268
285
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
269
286
|
|
@@ -312,6 +329,30 @@ module Google
|
|
312
329
|
#
|
313
330
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
314
331
|
#
|
332
|
+
# @example Basic example
|
333
|
+
# require "google/cloud/dialogflow/v2"
|
334
|
+
#
|
335
|
+
# # Create a client object. The client can be reused for multiple calls.
|
336
|
+
# client = Google::Cloud::Dialogflow::V2::Sessions::Client.new
|
337
|
+
#
|
338
|
+
# # Create an input stream
|
339
|
+
# input = Gapic::StreamInput.new
|
340
|
+
#
|
341
|
+
# # Call the streaming_detect_intent method to start streaming.
|
342
|
+
# output = client.streaming_detect_intent input
|
343
|
+
#
|
344
|
+
# # Send requests on the stream. For each request, pass in keyword
|
345
|
+
# # arguments to set fields. Be sure to close the stream when done.
|
346
|
+
# input << Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest.new
|
347
|
+
# input << Google::Cloud::Dialogflow::V2::StreamingDetectIntentRequest.new
|
348
|
+
# input.close
|
349
|
+
#
|
350
|
+
# # Handle streamed responses. These may be interleaved with inputs.
|
351
|
+
# # Each response is of type ::Google::Cloud::Dialogflow::V2::StreamingDetectIntentResponse.
|
352
|
+
# output.each do |response|
|
353
|
+
# p response
|
354
|
+
# end
|
355
|
+
#
|
315
356
|
def streaming_detect_intent request, options = nil
|
316
357
|
unless request.is_a? ::Enumerable
|
317
358
|
raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum
|