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
@@ -197,6 +197,27 @@ module Google
197
197
  #
198
198
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
199
199
  #
200
+ # @example Basic example
201
+ # require "google/cloud/dialogflow/cx/v3"
202
+ #
203
+ # # Create a client object. The client can be reused for multiple calls.
204
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
205
+ #
206
+ # # Create a request. To set request fields, pass in keyword arguments.
207
+ # request = Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsRequest.new
208
+ #
209
+ # # Call the list_environments method.
210
+ # result = client.list_environments request
211
+ #
212
+ # # The returned object is of type Gapic::PagedEnumerable. You can
213
+ # # iterate over all elements by calling #each, and the enumerable
214
+ # # will lazily make API calls to fetch subsequent pages. Other
215
+ # # methods are also available for managing paging directly.
216
+ # result.each do |response|
217
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Environment.
218
+ # p response
219
+ # end
220
+ #
200
221
  def list_environments request, options = nil
201
222
  raise ::ArgumentError, "request must be provided" if request.nil?
202
223
 
@@ -214,9 +235,11 @@ module Google
214
235
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
215
236
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
216
237
 
217
- header_params = {
218
- "parent" => request.parent
219
- }
238
+ header_params = {}
239
+ if request.parent
240
+ header_params["parent"] = request.parent
241
+ end
242
+
220
243
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
221
244
  metadata[:"x-goog-request-params"] ||= request_params_header
222
245
 
@@ -268,6 +291,21 @@ module Google
268
291
  #
269
292
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
270
293
  #
294
+ # @example Basic example
295
+ # require "google/cloud/dialogflow/cx/v3"
296
+ #
297
+ # # Create a client object. The client can be reused for multiple calls.
298
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
299
+ #
300
+ # # Create a request. To set request fields, pass in keyword arguments.
301
+ # request = Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest.new
302
+ #
303
+ # # Call the get_environment method.
304
+ # result = client.get_environment request
305
+ #
306
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Environment.
307
+ # p result
308
+ #
271
309
  def get_environment request, options = nil
272
310
  raise ::ArgumentError, "request must be provided" if request.nil?
273
311
 
@@ -285,9 +323,11 @@ module Google
285
323
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
286
324
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
287
325
 
288
- header_params = {
289
- "name" => request.name
290
- }
326
+ header_params = {}
327
+ if request.name
328
+ header_params["name"] = request.name
329
+ end
330
+
291
331
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
292
332
  metadata[:"x-goog-request-params"] ||= request_params_header
293
333
 
@@ -310,6 +350,14 @@ module Google
310
350
  ##
311
351
  # Creates an {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} in the specified {::Google::Cloud::Dialogflow::CX::V3::Agent Agent}.
312
352
  #
353
+ # This method is a [long-running
354
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
355
+ # The returned `Operation` type has the following method-specific fields:
356
+ #
357
+ # - `metadata`: An empty [Struct
358
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
359
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}
360
+ #
313
361
  # @overload create_environment(request, options = nil)
314
362
  # Pass arguments to `create_environment` via a request object, either of type
315
363
  # {::Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest} or an equivalent Hash.
@@ -339,6 +387,28 @@ module Google
339
387
  #
340
388
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
341
389
  #
390
+ # @example Basic example
391
+ # require "google/cloud/dialogflow/cx/v3"
392
+ #
393
+ # # Create a client object. The client can be reused for multiple calls.
394
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
395
+ #
396
+ # # Create a request. To set request fields, pass in keyword arguments.
397
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest.new
398
+ #
399
+ # # Call the create_environment method.
400
+ # result = client.create_environment request
401
+ #
402
+ # # The returned object is of type Gapic::Operation. You can use this
403
+ # # object to check the status of an operation, cancel it, or wait
404
+ # # for results. Here is how to block until completion:
405
+ # result.wait_until_done! timeout: 60
406
+ # if result.response?
407
+ # p result.response
408
+ # else
409
+ # puts "Error!"
410
+ # end
411
+ #
342
412
  def create_environment request, options = nil
343
413
  raise ::ArgumentError, "request must be provided" if request.nil?
344
414
 
@@ -356,9 +426,11 @@ module Google
356
426
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
357
427
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
358
428
 
359
- header_params = {
360
- "parent" => request.parent
361
- }
429
+ header_params = {}
430
+ if request.parent
431
+ header_params["parent"] = request.parent
432
+ end
433
+
362
434
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
363
435
  metadata[:"x-goog-request-params"] ||= request_params_header
364
436
 
@@ -382,6 +454,14 @@ module Google
382
454
  ##
383
455
  # Updates the specified {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
384
456
  #
457
+ # This method is a [long-running
458
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
459
+ # The returned `Operation` type has the following method-specific fields:
460
+ #
461
+ # - `metadata`: An empty [Struct
462
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
463
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}
464
+ #
385
465
  # @overload update_environment(request, options = nil)
386
466
  # Pass arguments to `update_environment` via a request object, either of type
387
467
  # {::Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest} or an equivalent Hash.
@@ -410,6 +490,28 @@ module Google
410
490
  #
411
491
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
412
492
  #
493
+ # @example Basic example
494
+ # require "google/cloud/dialogflow/cx/v3"
495
+ #
496
+ # # Create a client object. The client can be reused for multiple calls.
497
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
498
+ #
499
+ # # Create a request. To set request fields, pass in keyword arguments.
500
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest.new
501
+ #
502
+ # # Call the update_environment method.
503
+ # result = client.update_environment request
504
+ #
505
+ # # The returned object is of type Gapic::Operation. You can use this
506
+ # # object to check the status of an operation, cancel it, or wait
507
+ # # for results. Here is how to block until completion:
508
+ # result.wait_until_done! timeout: 60
509
+ # if result.response?
510
+ # p result.response
511
+ # else
512
+ # puts "Error!"
513
+ # end
514
+ #
413
515
  def update_environment request, options = nil
414
516
  raise ::ArgumentError, "request must be provided" if request.nil?
415
517
 
@@ -427,9 +529,11 @@ module Google
427
529
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
428
530
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
429
531
 
430
- header_params = {
431
- "environment.name" => request.environment.name
432
- }
532
+ header_params = {}
533
+ if request.environment&.name
534
+ header_params["environment.name"] = request.environment.name
535
+ end
536
+
433
537
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
434
538
  metadata[:"x-goog-request-params"] ||= request_params_header
435
539
 
@@ -481,6 +585,21 @@ module Google
481
585
  #
482
586
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
483
587
  #
588
+ # @example Basic example
589
+ # require "google/cloud/dialogflow/cx/v3"
590
+ #
591
+ # # Create a client object. The client can be reused for multiple calls.
592
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
593
+ #
594
+ # # Create a request. To set request fields, pass in keyword arguments.
595
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest.new
596
+ #
597
+ # # Call the delete_environment method.
598
+ # result = client.delete_environment request
599
+ #
600
+ # # The returned object is of type Google::Protobuf::Empty.
601
+ # p result
602
+ #
484
603
  def delete_environment request, options = nil
485
604
  raise ::ArgumentError, "request must be provided" if request.nil?
486
605
 
@@ -498,9 +617,11 @@ module Google
498
617
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
499
618
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
500
619
 
501
- header_params = {
502
- "name" => request.name
503
- }
620
+ header_params = {}
621
+ if request.name
622
+ header_params["name"] = request.name
623
+ end
624
+
504
625
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
505
626
  metadata[:"x-goog-request-params"] ||= request_params_header
506
627
 
@@ -556,6 +677,27 @@ module Google
556
677
  #
557
678
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
558
679
  #
680
+ # @example Basic example
681
+ # require "google/cloud/dialogflow/cx/v3"
682
+ #
683
+ # # Create a client object. The client can be reused for multiple calls.
684
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
685
+ #
686
+ # # Create a request. To set request fields, pass in keyword arguments.
687
+ # request = Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest.new
688
+ #
689
+ # # Call the lookup_environment_history method.
690
+ # result = client.lookup_environment_history request
691
+ #
692
+ # # The returned object is of type Gapic::PagedEnumerable. You can
693
+ # # iterate over all elements by calling #each, and the enumerable
694
+ # # will lazily make API calls to fetch subsequent pages. Other
695
+ # # methods are also available for managing paging directly.
696
+ # result.each do |response|
697
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Environment.
698
+ # p response
699
+ # end
700
+ #
559
701
  def lookup_environment_history request, options = nil
560
702
  raise ::ArgumentError, "request must be provided" if request.nil?
561
703
 
@@ -573,9 +715,11 @@ module Google
573
715
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
574
716
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
575
717
 
576
- header_params = {
577
- "name" => request.name
578
- }
718
+ header_params = {}
719
+ if request.name
720
+ header_params["name"] = request.name
721
+ end
722
+
579
723
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
580
724
  metadata[:"x-goog-request-params"] ||= request_params_header
581
725
 
@@ -599,6 +743,13 @@ module Google
599
743
  ##
600
744
  # Kicks off a continuous test under the specified {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
601
745
  #
746
+ # This method is a [long-running
747
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
748
+ # The returned `Operation` type has the following method-specific fields:
749
+ #
750
+ # - `metadata`: {::Google::Cloud::Dialogflow::CX::V3::RunContinuousTestMetadata RunContinuousTestMetadata}
751
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::RunContinuousTestResponse RunContinuousTestResponse}
752
+ #
602
753
  # @overload run_continuous_test(request, options = nil)
603
754
  # Pass arguments to `run_continuous_test` via a request object, either of type
604
755
  # {::Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest} or an equivalent Hash.
@@ -626,6 +777,28 @@ module Google
626
777
  #
627
778
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
628
779
  #
780
+ # @example Basic example
781
+ # require "google/cloud/dialogflow/cx/v3"
782
+ #
783
+ # # Create a client object. The client can be reused for multiple calls.
784
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
785
+ #
786
+ # # Create a request. To set request fields, pass in keyword arguments.
787
+ # request = Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest.new
788
+ #
789
+ # # Call the run_continuous_test method.
790
+ # result = client.run_continuous_test request
791
+ #
792
+ # # The returned object is of type Gapic::Operation. You can use this
793
+ # # object to check the status of an operation, cancel it, or wait
794
+ # # for results. Here is how to block until completion:
795
+ # result.wait_until_done! timeout: 60
796
+ # if result.response?
797
+ # p result.response
798
+ # else
799
+ # puts "Error!"
800
+ # end
801
+ #
629
802
  def run_continuous_test request, options = nil
630
803
  raise ::ArgumentError, "request must be provided" if request.nil?
631
804
 
@@ -643,9 +816,11 @@ module Google
643
816
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
644
817
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
645
818
 
646
- header_params = {
647
- "environment" => request.environment
648
- }
819
+ header_params = {}
820
+ if request.environment
821
+ header_params["environment"] = request.environment
822
+ end
823
+
649
824
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
650
825
  metadata[:"x-goog-request-params"] ||= request_params_header
651
826
 
@@ -702,6 +877,27 @@ module Google
702
877
  #
703
878
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
704
879
  #
880
+ # @example Basic example
881
+ # require "google/cloud/dialogflow/cx/v3"
882
+ #
883
+ # # Create a client object. The client can be reused for multiple calls.
884
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
885
+ #
886
+ # # Create a request. To set request fields, pass in keyword arguments.
887
+ # request = Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest.new
888
+ #
889
+ # # Call the list_continuous_test_results method.
890
+ # result = client.list_continuous_test_results request
891
+ #
892
+ # # The returned object is of type Gapic::PagedEnumerable. You can
893
+ # # iterate over all elements by calling #each, and the enumerable
894
+ # # will lazily make API calls to fetch subsequent pages. Other
895
+ # # methods are also available for managing paging directly.
896
+ # result.each do |response|
897
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult.
898
+ # p response
899
+ # end
900
+ #
705
901
  def list_continuous_test_results request, options = nil
706
902
  raise ::ArgumentError, "request must be provided" if request.nil?
707
903
 
@@ -719,9 +915,11 @@ module Google
719
915
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
720
916
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
721
917
 
722
- header_params = {
723
- "parent" => request.parent
724
- }
918
+ header_params = {}
919
+ if request.parent
920
+ header_params["parent"] = request.parent
921
+ end
922
+
725
923
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
726
924
  metadata[:"x-goog-request-params"] ||= request_params_header
727
925
 
@@ -742,6 +940,112 @@ module Google
742
940
  raise ::Google::Cloud::Error.from_error(e)
743
941
  end
744
942
 
943
+ ##
944
+ # Deploys a flow to the specified {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}.
945
+ #
946
+ # This method is a [long-running
947
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
948
+ # The returned `Operation` type has the following method-specific fields:
949
+ #
950
+ # - `metadata`: {::Google::Cloud::Dialogflow::CX::V3::DeployFlowMetadata DeployFlowMetadata}
951
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::DeployFlowResponse DeployFlowResponse}
952
+ #
953
+ # @overload deploy_flow(request, options = nil)
954
+ # Pass arguments to `deploy_flow` via a request object, either of type
955
+ # {::Google::Cloud::Dialogflow::CX::V3::DeployFlowRequest} or an equivalent Hash.
956
+ #
957
+ # @param request [::Google::Cloud::Dialogflow::CX::V3::DeployFlowRequest, ::Hash]
958
+ # A request object representing the call parameters. Required. To specify no
959
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
960
+ # @param options [::Gapic::CallOptions, ::Hash]
961
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
962
+ #
963
+ # @overload deploy_flow(environment: nil, flow_version: nil)
964
+ # Pass arguments to `deploy_flow` via keyword arguments. Note that at
965
+ # least one keyword argument is required. To specify no parameters, or to keep all
966
+ # the default parameter values, pass an empty Hash as a request object (see above).
967
+ #
968
+ # @param environment [::String]
969
+ # Required. The environment to deploy the flow to.
970
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
971
+ # environments/<Environment ID>`.
972
+ # @param flow_version [::String]
973
+ # Required. The flow version to deploy.
974
+ # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
975
+ # flows/<Flow ID>/versions/<Version ID>`.
976
+ #
977
+ # @yield [response, operation] Access the result along with the RPC operation
978
+ # @yieldparam response [::Gapic::Operation]
979
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
980
+ #
981
+ # @return [::Gapic::Operation]
982
+ #
983
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
984
+ #
985
+ # @example Basic example
986
+ # require "google/cloud/dialogflow/cx/v3"
987
+ #
988
+ # # Create a client object. The client can be reused for multiple calls.
989
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
990
+ #
991
+ # # Create a request. To set request fields, pass in keyword arguments.
992
+ # request = Google::Cloud::Dialogflow::CX::V3::DeployFlowRequest.new
993
+ #
994
+ # # Call the deploy_flow method.
995
+ # result = client.deploy_flow request
996
+ #
997
+ # # The returned object is of type Gapic::Operation. You can use this
998
+ # # object to check the status of an operation, cancel it, or wait
999
+ # # for results. Here is how to block until completion:
1000
+ # result.wait_until_done! timeout: 60
1001
+ # if result.response?
1002
+ # p result.response
1003
+ # else
1004
+ # puts "Error!"
1005
+ # end
1006
+ #
1007
+ def deploy_flow request, options = nil
1008
+ raise ::ArgumentError, "request must be provided" if request.nil?
1009
+
1010
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::DeployFlowRequest
1011
+
1012
+ # Converts hash and nil to an options object
1013
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1014
+
1015
+ # Customize the options with defaults
1016
+ metadata = @config.rpcs.deploy_flow.metadata.to_h
1017
+
1018
+ # Set x-goog-api-client and x-goog-user-project headers
1019
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1020
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1021
+ gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
1022
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1023
+
1024
+ header_params = {}
1025
+ if request.environment
1026
+ header_params["environment"] = request.environment
1027
+ end
1028
+
1029
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1030
+ metadata[:"x-goog-request-params"] ||= request_params_header
1031
+
1032
+ options.apply_defaults timeout: @config.rpcs.deploy_flow.timeout,
1033
+ metadata: metadata,
1034
+ retry_policy: @config.rpcs.deploy_flow.retry_policy
1035
+
1036
+ options.apply_defaults timeout: @config.timeout,
1037
+ metadata: @config.metadata,
1038
+ retry_policy: @config.retry_policy
1039
+
1040
+ @environments_stub.call_rpc :deploy_flow, request, options: options do |response, operation|
1041
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1042
+ yield response, operation if block_given?
1043
+ return response
1044
+ end
1045
+ rescue ::GRPC::BadStatus => e
1046
+ raise ::Google::Cloud::Error.from_error(e)
1047
+ end
1048
+
745
1049
  ##
746
1050
  # Configuration class for the Environments API.
747
1051
  #
@@ -917,6 +1221,11 @@ module Google
917
1221
  # @return [::Gapic::Config::Method]
918
1222
  #
919
1223
  attr_reader :list_continuous_test_results
1224
+ ##
1225
+ # RPC-specific configuration for `deploy_flow`
1226
+ # @return [::Gapic::Config::Method]
1227
+ #
1228
+ attr_reader :deploy_flow
920
1229
 
921
1230
  # @private
922
1231
  def initialize parent_rpcs = nil
@@ -936,6 +1245,8 @@ module Google
936
1245
  @run_continuous_test = ::Gapic::Config::Method.new run_continuous_test_config
937
1246
  list_continuous_test_results_config = parent_rpcs.list_continuous_test_results if parent_rpcs.respond_to? :list_continuous_test_results
938
1247
  @list_continuous_test_results = ::Gapic::Config::Method.new list_continuous_test_results_config
1248
+ deploy_flow_config = parent_rpcs.deploy_flow if parent_rpcs.respond_to? :deploy_flow
1249
+ @deploy_flow = ::Gapic::Config::Method.new deploy_flow_config
939
1250
 
940
1251
  yield self if block_given?
941
1252
  end