google-cloud-dialogflow-cx-v3 0.2.0 → 0.5.0

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +201 -27
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +115 -12
  6. data/lib/google/cloud/dialogflow/cx/v3/changelog_pb.rb +52 -0
  7. data/lib/google/cloud/dialogflow/cx/v3/changelog_services_pb.rb +49 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +522 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/changelogs/credentials.rb +54 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/changelogs/paths.rb +75 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +51 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +46 -6
  13. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +106 -15
  14. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +1 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +227 -27
  16. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +115 -12
  17. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +146 -21
  18. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +228 -30
  19. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +115 -12
  20. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +106 -15
  21. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +106 -15
  22. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +7 -0
  23. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +106 -15
  24. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +106 -15
  25. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +84 -9
  26. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +281 -36
  27. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +115 -12
  28. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +106 -15
  29. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  30. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +12 -0
  31. data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +2 -0
  32. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +250 -18
  33. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +115 -12
  34. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +2 -0
  35. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +106 -15
  36. data/lib/google/cloud/dialogflow/cx/v3.rb +2 -1
  37. data/proto_docs/google/api/resource.rb +10 -71
  38. data/proto_docs/google/cloud/dialogflow/cx/v3/changelog.rb +122 -0
  39. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +15 -0
  40. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +11 -1
  41. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +54 -42
  42. data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +43 -0
  43. data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +17 -0
  44. metadata +10 -3
@@ -142,6 +142,7 @@ module Google
142
142
 
143
143
  @operations_client = Operations.new do |config|
144
144
  config.credentials = credentials
145
+ config.quota_project = @quota_project_id
145
146
  config.endpoint = @config.endpoint
146
147
  end
147
148
 
@@ -201,6 +202,27 @@ module Google
201
202
  #
202
203
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
203
204
  #
205
+ # @example Basic example
206
+ # require "google/cloud/dialogflow/cx/v3"
207
+ #
208
+ # # Create a client object. The client can be reused for multiple calls.
209
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
210
+ #
211
+ # # Create a request. To set request fields, pass in keyword arguments.
212
+ # request = Google::Cloud::Dialogflow::CX::V3::ListTestCasesRequest.new
213
+ #
214
+ # # Call the list_test_cases method.
215
+ # result = client.list_test_cases request
216
+ #
217
+ # # The returned object is of type Gapic::PagedEnumerable. You can
218
+ # # iterate over all elements by calling #each, and the enumerable
219
+ # # will lazily make API calls to fetch subsequent pages. Other
220
+ # # methods are also available for managing paging directly.
221
+ # result.each do |response|
222
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::TestCase.
223
+ # p response
224
+ # end
225
+ #
204
226
  def list_test_cases request, options = nil
205
227
  raise ::ArgumentError, "request must be provided" if request.nil?
206
228
 
@@ -218,9 +240,11 @@ module Google
218
240
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
219
241
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
220
242
 
221
- header_params = {
222
- "parent" => request.parent
223
- }
243
+ header_params = {}
244
+ if request.parent
245
+ header_params["parent"] = request.parent
246
+ end
247
+
224
248
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
225
249
  metadata[:"x-goog-request-params"] ||= request_params_header
226
250
 
@@ -274,6 +298,21 @@ module Google
274
298
  #
275
299
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
276
300
  #
301
+ # @example Basic example
302
+ # require "google/cloud/dialogflow/cx/v3"
303
+ #
304
+ # # Create a client object. The client can be reused for multiple calls.
305
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
306
+ #
307
+ # # Create a request. To set request fields, pass in keyword arguments.
308
+ # request = Google::Cloud::Dialogflow::CX::V3::BatchDeleteTestCasesRequest.new
309
+ #
310
+ # # Call the batch_delete_test_cases method.
311
+ # result = client.batch_delete_test_cases request
312
+ #
313
+ # # The returned object is of type Google::Protobuf::Empty.
314
+ # p result
315
+ #
277
316
  def batch_delete_test_cases request, options = nil
278
317
  raise ::ArgumentError, "request must be provided" if request.nil?
279
318
 
@@ -291,9 +330,11 @@ module Google
291
330
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
292
331
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
293
332
 
294
- header_params = {
295
- "parent" => request.parent
296
- }
333
+ header_params = {}
334
+ if request.parent
335
+ header_params["parent"] = request.parent
336
+ end
337
+
297
338
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
298
339
  metadata[:"x-goog-request-params"] ||= request_params_header
299
340
 
@@ -344,6 +385,21 @@ module Google
344
385
  #
345
386
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
346
387
  #
388
+ # @example Basic example
389
+ # require "google/cloud/dialogflow/cx/v3"
390
+ #
391
+ # # Create a client object. The client can be reused for multiple calls.
392
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
393
+ #
394
+ # # Create a request. To set request fields, pass in keyword arguments.
395
+ # request = Google::Cloud::Dialogflow::CX::V3::GetTestCaseRequest.new
396
+ #
397
+ # # Call the get_test_case method.
398
+ # result = client.get_test_case request
399
+ #
400
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::TestCase.
401
+ # p result
402
+ #
347
403
  def get_test_case request, options = nil
348
404
  raise ::ArgumentError, "request must be provided" if request.nil?
349
405
 
@@ -361,9 +417,11 @@ module Google
361
417
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
362
418
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
419
 
364
- header_params = {
365
- "name" => request.name
366
- }
420
+ header_params = {}
421
+ if request.name
422
+ header_params["name"] = request.name
423
+ end
424
+
367
425
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
368
426
  metadata[:"x-goog-request-params"] ||= request_params_header
369
427
 
@@ -415,6 +473,21 @@ module Google
415
473
  #
416
474
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
417
475
  #
476
+ # @example Basic example
477
+ # require "google/cloud/dialogflow/cx/v3"
478
+ #
479
+ # # Create a client object. The client can be reused for multiple calls.
480
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
481
+ #
482
+ # # Create a request. To set request fields, pass in keyword arguments.
483
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateTestCaseRequest.new
484
+ #
485
+ # # Call the create_test_case method.
486
+ # result = client.create_test_case request
487
+ #
488
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::TestCase.
489
+ # p result
490
+ #
418
491
  def create_test_case request, options = nil
419
492
  raise ::ArgumentError, "request must be provided" if request.nil?
420
493
 
@@ -432,9 +505,11 @@ module Google
432
505
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
433
506
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
434
507
 
435
- header_params = {
436
- "parent" => request.parent
437
- }
508
+ header_params = {}
509
+ if request.parent
510
+ header_params["parent"] = request.parent
511
+ end
512
+
438
513
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
439
514
  metadata[:"x-goog-request-params"] ||= request_params_header
440
515
 
@@ -487,6 +562,21 @@ module Google
487
562
  #
488
563
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
489
564
  #
565
+ # @example Basic example
566
+ # require "google/cloud/dialogflow/cx/v3"
567
+ #
568
+ # # Create a client object. The client can be reused for multiple calls.
569
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
570
+ #
571
+ # # Create a request. To set request fields, pass in keyword arguments.
572
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateTestCaseRequest.new
573
+ #
574
+ # # Call the update_test_case method.
575
+ # result = client.update_test_case request
576
+ #
577
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::TestCase.
578
+ # p result
579
+ #
490
580
  def update_test_case request, options = nil
491
581
  raise ::ArgumentError, "request must be provided" if request.nil?
492
582
 
@@ -504,9 +594,11 @@ module Google
504
594
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
505
595
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
596
 
507
- header_params = {
508
- "test_case.name" => request.test_case.name
509
- }
597
+ header_params = {}
598
+ if request.test_case&.name
599
+ header_params["test_case.name"] = request.test_case.name
600
+ end
601
+
510
602
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
511
603
  metadata[:"x-goog-request-params"] ||= request_params_header
512
604
 
@@ -567,6 +659,28 @@ module Google
567
659
  #
568
660
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
569
661
  #
662
+ # @example Basic example
663
+ # require "google/cloud/dialogflow/cx/v3"
664
+ #
665
+ # # Create a client object. The client can be reused for multiple calls.
666
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
667
+ #
668
+ # # Create a request. To set request fields, pass in keyword arguments.
669
+ # request = Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest.new
670
+ #
671
+ # # Call the run_test_case method.
672
+ # result = client.run_test_case request
673
+ #
674
+ # # The returned object is of type Gapic::Operation. You can use this
675
+ # # object to check the status of an operation, cancel it, or wait
676
+ # # for results. Here is how to block until completion:
677
+ # result.wait_until_done! timeout: 60
678
+ # if result.response?
679
+ # p result.response
680
+ # else
681
+ # puts "Error!"
682
+ # end
683
+ #
570
684
  def run_test_case request, options = nil
571
685
  raise ::ArgumentError, "request must be provided" if request.nil?
572
686
 
@@ -584,9 +698,11 @@ module Google
584
698
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
585
699
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
586
700
 
587
- header_params = {
588
- "name" => request.name
589
- }
701
+ header_params = {}
702
+ if request.name
703
+ header_params["name"] = request.name
704
+ end
705
+
590
706
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
591
707
  metadata[:"x-goog-request-params"] ||= request_params_header
592
708
 
@@ -651,6 +767,28 @@ module Google
651
767
  #
652
768
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
653
769
  #
770
+ # @example Basic example
771
+ # require "google/cloud/dialogflow/cx/v3"
772
+ #
773
+ # # Create a client object. The client can be reused for multiple calls.
774
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
775
+ #
776
+ # # Create a request. To set request fields, pass in keyword arguments.
777
+ # request = Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest.new
778
+ #
779
+ # # Call the batch_run_test_cases method.
780
+ # result = client.batch_run_test_cases request
781
+ #
782
+ # # The returned object is of type Gapic::Operation. You can use this
783
+ # # object to check the status of an operation, cancel it, or wait
784
+ # # for results. Here is how to block until completion:
785
+ # result.wait_until_done! timeout: 60
786
+ # if result.response?
787
+ # p result.response
788
+ # else
789
+ # puts "Error!"
790
+ # end
791
+ #
654
792
  def batch_run_test_cases request, options = nil
655
793
  raise ::ArgumentError, "request must be provided" if request.nil?
656
794
 
@@ -668,9 +806,11 @@ module Google
668
806
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
669
807
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
670
808
 
671
- header_params = {
672
- "parent" => request.parent
673
- }
809
+ header_params = {}
810
+ if request.parent
811
+ header_params["parent"] = request.parent
812
+ end
813
+
674
814
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
675
815
  metadata[:"x-goog-request-params"] ||= request_params_header
676
816
 
@@ -723,6 +863,21 @@ module Google
723
863
  #
724
864
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
725
865
  #
866
+ # @example Basic example
867
+ # require "google/cloud/dialogflow/cx/v3"
868
+ #
869
+ # # Create a client object. The client can be reused for multiple calls.
870
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
871
+ #
872
+ # # Create a request. To set request fields, pass in keyword arguments.
873
+ # request = Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest.new
874
+ #
875
+ # # Call the calculate_coverage method.
876
+ # result = client.calculate_coverage request
877
+ #
878
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::CalculateCoverageResponse.
879
+ # p result
880
+ #
726
881
  def calculate_coverage request, options = nil
727
882
  raise ::ArgumentError, "request must be provided" if request.nil?
728
883
 
@@ -740,9 +895,11 @@ module Google
740
895
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
741
896
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
742
897
 
743
- header_params = {
744
- "agent" => request.agent
745
- }
898
+ header_params = {}
899
+ if request.agent
900
+ header_params["agent"] = request.agent
901
+ end
902
+
746
903
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
747
904
  metadata[:"x-goog-request-params"] ||= request_params_header
748
905
 
@@ -807,6 +964,28 @@ module Google
807
964
  #
808
965
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
809
966
  #
967
+ # @example Basic example
968
+ # require "google/cloud/dialogflow/cx/v3"
969
+ #
970
+ # # Create a client object. The client can be reused for multiple calls.
971
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
972
+ #
973
+ # # Create a request. To set request fields, pass in keyword arguments.
974
+ # request = Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest.new
975
+ #
976
+ # # Call the import_test_cases method.
977
+ # result = client.import_test_cases request
978
+ #
979
+ # # The returned object is of type Gapic::Operation. You can use this
980
+ # # object to check the status of an operation, cancel it, or wait
981
+ # # for results. Here is how to block until completion:
982
+ # result.wait_until_done! timeout: 60
983
+ # if result.response?
984
+ # p result.response
985
+ # else
986
+ # puts "Error!"
987
+ # end
988
+ #
810
989
  def import_test_cases request, options = nil
811
990
  raise ::ArgumentError, "request must be provided" if request.nil?
812
991
 
@@ -824,9 +1003,11 @@ module Google
824
1003
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
825
1004
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
826
1005
 
827
- header_params = {
828
- "parent" => request.parent
829
- }
1006
+ header_params = {}
1007
+ if request.parent
1008
+ header_params["parent"] = request.parent
1009
+ end
1010
+
830
1011
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
831
1012
  metadata[:"x-goog-request-params"] ||= request_params_header
832
1013
 
@@ -904,6 +1085,28 @@ module Google
904
1085
  #
905
1086
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
906
1087
  #
1088
+ # @example Basic example
1089
+ # require "google/cloud/dialogflow/cx/v3"
1090
+ #
1091
+ # # Create a client object. The client can be reused for multiple calls.
1092
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
1093
+ #
1094
+ # # Create a request. To set request fields, pass in keyword arguments.
1095
+ # request = Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest.new
1096
+ #
1097
+ # # Call the export_test_cases method.
1098
+ # result = client.export_test_cases request
1099
+ #
1100
+ # # The returned object is of type Gapic::Operation. You can use this
1101
+ # # object to check the status of an operation, cancel it, or wait
1102
+ # # for results. Here is how to block until completion:
1103
+ # result.wait_until_done! timeout: 60
1104
+ # if result.response?
1105
+ # p result.response
1106
+ # else
1107
+ # puts "Error!"
1108
+ # end
1109
+ #
907
1110
  def export_test_cases request, options = nil
908
1111
  raise ::ArgumentError, "request must be provided" if request.nil?
909
1112
 
@@ -921,9 +1124,11 @@ module Google
921
1124
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
922
1125
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
923
1126
 
924
- header_params = {
925
- "parent" => request.parent
926
- }
1127
+ header_params = {}
1128
+ if request.parent
1129
+ header_params["parent"] = request.parent
1130
+ end
1131
+
927
1132
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
928
1133
  metadata[:"x-goog-request-params"] ||= request_params_header
929
1134
 
@@ -1006,6 +1211,27 @@ module Google
1006
1211
  #
1007
1212
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1008
1213
  #
1214
+ # @example Basic example
1215
+ # require "google/cloud/dialogflow/cx/v3"
1216
+ #
1217
+ # # Create a client object. The client can be reused for multiple calls.
1218
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
1219
+ #
1220
+ # # Create a request. To set request fields, pass in keyword arguments.
1221
+ # request = Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsRequest.new
1222
+ #
1223
+ # # Call the list_test_case_results method.
1224
+ # result = client.list_test_case_results request
1225
+ #
1226
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1227
+ # # iterate over all elements by calling #each, and the enumerable
1228
+ # # will lazily make API calls to fetch subsequent pages. Other
1229
+ # # methods are also available for managing paging directly.
1230
+ # result.each do |response|
1231
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::TestCaseResult.
1232
+ # p response
1233
+ # end
1234
+ #
1009
1235
  def list_test_case_results request, options = nil
1010
1236
  raise ::ArgumentError, "request must be provided" if request.nil?
1011
1237
 
@@ -1023,9 +1249,11 @@ module Google
1023
1249
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
1024
1250
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1025
1251
 
1026
- header_params = {
1027
- "parent" => request.parent
1028
- }
1252
+ header_params = {}
1253
+ if request.parent
1254
+ header_params["parent"] = request.parent
1255
+ end
1256
+
1029
1257
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1030
1258
  metadata[:"x-goog-request-params"] ||= request_params_header
1031
1259
 
@@ -1077,6 +1305,21 @@ module Google
1077
1305
  #
1078
1306
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1079
1307
  #
1308
+ # @example Basic example
1309
+ # require "google/cloud/dialogflow/cx/v3"
1310
+ #
1311
+ # # Create a client object. The client can be reused for multiple calls.
1312
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
1313
+ #
1314
+ # # Create a request. To set request fields, pass in keyword arguments.
1315
+ # request = Google::Cloud::Dialogflow::CX::V3::GetTestCaseResultRequest.new
1316
+ #
1317
+ # # Call the get_test_case_result method.
1318
+ # result = client.get_test_case_result request
1319
+ #
1320
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::TestCaseResult.
1321
+ # p result
1322
+ #
1080
1323
  def get_test_case_result request, options = nil
1081
1324
  raise ::ArgumentError, "request must be provided" if request.nil?
1082
1325
 
@@ -1094,9 +1337,11 @@ module Google
1094
1337
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
1095
1338
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1096
1339
 
1097
- header_params = {
1098
- "name" => request.name
1099
- }
1340
+ header_params = {}
1341
+ if request.name
1342
+ header_params["name"] = request.name
1343
+ end
1344
+
1100
1345
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1101
1346
  metadata[:"x-goog-request-params"] ||= request_params_header
1102
1347
 
@@ -144,6 +144,27 @@ module Google
144
144
  #
145
145
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
146
146
  #
147
+ # @example Basic example
148
+ # require "google/longrunning"
149
+ #
150
+ # # Create a client object. The client can be reused for multiple calls.
151
+ # client = Google::Longrunning::Operations::Client.new
152
+ #
153
+ # # Create a request. To set request fields, pass in keyword arguments.
154
+ # request = Google::Longrunning::ListOperationsRequest.new
155
+ #
156
+ # # Call the list_operations method.
157
+ # result = client.list_operations request
158
+ #
159
+ # # The returned object is of type Gapic::PagedEnumerable. You can
160
+ # # iterate over all elements by calling #each, and the enumerable
161
+ # # will lazily make API calls to fetch subsequent pages. Other
162
+ # # methods are also available for managing paging directly.
163
+ # result.each do |response|
164
+ # # Each element is of type ::Google::Longrunning::Operation.
165
+ # p response
166
+ # end
167
+ #
147
168
  def list_operations request, options = nil
148
169
  raise ::ArgumentError, "request must be provided" if request.nil?
149
170
 
@@ -161,9 +182,11 @@ module Google
161
182
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
162
183
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
163
184
 
164
- header_params = {
165
- "name" => request.name
166
- }
185
+ header_params = {}
186
+ if request.name
187
+ header_params["name"] = request.name
188
+ end
189
+
167
190
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
168
191
  metadata[:"x-goog-request-params"] ||= request_params_header
169
192
 
@@ -216,6 +239,28 @@ module Google
216
239
  #
217
240
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
218
241
  #
242
+ # @example Basic example
243
+ # require "google/longrunning"
244
+ #
245
+ # # Create a client object. The client can be reused for multiple calls.
246
+ # client = Google::Longrunning::Operations::Client.new
247
+ #
248
+ # # Create a request. To set request fields, pass in keyword arguments.
249
+ # request = Google::Longrunning::GetOperationRequest.new
250
+ #
251
+ # # Call the get_operation method.
252
+ # result = client.get_operation request
253
+ #
254
+ # # The returned object is of type Gapic::Operation. You can use this
255
+ # # object to check the status of an operation, cancel it, or wait
256
+ # # for results. Here is how to block until completion:
257
+ # result.wait_until_done! timeout: 60
258
+ # if result.response?
259
+ # p result.response
260
+ # else
261
+ # puts "Error!"
262
+ # end
263
+ #
219
264
  def get_operation request, options = nil
220
265
  raise ::ArgumentError, "request must be provided" if request.nil?
221
266
 
@@ -233,9 +278,11 @@ module Google
233
278
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
234
279
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
235
280
 
236
- header_params = {
237
- "name" => request.name
238
- }
281
+ header_params = {}
282
+ if request.name
283
+ header_params["name"] = request.name
284
+ end
285
+
239
286
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
240
287
  metadata[:"x-goog-request-params"] ||= request_params_header
241
288
 
@@ -288,6 +335,21 @@ module Google
288
335
  #
289
336
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
290
337
  #
338
+ # @example Basic example
339
+ # require "google/longrunning"
340
+ #
341
+ # # Create a client object. The client can be reused for multiple calls.
342
+ # client = Google::Longrunning::Operations::Client.new
343
+ #
344
+ # # Create a request. To set request fields, pass in keyword arguments.
345
+ # request = Google::Longrunning::DeleteOperationRequest.new
346
+ #
347
+ # # Call the delete_operation method.
348
+ # result = client.delete_operation request
349
+ #
350
+ # # The returned object is of type Google::Protobuf::Empty.
351
+ # p result
352
+ #
291
353
  def delete_operation request, options = nil
292
354
  raise ::ArgumentError, "request must be provided" if request.nil?
293
355
 
@@ -305,9 +367,11 @@ module Google
305
367
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
306
368
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
369
 
308
- header_params = {
309
- "name" => request.name
310
- }
370
+ header_params = {}
371
+ if request.name
372
+ header_params["name"] = request.name
373
+ end
374
+
311
375
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
312
376
  metadata[:"x-goog-request-params"] ||= request_params_header
313
377
 
@@ -365,6 +429,21 @@ module Google
365
429
  #
366
430
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
367
431
  #
432
+ # @example Basic example
433
+ # require "google/longrunning"
434
+ #
435
+ # # Create a client object. The client can be reused for multiple calls.
436
+ # client = Google::Longrunning::Operations::Client.new
437
+ #
438
+ # # Create a request. To set request fields, pass in keyword arguments.
439
+ # request = Google::Longrunning::CancelOperationRequest.new
440
+ #
441
+ # # Call the cancel_operation method.
442
+ # result = client.cancel_operation request
443
+ #
444
+ # # The returned object is of type Google::Protobuf::Empty.
445
+ # p result
446
+ #
368
447
  def cancel_operation request, options = nil
369
448
  raise ::ArgumentError, "request must be provided" if request.nil?
370
449
 
@@ -382,9 +461,11 @@ module Google
382
461
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
383
462
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
463
 
385
- header_params = {
386
- "name" => request.name
387
- }
464
+ header_params = {}
465
+ if request.name
466
+ header_params["name"] = request.name
467
+ end
468
+
388
469
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
389
470
  metadata[:"x-goog-request-params"] ||= request_params_header
390
471
 
@@ -445,6 +526,28 @@ module Google
445
526
  #
446
527
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
447
528
  #
529
+ # @example Basic example
530
+ # require "google/longrunning"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Longrunning::Operations::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Longrunning::WaitOperationRequest.new
537
+ #
538
+ # # Call the wait_operation method.
539
+ # result = client.wait_operation request
540
+ #
541
+ # # The returned object is of type Gapic::Operation. You can use this
542
+ # # object to check the status of an operation, cancel it, or wait
543
+ # # for results. Here is how to block until completion:
544
+ # result.wait_until_done! timeout: 60
545
+ # if result.response?
546
+ # p result.response
547
+ # else
548
+ # puts "Error!"
549
+ # end
550
+ #
448
551
  def wait_operation request, options = nil
449
552
  raise ::ArgumentError, "request must be provided" if request.nil?
450
553