google-cloud-dialogflow-cx-v3 0.1.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +2 -2
  4. data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +2 -2
  5. data/lib/google/cloud/dialogflow/cx/v3/agent_services_pb.rb +17 -1
  6. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +216 -27
  7. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +115 -12
  8. data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +3 -2
  9. data/lib/google/cloud/dialogflow/cx/v3/changelog_pb.rb +52 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/changelog_services_pb.rb +49 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +522 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/changelogs/credentials.rb +54 -0
  13. data/lib/google/cloud/dialogflow/cx/v3/changelogs/paths.rb +75 -0
  14. data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +51 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/deployment_pb.rb +63 -0
  16. data/lib/google/cloud/dialogflow/cx/v3/deployment_services_pb.rb +49 -0
  17. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +502 -0
  18. data/lib/google/cloud/dialogflow/cx/v3/deployments/credentials.rb +54 -0
  19. data/lib/google/cloud/dialogflow/cx/v3/deployments/paths.rb +79 -0
  20. data/lib/google/cloud/dialogflow/cx/v3/deployments.rb +51 -0
  21. data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +2 -2
  22. data/lib/google/cloud/dialogflow/cx/v3/entity_type_services_pb.rb +1 -1
  23. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +106 -15
  24. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +23 -2
  25. data/lib/google/cloud/dialogflow/cx/v3/environment_services_pb.rb +33 -1
  26. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +335 -24
  27. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +115 -12
  28. data/lib/google/cloud/dialogflow/cx/v3/environments/paths.rb +21 -0
  29. data/lib/google/cloud/dialogflow/cx/v3/experiment_pb.rb +2 -2
  30. data/lib/google/cloud/dialogflow/cx/v3/experiment_services_pb.rb +1 -1
  31. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +146 -21
  32. data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +2 -2
  33. data/lib/google/cloud/dialogflow/cx/v3/flow_services_pb.rb +26 -1
  34. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +254 -32
  35. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +115 -12
  36. data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +2 -2
  37. data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +2 -2
  38. data/lib/google/cloud/dialogflow/cx/v3/intent_services_pb.rb +1 -1
  39. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +106 -15
  40. data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +2 -2
  41. data/lib/google/cloud/dialogflow/cx/v3/page_services_pb.rb +1 -1
  42. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +106 -15
  43. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +2 -2
  44. data/lib/google/cloud/dialogflow/cx/v3/security_settings_pb.rb +2 -2
  45. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +106 -15
  46. data/lib/google/cloud/dialogflow/cx/v3/security_settings_services_pb.rb +1 -1
  47. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_pb.rb +2 -2
  48. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_services_pb.rb +1 -1
  49. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +106 -15
  50. data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +3 -2
  51. data/lib/google/cloud/dialogflow/cx/v3/session_services_pb.rb +1 -1
  52. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +84 -9
  53. data/lib/google/cloud/dialogflow/cx/v3/test_case_pb.rb +2 -2
  54. data/lib/google/cloud/dialogflow/cx/v3/test_case_services_pb.rb +29 -1
  55. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +308 -36
  56. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +115 -12
  57. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_pb.rb +2 -2
  58. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_services_pb.rb +1 -1
  59. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +106 -15
  60. data/lib/google/cloud/dialogflow/cx/v3/validation_message_pb.rb +2 -2
  61. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  62. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +2 -2
  63. data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +17 -1
  64. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +156 -18
  65. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +115 -12
  66. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +2 -2
  67. data/lib/google/cloud/dialogflow/cx/v3/webhook_services_pb.rb +1 -1
  68. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +106 -15
  69. data/lib/google/cloud/dialogflow/cx/v3.rb +2 -0
  70. data/proto_docs/google/cloud/dialogflow/cx/v3/changelog.rb +122 -0
  71. data/proto_docs/google/cloud/dialogflow/cx/v3/deployment.rb +135 -0
  72. data/proto_docs/google/cloud/dialogflow/cx/v3/environment.rb +62 -0
  73. data/proto_docs/google/cloud/dialogflow/cx/v3/flow.rb +2 -2
  74. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +4 -1
  75. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +58 -42
  76. data/proto_docs/google/cloud/dialogflow/cx/v3/test_case.rb +3 -1
  77. metadata +21 -5
@@ -201,6 +201,27 @@ module Google
201
201
  #
202
202
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
203
203
  #
204
+ # @example Basic example
205
+ # require "google/cloud/dialogflow/cx/v3"
206
+ #
207
+ # # Create a client object. The client can be reused for multiple calls.
208
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
209
+ #
210
+ # # Create a request. To set request fields, pass in keyword arguments.
211
+ # request = Google::Cloud::Dialogflow::CX::V3::ListTestCasesRequest.new
212
+ #
213
+ # # Call the list_test_cases method.
214
+ # result = client.list_test_cases request
215
+ #
216
+ # # The returned object is of type Gapic::PagedEnumerable. You can
217
+ # # iterate over all elements by calling #each, and the enumerable
218
+ # # will lazily make API calls to fetch subsequent pages. Other
219
+ # # methods are also available for managing paging directly.
220
+ # result.each do |response|
221
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::TestCase.
222
+ # p response
223
+ # end
224
+ #
204
225
  def list_test_cases request, options = nil
205
226
  raise ::ArgumentError, "request must be provided" if request.nil?
206
227
 
@@ -218,9 +239,11 @@ module Google
218
239
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
219
240
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
220
241
 
221
- header_params = {
222
- "parent" => request.parent
223
- }
242
+ header_params = {}
243
+ if request.parent
244
+ header_params["parent"] = request.parent
245
+ end
246
+
224
247
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
225
248
  metadata[:"x-goog-request-params"] ||= request_params_header
226
249
 
@@ -274,6 +297,21 @@ module Google
274
297
  #
275
298
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
276
299
  #
300
+ # @example Basic example
301
+ # require "google/cloud/dialogflow/cx/v3"
302
+ #
303
+ # # Create a client object. The client can be reused for multiple calls.
304
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
305
+ #
306
+ # # Create a request. To set request fields, pass in keyword arguments.
307
+ # request = Google::Cloud::Dialogflow::CX::V3::BatchDeleteTestCasesRequest.new
308
+ #
309
+ # # Call the batch_delete_test_cases method.
310
+ # result = client.batch_delete_test_cases request
311
+ #
312
+ # # The returned object is of type Google::Protobuf::Empty.
313
+ # p result
314
+ #
277
315
  def batch_delete_test_cases request, options = nil
278
316
  raise ::ArgumentError, "request must be provided" if request.nil?
279
317
 
@@ -291,9 +329,11 @@ module Google
291
329
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
292
330
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
293
331
 
294
- header_params = {
295
- "parent" => request.parent
296
- }
332
+ header_params = {}
333
+ if request.parent
334
+ header_params["parent"] = request.parent
335
+ end
336
+
297
337
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
298
338
  metadata[:"x-goog-request-params"] ||= request_params_header
299
339
 
@@ -344,6 +384,21 @@ module Google
344
384
  #
345
385
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
346
386
  #
387
+ # @example Basic example
388
+ # require "google/cloud/dialogflow/cx/v3"
389
+ #
390
+ # # Create a client object. The client can be reused for multiple calls.
391
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
392
+ #
393
+ # # Create a request. To set request fields, pass in keyword arguments.
394
+ # request = Google::Cloud::Dialogflow::CX::V3::GetTestCaseRequest.new
395
+ #
396
+ # # Call the get_test_case method.
397
+ # result = client.get_test_case request
398
+ #
399
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::TestCase.
400
+ # p result
401
+ #
347
402
  def get_test_case request, options = nil
348
403
  raise ::ArgumentError, "request must be provided" if request.nil?
349
404
 
@@ -361,9 +416,11 @@ module Google
361
416
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
362
417
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
418
 
364
- header_params = {
365
- "name" => request.name
366
- }
419
+ header_params = {}
420
+ if request.name
421
+ header_params["name"] = request.name
422
+ end
423
+
367
424
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
368
425
  metadata[:"x-goog-request-params"] ||= request_params_header
369
426
 
@@ -415,6 +472,21 @@ module Google
415
472
  #
416
473
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
417
474
  #
475
+ # @example Basic example
476
+ # require "google/cloud/dialogflow/cx/v3"
477
+ #
478
+ # # Create a client object. The client can be reused for multiple calls.
479
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
480
+ #
481
+ # # Create a request. To set request fields, pass in keyword arguments.
482
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateTestCaseRequest.new
483
+ #
484
+ # # Call the create_test_case method.
485
+ # result = client.create_test_case request
486
+ #
487
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::TestCase.
488
+ # p result
489
+ #
418
490
  def create_test_case request, options = nil
419
491
  raise ::ArgumentError, "request must be provided" if request.nil?
420
492
 
@@ -432,9 +504,11 @@ module Google
432
504
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
433
505
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
434
506
 
435
- header_params = {
436
- "parent" => request.parent
437
- }
507
+ header_params = {}
508
+ if request.parent
509
+ header_params["parent"] = request.parent
510
+ end
511
+
438
512
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
439
513
  metadata[:"x-goog-request-params"] ||= request_params_header
440
514
 
@@ -487,6 +561,21 @@ module Google
487
561
  #
488
562
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
489
563
  #
564
+ # @example Basic example
565
+ # require "google/cloud/dialogflow/cx/v3"
566
+ #
567
+ # # Create a client object. The client can be reused for multiple calls.
568
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
569
+ #
570
+ # # Create a request. To set request fields, pass in keyword arguments.
571
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateTestCaseRequest.new
572
+ #
573
+ # # Call the update_test_case method.
574
+ # result = client.update_test_case request
575
+ #
576
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::TestCase.
577
+ # p result
578
+ #
490
579
  def update_test_case request, options = nil
491
580
  raise ::ArgumentError, "request must be provided" if request.nil?
492
581
 
@@ -504,9 +593,11 @@ module Google
504
593
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
505
594
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
595
 
507
- header_params = {
508
- "test_case.name" => request.test_case.name
509
- }
596
+ header_params = {}
597
+ if request.test_case&.name
598
+ header_params["test_case.name"] = request.test_case.name
599
+ end
600
+
510
601
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
511
602
  metadata[:"x-goog-request-params"] ||= request_params_header
512
603
 
@@ -529,6 +620,13 @@ module Google
529
620
  ##
530
621
  # Kicks off a test case run.
531
622
  #
623
+ # This method is a [long-running
624
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
625
+ # The returned `Operation` type has the following method-specific fields:
626
+ #
627
+ # - `metadata`: {::Google::Cloud::Dialogflow::CX::V3::RunTestCaseMetadata RunTestCaseMetadata}
628
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::RunTestCaseResponse RunTestCaseResponse}
629
+ #
532
630
  # @overload run_test_case(request, options = nil)
533
631
  # Pass arguments to `run_test_case` via a request object, either of type
534
632
  # {::Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest} or an equivalent Hash.
@@ -560,6 +658,28 @@ module Google
560
658
  #
561
659
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
562
660
  #
661
+ # @example Basic example
662
+ # require "google/cloud/dialogflow/cx/v3"
663
+ #
664
+ # # Create a client object. The client can be reused for multiple calls.
665
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
666
+ #
667
+ # # Create a request. To set request fields, pass in keyword arguments.
668
+ # request = Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest.new
669
+ #
670
+ # # Call the run_test_case method.
671
+ # result = client.run_test_case request
672
+ #
673
+ # # The returned object is of type Gapic::Operation. You can use this
674
+ # # object to check the status of an operation, cancel it, or wait
675
+ # # for results. Here is how to block until completion:
676
+ # result.wait_until_done! timeout: 60
677
+ # if result.response?
678
+ # p result.response
679
+ # else
680
+ # puts "Error!"
681
+ # end
682
+ #
563
683
  def run_test_case request, options = nil
564
684
  raise ::ArgumentError, "request must be provided" if request.nil?
565
685
 
@@ -577,9 +697,11 @@ module Google
577
697
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
578
698
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
579
699
 
580
- header_params = {
581
- "name" => request.name
582
- }
700
+ header_params = {}
701
+ if request.name
702
+ header_params["name"] = request.name
703
+ end
704
+
583
705
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
584
706
  metadata[:"x-goog-request-params"] ||= request_params_header
585
707
 
@@ -603,6 +725,13 @@ module Google
603
725
  ##
604
726
  # Kicks off a batch run of test cases.
605
727
  #
728
+ # This method is a [long-running
729
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
730
+ # The returned `Operation` type has the following method-specific fields:
731
+ #
732
+ # - `metadata`: {::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesMetadata BatchRunTestCasesMetadata}
733
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesResponse BatchRunTestCasesResponse}
734
+ #
606
735
  # @overload batch_run_test_cases(request, options = nil)
607
736
  # Pass arguments to `batch_run_test_cases` via a request object, either of type
608
737
  # {::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest} or an equivalent Hash.
@@ -637,6 +766,28 @@ module Google
637
766
  #
638
767
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
639
768
  #
769
+ # @example Basic example
770
+ # require "google/cloud/dialogflow/cx/v3"
771
+ #
772
+ # # Create a client object. The client can be reused for multiple calls.
773
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
774
+ #
775
+ # # Create a request. To set request fields, pass in keyword arguments.
776
+ # request = Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest.new
777
+ #
778
+ # # Call the batch_run_test_cases method.
779
+ # result = client.batch_run_test_cases request
780
+ #
781
+ # # The returned object is of type Gapic::Operation. You can use this
782
+ # # object to check the status of an operation, cancel it, or wait
783
+ # # for results. Here is how to block until completion:
784
+ # result.wait_until_done! timeout: 60
785
+ # if result.response?
786
+ # p result.response
787
+ # else
788
+ # puts "Error!"
789
+ # end
790
+ #
640
791
  def batch_run_test_cases request, options = nil
641
792
  raise ::ArgumentError, "request must be provided" if request.nil?
642
793
 
@@ -654,9 +805,11 @@ module Google
654
805
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
655
806
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
656
807
 
657
- header_params = {
658
- "parent" => request.parent
659
- }
808
+ header_params = {}
809
+ if request.parent
810
+ header_params["parent"] = request.parent
811
+ end
812
+
660
813
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
661
814
  metadata[:"x-goog-request-params"] ||= request_params_header
662
815
 
@@ -709,6 +862,21 @@ module Google
709
862
  #
710
863
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
711
864
  #
865
+ # @example Basic example
866
+ # require "google/cloud/dialogflow/cx/v3"
867
+ #
868
+ # # Create a client object. The client can be reused for multiple calls.
869
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
870
+ #
871
+ # # Create a request. To set request fields, pass in keyword arguments.
872
+ # request = Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest.new
873
+ #
874
+ # # Call the calculate_coverage method.
875
+ # result = client.calculate_coverage request
876
+ #
877
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::CalculateCoverageResponse.
878
+ # p result
879
+ #
712
880
  def calculate_coverage request, options = nil
713
881
  raise ::ArgumentError, "request must be provided" if request.nil?
714
882
 
@@ -726,9 +894,11 @@ module Google
726
894
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
727
895
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
728
896
 
729
- header_params = {
730
- "agent" => request.agent
731
- }
897
+ header_params = {}
898
+ if request.agent
899
+ header_params["agent"] = request.agent
900
+ end
901
+
732
902
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
733
903
  metadata[:"x-goog-request-params"] ||= request_params_header
734
904
 
@@ -753,6 +923,13 @@ module Google
753
923
  # always creates new test cases and won't overwite any existing ones. The
754
924
  # provided ID in the imported test case is neglected.
755
925
  #
926
+ # This method is a [long-running
927
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
928
+ # The returned `Operation` type has the following method-specific fields:
929
+ #
930
+ # - `metadata`: {::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesMetadata ImportTestCasesMetadata}
931
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesResponse ImportTestCasesResponse}
932
+ #
756
933
  # @overload import_test_cases(request, options = nil)
757
934
  # Pass arguments to `import_test_cases` via a request object, either of type
758
935
  # {::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest} or an equivalent Hash.
@@ -786,6 +963,28 @@ module Google
786
963
  #
787
964
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
788
965
  #
966
+ # @example Basic example
967
+ # require "google/cloud/dialogflow/cx/v3"
968
+ #
969
+ # # Create a client object. The client can be reused for multiple calls.
970
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
971
+ #
972
+ # # Create a request. To set request fields, pass in keyword arguments.
973
+ # request = Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest.new
974
+ #
975
+ # # Call the import_test_cases method.
976
+ # result = client.import_test_cases request
977
+ #
978
+ # # The returned object is of type Gapic::Operation. You can use this
979
+ # # object to check the status of an operation, cancel it, or wait
980
+ # # for results. Here is how to block until completion:
981
+ # result.wait_until_done! timeout: 60
982
+ # if result.response?
983
+ # p result.response
984
+ # else
985
+ # puts "Error!"
986
+ # end
987
+ #
789
988
  def import_test_cases request, options = nil
790
989
  raise ::ArgumentError, "request must be provided" if request.nil?
791
990
 
@@ -803,9 +1002,11 @@ module Google
803
1002
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
804
1003
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
805
1004
 
806
- header_params = {
807
- "parent" => request.parent
808
- }
1005
+ header_params = {}
1006
+ if request.parent
1007
+ header_params["parent"] = request.parent
1008
+ end
1009
+
809
1010
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
810
1011
  metadata[:"x-goog-request-params"] ||= request_params_header
811
1012
 
@@ -830,6 +1031,13 @@ module Google
830
1031
  # Exports the test cases under the agent to a Cloud Storage bucket or a local
831
1032
  # file. Filter can be applied to export a subset of test cases.
832
1033
  #
1034
+ # This method is a [long-running
1035
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
1036
+ # The returned `Operation` type has the following method-specific fields:
1037
+ #
1038
+ # - `metadata`: {::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesMetadata ExportTestCasesMetadata}
1039
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesResponse ExportTestCasesResponse}
1040
+ #
833
1041
  # @overload export_test_cases(request, options = nil)
834
1042
  # Pass arguments to `export_test_cases` via a request object, either of type
835
1043
  # {::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest} or an equivalent Hash.
@@ -876,6 +1084,28 @@ module Google
876
1084
  #
877
1085
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
878
1086
  #
1087
+ # @example Basic example
1088
+ # require "google/cloud/dialogflow/cx/v3"
1089
+ #
1090
+ # # Create a client object. The client can be reused for multiple calls.
1091
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
1092
+ #
1093
+ # # Create a request. To set request fields, pass in keyword arguments.
1094
+ # request = Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest.new
1095
+ #
1096
+ # # Call the export_test_cases method.
1097
+ # result = client.export_test_cases request
1098
+ #
1099
+ # # The returned object is of type Gapic::Operation. You can use this
1100
+ # # object to check the status of an operation, cancel it, or wait
1101
+ # # for results. Here is how to block until completion:
1102
+ # result.wait_until_done! timeout: 60
1103
+ # if result.response?
1104
+ # p result.response
1105
+ # else
1106
+ # puts "Error!"
1107
+ # end
1108
+ #
879
1109
  def export_test_cases request, options = nil
880
1110
  raise ::ArgumentError, "request must be provided" if request.nil?
881
1111
 
@@ -893,9 +1123,11 @@ module Google
893
1123
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
894
1124
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
895
1125
 
896
- header_params = {
897
- "parent" => request.parent
898
- }
1126
+ header_params = {}
1127
+ if request.parent
1128
+ header_params["parent"] = request.parent
1129
+ end
1130
+
899
1131
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
900
1132
  metadata[:"x-goog-request-params"] ||= request_params_header
901
1133
 
@@ -978,6 +1210,27 @@ module Google
978
1210
  #
979
1211
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
980
1212
  #
1213
+ # @example Basic example
1214
+ # require "google/cloud/dialogflow/cx/v3"
1215
+ #
1216
+ # # Create a client object. The client can be reused for multiple calls.
1217
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
1218
+ #
1219
+ # # Create a request. To set request fields, pass in keyword arguments.
1220
+ # request = Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsRequest.new
1221
+ #
1222
+ # # Call the list_test_case_results method.
1223
+ # result = client.list_test_case_results request
1224
+ #
1225
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1226
+ # # iterate over all elements by calling #each, and the enumerable
1227
+ # # will lazily make API calls to fetch subsequent pages. Other
1228
+ # # methods are also available for managing paging directly.
1229
+ # result.each do |response|
1230
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::TestCaseResult.
1231
+ # p response
1232
+ # end
1233
+ #
981
1234
  def list_test_case_results request, options = nil
982
1235
  raise ::ArgumentError, "request must be provided" if request.nil?
983
1236
 
@@ -995,9 +1248,11 @@ module Google
995
1248
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
996
1249
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
997
1250
 
998
- header_params = {
999
- "parent" => request.parent
1000
- }
1251
+ header_params = {}
1252
+ if request.parent
1253
+ header_params["parent"] = request.parent
1254
+ end
1255
+
1001
1256
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1002
1257
  metadata[:"x-goog-request-params"] ||= request_params_header
1003
1258
 
@@ -1049,6 +1304,21 @@ module Google
1049
1304
  #
1050
1305
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1051
1306
  #
1307
+ # @example Basic example
1308
+ # require "google/cloud/dialogflow/cx/v3"
1309
+ #
1310
+ # # Create a client object. The client can be reused for multiple calls.
1311
+ # client = Google::Cloud::Dialogflow::CX::V3::TestCases::Client.new
1312
+ #
1313
+ # # Create a request. To set request fields, pass in keyword arguments.
1314
+ # request = Google::Cloud::Dialogflow::CX::V3::GetTestCaseResultRequest.new
1315
+ #
1316
+ # # Call the get_test_case_result method.
1317
+ # result = client.get_test_case_result request
1318
+ #
1319
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::TestCaseResult.
1320
+ # p result
1321
+ #
1052
1322
  def get_test_case_result request, options = nil
1053
1323
  raise ::ArgumentError, "request must be provided" if request.nil?
1054
1324
 
@@ -1066,9 +1336,11 @@ module Google
1066
1336
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
1067
1337
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1068
1338
 
1069
- header_params = {
1070
- "name" => request.name
1071
- }
1339
+ header_params = {}
1340
+ if request.name
1341
+ header_params["name"] = request.name
1342
+ end
1343
+
1072
1344
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1073
1345
  metadata[:"x-goog-request-params"] ||= request_params_header
1074
1346