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
@@ -211,6 +211,21 @@ module Google
211
211
  #
212
212
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
213
213
  #
214
+ # @example Basic example
215
+ # require "google/cloud/dialogflow/cx/v3"
216
+ #
217
+ # # Create a client object. The client can be reused for multiple calls.
218
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
219
+ #
220
+ # # Create a request. To set request fields, pass in keyword arguments.
221
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateFlowRequest.new
222
+ #
223
+ # # Call the create_flow method.
224
+ # result = client.create_flow request
225
+ #
226
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Flow.
227
+ # p result
228
+ #
214
229
  def create_flow request, options = nil
215
230
  raise ::ArgumentError, "request must be provided" if request.nil?
216
231
 
@@ -228,9 +243,11 @@ module Google
228
243
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
229
244
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
230
245
 
231
- header_params = {
232
- "parent" => request.parent
233
- }
246
+ header_params = {}
247
+ if request.parent
248
+ header_params["parent"] = request.parent
249
+ end
250
+
234
251
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
235
252
  metadata[:"x-goog-request-params"] ||= request_params_header
236
253
 
@@ -292,6 +309,21 @@ module Google
292
309
  #
293
310
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
294
311
  #
312
+ # @example Basic example
313
+ # require "google/cloud/dialogflow/cx/v3"
314
+ #
315
+ # # Create a client object. The client can be reused for multiple calls.
316
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
317
+ #
318
+ # # Create a request. To set request fields, pass in keyword arguments.
319
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteFlowRequest.new
320
+ #
321
+ # # Call the delete_flow method.
322
+ # result = client.delete_flow request
323
+ #
324
+ # # The returned object is of type Google::Protobuf::Empty.
325
+ # p result
326
+ #
295
327
  def delete_flow request, options = nil
296
328
  raise ::ArgumentError, "request must be provided" if request.nil?
297
329
 
@@ -309,9 +341,11 @@ module Google
309
341
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
310
342
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
311
343
 
312
- header_params = {
313
- "name" => request.name
314
- }
344
+ header_params = {}
345
+ if request.name
346
+ header_params["name"] = request.name
347
+ end
348
+
315
349
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
316
350
  metadata[:"x-goog-request-params"] ||= request_params_header
317
351
 
@@ -380,6 +414,27 @@ module Google
380
414
  #
381
415
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
382
416
  #
417
+ # @example Basic example
418
+ # require "google/cloud/dialogflow/cx/v3"
419
+ #
420
+ # # Create a client object. The client can be reused for multiple calls.
421
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
422
+ #
423
+ # # Create a request. To set request fields, pass in keyword arguments.
424
+ # request = Google::Cloud::Dialogflow::CX::V3::ListFlowsRequest.new
425
+ #
426
+ # # Call the list_flows method.
427
+ # result = client.list_flows request
428
+ #
429
+ # # The returned object is of type Gapic::PagedEnumerable. You can
430
+ # # iterate over all elements by calling #each, and the enumerable
431
+ # # will lazily make API calls to fetch subsequent pages. Other
432
+ # # methods are also available for managing paging directly.
433
+ # result.each do |response|
434
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Flow.
435
+ # p response
436
+ # end
437
+ #
383
438
  def list_flows request, options = nil
384
439
  raise ::ArgumentError, "request must be provided" if request.nil?
385
440
 
@@ -397,9 +452,11 @@ module Google
397
452
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
398
453
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
399
454
 
400
- header_params = {
401
- "parent" => request.parent
402
- }
455
+ header_params = {}
456
+ if request.parent
457
+ header_params["parent"] = request.parent
458
+ end
459
+
403
460
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
404
461
  metadata[:"x-goog-request-params"] ||= request_params_header
405
462
 
@@ -465,6 +522,21 @@ module Google
465
522
  #
466
523
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
467
524
  #
525
+ # @example Basic example
526
+ # require "google/cloud/dialogflow/cx/v3"
527
+ #
528
+ # # Create a client object. The client can be reused for multiple calls.
529
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
530
+ #
531
+ # # Create a request. To set request fields, pass in keyword arguments.
532
+ # request = Google::Cloud::Dialogflow::CX::V3::GetFlowRequest.new
533
+ #
534
+ # # Call the get_flow method.
535
+ # result = client.get_flow request
536
+ #
537
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Flow.
538
+ # p result
539
+ #
468
540
  def get_flow request, options = nil
469
541
  raise ::ArgumentError, "request must be provided" if request.nil?
470
542
 
@@ -482,9 +554,11 @@ module Google
482
554
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
483
555
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
484
556
 
485
- header_params = {
486
- "name" => request.name
487
- }
557
+ header_params = {}
558
+ if request.name
559
+ header_params["name"] = request.name
560
+ end
561
+
488
562
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
489
563
  metadata[:"x-goog-request-params"] ||= request_params_header
490
564
 
@@ -529,8 +603,8 @@ module Google
529
603
  # @param flow [::Google::Cloud::Dialogflow::CX::V3::Flow, ::Hash]
530
604
  # Required. The flow to update.
531
605
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
532
- # Required. The mask to control which fields get updated. If `update_mask` is not
533
- # specified, an error will be returned.
606
+ # The mask to control which fields get updated. If the mask is not present,
607
+ # all fields will be updated.
534
608
  # @param language_code [::String]
535
609
  # The language of the following fields in `flow`:
536
610
  #
@@ -553,6 +627,21 @@ module Google
553
627
  #
554
628
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
555
629
  #
630
+ # @example Basic example
631
+ # require "google/cloud/dialogflow/cx/v3"
632
+ #
633
+ # # Create a client object. The client can be reused for multiple calls.
634
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
635
+ #
636
+ # # Create a request. To set request fields, pass in keyword arguments.
637
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateFlowRequest.new
638
+ #
639
+ # # Call the update_flow method.
640
+ # result = client.update_flow request
641
+ #
642
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Flow.
643
+ # p result
644
+ #
556
645
  def update_flow request, options = nil
557
646
  raise ::ArgumentError, "request must be provided" if request.nil?
558
647
 
@@ -570,9 +659,11 @@ module Google
570
659
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
571
660
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
572
661
 
573
- header_params = {
574
- "flow.name" => request.flow.name
575
- }
662
+ header_params = {}
663
+ if request.flow&.name
664
+ header_params["flow.name"] = request.flow.name
665
+ end
666
+
576
667
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
577
668
  metadata[:"x-goog-request-params"] ||= request_params_header
578
669
 
@@ -596,6 +687,15 @@ module Google
596
687
  # Trains the specified flow. Note that only the flow in 'draft' environment
597
688
  # is trained.
598
689
  #
690
+ # This method is a [long-running
691
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
692
+ # The returned `Operation` type has the following method-specific fields:
693
+ #
694
+ # - `metadata`: An empty [Struct
695
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
696
+ # - `response`: An [Empty
697
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
698
+ #
599
699
  # Note: You should always train a flow prior to sending it queries. See the
600
700
  # [training
601
701
  # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
@@ -628,6 +728,28 @@ module Google
628
728
  #
629
729
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
630
730
  #
731
+ # @example Basic example
732
+ # require "google/cloud/dialogflow/cx/v3"
733
+ #
734
+ # # Create a client object. The client can be reused for multiple calls.
735
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
736
+ #
737
+ # # Create a request. To set request fields, pass in keyword arguments.
738
+ # request = Google::Cloud::Dialogflow::CX::V3::TrainFlowRequest.new
739
+ #
740
+ # # Call the train_flow method.
741
+ # result = client.train_flow request
742
+ #
743
+ # # The returned object is of type Gapic::Operation. You can use this
744
+ # # object to check the status of an operation, cancel it, or wait
745
+ # # for results. Here is how to block until completion:
746
+ # result.wait_until_done! timeout: 60
747
+ # if result.response?
748
+ # p result.response
749
+ # else
750
+ # puts "Error!"
751
+ # end
752
+ #
631
753
  def train_flow request, options = nil
632
754
  raise ::ArgumentError, "request must be provided" if request.nil?
633
755
 
@@ -645,9 +767,11 @@ module Google
645
767
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
646
768
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
647
769
 
648
- header_params = {
649
- "name" => request.name
650
- }
770
+ header_params = {}
771
+ if request.name
772
+ header_params["name"] = request.name
773
+ end
774
+
651
775
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
652
776
  metadata[:"x-goog-request-params"] ||= request_params_header
653
777
 
@@ -703,6 +827,21 @@ module Google
703
827
  #
704
828
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
705
829
  #
830
+ # @example Basic example
831
+ # require "google/cloud/dialogflow/cx/v3"
832
+ #
833
+ # # Create a client object. The client can be reused for multiple calls.
834
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
835
+ #
836
+ # # Create a request. To set request fields, pass in keyword arguments.
837
+ # request = Google::Cloud::Dialogflow::CX::V3::ValidateFlowRequest.new
838
+ #
839
+ # # Call the validate_flow method.
840
+ # result = client.validate_flow request
841
+ #
842
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::FlowValidationResult.
843
+ # p result
844
+ #
706
845
  def validate_flow request, options = nil
707
846
  raise ::ArgumentError, "request must be provided" if request.nil?
708
847
 
@@ -720,9 +859,11 @@ module Google
720
859
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
721
860
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
722
861
 
723
- header_params = {
724
- "name" => request.name
725
- }
862
+ header_params = {}
863
+ if request.name
864
+ header_params["name"] = request.name
865
+ end
866
+
726
867
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
727
868
  metadata[:"x-goog-request-params"] ||= request_params_header
728
869
 
@@ -776,6 +917,21 @@ module Google
776
917
  #
777
918
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
778
919
  #
920
+ # @example Basic example
921
+ # require "google/cloud/dialogflow/cx/v3"
922
+ #
923
+ # # Create a client object. The client can be reused for multiple calls.
924
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
925
+ #
926
+ # # Create a request. To set request fields, pass in keyword arguments.
927
+ # request = Google::Cloud::Dialogflow::CX::V3::GetFlowValidationResultRequest.new
928
+ #
929
+ # # Call the get_flow_validation_result method.
930
+ # result = client.get_flow_validation_result request
931
+ #
932
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::FlowValidationResult.
933
+ # p result
934
+ #
779
935
  def get_flow_validation_result request, options = nil
780
936
  raise ::ArgumentError, "request must be provided" if request.nil?
781
937
 
@@ -793,9 +949,11 @@ module Google
793
949
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
794
950
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
795
951
 
796
- header_params = {
797
- "name" => request.name
798
- }
952
+ header_params = {}
953
+ if request.name
954
+ header_params["name"] = request.name
955
+ end
956
+
799
957
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
800
958
  metadata[:"x-goog-request-params"] ||= request_params_header
801
959
 
@@ -818,6 +976,14 @@ module Google
818
976
  ##
819
977
  # Imports the specified flow to the specified agent from a binary file.
820
978
  #
979
+ # This method is a [long-running
980
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
981
+ # The returned `Operation` type has the following method-specific fields:
982
+ #
983
+ # - `metadata`: An empty [Struct
984
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
985
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::ImportFlowResponse ImportFlowResponse}
986
+ #
821
987
  # Note: You should always train a flow prior to sending it queries. See the
822
988
  # [training
823
989
  # documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training).
@@ -857,6 +1023,28 @@ module Google
857
1023
  #
858
1024
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
859
1025
  #
1026
+ # @example Basic example
1027
+ # require "google/cloud/dialogflow/cx/v3"
1028
+ #
1029
+ # # Create a client object. The client can be reused for multiple calls.
1030
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
1031
+ #
1032
+ # # Create a request. To set request fields, pass in keyword arguments.
1033
+ # request = Google::Cloud::Dialogflow::CX::V3::ImportFlowRequest.new
1034
+ #
1035
+ # # Call the import_flow method.
1036
+ # result = client.import_flow request
1037
+ #
1038
+ # # The returned object is of type Gapic::Operation. You can use this
1039
+ # # object to check the status of an operation, cancel it, or wait
1040
+ # # for results. Here is how to block until completion:
1041
+ # result.wait_until_done! timeout: 60
1042
+ # if result.response?
1043
+ # p result.response
1044
+ # else
1045
+ # puts "Error!"
1046
+ # end
1047
+ #
860
1048
  def import_flow request, options = nil
861
1049
  raise ::ArgumentError, "request must be provided" if request.nil?
862
1050
 
@@ -874,9 +1062,11 @@ module Google
874
1062
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
875
1063
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
876
1064
 
877
- header_params = {
878
- "parent" => request.parent
879
- }
1065
+ header_params = {}
1066
+ if request.parent
1067
+ header_params["parent"] = request.parent
1068
+ end
1069
+
880
1070
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
881
1071
  metadata[:"x-goog-request-params"] ||= request_params_header
882
1072
 
@@ -900,6 +1090,14 @@ module Google
900
1090
  ##
901
1091
  # Exports the specified flow to a binary file.
902
1092
  #
1093
+ # This method is a [long-running
1094
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
1095
+ # The returned `Operation` type has the following method-specific fields:
1096
+ #
1097
+ # - `metadata`: An empty [Struct
1098
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
1099
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::ExportFlowResponse ExportFlowResponse}
1100
+ #
903
1101
  # Note that resources (e.g. intents, entities, webhooks) that the flow
904
1102
  # references will also be exported.
905
1103
  #
@@ -938,6 +1136,28 @@ module Google
938
1136
  #
939
1137
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
940
1138
  #
1139
+ # @example Basic example
1140
+ # require "google/cloud/dialogflow/cx/v3"
1141
+ #
1142
+ # # Create a client object. The client can be reused for multiple calls.
1143
+ # client = Google::Cloud::Dialogflow::CX::V3::Flows::Client.new
1144
+ #
1145
+ # # Create a request. To set request fields, pass in keyword arguments.
1146
+ # request = Google::Cloud::Dialogflow::CX::V3::ExportFlowRequest.new
1147
+ #
1148
+ # # Call the export_flow method.
1149
+ # result = client.export_flow request
1150
+ #
1151
+ # # The returned object is of type Gapic::Operation. You can use this
1152
+ # # object to check the status of an operation, cancel it, or wait
1153
+ # # for results. Here is how to block until completion:
1154
+ # result.wait_until_done! timeout: 60
1155
+ # if result.response?
1156
+ # p result.response
1157
+ # else
1158
+ # puts "Error!"
1159
+ # end
1160
+ #
941
1161
  def export_flow request, options = nil
942
1162
  raise ::ArgumentError, "request must be provided" if request.nil?
943
1163
 
@@ -955,9 +1175,11 @@ module Google
955
1175
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
956
1176
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
957
1177
 
958
- header_params = {
959
- "name" => request.name
960
- }
1178
+ header_params = {}
1179
+ if request.name
1180
+ header_params["name"] = request.name
1181
+ end
1182
+
961
1183
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
962
1184
  metadata[:"x-goog-request-params"] ||= request_params_header
963
1185
 
@@ -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
 
@@ -1,13 +1,13 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/cx/v3/fulfillment.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/cloud/dialogflow/cx/v3/advanced_settings_pb'
8
6
  require 'google/cloud/dialogflow/cx/v3/response_message_pb'
9
7
  require 'google/protobuf/struct_pb'
10
8
  require 'google/api/annotations_pb'
9
+ require 'google/protobuf'
10
+
11
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
12
12
  add_file("google/cloud/dialogflow/cx/v3/fulfillment.proto", :syntax => :proto3) do
13
13
  add_message "google.cloud.dialogflow.cx.v3.Fulfillment" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/cx/v3/intent.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -11,6 +9,8 @@ require 'google/longrunning/operations_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/field_mask_pb'
13
11
  require 'google/protobuf/timestamp_pb'
12
+ require 'google/protobuf'
13
+
14
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
15
15
  add_file("google/cloud/dialogflow/cx/v3/intent.proto", :syntax => :proto3) do
16
16
  add_message "google.cloud.dialogflow.cx.v3.Intent" do
@@ -28,7 +28,7 @@ module Google
28
28
  # Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent].
29
29
  class Service
30
30
 
31
- include GRPC::GenericService
31
+ include ::GRPC::GenericService
32
32
 
33
33
  self.marshal_class_method = :encode
34
34
  self.unmarshal_class_method = :decode