google-cloud-dialogflow-cx-v3 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +1032 -0
  3. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +815 -0
  4. data/lib/google/cloud/dialogflow/cx/v3/agents/rest/service_stub.rb +586 -0
  5. data/lib/google/cloud/dialogflow/cx/v3/agents/rest.rb +56 -0
  6. data/lib/google/cloud/dialogflow/cx/v3/agents.rb +6 -0
  7. data/lib/google/cloud/dialogflow/cx/v3/bindings_override.rb +104 -0
  8. data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +472 -0
  9. data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/service_stub.rb +168 -0
  10. data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest.rb +55 -0
  11. data/lib/google/cloud/dialogflow/cx/v3/changelogs.rb +6 -0
  12. data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +456 -0
  13. data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/service_stub.rb +168 -0
  14. data/lib/google/cloud/dialogflow/cx/v3/deployments/rest.rb +55 -0
  15. data/lib/google/cloud/dialogflow/cx/v3/deployments.rb +6 -0
  16. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +740 -0
  17. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/service_stub.rb +347 -0
  18. data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest.rb +55 -0
  19. data/lib/google/cloud/dialogflow/cx/v3/entity_types.rb +6 -0
  20. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +1028 -0
  21. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +815 -0
  22. data/lib/google/cloud/dialogflow/cx/v3/environments/rest/service_stub.rb +585 -0
  23. data/lib/google/cloud/dialogflow/cx/v3/environments/rest.rb +57 -0
  24. data/lib/google/cloud/dialogflow/cx/v3/environments.rb +6 -0
  25. data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +821 -0
  26. data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/service_stub.rb +467 -0
  27. data/lib/google/cloud/dialogflow/cx/v3/experiments/rest.rb +55 -0
  28. data/lib/google/cloud/dialogflow/cx/v3/experiments.rb +6 -0
  29. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +1182 -0
  30. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +815 -0
  31. data/lib/google/cloud/dialogflow/cx/v3/flows/rest/service_stub.rb +646 -0
  32. data/lib/google/cloud/dialogflow/cx/v3/flows/rest.rb +56 -0
  33. data/lib/google/cloud/dialogflow/cx/v3/flows.rb +6 -0
  34. data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +722 -0
  35. data/lib/google/cloud/dialogflow/cx/v3/intents/rest/service_stub.rb +347 -0
  36. data/lib/google/cloud/dialogflow/cx/v3/intents/rest.rb +55 -0
  37. data/lib/google/cloud/dialogflow/cx/v3/intents.rb +6 -0
  38. data/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +777 -0
  39. data/lib/google/cloud/dialogflow/cx/v3/pages/rest/service_stub.rb +347 -0
  40. data/lib/google/cloud/dialogflow/cx/v3/pages/rest.rb +55 -0
  41. data/lib/google/cloud/dialogflow/cx/v3/pages.rb +6 -0
  42. data/lib/google/cloud/dialogflow/cx/v3/rest.rb +55 -0
  43. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +673 -0
  44. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/service_stub.rb +347 -0
  45. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest.rb +55 -0
  46. data/lib/google/cloud/dialogflow/cx/v3/security_settings_service.rb +6 -0
  47. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +688 -0
  48. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/service_stub.rb +384 -0
  49. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest.rb +56 -0
  50. data/lib/google/cloud/dialogflow/cx/v3/session_entity_types.rb +6 -0
  51. data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +576 -0
  52. data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/service_stub.rb +254 -0
  53. data/lib/google/cloud/dialogflow/cx/v3/sessions/rest.rb +58 -0
  54. data/lib/google/cloud/dialogflow/cx/v3/sessions.rb +6 -0
  55. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +1304 -0
  56. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +815 -0
  57. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/service_stub.rb +765 -0
  58. data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest.rb +57 -0
  59. data/lib/google/cloud/dialogflow/cx/v3/test_cases.rb +6 -0
  60. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +748 -0
  61. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/service_stub.rb +347 -0
  62. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest.rb +56 -0
  63. data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups.rb +6 -0
  64. data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
  65. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +865 -0
  66. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +815 -0
  67. data/lib/google/cloud/dialogflow/cx/v3/versions/rest/service_stub.rb +467 -0
  68. data/lib/google/cloud/dialogflow/cx/v3/versions/rest.rb +56 -0
  69. data/lib/google/cloud/dialogflow/cx/v3/versions.rb +6 -0
  70. data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +677 -0
  71. data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/service_stub.rb +347 -0
  72. data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest.rb +55 -0
  73. data/lib/google/cloud/dialogflow/cx/v3/webhooks.rb +6 -0
  74. data/lib/google/cloud/dialogflow/cx/v3.rb +5 -0
  75. metadata +57 -2
@@ -0,0 +1,765 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/dialogflow/cx/v3/test_case_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Dialogflow
24
+ module CX
25
+ module V3
26
+ module TestCases
27
+ module Rest
28
+ ##
29
+ # REST service stub for the TestCases service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
40
+ numeric_enums: true,
41
+ raise_faraday_errors: false
42
+ end
43
+
44
+ ##
45
+ # Baseline implementation for the list_test_cases REST call
46
+ #
47
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ListTestCasesRequest]
48
+ # A request object representing the call parameters. Required.
49
+ # @param options [::Gapic::CallOptions]
50
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
51
+ #
52
+ # @yield [result, operation] Access the result along with the TransportOperation object
53
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::ListTestCasesResponse]
54
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
55
+ #
56
+ # @return [::Google::Cloud::Dialogflow::CX::V3::ListTestCasesResponse]
57
+ # A result object deserialized from the server's reply
58
+ def list_test_cases request_pb, options = nil
59
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
60
+
61
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_test_cases_request request_pb
62
+ query_string_params = if query_string_params.any?
63
+ query_string_params.to_h { |p| p.split("=", 2) }
64
+ else
65
+ {}
66
+ end
67
+
68
+ response = @client_stub.make_http_request(
69
+ verb,
70
+ uri: uri,
71
+ body: body || "",
72
+ params: query_string_params,
73
+ options: options
74
+ )
75
+ operation = ::Gapic::Rest::TransportOperation.new response
76
+ result = ::Google::Cloud::Dialogflow::CX::V3::ListTestCasesResponse.decode_json response.body, ignore_unknown_fields: true
77
+
78
+ yield result, operation if block_given?
79
+ result
80
+ end
81
+
82
+ ##
83
+ # Baseline implementation for the batch_delete_test_cases REST call
84
+ #
85
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::BatchDeleteTestCasesRequest]
86
+ # A request object representing the call parameters. Required.
87
+ # @param options [::Gapic::CallOptions]
88
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
89
+ #
90
+ # @yield [result, operation] Access the result along with the TransportOperation object
91
+ # @yieldparam result [::Google::Protobuf::Empty]
92
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
93
+ #
94
+ # @return [::Google::Protobuf::Empty]
95
+ # A result object deserialized from the server's reply
96
+ def batch_delete_test_cases request_pb, options = nil
97
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
98
+
99
+ verb, uri, query_string_params, body = ServiceStub.transcode_batch_delete_test_cases_request request_pb
100
+ query_string_params = if query_string_params.any?
101
+ query_string_params.to_h { |p| p.split("=", 2) }
102
+ else
103
+ {}
104
+ end
105
+
106
+ response = @client_stub.make_http_request(
107
+ verb,
108
+ uri: uri,
109
+ body: body || "",
110
+ params: query_string_params,
111
+ options: options
112
+ )
113
+ operation = ::Gapic::Rest::TransportOperation.new response
114
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
115
+
116
+ yield result, operation if block_given?
117
+ result
118
+ end
119
+
120
+ ##
121
+ # Baseline implementation for the get_test_case REST call
122
+ #
123
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::GetTestCaseRequest]
124
+ # A request object representing the call parameters. Required.
125
+ # @param options [::Gapic::CallOptions]
126
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
127
+ #
128
+ # @yield [result, operation] Access the result along with the TransportOperation object
129
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::TestCase]
130
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
131
+ #
132
+ # @return [::Google::Cloud::Dialogflow::CX::V3::TestCase]
133
+ # A result object deserialized from the server's reply
134
+ def get_test_case request_pb, options = nil
135
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
136
+
137
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_test_case_request request_pb
138
+ query_string_params = if query_string_params.any?
139
+ query_string_params.to_h { |p| p.split("=", 2) }
140
+ else
141
+ {}
142
+ end
143
+
144
+ response = @client_stub.make_http_request(
145
+ verb,
146
+ uri: uri,
147
+ body: body || "",
148
+ params: query_string_params,
149
+ options: options
150
+ )
151
+ operation = ::Gapic::Rest::TransportOperation.new response
152
+ result = ::Google::Cloud::Dialogflow::CX::V3::TestCase.decode_json response.body, ignore_unknown_fields: true
153
+
154
+ yield result, operation if block_given?
155
+ result
156
+ end
157
+
158
+ ##
159
+ # Baseline implementation for the create_test_case REST call
160
+ #
161
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::CreateTestCaseRequest]
162
+ # A request object representing the call parameters. Required.
163
+ # @param options [::Gapic::CallOptions]
164
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
165
+ #
166
+ # @yield [result, operation] Access the result along with the TransportOperation object
167
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::TestCase]
168
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
169
+ #
170
+ # @return [::Google::Cloud::Dialogflow::CX::V3::TestCase]
171
+ # A result object deserialized from the server's reply
172
+ def create_test_case request_pb, options = nil
173
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
174
+
175
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_test_case_request request_pb
176
+ query_string_params = if query_string_params.any?
177
+ query_string_params.to_h { |p| p.split("=", 2) }
178
+ else
179
+ {}
180
+ end
181
+
182
+ response = @client_stub.make_http_request(
183
+ verb,
184
+ uri: uri,
185
+ body: body || "",
186
+ params: query_string_params,
187
+ options: options
188
+ )
189
+ operation = ::Gapic::Rest::TransportOperation.new response
190
+ result = ::Google::Cloud::Dialogflow::CX::V3::TestCase.decode_json response.body, ignore_unknown_fields: true
191
+
192
+ yield result, operation if block_given?
193
+ result
194
+ end
195
+
196
+ ##
197
+ # Baseline implementation for the update_test_case REST call
198
+ #
199
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::UpdateTestCaseRequest]
200
+ # A request object representing the call parameters. Required.
201
+ # @param options [::Gapic::CallOptions]
202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
203
+ #
204
+ # @yield [result, operation] Access the result along with the TransportOperation object
205
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::TestCase]
206
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
207
+ #
208
+ # @return [::Google::Cloud::Dialogflow::CX::V3::TestCase]
209
+ # A result object deserialized from the server's reply
210
+ def update_test_case request_pb, options = nil
211
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
212
+
213
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_test_case_request request_pb
214
+ query_string_params = if query_string_params.any?
215
+ query_string_params.to_h { |p| p.split("=", 2) }
216
+ else
217
+ {}
218
+ end
219
+
220
+ response = @client_stub.make_http_request(
221
+ verb,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ options: options
226
+ )
227
+ operation = ::Gapic::Rest::TransportOperation.new response
228
+ result = ::Google::Cloud::Dialogflow::CX::V3::TestCase.decode_json response.body, ignore_unknown_fields: true
229
+
230
+ yield result, operation if block_given?
231
+ result
232
+ end
233
+
234
+ ##
235
+ # Baseline implementation for the run_test_case REST call
236
+ #
237
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest]
238
+ # A request object representing the call parameters. Required.
239
+ # @param options [::Gapic::CallOptions]
240
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
241
+ #
242
+ # @yield [result, operation] Access the result along with the TransportOperation object
243
+ # @yieldparam result [::Google::Longrunning::Operation]
244
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
245
+ #
246
+ # @return [::Google::Longrunning::Operation]
247
+ # A result object deserialized from the server's reply
248
+ def run_test_case request_pb, options = nil
249
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
250
+
251
+ verb, uri, query_string_params, body = ServiceStub.transcode_run_test_case_request request_pb
252
+ query_string_params = if query_string_params.any?
253
+ query_string_params.to_h { |p| p.split("=", 2) }
254
+ else
255
+ {}
256
+ end
257
+
258
+ response = @client_stub.make_http_request(
259
+ verb,
260
+ uri: uri,
261
+ body: body || "",
262
+ params: query_string_params,
263
+ options: options
264
+ )
265
+ operation = ::Gapic::Rest::TransportOperation.new response
266
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
267
+
268
+ yield result, operation if block_given?
269
+ result
270
+ end
271
+
272
+ ##
273
+ # Baseline implementation for the batch_run_test_cases REST call
274
+ #
275
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest]
276
+ # A request object representing the call parameters. Required.
277
+ # @param options [::Gapic::CallOptions]
278
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
279
+ #
280
+ # @yield [result, operation] Access the result along with the TransportOperation object
281
+ # @yieldparam result [::Google::Longrunning::Operation]
282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
283
+ #
284
+ # @return [::Google::Longrunning::Operation]
285
+ # A result object deserialized from the server's reply
286
+ def batch_run_test_cases request_pb, options = nil
287
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
288
+
289
+ verb, uri, query_string_params, body = ServiceStub.transcode_batch_run_test_cases_request request_pb
290
+ query_string_params = if query_string_params.any?
291
+ query_string_params.to_h { |p| p.split("=", 2) }
292
+ else
293
+ {}
294
+ end
295
+
296
+ response = @client_stub.make_http_request(
297
+ verb,
298
+ uri: uri,
299
+ body: body || "",
300
+ params: query_string_params,
301
+ options: options
302
+ )
303
+ operation = ::Gapic::Rest::TransportOperation.new response
304
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
305
+
306
+ yield result, operation if block_given?
307
+ result
308
+ end
309
+
310
+ ##
311
+ # Baseline implementation for the calculate_coverage REST call
312
+ #
313
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest]
314
+ # A request object representing the call parameters. Required.
315
+ # @param options [::Gapic::CallOptions]
316
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
317
+ #
318
+ # @yield [result, operation] Access the result along with the TransportOperation object
319
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageResponse]
320
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
321
+ #
322
+ # @return [::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageResponse]
323
+ # A result object deserialized from the server's reply
324
+ def calculate_coverage request_pb, options = nil
325
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
326
+
327
+ verb, uri, query_string_params, body = ServiceStub.transcode_calculate_coverage_request request_pb
328
+ query_string_params = if query_string_params.any?
329
+ query_string_params.to_h { |p| p.split("=", 2) }
330
+ else
331
+ {}
332
+ end
333
+
334
+ response = @client_stub.make_http_request(
335
+ verb,
336
+ uri: uri,
337
+ body: body || "",
338
+ params: query_string_params,
339
+ options: options
340
+ )
341
+ operation = ::Gapic::Rest::TransportOperation.new response
342
+ result = ::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageResponse.decode_json response.body, ignore_unknown_fields: true
343
+
344
+ yield result, operation if block_given?
345
+ result
346
+ end
347
+
348
+ ##
349
+ # Baseline implementation for the import_test_cases REST call
350
+ #
351
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest]
352
+ # A request object representing the call parameters. Required.
353
+ # @param options [::Gapic::CallOptions]
354
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
355
+ #
356
+ # @yield [result, operation] Access the result along with the TransportOperation object
357
+ # @yieldparam result [::Google::Longrunning::Operation]
358
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
359
+ #
360
+ # @return [::Google::Longrunning::Operation]
361
+ # A result object deserialized from the server's reply
362
+ def import_test_cases request_pb, options = nil
363
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
364
+
365
+ verb, uri, query_string_params, body = ServiceStub.transcode_import_test_cases_request request_pb
366
+ query_string_params = if query_string_params.any?
367
+ query_string_params.to_h { |p| p.split("=", 2) }
368
+ else
369
+ {}
370
+ end
371
+
372
+ response = @client_stub.make_http_request(
373
+ verb,
374
+ uri: uri,
375
+ body: body || "",
376
+ params: query_string_params,
377
+ options: options
378
+ )
379
+ operation = ::Gapic::Rest::TransportOperation.new response
380
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
381
+
382
+ yield result, operation if block_given?
383
+ result
384
+ end
385
+
386
+ ##
387
+ # Baseline implementation for the export_test_cases REST call
388
+ #
389
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest]
390
+ # A request object representing the call parameters. Required.
391
+ # @param options [::Gapic::CallOptions]
392
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
393
+ #
394
+ # @yield [result, operation] Access the result along with the TransportOperation object
395
+ # @yieldparam result [::Google::Longrunning::Operation]
396
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
397
+ #
398
+ # @return [::Google::Longrunning::Operation]
399
+ # A result object deserialized from the server's reply
400
+ def export_test_cases request_pb, options = nil
401
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
402
+
403
+ verb, uri, query_string_params, body = ServiceStub.transcode_export_test_cases_request request_pb
404
+ query_string_params = if query_string_params.any?
405
+ query_string_params.to_h { |p| p.split("=", 2) }
406
+ else
407
+ {}
408
+ end
409
+
410
+ response = @client_stub.make_http_request(
411
+ verb,
412
+ uri: uri,
413
+ body: body || "",
414
+ params: query_string_params,
415
+ options: options
416
+ )
417
+ operation = ::Gapic::Rest::TransportOperation.new response
418
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
419
+
420
+ yield result, operation if block_given?
421
+ result
422
+ end
423
+
424
+ ##
425
+ # Baseline implementation for the list_test_case_results REST call
426
+ #
427
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsRequest]
428
+ # A request object representing the call parameters. Required.
429
+ # @param options [::Gapic::CallOptions]
430
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
431
+ #
432
+ # @yield [result, operation] Access the result along with the TransportOperation object
433
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsResponse]
434
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
435
+ #
436
+ # @return [::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsResponse]
437
+ # A result object deserialized from the server's reply
438
+ def list_test_case_results request_pb, options = nil
439
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
440
+
441
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_test_case_results_request request_pb
442
+ query_string_params = if query_string_params.any?
443
+ query_string_params.to_h { |p| p.split("=", 2) }
444
+ else
445
+ {}
446
+ end
447
+
448
+ response = @client_stub.make_http_request(
449
+ verb,
450
+ uri: uri,
451
+ body: body || "",
452
+ params: query_string_params,
453
+ options: options
454
+ )
455
+ operation = ::Gapic::Rest::TransportOperation.new response
456
+ result = ::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsResponse.decode_json response.body, ignore_unknown_fields: true
457
+
458
+ yield result, operation if block_given?
459
+ result
460
+ end
461
+
462
+ ##
463
+ # Baseline implementation for the get_test_case_result REST call
464
+ #
465
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::GetTestCaseResultRequest]
466
+ # A request object representing the call parameters. Required.
467
+ # @param options [::Gapic::CallOptions]
468
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
469
+ #
470
+ # @yield [result, operation] Access the result along with the TransportOperation object
471
+ # @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::TestCaseResult]
472
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
473
+ #
474
+ # @return [::Google::Cloud::Dialogflow::CX::V3::TestCaseResult]
475
+ # A result object deserialized from the server's reply
476
+ def get_test_case_result request_pb, options = nil
477
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
478
+
479
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_test_case_result_request request_pb
480
+ query_string_params = if query_string_params.any?
481
+ query_string_params.to_h { |p| p.split("=", 2) }
482
+ else
483
+ {}
484
+ end
485
+
486
+ response = @client_stub.make_http_request(
487
+ verb,
488
+ uri: uri,
489
+ body: body || "",
490
+ params: query_string_params,
491
+ options: options
492
+ )
493
+ operation = ::Gapic::Rest::TransportOperation.new response
494
+ result = ::Google::Cloud::Dialogflow::CX::V3::TestCaseResult.decode_json response.body, ignore_unknown_fields: true
495
+
496
+ yield result, operation if block_given?
497
+ result
498
+ end
499
+
500
+ ##
501
+ # @private
502
+ #
503
+ # GRPC transcoding helper method for the list_test_cases REST call
504
+ #
505
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ListTestCasesRequest]
506
+ # A request object representing the call parameters. Required.
507
+ # @return [Array(String, [String, nil], Hash{String => String})]
508
+ # Uri, Body, Query string parameters
509
+ def self.transcode_list_test_cases_request request_pb
510
+ transcoder = Gapic::Rest::GrpcTranscoder.new
511
+ .with_bindings(
512
+ uri_method: :get,
513
+ uri_template: "/v3/{parent}/testCases",
514
+ matches: [
515
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/?$}, false]
516
+ ]
517
+ )
518
+ transcoder.transcode request_pb
519
+ end
520
+
521
+ ##
522
+ # @private
523
+ #
524
+ # GRPC transcoding helper method for the batch_delete_test_cases REST call
525
+ #
526
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::BatchDeleteTestCasesRequest]
527
+ # A request object representing the call parameters. Required.
528
+ # @return [Array(String, [String, nil], Hash{String => String})]
529
+ # Uri, Body, Query string parameters
530
+ def self.transcode_batch_delete_test_cases_request request_pb
531
+ transcoder = Gapic::Rest::GrpcTranscoder.new
532
+ .with_bindings(
533
+ uri_method: :post,
534
+ uri_template: "/v3/{parent}/testCases:batchDelete",
535
+ body: "*",
536
+ matches: [
537
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/?$}, false]
538
+ ]
539
+ )
540
+ transcoder.transcode request_pb
541
+ end
542
+
543
+ ##
544
+ # @private
545
+ #
546
+ # GRPC transcoding helper method for the get_test_case REST call
547
+ #
548
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::GetTestCaseRequest]
549
+ # A request object representing the call parameters. Required.
550
+ # @return [Array(String, [String, nil], Hash{String => String})]
551
+ # Uri, Body, Query string parameters
552
+ def self.transcode_get_test_case_request request_pb
553
+ transcoder = Gapic::Rest::GrpcTranscoder.new
554
+ .with_bindings(
555
+ uri_method: :get,
556
+ uri_template: "/v3/{name}",
557
+ matches: [
558
+ ["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+/?$}, false]
559
+ ]
560
+ )
561
+ transcoder.transcode request_pb
562
+ end
563
+
564
+ ##
565
+ # @private
566
+ #
567
+ # GRPC transcoding helper method for the create_test_case REST call
568
+ #
569
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::CreateTestCaseRequest]
570
+ # A request object representing the call parameters. Required.
571
+ # @return [Array(String, [String, nil], Hash{String => String})]
572
+ # Uri, Body, Query string parameters
573
+ def self.transcode_create_test_case_request request_pb
574
+ transcoder = Gapic::Rest::GrpcTranscoder.new
575
+ .with_bindings(
576
+ uri_method: :post,
577
+ uri_template: "/v3/{parent}/testCases",
578
+ body: "test_case",
579
+ matches: [
580
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/?$}, false]
581
+ ]
582
+ )
583
+ transcoder.transcode request_pb
584
+ end
585
+
586
+ ##
587
+ # @private
588
+ #
589
+ # GRPC transcoding helper method for the update_test_case REST call
590
+ #
591
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::UpdateTestCaseRequest]
592
+ # A request object representing the call parameters. Required.
593
+ # @return [Array(String, [String, nil], Hash{String => String})]
594
+ # Uri, Body, Query string parameters
595
+ def self.transcode_update_test_case_request request_pb
596
+ transcoder = Gapic::Rest::GrpcTranscoder.new
597
+ .with_bindings(
598
+ uri_method: :patch,
599
+ uri_template: "/v3/{test_case.name}",
600
+ body: "test_case",
601
+ matches: [
602
+ ["test_case.name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+/?$}, false]
603
+ ]
604
+ )
605
+ transcoder.transcode request_pb
606
+ end
607
+
608
+ ##
609
+ # @private
610
+ #
611
+ # GRPC transcoding helper method for the run_test_case REST call
612
+ #
613
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::RunTestCaseRequest]
614
+ # A request object representing the call parameters. Required.
615
+ # @return [Array(String, [String, nil], Hash{String => String})]
616
+ # Uri, Body, Query string parameters
617
+ def self.transcode_run_test_case_request request_pb
618
+ transcoder = Gapic::Rest::GrpcTranscoder.new
619
+ .with_bindings(
620
+ uri_method: :post,
621
+ uri_template: "/v3/{name}:run",
622
+ body: "*",
623
+ matches: [
624
+ ["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+/?$}, false]
625
+ ]
626
+ )
627
+ transcoder.transcode request_pb
628
+ end
629
+
630
+ ##
631
+ # @private
632
+ #
633
+ # GRPC transcoding helper method for the batch_run_test_cases REST call
634
+ #
635
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::BatchRunTestCasesRequest]
636
+ # A request object representing the call parameters. Required.
637
+ # @return [Array(String, [String, nil], Hash{String => String})]
638
+ # Uri, Body, Query string parameters
639
+ def self.transcode_batch_run_test_cases_request request_pb
640
+ transcoder = Gapic::Rest::GrpcTranscoder.new
641
+ .with_bindings(
642
+ uri_method: :post,
643
+ uri_template: "/v3/{parent}/testCases:batchRun",
644
+ body: "*",
645
+ matches: [
646
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/?$}, false]
647
+ ]
648
+ )
649
+ transcoder.transcode request_pb
650
+ end
651
+
652
+ ##
653
+ # @private
654
+ #
655
+ # GRPC transcoding helper method for the calculate_coverage REST call
656
+ #
657
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::CalculateCoverageRequest]
658
+ # A request object representing the call parameters. Required.
659
+ # @return [Array(String, [String, nil], Hash{String => String})]
660
+ # Uri, Body, Query string parameters
661
+ def self.transcode_calculate_coverage_request request_pb
662
+ transcoder = Gapic::Rest::GrpcTranscoder.new
663
+ .with_bindings(
664
+ uri_method: :get,
665
+ uri_template: "/v3/{agent}/testCases:calculateCoverage",
666
+ matches: [
667
+ ["agent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/?$}, false]
668
+ ]
669
+ )
670
+ transcoder.transcode request_pb
671
+ end
672
+
673
+ ##
674
+ # @private
675
+ #
676
+ # GRPC transcoding helper method for the import_test_cases REST call
677
+ #
678
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ImportTestCasesRequest]
679
+ # A request object representing the call parameters. Required.
680
+ # @return [Array(String, [String, nil], Hash{String => String})]
681
+ # Uri, Body, Query string parameters
682
+ def self.transcode_import_test_cases_request request_pb
683
+ transcoder = Gapic::Rest::GrpcTranscoder.new
684
+ .with_bindings(
685
+ uri_method: :post,
686
+ uri_template: "/v3/{parent}/testCases:import",
687
+ body: "*",
688
+ matches: [
689
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/?$}, false]
690
+ ]
691
+ )
692
+ transcoder.transcode request_pb
693
+ end
694
+
695
+ ##
696
+ # @private
697
+ #
698
+ # GRPC transcoding helper method for the export_test_cases REST call
699
+ #
700
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ExportTestCasesRequest]
701
+ # A request object representing the call parameters. Required.
702
+ # @return [Array(String, [String, nil], Hash{String => String})]
703
+ # Uri, Body, Query string parameters
704
+ def self.transcode_export_test_cases_request request_pb
705
+ transcoder = Gapic::Rest::GrpcTranscoder.new
706
+ .with_bindings(
707
+ uri_method: :post,
708
+ uri_template: "/v3/{parent}/testCases:export",
709
+ body: "*",
710
+ matches: [
711
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/?$}, false]
712
+ ]
713
+ )
714
+ transcoder.transcode request_pb
715
+ end
716
+
717
+ ##
718
+ # @private
719
+ #
720
+ # GRPC transcoding helper method for the list_test_case_results REST call
721
+ #
722
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::ListTestCaseResultsRequest]
723
+ # A request object representing the call parameters. Required.
724
+ # @return [Array(String, [String, nil], Hash{String => String})]
725
+ # Uri, Body, Query string parameters
726
+ def self.transcode_list_test_case_results_request request_pb
727
+ transcoder = Gapic::Rest::GrpcTranscoder.new
728
+ .with_bindings(
729
+ uri_method: :get,
730
+ uri_template: "/v3/{parent}/results",
731
+ matches: [
732
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+/?$}, false]
733
+ ]
734
+ )
735
+ transcoder.transcode request_pb
736
+ end
737
+
738
+ ##
739
+ # @private
740
+ #
741
+ # GRPC transcoding helper method for the get_test_case_result REST call
742
+ #
743
+ # @param request_pb [::Google::Cloud::Dialogflow::CX::V3::GetTestCaseResultRequest]
744
+ # A request object representing the call parameters. Required.
745
+ # @return [Array(String, [String, nil], Hash{String => String})]
746
+ # Uri, Body, Query string parameters
747
+ def self.transcode_get_test_case_result_request request_pb
748
+ transcoder = Gapic::Rest::GrpcTranscoder.new
749
+ .with_bindings(
750
+ uri_method: :get,
751
+ uri_template: "/v3/{name}",
752
+ matches: [
753
+ ["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/testCases/[^/]+/results/[^/]+/?$}, false]
754
+ ]
755
+ )
756
+ transcoder.transcode request_pb
757
+ end
758
+ end
759
+ end
760
+ end
761
+ end
762
+ end
763
+ end
764
+ end
765
+ end