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
@@ -140,6 +140,7 @@ module Google
|
|
140
140
|
|
141
141
|
@operations_client = Operations.new do |config|
|
142
142
|
config.credentials = credentials
|
143
|
+
config.quota_project = @quota_project_id
|
143
144
|
config.endpoint = @config.endpoint
|
144
145
|
end
|
145
146
|
|
@@ -202,6 +203,27 @@ module Google
|
|
202
203
|
#
|
203
204
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
204
205
|
#
|
206
|
+
# @example Basic example
|
207
|
+
# require "google/cloud/dialogflow/v2"
|
208
|
+
#
|
209
|
+
# # Create a client object. The client can be reused for multiple calls.
|
210
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
211
|
+
#
|
212
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
213
|
+
# request = Google::Cloud::Dialogflow::V2::ListEntityTypesRequest.new
|
214
|
+
#
|
215
|
+
# # Call the list_entity_types method.
|
216
|
+
# result = client.list_entity_types request
|
217
|
+
#
|
218
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
219
|
+
# # iterate over all elements by calling #each, and the enumerable
|
220
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
221
|
+
# # methods are also available for managing paging directly.
|
222
|
+
# result.each do |response|
|
223
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::V2::EntityType.
|
224
|
+
# p response
|
225
|
+
# end
|
226
|
+
#
|
205
227
|
def list_entity_types request, options = nil
|
206
228
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
207
229
|
|
@@ -219,9 +241,11 @@ module Google
|
|
219
241
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
220
242
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
221
243
|
|
222
|
-
header_params = {
|
223
|
-
|
224
|
-
|
244
|
+
header_params = {}
|
245
|
+
if request.parent
|
246
|
+
header_params["parent"] = request.parent
|
247
|
+
end
|
248
|
+
|
225
249
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
226
250
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
227
251
|
|
@@ -278,6 +302,21 @@ module Google
|
|
278
302
|
#
|
279
303
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
280
304
|
#
|
305
|
+
# @example Basic example
|
306
|
+
# require "google/cloud/dialogflow/v2"
|
307
|
+
#
|
308
|
+
# # Create a client object. The client can be reused for multiple calls.
|
309
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
310
|
+
#
|
311
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
312
|
+
# request = Google::Cloud::Dialogflow::V2::GetEntityTypeRequest.new
|
313
|
+
#
|
314
|
+
# # Call the get_entity_type method.
|
315
|
+
# result = client.get_entity_type request
|
316
|
+
#
|
317
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::EntityType.
|
318
|
+
# p result
|
319
|
+
#
|
281
320
|
def get_entity_type request, options = nil
|
282
321
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
283
322
|
|
@@ -295,9 +334,11 @@ module Google
|
|
295
334
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
296
335
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
297
336
|
|
298
|
-
header_params = {
|
299
|
-
|
300
|
-
|
337
|
+
header_params = {}
|
338
|
+
if request.name
|
339
|
+
header_params["name"] = request.name
|
340
|
+
end
|
341
|
+
|
301
342
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
302
343
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
303
344
|
|
@@ -359,6 +400,21 @@ module Google
|
|
359
400
|
#
|
360
401
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
361
402
|
#
|
403
|
+
# @example Basic example
|
404
|
+
# require "google/cloud/dialogflow/v2"
|
405
|
+
#
|
406
|
+
# # Create a client object. The client can be reused for multiple calls.
|
407
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
408
|
+
#
|
409
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
410
|
+
# request = Google::Cloud::Dialogflow::V2::CreateEntityTypeRequest.new
|
411
|
+
#
|
412
|
+
# # Call the create_entity_type method.
|
413
|
+
# result = client.create_entity_type request
|
414
|
+
#
|
415
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::EntityType.
|
416
|
+
# p result
|
417
|
+
#
|
362
418
|
def create_entity_type request, options = nil
|
363
419
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
364
420
|
|
@@ -376,9 +432,11 @@ module Google
|
|
376
432
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
377
433
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
378
434
|
|
379
|
-
header_params = {
|
380
|
-
|
381
|
-
|
435
|
+
header_params = {}
|
436
|
+
if request.parent
|
437
|
+
header_params["parent"] = request.parent
|
438
|
+
end
|
439
|
+
|
382
440
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
383
441
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
384
442
|
|
@@ -439,6 +497,21 @@ module Google
|
|
439
497
|
#
|
440
498
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
441
499
|
#
|
500
|
+
# @example Basic example
|
501
|
+
# require "google/cloud/dialogflow/v2"
|
502
|
+
#
|
503
|
+
# # Create a client object. The client can be reused for multiple calls.
|
504
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
505
|
+
#
|
506
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
507
|
+
# request = Google::Cloud::Dialogflow::V2::UpdateEntityTypeRequest.new
|
508
|
+
#
|
509
|
+
# # Call the update_entity_type method.
|
510
|
+
# result = client.update_entity_type request
|
511
|
+
#
|
512
|
+
# # The returned object is of type Google::Cloud::Dialogflow::V2::EntityType.
|
513
|
+
# p result
|
514
|
+
#
|
442
515
|
def update_entity_type request, options = nil
|
443
516
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
444
517
|
|
@@ -456,9 +529,11 @@ module Google
|
|
456
529
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
457
530
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
458
531
|
|
459
|
-
header_params = {
|
460
|
-
|
461
|
-
|
532
|
+
header_params = {}
|
533
|
+
if request.entity_type&.name
|
534
|
+
header_params["entity_type.name"] = request.entity_type.name
|
535
|
+
end
|
536
|
+
|
462
537
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
463
538
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
464
539
|
|
@@ -512,6 +587,21 @@ module Google
|
|
512
587
|
#
|
513
588
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
514
589
|
#
|
590
|
+
# @example Basic example
|
591
|
+
# require "google/cloud/dialogflow/v2"
|
592
|
+
#
|
593
|
+
# # Create a client object. The client can be reused for multiple calls.
|
594
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
595
|
+
#
|
596
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
597
|
+
# request = Google::Cloud::Dialogflow::V2::DeleteEntityTypeRequest.new
|
598
|
+
#
|
599
|
+
# # Call the delete_entity_type method.
|
600
|
+
# result = client.delete_entity_type request
|
601
|
+
#
|
602
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
603
|
+
# p result
|
604
|
+
#
|
515
605
|
def delete_entity_type request, options = nil
|
516
606
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
517
607
|
|
@@ -529,9 +619,11 @@ module Google
|
|
529
619
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
530
620
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
531
621
|
|
532
|
-
header_params = {
|
533
|
-
|
534
|
-
|
622
|
+
header_params = {}
|
623
|
+
if request.name
|
624
|
+
header_params["name"] = request.name
|
625
|
+
end
|
626
|
+
|
535
627
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
536
628
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
537
629
|
|
@@ -608,6 +700,28 @@ module Google
|
|
608
700
|
#
|
609
701
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
610
702
|
#
|
703
|
+
# @example Basic example
|
704
|
+
# require "google/cloud/dialogflow/v2"
|
705
|
+
#
|
706
|
+
# # Create a client object. The client can be reused for multiple calls.
|
707
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
708
|
+
#
|
709
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
710
|
+
# request = Google::Cloud::Dialogflow::V2::BatchUpdateEntityTypesRequest.new
|
711
|
+
#
|
712
|
+
# # Call the batch_update_entity_types method.
|
713
|
+
# result = client.batch_update_entity_types request
|
714
|
+
#
|
715
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
716
|
+
# # object to check the status of an operation, cancel it, or wait
|
717
|
+
# # for results. Here is how to block until completion:
|
718
|
+
# result.wait_until_done! timeout: 60
|
719
|
+
# if result.response?
|
720
|
+
# p result.response
|
721
|
+
# else
|
722
|
+
# puts "Error!"
|
723
|
+
# end
|
724
|
+
#
|
611
725
|
def batch_update_entity_types request, options = nil
|
612
726
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
613
727
|
|
@@ -625,9 +739,11 @@ module Google
|
|
625
739
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
626
740
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
627
741
|
|
628
|
-
header_params = {
|
629
|
-
|
630
|
-
|
742
|
+
header_params = {}
|
743
|
+
if request.parent
|
744
|
+
header_params["parent"] = request.parent
|
745
|
+
end
|
746
|
+
|
631
747
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
632
748
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
633
749
|
|
@@ -694,6 +810,28 @@ module Google
|
|
694
810
|
#
|
695
811
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
696
812
|
#
|
813
|
+
# @example Basic example
|
814
|
+
# require "google/cloud/dialogflow/v2"
|
815
|
+
#
|
816
|
+
# # Create a client object. The client can be reused for multiple calls.
|
817
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
818
|
+
#
|
819
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
820
|
+
# request = Google::Cloud::Dialogflow::V2::BatchDeleteEntityTypesRequest.new
|
821
|
+
#
|
822
|
+
# # Call the batch_delete_entity_types method.
|
823
|
+
# result = client.batch_delete_entity_types request
|
824
|
+
#
|
825
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
826
|
+
# # object to check the status of an operation, cancel it, or wait
|
827
|
+
# # for results. Here is how to block until completion:
|
828
|
+
# result.wait_until_done! timeout: 60
|
829
|
+
# if result.response?
|
830
|
+
# p result.response
|
831
|
+
# else
|
832
|
+
# puts "Error!"
|
833
|
+
# end
|
834
|
+
#
|
697
835
|
def batch_delete_entity_types request, options = nil
|
698
836
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
699
837
|
|
@@ -711,9 +849,11 @@ module Google
|
|
711
849
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
712
850
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
713
851
|
|
714
|
-
header_params = {
|
715
|
-
|
716
|
-
|
852
|
+
header_params = {}
|
853
|
+
if request.parent
|
854
|
+
header_params["parent"] = request.parent
|
855
|
+
end
|
856
|
+
|
717
857
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
718
858
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
719
859
|
|
@@ -785,6 +925,28 @@ module Google
|
|
785
925
|
#
|
786
926
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
787
927
|
#
|
928
|
+
# @example Basic example
|
929
|
+
# require "google/cloud/dialogflow/v2"
|
930
|
+
#
|
931
|
+
# # Create a client object. The client can be reused for multiple calls.
|
932
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
933
|
+
#
|
934
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
935
|
+
# request = Google::Cloud::Dialogflow::V2::BatchCreateEntitiesRequest.new
|
936
|
+
#
|
937
|
+
# # Call the batch_create_entities method.
|
938
|
+
# result = client.batch_create_entities request
|
939
|
+
#
|
940
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
941
|
+
# # object to check the status of an operation, cancel it, or wait
|
942
|
+
# # for results. Here is how to block until completion:
|
943
|
+
# result.wait_until_done! timeout: 60
|
944
|
+
# if result.response?
|
945
|
+
# p result.response
|
946
|
+
# else
|
947
|
+
# puts "Error!"
|
948
|
+
# end
|
949
|
+
#
|
788
950
|
def batch_create_entities request, options = nil
|
789
951
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
790
952
|
|
@@ -802,9 +964,11 @@ module Google
|
|
802
964
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
803
965
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
804
966
|
|
805
|
-
header_params = {
|
806
|
-
|
807
|
-
|
967
|
+
header_params = {}
|
968
|
+
if request.parent
|
969
|
+
header_params["parent"] = request.parent
|
970
|
+
end
|
971
|
+
|
808
972
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
809
973
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
810
974
|
|
@@ -880,6 +1044,28 @@ module Google
|
|
880
1044
|
#
|
881
1045
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
882
1046
|
#
|
1047
|
+
# @example Basic example
|
1048
|
+
# require "google/cloud/dialogflow/v2"
|
1049
|
+
#
|
1050
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1051
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
1052
|
+
#
|
1053
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1054
|
+
# request = Google::Cloud::Dialogflow::V2::BatchUpdateEntitiesRequest.new
|
1055
|
+
#
|
1056
|
+
# # Call the batch_update_entities method.
|
1057
|
+
# result = client.batch_update_entities request
|
1058
|
+
#
|
1059
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1060
|
+
# # object to check the status of an operation, cancel it, or wait
|
1061
|
+
# # for results. Here is how to block until completion:
|
1062
|
+
# result.wait_until_done! timeout: 60
|
1063
|
+
# if result.response?
|
1064
|
+
# p result.response
|
1065
|
+
# else
|
1066
|
+
# puts "Error!"
|
1067
|
+
# end
|
1068
|
+
#
|
883
1069
|
def batch_update_entities request, options = nil
|
884
1070
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
885
1071
|
|
@@ -897,9 +1083,11 @@ module Google
|
|
897
1083
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
898
1084
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
899
1085
|
|
900
|
-
header_params = {
|
901
|
-
|
902
|
-
|
1086
|
+
header_params = {}
|
1087
|
+
if request.parent
|
1088
|
+
header_params["parent"] = request.parent
|
1089
|
+
end
|
1090
|
+
|
903
1091
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
904
1092
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
905
1093
|
|
@@ -973,6 +1161,28 @@ module Google
|
|
973
1161
|
#
|
974
1162
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
975
1163
|
#
|
1164
|
+
# @example Basic example
|
1165
|
+
# require "google/cloud/dialogflow/v2"
|
1166
|
+
#
|
1167
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1168
|
+
# client = Google::Cloud::Dialogflow::V2::EntityTypes::Client.new
|
1169
|
+
#
|
1170
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1171
|
+
# request = Google::Cloud::Dialogflow::V2::BatchDeleteEntitiesRequest.new
|
1172
|
+
#
|
1173
|
+
# # Call the batch_delete_entities method.
|
1174
|
+
# result = client.batch_delete_entities request
|
1175
|
+
#
|
1176
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1177
|
+
# # object to check the status of an operation, cancel it, or wait
|
1178
|
+
# # for results. Here is how to block until completion:
|
1179
|
+
# result.wait_until_done! timeout: 60
|
1180
|
+
# if result.response?
|
1181
|
+
# p result.response
|
1182
|
+
# else
|
1183
|
+
# puts "Error!"
|
1184
|
+
# end
|
1185
|
+
#
|
976
1186
|
def batch_delete_entities request, options = nil
|
977
1187
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
978
1188
|
|
@@ -990,9 +1200,11 @@ module Google
|
|
990
1200
|
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
|
991
1201
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
992
1202
|
|
993
|
-
header_params = {
|
994
|
-
|
995
|
-
|
1203
|
+
header_params = {}
|
1204
|
+
if request.parent
|
1205
|
+
header_params["parent"] = request.parent
|
1206
|
+
end
|
1207
|
+
|
996
1208
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
997
1209
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
998
1210
|
|
@@ -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
|
|