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
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -184,6 +184,27 @@ module Google
184
184
  #
185
185
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
186
186
  #
187
+ # @example Basic example
188
+ # require "google/cloud/dialogflow/v2"
189
+ #
190
+ # # Create a client object. The client can be reused for multiple calls.
191
+ # client = Google::Cloud::Dialogflow::V2::KnowledgeBases::Client.new
192
+ #
193
+ # # Create a request. To set request fields, pass in keyword arguments.
194
+ # request = Google::Cloud::Dialogflow::V2::ListKnowledgeBasesRequest.new
195
+ #
196
+ # # Call the list_knowledge_bases method.
197
+ # result = client.list_knowledge_bases request
198
+ #
199
+ # # The returned object is of type Gapic::PagedEnumerable. You can
200
+ # # iterate over all elements by calling #each, and the enumerable
201
+ # # will lazily make API calls to fetch subsequent pages. Other
202
+ # # methods are also available for managing paging directly.
203
+ # result.each do |response|
204
+ # # Each element is of type ::Google::Cloud::Dialogflow::V2::KnowledgeBase.
205
+ # p response
206
+ # end
207
+ #
187
208
  def list_knowledge_bases request, options = nil
188
209
  raise ::ArgumentError, "request must be provided" if request.nil?
189
210
 
@@ -201,9 +222,11 @@ module Google
201
222
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
202
223
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
203
224
 
204
- header_params = {
205
- "parent" => request.parent
206
- }
225
+ header_params = {}
226
+ if request.parent
227
+ header_params["parent"] = request.parent
228
+ end
229
+
207
230
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
208
231
  metadata[:"x-goog-request-params"] ||= request_params_header
209
232
 
@@ -255,6 +278,21 @@ module Google
255
278
  #
256
279
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
257
280
  #
281
+ # @example Basic example
282
+ # require "google/cloud/dialogflow/v2"
283
+ #
284
+ # # Create a client object. The client can be reused for multiple calls.
285
+ # client = Google::Cloud::Dialogflow::V2::KnowledgeBases::Client.new
286
+ #
287
+ # # Create a request. To set request fields, pass in keyword arguments.
288
+ # request = Google::Cloud::Dialogflow::V2::GetKnowledgeBaseRequest.new
289
+ #
290
+ # # Call the get_knowledge_base method.
291
+ # result = client.get_knowledge_base request
292
+ #
293
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::KnowledgeBase.
294
+ # p result
295
+ #
258
296
  def get_knowledge_base request, options = nil
259
297
  raise ::ArgumentError, "request must be provided" if request.nil?
260
298
 
@@ -272,9 +310,11 @@ module Google
272
310
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
273
311
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
274
312
 
275
- header_params = {
276
- "name" => request.name
277
- }
313
+ header_params = {}
314
+ if request.name
315
+ header_params["name"] = request.name
316
+ end
317
+
278
318
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
279
319
  metadata[:"x-goog-request-params"] ||= request_params_header
280
320
 
@@ -326,6 +366,21 @@ module Google
326
366
  #
327
367
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
328
368
  #
369
+ # @example Basic example
370
+ # require "google/cloud/dialogflow/v2"
371
+ #
372
+ # # Create a client object. The client can be reused for multiple calls.
373
+ # client = Google::Cloud::Dialogflow::V2::KnowledgeBases::Client.new
374
+ #
375
+ # # Create a request. To set request fields, pass in keyword arguments.
376
+ # request = Google::Cloud::Dialogflow::V2::CreateKnowledgeBaseRequest.new
377
+ #
378
+ # # Call the create_knowledge_base method.
379
+ # result = client.create_knowledge_base request
380
+ #
381
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::KnowledgeBase.
382
+ # p result
383
+ #
329
384
  def create_knowledge_base request, options = nil
330
385
  raise ::ArgumentError, "request must be provided" if request.nil?
331
386
 
@@ -343,9 +398,11 @@ module Google
343
398
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
344
399
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
345
400
 
346
- header_params = {
347
- "parent" => request.parent
348
- }
401
+ header_params = {}
402
+ if request.parent
403
+ header_params["parent"] = request.parent
404
+ end
405
+
349
406
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
350
407
  metadata[:"x-goog-request-params"] ||= request_params_header
351
408
 
@@ -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/v2"
461
+ #
462
+ # # Create a client object. The client can be reused for multiple calls.
463
+ # client = Google::Cloud::Dialogflow::V2::KnowledgeBases::Client.new
464
+ #
465
+ # # Create a request. To set request fields, pass in keyword arguments.
466
+ # request = Google::Cloud::Dialogflow::V2::DeleteKnowledgeBaseRequest.new
467
+ #
468
+ # # Call the delete_knowledge_base method.
469
+ # result = client.delete_knowledge_base request
470
+ #
471
+ # # The returned object is of type Google::Protobuf::Empty.
472
+ # p result
473
+ #
402
474
  def delete_knowledge_base 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::V2::VERSION
417
489
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
418
490
 
419
- header_params = {
420
- "name" => request.name
421
- }
491
+ header_params = {}
492
+ if request.name
493
+ header_params["name"] = request.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
 
@@ -471,6 +545,21 @@ module Google
471
545
  #
472
546
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
473
547
  #
548
+ # @example Basic example
549
+ # require "google/cloud/dialogflow/v2"
550
+ #
551
+ # # Create a client object. The client can be reused for multiple calls.
552
+ # client = Google::Cloud::Dialogflow::V2::KnowledgeBases::Client.new
553
+ #
554
+ # # Create a request. To set request fields, pass in keyword arguments.
555
+ # request = Google::Cloud::Dialogflow::V2::UpdateKnowledgeBaseRequest.new
556
+ #
557
+ # # Call the update_knowledge_base method.
558
+ # result = client.update_knowledge_base request
559
+ #
560
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::KnowledgeBase.
561
+ # p result
562
+ #
474
563
  def update_knowledge_base request, options = nil
475
564
  raise ::ArgumentError, "request must be provided" if request.nil?
476
565
 
@@ -488,9 +577,11 @@ module Google
488
577
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
489
578
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
490
579
 
491
- header_params = {
492
- "knowledge_base.name" => request.knowledge_base.name
493
- }
580
+ header_params = {}
581
+ if request.knowledge_base&.name
582
+ header_params["knowledge_base.name"] = request.knowledge_base.name
583
+ end
584
+
494
585
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
495
586
  metadata[:"x-goog-request-params"] ||= request_params_header
496
587
 
@@ -187,6 +187,21 @@ 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::Participants::Client.new
195
+ #
196
+ # # Create a request. To set request fields, pass in keyword arguments.
197
+ # request = Google::Cloud::Dialogflow::V2::CreateParticipantRequest.new
198
+ #
199
+ # # Call the create_participant method.
200
+ # result = client.create_participant request
201
+ #
202
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Participant.
203
+ # p result
204
+ #
190
205
  def create_participant request, options = nil
191
206
  raise ::ArgumentError, "request must be provided" if request.nil?
192
207
 
@@ -204,9 +219,11 @@ module Google
204
219
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
205
220
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
206
221
 
207
- header_params = {
208
- "parent" => request.parent
209
- }
222
+ header_params = {}
223
+ if request.parent
224
+ header_params["parent"] = request.parent
225
+ end
226
+
210
227
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
211
228
  metadata[:"x-goog-request-params"] ||= request_params_header
212
229
 
@@ -257,6 +274,21 @@ module Google
257
274
  #
258
275
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
259
276
  #
277
+ # @example Basic example
278
+ # require "google/cloud/dialogflow/v2"
279
+ #
280
+ # # Create a client object. The client can be reused for multiple calls.
281
+ # client = Google::Cloud::Dialogflow::V2::Participants::Client.new
282
+ #
283
+ # # Create a request. To set request fields, pass in keyword arguments.
284
+ # request = Google::Cloud::Dialogflow::V2::GetParticipantRequest.new
285
+ #
286
+ # # Call the get_participant method.
287
+ # result = client.get_participant request
288
+ #
289
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Participant.
290
+ # p result
291
+ #
260
292
  def get_participant request, options = nil
261
293
  raise ::ArgumentError, "request must be provided" if request.nil?
262
294
 
@@ -274,9 +306,11 @@ module Google
274
306
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
275
307
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
276
308
 
277
- header_params = {
278
- "name" => request.name
279
- }
309
+ header_params = {}
310
+ if request.name
311
+ header_params["name"] = request.name
312
+ end
313
+
280
314
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
281
315
  metadata[:"x-goog-request-params"] ||= request_params_header
282
316
 
@@ -332,6 +366,27 @@ module Google
332
366
  #
333
367
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
334
368
  #
369
+ # @example Basic example
370
+ # require "google/cloud/dialogflow/v2"
371
+ #
372
+ # # Create a client object. The client can be reused for multiple calls.
373
+ # client = Google::Cloud::Dialogflow::V2::Participants::Client.new
374
+ #
375
+ # # Create a request. To set request fields, pass in keyword arguments.
376
+ # request = Google::Cloud::Dialogflow::V2::ListParticipantsRequest.new
377
+ #
378
+ # # Call the list_participants method.
379
+ # result = client.list_participants request
380
+ #
381
+ # # The returned object is of type Gapic::PagedEnumerable. You can
382
+ # # iterate over all elements by calling #each, and the enumerable
383
+ # # will lazily make API calls to fetch subsequent pages. Other
384
+ # # methods are also available for managing paging directly.
385
+ # result.each do |response|
386
+ # # Each element is of type ::Google::Cloud::Dialogflow::V2::Participant.
387
+ # p response
388
+ # end
389
+ #
335
390
  def list_participants request, options = nil
336
391
  raise ::ArgumentError, "request must be provided" if request.nil?
337
392
 
@@ -349,9 +404,11 @@ module Google
349
404
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
350
405
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
351
406
 
352
- header_params = {
353
- "parent" => request.parent
354
- }
407
+ header_params = {}
408
+ if request.parent
409
+ header_params["parent"] = request.parent
410
+ end
411
+
355
412
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
356
413
  metadata[:"x-goog-request-params"] ||= request_params_header
357
414
 
@@ -403,6 +460,21 @@ module Google
403
460
  #
404
461
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
405
462
  #
463
+ # @example Basic example
464
+ # require "google/cloud/dialogflow/v2"
465
+ #
466
+ # # Create a client object. The client can be reused for multiple calls.
467
+ # client = Google::Cloud::Dialogflow::V2::Participants::Client.new
468
+ #
469
+ # # Create a request. To set request fields, pass in keyword arguments.
470
+ # request = Google::Cloud::Dialogflow::V2::UpdateParticipantRequest.new
471
+ #
472
+ # # Call the update_participant method.
473
+ # result = client.update_participant request
474
+ #
475
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::Participant.
476
+ # p result
477
+ #
406
478
  def update_participant request, options = nil
407
479
  raise ::ArgumentError, "request must be provided" if request.nil?
408
480
 
@@ -420,9 +492,11 @@ module Google
420
492
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
421
493
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
422
494
 
423
- header_params = {
424
- "participant.name" => request.participant.name
425
- }
495
+ header_params = {}
496
+ if request.participant&.name
497
+ header_params["participant.name"] = request.participant.name
498
+ end
499
+
426
500
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
427
501
  metadata[:"x-goog-request-params"] ||= request_params_header
428
502
 
@@ -494,6 +568,21 @@ module Google
494
568
  #
495
569
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
496
570
  #
571
+ # @example Basic example
572
+ # require "google/cloud/dialogflow/v2"
573
+ #
574
+ # # Create a client object. The client can be reused for multiple calls.
575
+ # client = Google::Cloud::Dialogflow::V2::Participants::Client.new
576
+ #
577
+ # # Create a request. To set request fields, pass in keyword arguments.
578
+ # request = Google::Cloud::Dialogflow::V2::AnalyzeContentRequest.new
579
+ #
580
+ # # Call the analyze_content method.
581
+ # result = client.analyze_content request
582
+ #
583
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::AnalyzeContentResponse.
584
+ # p result
585
+ #
497
586
  def analyze_content request, options = nil
498
587
  raise ::ArgumentError, "request must be provided" if request.nil?
499
588
 
@@ -511,9 +600,11 @@ module Google
511
600
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
512
601
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
513
602
 
514
- header_params = {
515
- "participant" => request.participant
516
- }
603
+ header_params = {}
604
+ if request.participant
605
+ header_params["participant"] = request.participant
606
+ end
607
+
517
608
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
518
609
  metadata[:"x-goog-request-params"] ||= request_params_header
519
610
 
@@ -575,6 +666,21 @@ module Google
575
666
  #
576
667
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
577
668
  #
669
+ # @example Basic example
670
+ # require "google/cloud/dialogflow/v2"
671
+ #
672
+ # # Create a client object. The client can be reused for multiple calls.
673
+ # client = Google::Cloud::Dialogflow::V2::Participants::Client.new
674
+ #
675
+ # # Create a request. To set request fields, pass in keyword arguments.
676
+ # request = Google::Cloud::Dialogflow::V2::SuggestArticlesRequest.new
677
+ #
678
+ # # Call the suggest_articles method.
679
+ # result = client.suggest_articles request
680
+ #
681
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::SuggestArticlesResponse.
682
+ # p result
683
+ #
578
684
  def suggest_articles request, options = nil
579
685
  raise ::ArgumentError, "request must be provided" if request.nil?
580
686
 
@@ -592,9 +698,11 @@ module Google
592
698
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
593
699
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
594
700
 
595
- header_params = {
596
- "parent" => request.parent
597
- }
701
+ header_params = {}
702
+ if request.parent
703
+ header_params["parent"] = request.parent
704
+ end
705
+
598
706
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
599
707
  metadata[:"x-goog-request-params"] ||= request_params_header
600
708
 
@@ -656,6 +764,21 @@ module Google
656
764
  #
657
765
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
658
766
  #
767
+ # @example Basic example
768
+ # require "google/cloud/dialogflow/v2"
769
+ #
770
+ # # Create a client object. The client can be reused for multiple calls.
771
+ # client = Google::Cloud::Dialogflow::V2::Participants::Client.new
772
+ #
773
+ # # Create a request. To set request fields, pass in keyword arguments.
774
+ # request = Google::Cloud::Dialogflow::V2::SuggestFaqAnswersRequest.new
775
+ #
776
+ # # Call the suggest_faq_answers method.
777
+ # result = client.suggest_faq_answers request
778
+ #
779
+ # # The returned object is of type Google::Cloud::Dialogflow::V2::SuggestFaqAnswersResponse.
780
+ # p result
781
+ #
659
782
  def suggest_faq_answers request, options = nil
660
783
  raise ::ArgumentError, "request must be provided" if request.nil?
661
784
 
@@ -673,9 +796,11 @@ module Google
673
796
  gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
674
797
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
675
798
 
676
- header_params = {
677
- "parent" => request.parent
678
- }
799
+ header_params = {}
800
+ if request.parent
801
+ header_params["parent"] = request.parent
802
+ end
803
+
679
804
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
680
805
  metadata[:"x-goog-request-params"] ||= request_params_header
681
806