google-cloud-dialogflow-v2 0.11.4 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +214 -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 +2 -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/documents/client.rb +154 -18
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +241 -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/intents/client.rb +160 -21
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +115 -12
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +106 -15
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +146 -21
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +106 -15
- 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/cloud/dialogflow/v2/conversation_profile.rb +25 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: babf4c27527e0d2aaf7b5ce4722126ff9945da8ab6b3a468d68679b136965c1e
|
4
|
+
data.tar.gz: 32f84284e33348b1046009de909aecbd375b62334ba5a0b223da3146fb094823
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 616c51ceb04996f0efb7902e3b91c7d04593b66dfab7d3e64dcf8fd9eb4caa5300783e3c02e3a60b91a3c9be0513583cb18e8fe0ef26d171c49c8a6e5ac2d585
|
7
|
+
data.tar.gz: dc9f9a747dc77869b20d4fe2206c5edcfb36b8c5bb5952b5621cea57c3b6db22cb2a663c56dde04c2d9dba787aeec96e0fba98ce03dcda8b0b8fcfc15b5e1f9c
|
@@ -191,6 +191,21 @@ module Google
|
|
191
191
|
#
|
192
192
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
193
193
|
#
|
194
|
+
# @example Basic example
|
195
|
+
# require "google/cloud/dialogflow/v2"
|
196
|
+
#
|
197
|
+
# # Create a client object. The client can be reused for multiple calls.
|
198
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
199
|
+
#
|
200
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
201
|
+
# request = Google::Cloud::Dialogflow::V2::GetAgentRequest.new
|
202
|
+
#
|
203
|
+
# # Call the get_agent method.
|
204
|
+
# result = client.get_agent request
|
205
|
+
#
|
206
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Agent.
|
207
|
+
# p result
|
208
|
+
#
|
194
209
|
def get_agent request, options = nil
|
195
210
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
196
211
|
|
@@ -208,9 +223,11 @@ module Google
|
|
208
223
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
209
224
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
210
225
|
|
211
|
-
header_params = {
|
212
|
-
|
213
|
-
|
226
|
+
header_params = {}
|
227
|
+
if request.parent
|
228
|
+
header_params["parent"] = request.parent
|
229
|
+
end
|
230
|
+
|
214
231
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
215
232
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
216
233
|
|
@@ -265,6 +282,21 @@ module Google
|
|
265
282
|
#
|
266
283
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
267
284
|
#
|
285
|
+
# @example Basic example
|
286
|
+
# require "google/cloud/dialogflow/v2"
|
287
|
+
#
|
288
|
+
# # Create a client object. The client can be reused for multiple calls.
|
289
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
290
|
+
#
|
291
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
292
|
+
# request = Google::Cloud::Dialogflow::V2::SetAgentRequest.new
|
293
|
+
#
|
294
|
+
# # Call the set_agent method.
|
295
|
+
# result = client.set_agent request
|
296
|
+
#
|
297
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::Agent.
|
298
|
+
# p result
|
299
|
+
#
|
268
300
|
def set_agent request, options = nil
|
269
301
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
270
302
|
|
@@ -282,9 +314,11 @@ module Google
|
|
282
314
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
283
315
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
284
316
|
|
285
|
-
header_params = {
|
286
|
-
|
287
|
-
|
317
|
+
header_params = {}
|
318
|
+
if request.agent&.parent
|
319
|
+
header_params["agent.parent"] = request.agent.parent
|
320
|
+
end
|
321
|
+
|
288
322
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
289
323
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
290
324
|
|
@@ -334,6 +368,21 @@ module Google
|
|
334
368
|
#
|
335
369
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
336
370
|
#
|
371
|
+
# @example Basic example
|
372
|
+
# require "google/cloud/dialogflow/v2"
|
373
|
+
#
|
374
|
+
# # Create a client object. The client can be reused for multiple calls.
|
375
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
376
|
+
#
|
377
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
378
|
+
# request = Google::Cloud::Dialogflow::V2::DeleteAgentRequest.new
|
379
|
+
#
|
380
|
+
# # Call the delete_agent method.
|
381
|
+
# result = client.delete_agent request
|
382
|
+
#
|
383
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
384
|
+
# p result
|
385
|
+
#
|
337
386
|
def delete_agent request, options = nil
|
338
387
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
339
388
|
|
@@ -351,9 +400,11 @@ module Google
|
|
351
400
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
352
401
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
353
402
|
|
354
|
-
header_params = {
|
355
|
-
|
356
|
-
|
403
|
+
header_params = {}
|
404
|
+
if request.parent
|
405
|
+
header_params["parent"] = request.parent
|
406
|
+
end
|
407
|
+
|
357
408
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
358
409
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
359
410
|
|
@@ -414,6 +465,27 @@ module Google
|
|
414
465
|
#
|
415
466
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
416
467
|
#
|
468
|
+
# @example Basic example
|
469
|
+
# require "google/cloud/dialogflow/v2"
|
470
|
+
#
|
471
|
+
# # Create a client object. The client can be reused for multiple calls.
|
472
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
473
|
+
#
|
474
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
475
|
+
# request = Google::Cloud::Dialogflow::V2::SearchAgentsRequest.new
|
476
|
+
#
|
477
|
+
# # Call the search_agents method.
|
478
|
+
# result = client.search_agents request
|
479
|
+
#
|
480
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
481
|
+
# # iterate over all elements by calling #each, and the enumerable
|
482
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
483
|
+
# # methods are also available for managing paging directly.
|
484
|
+
# result.each do |response|
|
485
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::Agent.
|
486
|
+
# p response
|
487
|
+
# end
|
488
|
+
#
|
417
489
|
def search_agents request, options = nil
|
418
490
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
419
491
|
|
@@ -431,9 +503,11 @@ module Google
|
|
431
503
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
432
504
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
433
505
|
|
434
|
-
header_params = {
|
435
|
-
|
436
|
-
|
506
|
+
header_params = {}
|
507
|
+
if request.parent
|
508
|
+
header_params["parent"] = request.parent
|
509
|
+
end
|
510
|
+
|
437
511
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
438
512
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
439
513
|
|
@@ -497,6 +571,28 @@ module Google
|
|
497
571
|
#
|
498
572
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
499
573
|
#
|
574
|
+
# @example Basic example
|
575
|
+
# require "google/cloud/dialogflow/v2"
|
576
|
+
#
|
577
|
+
# # Create a client object. The client can be reused for multiple calls.
|
578
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
579
|
+
#
|
580
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
581
|
+
# request = Google::Cloud::Dialogflow::V2::TrainAgentRequest.new
|
582
|
+
#
|
583
|
+
# # Call the train_agent method.
|
584
|
+
# result = client.train_agent request
|
585
|
+
#
|
586
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
587
|
+
# # object to check the status of an operation, cancel it, or wait
|
588
|
+
# # for results. Here is how to block until completion:
|
589
|
+
# result.wait_until_done! timeout: 60
|
590
|
+
# if result.response?
|
591
|
+
# p result.response
|
592
|
+
# else
|
593
|
+
# puts "Error!"
|
594
|
+
# end
|
595
|
+
#
|
500
596
|
def train_agent request, options = nil
|
501
597
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
502
598
|
|
@@ -514,9 +610,11 @@ module Google
|
|
514
610
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
515
611
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
516
612
|
|
517
|
-
header_params = {
|
518
|
-
|
519
|
-
|
613
|
+
header_params = {}
|
614
|
+
if request.parent
|
615
|
+
header_params["parent"] = request.parent
|
616
|
+
end
|
617
|
+
|
520
618
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
521
619
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
522
620
|
|
@@ -580,6 +678,28 @@ module Google
|
|
580
678
|
#
|
581
679
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
582
680
|
#
|
681
|
+
# @example Basic example
|
682
|
+
# require "google/cloud/dialogflow/v2"
|
683
|
+
#
|
684
|
+
# # Create a client object. The client can be reused for multiple calls.
|
685
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
686
|
+
#
|
687
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
688
|
+
# request = Google::Cloud::Dialogflow::V2::ExportAgentRequest.new
|
689
|
+
#
|
690
|
+
# # Call the export_agent method.
|
691
|
+
# result = client.export_agent request
|
692
|
+
#
|
693
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
694
|
+
# # object to check the status of an operation, cancel it, or wait
|
695
|
+
# # for results. Here is how to block until completion:
|
696
|
+
# result.wait_until_done! timeout: 60
|
697
|
+
# if result.response?
|
698
|
+
# p result.response
|
699
|
+
# else
|
700
|
+
# puts "Error!"
|
701
|
+
# end
|
702
|
+
#
|
583
703
|
def export_agent request, options = nil
|
584
704
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
585
705
|
|
@@ -597,9 +717,11 @@ module Google
|
|
597
717
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
598
718
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
599
719
|
|
600
|
-
header_params = {
|
601
|
-
|
602
|
-
|
720
|
+
header_params = {}
|
721
|
+
if request.parent
|
722
|
+
header_params["parent"] = request.parent
|
723
|
+
end
|
724
|
+
|
603
725
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
604
726
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
605
727
|
|
@@ -679,6 +801,28 @@ module Google
|
|
679
801
|
#
|
680
802
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
681
803
|
#
|
804
|
+
# @example Basic example
|
805
|
+
# require "google/cloud/dialogflow/v2"
|
806
|
+
#
|
807
|
+
# # Create a client object. The client can be reused for multiple calls.
|
808
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
809
|
+
#
|
810
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
811
|
+
# request = Google::Cloud::Dialogflow::V2::ImportAgentRequest.new
|
812
|
+
#
|
813
|
+
# # Call the import_agent method.
|
814
|
+
# result = client.import_agent request
|
815
|
+
#
|
816
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
817
|
+
# # object to check the status of an operation, cancel it, or wait
|
818
|
+
# # for results. Here is how to block until completion:
|
819
|
+
# result.wait_until_done! timeout: 60
|
820
|
+
# if result.response?
|
821
|
+
# p result.response
|
822
|
+
# else
|
823
|
+
# puts "Error!"
|
824
|
+
# end
|
825
|
+
#
|
682
826
|
def import_agent request, options = nil
|
683
827
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
684
828
|
|
@@ -696,9 +840,11 @@ module Google
|
|
696
840
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
697
841
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
698
842
|
|
699
|
-
header_params = {
|
700
|
-
|
701
|
-
|
843
|
+
header_params = {}
|
844
|
+
if request.parent
|
845
|
+
header_params["parent"] = request.parent
|
846
|
+
end
|
847
|
+
|
702
848
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
703
849
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
704
850
|
|
@@ -777,6 +923,28 @@ module Google
|
|
777
923
|
#
|
778
924
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
779
925
|
#
|
926
|
+
# @example Basic example
|
927
|
+
# require "google/cloud/dialogflow/v2"
|
928
|
+
#
|
929
|
+
# # Create a client object. The client can be reused for multiple calls.
|
930
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
931
|
+
#
|
932
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
933
|
+
# request = Google::Cloud::Dialogflow::V2::RestoreAgentRequest.new
|
934
|
+
#
|
935
|
+
# # Call the restore_agent method.
|
936
|
+
# result = client.restore_agent request
|
937
|
+
#
|
938
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
939
|
+
# # object to check the status of an operation, cancel it, or wait
|
940
|
+
# # for results. Here is how to block until completion:
|
941
|
+
# result.wait_until_done! timeout: 60
|
942
|
+
# if result.response?
|
943
|
+
# p result.response
|
944
|
+
# else
|
945
|
+
# puts "Error!"
|
946
|
+
# end
|
947
|
+
#
|
780
948
|
def restore_agent request, options = nil
|
781
949
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
782
950
|
|
@@ -794,9 +962,11 @@ module Google
|
|
794
962
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
795
963
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
796
964
|
|
797
|
-
header_params = {
|
798
|
-
|
799
|
-
|
965
|
+
header_params = {}
|
966
|
+
if request.parent
|
967
|
+
header_params["parent"] = request.parent
|
968
|
+
end
|
969
|
+
|
800
970
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
801
971
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
802
972
|
|
@@ -854,6 +1024,21 @@ module Google
|
|
854
1024
|
#
|
855
1025
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
856
1026
|
#
|
1027
|
+
# @example Basic example
|
1028
|
+
# require "google/cloud/dialogflow/v2"
|
1029
|
+
#
|
1030
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1031
|
+
# client = Google::Cloud::Dialogflow::V2::Agents::Client.new
|
1032
|
+
#
|
1033
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1034
|
+
# request = Google::Cloud::Dialogflow::V2::GetValidationResultRequest.new
|
1035
|
+
#
|
1036
|
+
# # Call the get_validation_result method.
|
1037
|
+
# result = client.get_validation_result request
|
1038
|
+
#
|
1039
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::ValidationResult.
|
1040
|
+
# p result
|
1041
|
+
#
|
857
1042
|
def get_validation_result request, options = nil
|
858
1043
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
859
1044
|
|
@@ -871,9 +1056,11 @@ module Google
|
|
871
1056
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
872
1057
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
873
1058
|
|
874
|
-
header_params = {
|
875
|
-
|
876
|
-
|
1059
|
+
header_params = {}
|
1060
|
+
if request.parent
|
1061
|
+
header_params["parent"] = request.parent
|
1062
|
+
end
|
1063
|
+
|
877
1064
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
878
1065
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
879
1066
|
|
@@ -143,6 +143,27 @@ module Google
|
|
143
143
|
#
|
144
144
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
145
145
|
#
|
146
|
+
# @example Basic example
|
147
|
+
# require "google/longrunning"
|
148
|
+
#
|
149
|
+
# # Create a client object. The client can be reused for multiple calls.
|
150
|
+
# client = Google::Longrunning::Operations::Client.new
|
151
|
+
#
|
152
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
153
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
154
|
+
#
|
155
|
+
# # Call the list_operations method.
|
156
|
+
# result = client.list_operations request
|
157
|
+
#
|
158
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
159
|
+
# # iterate over all elements by calling #each, and the enumerable
|
160
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
161
|
+
# # methods are also available for managing paging directly.
|
162
|
+
# result.each do |response|
|
163
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
164
|
+
# p response
|
165
|
+
# end
|
166
|
+
#
|
146
167
|
def list_operations request, options = nil
|
147
168
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
148
169
|
|
@@ -160,9 +181,11 @@ module Google
|
|
160
181
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
161
182
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
162
183
|
|
163
|
-
header_params = {
|
164
|
-
|
165
|
-
|
184
|
+
header_params = {}
|
185
|
+
if request.name
|
186
|
+
header_params["name"] = request.name
|
187
|
+
end
|
188
|
+
|
166
189
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
167
190
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
168
191
|
|
@@ -215,6 +238,28 @@ module Google
|
|
215
238
|
#
|
216
239
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
217
240
|
#
|
241
|
+
# @example Basic example
|
242
|
+
# require "google/longrunning"
|
243
|
+
#
|
244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
245
|
+
# client = Google::Longrunning::Operations::Client.new
|
246
|
+
#
|
247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
248
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
249
|
+
#
|
250
|
+
# # Call the get_operation method.
|
251
|
+
# result = client.get_operation request
|
252
|
+
#
|
253
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
254
|
+
# # object to check the status of an operation, cancel it, or wait
|
255
|
+
# # for results. Here is how to block until completion:
|
256
|
+
# result.wait_until_done! timeout: 60
|
257
|
+
# if result.response?
|
258
|
+
# p result.response
|
259
|
+
# else
|
260
|
+
# puts "Error!"
|
261
|
+
# end
|
262
|
+
#
|
218
263
|
def get_operation request, options = nil
|
219
264
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
220
265
|
|
@@ -232,9 +277,11 @@ module Google
|
|
232
277
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
233
278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
234
279
|
|
235
|
-
header_params = {
|
236
|
-
|
237
|
-
|
280
|
+
header_params = {}
|
281
|
+
if request.name
|
282
|
+
header_params["name"] = request.name
|
283
|
+
end
|
284
|
+
|
238
285
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
239
286
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
240
287
|
|
@@ -287,6 +334,21 @@ module Google
|
|
287
334
|
#
|
288
335
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
289
336
|
#
|
337
|
+
# @example Basic example
|
338
|
+
# require "google/longrunning"
|
339
|
+
#
|
340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
341
|
+
# client = Google::Longrunning::Operations::Client.new
|
342
|
+
#
|
343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
344
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
345
|
+
#
|
346
|
+
# # Call the delete_operation method.
|
347
|
+
# result = client.delete_operation request
|
348
|
+
#
|
349
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
350
|
+
# p result
|
351
|
+
#
|
290
352
|
def delete_operation request, options = nil
|
291
353
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
292
354
|
|
@@ -304,9 +366,11 @@ module Google
|
|
304
366
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
305
367
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
306
368
|
|
307
|
-
header_params = {
|
308
|
-
|
309
|
-
|
369
|
+
header_params = {}
|
370
|
+
if request.name
|
371
|
+
header_params["name"] = request.name
|
372
|
+
end
|
373
|
+
|
310
374
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
311
375
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
312
376
|
|
@@ -364,6 +428,21 @@ module Google
|
|
364
428
|
#
|
365
429
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
366
430
|
#
|
431
|
+
# @example Basic example
|
432
|
+
# require "google/longrunning"
|
433
|
+
#
|
434
|
+
# # Create a client object. The client can be reused for multiple calls.
|
435
|
+
# client = Google::Longrunning::Operations::Client.new
|
436
|
+
#
|
437
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
438
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
439
|
+
#
|
440
|
+
# # Call the cancel_operation method.
|
441
|
+
# result = client.cancel_operation request
|
442
|
+
#
|
443
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
444
|
+
# p result
|
445
|
+
#
|
367
446
|
def cancel_operation request, options = nil
|
368
447
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
369
448
|
|
@@ -381,9 +460,11 @@ module Google
|
|
381
460
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
382
461
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
383
462
|
|
384
|
-
header_params = {
|
385
|
-
|
386
|
-
|
463
|
+
header_params = {}
|
464
|
+
if request.name
|
465
|
+
header_params["name"] = request.name
|
466
|
+
end
|
467
|
+
|
387
468
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
388
469
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
389
470
|
|
@@ -444,6 +525,28 @@ module Google
|
|
444
525
|
#
|
445
526
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
446
527
|
#
|
528
|
+
# @example Basic example
|
529
|
+
# require "google/longrunning"
|
530
|
+
#
|
531
|
+
# # Create a client object. The client can be reused for multiple calls.
|
532
|
+
# client = Google::Longrunning::Operations::Client.new
|
533
|
+
#
|
534
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
535
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
536
|
+
#
|
537
|
+
# # Call the wait_operation method.
|
538
|
+
# result = client.wait_operation request
|
539
|
+
#
|
540
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
541
|
+
# # object to check the status of an operation, cancel it, or wait
|
542
|
+
# # for results. Here is how to block until completion:
|
543
|
+
# result.wait_until_done! timeout: 60
|
544
|
+
# if result.response?
|
545
|
+
# p result.response
|
546
|
+
# else
|
547
|
+
# puts "Error!"
|
548
|
+
# end
|
549
|
+
#
|
447
550
|
def wait_operation request, options = nil
|
448
551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
449
552
|
|
@@ -197,6 +197,27 @@ module Google
|
|
197
197
|
#
|
198
198
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
199
199
|
#
|
200
|
+
# @example Basic example
|
201
|
+
# require "google/cloud/dialogflow/v2"
|
202
|
+
#
|
203
|
+
# # Create a client object. The client can be reused for multiple calls.
|
204
|
+
# client = Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new
|
205
|
+
#
|
206
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
207
|
+
# request = Google::Cloud::Dialogflow::V2::ListAnswerRecordsRequest.new
|
208
|
+
#
|
209
|
+
# # Call the list_answer_records method.
|
210
|
+
# result = client.list_answer_records request
|
211
|
+
#
|
212
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
213
|
+
# # iterate over all elements by calling #each, and the enumerable
|
214
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
215
|
+
# # methods are also available for managing paging directly.
|
216
|
+
# result.each do |response|
|
217
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::AnswerRecord.
|
218
|
+
# p response
|
219
|
+
# end
|
220
|
+
#
|
200
221
|
def list_answer_records request, options = nil
|
201
222
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
202
223
|
|
@@ -214,9 +235,11 @@ module Google
|
|
214
235
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
215
236
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
216
237
|
|
217
|
-
header_params = {
|
218
|
-
|
219
|
-
|
238
|
+
header_params = {}
|
239
|
+
if request.parent
|
240
|
+
header_params["parent"] = request.parent
|
241
|
+
end
|
242
|
+
|
220
243
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
221
244
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
222
245
|
|
@@ -268,6 +291,21 @@ module Google
|
|
268
291
|
#
|
269
292
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
270
293
|
#
|
294
|
+
# @example Basic example
|
295
|
+
# require "google/cloud/dialogflow/v2"
|
296
|
+
#
|
297
|
+
# # Create a client object. The client can be reused for multiple calls.
|
298
|
+
# client = Google::Cloud::Dialogflow::V2::AnswerRecords::Client.new
|
299
|
+
#
|
300
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
301
|
+
# request = Google::Cloud::Dialogflow::V2::UpdateAnswerRecordRequest.new
|
302
|
+
#
|
303
|
+
# # Call the update_answer_record method.
|
304
|
+
# result = client.update_answer_record request
|
305
|
+
#
|
306
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::AnswerRecord.
|
307
|
+
# p result
|
308
|
+
#
|
271
309
|
def update_answer_record request, options = nil
|
272
310
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
273
311
|
|
@@ -285,9 +323,11 @@ module Google
|
|
285
323
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
286
324
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
287
325
|
|
288
|
-
header_params = {
|
289
|
-
|
290
|
-
|
326
|
+
header_params = {}
|
327
|
+
if request.answer_record&.name
|
328
|
+
header_params["answer_record.name"] = request.answer_record.name
|
329
|
+
end
|
330
|
+
|
291
331
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
292
332
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
293
333
|
|