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
@@ -198,6 +198,27 @@ module Google
198
198
  #
199
199
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
200
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::Versions::Client.new
206
+ #
207
+ # # Create a request. To set request fields, pass in keyword arguments.
208
+ # request = Google::Cloud::Dialogflow::CX::V3::ListVersionsRequest.new
209
+ #
210
+ # # Call the list_versions method.
211
+ # result = client.list_versions 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::Version.
219
+ # p response
220
+ # end
221
+ #
201
222
  def list_versions request, options = nil
202
223
  raise ::ArgumentError, "request must be provided" if request.nil?
203
224
 
@@ -215,9 +236,11 @@ module Google
215
236
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
216
237
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
217
238
 
218
- header_params = {
219
- "parent" => request.parent
220
- }
239
+ header_params = {}
240
+ if request.parent
241
+ header_params["parent"] = request.parent
242
+ end
243
+
221
244
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
222
245
  metadata[:"x-goog-request-params"] ||= request_params_header
223
246
 
@@ -269,6 +292,21 @@ module Google
269
292
  #
270
293
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
271
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::Versions::Client.new
300
+ #
301
+ # # Create a request. To set request fields, pass in keyword arguments.
302
+ # request = Google::Cloud::Dialogflow::CX::V3::GetVersionRequest.new
303
+ #
304
+ # # Call the get_version method.
305
+ # result = client.get_version request
306
+ #
307
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Version.
308
+ # p result
309
+ #
272
310
  def get_version request, options = nil
273
311
  raise ::ArgumentError, "request must be provided" if request.nil?
274
312
 
@@ -286,9 +324,11 @@ module Google
286
324
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
287
325
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
288
326
 
289
- header_params = {
290
- "name" => request.name
291
- }
327
+ header_params = {}
328
+ if request.name
329
+ header_params["name"] = request.name
330
+ end
331
+
292
332
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
293
333
  metadata[:"x-goog-request-params"] ||= request_params_header
294
334
 
@@ -311,6 +351,13 @@ module Google
311
351
  ##
312
352
  # Creates a {::Google::Cloud::Dialogflow::CX::V3::Version Version} in the specified {::Google::Cloud::Dialogflow::CX::V3::Flow Flow}.
313
353
  #
354
+ # This method is a [long-running
355
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
356
+ # The returned `Operation` type has the following method-specific fields:
357
+ #
358
+ # - `metadata`: {::Google::Cloud::Dialogflow::CX::V3::CreateVersionOperationMetadata CreateVersionOperationMetadata}
359
+ # - `response`: {::Google::Cloud::Dialogflow::CX::V3::Version Version}
360
+ #
314
361
  # @overload create_version(request, options = nil)
315
362
  # Pass arguments to `create_version` via a request object, either of type
316
363
  # {::Google::Cloud::Dialogflow::CX::V3::CreateVersionRequest} or an equivalent Hash.
@@ -341,6 +388,28 @@ module Google
341
388
  #
342
389
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
343
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::Versions::Client.new
396
+ #
397
+ # # Create a request. To set request fields, pass in keyword arguments.
398
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateVersionRequest.new
399
+ #
400
+ # # Call the create_version method.
401
+ # result = client.create_version 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
+ #
344
413
  def create_version request, options = nil
345
414
  raise ::ArgumentError, "request must be provided" if request.nil?
346
415
 
@@ -358,9 +427,11 @@ module Google
358
427
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
359
428
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
360
429
 
361
- header_params = {
362
- "parent" => request.parent
363
- }
430
+ header_params = {}
431
+ if request.parent
432
+ header_params["parent"] = request.parent
433
+ end
434
+
364
435
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
365
436
  metadata[:"x-goog-request-params"] ||= request_params_header
366
437
 
@@ -413,6 +484,21 @@ module Google
413
484
  #
414
485
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
415
486
  #
487
+ # @example Basic example
488
+ # require "google/cloud/dialogflow/cx/v3"
489
+ #
490
+ # # Create a client object. The client can be reused for multiple calls.
491
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
492
+ #
493
+ # # Create a request. To set request fields, pass in keyword arguments.
494
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateVersionRequest.new
495
+ #
496
+ # # Call the update_version method.
497
+ # result = client.update_version request
498
+ #
499
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Version.
500
+ # p result
501
+ #
416
502
  def update_version request, options = nil
417
503
  raise ::ArgumentError, "request must be provided" if request.nil?
418
504
 
@@ -430,9 +516,11 @@ module Google
430
516
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
431
517
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
432
518
 
433
- header_params = {
434
- "version.name" => request.version.name
435
- }
519
+ header_params = {}
520
+ if request.version&.name
521
+ header_params["version.name"] = request.version.name
522
+ end
523
+
436
524
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
437
525
  metadata[:"x-goog-request-params"] ||= request_params_header
438
526
 
@@ -483,6 +571,21 @@ module Google
483
571
  #
484
572
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
485
573
  #
574
+ # @example Basic example
575
+ # require "google/cloud/dialogflow/cx/v3"
576
+ #
577
+ # # Create a client object. The client can be reused for multiple calls.
578
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
579
+ #
580
+ # # Create a request. To set request fields, pass in keyword arguments.
581
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteVersionRequest.new
582
+ #
583
+ # # Call the delete_version method.
584
+ # result = client.delete_version request
585
+ #
586
+ # # The returned object is of type Google::Protobuf::Empty.
587
+ # p result
588
+ #
486
589
  def delete_version request, options = nil
487
590
  raise ::ArgumentError, "request must be provided" if request.nil?
488
591
 
@@ -500,9 +603,11 @@ module Google
500
603
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
501
604
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
502
605
 
503
- header_params = {
504
- "name" => request.name
505
- }
606
+ header_params = {}
607
+ if request.name
608
+ header_params["name"] = request.name
609
+ end
610
+
506
611
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
507
612
  metadata[:"x-goog-request-params"] ||= request_params_header
508
613
 
@@ -525,6 +630,15 @@ module Google
525
630
  ##
526
631
  # Loads resources in the specified version to the draft flow.
527
632
  #
633
+ # This method is a [long-running
634
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
635
+ # The returned `Operation` type has the following method-specific fields:
636
+ #
637
+ # - `metadata`: An empty [Struct
638
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
639
+ # - `response`: An [Empty
640
+ # message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
641
+ #
528
642
  # @overload load_version(request, options = nil)
529
643
  # Pass arguments to `load_version` via a request object, either of type
530
644
  # {::Google::Cloud::Dialogflow::CX::V3::LoadVersionRequest} or an equivalent Hash.
@@ -558,6 +672,28 @@ module Google
558
672
  #
559
673
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
560
674
  #
675
+ # @example Basic example
676
+ # require "google/cloud/dialogflow/cx/v3"
677
+ #
678
+ # # Create a client object. The client can be reused for multiple calls.
679
+ # client = Google::Cloud::Dialogflow::CX::V3::Versions::Client.new
680
+ #
681
+ # # Create a request. To set request fields, pass in keyword arguments.
682
+ # request = Google::Cloud::Dialogflow::CX::V3::LoadVersionRequest.new
683
+ #
684
+ # # Call the load_version method.
685
+ # result = client.load_version request
686
+ #
687
+ # # The returned object is of type Gapic::Operation. You can use this
688
+ # # object to check the status of an operation, cancel it, or wait
689
+ # # for results. Here is how to block until completion:
690
+ # result.wait_until_done! timeout: 60
691
+ # if result.response?
692
+ # p result.response
693
+ # else
694
+ # puts "Error!"
695
+ # end
696
+ #
561
697
  def load_version request, options = nil
562
698
  raise ::ArgumentError, "request must be provided" if request.nil?
563
699
 
@@ -575,9 +711,11 @@ module Google
575
711
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
576
712
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
577
713
 
578
- header_params = {
579
- "name" => request.name
580
- }
714
+ header_params = {}
715
+ if request.name
716
+ header_params["name"] = request.name
717
+ end
718
+
581
719
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
582
720
  metadata[:"x-goog-request-params"] ||= request_params_header
583
721
 
@@ -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,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/cx/v3/webhook.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'
@@ -12,6 +10,8 @@ require 'google/protobuf/duration_pb'
12
10
  require 'google/protobuf/empty_pb'
13
11
  require 'google/protobuf/field_mask_pb'
14
12
  require 'google/protobuf/struct_pb'
13
+ require 'google/protobuf'
14
+
15
15
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
16
  add_file("google/cloud/dialogflow/cx/v3/webhook.proto", :syntax => :proto3) do
17
17
  add_message "google.cloud.dialogflow.cx.v3.Webhook" do
@@ -28,7 +28,7 @@ module Google
28
28
  # Service for managing [Webhooks][google.cloud.dialogflow.cx.v3.Webhook].
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
@@ -185,6 +185,27 @@ module Google
185
185
  #
186
186
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
187
187
  #
188
+ # @example Basic example
189
+ # require "google/cloud/dialogflow/cx/v3"
190
+ #
191
+ # # Create a client object. The client can be reused for multiple calls.
192
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Client.new
193
+ #
194
+ # # Create a request. To set request fields, pass in keyword arguments.
195
+ # request = Google::Cloud::Dialogflow::CX::V3::ListWebhooksRequest.new
196
+ #
197
+ # # Call the list_webhooks method.
198
+ # result = client.list_webhooks request
199
+ #
200
+ # # The returned object is of type Gapic::PagedEnumerable. You can
201
+ # # iterate over all elements by calling #each, and the enumerable
202
+ # # will lazily make API calls to fetch subsequent pages. Other
203
+ # # methods are also available for managing paging directly.
204
+ # result.each do |response|
205
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Webhook.
206
+ # p response
207
+ # end
208
+ #
188
209
  def list_webhooks request, options = nil
189
210
  raise ::ArgumentError, "request must be provided" if request.nil?
190
211
 
@@ -202,9 +223,11 @@ module Google
202
223
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
203
224
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
204
225
 
205
- header_params = {
206
- "parent" => request.parent
207
- }
226
+ header_params = {}
227
+ if request.parent
228
+ header_params["parent"] = request.parent
229
+ end
230
+
208
231
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
209
232
  metadata[:"x-goog-request-params"] ||= request_params_header
210
233
 
@@ -256,6 +279,21 @@ module Google
256
279
  #
257
280
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
258
281
  #
282
+ # @example Basic example
283
+ # require "google/cloud/dialogflow/cx/v3"
284
+ #
285
+ # # Create a client object. The client can be reused for multiple calls.
286
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Client.new
287
+ #
288
+ # # Create a request. To set request fields, pass in keyword arguments.
289
+ # request = Google::Cloud::Dialogflow::CX::V3::GetWebhookRequest.new
290
+ #
291
+ # # Call the get_webhook method.
292
+ # result = client.get_webhook request
293
+ #
294
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Webhook.
295
+ # p result
296
+ #
259
297
  def get_webhook request, options = nil
260
298
  raise ::ArgumentError, "request must be provided" if request.nil?
261
299
 
@@ -273,9 +311,11 @@ module Google
273
311
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
274
312
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
275
313
 
276
- header_params = {
277
- "name" => request.name
278
- }
314
+ header_params = {}
315
+ if request.name
316
+ header_params["name"] = request.name
317
+ end
318
+
279
319
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
280
320
  metadata[:"x-goog-request-params"] ||= request_params_header
281
321
 
@@ -327,6 +367,21 @@ module Google
327
367
  #
328
368
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
329
369
  #
370
+ # @example Basic example
371
+ # require "google/cloud/dialogflow/cx/v3"
372
+ #
373
+ # # Create a client object. The client can be reused for multiple calls.
374
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Client.new
375
+ #
376
+ # # Create a request. To set request fields, pass in keyword arguments.
377
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateWebhookRequest.new
378
+ #
379
+ # # Call the create_webhook method.
380
+ # result = client.create_webhook request
381
+ #
382
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Webhook.
383
+ # p result
384
+ #
330
385
  def create_webhook request, options = nil
331
386
  raise ::ArgumentError, "request must be provided" if request.nil?
332
387
 
@@ -344,9 +399,11 @@ module Google
344
399
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
345
400
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
346
401
 
347
- header_params = {
348
- "parent" => request.parent
349
- }
402
+ header_params = {}
403
+ if request.parent
404
+ header_params["parent"] = request.parent
405
+ end
406
+
350
407
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
351
408
  metadata[:"x-goog-request-params"] ||= request_params_header
352
409
 
@@ -398,6 +455,21 @@ module Google
398
455
  #
399
456
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
400
457
  #
458
+ # @example Basic example
459
+ # require "google/cloud/dialogflow/cx/v3"
460
+ #
461
+ # # Create a client object. The client can be reused for multiple calls.
462
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Client.new
463
+ #
464
+ # # Create a request. To set request fields, pass in keyword arguments.
465
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateWebhookRequest.new
466
+ #
467
+ # # Call the update_webhook method.
468
+ # result = client.update_webhook request
469
+ #
470
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Webhook.
471
+ # p result
472
+ #
401
473
  def update_webhook request, options = nil
402
474
  raise ::ArgumentError, "request must be provided" if request.nil?
403
475
 
@@ -415,9 +487,11 @@ module Google
415
487
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
416
488
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
417
489
 
418
- header_params = {
419
- "webhook.name" => request.webhook.name
420
- }
490
+ header_params = {}
491
+ if request.webhook&.name
492
+ header_params["webhook.name"] = request.webhook.name
493
+ end
494
+
421
495
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
422
496
  metadata[:"x-goog-request-params"] ||= request_params_header
423
497
 
@@ -478,6 +552,21 @@ module Google
478
552
  #
479
553
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
480
554
  #
555
+ # @example Basic example
556
+ # require "google/cloud/dialogflow/cx/v3"
557
+ #
558
+ # # Create a client object. The client can be reused for multiple calls.
559
+ # client = Google::Cloud::Dialogflow::CX::V3::Webhooks::Client.new
560
+ #
561
+ # # Create a request. To set request fields, pass in keyword arguments.
562
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteWebhookRequest.new
563
+ #
564
+ # # Call the delete_webhook method.
565
+ # result = client.delete_webhook request
566
+ #
567
+ # # The returned object is of type Google::Protobuf::Empty.
568
+ # p result
569
+ #
481
570
  def delete_webhook request, options = nil
482
571
  raise ::ArgumentError, "request must be provided" if request.nil?
483
572
 
@@ -495,9 +584,11 @@ module Google
495
584
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
496
585
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
497
586
 
498
- header_params = {
499
- "name" => request.name
500
- }
587
+ header_params = {}
588
+ if request.name
589
+ header_params["name"] = request.name
590
+ end
591
+
501
592
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
502
593
  metadata[:"x-goog-request-params"] ||= request_params_header
503
594