google-cloud-automl-v1 1.8.1 → 2.0.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 (81) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -4
  3. data/LICENSE.md +2 -2
  4. data/README.md +3 -153
  5. data/lib/google/cloud/automl/v1/version.rb +1 -1
  6. metadata +15 -115
  7. data/AUTHENTICATION.md +0 -122
  8. data/lib/google/cloud/automl/v1/_helpers.rb +0 -26
  9. data/lib/google/cloud/automl/v1/annotation_payload_pb.rb +0 -27
  10. data/lib/google/cloud/automl/v1/annotation_spec_pb.rb +0 -23
  11. data/lib/google/cloud/automl/v1/automl/client.rb +0 -2351
  12. data/lib/google/cloud/automl/v1/automl/credentials.rb +0 -51
  13. data/lib/google/cloud/automl/v1/automl/operations.rb +0 -851
  14. data/lib/google/cloud/automl/v1/automl/paths.rb +0 -130
  15. data/lib/google/cloud/automl/v1/automl/rest/client.rb +0 -2182
  16. data/lib/google/cloud/automl/v1/automl/rest/operations.rb +0 -1095
  17. data/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +0 -1188
  18. data/lib/google/cloud/automl/v1/automl/rest.rb +0 -66
  19. data/lib/google/cloud/automl/v1/automl.rb +0 -69
  20. data/lib/google/cloud/automl/v1/classification_pb.rb +0 -26
  21. data/lib/google/cloud/automl/v1/data_items_pb.rb +0 -32
  22. data/lib/google/cloud/automl/v1/dataset_pb.rb +0 -27
  23. data/lib/google/cloud/automl/v1/detection_pb.rb +0 -26
  24. data/lib/google/cloud/automl/v1/geometry_pb.rb +0 -22
  25. data/lib/google/cloud/automl/v1/image_pb.rb +0 -29
  26. data/lib/google/cloud/automl/v1/io_pb.rb +0 -30
  27. data/lib/google/cloud/automl/v1/model_evaluation_pb.rb +0 -29
  28. data/lib/google/cloud/automl/v1/model_pb.rb +0 -28
  29. data/lib/google/cloud/automl/v1/operations_pb.rb +0 -37
  30. data/lib/google/cloud/automl/v1/prediction_service/client.rb +0 -770
  31. data/lib/google/cloud/automl/v1/prediction_service/credentials.rb +0 -51
  32. data/lib/google/cloud/automl/v1/prediction_service/operations.rb +0 -851
  33. data/lib/google/cloud/automl/v1/prediction_service/paths.rb +0 -52
  34. data/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +0 -713
  35. data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +0 -1095
  36. data/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +0 -205
  37. data/lib/google/cloud/automl/v1/prediction_service/rest.rb +0 -56
  38. data/lib/google/cloud/automl/v1/prediction_service.rb +0 -59
  39. data/lib/google/cloud/automl/v1/prediction_service_pb.rb +0 -33
  40. data/lib/google/cloud/automl/v1/prediction_service_services_pb.rb +0 -99
  41. data/lib/google/cloud/automl/v1/rest.rb +0 -38
  42. data/lib/google/cloud/automl/v1/service_pb.rb +0 -55
  43. data/lib/google/cloud/automl/v1/service_services_pb.rb +0 -136
  44. data/lib/google/cloud/automl/v1/text_extraction_pb.rb +0 -25
  45. data/lib/google/cloud/automl/v1/text_pb.rb +0 -28
  46. data/lib/google/cloud/automl/v1/text_segment_pb.rb +0 -21
  47. data/lib/google/cloud/automl/v1/text_sentiment_pb.rb +0 -24
  48. data/lib/google/cloud/automl/v1/translation_pb.rb +0 -27
  49. data/lib/google/cloud/automl/v1.rb +0 -46
  50. data/lib/google-cloud-automl-v1.rb +0 -21
  51. data/proto_docs/README.md +0 -4
  52. data/proto_docs/google/api/client.rb +0 -593
  53. data/proto_docs/google/api/field_behavior.rb +0 -85
  54. data/proto_docs/google/api/launch_stage.rb +0 -71
  55. data/proto_docs/google/api/resource.rb +0 -227
  56. data/proto_docs/google/cloud/automl/v1/annotation_payload.rb +0 -70
  57. data/proto_docs/google/cloud/automl/v1/annotation_spec.rb +0 -45
  58. data/proto_docs/google/cloud/automl/v1/classification.rb +0 -189
  59. data/proto_docs/google/cloud/automl/v1/data_items.rb +0 -202
  60. data/proto_docs/google/cloud/automl/v1/dataset.rb +0 -106
  61. data/proto_docs/google/cloud/automl/v1/detection.rb +0 -97
  62. data/proto_docs/google/cloud/automl/v1/geometry.rb +0 -53
  63. data/proto_docs/google/cloud/automl/v1/image.rb +0 -215
  64. data/proto_docs/google/cloud/automl/v1/io.rb +0 -1345
  65. data/proto_docs/google/cloud/automl/v1/model.rb +0 -121
  66. data/proto_docs/google/cloud/automl/v1/model_evaluation.rb +0 -100
  67. data/proto_docs/google/cloud/automl/v1/operations.rb +0 -197
  68. data/proto_docs/google/cloud/automl/v1/prediction_service.rb +0 -270
  69. data/proto_docs/google/cloud/automl/v1/service.rb +0 -326
  70. data/proto_docs/google/cloud/automl/v1/text.rb +0 -76
  71. data/proto_docs/google/cloud/automl/v1/text_extraction.rb +0 -73
  72. data/proto_docs/google/cloud/automl/v1/text_segment.rb +0 -44
  73. data/proto_docs/google/cloud/automl/v1/text_sentiment.rb +0 -82
  74. data/proto_docs/google/cloud/automl/v1/translation.rb +0 -79
  75. data/proto_docs/google/longrunning/operations.rb +0 -191
  76. data/proto_docs/google/protobuf/any.rb +0 -145
  77. data/proto_docs/google/protobuf/duration.rb +0 -98
  78. data/proto_docs/google/protobuf/empty.rb +0 -34
  79. data/proto_docs/google/protobuf/field_mask.rb +0 -229
  80. data/proto_docs/google/protobuf/timestamp.rb +0 -127
  81. data/proto_docs/google/rpc/status.rb +0 -48
@@ -1,1188 +0,0 @@
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/automl/v1/service_pb"
20
-
21
- module Google
22
- module Cloud
23
- module AutoML
24
- module V1
25
- module AutoML
26
- module Rest
27
- ##
28
- # REST service stub for the AutoMl service.
29
- # Service stub contains baseline method implementations
30
- # including transcoding, making the REST call, and deserialing the response.
31
- #
32
- class ServiceStub
33
- # @private
34
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
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,
40
- endpoint_template: endpoint_template,
41
- universe_domain: universe_domain,
42
- credentials: credentials,
43
- numeric_enums: true,
44
- service_name: self.class,
45
- raise_faraday_errors: false,
46
- logger: logger
47
- end
48
-
49
- ##
50
- # The effective universe domain
51
- #
52
- # @return [String]
53
- #
54
- def universe_domain
55
- @client_stub.universe_domain
56
- end
57
-
58
- ##
59
- # The effective endpoint
60
- #
61
- # @return [String]
62
- #
63
- def endpoint
64
- @client_stub.endpoint
65
- end
66
-
67
- ##
68
- # The logger used for request/response debug logging.
69
- #
70
- # @return [Logger]
71
- #
72
- def logger stub: false
73
- stub ? @client_stub.stub_logger : @client_stub.logger
74
- end
75
-
76
- ##
77
- # Baseline implementation for the create_dataset REST call
78
- #
79
- # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest]
80
- # A request object representing the call parameters. Required.
81
- # @param options [::Gapic::CallOptions]
82
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
83
- #
84
- # @yield [result, operation] Access the result along with the TransportOperation object
85
- # @yieldparam result [::Google::Longrunning::Operation]
86
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
87
- #
88
- # @return [::Google::Longrunning::Operation]
89
- # A result object deserialized from the server's reply
90
- def create_dataset request_pb, options = nil
91
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
92
-
93
- verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb
94
- query_string_params = if query_string_params.any?
95
- query_string_params.to_h { |p| p.split "=", 2 }
96
- else
97
- {}
98
- end
99
-
100
- response = @client_stub.make_http_request(
101
- verb,
102
- uri: uri,
103
- body: body || "",
104
- params: query_string_params,
105
- method_name: "create_dataset",
106
- options: options
107
- )
108
- operation = ::Gapic::Rest::TransportOperation.new response
109
- result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
110
- catch :response do
111
- yield result, operation if block_given?
112
- result
113
- end
114
- end
115
-
116
- ##
117
- # Baseline implementation for the get_dataset REST call
118
- #
119
- # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest]
120
- # A request object representing the call parameters. Required.
121
- # @param options [::Gapic::CallOptions]
122
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
123
- #
124
- # @yield [result, operation] Access the result along with the TransportOperation object
125
- # @yieldparam result [::Google::Cloud::AutoML::V1::Dataset]
126
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
127
- #
128
- # @return [::Google::Cloud::AutoML::V1::Dataset]
129
- # A result object deserialized from the server's reply
130
- def get_dataset request_pb, options = nil
131
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
132
-
133
- verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb
134
- query_string_params = if query_string_params.any?
135
- query_string_params.to_h { |p| p.split "=", 2 }
136
- else
137
- {}
138
- end
139
-
140
- response = @client_stub.make_http_request(
141
- verb,
142
- uri: uri,
143
- body: body || "",
144
- params: query_string_params,
145
- method_name: "get_dataset",
146
- options: options
147
- )
148
- operation = ::Gapic::Rest::TransportOperation.new response
149
- result = ::Google::Cloud::AutoML::V1::Dataset.decode_json response.body, ignore_unknown_fields: true
150
- catch :response do
151
- yield result, operation if block_given?
152
- result
153
- end
154
- end
155
-
156
- ##
157
- # Baseline implementation for the list_datasets REST call
158
- #
159
- # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest]
160
- # A request object representing the call parameters. Required.
161
- # @param options [::Gapic::CallOptions]
162
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
163
- #
164
- # @yield [result, operation] Access the result along with the TransportOperation object
165
- # @yieldparam result [::Google::Cloud::AutoML::V1::ListDatasetsResponse]
166
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
167
- #
168
- # @return [::Google::Cloud::AutoML::V1::ListDatasetsResponse]
169
- # A result object deserialized from the server's reply
170
- def list_datasets request_pb, options = nil
171
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
172
-
173
- verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb
174
- query_string_params = if query_string_params.any?
175
- query_string_params.to_h { |p| p.split "=", 2 }
176
- else
177
- {}
178
- end
179
-
180
- response = @client_stub.make_http_request(
181
- verb,
182
- uri: uri,
183
- body: body || "",
184
- params: query_string_params,
185
- method_name: "list_datasets",
186
- options: options
187
- )
188
- operation = ::Gapic::Rest::TransportOperation.new response
189
- result = ::Google::Cloud::AutoML::V1::ListDatasetsResponse.decode_json response.body, ignore_unknown_fields: true
190
- catch :response do
191
- yield result, operation if block_given?
192
- result
193
- end
194
- end
195
-
196
- ##
197
- # Baseline implementation for the update_dataset REST call
198
- #
199
- # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest]
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::AutoML::V1::Dataset]
206
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
207
- #
208
- # @return [::Google::Cloud::AutoML::V1::Dataset]
209
- # A result object deserialized from the server's reply
210
- def update_dataset 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_dataset_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
- method_name: "update_dataset",
226
- options: options
227
- )
228
- operation = ::Gapic::Rest::TransportOperation.new response
229
- result = ::Google::Cloud::AutoML::V1::Dataset.decode_json response.body, ignore_unknown_fields: true
230
- catch :response do
231
- yield result, operation if block_given?
232
- result
233
- end
234
- end
235
-
236
- ##
237
- # Baseline implementation for the delete_dataset REST call
238
- #
239
- # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest]
240
- # A request object representing the call parameters. Required.
241
- # @param options [::Gapic::CallOptions]
242
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
243
- #
244
- # @yield [result, operation] Access the result along with the TransportOperation object
245
- # @yieldparam result [::Google::Longrunning::Operation]
246
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
247
- #
248
- # @return [::Google::Longrunning::Operation]
249
- # A result object deserialized from the server's reply
250
- def delete_dataset request_pb, options = nil
251
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
252
-
253
- verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb
254
- query_string_params = if query_string_params.any?
255
- query_string_params.to_h { |p| p.split "=", 2 }
256
- else
257
- {}
258
- end
259
-
260
- response = @client_stub.make_http_request(
261
- verb,
262
- uri: uri,
263
- body: body || "",
264
- params: query_string_params,
265
- method_name: "delete_dataset",
266
- options: options
267
- )
268
- operation = ::Gapic::Rest::TransportOperation.new response
269
- result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
270
- catch :response do
271
- yield result, operation if block_given?
272
- result
273
- end
274
- end
275
-
276
- ##
277
- # Baseline implementation for the import_data REST call
278
- #
279
- # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest]
280
- # A request object representing the call parameters. Required.
281
- # @param options [::Gapic::CallOptions]
282
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
283
- #
284
- # @yield [result, operation] Access the result along with the TransportOperation object
285
- # @yieldparam result [::Google::Longrunning::Operation]
286
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
287
- #
288
- # @return [::Google::Longrunning::Operation]
289
- # A result object deserialized from the server's reply
290
- def import_data request_pb, options = nil
291
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
292
-
293
- verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb
294
- query_string_params = if query_string_params.any?
295
- query_string_params.to_h { |p| p.split "=", 2 }
296
- else
297
- {}
298
- end
299
-
300
- response = @client_stub.make_http_request(
301
- verb,
302
- uri: uri,
303
- body: body || "",
304
- params: query_string_params,
305
- method_name: "import_data",
306
- options: options
307
- )
308
- operation = ::Gapic::Rest::TransportOperation.new response
309
- result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
310
- catch :response do
311
- yield result, operation if block_given?
312
- result
313
- end
314
- end
315
-
316
- ##
317
- # Baseline implementation for the export_data REST call
318
- #
319
- # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest]
320
- # A request object representing the call parameters. Required.
321
- # @param options [::Gapic::CallOptions]
322
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
323
- #
324
- # @yield [result, operation] Access the result along with the TransportOperation object
325
- # @yieldparam result [::Google::Longrunning::Operation]
326
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
327
- #
328
- # @return [::Google::Longrunning::Operation]
329
- # A result object deserialized from the server's reply
330
- def export_data request_pb, options = nil
331
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
332
-
333
- verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb
334
- query_string_params = if query_string_params.any?
335
- query_string_params.to_h { |p| p.split "=", 2 }
336
- else
337
- {}
338
- end
339
-
340
- response = @client_stub.make_http_request(
341
- verb,
342
- uri: uri,
343
- body: body || "",
344
- params: query_string_params,
345
- method_name: "export_data",
346
- options: options
347
- )
348
- operation = ::Gapic::Rest::TransportOperation.new response
349
- result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
350
- catch :response do
351
- yield result, operation if block_given?
352
- result
353
- end
354
- end
355
-
356
- ##
357
- # Baseline implementation for the get_annotation_spec REST call
358
- #
359
- # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest]
360
- # A request object representing the call parameters. Required.
361
- # @param options [::Gapic::CallOptions]
362
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
363
- #
364
- # @yield [result, operation] Access the result along with the TransportOperation object
365
- # @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec]
366
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
367
- #
368
- # @return [::Google::Cloud::AutoML::V1::AnnotationSpec]
369
- # A result object deserialized from the server's reply
370
- def get_annotation_spec request_pb, options = nil
371
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
372
-
373
- verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb
374
- query_string_params = if query_string_params.any?
375
- query_string_params.to_h { |p| p.split "=", 2 }
376
- else
377
- {}
378
- end
379
-
380
- response = @client_stub.make_http_request(
381
- verb,
382
- uri: uri,
383
- body: body || "",
384
- params: query_string_params,
385
- method_name: "get_annotation_spec",
386
- options: options
387
- )
388
- operation = ::Gapic::Rest::TransportOperation.new response
389
- result = ::Google::Cloud::AutoML::V1::AnnotationSpec.decode_json response.body, ignore_unknown_fields: true
390
- catch :response do
391
- yield result, operation if block_given?
392
- result
393
- end
394
- end
395
-
396
- ##
397
- # Baseline implementation for the create_model REST call
398
- #
399
- # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest]
400
- # A request object representing the call parameters. Required.
401
- # @param options [::Gapic::CallOptions]
402
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
403
- #
404
- # @yield [result, operation] Access the result along with the TransportOperation object
405
- # @yieldparam result [::Google::Longrunning::Operation]
406
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
407
- #
408
- # @return [::Google::Longrunning::Operation]
409
- # A result object deserialized from the server's reply
410
- def create_model request_pb, options = nil
411
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
412
-
413
- verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb
414
- query_string_params = if query_string_params.any?
415
- query_string_params.to_h { |p| p.split "=", 2 }
416
- else
417
- {}
418
- end
419
-
420
- response = @client_stub.make_http_request(
421
- verb,
422
- uri: uri,
423
- body: body || "",
424
- params: query_string_params,
425
- method_name: "create_model",
426
- options: options
427
- )
428
- operation = ::Gapic::Rest::TransportOperation.new response
429
- result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
430
- catch :response do
431
- yield result, operation if block_given?
432
- result
433
- end
434
- end
435
-
436
- ##
437
- # Baseline implementation for the get_model REST call
438
- #
439
- # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest]
440
- # A request object representing the call parameters. Required.
441
- # @param options [::Gapic::CallOptions]
442
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
443
- #
444
- # @yield [result, operation] Access the result along with the TransportOperation object
445
- # @yieldparam result [::Google::Cloud::AutoML::V1::Model]
446
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
447
- #
448
- # @return [::Google::Cloud::AutoML::V1::Model]
449
- # A result object deserialized from the server's reply
450
- def get_model request_pb, options = nil
451
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
452
-
453
- verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb
454
- query_string_params = if query_string_params.any?
455
- query_string_params.to_h { |p| p.split "=", 2 }
456
- else
457
- {}
458
- end
459
-
460
- response = @client_stub.make_http_request(
461
- verb,
462
- uri: uri,
463
- body: body || "",
464
- params: query_string_params,
465
- method_name: "get_model",
466
- options: options
467
- )
468
- operation = ::Gapic::Rest::TransportOperation.new response
469
- result = ::Google::Cloud::AutoML::V1::Model.decode_json response.body, ignore_unknown_fields: true
470
- catch :response do
471
- yield result, operation if block_given?
472
- result
473
- end
474
- end
475
-
476
- ##
477
- # Baseline implementation for the list_models REST call
478
- #
479
- # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest]
480
- # A request object representing the call parameters. Required.
481
- # @param options [::Gapic::CallOptions]
482
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
483
- #
484
- # @yield [result, operation] Access the result along with the TransportOperation object
485
- # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelsResponse]
486
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
487
- #
488
- # @return [::Google::Cloud::AutoML::V1::ListModelsResponse]
489
- # A result object deserialized from the server's reply
490
- def list_models request_pb, options = nil
491
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
492
-
493
- verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb
494
- query_string_params = if query_string_params.any?
495
- query_string_params.to_h { |p| p.split "=", 2 }
496
- else
497
- {}
498
- end
499
-
500
- response = @client_stub.make_http_request(
501
- verb,
502
- uri: uri,
503
- body: body || "",
504
- params: query_string_params,
505
- method_name: "list_models",
506
- options: options
507
- )
508
- operation = ::Gapic::Rest::TransportOperation.new response
509
- result = ::Google::Cloud::AutoML::V1::ListModelsResponse.decode_json response.body, ignore_unknown_fields: true
510
- catch :response do
511
- yield result, operation if block_given?
512
- result
513
- end
514
- end
515
-
516
- ##
517
- # Baseline implementation for the delete_model REST call
518
- #
519
- # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest]
520
- # A request object representing the call parameters. Required.
521
- # @param options [::Gapic::CallOptions]
522
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
523
- #
524
- # @yield [result, operation] Access the result along with the TransportOperation object
525
- # @yieldparam result [::Google::Longrunning::Operation]
526
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
527
- #
528
- # @return [::Google::Longrunning::Operation]
529
- # A result object deserialized from the server's reply
530
- def delete_model request_pb, options = nil
531
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
532
-
533
- verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb
534
- query_string_params = if query_string_params.any?
535
- query_string_params.to_h { |p| p.split "=", 2 }
536
- else
537
- {}
538
- end
539
-
540
- response = @client_stub.make_http_request(
541
- verb,
542
- uri: uri,
543
- body: body || "",
544
- params: query_string_params,
545
- method_name: "delete_model",
546
- options: options
547
- )
548
- operation = ::Gapic::Rest::TransportOperation.new response
549
- result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
550
- catch :response do
551
- yield result, operation if block_given?
552
- result
553
- end
554
- end
555
-
556
- ##
557
- # Baseline implementation for the update_model REST call
558
- #
559
- # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest]
560
- # A request object representing the call parameters. Required.
561
- # @param options [::Gapic::CallOptions]
562
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
563
- #
564
- # @yield [result, operation] Access the result along with the TransportOperation object
565
- # @yieldparam result [::Google::Cloud::AutoML::V1::Model]
566
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
567
- #
568
- # @return [::Google::Cloud::AutoML::V1::Model]
569
- # A result object deserialized from the server's reply
570
- def update_model request_pb, options = nil
571
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
572
-
573
- verb, uri, query_string_params, body = ServiceStub.transcode_update_model_request request_pb
574
- query_string_params = if query_string_params.any?
575
- query_string_params.to_h { |p| p.split "=", 2 }
576
- else
577
- {}
578
- end
579
-
580
- response = @client_stub.make_http_request(
581
- verb,
582
- uri: uri,
583
- body: body || "",
584
- params: query_string_params,
585
- method_name: "update_model",
586
- options: options
587
- )
588
- operation = ::Gapic::Rest::TransportOperation.new response
589
- result = ::Google::Cloud::AutoML::V1::Model.decode_json response.body, ignore_unknown_fields: true
590
- catch :response do
591
- yield result, operation if block_given?
592
- result
593
- end
594
- end
595
-
596
- ##
597
- # Baseline implementation for the deploy_model REST call
598
- #
599
- # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest]
600
- # A request object representing the call parameters. Required.
601
- # @param options [::Gapic::CallOptions]
602
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
603
- #
604
- # @yield [result, operation] Access the result along with the TransportOperation object
605
- # @yieldparam result [::Google::Longrunning::Operation]
606
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
607
- #
608
- # @return [::Google::Longrunning::Operation]
609
- # A result object deserialized from the server's reply
610
- def deploy_model request_pb, options = nil
611
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
612
-
613
- verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb
614
- query_string_params = if query_string_params.any?
615
- query_string_params.to_h { |p| p.split "=", 2 }
616
- else
617
- {}
618
- end
619
-
620
- response = @client_stub.make_http_request(
621
- verb,
622
- uri: uri,
623
- body: body || "",
624
- params: query_string_params,
625
- method_name: "deploy_model",
626
- options: options
627
- )
628
- operation = ::Gapic::Rest::TransportOperation.new response
629
- result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
630
- catch :response do
631
- yield result, operation if block_given?
632
- result
633
- end
634
- end
635
-
636
- ##
637
- # Baseline implementation for the undeploy_model REST call
638
- #
639
- # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest]
640
- # A request object representing the call parameters. Required.
641
- # @param options [::Gapic::CallOptions]
642
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
643
- #
644
- # @yield [result, operation] Access the result along with the TransportOperation object
645
- # @yieldparam result [::Google::Longrunning::Operation]
646
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
647
- #
648
- # @return [::Google::Longrunning::Operation]
649
- # A result object deserialized from the server's reply
650
- def undeploy_model request_pb, options = nil
651
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
652
-
653
- verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb
654
- query_string_params = if query_string_params.any?
655
- query_string_params.to_h { |p| p.split "=", 2 }
656
- else
657
- {}
658
- end
659
-
660
- response = @client_stub.make_http_request(
661
- verb,
662
- uri: uri,
663
- body: body || "",
664
- params: query_string_params,
665
- method_name: "undeploy_model",
666
- options: options
667
- )
668
- operation = ::Gapic::Rest::TransportOperation.new response
669
- result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
670
- catch :response do
671
- yield result, operation if block_given?
672
- result
673
- end
674
- end
675
-
676
- ##
677
- # Baseline implementation for the export_model REST call
678
- #
679
- # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest]
680
- # A request object representing the call parameters. Required.
681
- # @param options [::Gapic::CallOptions]
682
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
683
- #
684
- # @yield [result, operation] Access the result along with the TransportOperation object
685
- # @yieldparam result [::Google::Longrunning::Operation]
686
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
687
- #
688
- # @return [::Google::Longrunning::Operation]
689
- # A result object deserialized from the server's reply
690
- def export_model request_pb, options = nil
691
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
692
-
693
- verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb
694
- query_string_params = if query_string_params.any?
695
- query_string_params.to_h { |p| p.split "=", 2 }
696
- else
697
- {}
698
- end
699
-
700
- response = @client_stub.make_http_request(
701
- verb,
702
- uri: uri,
703
- body: body || "",
704
- params: query_string_params,
705
- method_name: "export_model",
706
- options: options
707
- )
708
- operation = ::Gapic::Rest::TransportOperation.new response
709
- result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
710
- catch :response do
711
- yield result, operation if block_given?
712
- result
713
- end
714
- end
715
-
716
- ##
717
- # Baseline implementation for the get_model_evaluation REST call
718
- #
719
- # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest]
720
- # A request object representing the call parameters. Required.
721
- # @param options [::Gapic::CallOptions]
722
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
723
- #
724
- # @yield [result, operation] Access the result along with the TransportOperation object
725
- # @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation]
726
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
727
- #
728
- # @return [::Google::Cloud::AutoML::V1::ModelEvaluation]
729
- # A result object deserialized from the server's reply
730
- def get_model_evaluation request_pb, options = nil
731
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
732
-
733
- verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb
734
- query_string_params = if query_string_params.any?
735
- query_string_params.to_h { |p| p.split "=", 2 }
736
- else
737
- {}
738
- end
739
-
740
- response = @client_stub.make_http_request(
741
- verb,
742
- uri: uri,
743
- body: body || "",
744
- params: query_string_params,
745
- method_name: "get_model_evaluation",
746
- options: options
747
- )
748
- operation = ::Gapic::Rest::TransportOperation.new response
749
- result = ::Google::Cloud::AutoML::V1::ModelEvaluation.decode_json response.body, ignore_unknown_fields: true
750
- catch :response do
751
- yield result, operation if block_given?
752
- result
753
- end
754
- end
755
-
756
- ##
757
- # Baseline implementation for the list_model_evaluations REST call
758
- #
759
- # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest]
760
- # A request object representing the call parameters. Required.
761
- # @param options [::Gapic::CallOptions]
762
- # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
763
- #
764
- # @yield [result, operation] Access the result along with the TransportOperation object
765
- # @yieldparam result [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse]
766
- # @yieldparam operation [::Gapic::Rest::TransportOperation]
767
- #
768
- # @return [::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse]
769
- # A result object deserialized from the server's reply
770
- def list_model_evaluations request_pb, options = nil
771
- raise ::ArgumentError, "request must be provided" if request_pb.nil?
772
-
773
- verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb
774
- query_string_params = if query_string_params.any?
775
- query_string_params.to_h { |p| p.split "=", 2 }
776
- else
777
- {}
778
- end
779
-
780
- response = @client_stub.make_http_request(
781
- verb,
782
- uri: uri,
783
- body: body || "",
784
- params: query_string_params,
785
- method_name: "list_model_evaluations",
786
- options: options
787
- )
788
- operation = ::Gapic::Rest::TransportOperation.new response
789
- result = ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse.decode_json response.body, ignore_unknown_fields: true
790
- catch :response do
791
- yield result, operation if block_given?
792
- result
793
- end
794
- end
795
-
796
- ##
797
- # @private
798
- #
799
- # GRPC transcoding helper method for the create_dataset REST call
800
- #
801
- # @param request_pb [::Google::Cloud::AutoML::V1::CreateDatasetRequest]
802
- # A request object representing the call parameters. Required.
803
- # @return [Array(String, [String, nil], Hash{String => String})]
804
- # Uri, Body, Query string parameters
805
- def self.transcode_create_dataset_request request_pb
806
- transcoder = Gapic::Rest::GrpcTranscoder.new
807
- .with_bindings(
808
- uri_method: :post,
809
- uri_template: "/v1/{parent}/datasets",
810
- body: "dataset",
811
- matches: [
812
- ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
813
- ]
814
- )
815
- transcoder.transcode request_pb
816
- end
817
-
818
- ##
819
- # @private
820
- #
821
- # GRPC transcoding helper method for the get_dataset REST call
822
- #
823
- # @param request_pb [::Google::Cloud::AutoML::V1::GetDatasetRequest]
824
- # A request object representing the call parameters. Required.
825
- # @return [Array(String, [String, nil], Hash{String => String})]
826
- # Uri, Body, Query string parameters
827
- def self.transcode_get_dataset_request request_pb
828
- transcoder = Gapic::Rest::GrpcTranscoder.new
829
- .with_bindings(
830
- uri_method: :get,
831
- uri_template: "/v1/{name}",
832
- matches: [
833
- ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false]
834
- ]
835
- )
836
- transcoder.transcode request_pb
837
- end
838
-
839
- ##
840
- # @private
841
- #
842
- # GRPC transcoding helper method for the list_datasets REST call
843
- #
844
- # @param request_pb [::Google::Cloud::AutoML::V1::ListDatasetsRequest]
845
- # A request object representing the call parameters. Required.
846
- # @return [Array(String, [String, nil], Hash{String => String})]
847
- # Uri, Body, Query string parameters
848
- def self.transcode_list_datasets_request request_pb
849
- transcoder = Gapic::Rest::GrpcTranscoder.new
850
- .with_bindings(
851
- uri_method: :get,
852
- uri_template: "/v1/{parent}/datasets",
853
- matches: [
854
- ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
855
- ]
856
- )
857
- transcoder.transcode request_pb
858
- end
859
-
860
- ##
861
- # @private
862
- #
863
- # GRPC transcoding helper method for the update_dataset REST call
864
- #
865
- # @param request_pb [::Google::Cloud::AutoML::V1::UpdateDatasetRequest]
866
- # A request object representing the call parameters. Required.
867
- # @return [Array(String, [String, nil], Hash{String => String})]
868
- # Uri, Body, Query string parameters
869
- def self.transcode_update_dataset_request request_pb
870
- transcoder = Gapic::Rest::GrpcTranscoder.new
871
- .with_bindings(
872
- uri_method: :patch,
873
- uri_template: "/v1/{dataset.name}",
874
- body: "dataset",
875
- matches: [
876
- ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false]
877
- ]
878
- )
879
- transcoder.transcode request_pb
880
- end
881
-
882
- ##
883
- # @private
884
- #
885
- # GRPC transcoding helper method for the delete_dataset REST call
886
- #
887
- # @param request_pb [::Google::Cloud::AutoML::V1::DeleteDatasetRequest]
888
- # A request object representing the call parameters. Required.
889
- # @return [Array(String, [String, nil], Hash{String => String})]
890
- # Uri, Body, Query string parameters
891
- def self.transcode_delete_dataset_request request_pb
892
- transcoder = Gapic::Rest::GrpcTranscoder.new
893
- .with_bindings(
894
- uri_method: :delete,
895
- uri_template: "/v1/{name}",
896
- matches: [
897
- ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false]
898
- ]
899
- )
900
- transcoder.transcode request_pb
901
- end
902
-
903
- ##
904
- # @private
905
- #
906
- # GRPC transcoding helper method for the import_data REST call
907
- #
908
- # @param request_pb [::Google::Cloud::AutoML::V1::ImportDataRequest]
909
- # A request object representing the call parameters. Required.
910
- # @return [Array(String, [String, nil], Hash{String => String})]
911
- # Uri, Body, Query string parameters
912
- def self.transcode_import_data_request request_pb
913
- transcoder = Gapic::Rest::GrpcTranscoder.new
914
- .with_bindings(
915
- uri_method: :post,
916
- uri_template: "/v1/{name}:importData",
917
- body: "*",
918
- matches: [
919
- ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false]
920
- ]
921
- )
922
- transcoder.transcode request_pb
923
- end
924
-
925
- ##
926
- # @private
927
- #
928
- # GRPC transcoding helper method for the export_data REST call
929
- #
930
- # @param request_pb [::Google::Cloud::AutoML::V1::ExportDataRequest]
931
- # A request object representing the call parameters. Required.
932
- # @return [Array(String, [String, nil], Hash{String => String})]
933
- # Uri, Body, Query string parameters
934
- def self.transcode_export_data_request request_pb
935
- transcoder = Gapic::Rest::GrpcTranscoder.new
936
- .with_bindings(
937
- uri_method: :post,
938
- uri_template: "/v1/{name}:exportData",
939
- body: "*",
940
- matches: [
941
- ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false]
942
- ]
943
- )
944
- transcoder.transcode request_pb
945
- end
946
-
947
- ##
948
- # @private
949
- #
950
- # GRPC transcoding helper method for the get_annotation_spec REST call
951
- #
952
- # @param request_pb [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest]
953
- # A request object representing the call parameters. Required.
954
- # @return [Array(String, [String, nil], Hash{String => String})]
955
- # Uri, Body, Query string parameters
956
- def self.transcode_get_annotation_spec_request request_pb
957
- transcoder = Gapic::Rest::GrpcTranscoder.new
958
- .with_bindings(
959
- uri_method: :get,
960
- uri_template: "/v1/{name}",
961
- matches: [
962
- ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false]
963
- ]
964
- )
965
- transcoder.transcode request_pb
966
- end
967
-
968
- ##
969
- # @private
970
- #
971
- # GRPC transcoding helper method for the create_model REST call
972
- #
973
- # @param request_pb [::Google::Cloud::AutoML::V1::CreateModelRequest]
974
- # A request object representing the call parameters. Required.
975
- # @return [Array(String, [String, nil], Hash{String => String})]
976
- # Uri, Body, Query string parameters
977
- def self.transcode_create_model_request request_pb
978
- transcoder = Gapic::Rest::GrpcTranscoder.new
979
- .with_bindings(
980
- uri_method: :post,
981
- uri_template: "/v1/{parent}/models",
982
- body: "model",
983
- matches: [
984
- ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
985
- ]
986
- )
987
- transcoder.transcode request_pb
988
- end
989
-
990
- ##
991
- # @private
992
- #
993
- # GRPC transcoding helper method for the get_model REST call
994
- #
995
- # @param request_pb [::Google::Cloud::AutoML::V1::GetModelRequest]
996
- # A request object representing the call parameters. Required.
997
- # @return [Array(String, [String, nil], Hash{String => String})]
998
- # Uri, Body, Query string parameters
999
- def self.transcode_get_model_request request_pb
1000
- transcoder = Gapic::Rest::GrpcTranscoder.new
1001
- .with_bindings(
1002
- uri_method: :get,
1003
- uri_template: "/v1/{name}",
1004
- matches: [
1005
- ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false]
1006
- ]
1007
- )
1008
- transcoder.transcode request_pb
1009
- end
1010
-
1011
- ##
1012
- # @private
1013
- #
1014
- # GRPC transcoding helper method for the list_models REST call
1015
- #
1016
- # @param request_pb [::Google::Cloud::AutoML::V1::ListModelsRequest]
1017
- # A request object representing the call parameters. Required.
1018
- # @return [Array(String, [String, nil], Hash{String => String})]
1019
- # Uri, Body, Query string parameters
1020
- def self.transcode_list_models_request request_pb
1021
- transcoder = Gapic::Rest::GrpcTranscoder.new
1022
- .with_bindings(
1023
- uri_method: :get,
1024
- uri_template: "/v1/{parent}/models",
1025
- matches: [
1026
- ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
1027
- ]
1028
- )
1029
- transcoder.transcode request_pb
1030
- end
1031
-
1032
- ##
1033
- # @private
1034
- #
1035
- # GRPC transcoding helper method for the delete_model REST call
1036
- #
1037
- # @param request_pb [::Google::Cloud::AutoML::V1::DeleteModelRequest]
1038
- # A request object representing the call parameters. Required.
1039
- # @return [Array(String, [String, nil], Hash{String => String})]
1040
- # Uri, Body, Query string parameters
1041
- def self.transcode_delete_model_request request_pb
1042
- transcoder = Gapic::Rest::GrpcTranscoder.new
1043
- .with_bindings(
1044
- uri_method: :delete,
1045
- uri_template: "/v1/{name}",
1046
- matches: [
1047
- ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false]
1048
- ]
1049
- )
1050
- transcoder.transcode request_pb
1051
- end
1052
-
1053
- ##
1054
- # @private
1055
- #
1056
- # GRPC transcoding helper method for the update_model REST call
1057
- #
1058
- # @param request_pb [::Google::Cloud::AutoML::V1::UpdateModelRequest]
1059
- # A request object representing the call parameters. Required.
1060
- # @return [Array(String, [String, nil], Hash{String => String})]
1061
- # Uri, Body, Query string parameters
1062
- def self.transcode_update_model_request request_pb
1063
- transcoder = Gapic::Rest::GrpcTranscoder.new
1064
- .with_bindings(
1065
- uri_method: :patch,
1066
- uri_template: "/v1/{model.name}",
1067
- body: "model",
1068
- matches: [
1069
- ["model.name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false]
1070
- ]
1071
- )
1072
- transcoder.transcode request_pb
1073
- end
1074
-
1075
- ##
1076
- # @private
1077
- #
1078
- # GRPC transcoding helper method for the deploy_model REST call
1079
- #
1080
- # @param request_pb [::Google::Cloud::AutoML::V1::DeployModelRequest]
1081
- # A request object representing the call parameters. Required.
1082
- # @return [Array(String, [String, nil], Hash{String => String})]
1083
- # Uri, Body, Query string parameters
1084
- def self.transcode_deploy_model_request request_pb
1085
- transcoder = Gapic::Rest::GrpcTranscoder.new
1086
- .with_bindings(
1087
- uri_method: :post,
1088
- uri_template: "/v1/{name}:deploy",
1089
- body: "*",
1090
- matches: [
1091
- ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false]
1092
- ]
1093
- )
1094
- transcoder.transcode request_pb
1095
- end
1096
-
1097
- ##
1098
- # @private
1099
- #
1100
- # GRPC transcoding helper method for the undeploy_model REST call
1101
- #
1102
- # @param request_pb [::Google::Cloud::AutoML::V1::UndeployModelRequest]
1103
- # A request object representing the call parameters. Required.
1104
- # @return [Array(String, [String, nil], Hash{String => String})]
1105
- # Uri, Body, Query string parameters
1106
- def self.transcode_undeploy_model_request request_pb
1107
- transcoder = Gapic::Rest::GrpcTranscoder.new
1108
- .with_bindings(
1109
- uri_method: :post,
1110
- uri_template: "/v1/{name}:undeploy",
1111
- body: "*",
1112
- matches: [
1113
- ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false]
1114
- ]
1115
- )
1116
- transcoder.transcode request_pb
1117
- end
1118
-
1119
- ##
1120
- # @private
1121
- #
1122
- # GRPC transcoding helper method for the export_model REST call
1123
- #
1124
- # @param request_pb [::Google::Cloud::AutoML::V1::ExportModelRequest]
1125
- # A request object representing the call parameters. Required.
1126
- # @return [Array(String, [String, nil], Hash{String => String})]
1127
- # Uri, Body, Query string parameters
1128
- def self.transcode_export_model_request request_pb
1129
- transcoder = Gapic::Rest::GrpcTranscoder.new
1130
- .with_bindings(
1131
- uri_method: :post,
1132
- uri_template: "/v1/{name}:export",
1133
- body: "*",
1134
- matches: [
1135
- ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false]
1136
- ]
1137
- )
1138
- transcoder.transcode request_pb
1139
- end
1140
-
1141
- ##
1142
- # @private
1143
- #
1144
- # GRPC transcoding helper method for the get_model_evaluation REST call
1145
- #
1146
- # @param request_pb [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest]
1147
- # A request object representing the call parameters. Required.
1148
- # @return [Array(String, [String, nil], Hash{String => String})]
1149
- # Uri, Body, Query string parameters
1150
- def self.transcode_get_model_evaluation_request request_pb
1151
- transcoder = Gapic::Rest::GrpcTranscoder.new
1152
- .with_bindings(
1153
- uri_method: :get,
1154
- uri_template: "/v1/{name}",
1155
- matches: [
1156
- ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false]
1157
- ]
1158
- )
1159
- transcoder.transcode request_pb
1160
- end
1161
-
1162
- ##
1163
- # @private
1164
- #
1165
- # GRPC transcoding helper method for the list_model_evaluations REST call
1166
- #
1167
- # @param request_pb [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest]
1168
- # A request object representing the call parameters. Required.
1169
- # @return [Array(String, [String, nil], Hash{String => String})]
1170
- # Uri, Body, Query string parameters
1171
- def self.transcode_list_model_evaluations_request request_pb
1172
- transcoder = Gapic::Rest::GrpcTranscoder.new
1173
- .with_bindings(
1174
- uri_method: :get,
1175
- uri_template: "/v1/{parent}/modelEvaluations",
1176
- matches: [
1177
- ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false]
1178
- ]
1179
- )
1180
- transcoder.transcode request_pb
1181
- end
1182
- end
1183
- end
1184
- end
1185
- end
1186
- end
1187
- end
1188
- end