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

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 (24) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +200 -27
  3. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +115 -12
  4. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +46 -6
  5. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +46 -6
  6. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +106 -15
  7. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +226 -27
  8. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +115 -12
  9. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +146 -21
  10. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +227 -30
  11. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +115 -12
  12. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +106 -15
  13. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +106 -15
  14. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +106 -15
  15. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +106 -15
  16. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +84 -9
  17. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +280 -36
  18. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +115 -12
  19. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +106 -15
  20. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  21. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +140 -18
  22. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +115 -12
  23. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +106 -15
  24. metadata +2 -2
@@ -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
 
@@ -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
 
@@ -637,6 +728,28 @@ module Google
637
728
  #
638
729
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
639
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
+ #
640
753
  def train_flow request, options = nil
641
754
  raise ::ArgumentError, "request must be provided" if request.nil?
642
755
 
@@ -654,9 +767,11 @@ module Google
654
767
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
655
768
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
656
769
 
657
- header_params = {
658
- "name" => request.name
659
- }
770
+ header_params = {}
771
+ if request.name
772
+ header_params["name"] = request.name
773
+ end
774
+
660
775
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
661
776
  metadata[:"x-goog-request-params"] ||= request_params_header
662
777
 
@@ -712,6 +827,21 @@ module Google
712
827
  #
713
828
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
714
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
+ #
715
845
  def validate_flow request, options = nil
716
846
  raise ::ArgumentError, "request must be provided" if request.nil?
717
847
 
@@ -729,9 +859,11 @@ module Google
729
859
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
730
860
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
731
861
 
732
- header_params = {
733
- "name" => request.name
734
- }
862
+ header_params = {}
863
+ if request.name
864
+ header_params["name"] = request.name
865
+ end
866
+
735
867
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
736
868
  metadata[:"x-goog-request-params"] ||= request_params_header
737
869
 
@@ -785,6 +917,21 @@ module Google
785
917
  #
786
918
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
787
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
+ #
788
935
  def get_flow_validation_result request, options = nil
789
936
  raise ::ArgumentError, "request must be provided" if request.nil?
790
937
 
@@ -802,9 +949,11 @@ module Google
802
949
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
803
950
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
804
951
 
805
- header_params = {
806
- "name" => request.name
807
- }
952
+ header_params = {}
953
+ if request.name
954
+ header_params["name"] = request.name
955
+ end
956
+
808
957
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
809
958
  metadata[:"x-goog-request-params"] ||= request_params_header
810
959
 
@@ -874,6 +1023,28 @@ module Google
874
1023
  #
875
1024
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
876
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
+ #
877
1048
  def import_flow request, options = nil
878
1049
  raise ::ArgumentError, "request must be provided" if request.nil?
879
1050
 
@@ -891,9 +1062,11 @@ module Google
891
1062
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
892
1063
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
893
1064
 
894
- header_params = {
895
- "parent" => request.parent
896
- }
1065
+ header_params = {}
1066
+ if request.parent
1067
+ header_params["parent"] = request.parent
1068
+ end
1069
+
897
1070
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
898
1071
  metadata[:"x-goog-request-params"] ||= request_params_header
899
1072
 
@@ -963,6 +1136,28 @@ module Google
963
1136
  #
964
1137
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
965
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
+ #
966
1161
  def export_flow request, options = nil
967
1162
  raise ::ArgumentError, "request must be provided" if request.nil?
968
1163
 
@@ -980,9 +1175,11 @@ module Google
980
1175
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
981
1176
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
982
1177
 
983
- header_params = {
984
- "name" => request.name
985
- }
1178
+ header_params = {}
1179
+ if request.name
1180
+ header_params["name"] = request.name
1181
+ end
1182
+
986
1183
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
987
1184
  metadata[:"x-goog-request-params"] ||= request_params_header
988
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