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

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -189,6 +189,27 @@ module Google
189
189
  #
190
190
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
191
191
  #
192
+ # @example Basic example
193
+ # require "google/cloud/dialogflow/cx/v3"
194
+ #
195
+ # # Create a client object. The client can be reused for multiple calls.
196
+ # client = Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::Client.new
197
+ #
198
+ # # Create a request. To set request fields, pass in keyword arguments.
199
+ # request = Google::Cloud::Dialogflow::CX::V3::ListSessionEntityTypesRequest.new
200
+ #
201
+ # # Call the list_session_entity_types method.
202
+ # result = client.list_session_entity_types request
203
+ #
204
+ # # The returned object is of type Gapic::PagedEnumerable. You can
205
+ # # iterate over all elements by calling #each, and the enumerable
206
+ # # will lazily make API calls to fetch subsequent pages. Other
207
+ # # methods are also available for managing paging directly.
208
+ # result.each do |response|
209
+ # # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::SessionEntityType.
210
+ # p response
211
+ # end
212
+ #
192
213
  def list_session_entity_types request, options = nil
193
214
  raise ::ArgumentError, "request must be provided" if request.nil?
194
215
 
@@ -206,9 +227,11 @@ module Google
206
227
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
207
228
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
208
229
 
209
- header_params = {
210
- "parent" => request.parent
211
- }
230
+ header_params = {}
231
+ if request.parent
232
+ header_params["parent"] = request.parent
233
+ end
234
+
212
235
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
213
236
  metadata[:"x-goog-request-params"] ||= request_params_header
214
237
 
@@ -264,6 +287,21 @@ module Google
264
287
  #
265
288
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
266
289
  #
290
+ # @example Basic example
291
+ # require "google/cloud/dialogflow/cx/v3"
292
+ #
293
+ # # Create a client object. The client can be reused for multiple calls.
294
+ # client = Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::Client.new
295
+ #
296
+ # # Create a request. To set request fields, pass in keyword arguments.
297
+ # request = Google::Cloud::Dialogflow::CX::V3::GetSessionEntityTypeRequest.new
298
+ #
299
+ # # Call the get_session_entity_type method.
300
+ # result = client.get_session_entity_type request
301
+ #
302
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::SessionEntityType.
303
+ # p result
304
+ #
267
305
  def get_session_entity_type request, options = nil
268
306
  raise ::ArgumentError, "request must be provided" if request.nil?
269
307
 
@@ -281,9 +319,11 @@ module Google
281
319
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
282
320
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
283
321
 
284
- header_params = {
285
- "name" => request.name
286
- }
322
+ header_params = {}
323
+ if request.name
324
+ header_params["name"] = request.name
325
+ end
326
+
287
327
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
288
328
  metadata[:"x-goog-request-params"] ||= request_params_header
289
329
 
@@ -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/cx/v3"
384
+ #
385
+ # # Create a client object. The client can be reused for multiple calls.
386
+ # client = Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::Client.new
387
+ #
388
+ # # Create a request. To set request fields, pass in keyword arguments.
389
+ # request = Google::Cloud::Dialogflow::CX::V3::CreateSessionEntityTypeRequest.new
390
+ #
391
+ # # Call the create_session_entity_type method.
392
+ # result = client.create_session_entity_type request
393
+ #
394
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::SessionEntityType.
395
+ # p result
396
+ #
342
397
  def create_session_entity_type 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::CX::V3::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
 
@@ -415,6 +472,21 @@ module Google
415
472
  #
416
473
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
417
474
  #
475
+ # @example Basic example
476
+ # require "google/cloud/dialogflow/cx/v3"
477
+ #
478
+ # # Create a client object. The client can be reused for multiple calls.
479
+ # client = Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::Client.new
480
+ #
481
+ # # Create a request. To set request fields, pass in keyword arguments.
482
+ # request = Google::Cloud::Dialogflow::CX::V3::UpdateSessionEntityTypeRequest.new
483
+ #
484
+ # # Call the update_session_entity_type method.
485
+ # result = client.update_session_entity_type request
486
+ #
487
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::SessionEntityType.
488
+ # p result
489
+ #
418
490
  def update_session_entity_type request, options = nil
419
491
  raise ::ArgumentError, "request must be provided" if request.nil?
420
492
 
@@ -432,9 +504,11 @@ module Google
432
504
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
433
505
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
434
506
 
435
- header_params = {
436
- "session_entity_type.name" => request.session_entity_type.name
437
- }
507
+ header_params = {}
508
+ if request.session_entity_type&.name
509
+ header_params["session_entity_type.name"] = request.session_entity_type.name
510
+ end
511
+
438
512
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
439
513
  metadata[:"x-goog-request-params"] ||= request_params_header
440
514
 
@@ -489,6 +563,21 @@ module Google
489
563
  #
490
564
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
491
565
  #
566
+ # @example Basic example
567
+ # require "google/cloud/dialogflow/cx/v3"
568
+ #
569
+ # # Create a client object. The client can be reused for multiple calls.
570
+ # client = Google::Cloud::Dialogflow::CX::V3::SessionEntityTypes::Client.new
571
+ #
572
+ # # Create a request. To set request fields, pass in keyword arguments.
573
+ # request = Google::Cloud::Dialogflow::CX::V3::DeleteSessionEntityTypeRequest.new
574
+ #
575
+ # # Call the delete_session_entity_type method.
576
+ # result = client.delete_session_entity_type request
577
+ #
578
+ # # The returned object is of type Google::Protobuf::Empty.
579
+ # p result
580
+ #
492
581
  def delete_session_entity_type request, options = nil
493
582
  raise ::ArgumentError, "request must be provided" if request.nil?
494
583
 
@@ -506,9 +595,11 @@ module Google
506
595
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
507
596
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
508
597
 
509
- header_params = {
510
- "name" => request.name
511
- }
598
+ header_params = {}
599
+ if request.name
600
+ header_params["name"] = request.name
601
+ end
602
+
512
603
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
513
604
  metadata[:"x-goog-request-params"] ||= request_params_header
514
605
 
@@ -216,6 +216,21 @@ module Google
216
216
  #
217
217
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
218
218
  #
219
+ # @example Basic example
220
+ # require "google/cloud/dialogflow/cx/v3"
221
+ #
222
+ # # Create a client object. The client can be reused for multiple calls.
223
+ # client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new
224
+ #
225
+ # # Create a request. To set request fields, pass in keyword arguments.
226
+ # request = Google::Cloud::Dialogflow::CX::V3::DetectIntentRequest.new
227
+ #
228
+ # # Call the detect_intent method.
229
+ # result = client.detect_intent request
230
+ #
231
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse.
232
+ # p result
233
+ #
219
234
  def detect_intent request, options = nil
220
235
  raise ::ArgumentError, "request must be provided" if request.nil?
221
236
 
@@ -233,9 +248,11 @@ module Google
233
248
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
234
249
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
235
250
 
236
- header_params = {
237
- "session" => request.session
238
- }
251
+ header_params = {}
252
+ if request.session
253
+ header_params["session"] = request.session
254
+ end
255
+
239
256
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
240
257
  metadata[:"x-goog-request-params"] ||= request_params_header
241
258
 
@@ -277,6 +294,30 @@ module Google
277
294
  #
278
295
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
279
296
  #
297
+ # @example Basic example
298
+ # require "google/cloud/dialogflow/cx/v3"
299
+ #
300
+ # # Create a client object. The client can be reused for multiple calls.
301
+ # client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new
302
+ #
303
+ # # Create an input stream
304
+ # input = Gapic::StreamInput.new
305
+ #
306
+ # # Call the streaming_detect_intent method to start streaming.
307
+ # output = client.streaming_detect_intent input
308
+ #
309
+ # # Send requests on the stream. For each request, pass in keyword
310
+ # # arguments to set fields. Be sure to close the stream when done.
311
+ # input << Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentRequest.new
312
+ # input << Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentRequest.new
313
+ # input.close
314
+ #
315
+ # # Handle streamed responses. These may be interleaved with inputs.
316
+ # # Each response is of type ::Google::Cloud::Dialogflow::CX::V3::StreamingDetectIntentResponse.
317
+ # output.each do |response|
318
+ # p response
319
+ # end
320
+ #
280
321
  def streaming_detect_intent request, options = nil
281
322
  unless request.is_a? ::Enumerable
282
323
  raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum
@@ -360,6 +401,21 @@ module Google
360
401
  #
361
402
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
362
403
  #
404
+ # @example Basic example
405
+ # require "google/cloud/dialogflow/cx/v3"
406
+ #
407
+ # # Create a client object. The client can be reused for multiple calls.
408
+ # client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new
409
+ #
410
+ # # Create a request. To set request fields, pass in keyword arguments.
411
+ # request = Google::Cloud::Dialogflow::CX::V3::MatchIntentRequest.new
412
+ #
413
+ # # Call the match_intent method.
414
+ # result = client.match_intent request
415
+ #
416
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse.
417
+ # p result
418
+ #
363
419
  def match_intent request, options = nil
364
420
  raise ::ArgumentError, "request must be provided" if request.nil?
365
421
 
@@ -377,9 +433,11 @@ module Google
377
433
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
378
434
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
379
435
 
380
- header_params = {
381
- "session" => request.session
382
- }
436
+ header_params = {}
437
+ if request.session
438
+ header_params["session"] = request.session
439
+ end
440
+
383
441
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
384
442
  metadata[:"x-goog-request-params"] ||= request_params_header
385
443
 
@@ -435,6 +493,21 @@ module Google
435
493
  #
436
494
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
437
495
  #
496
+ # @example Basic example
497
+ # require "google/cloud/dialogflow/cx/v3"
498
+ #
499
+ # # Create a client object. The client can be reused for multiple calls.
500
+ # client = Google::Cloud::Dialogflow::CX::V3::Sessions::Client.new
501
+ #
502
+ # # Create a request. To set request fields, pass in keyword arguments.
503
+ # request = Google::Cloud::Dialogflow::CX::V3::FulfillIntentRequest.new
504
+ #
505
+ # # Call the fulfill_intent method.
506
+ # result = client.fulfill_intent request
507
+ #
508
+ # # The returned object is of type Google::Cloud::Dialogflow::CX::V3::FulfillIntentResponse.
509
+ # p result
510
+ #
438
511
  def fulfill_intent request, options = nil
439
512
  raise ::ArgumentError, "request must be provided" if request.nil?
440
513
 
@@ -452,9 +525,11 @@ module Google
452
525
  gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION
453
526
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
454
527
 
455
- header_params = {
456
- "match_intent_request.session" => request.match_intent_request.session
457
- }
528
+ header_params = {}
529
+ if request.match_intent_request&.session
530
+ header_params["match_intent_request.session"] = request.match_intent_request.session
531
+ end
532
+
458
533
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
459
534
  metadata[:"x-goog-request-params"] ||= request_params_header
460
535