google-cloud-dialogflow-v2 0.11.4 → 0.11.5

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 (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/v2/agents/client.rb +214 -27
  3. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +115 -12
  4. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +46 -6
  5. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +126 -18
  6. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +2 -0
  7. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +106 -15
  8. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
  9. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +112 -15
  10. data/lib/google/cloud/dialogflow/v2/documents/client.rb +154 -18
  11. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +115 -12
  12. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +241 -30
  13. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +115 -12
  14. data/lib/google/cloud/dialogflow/v2/environments/client.rb +132 -18
  15. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +40 -6
  16. data/lib/google/cloud/dialogflow/v2/intents/client.rb +160 -21
  17. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +115 -12
  18. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +106 -15
  19. data/lib/google/cloud/dialogflow/v2/participants/client.rb +146 -21
  20. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +106 -15
  21. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +44 -3
  22. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  23. data/lib/google/cloud/dialogflow/v2/versions/client.rb +106 -15
  24. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +25 -8
  25. metadata +2 -2
@@ -187,6 +187,27 @@ module Google
187
187
  #
188
188
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
189
189
  #
190
+ # @example Basic example
191
+ # require "google/cloud/dialogflow/v2"
192
+ #
193
+ # # Create a client object. The client can be reused for multiple calls.
194
+ # client = Google::Cloud::Dialogflow::V2::Environments::Client.new
195
+ #
196
+ # # Create a request. To set request fields, pass in keyword arguments.
197
+ # request = Google::Cloud::Dialogflow::V2::ListEnvironmentsRequest.new
198
+ #
199
+ # # Call the list_environments method.
200
+ # result = client.list_environments request
201
+ #
202
+ # # The returned object is of type Gapic::PagedEnumerable. You can
203
+ # # iterate over all elements by calling #each, and the enumerable
204
+ # # will lazily make API calls to fetch subsequent pages. Other
205
+ # # methods are also available for managing paging directly.
206
+ # result.each do |response|
207
+ # # Each element is of type ::Google::Cloud::Dialogflow::V2::Environment.
208
+ # p response
209
+ # end
210
+ #
190
211
  def list_environments request, options = nil
191
212
  raise ::ArgumentError, "request must be provided" if request.nil?
192
213
 
@@ -204,9 +225,11 @@ module Google
204
225
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
205
226
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
206
227
 
207
- header_params = {
208
- "parent" => request.parent
209
- }
228
+ header_params = {}
229
+ if request.parent
230
+ header_params["parent"] = request.parent
231
+ end
232
+
210
233
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
211
234
  metadata[:"x-goog-request-params"] ||= request_params_header
212
235
 
@@ -263,6 +286,21 @@ module Google
263
286
  #
264
287
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
265
288
  #
289
+ # @example Basic example
290
+ # require "google/cloud/dialogflow/v2"
291
+ #
292
+ # # Create a client object. The client can be reused for multiple calls.
293
+ # client = Google::Cloud::Dialogflow::V2::Environments::Client.new
294
+ #
295
+ # # Create a request. To set request fields, pass in keyword arguments.
296
+ # request = Google::Cloud::Dialogflow::V2::GetEnvironmentRequest.new
297
+ #
298
+ # # Call the get_environment method.
299
+ # result = client.get_environment request
300
+ #
301
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Environment.
302
+ # p result
303
+ #
266
304
  def get_environment request, options = nil
267
305
  raise ::ArgumentError, "request must be provided" if request.nil?
268
306
 
@@ -280,9 +318,11 @@ module Google
280
318
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
281
319
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
282
320
 
283
- header_params = {
284
- "name" => request.name
285
- }
321
+ header_params = {}
322
+ if request.name
323
+ header_params["name"] = request.name
324
+ end
325
+
286
326
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
287
327
  metadata[:"x-goog-request-params"] ||= request_params_header
288
328
 
@@ -339,6 +379,21 @@ module Google
339
379
  #
340
380
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
341
381
  #
382
+ # @example Basic example
383
+ # require "google/cloud/dialogflow/v2"
384
+ #
385
+ # # Create a client object. The client can be reused for multiple calls.
386
+ # client = Google::Cloud::Dialogflow::V2::Environments::Client.new
387
+ #
388
+ # # Create a request. To set request fields, pass in keyword arguments.
389
+ # request = Google::Cloud::Dialogflow::V2::CreateEnvironmentRequest.new
390
+ #
391
+ # # Call the create_environment method.
392
+ # result = client.create_environment request
393
+ #
394
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Environment.
395
+ # p result
396
+ #
342
397
  def create_environment request, options = nil
343
398
  raise ::ArgumentError, "request must be provided" if request.nil?
344
399
 
@@ -356,9 +411,11 @@ module Google
356
411
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
357
412
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
358
413
 
359
- header_params = {
360
- "parent" => request.parent
361
- }
414
+ header_params = {}
415
+ if request.parent
416
+ header_params["parent"] = request.parent
417
+ end
418
+
362
419
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
363
420
  metadata[:"x-goog-request-params"] ||= request_params_header
364
421
 
@@ -425,6 +482,21 @@ module Google
425
482
  #
426
483
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
427
484
  #
485
+ # @example Basic example
486
+ # require "google/cloud/dialogflow/v2"
487
+ #
488
+ # # Create a client object. The client can be reused for multiple calls.
489
+ # client = Google::Cloud::Dialogflow::V2::Environments::Client.new
490
+ #
491
+ # # Create a request. To set request fields, pass in keyword arguments.
492
+ # request = Google::Cloud::Dialogflow::V2::UpdateEnvironmentRequest.new
493
+ #
494
+ # # Call the update_environment method.
495
+ # result = client.update_environment request
496
+ #
497
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Environment.
498
+ # p result
499
+ #
428
500
  def update_environment request, options = nil
429
501
  raise ::ArgumentError, "request must be provided" if request.nil?
430
502
 
@@ -442,9 +514,11 @@ module Google
442
514
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
443
515
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
444
516
 
445
- header_params = {
446
- "environment.name" => request.environment.name
447
- }
517
+ header_params = {}
518
+ if request.environment&.name
519
+ header_params["environment.name"] = request.environment.name
520
+ end
521
+
448
522
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
449
523
  metadata[:"x-goog-request-params"] ||= request_params_header
450
524
 
@@ -500,6 +574,21 @@ module Google
500
574
  #
501
575
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
502
576
  #
577
+ # @example Basic example
578
+ # require "google/cloud/dialogflow/v2"
579
+ #
580
+ # # Create a client object. The client can be reused for multiple calls.
581
+ # client = Google::Cloud::Dialogflow::V2::Environments::Client.new
582
+ #
583
+ # # Create a request. To set request fields, pass in keyword arguments.
584
+ # request = Google::Cloud::Dialogflow::V2::DeleteEnvironmentRequest.new
585
+ #
586
+ # # Call the delete_environment method.
587
+ # result = client.delete_environment request
588
+ #
589
+ # # The returned object is of type Google::Protobuf::Empty.
590
+ # p result
591
+ #
503
592
  def delete_environment request, options = nil
504
593
  raise ::ArgumentError, "request must be provided" if request.nil?
505
594
 
@@ -517,9 +606,11 @@ module Google
517
606
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
518
607
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
519
608
 
520
- header_params = {
521
- "name" => request.name
522
- }
609
+ header_params = {}
610
+ if request.name
611
+ header_params["name"] = request.name
612
+ end
613
+
523
614
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
524
615
  metadata[:"x-goog-request-params"] ||= request_params_header
525
616
 
@@ -580,6 +671,27 @@ module Google
580
671
  #
581
672
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
582
673
  #
674
+ # @example Basic example
675
+ # require "google/cloud/dialogflow/v2"
676
+ #
677
+ # # Create a client object. The client can be reused for multiple calls.
678
+ # client = Google::Cloud::Dialogflow::V2::Environments::Client.new
679
+ #
680
+ # # Create a request. To set request fields, pass in keyword arguments.
681
+ # request = Google::Cloud::Dialogflow::V2::GetEnvironmentHistoryRequest.new
682
+ #
683
+ # # Call the get_environment_history method.
684
+ # result = client.get_environment_history request
685
+ #
686
+ # # The returned object is of type Gapic::PagedEnumerable. You can
687
+ # # iterate over all elements by calling #each, and the enumerable
688
+ # # will lazily make API calls to fetch subsequent pages. Other
689
+ # # methods are also available for managing paging directly.
690
+ # result.each do |response|
691
+ # # Each element is of type ::Google::Cloud::Dialogflow::V2::EnvironmentHistory::Entry.
692
+ # p response
693
+ # end
694
+ #
583
695
  def get_environment_history request, options = nil
584
696
  raise ::ArgumentError, "request must be provided" if request.nil?
585
697
 
@@ -597,9 +709,11 @@ module Google
597
709
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
598
710
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
599
711
 
600
- header_params = {
601
- "parent" => request.parent
602
- }
712
+ header_params = {}
713
+ if request.parent
714
+ header_params["parent"] = request.parent
715
+ end
716
+
603
717
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
604
718
  metadata[:"x-goog-request-params"] ||= request_params_header
605
719
 
@@ -179,6 +179,21 @@ module Google
179
179
  #
180
180
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
181
181
  #
182
+ # @example Basic example
183
+ # require "google/cloud/dialogflow/v2"
184
+ #
185
+ # # Create a client object. The client can be reused for multiple calls.
186
+ # client = Google::Cloud::Dialogflow::V2::Fulfillments::Client.new
187
+ #
188
+ # # Create a request. To set request fields, pass in keyword arguments.
189
+ # request = Google::Cloud::Dialogflow::V2::GetFulfillmentRequest.new
190
+ #
191
+ # # Call the get_fulfillment method.
192
+ # result = client.get_fulfillment request
193
+ #
194
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Fulfillment.
195
+ # p result
196
+ #
182
197
  def get_fulfillment request, options = nil
183
198
  raise ::ArgumentError, "request must be provided" if request.nil?
184
199
 
@@ -196,9 +211,11 @@ module Google
196
211
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
197
212
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
198
213
 
199
- header_params = {
200
- "name" => request.name
201
- }
214
+ header_params = {}
215
+ if request.name
216
+ header_params["name"] = request.name
217
+ end
218
+
202
219
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
203
220
  metadata[:"x-goog-request-params"] ||= request_params_header
204
221
 
@@ -250,6 +267,21 @@ module Google
250
267
  #
251
268
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
252
269
  #
270
+ # @example Basic example
271
+ # require "google/cloud/dialogflow/v2"
272
+ #
273
+ # # Create a client object. The client can be reused for multiple calls.
274
+ # client = Google::Cloud::Dialogflow::V2::Fulfillments::Client.new
275
+ #
276
+ # # Create a request. To set request fields, pass in keyword arguments.
277
+ # request = Google::Cloud::Dialogflow::V2::UpdateFulfillmentRequest.new
278
+ #
279
+ # # Call the update_fulfillment method.
280
+ # result = client.update_fulfillment request
281
+ #
282
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Fulfillment.
283
+ # p result
284
+ #
253
285
  def update_fulfillment request, options = nil
254
286
  raise ::ArgumentError, "request must be provided" if request.nil?
255
287
 
@@ -267,9 +299,11 @@ module Google
267
299
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
268
300
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
269
301
 
270
- header_params = {
271
- "fulfillment.name" => request.fulfillment.name
272
- }
302
+ header_params = {}
303
+ if request.fulfillment&.name
304
+ header_params["fulfillment.name"] = request.fulfillment.name
305
+ end
306
+
273
307
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
274
308
  metadata[:"x-goog-request-params"] ||= request_params_header
275
309
 
@@ -212,6 +212,27 @@ module Google
212
212
  #
213
213
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
214
214
  #
215
+ # @example Basic example
216
+ # require "google/cloud/dialogflow/v2"
217
+ #
218
+ # # Create a client object. The client can be reused for multiple calls.
219
+ # client = Google::Cloud::Dialogflow::V2::Intents::Client.new
220
+ #
221
+ # # Create a request. To set request fields, pass in keyword arguments.
222
+ # request = Google::Cloud::Dialogflow::V2::ListIntentsRequest.new
223
+ #
224
+ # # Call the list_intents method.
225
+ # result = client.list_intents request
226
+ #
227
+ # # The returned object is of type Gapic::PagedEnumerable. You can
228
+ # # iterate over all elements by calling #each, and the enumerable
229
+ # # will lazily make API calls to fetch subsequent pages. Other
230
+ # # methods are also available for managing paging directly.
231
+ # result.each do |response|
232
+ # # Each element is of type ::Google::Cloud::Dialogflow::V2::Intent.
233
+ # p response
234
+ # end
235
+ #
215
236
  def list_intents request, options = nil
216
237
  raise ::ArgumentError, "request must be provided" if request.nil?
217
238
 
@@ -229,9 +250,11 @@ module Google
229
250
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
230
251
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
231
252
 
232
- header_params = {
233
- "parent" => request.parent
234
- }
253
+ header_params = {}
254
+ if request.parent
255
+ header_params["parent"] = request.parent
256
+ end
257
+
235
258
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
236
259
  metadata[:"x-goog-request-params"] ||= request_params_header
237
260
 
@@ -290,6 +313,21 @@ module Google
290
313
  #
291
314
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
292
315
  #
316
+ # @example Basic example
317
+ # require "google/cloud/dialogflow/v2"
318
+ #
319
+ # # Create a client object. The client can be reused for multiple calls.
320
+ # client = Google::Cloud::Dialogflow::V2::Intents::Client.new
321
+ #
322
+ # # Create a request. To set request fields, pass in keyword arguments.
323
+ # request = Google::Cloud::Dialogflow::V2::GetIntentRequest.new
324
+ #
325
+ # # Call the get_intent method.
326
+ # result = client.get_intent request
327
+ #
328
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Intent.
329
+ # p result
330
+ #
293
331
  def get_intent request, options = nil
294
332
  raise ::ArgumentError, "request must be provided" if request.nil?
295
333
 
@@ -307,9 +345,11 @@ module Google
307
345
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
308
346
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
309
347
 
310
- header_params = {
311
- "name" => request.name
312
- }
348
+ header_params = {}
349
+ if request.name
350
+ header_params["name"] = request.name
351
+ end
352
+
313
353
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
314
354
  metadata[:"x-goog-request-params"] ||= request_params_header
315
355
 
@@ -373,6 +413,21 @@ module Google
373
413
  #
374
414
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
375
415
  #
416
+ # @example Basic example
417
+ # require "google/cloud/dialogflow/v2"
418
+ #
419
+ # # Create a client object. The client can be reused for multiple calls.
420
+ # client = Google::Cloud::Dialogflow::V2::Intents::Client.new
421
+ #
422
+ # # Create a request. To set request fields, pass in keyword arguments.
423
+ # request = Google::Cloud::Dialogflow::V2::CreateIntentRequest.new
424
+ #
425
+ # # Call the create_intent method.
426
+ # result = client.create_intent request
427
+ #
428
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Intent.
429
+ # p result
430
+ #
376
431
  def create_intent request, options = nil
377
432
  raise ::ArgumentError, "request must be provided" if request.nil?
378
433
 
@@ -390,9 +445,11 @@ module Google
390
445
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
391
446
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
392
447
 
393
- header_params = {
394
- "parent" => request.parent
395
- }
448
+ header_params = {}
449
+ if request.parent
450
+ header_params["parent"] = request.parent
451
+ end
452
+
396
453
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
397
454
  metadata[:"x-goog-request-params"] ||= request_params_header
398
455
 
@@ -455,6 +512,21 @@ module Google
455
512
  #
456
513
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
457
514
  #
515
+ # @example Basic example
516
+ # require "google/cloud/dialogflow/v2"
517
+ #
518
+ # # Create a client object. The client can be reused for multiple calls.
519
+ # client = Google::Cloud::Dialogflow::V2::Intents::Client.new
520
+ #
521
+ # # Create a request. To set request fields, pass in keyword arguments.
522
+ # request = Google::Cloud::Dialogflow::V2::UpdateIntentRequest.new
523
+ #
524
+ # # Call the update_intent method.
525
+ # result = client.update_intent request
526
+ #
527
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Intent.
528
+ # p result
529
+ #
458
530
  def update_intent request, options = nil
459
531
  raise ::ArgumentError, "request must be provided" if request.nil?
460
532
 
@@ -472,9 +544,11 @@ module Google
472
544
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
473
545
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
474
546
 
475
- header_params = {
476
- "intent.name" => request.intent.name
477
- }
547
+ header_params = {}
548
+ if request.intent&.name
549
+ header_params["intent.name"] = request.intent.name
550
+ end
551
+
478
552
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
479
553
  metadata[:"x-goog-request-params"] ||= request_params_header
480
554
 
@@ -529,6 +603,21 @@ module Google
529
603
  #
530
604
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
531
605
  #
606
+ # @example Basic example
607
+ # require "google/cloud/dialogflow/v2"
608
+ #
609
+ # # Create a client object. The client can be reused for multiple calls.
610
+ # client = Google::Cloud::Dialogflow::V2::Intents::Client.new
611
+ #
612
+ # # Create a request. To set request fields, pass in keyword arguments.
613
+ # request = Google::Cloud::Dialogflow::V2::DeleteIntentRequest.new
614
+ #
615
+ # # Call the delete_intent method.
616
+ # result = client.delete_intent request
617
+ #
618
+ # # The returned object is of type Google::Protobuf::Empty.
619
+ # p result
620
+ #
532
621
  def delete_intent request, options = nil
533
622
  raise ::ArgumentError, "request must be provided" if request.nil?
534
623
 
@@ -546,9 +635,11 @@ module Google
546
635
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
547
636
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
548
637
 
549
- header_params = {
550
- "name" => request.name
551
- }
638
+ header_params = {}
639
+ if request.name
640
+ header_params["name"] = request.name
641
+ end
642
+
552
643
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
553
644
  metadata[:"x-goog-request-params"] ||= request_params_header
554
645
 
@@ -626,6 +717,28 @@ module Google
626
717
  #
627
718
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
628
719
  #
720
+ # @example Basic example
721
+ # require "google/cloud/dialogflow/v2"
722
+ #
723
+ # # Create a client object. The client can be reused for multiple calls.
724
+ # client = Google::Cloud::Dialogflow::V2::Intents::Client.new
725
+ #
726
+ # # Create a request. To set request fields, pass in keyword arguments.
727
+ # request = Google::Cloud::Dialogflow::V2::BatchUpdateIntentsRequest.new
728
+ #
729
+ # # Call the batch_update_intents method.
730
+ # result = client.batch_update_intents request
731
+ #
732
+ # # The returned object is of type Gapic::Operation. You can use this
733
+ # # object to check the status of an operation, cancel it, or wait
734
+ # # for results. Here is how to block until completion:
735
+ # result.wait_until_done! timeout: 60
736
+ # if result.response?
737
+ # p result.response
738
+ # else
739
+ # puts "Error!"
740
+ # end
741
+ #
629
742
  def batch_update_intents request, options = nil
630
743
  raise ::ArgumentError, "request must be provided" if request.nil?
631
744
 
@@ -643,9 +756,11 @@ module Google
643
756
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
644
757
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
645
758
 
646
- header_params = {
647
- "parent" => request.parent
648
- }
759
+ header_params = {}
760
+ if request.parent
761
+ header_params["parent"] = request.parent
762
+ end
763
+
649
764
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
650
765
  metadata[:"x-goog-request-params"] ||= request_params_header
651
766
 
@@ -712,6 +827,28 @@ 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/v2"
832
+ #
833
+ # # Create a client object. The client can be reused for multiple calls.
834
+ # client = Google::Cloud::Dialogflow::V2::Intents::Client.new
835
+ #
836
+ # # Create a request. To set request fields, pass in keyword arguments.
837
+ # request = Google::Cloud::Dialogflow::V2::BatchDeleteIntentsRequest.new
838
+ #
839
+ # # Call the batch_delete_intents method.
840
+ # result = client.batch_delete_intents request
841
+ #
842
+ # # The returned object is of type Gapic::Operation. You can use this
843
+ # # object to check the status of an operation, cancel it, or wait
844
+ # # for results. Here is how to block until completion:
845
+ # result.wait_until_done! timeout: 60
846
+ # if result.response?
847
+ # p result.response
848
+ # else
849
+ # puts "Error!"
850
+ # end
851
+ #
715
852
  def batch_delete_intents request, options = nil
716
853
  raise ::ArgumentError, "request must be provided" if request.nil?
717
854
 
@@ -729,9 +866,11 @@ module Google
729
866
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
730
867
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
731
868
 
732
- header_params = {
733
- "parent" => request.parent
734
- }
869
+ header_params = {}
870
+ if request.parent
871
+ header_params["parent"] = request.parent
872
+ end
873
+
735
874
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
736
875
  metadata[:"x-goog-request-params"] ||= request_params_header
737
876