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
@@ -141,6 +141,7 @@ module Google
141
141
 
142
142
  @operations_client = Operations.new do |config|
143
143
  config.credentials = credentials
144
+ config.quota_project = @quota_project_id
144
145
  config.endpoint = @config.endpoint
145
146
  end
146
147
 
@@ -197,6 +198,27 @@ module Google
197
198
  #
198
199
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
199
200
  #
201
+ # @example Basic example
202
+ # require "google/cloud/dialogflow/cx/v3"
203
+ #
204
+ # # Create a client object. The client can be reused for multiple calls.
205
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
206
+ #
207
+ # # Create a request. To set request fields, pass in keyword arguments.
208
+ # request = Google::Cloud::Dialogflow::CX::V3::ListEnvironmentsRequest.new
209
+ #
210
+ # # Call the list_environments method.
211
+ # result = client.list_environments request
212
+ #
213
+ # # The returned object is of type Gapic::PagedEnumerable. You can
214
+ # # iterate over all elements by calling #each, and the enumerable
215
+ # # will lazily make API calls to fetch subsequent pages. Other
216
+ # # methods are also available for managing paging directly.
217
+ # result.each do |response|
218
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Environment.
219
+ # p response
220
+ # end
221
+ #
200
222
  def list_environments request, options = nil
201
223
  raise ::ArgumentError, "request must be provided" if request.nil?
202
224
 
@@ -214,9 +236,11 @@ module Google
214
236
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
215
237
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
216
238
 
217
- header_params = {
218
- "parent" => request.parent
219
- }
239
+ header_params = {}
240
+ if request.parent
241
+ header_params["parent"] = request.parent
242
+ end
243
+
220
244
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
221
245
  metadata[:"x-goog-request-params"] ||= request_params_header
222
246
 
@@ -268,6 +292,21 @@ module Google
268
292
  #
269
293
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
270
294
  #
295
+ # @example Basic example
296
+ # require "google/cloud/dialogflow/cx/v3"
297
+ #
298
+ # # Create a client object. The client can be reused for multiple calls.
299
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Dialogflow::CX::V3::GetEnvironmentRequest.new
303
+ #
304
+ # # Call the get_environment method.
305
+ # result = client.get_environment request
306
+ #
307
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Environment.
308
+ # p result
309
+ #
271
310
  def get_environment request, options = nil
272
311
  raise ::ArgumentError, "request must be provided" if request.nil?
273
312
 
@@ -285,9 +324,11 @@ module Google
285
324
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
286
325
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
287
326
 
288
- header_params = {
289
- "name" => request.name
290
- }
327
+ header_params = {}
328
+ if request.name
329
+ header_params["name"] = request.name
330
+ end
331
+
291
332
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
292
333
  metadata[:"x-goog-request-params"] ||= request_params_header
293
334
 
@@ -347,6 +388,28 @@ module Google
347
388
  #
348
389
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
349
390
  #
391
+ # @example Basic example
392
+ # require "google/cloud/dialogflow/cx/v3"
393
+ #
394
+ # # Create a client object. The client can be reused for multiple calls.
395
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
396
+ #
397
+ # # Create a request. To set request fields, pass in keyword arguments.
398
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateEnvironmentRequest.new
399
+ #
400
+ # # Call the create_environment method.
401
+ # result = client.create_environment request
402
+ #
403
+ # # The returned object is of type Gapic::Operation. You can use this
404
+ # # object to check the status of an operation, cancel it, or wait
405
+ # # for results. Here is how to block until completion:
406
+ # result.wait_until_done! timeout: 60
407
+ # if result.response?
408
+ # p result.response
409
+ # else
410
+ # puts "Error!"
411
+ # end
412
+ #
350
413
  def create_environment request, options = nil
351
414
  raise ::ArgumentError, "request must be provided" if request.nil?
352
415
 
@@ -364,9 +427,11 @@ module Google
364
427
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
365
428
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
366
429
 
367
- header_params = {
368
- "parent" => request.parent
369
- }
430
+ header_params = {}
431
+ if request.parent
432
+ header_params["parent"] = request.parent
433
+ end
434
+
370
435
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
371
436
  metadata[:"x-goog-request-params"] ||= request_params_header
372
437
 
@@ -426,6 +491,28 @@ module Google
426
491
  #
427
492
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
428
493
  #
494
+ # @example Basic example
495
+ # require "google/cloud/dialogflow/cx/v3"
496
+ #
497
+ # # Create a client object. The client can be reused for multiple calls.
498
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
499
+ #
500
+ # # Create a request. To set request fields, pass in keyword arguments.
501
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateEnvironmentRequest.new
502
+ #
503
+ # # Call the update_environment method.
504
+ # result = client.update_environment request
505
+ #
506
+ # # The returned object is of type Gapic::Operation. You can use this
507
+ # # object to check the status of an operation, cancel it, or wait
508
+ # # for results. Here is how to block until completion:
509
+ # result.wait_until_done! timeout: 60
510
+ # if result.response?
511
+ # p result.response
512
+ # else
513
+ # puts "Error!"
514
+ # end
515
+ #
429
516
  def update_environment request, options = nil
430
517
  raise ::ArgumentError, "request must be provided" if request.nil?
431
518
 
@@ -443,9 +530,11 @@ module Google
443
530
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
444
531
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
445
532
 
446
- header_params = {
447
- "environment.name" => request.environment.name
448
- }
533
+ header_params = {}
534
+ if request.environment&.name
535
+ header_params["environment.name"] = request.environment.name
536
+ end
537
+
449
538
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
450
539
  metadata[:"x-goog-request-params"] ||= request_params_header
451
540
 
@@ -497,6 +586,21 @@ module Google
497
586
  #
498
587
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
499
588
  #
589
+ # @example Basic example
590
+ # require "google/cloud/dialogflow/cx/v3"
591
+ #
592
+ # # Create a client object. The client can be reused for multiple calls.
593
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
594
+ #
595
+ # # Create a request. To set request fields, pass in keyword arguments.
596
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteEnvironmentRequest.new
597
+ #
598
+ # # Call the delete_environment method.
599
+ # result = client.delete_environment request
600
+ #
601
+ # # The returned object is of type Google::Protobuf::Empty.
602
+ # p result
603
+ #
500
604
  def delete_environment request, options = nil
501
605
  raise ::ArgumentError, "request must be provided" if request.nil?
502
606
 
@@ -514,9 +618,11 @@ module Google
514
618
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
515
619
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
516
620
 
517
- header_params = {
518
- "name" => request.name
519
- }
621
+ header_params = {}
622
+ if request.name
623
+ header_params["name"] = request.name
624
+ end
625
+
520
626
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
521
627
  metadata[:"x-goog-request-params"] ||= request_params_header
522
628
 
@@ -572,6 +678,27 @@ module Google
572
678
  #
573
679
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
574
680
  #
681
+ # @example Basic example
682
+ # require "google/cloud/dialogflow/cx/v3"
683
+ #
684
+ # # Create a client object. The client can be reused for multiple calls.
685
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
686
+ #
687
+ # # Create a request. To set request fields, pass in keyword arguments.
688
+ # request = Google::Cloud::Dialogflow::CX::V3::LookupEnvironmentHistoryRequest.new
689
+ #
690
+ # # Call the lookup_environment_history method.
691
+ # result = client.lookup_environment_history request
692
+ #
693
+ # # The returned object is of type Gapic::PagedEnumerable. You can
694
+ # # iterate over all elements by calling #each, and the enumerable
695
+ # # will lazily make API calls to fetch subsequent pages. Other
696
+ # # methods are also available for managing paging directly.
697
+ # result.each do |response|
698
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Environment.
699
+ # p response
700
+ # end
701
+ #
575
702
  def lookup_environment_history request, options = nil
576
703
  raise ::ArgumentError, "request must be provided" if request.nil?
577
704
 
@@ -589,9 +716,11 @@ module Google
589
716
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
590
717
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
591
718
 
592
- header_params = {
593
- "name" => request.name
594
- }
719
+ header_params = {}
720
+ if request.name
721
+ header_params["name"] = request.name
722
+ end
723
+
595
724
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
596
725
  metadata[:"x-goog-request-params"] ||= request_params_header
597
726
 
@@ -649,6 +778,28 @@ module Google
649
778
  #
650
779
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
651
780
  #
781
+ # @example Basic example
782
+ # require "google/cloud/dialogflow/cx/v3"
783
+ #
784
+ # # Create a client object. The client can be reused for multiple calls.
785
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
786
+ #
787
+ # # Create a request. To set request fields, pass in keyword arguments.
788
+ # request = Google::Cloud::Dialogflow::CX::V3::RunContinuousTestRequest.new
789
+ #
790
+ # # Call the run_continuous_test method.
791
+ # result = client.run_continuous_test request
792
+ #
793
+ # # The returned object is of type Gapic::Operation. You can use this
794
+ # # object to check the status of an operation, cancel it, or wait
795
+ # # for results. Here is how to block until completion:
796
+ # result.wait_until_done! timeout: 60
797
+ # if result.response?
798
+ # p result.response
799
+ # else
800
+ # puts "Error!"
801
+ # end
802
+ #
652
803
  def run_continuous_test request, options = nil
653
804
  raise ::ArgumentError, "request must be provided" if request.nil?
654
805
 
@@ -666,9 +817,11 @@ module Google
666
817
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
667
818
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
668
819
 
669
- header_params = {
670
- "environment" => request.environment
671
- }
820
+ header_params = {}
821
+ if request.environment
822
+ header_params["environment"] = request.environment
823
+ end
824
+
672
825
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
673
826
  metadata[:"x-goog-request-params"] ||= request_params_header
674
827
 
@@ -725,6 +878,27 @@ module Google
725
878
  #
726
879
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
727
880
  #
881
+ # @example Basic example
882
+ # require "google/cloud/dialogflow/cx/v3"
883
+ #
884
+ # # Create a client object. The client can be reused for multiple calls.
885
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
886
+ #
887
+ # # Create a request. To set request fields, pass in keyword arguments.
888
+ # request = Google::Cloud::Dialogflow::CX::V3::ListContinuousTestResultsRequest.new
889
+ #
890
+ # # Call the list_continuous_test_results method.
891
+ # result = client.list_continuous_test_results request
892
+ #
893
+ # # The returned object is of type Gapic::PagedEnumerable. You can
894
+ # # iterate over all elements by calling #each, and the enumerable
895
+ # # will lazily make API calls to fetch subsequent pages. Other
896
+ # # methods are also available for managing paging directly.
897
+ # result.each do |response|
898
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::ContinuousTestResult.
899
+ # p response
900
+ # end
901
+ #
728
902
  def list_continuous_test_results request, options = nil
729
903
  raise ::ArgumentError, "request must be provided" if request.nil?
730
904
 
@@ -742,9 +916,11 @@ module Google
742
916
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
743
917
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
744
918
 
745
- header_params = {
746
- "parent" => request.parent
747
- }
919
+ header_params = {}
920
+ if request.parent
921
+ header_params["parent"] = request.parent
922
+ end
923
+
748
924
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
749
925
  metadata[:"x-goog-request-params"] ||= request_params_header
750
926
 
@@ -807,6 +983,28 @@ module Google
807
983
  #
808
984
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
809
985
  #
986
+ # @example Basic example
987
+ # require "google/cloud/dialogflow/cx/v3"
988
+ #
989
+ # # Create a client object. The client can be reused for multiple calls.
990
+ # client = Google::Cloud::Dialogflow::CX::V3::Environments::Client.new
991
+ #
992
+ # # Create a request. To set request fields, pass in keyword arguments.
993
+ # request = Google::Cloud::Dialogflow::CX::V3::DeployFlowRequest.new
994
+ #
995
+ # # Call the deploy_flow method.
996
+ # result = client.deploy_flow request
997
+ #
998
+ # # The returned object is of type Gapic::Operation. You can use this
999
+ # # object to check the status of an operation, cancel it, or wait
1000
+ # # for results. Here is how to block until completion:
1001
+ # result.wait_until_done! timeout: 60
1002
+ # if result.response?
1003
+ # p result.response
1004
+ # else
1005
+ # puts "Error!"
1006
+ # end
1007
+ #
810
1008
  def deploy_flow request, options = nil
811
1009
  raise ::ArgumentError, "request must be provided" if request.nil?
812
1010
 
@@ -824,9 +1022,11 @@ module Google
824
1022
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
825
1023
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
826
1024
 
827
- header_params = {
828
- "environment" => request.environment
829
- }
1025
+ header_params = {}
1026
+ if request.environment
1027
+ header_params["environment"] = request.environment
1028
+ end
1029
+
830
1030
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
831
1031
  metadata[:"x-goog-request-params"] ||= request_params_header
832
1032
 
@@ -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