google-cloud-dialogflow-cx-v3 0.1.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +2 -2
  3. data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +2 -2
  4. data/lib/google/cloud/dialogflow/cx/v3/agent_services_pb.rb +10 -1
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +209 -27
  6. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +115 -12
  7. data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +2 -2
  8. data/lib/google/cloud/dialogflow/cx/v3/changelog_pb.rb +52 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/changelog_services_pb.rb +49 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +522 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs/credentials.rb +54 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/changelogs/paths.rb +75 -0
  13. data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +51 -0
  14. data/lib/google/cloud/dialogflow/cx/v3/deployment_pb.rb +63 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/deployment_services_pb.rb +49 -0
  16. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +502 -0
  17. data/lib/google/cloud/dialogflow/cx/v3/deployments/credentials.rb +54 -0
  18. data/lib/google/cloud/dialogflow/cx/v3/deployments/paths.rb +79 -0
  19. data/lib/google/cloud/dialogflow/cx/v3/deployments.rb +51 -0
  20. data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +2 -2
  21. data/lib/google/cloud/dialogflow/cx/v3/entity_type_services_pb.rb +1 -1
  22. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +106 -15
  23. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +24 -2
  24. data/lib/google/cloud/dialogflow/cx/v3/environment_services_pb.rb +33 -1
  25. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +335 -24
  26. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +115 -12
  27. data/lib/google/cloud/dialogflow/cx/v3/environments/paths.rb +21 -0
  28. data/lib/google/cloud/dialogflow/cx/v3/experiment_pb.rb +2 -2
  29. data/lib/google/cloud/dialogflow/cx/v3/experiment_services_pb.rb +1 -1
  30. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +146 -21
  31. data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +2 -2
  32. data/lib/google/cloud/dialogflow/cx/v3/flow_services_pb.rb +26 -1
  33. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +252 -30
  34. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +115 -12
  35. data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +2 -2
  36. data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +2 -2
  37. data/lib/google/cloud/dialogflow/cx/v3/intent_services_pb.rb +1 -1
  38. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +106 -15
  39. data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +2 -2
  40. data/lib/google/cloud/dialogflow/cx/v3/page_services_pb.rb +1 -1
  41. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +106 -15
  42. data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +9 -2
  43. data/lib/google/cloud/dialogflow/cx/v3/security_settings_pb.rb +2 -2
  44. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +106 -15
  45. data/lib/google/cloud/dialogflow/cx/v3/security_settings_services_pb.rb +1 -1
  46. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_pb.rb +2 -2
  47. data/lib/google/cloud/dialogflow/cx/v3/session_entity_type_services_pb.rb +1 -1
  48. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +106 -15
  49. data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +3 -2
  50. data/lib/google/cloud/dialogflow/cx/v3/session_services_pb.rb +1 -1
  51. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +84 -9
  52. data/lib/google/cloud/dialogflow/cx/v3/test_case_pb.rb +2 -2
  53. data/lib/google/cloud/dialogflow/cx/v3/test_case_services_pb.rb +23 -1
  54. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +302 -36
  55. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +115 -12
  56. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_pb.rb +2 -2
  57. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_services_pb.rb +1 -1
  58. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +106 -15
  59. data/lib/google/cloud/dialogflow/cx/v3/validation_message_pb.rb +2 -2
  60. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  61. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +14 -2
  62. data/lib/google/cloud/dialogflow/cx/v3/version_services_pb.rb +19 -1
  63. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +265 -18
  64. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +115 -12
  65. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +3 -2
  66. data/lib/google/cloud/dialogflow/cx/v3/webhook_services_pb.rb +1 -1
  67. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +106 -15
  68. data/lib/google/cloud/dialogflow/cx/v3.rb +3 -1
  69. data/proto_docs/google/cloud/dialogflow/cx/v3/changelog.rb +122 -0
  70. data/proto_docs/google/cloud/dialogflow/cx/v3/deployment.rb +135 -0
  71. data/proto_docs/google/cloud/dialogflow/cx/v3/environment.rb +62 -0
  72. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +15 -0
  73. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +15 -2
  74. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +58 -42
  75. data/proto_docs/google/cloud/dialogflow/cx/v3/test_case.rb +1 -0
  76. data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +43 -0
  77. data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +13 -0
  78. metadata +16 -2
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/cx/v3/session_entity_type.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'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/cloud/dialogflow/cx/v3/entity_type_pb'
11
9
  require 'google/protobuf/empty_pb'
12
10
  require 'google/protobuf/field_mask_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/dialogflow/cx/v3/session_entity_type.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.dialogflow.cx.v3.SessionEntityType" do
@@ -28,7 +28,7 @@ module Google
28
28
  # Service for managing [SessionEntityTypes][google.cloud.dialogflow.cx.v3.SessionEntityType].
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
@@ -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
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/cx/v3/session.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/field_behavior_pb'
8
6
  require 'google/api/resource_pb'
@@ -18,6 +16,8 @@ require 'google/protobuf/struct_pb'
18
16
  require 'google/rpc/status_pb'
19
17
  require 'google/type/latlng_pb'
20
18
  require 'google/api/client_pb'
19
+ require 'google/protobuf'
20
+
21
21
  Google::Protobuf::DescriptorPool.generated_pool.build do
22
22
  add_file("google/cloud/dialogflow/cx/v3/session.proto", :syntax => :proto3) do
23
23
  add_message "google.cloud.dialogflow.cx.v3.DetectIntentRequest" do
@@ -106,6 +106,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
106
106
  optional :trigger_intent, :string, 11
107
107
  optional :transcript, :string, 12
108
108
  optional :trigger_event, :string, 14
109
+ optional :dtmf, :message, 23, "google.cloud.dialogflow.cx.v3.DtmfInput"
109
110
  end
110
111
  end
111
112
  add_message "google.cloud.dialogflow.cx.v3.TextInput" do
@@ -30,7 +30,7 @@ module Google
30
30
  # user intent and respond.
31
31
  class Service
32
32
 
33
- include GRPC::GenericService
33
+ include ::GRPC::GenericService
34
34
 
35
35
  self.marshal_class_method = :encode
36
36
  self.unmarshal_class_method = :decode
@@ -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
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/dialogflow/cx/v3/test_case.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'
@@ -19,6 +17,8 @@ require 'google/protobuf/field_mask_pb'
19
17
  require 'google/protobuf/struct_pb'
20
18
  require 'google/protobuf/timestamp_pb'
21
19
  require 'google/rpc/status_pb'
20
+ require 'google/protobuf'
21
+
22
22
  Google::Protobuf::DescriptorPool.generated_pool.build do
23
23
  add_file("google/cloud/dialogflow/cx/v3/test_case.proto", :syntax => :proto3) do
24
24
  add_message "google.cloud.dialogflow.cx.v3.TestCase" do
@@ -29,7 +29,7 @@ module Google
29
29
  # [Test Case Results][google.cloud.dialogflow.cx.v3.TestCaseResult].
30
30
  class Service
31
31
 
32
- include GRPC::GenericService
32
+ include ::GRPC::GenericService
33
33
 
34
34
  self.marshal_class_method = :encode
35
35
  self.unmarshal_class_method = :decode
@@ -46,6 +46,7 @@ module Google
46
46
  # Updates the specified test case.
47
47
  rpc :UpdateTestCase, ::Google::Cloud::Dialogflow::CX::V3::UpdateTestCaseRequest, ::Google::Cloud::Dialogflow::CX::V3::TestCase
48
48
  # Kicks off a test case run.
49
+ #
49
50
  # This method is a [long-running
50
51
  # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
51
52
  # The returned `Operation` type has the following method-specific fields:
@@ -54,15 +55,36 @@ module Google
54
55
  # - `response`: [RunTestCaseResponse][google.cloud.dialogflow.cx.v3.RunTestCaseResponse]
55
56
  rpc :RunTestCase, ::Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest, ::Google::Longrunning::Operation
56
57
  # Kicks off a batch run of test cases.
58
+ #
59
+ # This method is a [long-running
60
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
61
+ # The returned `Operation` type has the following method-specific fields:
62
+ #
63
+ # - `metadata`: [BatchRunTestCasesMetadata][google.cloud.dialogflow.cx.v3.BatchRunTestCasesMetadata]
64
+ # - `response`: [BatchRunTestCasesResponse][google.cloud.dialogflow.cx.v3.BatchRunTestCasesResponse]
57
65
  rpc :BatchRunTestCases, ::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest, ::Google::Longrunning::Operation
58
66
  # Calculates the test coverage for an agent.
59
67
  rpc :CalculateCoverage, ::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest, ::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageResponse
60
68
  # Imports the test cases from a Cloud Storage bucket or a local file. It
61
69
  # always creates new test cases and won't overwite any existing ones. The
62
70
  # provided ID in the imported test case is neglected.
71
+ #
72
+ # This method is a [long-running
73
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
74
+ # The returned `Operation` type has the following method-specific fields:
75
+ #
76
+ # - `metadata`: [ImportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ImportTestCasesMetadata]
77
+ # - `response`: [ImportTestCasesResponse][google.cloud.dialogflow.cx.v3.ImportTestCasesResponse]
63
78
  rpc :ImportTestCases, ::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest, ::Google::Longrunning::Operation
64
79
  # Exports the test cases under the agent to a Cloud Storage bucket or a local
65
80
  # file. Filter can be applied to export a subset of test cases.
81
+ #
82
+ # This method is a [long-running
83
+ # operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
84
+ # The returned `Operation` type has the following method-specific fields:
85
+ #
86
+ # - `metadata`: [ExportTestCasesMetadata][google.cloud.dialogflow.cx.v3.ExportTestCasesMetadata]
87
+ # - `response`: [ExportTestCasesResponse][google.cloud.dialogflow.cx.v3.ExportTestCasesResponse]
66
88
  rpc :ExportTestCases, ::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest, ::Google::Longrunning::Operation
67
89
  # Fetches a list of results for a given test case.
68
90
  rpc :ListTestCaseResults, ::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsRequest, ::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsResponse