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
@@ -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
 
@@ -186,6 +186,27 @@ module Google
186
186
  #
187
187
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
188
188
  #
189
+ # @example Basic example
190
+ # require "google/cloud/dialogflow/cx/v3"
191
+ #
192
+ # # Create a client object. The client can be reused for multiple calls.
193
+ # client = Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new
194
+ #
195
+ # # Create a request. To set request fields, pass in keyword arguments.
196
+ # request = Google::Cloud::Dialogflow::CX::V3::ListExperimentsRequest.new
197
+ #
198
+ # # Call the list_experiments method.
199
+ # result = client.list_experiments request
200
+ #
201
+ # # The returned object is of type Gapic::PagedEnumerable. You can
202
+ # # iterate over all elements by calling #each, and the enumerable
203
+ # # will lazily make API calls to fetch subsequent pages. Other
204
+ # # methods are also available for managing paging directly.
205
+ # result.each do |response|
206
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Experiment.
207
+ # p response
208
+ # end
209
+ #
189
210
  def list_experiments request, options = nil
190
211
  raise ::ArgumentError, "request must be provided" if request.nil?
191
212
 
@@ -203,9 +224,11 @@ module Google
203
224
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
204
225
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
205
226
 
206
- header_params = {
207
- "parent" => request.parent
208
- }
227
+ header_params = {}
228
+ if request.parent
229
+ header_params["parent"] = request.parent
230
+ end
231
+
209
232
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
210
233
  metadata[:"x-goog-request-params"] ||= request_params_header
211
234
 
@@ -257,6 +280,21 @@ module Google
257
280
  #
258
281
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
259
282
  #
283
+ # @example Basic example
284
+ # require "google/cloud/dialogflow/cx/v3"
285
+ #
286
+ # # Create a client object. The client can be reused for multiple calls.
287
+ # client = Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new
288
+ #
289
+ # # Create a request. To set request fields, pass in keyword arguments.
290
+ # request = Google::Cloud::Dialogflow::CX::V3::GetExperimentRequest.new
291
+ #
292
+ # # Call the get_experiment method.
293
+ # result = client.get_experiment request
294
+ #
295
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Experiment.
296
+ # p result
297
+ #
260
298
  def get_experiment request, options = nil
261
299
  raise ::ArgumentError, "request must be provided" if request.nil?
262
300
 
@@ -274,9 +312,11 @@ module Google
274
312
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
275
313
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
276
314
 
277
- header_params = {
278
- "name" => request.name
279
- }
315
+ header_params = {}
316
+ if request.name
317
+ header_params["name"] = request.name
318
+ end
319
+
280
320
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
281
321
  metadata[:"x-goog-request-params"] ||= request_params_header
282
322
 
@@ -329,6 +369,21 @@ module Google
329
369
  #
330
370
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
331
371
  #
372
+ # @example Basic example
373
+ # require "google/cloud/dialogflow/cx/v3"
374
+ #
375
+ # # Create a client object. The client can be reused for multiple calls.
376
+ # client = Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new
377
+ #
378
+ # # Create a request. To set request fields, pass in keyword arguments.
379
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateExperimentRequest.new
380
+ #
381
+ # # Call the create_experiment method.
382
+ # result = client.create_experiment request
383
+ #
384
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Experiment.
385
+ # p result
386
+ #
332
387
  def create_experiment request, options = nil
333
388
  raise ::ArgumentError, "request must be provided" if request.nil?
334
389
 
@@ -346,9 +401,11 @@ module Google
346
401
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
347
402
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
348
403
 
349
- header_params = {
350
- "parent" => request.parent
351
- }
404
+ header_params = {}
405
+ if request.parent
406
+ header_params["parent"] = request.parent
407
+ end
408
+
352
409
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
353
410
  metadata[:"x-goog-request-params"] ||= request_params_header
354
411
 
@@ -399,6 +456,21 @@ module Google
399
456
  #
400
457
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
401
458
  #
459
+ # @example Basic example
460
+ # require "google/cloud/dialogflow/cx/v3"
461
+ #
462
+ # # Create a client object. The client can be reused for multiple calls.
463
+ # client = Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new
464
+ #
465
+ # # Create a request. To set request fields, pass in keyword arguments.
466
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateExperimentRequest.new
467
+ #
468
+ # # Call the update_experiment method.
469
+ # result = client.update_experiment request
470
+ #
471
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Experiment.
472
+ # p result
473
+ #
402
474
  def update_experiment request, options = nil
403
475
  raise ::ArgumentError, "request must be provided" if request.nil?
404
476
 
@@ -416,9 +488,11 @@ module Google
416
488
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
417
489
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
418
490
 
419
- header_params = {
420
- "experiment.name" => request.experiment.name
421
- }
491
+ header_params = {}
492
+ if request.experiment&.name
493
+ header_params["experiment.name"] = request.experiment.name
494
+ end
495
+
422
496
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
423
497
  metadata[:"x-goog-request-params"] ||= request_params_header
424
498
 
@@ -469,6 +543,21 @@ module Google
469
543
  #
470
544
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
471
545
  #
546
+ # @example Basic example
547
+ # require "google/cloud/dialogflow/cx/v3"
548
+ #
549
+ # # Create a client object. The client can be reused for multiple calls.
550
+ # client = Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new
551
+ #
552
+ # # Create a request. To set request fields, pass in keyword arguments.
553
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteExperimentRequest.new
554
+ #
555
+ # # Call the delete_experiment method.
556
+ # result = client.delete_experiment request
557
+ #
558
+ # # The returned object is of type Google::Protobuf::Empty.
559
+ # p result
560
+ #
472
561
  def delete_experiment request, options = nil
473
562
  raise ::ArgumentError, "request must be provided" if request.nil?
474
563
 
@@ -486,9 +575,11 @@ module Google
486
575
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
487
576
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
488
577
 
489
- header_params = {
490
- "name" => request.name
491
- }
578
+ header_params = {}
579
+ if request.name
580
+ header_params["name"] = request.name
581
+ end
582
+
492
583
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
493
584
  metadata[:"x-goog-request-params"] ||= request_params_header
494
585
 
@@ -540,6 +631,21 @@ module Google
540
631
  #
541
632
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
542
633
  #
634
+ # @example Basic example
635
+ # require "google/cloud/dialogflow/cx/v3"
636
+ #
637
+ # # Create a client object. The client can be reused for multiple calls.
638
+ # client = Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new
639
+ #
640
+ # # Create a request. To set request fields, pass in keyword arguments.
641
+ # request = Google::Cloud::Dialogflow::CX::V3::StartExperimentRequest.new
642
+ #
643
+ # # Call the start_experiment method.
644
+ # result = client.start_experiment request
645
+ #
646
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Experiment.
647
+ # p result
648
+ #
543
649
  def start_experiment request, options = nil
544
650
  raise ::ArgumentError, "request must be provided" if request.nil?
545
651
 
@@ -557,9 +663,11 @@ module Google
557
663
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
558
664
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
559
665
 
560
- header_params = {
561
- "name" => request.name
562
- }
666
+ header_params = {}
667
+ if request.name
668
+ header_params["name"] = request.name
669
+ end
670
+
563
671
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
564
672
  metadata[:"x-goog-request-params"] ||= request_params_header
565
673
 
@@ -611,6 +719,21 @@ module Google
611
719
  #
612
720
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
613
721
  #
722
+ # @example Basic example
723
+ # require "google/cloud/dialogflow/cx/v3"
724
+ #
725
+ # # Create a client object. The client can be reused for multiple calls.
726
+ # client = Google::Cloud::Dialogflow::CX::V3::Experiments::Client.new
727
+ #
728
+ # # Create a request. To set request fields, pass in keyword arguments.
729
+ # request = Google::Cloud::Dialogflow::CX::V3::StopExperimentRequest.new
730
+ #
731
+ # # Call the stop_experiment method.
732
+ # result = client.stop_experiment request
733
+ #
734
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Experiment.
735
+ # p result
736
+ #
614
737
  def stop_experiment request, options = nil
615
738
  raise ::ArgumentError, "request must be provided" if request.nil?
616
739
 
@@ -628,9 +751,11 @@ module Google
628
751
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
629
752
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
630
753
 
631
- header_params = {
632
- "name" => request.name
633
- }
754
+ header_params = {}
755
+ if request.name
756
+ header_params["name"] = request.name
757
+ end
758
+
634
759
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
635
760
  metadata[:"x-goog-request-params"] ||= request_params_header
636
761