google-cloud-dialogflow-cx-v3 1.1.1 → 1.3.0

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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +1 -1
  4. data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +2 -1
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +44 -25
  6. data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +12 -15
  7. data/lib/google/cloud/dialogflow/cx/v3/agents/paths.rb +19 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +44 -25
  9. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +43 -38
  10. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/service_stub.rb +102 -68
  11. data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +1 -1
  12. data/lib/google/cloud/dialogflow/cx/v3/changelog_pb.rb +1 -1
  13. data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +32 -6
  14. data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +32 -6
  15. data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/service_stub.rb +30 -14
  16. data/lib/google/cloud/dialogflow/cx/v3/data_store_connection_pb.rb +1 -1
  17. data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +32 -8
  18. data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +32 -8
  19. data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/service_stub.rb +30 -14
  20. data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +1 -1
  21. data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +43 -21
  22. data/lib/google/cloud/dialogflow/cx/v3/entity_types/operations.rb +12 -15
  23. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +43 -21
  24. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/operations.rb +43 -38
  25. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/service_stub.rb +70 -44
  26. data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +1 -1
  27. data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +50 -27
  28. data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +12 -15
  29. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +50 -27
  30. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +43 -38
  31. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/service_stub.rb +86 -56
  32. data/lib/google/cloud/dialogflow/cx/v3/experiment_pb.rb +1 -1
  33. data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +38 -21
  34. data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +38 -21
  35. data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/service_stub.rb +70 -44
  36. data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +1 -1
  37. data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +47 -26
  38. data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +12 -15
  39. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +47 -26
  40. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +43 -38
  41. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/service_stub.rb +94 -62
  42. data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +1 -1
  43. data/lib/google/cloud/dialogflow/cx/v3/gcs_pb.rb +1 -1
  44. data/lib/google/cloud/dialogflow/cx/v3/generative_settings_pb.rb +1 -1
  45. data/lib/google/cloud/dialogflow/cx/v3/generator_pb.rb +2 -1
  46. data/lib/google/cloud/dialogflow/cx/v3/generators/client.rb +35 -12
  47. data/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb +35 -12
  48. data/lib/google/cloud/dialogflow/cx/v3/generators/rest/service_stub.rb +54 -32
  49. data/lib/google/cloud/dialogflow/cx/v3/import_strategy_pb.rb +1 -1
  50. data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +1 -1
  51. data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +41 -19
  52. data/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb +12 -15
  53. data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +41 -19
  54. data/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb +43 -38
  55. data/lib/google/cloud/dialogflow/cx/v3/intents/rest/service_stub.rb +70 -44
  56. data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +1 -1
  57. data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +37 -14
  58. data/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +37 -14
  59. data/lib/google/cloud/dialogflow/cx/v3/pages/rest/service_stub.rb +54 -32
  60. data/lib/google/cloud/dialogflow/cx/v3/safety_settings_pb.rb +1 -1
  61. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +35 -12
  62. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +35 -12
  63. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/service_stub.rb +54 -32
  64. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +54 -29
  65. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +54 -29
  66. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/service_stub.rb +54 -32
  67. data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +5 -1
  68. data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +40 -16
  69. data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +40 -14
  70. data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/service_stub.rb +47 -26
  71. data/lib/google/cloud/dialogflow/cx/v3/test_case_pb.rb +1 -1
  72. data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +59 -38
  73. data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +12 -15
  74. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +59 -38
  75. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +43 -38
  76. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/service_stub.rb +110 -74
  77. data/lib/google/cloud/dialogflow/cx/v3/transition_route_group_pb.rb +1 -1
  78. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +43 -21
  79. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +43 -21
  80. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/service_stub.rb +54 -32
  81. data/lib/google/cloud/dialogflow/cx/v3/validation_message_pb.rb +1 -1
  82. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  83. data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +1 -1
  84. data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +44 -22
  85. data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +12 -15
  86. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +44 -22
  87. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +43 -38
  88. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/service_stub.rb +70 -44
  89. data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +1 -1
  90. data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +35 -12
  91. data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +35 -12
  92. data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/service_stub.rb +54 -32
  93. data/proto_docs/google/api/client.rb +39 -0
  94. data/proto_docs/google/cloud/dialogflow/cx/v3/advanced_settings.rb +1 -1
  95. data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +44 -20
  96. data/proto_docs/google/cloud/dialogflow/cx/v3/audio_config.rb +6 -0
  97. data/proto_docs/google/cloud/dialogflow/cx/v3/changelog.rb +5 -5
  98. data/proto_docs/google/cloud/dialogflow/cx/v3/deployment.rb +11 -13
  99. data/proto_docs/google/cloud/dialogflow/cx/v3/entity_type.rb +16 -17
  100. data/proto_docs/google/cloud/dialogflow/cx/v3/environment.rb +26 -28
  101. data/proto_docs/google/cloud/dialogflow/cx/v3/experiment.rb +15 -19
  102. data/proto_docs/google/cloud/dialogflow/cx/v3/flow.rb +28 -27
  103. data/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb +2 -2
  104. data/proto_docs/google/cloud/dialogflow/cx/v3/generative_settings.rb +2 -2
  105. data/proto_docs/google/cloud/dialogflow/cx/v3/generator.rb +41 -8
  106. data/proto_docs/google/cloud/dialogflow/cx/v3/intent.rb +19 -19
  107. data/proto_docs/google/cloud/dialogflow/cx/v3/page.rb +33 -33
  108. data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +2 -1
  109. data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +14 -14
  110. data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +107 -22
  111. data/proto_docs/google/cloud/dialogflow/cx/v3/session_entity_type.rb +30 -28
  112. data/proto_docs/google/cloud/dialogflow/cx/v3/test_case.rb +41 -43
  113. data/proto_docs/google/cloud/dialogflow/cx/v3/transition_route_group.rb +16 -18
  114. data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +19 -19
  115. data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +24 -25
  116. data/proto_docs/google/longrunning/operations.rb +19 -14
  117. metadata +5 -5
@@ -165,15 +165,27 @@ module Google
165
165
  endpoint: @config.endpoint,
166
166
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
167
167
  universe_domain: @config.universe_domain,
168
- credentials: credentials
168
+ credentials: credentials,
169
+ logger: @config.logger
169
170
  )
170
171
 
172
+ @test_cases_stub.logger(stub: true)&.info do |entry|
173
+ entry.set_system_name
174
+ entry.set_service
175
+ entry.message = "Created client for #{entry.service}"
176
+ entry.set_credentials_fields credentials
177
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
178
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
179
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
180
+ end
181
+
171
182
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
172
183
  config.credentials = credentials
173
184
  config.quota_project = @quota_project_id
174
185
  config.endpoint = @test_cases_stub.endpoint
175
186
  config.universe_domain = @test_cases_stub.universe_domain
176
187
  config.bindings_override = @config.bindings_override
188
+ config.logger = @test_cases_stub.logger if config.respond_to? :logger=
177
189
  end
178
190
  end
179
191
 
@@ -191,6 +203,15 @@ module Google
191
203
  #
192
204
  attr_reader :location_client
193
205
 
206
+ ##
207
+ # The logger used for request/response debug logging.
208
+ #
209
+ # @return [Logger]
210
+ #
211
+ def logger
212
+ @test_cases_stub.logger
213
+ end
214
+
194
215
  # Service calls
195
216
 
196
217
  ##
@@ -213,7 +234,7 @@ module Google
213
234
  #
214
235
  # @param parent [::String]
215
236
  # Required. The agent to list all pages for.
216
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
237
+ # Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
217
238
  # @param page_size [::Integer]
218
239
  # The maximum number of items to return in a single page. By default 20.
219
240
  # Note that when TestCaseView = FULL, the maximum page size allowed is 20.
@@ -280,7 +301,7 @@ module Google
280
301
  @test_cases_stub.list_test_cases request, options do |result, operation|
281
302
  result = ::Gapic::Rest::PagedEnumerable.new @test_cases_stub, :list_test_cases, "test_cases", request, result, options
282
303
  yield result, operation if block_given?
283
- return result
304
+ throw :response, result
284
305
  end
285
306
  rescue ::Gapic::Rest::Error => e
286
307
  raise ::Google::Cloud::Error.from_error(e)
@@ -306,10 +327,10 @@ module Google
306
327
  #
307
328
  # @param parent [::String]
308
329
  # Required. The agent to delete test cases from.
309
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
330
+ # Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
310
331
  # @param names [::Array<::String>]
311
- # Required. Format of test case names: `projects/<Project ID>/locations/
312
- # <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
332
+ # Required. Format of test case names:
333
+ # `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
313
334
  # @yield [result, operation] Access the result along with the TransportOperation object
314
335
  # @yieldparam result [::Google::Protobuf::Empty]
315
336
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -363,7 +384,6 @@ module Google
363
384
 
364
385
  @test_cases_stub.batch_delete_test_cases request, options do |result, operation|
365
386
  yield result, operation if block_given?
366
- return result
367
387
  end
368
388
  rescue ::Gapic::Rest::Error => e
369
389
  raise ::Google::Cloud::Error.from_error(e)
@@ -389,8 +409,8 @@ module Google
389
409
  #
390
410
  # @param name [::String]
391
411
  # Required. The name of the testcase.
392
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
393
- # ID>/testCases/<TestCase ID>`.
412
+ # Format:
413
+ # `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
394
414
  # @yield [result, operation] Access the result along with the TransportOperation object
395
415
  # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::TestCase]
396
416
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -444,7 +464,6 @@ module Google
444
464
 
445
465
  @test_cases_stub.get_test_case request, options do |result, operation|
446
466
  yield result, operation if block_given?
447
- return result
448
467
  end
449
468
  rescue ::Gapic::Rest::Error => e
450
469
  raise ::Google::Cloud::Error.from_error(e)
@@ -470,7 +489,7 @@ module Google
470
489
  #
471
490
  # @param parent [::String]
472
491
  # Required. The agent to create the test case for.
473
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
492
+ # Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
474
493
  # @param test_case [::Google::Cloud::Dialogflow::CX::V3::TestCase, ::Hash]
475
494
  # Required. The test case to create.
476
495
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -526,7 +545,6 @@ module Google
526
545
 
527
546
  @test_cases_stub.create_test_case request, options do |result, operation|
528
547
  yield result, operation if block_given?
529
- return result
530
548
  end
531
549
  rescue ::Gapic::Rest::Error => e
532
550
  raise ::Google::Cloud::Error.from_error(e)
@@ -610,7 +628,6 @@ module Google
610
628
 
611
629
  @test_cases_stub.update_test_case request, options do |result, operation|
612
630
  yield result, operation if block_given?
613
- return result
614
631
  end
615
632
  rescue ::Gapic::Rest::Error => e
616
633
  raise ::Google::Cloud::Error.from_error(e)
@@ -644,12 +661,12 @@ module Google
644
661
  # the default parameter values, pass an empty Hash as a request object (see above).
645
662
  #
646
663
  # @param name [::String]
647
- # Required. Format of test case name to run: `projects/<Project
648
- # ID>/locations/ <Location ID>/agents/<AgentID>/testCases/<TestCase ID>`.
664
+ # Required. Format of test case name to run:
665
+ # `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
649
666
  # @param environment [::String]
650
667
  # Optional. Environment name. If not set, draft environment is assumed.
651
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
652
- # ID>/environments/<Environment ID>`.
668
+ # Format:
669
+ # `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
653
670
  # @yield [result, operation] Access the result along with the TransportOperation object
654
671
  # @yieldparam result [::Gapic::Operation]
655
672
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -711,7 +728,7 @@ module Google
711
728
  @test_cases_stub.run_test_case request, options do |result, operation|
712
729
  result = ::Gapic::Operation.new result, @operations_client, options: options
713
730
  yield result, operation if block_given?
714
- return result
731
+ throw :response, result
715
732
  end
716
733
  rescue ::Gapic::Rest::Error => e
717
734
  raise ::Google::Cloud::Error.from_error(e)
@@ -745,15 +762,14 @@ module Google
745
762
  # the default parameter values, pass an empty Hash as a request object (see above).
746
763
  #
747
764
  # @param parent [::String]
748
- # Required. Agent name. Format: `projects/<Project ID>/locations/<Location
749
- # ID>/agents/ <AgentID>`.
765
+ # Required. Agent name. Format:
766
+ # `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
750
767
  # @param environment [::String]
751
768
  # Optional. If not set, draft environment is assumed. Format:
752
- # `projects/<Project ID>/locations/<Location ID>/agents/<Agent
753
- # ID>/environments/<Environment ID>`.
769
+ # `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
754
770
  # @param test_cases [::Array<::String>]
755
- # Required. Format: `projects/<Project ID>/locations/<Location
756
- # ID>/agents/<Agent ID>/testCases/<TestCase ID>`.
771
+ # Required. Format:
772
+ # `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
757
773
  # @yield [result, operation] Access the result along with the TransportOperation object
758
774
  # @yieldparam result [::Gapic::Operation]
759
775
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -815,7 +831,7 @@ module Google
815
831
  @test_cases_stub.batch_run_test_cases request, options do |result, operation|
816
832
  result = ::Gapic::Operation.new result, @operations_client, options: options
817
833
  yield result, operation if block_given?
818
- return result
834
+ throw :response, result
819
835
  end
820
836
  rescue ::Gapic::Rest::Error => e
821
837
  raise ::Google::Cloud::Error.from_error(e)
@@ -841,7 +857,7 @@ module Google
841
857
  #
842
858
  # @param agent [::String]
843
859
  # Required. The agent to calculate coverage for.
844
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
860
+ # Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
845
861
  # @param type [::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest::CoverageType]
846
862
  # Required. The type of coverage requested.
847
863
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -897,7 +913,6 @@ module Google
897
913
 
898
914
  @test_cases_stub.calculate_coverage request, options do |result, operation|
899
915
  yield result, operation if block_given?
900
- return result
901
916
  end
902
917
  rescue ::Gapic::Rest::Error => e
903
918
  raise ::Google::Cloud::Error.from_error(e)
@@ -934,7 +949,7 @@ module Google
934
949
  #
935
950
  # @param parent [::String]
936
951
  # Required. The agent to import test cases to.
937
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
952
+ # Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
938
953
  # @param gcs_uri [::String]
939
954
  # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
940
955
  # to import test cases from. The format of this URI must be
@@ -1008,7 +1023,7 @@ module Google
1008
1023
  @test_cases_stub.import_test_cases request, options do |result, operation|
1009
1024
  result = ::Gapic::Operation.new result, @operations_client, options: options
1010
1025
  yield result, operation if block_given?
1011
- return result
1026
+ throw :response, result
1012
1027
  end
1013
1028
  rescue ::Gapic::Rest::Error => e
1014
1029
  raise ::Google::Cloud::Error.from_error(e)
@@ -1044,7 +1059,7 @@ module Google
1044
1059
  #
1045
1060
  # @param parent [::String]
1046
1061
  # Required. The agent where to export test cases from.
1047
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
1062
+ # Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
1048
1063
  # @param gcs_uri [::String]
1049
1064
  # The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to
1050
1065
  # export the test cases to. The format of this URI must be
@@ -1131,7 +1146,7 @@ module Google
1131
1146
  @test_cases_stub.export_test_cases request, options do |result, operation|
1132
1147
  result = ::Gapic::Operation.new result, @operations_client, options: options
1133
1148
  yield result, operation if block_given?
1134
- return result
1149
+ throw :response, result
1135
1150
  end
1136
1151
  rescue ::Gapic::Rest::Error => e
1137
1152
  raise ::Google::Cloud::Error.from_error(e)
@@ -1158,9 +1173,10 @@ module Google
1158
1173
  #
1159
1174
  # @param parent [::String]
1160
1175
  # Required. The test case to list results for.
1161
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
1162
- # testCases/<TestCase ID>`. Specify a `-` as a wildcard for TestCase ID to
1163
- # list results across multiple test cases.
1176
+ # Format:
1177
+ # `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.
1178
+ # Specify a `-` as a wildcard for TestCase ID to
1179
+ # list results across multiple test cases.
1164
1180
  # @param page_size [::Integer]
1165
1181
  # The maximum number of items to return in a single page. By default 100 and
1166
1182
  # at most 1000.
@@ -1249,7 +1265,7 @@ module Google
1249
1265
  @test_cases_stub.list_test_case_results request, options do |result, operation|
1250
1266
  result = ::Gapic::Rest::PagedEnumerable.new @test_cases_stub, :list_test_case_results, "test_case_results", request, result, options
1251
1267
  yield result, operation if block_given?
1252
- return result
1268
+ throw :response, result
1253
1269
  end
1254
1270
  rescue ::Gapic::Rest::Error => e
1255
1271
  raise ::Google::Cloud::Error.from_error(e)
@@ -1275,8 +1291,8 @@ module Google
1275
1291
  #
1276
1292
  # @param name [::String]
1277
1293
  # Required. The name of the testcase.
1278
- # Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
1279
- # ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
1294
+ # Format:
1295
+ # `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`.
1280
1296
  # @yield [result, operation] Access the result along with the TransportOperation object
1281
1297
  # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::TestCaseResult]
1282
1298
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1330,7 +1346,6 @@ module Google
1330
1346
 
1331
1347
  @test_cases_stub.get_test_case_result request, options do |result, operation|
1332
1348
  yield result, operation if block_given?
1333
- return result
1334
1349
  end
1335
1350
  rescue ::Gapic::Rest::Error => e
1336
1351
  raise ::Google::Cloud::Error.from_error(e)
@@ -1410,6 +1425,11 @@ module Google
1410
1425
  # default endpoint URL. The default value of nil uses the environment
1411
1426
  # universe (usually the default "googleapis.com" universe).
1412
1427
  # @return [::String,nil]
1428
+ # @!attribute [rw] logger
1429
+ # A custom logger to use for request/response debug logging, or the value
1430
+ # `:default` (the default) to construct a default logger, or `nil` to
1431
+ # explicitly disable logging.
1432
+ # @return [::Logger,:default,nil]
1413
1433
  #
1414
1434
  class Configuration
1415
1435
  extend ::Gapic::Config
@@ -1438,6 +1458,7 @@ module Google
1438
1458
  # by the host service.
1439
1459
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1440
1460
  config_attr :bindings_override, {}, ::Hash, nil
1461
+ config_attr :logger, :default, ::Logger, nil, :default
1441
1462
 
1442
1463
  # @private
1443
1464
  def initialize parent_config = nil
@@ -116,14 +116,6 @@ module Google
116
116
  # Lists operations that match the specified filter in the request. If the
117
117
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
118
118
  #
119
- # NOTE: the `name` binding allows API services to override the binding
120
- # to use different resource name schemes, such as `users/*/operations`. To
121
- # override the binding, API services can add a binding such as
122
- # `"/v1/{name=users/*}/operations"` to their service configuration.
123
- # For backwards compatibility, the default name includes the operations
124
- # collection id, however overriding users must ensure the name binding
125
- # is the parent resource, without the operations collection id.
126
- #
127
119
  # @overload list_operations(request, options = nil)
128
120
  # Pass arguments to `list_operations` via a request object, either of type
129
121
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -205,7 +197,7 @@ module Google
205
197
  @operations_stub.list_operations request, options do |result, operation|
206
198
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
207
199
  yield result, operation if block_given?
208
- return result
200
+ throw :response, result
209
201
  end
210
202
  rescue ::Gapic::Rest::Error => e
211
203
  raise ::Google::Cloud::Error.from_error(e)
@@ -294,7 +286,7 @@ module Google
294
286
  @operations_stub.get_operation request, options do |result, operation|
295
287
  result = ::Gapic::Operation.new result, @operations_client, options: options
296
288
  yield result, operation if block_given?
297
- return result
289
+ throw :response, result
298
290
  end
299
291
  rescue ::Gapic::Rest::Error => e
300
292
  raise ::Google::Cloud::Error.from_error(e)
@@ -376,7 +368,6 @@ module Google
376
368
 
377
369
  @operations_stub.delete_operation request, options do |result, operation|
378
370
  yield result, operation if block_given?
379
- return result
380
371
  end
381
372
  rescue ::Gapic::Rest::Error => e
382
373
  raise ::Google::Cloud::Error.from_error(e)
@@ -391,8 +382,9 @@ module Google
391
382
  # other methods to check whether the cancellation succeeded or whether the
392
383
  # operation completed despite cancellation. On successful cancellation,
393
384
  # the operation is not deleted; instead, it becomes an operation with
394
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
395
- # corresponding to `Code.CANCELLED`.
385
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
386
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
387
+ # `Code.CANCELLED`.
396
388
  #
397
389
  # @overload cancel_operation(request, options = nil)
398
390
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -464,7 +456,6 @@ module Google
464
456
 
465
457
  @operations_stub.cancel_operation request, options do |result, operation|
466
458
  yield result, operation if block_given?
467
- return result
468
459
  end
469
460
  rescue ::Gapic::Rest::Error => e
470
461
  raise ::Google::Cloud::Error.from_error(e)
@@ -544,6 +535,11 @@ module Google
544
535
  # default endpoint URL. The default value of nil uses the environment
545
536
  # universe (usually the default "googleapis.com" universe).
546
537
  # @return [::String,nil]
538
+ # @!attribute [rw] logger
539
+ # A custom logger to use for request/response debug logging, or the value
540
+ # `:default` (the default) to construct a default logger, or `nil` to
541
+ # explicitly disable logging.
542
+ # @return [::Logger,:default,nil]
547
543
  #
548
544
  class Configuration
549
545
  extend ::Gapic::Config
@@ -565,6 +561,7 @@ module Google
565
561
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
566
562
  config_attr :quota_project, nil, ::String, nil
567
563
  config_attr :universe_domain, nil, ::String, nil
564
+ config_attr :logger, :default, ::Logger, nil, :default
568
565
 
569
566
  # @private
570
567
  def initialize parent_config = nil
@@ -684,16 +681,18 @@ module Google
684
681
 
685
682
  response = @client_stub.make_http_request(
686
683
  verb,
687
- uri: uri,
688
- body: body || "",
689
- params: query_string_params,
684
+ uri: uri,
685
+ body: body || "",
686
+ params: query_string_params,
687
+ method_name: "list_operations",
690
688
  options: options
691
689
  )
692
690
  operation = ::Gapic::Rest::TransportOperation.new response
693
691
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
694
-
695
- yield result, operation if block_given?
696
- result
692
+ catch :response do
693
+ yield result, operation if block_given?
694
+ result
695
+ end
697
696
  end
698
697
 
699
698
  ##
@@ -722,16 +721,18 @@ module Google
722
721
 
723
722
  response = @client_stub.make_http_request(
724
723
  verb,
725
- uri: uri,
726
- body: body || "",
727
- params: query_string_params,
724
+ uri: uri,
725
+ body: body || "",
726
+ params: query_string_params,
727
+ method_name: "get_operation",
728
728
  options: options
729
729
  )
730
730
  operation = ::Gapic::Rest::TransportOperation.new response
731
731
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
732
-
733
- yield result, operation if block_given?
734
- result
732
+ catch :response do
733
+ yield result, operation if block_given?
734
+ result
735
+ end
735
736
  end
736
737
 
737
738
  ##
@@ -760,16 +761,18 @@ module Google
760
761
 
761
762
  response = @client_stub.make_http_request(
762
763
  verb,
763
- uri: uri,
764
- body: body || "",
765
- params: query_string_params,
764
+ uri: uri,
765
+ body: body || "",
766
+ params: query_string_params,
767
+ method_name: "delete_operation",
766
768
  options: options
767
769
  )
768
770
  operation = ::Gapic::Rest::TransportOperation.new response
769
771
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
770
-
771
- yield result, operation if block_given?
772
- result
772
+ catch :response do
773
+ yield result, operation if block_given?
774
+ result
775
+ end
773
776
  end
774
777
 
775
778
  ##
@@ -798,16 +801,18 @@ module Google
798
801
 
799
802
  response = @client_stub.make_http_request(
800
803
  verb,
801
- uri: uri,
802
- body: body || "",
803
- params: query_string_params,
804
+ uri: uri,
805
+ body: body || "",
806
+ params: query_string_params,
807
+ method_name: "cancel_operation",
804
808
  options: options
805
809
  )
806
810
  operation = ::Gapic::Rest::TransportOperation.new response
807
811
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
808
-
809
- yield result, operation if block_given?
810
- result
812
+ catch :response do
813
+ yield result, operation if block_given?
814
+ result
815
+ end
811
816
  end
812
817
 
813
818
  ##