google-cloud-automl-v1 0.5.1 → 0.6.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/automl/v1/automl/rest/client.rb +1736 -0
- data/lib/google/cloud/automl/v1/automl/rest/operations.rb +935 -0
- data/lib/google/cloud/automl/v1/automl/rest/service_stub.rb +1119 -0
- data/lib/google/cloud/automl/v1/automl/rest.rb +66 -0
- data/lib/google/cloud/automl/v1/automl.rb +6 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest/client.rb +606 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest/operations.rb +935 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest/service_stub.rb +168 -0
- data/lib/google/cloud/automl/v1/prediction_service/rest.rb +56 -0
- data/lib/google/cloud/automl/v1/prediction_service.rb +6 -0
- data/lib/google/cloud/automl/v1/rest.rb +38 -0
- data/lib/google/cloud/automl/v1/version.rb +1 -1
- data/lib/google/cloud/automl/v1.rb +5 -0
- metadata +15 -5
@@ -0,0 +1,1736 @@
|
|
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/errors"
|
20
|
+
require "google/cloud/automl/v1/service_pb"
|
21
|
+
require "google/cloud/automl/v1/automl/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module AutoML
|
26
|
+
module V1
|
27
|
+
module AutoML
|
28
|
+
module Rest
|
29
|
+
##
|
30
|
+
# REST client for the AutoMl service.
|
31
|
+
#
|
32
|
+
# AutoML Server API.
|
33
|
+
#
|
34
|
+
# The resource names are assigned by the server.
|
35
|
+
# The server never reuses names that it has created after the resources with
|
36
|
+
# those names are deleted.
|
37
|
+
#
|
38
|
+
# An ID of a resource is the last element of the item's resource name. For
|
39
|
+
# `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
|
40
|
+
# the id for the item is `{dataset_id}`.
|
41
|
+
#
|
42
|
+
# Currently the only supported `location_id` is "us-central1".
|
43
|
+
#
|
44
|
+
# On any input that is documented to expect a string parameter in
|
45
|
+
# snake_case or dash-case, either of those cases is accepted.
|
46
|
+
#
|
47
|
+
class Client
|
48
|
+
include Paths
|
49
|
+
|
50
|
+
# @private
|
51
|
+
attr_reader :auto_ml_stub
|
52
|
+
|
53
|
+
##
|
54
|
+
# Configure the AutoMl Client class.
|
55
|
+
#
|
56
|
+
# See {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration}
|
57
|
+
# for a description of the configuration fields.
|
58
|
+
#
|
59
|
+
# @example
|
60
|
+
#
|
61
|
+
# # Modify the configuration for all AutoMl clients
|
62
|
+
# ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.configure do |config|
|
63
|
+
# config.timeout = 10.0
|
64
|
+
# end
|
65
|
+
#
|
66
|
+
# @yield [config] Configure the Client client.
|
67
|
+
# @yieldparam config [Client::Configuration]
|
68
|
+
#
|
69
|
+
# @return [Client::Configuration]
|
70
|
+
#
|
71
|
+
def self.configure
|
72
|
+
@configure ||= begin
|
73
|
+
namespace = ["Google", "Cloud", "AutoML", "V1"]
|
74
|
+
parent_config = while namespace.any?
|
75
|
+
parent_name = namespace.join "::"
|
76
|
+
parent_const = const_get parent_name
|
77
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
78
|
+
namespace.pop
|
79
|
+
end
|
80
|
+
default_config = Client::Configuration.new parent_config
|
81
|
+
|
82
|
+
default_config.rpcs.create_dataset.timeout = 5.0
|
83
|
+
|
84
|
+
default_config.rpcs.get_dataset.timeout = 5.0
|
85
|
+
default_config.rpcs.get_dataset.retry_policy = {
|
86
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
87
|
+
}
|
88
|
+
|
89
|
+
default_config.rpcs.list_datasets.timeout = 5.0
|
90
|
+
default_config.rpcs.list_datasets.retry_policy = {
|
91
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
92
|
+
}
|
93
|
+
|
94
|
+
default_config.rpcs.update_dataset.timeout = 5.0
|
95
|
+
|
96
|
+
default_config.rpcs.delete_dataset.timeout = 5.0
|
97
|
+
default_config.rpcs.delete_dataset.retry_policy = {
|
98
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
99
|
+
}
|
100
|
+
|
101
|
+
default_config.rpcs.import_data.timeout = 5.0
|
102
|
+
|
103
|
+
default_config.rpcs.export_data.timeout = 5.0
|
104
|
+
|
105
|
+
default_config.rpcs.get_annotation_spec.timeout = 5.0
|
106
|
+
default_config.rpcs.get_annotation_spec.retry_policy = {
|
107
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
108
|
+
}
|
109
|
+
|
110
|
+
default_config.rpcs.create_model.timeout = 5.0
|
111
|
+
|
112
|
+
default_config.rpcs.get_model.timeout = 5.0
|
113
|
+
default_config.rpcs.get_model.retry_policy = {
|
114
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
115
|
+
}
|
116
|
+
|
117
|
+
default_config.rpcs.list_models.timeout = 5.0
|
118
|
+
default_config.rpcs.list_models.retry_policy = {
|
119
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
120
|
+
}
|
121
|
+
|
122
|
+
default_config.rpcs.delete_model.timeout = 5.0
|
123
|
+
default_config.rpcs.delete_model.retry_policy = {
|
124
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
125
|
+
}
|
126
|
+
|
127
|
+
default_config.rpcs.update_model.timeout = 5.0
|
128
|
+
|
129
|
+
default_config.rpcs.deploy_model.timeout = 5.0
|
130
|
+
|
131
|
+
default_config.rpcs.undeploy_model.timeout = 5.0
|
132
|
+
|
133
|
+
default_config.rpcs.export_model.timeout = 5.0
|
134
|
+
|
135
|
+
default_config.rpcs.get_model_evaluation.timeout = 5.0
|
136
|
+
default_config.rpcs.get_model_evaluation.retry_policy = {
|
137
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
138
|
+
}
|
139
|
+
|
140
|
+
default_config.rpcs.list_model_evaluations.timeout = 5.0
|
141
|
+
default_config.rpcs.list_model_evaluations.retry_policy = {
|
142
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
143
|
+
}
|
144
|
+
|
145
|
+
default_config
|
146
|
+
end
|
147
|
+
yield @configure if block_given?
|
148
|
+
@configure
|
149
|
+
end
|
150
|
+
|
151
|
+
##
|
152
|
+
# Configure the AutoMl Client instance.
|
153
|
+
#
|
154
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
155
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
156
|
+
# should be made on {Client.configure}.
|
157
|
+
#
|
158
|
+
# See {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration}
|
159
|
+
# for a description of the configuration fields.
|
160
|
+
#
|
161
|
+
# @yield [config] Configure the Client client.
|
162
|
+
# @yieldparam config [Client::Configuration]
|
163
|
+
#
|
164
|
+
# @return [Client::Configuration]
|
165
|
+
#
|
166
|
+
def configure
|
167
|
+
yield @config if block_given?
|
168
|
+
@config
|
169
|
+
end
|
170
|
+
|
171
|
+
##
|
172
|
+
# Create a new AutoMl REST client object.
|
173
|
+
#
|
174
|
+
# @example
|
175
|
+
#
|
176
|
+
# # Create a client using the default configuration
|
177
|
+
# client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new
|
178
|
+
#
|
179
|
+
# # Create a client using a custom configuration
|
180
|
+
# client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config|
|
181
|
+
# config.timeout = 10.0
|
182
|
+
# end
|
183
|
+
#
|
184
|
+
# @yield [config] Configure the AutoMl client.
|
185
|
+
# @yieldparam config [Client::Configuration]
|
186
|
+
#
|
187
|
+
def initialize
|
188
|
+
# Create the configuration object
|
189
|
+
@config = Configuration.new Client.configure
|
190
|
+
|
191
|
+
# Yield the configuration if needed
|
192
|
+
yield @config if block_given?
|
193
|
+
|
194
|
+
# Create credentials
|
195
|
+
credentials = @config.credentials
|
196
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
197
|
+
# but only if the default endpoint does not have a region prefix.
|
198
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
199
|
+
!@config.endpoint.split(".").first.include?("-")
|
200
|
+
credentials ||= Credentials.default scope: @config.scope,
|
201
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
202
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
203
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
204
|
+
end
|
205
|
+
|
206
|
+
@quota_project_id = @config.quota_project
|
207
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
208
|
+
|
209
|
+
@operations_client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Operations.new do |config|
|
210
|
+
config.credentials = credentials
|
211
|
+
config.quota_project = @quota_project_id
|
212
|
+
config.endpoint = @config.endpoint
|
213
|
+
end
|
214
|
+
|
215
|
+
@auto_ml_stub = ::Google::Cloud::AutoML::V1::AutoML::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
216
|
+
end
|
217
|
+
|
218
|
+
##
|
219
|
+
# Get the associated client for long-running operations.
|
220
|
+
#
|
221
|
+
# @return [::Google::Cloud::AutoML::V1::AutoML::Rest::Operations]
|
222
|
+
#
|
223
|
+
attr_reader :operations_client
|
224
|
+
|
225
|
+
# Service calls
|
226
|
+
|
227
|
+
##
|
228
|
+
# Creates a dataset.
|
229
|
+
#
|
230
|
+
# @overload create_dataset(request, options = nil)
|
231
|
+
# Pass arguments to `create_dataset` via a request object, either of type
|
232
|
+
# {::Google::Cloud::AutoML::V1::CreateDatasetRequest} or an equivalent Hash.
|
233
|
+
#
|
234
|
+
# @param request [::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Hash]
|
235
|
+
# A request object representing the call parameters. Required. To specify no
|
236
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
237
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
238
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
239
|
+
#
|
240
|
+
# @overload create_dataset(parent: nil, dataset: nil)
|
241
|
+
# Pass arguments to `create_dataset` via keyword arguments. Note that at
|
242
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
243
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
244
|
+
#
|
245
|
+
# @param parent [::String]
|
246
|
+
# Required. The resource name of the project to create the dataset for.
|
247
|
+
# @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash]
|
248
|
+
# Required. The dataset to create.
|
249
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
250
|
+
# @yieldparam result [::Gapic::Operation]
|
251
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
252
|
+
#
|
253
|
+
# @return [::Gapic::Operation]
|
254
|
+
#
|
255
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
256
|
+
def create_dataset request, options = nil
|
257
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
258
|
+
|
259
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateDatasetRequest
|
260
|
+
|
261
|
+
# Converts hash and nil to an options object
|
262
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
263
|
+
|
264
|
+
# Customize the options with defaults
|
265
|
+
call_metadata = @config.rpcs.create_dataset.metadata.to_h
|
266
|
+
|
267
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
268
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
269
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
270
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
271
|
+
transports_version_send: [:rest]
|
272
|
+
|
273
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
274
|
+
|
275
|
+
options.apply_defaults timeout: @config.rpcs.create_dataset.timeout,
|
276
|
+
metadata: call_metadata,
|
277
|
+
retry_policy: @config.rpcs.create_dataset.retry_policy
|
278
|
+
|
279
|
+
options.apply_defaults timeout: @config.timeout,
|
280
|
+
metadata: @config.metadata,
|
281
|
+
retry_policy: @config.retry_policy
|
282
|
+
|
283
|
+
@auto_ml_stub.create_dataset request, options do |result, operation|
|
284
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
285
|
+
yield result, operation if block_given?
|
286
|
+
return result
|
287
|
+
end
|
288
|
+
rescue ::Gapic::Rest::Error => e
|
289
|
+
raise ::Google::Cloud::Error.from_error(e)
|
290
|
+
end
|
291
|
+
|
292
|
+
##
|
293
|
+
# Gets a dataset.
|
294
|
+
#
|
295
|
+
# @overload get_dataset(request, options = nil)
|
296
|
+
# Pass arguments to `get_dataset` via a request object, either of type
|
297
|
+
# {::Google::Cloud::AutoML::V1::GetDatasetRequest} or an equivalent Hash.
|
298
|
+
#
|
299
|
+
# @param request [::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Hash]
|
300
|
+
# A request object representing the call parameters. Required. To specify no
|
301
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
302
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
303
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
304
|
+
#
|
305
|
+
# @overload get_dataset(name: nil)
|
306
|
+
# Pass arguments to `get_dataset` via keyword arguments. Note that at
|
307
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
308
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
309
|
+
#
|
310
|
+
# @param name [::String]
|
311
|
+
# Required. The resource name of the dataset to retrieve.
|
312
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
313
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1::Dataset]
|
314
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
315
|
+
#
|
316
|
+
# @return [::Google::Cloud::AutoML::V1::Dataset]
|
317
|
+
#
|
318
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
319
|
+
def get_dataset request, options = nil
|
320
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
321
|
+
|
322
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetDatasetRequest
|
323
|
+
|
324
|
+
# Converts hash and nil to an options object
|
325
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
326
|
+
|
327
|
+
# Customize the options with defaults
|
328
|
+
call_metadata = @config.rpcs.get_dataset.metadata.to_h
|
329
|
+
|
330
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
331
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
332
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
333
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
334
|
+
transports_version_send: [:rest]
|
335
|
+
|
336
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
337
|
+
|
338
|
+
options.apply_defaults timeout: @config.rpcs.get_dataset.timeout,
|
339
|
+
metadata: call_metadata,
|
340
|
+
retry_policy: @config.rpcs.get_dataset.retry_policy
|
341
|
+
|
342
|
+
options.apply_defaults timeout: @config.timeout,
|
343
|
+
metadata: @config.metadata,
|
344
|
+
retry_policy: @config.retry_policy
|
345
|
+
|
346
|
+
@auto_ml_stub.get_dataset request, options do |result, operation|
|
347
|
+
yield result, operation if block_given?
|
348
|
+
return result
|
349
|
+
end
|
350
|
+
rescue ::Gapic::Rest::Error => e
|
351
|
+
raise ::Google::Cloud::Error.from_error(e)
|
352
|
+
end
|
353
|
+
|
354
|
+
##
|
355
|
+
# Lists datasets in a project.
|
356
|
+
#
|
357
|
+
# @overload list_datasets(request, options = nil)
|
358
|
+
# Pass arguments to `list_datasets` via a request object, either of type
|
359
|
+
# {::Google::Cloud::AutoML::V1::ListDatasetsRequest} or an equivalent Hash.
|
360
|
+
#
|
361
|
+
# @param request [::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Hash]
|
362
|
+
# A request object representing the call parameters. Required. To specify no
|
363
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
364
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
365
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
366
|
+
#
|
367
|
+
# @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
368
|
+
# Pass arguments to `list_datasets` via keyword arguments. Note that at
|
369
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
370
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
371
|
+
#
|
372
|
+
# @param parent [::String]
|
373
|
+
# Required. The resource name of the project from which to list datasets.
|
374
|
+
# @param filter [::String]
|
375
|
+
# An expression for filtering the results of the request.
|
376
|
+
#
|
377
|
+
# * `dataset_metadata` - for existence of the case (e.g.
|
378
|
+
# `image_classification_dataset_metadata:*`). Some examples of using the filter are:
|
379
|
+
#
|
380
|
+
# * `translation_dataset_metadata:*` --> The dataset has
|
381
|
+
# `translation_dataset_metadata`.
|
382
|
+
# @param page_size [::Integer]
|
383
|
+
# Requested page size. Server may return fewer results than requested.
|
384
|
+
# If unspecified, server will pick a default size.
|
385
|
+
# @param page_token [::String]
|
386
|
+
# A token identifying a page of results for the server to return
|
387
|
+
# Typically obtained via
|
388
|
+
# {::Google::Cloud::AutoML::V1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous
|
389
|
+
# {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call.
|
390
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
391
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>]
|
392
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
393
|
+
#
|
394
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Dataset>]
|
395
|
+
#
|
396
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
397
|
+
def list_datasets request, options = nil
|
398
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
399
|
+
|
400
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListDatasetsRequest
|
401
|
+
|
402
|
+
# Converts hash and nil to an options object
|
403
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
404
|
+
|
405
|
+
# Customize the options with defaults
|
406
|
+
call_metadata = @config.rpcs.list_datasets.metadata.to_h
|
407
|
+
|
408
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
409
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
410
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
411
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
412
|
+
transports_version_send: [:rest]
|
413
|
+
|
414
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
415
|
+
|
416
|
+
options.apply_defaults timeout: @config.rpcs.list_datasets.timeout,
|
417
|
+
metadata: call_metadata,
|
418
|
+
retry_policy: @config.rpcs.list_datasets.retry_policy
|
419
|
+
|
420
|
+
options.apply_defaults timeout: @config.timeout,
|
421
|
+
metadata: @config.metadata,
|
422
|
+
retry_policy: @config.retry_policy
|
423
|
+
|
424
|
+
@auto_ml_stub.list_datasets request, options do |result, operation|
|
425
|
+
result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, options
|
426
|
+
yield result, operation if block_given?
|
427
|
+
return result
|
428
|
+
end
|
429
|
+
rescue ::Gapic::Rest::Error => e
|
430
|
+
raise ::Google::Cloud::Error.from_error(e)
|
431
|
+
end
|
432
|
+
|
433
|
+
##
|
434
|
+
# Updates a dataset.
|
435
|
+
#
|
436
|
+
# @overload update_dataset(request, options = nil)
|
437
|
+
# Pass arguments to `update_dataset` via a request object, either of type
|
438
|
+
# {::Google::Cloud::AutoML::V1::UpdateDatasetRequest} or an equivalent Hash.
|
439
|
+
#
|
440
|
+
# @param request [::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Hash]
|
441
|
+
# A request object representing the call parameters. Required. To specify no
|
442
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
443
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
444
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
445
|
+
#
|
446
|
+
# @overload update_dataset(dataset: nil, update_mask: nil)
|
447
|
+
# Pass arguments to `update_dataset` via keyword arguments. Note that at
|
448
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
449
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
450
|
+
#
|
451
|
+
# @param dataset [::Google::Cloud::AutoML::V1::Dataset, ::Hash]
|
452
|
+
# Required. The dataset which replaces the resource on the server.
|
453
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
454
|
+
# Required. The update mask applies to the resource.
|
455
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
456
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1::Dataset]
|
457
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
458
|
+
#
|
459
|
+
# @return [::Google::Cloud::AutoML::V1::Dataset]
|
460
|
+
#
|
461
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
462
|
+
def update_dataset request, options = nil
|
463
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
464
|
+
|
465
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateDatasetRequest
|
466
|
+
|
467
|
+
# Converts hash and nil to an options object
|
468
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
469
|
+
|
470
|
+
# Customize the options with defaults
|
471
|
+
call_metadata = @config.rpcs.update_dataset.metadata.to_h
|
472
|
+
|
473
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
474
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
475
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
476
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
477
|
+
transports_version_send: [:rest]
|
478
|
+
|
479
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
480
|
+
|
481
|
+
options.apply_defaults timeout: @config.rpcs.update_dataset.timeout,
|
482
|
+
metadata: call_metadata,
|
483
|
+
retry_policy: @config.rpcs.update_dataset.retry_policy
|
484
|
+
|
485
|
+
options.apply_defaults timeout: @config.timeout,
|
486
|
+
metadata: @config.metadata,
|
487
|
+
retry_policy: @config.retry_policy
|
488
|
+
|
489
|
+
@auto_ml_stub.update_dataset request, options do |result, operation|
|
490
|
+
yield result, operation if block_given?
|
491
|
+
return result
|
492
|
+
end
|
493
|
+
rescue ::Gapic::Rest::Error => e
|
494
|
+
raise ::Google::Cloud::Error.from_error(e)
|
495
|
+
end
|
496
|
+
|
497
|
+
##
|
498
|
+
# Deletes a dataset and all of its contents.
|
499
|
+
# Returns empty response in the
|
500
|
+
# {::Google::Longrunning::Operation#response response} field when it completes,
|
501
|
+
# and `delete_details` in the
|
502
|
+
# {::Google::Longrunning::Operation#metadata metadata} field.
|
503
|
+
#
|
504
|
+
# @overload delete_dataset(request, options = nil)
|
505
|
+
# Pass arguments to `delete_dataset` via a request object, either of type
|
506
|
+
# {::Google::Cloud::AutoML::V1::DeleteDatasetRequest} or an equivalent Hash.
|
507
|
+
#
|
508
|
+
# @param request [::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Hash]
|
509
|
+
# A request object representing the call parameters. Required. To specify no
|
510
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
511
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
512
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
513
|
+
#
|
514
|
+
# @overload delete_dataset(name: nil)
|
515
|
+
# Pass arguments to `delete_dataset` via keyword arguments. Note that at
|
516
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
517
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
518
|
+
#
|
519
|
+
# @param name [::String]
|
520
|
+
# Required. The resource name of the dataset to delete.
|
521
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
522
|
+
# @yieldparam result [::Gapic::Operation]
|
523
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
524
|
+
#
|
525
|
+
# @return [::Gapic::Operation]
|
526
|
+
#
|
527
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
528
|
+
def delete_dataset request, options = nil
|
529
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
530
|
+
|
531
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteDatasetRequest
|
532
|
+
|
533
|
+
# Converts hash and nil to an options object
|
534
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
535
|
+
|
536
|
+
# Customize the options with defaults
|
537
|
+
call_metadata = @config.rpcs.delete_dataset.metadata.to_h
|
538
|
+
|
539
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
540
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
541
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
542
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
543
|
+
transports_version_send: [:rest]
|
544
|
+
|
545
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
546
|
+
|
547
|
+
options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout,
|
548
|
+
metadata: call_metadata,
|
549
|
+
retry_policy: @config.rpcs.delete_dataset.retry_policy
|
550
|
+
|
551
|
+
options.apply_defaults timeout: @config.timeout,
|
552
|
+
metadata: @config.metadata,
|
553
|
+
retry_policy: @config.retry_policy
|
554
|
+
|
555
|
+
@auto_ml_stub.delete_dataset request, options do |result, operation|
|
556
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
557
|
+
yield result, operation if block_given?
|
558
|
+
return result
|
559
|
+
end
|
560
|
+
rescue ::Gapic::Rest::Error => e
|
561
|
+
raise ::Google::Cloud::Error.from_error(e)
|
562
|
+
end
|
563
|
+
|
564
|
+
##
|
565
|
+
# Imports data into a dataset.
|
566
|
+
# For Tables this method can only be called on an empty Dataset.
|
567
|
+
#
|
568
|
+
# For Tables:
|
569
|
+
# * A
|
570
|
+
# {::Google::Cloud::AutoML::V1::InputConfig#params schema_inference_version}
|
571
|
+
# parameter must be explicitly set.
|
572
|
+
# Returns an empty response in the
|
573
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
574
|
+
#
|
575
|
+
# @overload import_data(request, options = nil)
|
576
|
+
# Pass arguments to `import_data` via a request object, either of type
|
577
|
+
# {::Google::Cloud::AutoML::V1::ImportDataRequest} or an equivalent Hash.
|
578
|
+
#
|
579
|
+
# @param request [::Google::Cloud::AutoML::V1::ImportDataRequest, ::Hash]
|
580
|
+
# A request object representing the call parameters. Required. To specify no
|
581
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
582
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
583
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
584
|
+
#
|
585
|
+
# @overload import_data(name: nil, input_config: nil)
|
586
|
+
# Pass arguments to `import_data` via keyword arguments. Note that at
|
587
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
588
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
589
|
+
#
|
590
|
+
# @param name [::String]
|
591
|
+
# Required. Dataset name. Dataset must already exist. All imported
|
592
|
+
# annotations and examples will be added.
|
593
|
+
# @param input_config [::Google::Cloud::AutoML::V1::InputConfig, ::Hash]
|
594
|
+
# Required. The desired input location and its domain specific semantics,
|
595
|
+
# if any.
|
596
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
597
|
+
# @yieldparam result [::Gapic::Operation]
|
598
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
599
|
+
#
|
600
|
+
# @return [::Gapic::Operation]
|
601
|
+
#
|
602
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
603
|
+
def import_data request, options = nil
|
604
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
605
|
+
|
606
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ImportDataRequest
|
607
|
+
|
608
|
+
# Converts hash and nil to an options object
|
609
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
610
|
+
|
611
|
+
# Customize the options with defaults
|
612
|
+
call_metadata = @config.rpcs.import_data.metadata.to_h
|
613
|
+
|
614
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
615
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
616
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
617
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
618
|
+
transports_version_send: [:rest]
|
619
|
+
|
620
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
621
|
+
|
622
|
+
options.apply_defaults timeout: @config.rpcs.import_data.timeout,
|
623
|
+
metadata: call_metadata,
|
624
|
+
retry_policy: @config.rpcs.import_data.retry_policy
|
625
|
+
|
626
|
+
options.apply_defaults timeout: @config.timeout,
|
627
|
+
metadata: @config.metadata,
|
628
|
+
retry_policy: @config.retry_policy
|
629
|
+
|
630
|
+
@auto_ml_stub.import_data request, options do |result, operation|
|
631
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
632
|
+
yield result, operation if block_given?
|
633
|
+
return result
|
634
|
+
end
|
635
|
+
rescue ::Gapic::Rest::Error => e
|
636
|
+
raise ::Google::Cloud::Error.from_error(e)
|
637
|
+
end
|
638
|
+
|
639
|
+
##
|
640
|
+
# Exports dataset's data to the provided output location.
|
641
|
+
# Returns an empty response in the
|
642
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
643
|
+
#
|
644
|
+
# @overload export_data(request, options = nil)
|
645
|
+
# Pass arguments to `export_data` via a request object, either of type
|
646
|
+
# {::Google::Cloud::AutoML::V1::ExportDataRequest} or an equivalent Hash.
|
647
|
+
#
|
648
|
+
# @param request [::Google::Cloud::AutoML::V1::ExportDataRequest, ::Hash]
|
649
|
+
# A request object representing the call parameters. Required. To specify no
|
650
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
651
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
652
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
653
|
+
#
|
654
|
+
# @overload export_data(name: nil, output_config: nil)
|
655
|
+
# Pass arguments to `export_data` via keyword arguments. Note that at
|
656
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
657
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
658
|
+
#
|
659
|
+
# @param name [::String]
|
660
|
+
# Required. The resource name of the dataset.
|
661
|
+
# @param output_config [::Google::Cloud::AutoML::V1::OutputConfig, ::Hash]
|
662
|
+
# Required. The desired output location.
|
663
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
664
|
+
# @yieldparam result [::Gapic::Operation]
|
665
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
666
|
+
#
|
667
|
+
# @return [::Gapic::Operation]
|
668
|
+
#
|
669
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
670
|
+
def export_data request, options = nil
|
671
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
672
|
+
|
673
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportDataRequest
|
674
|
+
|
675
|
+
# Converts hash and nil to an options object
|
676
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
677
|
+
|
678
|
+
# Customize the options with defaults
|
679
|
+
call_metadata = @config.rpcs.export_data.metadata.to_h
|
680
|
+
|
681
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
682
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
683
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
684
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
685
|
+
transports_version_send: [:rest]
|
686
|
+
|
687
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
688
|
+
|
689
|
+
options.apply_defaults timeout: @config.rpcs.export_data.timeout,
|
690
|
+
metadata: call_metadata,
|
691
|
+
retry_policy: @config.rpcs.export_data.retry_policy
|
692
|
+
|
693
|
+
options.apply_defaults timeout: @config.timeout,
|
694
|
+
metadata: @config.metadata,
|
695
|
+
retry_policy: @config.retry_policy
|
696
|
+
|
697
|
+
@auto_ml_stub.export_data request, options do |result, operation|
|
698
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
699
|
+
yield result, operation if block_given?
|
700
|
+
return result
|
701
|
+
end
|
702
|
+
rescue ::Gapic::Rest::Error => e
|
703
|
+
raise ::Google::Cloud::Error.from_error(e)
|
704
|
+
end
|
705
|
+
|
706
|
+
##
|
707
|
+
# Gets an annotation spec.
|
708
|
+
#
|
709
|
+
# @overload get_annotation_spec(request, options = nil)
|
710
|
+
# Pass arguments to `get_annotation_spec` via a request object, either of type
|
711
|
+
# {::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest} or an equivalent Hash.
|
712
|
+
#
|
713
|
+
# @param request [::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Hash]
|
714
|
+
# A request object representing the call parameters. Required. To specify no
|
715
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
716
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
717
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
718
|
+
#
|
719
|
+
# @overload get_annotation_spec(name: nil)
|
720
|
+
# Pass arguments to `get_annotation_spec` via keyword arguments. Note that at
|
721
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
722
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
723
|
+
#
|
724
|
+
# @param name [::String]
|
725
|
+
# Required. The resource name of the annotation spec to retrieve.
|
726
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
727
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1::AnnotationSpec]
|
728
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
729
|
+
#
|
730
|
+
# @return [::Google::Cloud::AutoML::V1::AnnotationSpec]
|
731
|
+
#
|
732
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
733
|
+
def get_annotation_spec request, options = nil
|
734
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
735
|
+
|
736
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest
|
737
|
+
|
738
|
+
# Converts hash and nil to an options object
|
739
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
740
|
+
|
741
|
+
# Customize the options with defaults
|
742
|
+
call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h
|
743
|
+
|
744
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
745
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
746
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
747
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
748
|
+
transports_version_send: [:rest]
|
749
|
+
|
750
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
751
|
+
|
752
|
+
options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout,
|
753
|
+
metadata: call_metadata,
|
754
|
+
retry_policy: @config.rpcs.get_annotation_spec.retry_policy
|
755
|
+
|
756
|
+
options.apply_defaults timeout: @config.timeout,
|
757
|
+
metadata: @config.metadata,
|
758
|
+
retry_policy: @config.retry_policy
|
759
|
+
|
760
|
+
@auto_ml_stub.get_annotation_spec request, options do |result, operation|
|
761
|
+
yield result, operation if block_given?
|
762
|
+
return result
|
763
|
+
end
|
764
|
+
rescue ::Gapic::Rest::Error => e
|
765
|
+
raise ::Google::Cloud::Error.from_error(e)
|
766
|
+
end
|
767
|
+
|
768
|
+
##
|
769
|
+
# Creates a model.
|
770
|
+
# Returns a Model in the {::Google::Longrunning::Operation#response response}
|
771
|
+
# field when it completes.
|
772
|
+
# When you create a model, several model evaluations are created for it:
|
773
|
+
# a global evaluation, and one evaluation for each annotation spec.
|
774
|
+
#
|
775
|
+
# @overload create_model(request, options = nil)
|
776
|
+
# Pass arguments to `create_model` via a request object, either of type
|
777
|
+
# {::Google::Cloud::AutoML::V1::CreateModelRequest} or an equivalent Hash.
|
778
|
+
#
|
779
|
+
# @param request [::Google::Cloud::AutoML::V1::CreateModelRequest, ::Hash]
|
780
|
+
# A request object representing the call parameters. Required. To specify no
|
781
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
782
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
783
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
784
|
+
#
|
785
|
+
# @overload create_model(parent: nil, model: nil)
|
786
|
+
# Pass arguments to `create_model` via keyword arguments. Note that at
|
787
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
788
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
789
|
+
#
|
790
|
+
# @param parent [::String]
|
791
|
+
# Required. Resource name of the parent project where the model is being created.
|
792
|
+
# @param model [::Google::Cloud::AutoML::V1::Model, ::Hash]
|
793
|
+
# Required. The model to create.
|
794
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
795
|
+
# @yieldparam result [::Gapic::Operation]
|
796
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
797
|
+
#
|
798
|
+
# @return [::Gapic::Operation]
|
799
|
+
#
|
800
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
801
|
+
def create_model request, options = nil
|
802
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
803
|
+
|
804
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::CreateModelRequest
|
805
|
+
|
806
|
+
# Converts hash and nil to an options object
|
807
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
808
|
+
|
809
|
+
# Customize the options with defaults
|
810
|
+
call_metadata = @config.rpcs.create_model.metadata.to_h
|
811
|
+
|
812
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
813
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
814
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
815
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
816
|
+
transports_version_send: [:rest]
|
817
|
+
|
818
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
819
|
+
|
820
|
+
options.apply_defaults timeout: @config.rpcs.create_model.timeout,
|
821
|
+
metadata: call_metadata,
|
822
|
+
retry_policy: @config.rpcs.create_model.retry_policy
|
823
|
+
|
824
|
+
options.apply_defaults timeout: @config.timeout,
|
825
|
+
metadata: @config.metadata,
|
826
|
+
retry_policy: @config.retry_policy
|
827
|
+
|
828
|
+
@auto_ml_stub.create_model request, options do |result, operation|
|
829
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
830
|
+
yield result, operation if block_given?
|
831
|
+
return result
|
832
|
+
end
|
833
|
+
rescue ::Gapic::Rest::Error => e
|
834
|
+
raise ::Google::Cloud::Error.from_error(e)
|
835
|
+
end
|
836
|
+
|
837
|
+
##
|
838
|
+
# Gets a model.
|
839
|
+
#
|
840
|
+
# @overload get_model(request, options = nil)
|
841
|
+
# Pass arguments to `get_model` via a request object, either of type
|
842
|
+
# {::Google::Cloud::AutoML::V1::GetModelRequest} or an equivalent Hash.
|
843
|
+
#
|
844
|
+
# @param request [::Google::Cloud::AutoML::V1::GetModelRequest, ::Hash]
|
845
|
+
# A request object representing the call parameters. Required. To specify no
|
846
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
847
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
848
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
849
|
+
#
|
850
|
+
# @overload get_model(name: nil)
|
851
|
+
# Pass arguments to `get_model` via keyword arguments. Note that at
|
852
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
853
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
854
|
+
#
|
855
|
+
# @param name [::String]
|
856
|
+
# Required. Resource name of the model.
|
857
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
858
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1::Model]
|
859
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
860
|
+
#
|
861
|
+
# @return [::Google::Cloud::AutoML::V1::Model]
|
862
|
+
#
|
863
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
864
|
+
def get_model request, options = nil
|
865
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
866
|
+
|
867
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelRequest
|
868
|
+
|
869
|
+
# Converts hash and nil to an options object
|
870
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
871
|
+
|
872
|
+
# Customize the options with defaults
|
873
|
+
call_metadata = @config.rpcs.get_model.metadata.to_h
|
874
|
+
|
875
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
876
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
877
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
878
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
879
|
+
transports_version_send: [:rest]
|
880
|
+
|
881
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
882
|
+
|
883
|
+
options.apply_defaults timeout: @config.rpcs.get_model.timeout,
|
884
|
+
metadata: call_metadata,
|
885
|
+
retry_policy: @config.rpcs.get_model.retry_policy
|
886
|
+
|
887
|
+
options.apply_defaults timeout: @config.timeout,
|
888
|
+
metadata: @config.metadata,
|
889
|
+
retry_policy: @config.retry_policy
|
890
|
+
|
891
|
+
@auto_ml_stub.get_model request, options do |result, operation|
|
892
|
+
yield result, operation if block_given?
|
893
|
+
return result
|
894
|
+
end
|
895
|
+
rescue ::Gapic::Rest::Error => e
|
896
|
+
raise ::Google::Cloud::Error.from_error(e)
|
897
|
+
end
|
898
|
+
|
899
|
+
##
|
900
|
+
# Lists models.
|
901
|
+
#
|
902
|
+
# @overload list_models(request, options = nil)
|
903
|
+
# Pass arguments to `list_models` via a request object, either of type
|
904
|
+
# {::Google::Cloud::AutoML::V1::ListModelsRequest} or an equivalent Hash.
|
905
|
+
#
|
906
|
+
# @param request [::Google::Cloud::AutoML::V1::ListModelsRequest, ::Hash]
|
907
|
+
# A request object representing the call parameters. Required. To specify no
|
908
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
909
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
910
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
911
|
+
#
|
912
|
+
# @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
913
|
+
# Pass arguments to `list_models` via keyword arguments. Note that at
|
914
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
915
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
916
|
+
#
|
917
|
+
# @param parent [::String]
|
918
|
+
# Required. Resource name of the project, from which to list the models.
|
919
|
+
# @param filter [::String]
|
920
|
+
# An expression for filtering the results of the request.
|
921
|
+
#
|
922
|
+
# * `model_metadata` - for existence of the case (e.g.
|
923
|
+
# `video_classification_model_metadata:*`).
|
924
|
+
# * `dataset_id` - for = or !=. Some examples of using the filter are:
|
925
|
+
#
|
926
|
+
# * `image_classification_model_metadata:*` --> The model has
|
927
|
+
# `image_classification_model_metadata`.
|
928
|
+
# * `dataset_id=5` --> The model was created from a dataset with ID 5.
|
929
|
+
# @param page_size [::Integer]
|
930
|
+
# Requested page size.
|
931
|
+
# @param page_token [::String]
|
932
|
+
# A token identifying a page of results for the server to return
|
933
|
+
# Typically obtained via
|
934
|
+
# {::Google::Cloud::AutoML::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous
|
935
|
+
# {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_models AutoMl.ListModels} call.
|
936
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
937
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>]
|
938
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
939
|
+
#
|
940
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::Model>]
|
941
|
+
#
|
942
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
943
|
+
def list_models request, options = nil
|
944
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
945
|
+
|
946
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelsRequest
|
947
|
+
|
948
|
+
# Converts hash and nil to an options object
|
949
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
950
|
+
|
951
|
+
# Customize the options with defaults
|
952
|
+
call_metadata = @config.rpcs.list_models.metadata.to_h
|
953
|
+
|
954
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
955
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
956
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
957
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
958
|
+
transports_version_send: [:rest]
|
959
|
+
|
960
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
961
|
+
|
962
|
+
options.apply_defaults timeout: @config.rpcs.list_models.timeout,
|
963
|
+
metadata: call_metadata,
|
964
|
+
retry_policy: @config.rpcs.list_models.retry_policy
|
965
|
+
|
966
|
+
options.apply_defaults timeout: @config.timeout,
|
967
|
+
metadata: @config.metadata,
|
968
|
+
retry_policy: @config.retry_policy
|
969
|
+
|
970
|
+
@auto_ml_stub.list_models request, options do |result, operation|
|
971
|
+
result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, options
|
972
|
+
yield result, operation if block_given?
|
973
|
+
return result
|
974
|
+
end
|
975
|
+
rescue ::Gapic::Rest::Error => e
|
976
|
+
raise ::Google::Cloud::Error.from_error(e)
|
977
|
+
end
|
978
|
+
|
979
|
+
##
|
980
|
+
# Deletes a model.
|
981
|
+
# Returns `google.protobuf.Empty` in the
|
982
|
+
# {::Google::Longrunning::Operation#response response} field when it completes,
|
983
|
+
# and `delete_details` in the
|
984
|
+
# {::Google::Longrunning::Operation#metadata metadata} field.
|
985
|
+
#
|
986
|
+
# @overload delete_model(request, options = nil)
|
987
|
+
# Pass arguments to `delete_model` via a request object, either of type
|
988
|
+
# {::Google::Cloud::AutoML::V1::DeleteModelRequest} or an equivalent Hash.
|
989
|
+
#
|
990
|
+
# @param request [::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Hash]
|
991
|
+
# A request object representing the call parameters. Required. To specify no
|
992
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
993
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
994
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
995
|
+
#
|
996
|
+
# @overload delete_model(name: nil)
|
997
|
+
# Pass arguments to `delete_model` via keyword arguments. Note that at
|
998
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
999
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1000
|
+
#
|
1001
|
+
# @param name [::String]
|
1002
|
+
# Required. Resource name of the model being deleted.
|
1003
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1004
|
+
# @yieldparam result [::Gapic::Operation]
|
1005
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1006
|
+
#
|
1007
|
+
# @return [::Gapic::Operation]
|
1008
|
+
#
|
1009
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1010
|
+
def delete_model request, options = nil
|
1011
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1012
|
+
|
1013
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeleteModelRequest
|
1014
|
+
|
1015
|
+
# Converts hash and nil to an options object
|
1016
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1017
|
+
|
1018
|
+
# Customize the options with defaults
|
1019
|
+
call_metadata = @config.rpcs.delete_model.metadata.to_h
|
1020
|
+
|
1021
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1022
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1023
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1024
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
1025
|
+
transports_version_send: [:rest]
|
1026
|
+
|
1027
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1028
|
+
|
1029
|
+
options.apply_defaults timeout: @config.rpcs.delete_model.timeout,
|
1030
|
+
metadata: call_metadata,
|
1031
|
+
retry_policy: @config.rpcs.delete_model.retry_policy
|
1032
|
+
|
1033
|
+
options.apply_defaults timeout: @config.timeout,
|
1034
|
+
metadata: @config.metadata,
|
1035
|
+
retry_policy: @config.retry_policy
|
1036
|
+
|
1037
|
+
@auto_ml_stub.delete_model request, options do |result, operation|
|
1038
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1039
|
+
yield result, operation if block_given?
|
1040
|
+
return result
|
1041
|
+
end
|
1042
|
+
rescue ::Gapic::Rest::Error => e
|
1043
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1044
|
+
end
|
1045
|
+
|
1046
|
+
##
|
1047
|
+
# Updates a model.
|
1048
|
+
#
|
1049
|
+
# @overload update_model(request, options = nil)
|
1050
|
+
# Pass arguments to `update_model` via a request object, either of type
|
1051
|
+
# {::Google::Cloud::AutoML::V1::UpdateModelRequest} or an equivalent Hash.
|
1052
|
+
#
|
1053
|
+
# @param request [::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Hash]
|
1054
|
+
# A request object representing the call parameters. Required. To specify no
|
1055
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1056
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1057
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1058
|
+
#
|
1059
|
+
# @overload update_model(model: nil, update_mask: nil)
|
1060
|
+
# Pass arguments to `update_model` via keyword arguments. Note that at
|
1061
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1062
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1063
|
+
#
|
1064
|
+
# @param model [::Google::Cloud::AutoML::V1::Model, ::Hash]
|
1065
|
+
# Required. The model which replaces the resource on the server.
|
1066
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1067
|
+
# Required. The update mask applies to the resource.
|
1068
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1069
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1::Model]
|
1070
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1071
|
+
#
|
1072
|
+
# @return [::Google::Cloud::AutoML::V1::Model]
|
1073
|
+
#
|
1074
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1075
|
+
def update_model request, options = nil
|
1076
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1077
|
+
|
1078
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UpdateModelRequest
|
1079
|
+
|
1080
|
+
# Converts hash and nil to an options object
|
1081
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1082
|
+
|
1083
|
+
# Customize the options with defaults
|
1084
|
+
call_metadata = @config.rpcs.update_model.metadata.to_h
|
1085
|
+
|
1086
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1087
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1088
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1089
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
1090
|
+
transports_version_send: [:rest]
|
1091
|
+
|
1092
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1093
|
+
|
1094
|
+
options.apply_defaults timeout: @config.rpcs.update_model.timeout,
|
1095
|
+
metadata: call_metadata,
|
1096
|
+
retry_policy: @config.rpcs.update_model.retry_policy
|
1097
|
+
|
1098
|
+
options.apply_defaults timeout: @config.timeout,
|
1099
|
+
metadata: @config.metadata,
|
1100
|
+
retry_policy: @config.retry_policy
|
1101
|
+
|
1102
|
+
@auto_ml_stub.update_model request, options do |result, operation|
|
1103
|
+
yield result, operation if block_given?
|
1104
|
+
return result
|
1105
|
+
end
|
1106
|
+
rescue ::Gapic::Rest::Error => e
|
1107
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1108
|
+
end
|
1109
|
+
|
1110
|
+
##
|
1111
|
+
# Deploys a model. If a model is already deployed, deploying it with the
|
1112
|
+
# same parameters has no effect. Deploying with different parametrs
|
1113
|
+
# (as e.g. changing
|
1114
|
+
# [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number])
|
1115
|
+
# will reset the deployment state without pausing the model's availability.
|
1116
|
+
#
|
1117
|
+
# Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage
|
1118
|
+
# deployment automatically.
|
1119
|
+
#
|
1120
|
+
# Returns an empty response in the
|
1121
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
1122
|
+
#
|
1123
|
+
# @overload deploy_model(request, options = nil)
|
1124
|
+
# Pass arguments to `deploy_model` via a request object, either of type
|
1125
|
+
# {::Google::Cloud::AutoML::V1::DeployModelRequest} or an equivalent Hash.
|
1126
|
+
#
|
1127
|
+
# @param request [::Google::Cloud::AutoML::V1::DeployModelRequest, ::Hash]
|
1128
|
+
# A request object representing the call parameters. Required. To specify no
|
1129
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1130
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1131
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1132
|
+
#
|
1133
|
+
# @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil)
|
1134
|
+
# Pass arguments to `deploy_model` via keyword arguments. Note that at
|
1135
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1136
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1137
|
+
#
|
1138
|
+
# @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageObjectDetectionModelDeploymentMetadata, ::Hash]
|
1139
|
+
# Model deployment metadata specific to Image Object Detection.
|
1140
|
+
# @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1::ImageClassificationModelDeploymentMetadata, ::Hash]
|
1141
|
+
# Model deployment metadata specific to Image Classification.
|
1142
|
+
# @param name [::String]
|
1143
|
+
# Required. Resource name of the model to deploy.
|
1144
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1145
|
+
# @yieldparam result [::Gapic::Operation]
|
1146
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1147
|
+
#
|
1148
|
+
# @return [::Gapic::Operation]
|
1149
|
+
#
|
1150
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1151
|
+
def deploy_model request, options = nil
|
1152
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1153
|
+
|
1154
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::DeployModelRequest
|
1155
|
+
|
1156
|
+
# Converts hash and nil to an options object
|
1157
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1158
|
+
|
1159
|
+
# Customize the options with defaults
|
1160
|
+
call_metadata = @config.rpcs.deploy_model.metadata.to_h
|
1161
|
+
|
1162
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1163
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1164
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1165
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
1166
|
+
transports_version_send: [:rest]
|
1167
|
+
|
1168
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1169
|
+
|
1170
|
+
options.apply_defaults timeout: @config.rpcs.deploy_model.timeout,
|
1171
|
+
metadata: call_metadata,
|
1172
|
+
retry_policy: @config.rpcs.deploy_model.retry_policy
|
1173
|
+
|
1174
|
+
options.apply_defaults timeout: @config.timeout,
|
1175
|
+
metadata: @config.metadata,
|
1176
|
+
retry_policy: @config.retry_policy
|
1177
|
+
|
1178
|
+
@auto_ml_stub.deploy_model request, options do |result, operation|
|
1179
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1180
|
+
yield result, operation if block_given?
|
1181
|
+
return result
|
1182
|
+
end
|
1183
|
+
rescue ::Gapic::Rest::Error => e
|
1184
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1185
|
+
end
|
1186
|
+
|
1187
|
+
##
|
1188
|
+
# Undeploys a model. If the model is not deployed this method has no effect.
|
1189
|
+
#
|
1190
|
+
# Only applicable for Text Classification, Image Object Detection and Tables;
|
1191
|
+
# all other domains manage deployment automatically.
|
1192
|
+
#
|
1193
|
+
# Returns an empty response in the
|
1194
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
1195
|
+
#
|
1196
|
+
# @overload undeploy_model(request, options = nil)
|
1197
|
+
# Pass arguments to `undeploy_model` via a request object, either of type
|
1198
|
+
# {::Google::Cloud::AutoML::V1::UndeployModelRequest} or an equivalent Hash.
|
1199
|
+
#
|
1200
|
+
# @param request [::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Hash]
|
1201
|
+
# A request object representing the call parameters. Required. To specify no
|
1202
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1203
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1204
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1205
|
+
#
|
1206
|
+
# @overload undeploy_model(name: nil)
|
1207
|
+
# Pass arguments to `undeploy_model` via keyword arguments. Note that at
|
1208
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1209
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1210
|
+
#
|
1211
|
+
# @param name [::String]
|
1212
|
+
# Required. Resource name of the model to undeploy.
|
1213
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1214
|
+
# @yieldparam result [::Gapic::Operation]
|
1215
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1216
|
+
#
|
1217
|
+
# @return [::Gapic::Operation]
|
1218
|
+
#
|
1219
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1220
|
+
def undeploy_model request, options = nil
|
1221
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1222
|
+
|
1223
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::UndeployModelRequest
|
1224
|
+
|
1225
|
+
# Converts hash and nil to an options object
|
1226
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1227
|
+
|
1228
|
+
# Customize the options with defaults
|
1229
|
+
call_metadata = @config.rpcs.undeploy_model.metadata.to_h
|
1230
|
+
|
1231
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1232
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1233
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1234
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
1235
|
+
transports_version_send: [:rest]
|
1236
|
+
|
1237
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1238
|
+
|
1239
|
+
options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout,
|
1240
|
+
metadata: call_metadata,
|
1241
|
+
retry_policy: @config.rpcs.undeploy_model.retry_policy
|
1242
|
+
|
1243
|
+
options.apply_defaults timeout: @config.timeout,
|
1244
|
+
metadata: @config.metadata,
|
1245
|
+
retry_policy: @config.retry_policy
|
1246
|
+
|
1247
|
+
@auto_ml_stub.undeploy_model request, options do |result, operation|
|
1248
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1249
|
+
yield result, operation if block_given?
|
1250
|
+
return result
|
1251
|
+
end
|
1252
|
+
rescue ::Gapic::Rest::Error => e
|
1253
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1254
|
+
end
|
1255
|
+
|
1256
|
+
##
|
1257
|
+
# Exports a trained, "export-able", model to a user specified Google Cloud
|
1258
|
+
# Storage location. A model is considered export-able if and only if it has
|
1259
|
+
# an export format defined for it in
|
1260
|
+
# {::Google::Cloud::AutoML::V1::ModelExportOutputConfig ModelExportOutputConfig}.
|
1261
|
+
#
|
1262
|
+
# Returns an empty response in the
|
1263
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
1264
|
+
#
|
1265
|
+
# @overload export_model(request, options = nil)
|
1266
|
+
# Pass arguments to `export_model` via a request object, either of type
|
1267
|
+
# {::Google::Cloud::AutoML::V1::ExportModelRequest} or an equivalent Hash.
|
1268
|
+
#
|
1269
|
+
# @param request [::Google::Cloud::AutoML::V1::ExportModelRequest, ::Hash]
|
1270
|
+
# A request object representing the call parameters. Required. To specify no
|
1271
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1272
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1273
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1274
|
+
#
|
1275
|
+
# @overload export_model(name: nil, output_config: nil)
|
1276
|
+
# Pass arguments to `export_model` via keyword arguments. Note that at
|
1277
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1278
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1279
|
+
#
|
1280
|
+
# @param name [::String]
|
1281
|
+
# Required. The resource name of the model to export.
|
1282
|
+
# @param output_config [::Google::Cloud::AutoML::V1::ModelExportOutputConfig, ::Hash]
|
1283
|
+
# Required. The desired output location and configuration.
|
1284
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1285
|
+
# @yieldparam result [::Gapic::Operation]
|
1286
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1287
|
+
#
|
1288
|
+
# @return [::Gapic::Operation]
|
1289
|
+
#
|
1290
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1291
|
+
def export_model request, options = nil
|
1292
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1293
|
+
|
1294
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ExportModelRequest
|
1295
|
+
|
1296
|
+
# Converts hash and nil to an options object
|
1297
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1298
|
+
|
1299
|
+
# Customize the options with defaults
|
1300
|
+
call_metadata = @config.rpcs.export_model.metadata.to_h
|
1301
|
+
|
1302
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1303
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1304
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1305
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
1306
|
+
transports_version_send: [:rest]
|
1307
|
+
|
1308
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1309
|
+
|
1310
|
+
options.apply_defaults timeout: @config.rpcs.export_model.timeout,
|
1311
|
+
metadata: call_metadata,
|
1312
|
+
retry_policy: @config.rpcs.export_model.retry_policy
|
1313
|
+
|
1314
|
+
options.apply_defaults timeout: @config.timeout,
|
1315
|
+
metadata: @config.metadata,
|
1316
|
+
retry_policy: @config.retry_policy
|
1317
|
+
|
1318
|
+
@auto_ml_stub.export_model request, options do |result, operation|
|
1319
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1320
|
+
yield result, operation if block_given?
|
1321
|
+
return result
|
1322
|
+
end
|
1323
|
+
rescue ::Gapic::Rest::Error => e
|
1324
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1325
|
+
end
|
1326
|
+
|
1327
|
+
##
|
1328
|
+
# Gets a model evaluation.
|
1329
|
+
#
|
1330
|
+
# @overload get_model_evaluation(request, options = nil)
|
1331
|
+
# Pass arguments to `get_model_evaluation` via a request object, either of type
|
1332
|
+
# {::Google::Cloud::AutoML::V1::GetModelEvaluationRequest} or an equivalent Hash.
|
1333
|
+
#
|
1334
|
+
# @param request [::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Hash]
|
1335
|
+
# A request object representing the call parameters. Required. To specify no
|
1336
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1337
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1338
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1339
|
+
#
|
1340
|
+
# @overload get_model_evaluation(name: nil)
|
1341
|
+
# Pass arguments to `get_model_evaluation` via keyword arguments. Note that at
|
1342
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1343
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1344
|
+
#
|
1345
|
+
# @param name [::String]
|
1346
|
+
# Required. Resource name for the model evaluation.
|
1347
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1348
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1::ModelEvaluation]
|
1349
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1350
|
+
#
|
1351
|
+
# @return [::Google::Cloud::AutoML::V1::ModelEvaluation]
|
1352
|
+
#
|
1353
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1354
|
+
def get_model_evaluation request, options = nil
|
1355
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1356
|
+
|
1357
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest
|
1358
|
+
|
1359
|
+
# Converts hash and nil to an options object
|
1360
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1361
|
+
|
1362
|
+
# Customize the options with defaults
|
1363
|
+
call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h
|
1364
|
+
|
1365
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1366
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1367
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1368
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
1369
|
+
transports_version_send: [:rest]
|
1370
|
+
|
1371
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1372
|
+
|
1373
|
+
options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout,
|
1374
|
+
metadata: call_metadata,
|
1375
|
+
retry_policy: @config.rpcs.get_model_evaluation.retry_policy
|
1376
|
+
|
1377
|
+
options.apply_defaults timeout: @config.timeout,
|
1378
|
+
metadata: @config.metadata,
|
1379
|
+
retry_policy: @config.retry_policy
|
1380
|
+
|
1381
|
+
@auto_ml_stub.get_model_evaluation request, options do |result, operation|
|
1382
|
+
yield result, operation if block_given?
|
1383
|
+
return result
|
1384
|
+
end
|
1385
|
+
rescue ::Gapic::Rest::Error => e
|
1386
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1387
|
+
end
|
1388
|
+
|
1389
|
+
##
|
1390
|
+
# Lists model evaluations.
|
1391
|
+
#
|
1392
|
+
# @overload list_model_evaluations(request, options = nil)
|
1393
|
+
# Pass arguments to `list_model_evaluations` via a request object, either of type
|
1394
|
+
# {::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest} or an equivalent Hash.
|
1395
|
+
#
|
1396
|
+
# @param request [::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Hash]
|
1397
|
+
# A request object representing the call parameters. Required. To specify no
|
1398
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1399
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1400
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1401
|
+
#
|
1402
|
+
# @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
1403
|
+
# Pass arguments to `list_model_evaluations` via keyword arguments. Note that at
|
1404
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1405
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1406
|
+
#
|
1407
|
+
# @param parent [::String]
|
1408
|
+
# Required. Resource name of the model to list the model evaluations for.
|
1409
|
+
# If modelId is set as "-", this will list model evaluations from across all
|
1410
|
+
# models of the parent location.
|
1411
|
+
# @param filter [::String]
|
1412
|
+
# Required. An expression for filtering the results of the request.
|
1413
|
+
#
|
1414
|
+
# * `annotation_spec_id` - for =, != or existence. See example below for
|
1415
|
+
# the last.
|
1416
|
+
#
|
1417
|
+
# Some examples of using the filter are:
|
1418
|
+
#
|
1419
|
+
# * `annotation_spec_id!=4` --> The model evaluation was done for
|
1420
|
+
# annotation spec with ID different than 4.
|
1421
|
+
# * `NOT annotation_spec_id:*` --> The model evaluation was done for
|
1422
|
+
# aggregate of all annotation specs.
|
1423
|
+
# @param page_size [::Integer]
|
1424
|
+
# Requested page size.
|
1425
|
+
# @param page_token [::String]
|
1426
|
+
# A token identifying a page of results for the server to return.
|
1427
|
+
# Typically obtained via
|
1428
|
+
# {::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous
|
1429
|
+
# {::Google::Cloud::AutoML::V1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call.
|
1430
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1431
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>]
|
1432
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1433
|
+
#
|
1434
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1::ModelEvaluation>]
|
1435
|
+
#
|
1436
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1437
|
+
def list_model_evaluations request, options = nil
|
1438
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1439
|
+
|
1440
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest
|
1441
|
+
|
1442
|
+
# Converts hash and nil to an options object
|
1443
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1444
|
+
|
1445
|
+
# Customize the options with defaults
|
1446
|
+
call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h
|
1447
|
+
|
1448
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1449
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1450
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1451
|
+
gapic_version: ::Google::Cloud::AutoML::V1::VERSION,
|
1452
|
+
transports_version_send: [:rest]
|
1453
|
+
|
1454
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1455
|
+
|
1456
|
+
options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout,
|
1457
|
+
metadata: call_metadata,
|
1458
|
+
retry_policy: @config.rpcs.list_model_evaluations.retry_policy
|
1459
|
+
|
1460
|
+
options.apply_defaults timeout: @config.timeout,
|
1461
|
+
metadata: @config.metadata,
|
1462
|
+
retry_policy: @config.retry_policy
|
1463
|
+
|
1464
|
+
@auto_ml_stub.list_model_evaluations request, options do |result, operation|
|
1465
|
+
result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, options
|
1466
|
+
yield result, operation if block_given?
|
1467
|
+
return result
|
1468
|
+
end
|
1469
|
+
rescue ::Gapic::Rest::Error => e
|
1470
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1471
|
+
end
|
1472
|
+
|
1473
|
+
##
|
1474
|
+
# Configuration class for the AutoMl REST API.
|
1475
|
+
#
|
1476
|
+
# This class represents the configuration for AutoMl REST,
|
1477
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1478
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1479
|
+
# applied individually to specific RPCs. See
|
1480
|
+
# {::Google::Cloud::AutoML::V1::AutoML::Rest::Client::Configuration::Rpcs}
|
1481
|
+
# for a list of RPCs that can be configured independently.
|
1482
|
+
#
|
1483
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1484
|
+
# on construction.
|
1485
|
+
#
|
1486
|
+
# @example
|
1487
|
+
#
|
1488
|
+
# # Modify the global config, setting the timeout for
|
1489
|
+
# # create_dataset to 20 seconds,
|
1490
|
+
# # and all remaining timeouts to 10 seconds.
|
1491
|
+
# ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.configure do |config|
|
1492
|
+
# config.timeout = 10.0
|
1493
|
+
# config.rpcs.create_dataset.timeout = 20.0
|
1494
|
+
# end
|
1495
|
+
#
|
1496
|
+
# # Apply the above configuration only to a new client.
|
1497
|
+
# client = ::Google::Cloud::AutoML::V1::AutoML::Rest::Client.new do |config|
|
1498
|
+
# config.timeout = 10.0
|
1499
|
+
# config.rpcs.create_dataset.timeout = 20.0
|
1500
|
+
# end
|
1501
|
+
#
|
1502
|
+
# @!attribute [rw] endpoint
|
1503
|
+
# The hostname or hostname:port of the service endpoint.
|
1504
|
+
# Defaults to `"automl.googleapis.com"`.
|
1505
|
+
# @return [::String]
|
1506
|
+
# @!attribute [rw] credentials
|
1507
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1508
|
+
# * (`String`) The path to a service account key file in JSON format
|
1509
|
+
# * (`Hash`) A service account key as a Hash
|
1510
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1511
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1512
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1513
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1514
|
+
# * (`nil`) indicating no credentials
|
1515
|
+
# @return [::Object]
|
1516
|
+
# @!attribute [rw] scope
|
1517
|
+
# The OAuth scopes
|
1518
|
+
# @return [::Array<::String>]
|
1519
|
+
# @!attribute [rw] lib_name
|
1520
|
+
# The library name as recorded in instrumentation and logging
|
1521
|
+
# @return [::String]
|
1522
|
+
# @!attribute [rw] lib_version
|
1523
|
+
# The library version as recorded in instrumentation and logging
|
1524
|
+
# @return [::String]
|
1525
|
+
# @!attribute [rw] timeout
|
1526
|
+
# The call timeout in seconds.
|
1527
|
+
# @return [::Numeric]
|
1528
|
+
# @!attribute [rw] metadata
|
1529
|
+
# Additional headers to be sent with the call.
|
1530
|
+
# @return [::Hash{::Symbol=>::String}]
|
1531
|
+
# @!attribute [rw] retry_policy
|
1532
|
+
# The retry policy. The value is a hash with the following keys:
|
1533
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1534
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1535
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1536
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1537
|
+
# trigger a retry.
|
1538
|
+
# @return [::Hash]
|
1539
|
+
# @!attribute [rw] quota_project
|
1540
|
+
# A separate project against which to charge quota.
|
1541
|
+
# @return [::String]
|
1542
|
+
#
|
1543
|
+
class Configuration
|
1544
|
+
extend ::Gapic::Config
|
1545
|
+
|
1546
|
+
config_attr :endpoint, "automl.googleapis.com", ::String
|
1547
|
+
config_attr :credentials, nil do |value|
|
1548
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1549
|
+
allowed.any? { |klass| klass === value }
|
1550
|
+
end
|
1551
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1552
|
+
config_attr :lib_name, nil, ::String, nil
|
1553
|
+
config_attr :lib_version, nil, ::String, nil
|
1554
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1555
|
+
config_attr :metadata, nil, ::Hash, nil
|
1556
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1557
|
+
config_attr :quota_project, nil, ::String, nil
|
1558
|
+
|
1559
|
+
# @private
|
1560
|
+
def initialize parent_config = nil
|
1561
|
+
@parent_config = parent_config unless parent_config.nil?
|
1562
|
+
|
1563
|
+
yield self if block_given?
|
1564
|
+
end
|
1565
|
+
|
1566
|
+
##
|
1567
|
+
# Configurations for individual RPCs
|
1568
|
+
# @return [Rpcs]
|
1569
|
+
#
|
1570
|
+
def rpcs
|
1571
|
+
@rpcs ||= begin
|
1572
|
+
parent_rpcs = nil
|
1573
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1574
|
+
Rpcs.new parent_rpcs
|
1575
|
+
end
|
1576
|
+
end
|
1577
|
+
|
1578
|
+
##
|
1579
|
+
# Configuration RPC class for the AutoMl API.
|
1580
|
+
#
|
1581
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1582
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1583
|
+
# the following configuration fields:
|
1584
|
+
#
|
1585
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1586
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
1587
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1588
|
+
# include the following keys:
|
1589
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1590
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1591
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1592
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1593
|
+
# trigger a retry.
|
1594
|
+
#
|
1595
|
+
class Rpcs
|
1596
|
+
##
|
1597
|
+
# RPC-specific configuration for `create_dataset`
|
1598
|
+
# @return [::Gapic::Config::Method]
|
1599
|
+
#
|
1600
|
+
attr_reader :create_dataset
|
1601
|
+
##
|
1602
|
+
# RPC-specific configuration for `get_dataset`
|
1603
|
+
# @return [::Gapic::Config::Method]
|
1604
|
+
#
|
1605
|
+
attr_reader :get_dataset
|
1606
|
+
##
|
1607
|
+
# RPC-specific configuration for `list_datasets`
|
1608
|
+
# @return [::Gapic::Config::Method]
|
1609
|
+
#
|
1610
|
+
attr_reader :list_datasets
|
1611
|
+
##
|
1612
|
+
# RPC-specific configuration for `update_dataset`
|
1613
|
+
# @return [::Gapic::Config::Method]
|
1614
|
+
#
|
1615
|
+
attr_reader :update_dataset
|
1616
|
+
##
|
1617
|
+
# RPC-specific configuration for `delete_dataset`
|
1618
|
+
# @return [::Gapic::Config::Method]
|
1619
|
+
#
|
1620
|
+
attr_reader :delete_dataset
|
1621
|
+
##
|
1622
|
+
# RPC-specific configuration for `import_data`
|
1623
|
+
# @return [::Gapic::Config::Method]
|
1624
|
+
#
|
1625
|
+
attr_reader :import_data
|
1626
|
+
##
|
1627
|
+
# RPC-specific configuration for `export_data`
|
1628
|
+
# @return [::Gapic::Config::Method]
|
1629
|
+
#
|
1630
|
+
attr_reader :export_data
|
1631
|
+
##
|
1632
|
+
# RPC-specific configuration for `get_annotation_spec`
|
1633
|
+
# @return [::Gapic::Config::Method]
|
1634
|
+
#
|
1635
|
+
attr_reader :get_annotation_spec
|
1636
|
+
##
|
1637
|
+
# RPC-specific configuration for `create_model`
|
1638
|
+
# @return [::Gapic::Config::Method]
|
1639
|
+
#
|
1640
|
+
attr_reader :create_model
|
1641
|
+
##
|
1642
|
+
# RPC-specific configuration for `get_model`
|
1643
|
+
# @return [::Gapic::Config::Method]
|
1644
|
+
#
|
1645
|
+
attr_reader :get_model
|
1646
|
+
##
|
1647
|
+
# RPC-specific configuration for `list_models`
|
1648
|
+
# @return [::Gapic::Config::Method]
|
1649
|
+
#
|
1650
|
+
attr_reader :list_models
|
1651
|
+
##
|
1652
|
+
# RPC-specific configuration for `delete_model`
|
1653
|
+
# @return [::Gapic::Config::Method]
|
1654
|
+
#
|
1655
|
+
attr_reader :delete_model
|
1656
|
+
##
|
1657
|
+
# RPC-specific configuration for `update_model`
|
1658
|
+
# @return [::Gapic::Config::Method]
|
1659
|
+
#
|
1660
|
+
attr_reader :update_model
|
1661
|
+
##
|
1662
|
+
# RPC-specific configuration for `deploy_model`
|
1663
|
+
# @return [::Gapic::Config::Method]
|
1664
|
+
#
|
1665
|
+
attr_reader :deploy_model
|
1666
|
+
##
|
1667
|
+
# RPC-specific configuration for `undeploy_model`
|
1668
|
+
# @return [::Gapic::Config::Method]
|
1669
|
+
#
|
1670
|
+
attr_reader :undeploy_model
|
1671
|
+
##
|
1672
|
+
# RPC-specific configuration for `export_model`
|
1673
|
+
# @return [::Gapic::Config::Method]
|
1674
|
+
#
|
1675
|
+
attr_reader :export_model
|
1676
|
+
##
|
1677
|
+
# RPC-specific configuration for `get_model_evaluation`
|
1678
|
+
# @return [::Gapic::Config::Method]
|
1679
|
+
#
|
1680
|
+
attr_reader :get_model_evaluation
|
1681
|
+
##
|
1682
|
+
# RPC-specific configuration for `list_model_evaluations`
|
1683
|
+
# @return [::Gapic::Config::Method]
|
1684
|
+
#
|
1685
|
+
attr_reader :list_model_evaluations
|
1686
|
+
|
1687
|
+
# @private
|
1688
|
+
def initialize parent_rpcs = nil
|
1689
|
+
create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset
|
1690
|
+
@create_dataset = ::Gapic::Config::Method.new create_dataset_config
|
1691
|
+
get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset
|
1692
|
+
@get_dataset = ::Gapic::Config::Method.new get_dataset_config
|
1693
|
+
list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets
|
1694
|
+
@list_datasets = ::Gapic::Config::Method.new list_datasets_config
|
1695
|
+
update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset
|
1696
|
+
@update_dataset = ::Gapic::Config::Method.new update_dataset_config
|
1697
|
+
delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset
|
1698
|
+
@delete_dataset = ::Gapic::Config::Method.new delete_dataset_config
|
1699
|
+
import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data
|
1700
|
+
@import_data = ::Gapic::Config::Method.new import_data_config
|
1701
|
+
export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data
|
1702
|
+
@export_data = ::Gapic::Config::Method.new export_data_config
|
1703
|
+
get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec
|
1704
|
+
@get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config
|
1705
|
+
create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model
|
1706
|
+
@create_model = ::Gapic::Config::Method.new create_model_config
|
1707
|
+
get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model
|
1708
|
+
@get_model = ::Gapic::Config::Method.new get_model_config
|
1709
|
+
list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models
|
1710
|
+
@list_models = ::Gapic::Config::Method.new list_models_config
|
1711
|
+
delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model
|
1712
|
+
@delete_model = ::Gapic::Config::Method.new delete_model_config
|
1713
|
+
update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model
|
1714
|
+
@update_model = ::Gapic::Config::Method.new update_model_config
|
1715
|
+
deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model
|
1716
|
+
@deploy_model = ::Gapic::Config::Method.new deploy_model_config
|
1717
|
+
undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model
|
1718
|
+
@undeploy_model = ::Gapic::Config::Method.new undeploy_model_config
|
1719
|
+
export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model
|
1720
|
+
@export_model = ::Gapic::Config::Method.new export_model_config
|
1721
|
+
get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation
|
1722
|
+
@get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config
|
1723
|
+
list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations
|
1724
|
+
@list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config
|
1725
|
+
|
1726
|
+
yield self if block_given?
|
1727
|
+
end
|
1728
|
+
end
|
1729
|
+
end
|
1730
|
+
end
|
1731
|
+
end
|
1732
|
+
end
|
1733
|
+
end
|
1734
|
+
end
|
1735
|
+
end
|
1736
|
+
end
|