google-cloud-automl-v1beta1 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +2 -2
- data/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb +0 -2
- data/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/automl/client.rb +56 -66
- data/lib/google/cloud/automl/v1beta1/automl/operations.rb +20 -14
- data/lib/google/cloud/automl/v1beta1/automl/rest/client.rb +2222 -0
- data/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb +935 -0
- data/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb +1475 -0
- data/lib/google/cloud/automl/v1beta1/automl/rest.rb +66 -0
- data/lib/google/cloud/automl/v1beta1/automl.rb +7 -1
- data/lib/google/cloud/automl/v1beta1/classification_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/column_spec_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/data_items_pb.rb +0 -3
- data/lib/google/cloud/automl/v1beta1/data_stats_pb.rb +0 -2
- data/lib/google/cloud/automl/v1beta1/data_types_pb.rb +0 -2
- data/lib/google/cloud/automl/v1beta1/dataset_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/detection_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/geometry_pb.rb +0 -2
- data/lib/google/cloud/automl/v1beta1/image_pb.rb +0 -3
- data/lib/google/cloud/automl/v1beta1/io_pb.rb +0 -2
- data/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/model_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/operations_pb.rb +0 -2
- data/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +4 -4
- data/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +20 -14
- data/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb +563 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb +935 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb +168 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb +56 -0
- data/lib/google/cloud/automl/v1beta1/prediction_service.rb +7 -1
- data/lib/google/cloud/automl/v1beta1/ranges_pb.rb +0 -2
- data/lib/google/cloud/automl/v1beta1/regression_pb.rb +0 -2
- data/lib/google/cloud/automl/v1beta1/rest.rb +38 -0
- data/lib/google/cloud/automl/v1beta1/table_spec_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/tables_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/temporal_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/text_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/text_segment_pb.rb +0 -2
- data/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/translation_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1/version.rb +1 -1
- data/lib/google/cloud/automl/v1beta1/video_pb.rb +0 -1
- data/lib/google/cloud/automl/v1beta1.rb +7 -2
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +20 -8
@@ -0,0 +1,2222 @@
|
|
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/v1beta1/service_pb"
|
21
|
+
require "google/cloud/automl/v1beta1/automl/rest/service_stub"
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module AutoML
|
26
|
+
module V1beta1
|
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 kebab-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::V1beta1::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::V1beta1::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", "V1beta1"]
|
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: [14, 4]
|
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: [14, 4]
|
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: [14, 4]
|
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: [14, 4]
|
108
|
+
}
|
109
|
+
|
110
|
+
default_config.rpcs.get_table_spec.timeout = 5.0
|
111
|
+
default_config.rpcs.get_table_spec.retry_policy = {
|
112
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
113
|
+
}
|
114
|
+
|
115
|
+
default_config.rpcs.list_table_specs.timeout = 5.0
|
116
|
+
default_config.rpcs.list_table_specs.retry_policy = {
|
117
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
118
|
+
}
|
119
|
+
|
120
|
+
default_config.rpcs.update_table_spec.timeout = 5.0
|
121
|
+
|
122
|
+
default_config.rpcs.get_column_spec.timeout = 5.0
|
123
|
+
default_config.rpcs.get_column_spec.retry_policy = {
|
124
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
125
|
+
}
|
126
|
+
|
127
|
+
default_config.rpcs.list_column_specs.timeout = 5.0
|
128
|
+
default_config.rpcs.list_column_specs.retry_policy = {
|
129
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
130
|
+
}
|
131
|
+
|
132
|
+
default_config.rpcs.update_column_spec.timeout = 5.0
|
133
|
+
|
134
|
+
default_config.rpcs.create_model.timeout = 5.0
|
135
|
+
|
136
|
+
default_config.rpcs.get_model.timeout = 5.0
|
137
|
+
default_config.rpcs.get_model.retry_policy = {
|
138
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
139
|
+
}
|
140
|
+
|
141
|
+
default_config.rpcs.list_models.timeout = 5.0
|
142
|
+
default_config.rpcs.list_models.retry_policy = {
|
143
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
144
|
+
}
|
145
|
+
|
146
|
+
default_config.rpcs.delete_model.timeout = 5.0
|
147
|
+
default_config.rpcs.delete_model.retry_policy = {
|
148
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
149
|
+
}
|
150
|
+
|
151
|
+
default_config.rpcs.deploy_model.timeout = 5.0
|
152
|
+
|
153
|
+
default_config.rpcs.undeploy_model.timeout = 5.0
|
154
|
+
|
155
|
+
default_config.rpcs.export_model.timeout = 5.0
|
156
|
+
|
157
|
+
default_config.rpcs.export_evaluated_examples.timeout = 5.0
|
158
|
+
|
159
|
+
default_config.rpcs.get_model_evaluation.timeout = 5.0
|
160
|
+
default_config.rpcs.get_model_evaluation.retry_policy = {
|
161
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
162
|
+
}
|
163
|
+
|
164
|
+
default_config.rpcs.list_model_evaluations.timeout = 5.0
|
165
|
+
|
166
|
+
default_config
|
167
|
+
end
|
168
|
+
yield @configure if block_given?
|
169
|
+
@configure
|
170
|
+
end
|
171
|
+
|
172
|
+
##
|
173
|
+
# Configure the AutoMl Client instance.
|
174
|
+
#
|
175
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
176
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
177
|
+
# should be made on {Client.configure}.
|
178
|
+
#
|
179
|
+
# See {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration}
|
180
|
+
# for a description of the configuration fields.
|
181
|
+
#
|
182
|
+
# @yield [config] Configure the Client client.
|
183
|
+
# @yieldparam config [Client::Configuration]
|
184
|
+
#
|
185
|
+
# @return [Client::Configuration]
|
186
|
+
#
|
187
|
+
def configure
|
188
|
+
yield @config if block_given?
|
189
|
+
@config
|
190
|
+
end
|
191
|
+
|
192
|
+
##
|
193
|
+
# Create a new AutoMl REST client object.
|
194
|
+
#
|
195
|
+
# @example
|
196
|
+
#
|
197
|
+
# # Create a client using the default configuration
|
198
|
+
# client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new
|
199
|
+
#
|
200
|
+
# # Create a client using a custom configuration
|
201
|
+
# client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config|
|
202
|
+
# config.timeout = 10.0
|
203
|
+
# end
|
204
|
+
#
|
205
|
+
# @yield [config] Configure the AutoMl client.
|
206
|
+
# @yieldparam config [Client::Configuration]
|
207
|
+
#
|
208
|
+
def initialize
|
209
|
+
# Create the configuration object
|
210
|
+
@config = Configuration.new Client.configure
|
211
|
+
|
212
|
+
# Yield the configuration if needed
|
213
|
+
yield @config if block_given?
|
214
|
+
|
215
|
+
# Create credentials
|
216
|
+
credentials = @config.credentials
|
217
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
218
|
+
# but only if the default endpoint does not have a region prefix.
|
219
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
220
|
+
!@config.endpoint.split(".").first.include?("-")
|
221
|
+
credentials ||= Credentials.default scope: @config.scope,
|
222
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
223
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
224
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
225
|
+
end
|
226
|
+
|
227
|
+
@quota_project_id = @config.quota_project
|
228
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
229
|
+
|
230
|
+
@operations_client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Operations.new do |config|
|
231
|
+
config.credentials = credentials
|
232
|
+
config.quota_project = @quota_project_id
|
233
|
+
config.endpoint = @config.endpoint
|
234
|
+
end
|
235
|
+
|
236
|
+
@auto_ml_stub = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
237
|
+
end
|
238
|
+
|
239
|
+
##
|
240
|
+
# Get the associated client for long-running operations.
|
241
|
+
#
|
242
|
+
# @return [::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Operations]
|
243
|
+
#
|
244
|
+
attr_reader :operations_client
|
245
|
+
|
246
|
+
# Service calls
|
247
|
+
|
248
|
+
##
|
249
|
+
# Creates a dataset.
|
250
|
+
#
|
251
|
+
# @overload create_dataset(request, options = nil)
|
252
|
+
# Pass arguments to `create_dataset` via a request object, either of type
|
253
|
+
# {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash.
|
254
|
+
#
|
255
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash]
|
256
|
+
# A request object representing the call parameters. Required. To specify no
|
257
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
258
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
259
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
260
|
+
#
|
261
|
+
# @overload create_dataset(parent: nil, dataset: nil)
|
262
|
+
# Pass arguments to `create_dataset` via keyword arguments. Note that at
|
263
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
264
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
265
|
+
#
|
266
|
+
# @param parent [::String]
|
267
|
+
# Required. The resource name of the project to create the dataset for.
|
268
|
+
# @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash]
|
269
|
+
# Required. The dataset to create.
|
270
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
271
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset]
|
272
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
273
|
+
#
|
274
|
+
# @return [::Google::Cloud::AutoML::V1beta1::Dataset]
|
275
|
+
#
|
276
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
277
|
+
def create_dataset request, options = nil
|
278
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
279
|
+
|
280
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest
|
281
|
+
|
282
|
+
# Converts hash and nil to an options object
|
283
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
284
|
+
|
285
|
+
# Customize the options with defaults
|
286
|
+
call_metadata = @config.rpcs.create_dataset.metadata.to_h
|
287
|
+
|
288
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
289
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
290
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
291
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
292
|
+
transports_version_send: [:rest]
|
293
|
+
|
294
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
295
|
+
|
296
|
+
options.apply_defaults timeout: @config.rpcs.create_dataset.timeout,
|
297
|
+
metadata: call_metadata,
|
298
|
+
retry_policy: @config.rpcs.create_dataset.retry_policy
|
299
|
+
|
300
|
+
options.apply_defaults timeout: @config.timeout,
|
301
|
+
metadata: @config.metadata,
|
302
|
+
retry_policy: @config.retry_policy
|
303
|
+
|
304
|
+
@auto_ml_stub.create_dataset request, options do |result, operation|
|
305
|
+
yield result, operation if block_given?
|
306
|
+
return result
|
307
|
+
end
|
308
|
+
rescue ::Gapic::Rest::Error => e
|
309
|
+
raise ::Google::Cloud::Error.from_error(e)
|
310
|
+
end
|
311
|
+
|
312
|
+
##
|
313
|
+
# Gets a dataset.
|
314
|
+
#
|
315
|
+
# @overload get_dataset(request, options = nil)
|
316
|
+
# Pass arguments to `get_dataset` via a request object, either of type
|
317
|
+
# {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash.
|
318
|
+
#
|
319
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash]
|
320
|
+
# A request object representing the call parameters. Required. To specify no
|
321
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
322
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
323
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
324
|
+
#
|
325
|
+
# @overload get_dataset(name: nil)
|
326
|
+
# Pass arguments to `get_dataset` via keyword arguments. Note that at
|
327
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
328
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
329
|
+
#
|
330
|
+
# @param name [::String]
|
331
|
+
# Required. The resource name of the dataset to retrieve.
|
332
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
333
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset]
|
334
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
335
|
+
#
|
336
|
+
# @return [::Google::Cloud::AutoML::V1beta1::Dataset]
|
337
|
+
#
|
338
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
339
|
+
def get_dataset request, options = nil
|
340
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
341
|
+
|
342
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest
|
343
|
+
|
344
|
+
# Converts hash and nil to an options object
|
345
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
346
|
+
|
347
|
+
# Customize the options with defaults
|
348
|
+
call_metadata = @config.rpcs.get_dataset.metadata.to_h
|
349
|
+
|
350
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
351
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
352
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
353
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
354
|
+
transports_version_send: [:rest]
|
355
|
+
|
356
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
357
|
+
|
358
|
+
options.apply_defaults timeout: @config.rpcs.get_dataset.timeout,
|
359
|
+
metadata: call_metadata,
|
360
|
+
retry_policy: @config.rpcs.get_dataset.retry_policy
|
361
|
+
|
362
|
+
options.apply_defaults timeout: @config.timeout,
|
363
|
+
metadata: @config.metadata,
|
364
|
+
retry_policy: @config.retry_policy
|
365
|
+
|
366
|
+
@auto_ml_stub.get_dataset request, options do |result, operation|
|
367
|
+
yield result, operation if block_given?
|
368
|
+
return result
|
369
|
+
end
|
370
|
+
rescue ::Gapic::Rest::Error => e
|
371
|
+
raise ::Google::Cloud::Error.from_error(e)
|
372
|
+
end
|
373
|
+
|
374
|
+
##
|
375
|
+
# Lists datasets in a project.
|
376
|
+
#
|
377
|
+
# @overload list_datasets(request, options = nil)
|
378
|
+
# Pass arguments to `list_datasets` via a request object, either of type
|
379
|
+
# {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash.
|
380
|
+
#
|
381
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash]
|
382
|
+
# A request object representing the call parameters. Required. To specify no
|
383
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
384
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
385
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
386
|
+
#
|
387
|
+
# @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
388
|
+
# Pass arguments to `list_datasets` via keyword arguments. Note that at
|
389
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
390
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
391
|
+
#
|
392
|
+
# @param parent [::String]
|
393
|
+
# Required. The resource name of the project from which to list datasets.
|
394
|
+
# @param filter [::String]
|
395
|
+
# An expression for filtering the results of the request.
|
396
|
+
#
|
397
|
+
# * `dataset_metadata` - for existence of the case (e.g.
|
398
|
+
# `image_classification_dataset_metadata:*`). Some examples of
|
399
|
+
# using the filter are:
|
400
|
+
#
|
401
|
+
# * `translation_dataset_metadata:*` --> The dataset has
|
402
|
+
# `translation_dataset_metadata`.
|
403
|
+
# @param page_size [::Integer]
|
404
|
+
# Requested page size. Server may return fewer results than requested.
|
405
|
+
# If unspecified, server will pick a default size.
|
406
|
+
# @param page_token [::String]
|
407
|
+
# A token identifying a page of results for the server to return
|
408
|
+
# Typically obtained via
|
409
|
+
# {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous
|
410
|
+
# {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call.
|
411
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
412
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>]
|
413
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
414
|
+
#
|
415
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>]
|
416
|
+
#
|
417
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
418
|
+
def list_datasets request, options = nil
|
419
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
420
|
+
|
421
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest
|
422
|
+
|
423
|
+
# Converts hash and nil to an options object
|
424
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
425
|
+
|
426
|
+
# Customize the options with defaults
|
427
|
+
call_metadata = @config.rpcs.list_datasets.metadata.to_h
|
428
|
+
|
429
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
430
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
431
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
432
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
433
|
+
transports_version_send: [:rest]
|
434
|
+
|
435
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
436
|
+
|
437
|
+
options.apply_defaults timeout: @config.rpcs.list_datasets.timeout,
|
438
|
+
metadata: call_metadata,
|
439
|
+
retry_policy: @config.rpcs.list_datasets.retry_policy
|
440
|
+
|
441
|
+
options.apply_defaults timeout: @config.timeout,
|
442
|
+
metadata: @config.metadata,
|
443
|
+
retry_policy: @config.retry_policy
|
444
|
+
|
445
|
+
@auto_ml_stub.list_datasets request, options do |result, operation|
|
446
|
+
result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, options
|
447
|
+
yield result, operation if block_given?
|
448
|
+
return result
|
449
|
+
end
|
450
|
+
rescue ::Gapic::Rest::Error => e
|
451
|
+
raise ::Google::Cloud::Error.from_error(e)
|
452
|
+
end
|
453
|
+
|
454
|
+
##
|
455
|
+
# Updates a dataset.
|
456
|
+
#
|
457
|
+
# @overload update_dataset(request, options = nil)
|
458
|
+
# Pass arguments to `update_dataset` via a request object, either of type
|
459
|
+
# {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash.
|
460
|
+
#
|
461
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash]
|
462
|
+
# A request object representing the call parameters. Required. To specify no
|
463
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
464
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
465
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
466
|
+
#
|
467
|
+
# @overload update_dataset(dataset: nil, update_mask: nil)
|
468
|
+
# Pass arguments to `update_dataset` via keyword arguments. Note that at
|
469
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
470
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
471
|
+
#
|
472
|
+
# @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash]
|
473
|
+
# Required. The dataset which replaces the resource on the server.
|
474
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
475
|
+
# The update mask applies to the resource.
|
476
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
477
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset]
|
478
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
479
|
+
#
|
480
|
+
# @return [::Google::Cloud::AutoML::V1beta1::Dataset]
|
481
|
+
#
|
482
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
483
|
+
def update_dataset request, options = nil
|
484
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
485
|
+
|
486
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest
|
487
|
+
|
488
|
+
# Converts hash and nil to an options object
|
489
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
490
|
+
|
491
|
+
# Customize the options with defaults
|
492
|
+
call_metadata = @config.rpcs.update_dataset.metadata.to_h
|
493
|
+
|
494
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
495
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
496
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
497
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
498
|
+
transports_version_send: [:rest]
|
499
|
+
|
500
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
501
|
+
|
502
|
+
options.apply_defaults timeout: @config.rpcs.update_dataset.timeout,
|
503
|
+
metadata: call_metadata,
|
504
|
+
retry_policy: @config.rpcs.update_dataset.retry_policy
|
505
|
+
|
506
|
+
options.apply_defaults timeout: @config.timeout,
|
507
|
+
metadata: @config.metadata,
|
508
|
+
retry_policy: @config.retry_policy
|
509
|
+
|
510
|
+
@auto_ml_stub.update_dataset request, options do |result, operation|
|
511
|
+
yield result, operation if block_given?
|
512
|
+
return result
|
513
|
+
end
|
514
|
+
rescue ::Gapic::Rest::Error => e
|
515
|
+
raise ::Google::Cloud::Error.from_error(e)
|
516
|
+
end
|
517
|
+
|
518
|
+
##
|
519
|
+
# Deletes a dataset and all of its contents.
|
520
|
+
# Returns empty response in the
|
521
|
+
# {::Google::Longrunning::Operation#response response} field when it completes,
|
522
|
+
# and `delete_details` in the
|
523
|
+
# {::Google::Longrunning::Operation#metadata metadata} field.
|
524
|
+
#
|
525
|
+
# @overload delete_dataset(request, options = nil)
|
526
|
+
# Pass arguments to `delete_dataset` via a request object, either of type
|
527
|
+
# {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash.
|
528
|
+
#
|
529
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash]
|
530
|
+
# A request object representing the call parameters. Required. To specify no
|
531
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
532
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
533
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
534
|
+
#
|
535
|
+
# @overload delete_dataset(name: nil)
|
536
|
+
# Pass arguments to `delete_dataset` via keyword arguments. Note that at
|
537
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
538
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
539
|
+
#
|
540
|
+
# @param name [::String]
|
541
|
+
# Required. The resource name of the dataset to delete.
|
542
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
543
|
+
# @yieldparam result [::Gapic::Operation]
|
544
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
545
|
+
#
|
546
|
+
# @return [::Gapic::Operation]
|
547
|
+
#
|
548
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
549
|
+
def delete_dataset request, options = nil
|
550
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
551
|
+
|
552
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest
|
553
|
+
|
554
|
+
# Converts hash and nil to an options object
|
555
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
556
|
+
|
557
|
+
# Customize the options with defaults
|
558
|
+
call_metadata = @config.rpcs.delete_dataset.metadata.to_h
|
559
|
+
|
560
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
561
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
562
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
563
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
564
|
+
transports_version_send: [:rest]
|
565
|
+
|
566
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
567
|
+
|
568
|
+
options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout,
|
569
|
+
metadata: call_metadata,
|
570
|
+
retry_policy: @config.rpcs.delete_dataset.retry_policy
|
571
|
+
|
572
|
+
options.apply_defaults timeout: @config.timeout,
|
573
|
+
metadata: @config.metadata,
|
574
|
+
retry_policy: @config.retry_policy
|
575
|
+
|
576
|
+
@auto_ml_stub.delete_dataset request, options do |result, operation|
|
577
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
578
|
+
yield result, operation if block_given?
|
579
|
+
return result
|
580
|
+
end
|
581
|
+
rescue ::Gapic::Rest::Error => e
|
582
|
+
raise ::Google::Cloud::Error.from_error(e)
|
583
|
+
end
|
584
|
+
|
585
|
+
##
|
586
|
+
# Imports data into a dataset.
|
587
|
+
# For Tables this method can only be called on an empty Dataset.
|
588
|
+
#
|
589
|
+
# For Tables:
|
590
|
+
# * A
|
591
|
+
# {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version}
|
592
|
+
# parameter must be explicitly set.
|
593
|
+
# Returns an empty response in the
|
594
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
595
|
+
#
|
596
|
+
# @overload import_data(request, options = nil)
|
597
|
+
# Pass arguments to `import_data` via a request object, either of type
|
598
|
+
# {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash.
|
599
|
+
#
|
600
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash]
|
601
|
+
# A request object representing the call parameters. Required. To specify no
|
602
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
603
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
604
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
605
|
+
#
|
606
|
+
# @overload import_data(name: nil, input_config: nil)
|
607
|
+
# Pass arguments to `import_data` via keyword arguments. Note that at
|
608
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
609
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
610
|
+
#
|
611
|
+
# @param name [::String]
|
612
|
+
# Required. Dataset name. Dataset must already exist. All imported
|
613
|
+
# annotations and examples will be added.
|
614
|
+
# @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash]
|
615
|
+
# Required. The desired input location and its domain specific semantics,
|
616
|
+
# if any.
|
617
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
618
|
+
# @yieldparam result [::Gapic::Operation]
|
619
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
620
|
+
#
|
621
|
+
# @return [::Gapic::Operation]
|
622
|
+
#
|
623
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
624
|
+
def import_data request, options = nil
|
625
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
626
|
+
|
627
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest
|
628
|
+
|
629
|
+
# Converts hash and nil to an options object
|
630
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
631
|
+
|
632
|
+
# Customize the options with defaults
|
633
|
+
call_metadata = @config.rpcs.import_data.metadata.to_h
|
634
|
+
|
635
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
636
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
637
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
638
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
639
|
+
transports_version_send: [:rest]
|
640
|
+
|
641
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
642
|
+
|
643
|
+
options.apply_defaults timeout: @config.rpcs.import_data.timeout,
|
644
|
+
metadata: call_metadata,
|
645
|
+
retry_policy: @config.rpcs.import_data.retry_policy
|
646
|
+
|
647
|
+
options.apply_defaults timeout: @config.timeout,
|
648
|
+
metadata: @config.metadata,
|
649
|
+
retry_policy: @config.retry_policy
|
650
|
+
|
651
|
+
@auto_ml_stub.import_data request, options do |result, operation|
|
652
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
653
|
+
yield result, operation if block_given?
|
654
|
+
return result
|
655
|
+
end
|
656
|
+
rescue ::Gapic::Rest::Error => e
|
657
|
+
raise ::Google::Cloud::Error.from_error(e)
|
658
|
+
end
|
659
|
+
|
660
|
+
##
|
661
|
+
# Exports dataset's data to the provided output location.
|
662
|
+
# Returns an empty response in the
|
663
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
664
|
+
#
|
665
|
+
# @overload export_data(request, options = nil)
|
666
|
+
# Pass arguments to `export_data` via a request object, either of type
|
667
|
+
# {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash.
|
668
|
+
#
|
669
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash]
|
670
|
+
# A request object representing the call parameters. Required. To specify no
|
671
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
672
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
673
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
674
|
+
#
|
675
|
+
# @overload export_data(name: nil, output_config: nil)
|
676
|
+
# Pass arguments to `export_data` via keyword arguments. Note that at
|
677
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
678
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
679
|
+
#
|
680
|
+
# @param name [::String]
|
681
|
+
# Required. The resource name of the dataset.
|
682
|
+
# @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash]
|
683
|
+
# Required. The desired output location.
|
684
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
685
|
+
# @yieldparam result [::Gapic::Operation]
|
686
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
687
|
+
#
|
688
|
+
# @return [::Gapic::Operation]
|
689
|
+
#
|
690
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
691
|
+
def export_data request, options = nil
|
692
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
693
|
+
|
694
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest
|
695
|
+
|
696
|
+
# Converts hash and nil to an options object
|
697
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
698
|
+
|
699
|
+
# Customize the options with defaults
|
700
|
+
call_metadata = @config.rpcs.export_data.metadata.to_h
|
701
|
+
|
702
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
703
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
704
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
705
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
706
|
+
transports_version_send: [:rest]
|
707
|
+
|
708
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
709
|
+
|
710
|
+
options.apply_defaults timeout: @config.rpcs.export_data.timeout,
|
711
|
+
metadata: call_metadata,
|
712
|
+
retry_policy: @config.rpcs.export_data.retry_policy
|
713
|
+
|
714
|
+
options.apply_defaults timeout: @config.timeout,
|
715
|
+
metadata: @config.metadata,
|
716
|
+
retry_policy: @config.retry_policy
|
717
|
+
|
718
|
+
@auto_ml_stub.export_data request, options do |result, operation|
|
719
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
720
|
+
yield result, operation if block_given?
|
721
|
+
return result
|
722
|
+
end
|
723
|
+
rescue ::Gapic::Rest::Error => e
|
724
|
+
raise ::Google::Cloud::Error.from_error(e)
|
725
|
+
end
|
726
|
+
|
727
|
+
##
|
728
|
+
# Gets an annotation spec.
|
729
|
+
#
|
730
|
+
# @overload get_annotation_spec(request, options = nil)
|
731
|
+
# Pass arguments to `get_annotation_spec` via a request object, either of type
|
732
|
+
# {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash.
|
733
|
+
#
|
734
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash]
|
735
|
+
# A request object representing the call parameters. Required. To specify no
|
736
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
737
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
738
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
739
|
+
#
|
740
|
+
# @overload get_annotation_spec(name: nil)
|
741
|
+
# Pass arguments to `get_annotation_spec` via keyword arguments. Note that at
|
742
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
743
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
744
|
+
#
|
745
|
+
# @param name [::String]
|
746
|
+
# Required. The resource name of the annotation spec to retrieve.
|
747
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
748
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec]
|
749
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
750
|
+
#
|
751
|
+
# @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec]
|
752
|
+
#
|
753
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
754
|
+
def get_annotation_spec request, options = nil
|
755
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
756
|
+
|
757
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest
|
758
|
+
|
759
|
+
# Converts hash and nil to an options object
|
760
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
761
|
+
|
762
|
+
# Customize the options with defaults
|
763
|
+
call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h
|
764
|
+
|
765
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
766
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
767
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
768
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
769
|
+
transports_version_send: [:rest]
|
770
|
+
|
771
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
772
|
+
|
773
|
+
options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout,
|
774
|
+
metadata: call_metadata,
|
775
|
+
retry_policy: @config.rpcs.get_annotation_spec.retry_policy
|
776
|
+
|
777
|
+
options.apply_defaults timeout: @config.timeout,
|
778
|
+
metadata: @config.metadata,
|
779
|
+
retry_policy: @config.retry_policy
|
780
|
+
|
781
|
+
@auto_ml_stub.get_annotation_spec request, options do |result, operation|
|
782
|
+
yield result, operation if block_given?
|
783
|
+
return result
|
784
|
+
end
|
785
|
+
rescue ::Gapic::Rest::Error => e
|
786
|
+
raise ::Google::Cloud::Error.from_error(e)
|
787
|
+
end
|
788
|
+
|
789
|
+
##
|
790
|
+
# Gets a table spec.
|
791
|
+
#
|
792
|
+
# @overload get_table_spec(request, options = nil)
|
793
|
+
# Pass arguments to `get_table_spec` via a request object, either of type
|
794
|
+
# {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash.
|
795
|
+
#
|
796
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash]
|
797
|
+
# A request object representing the call parameters. Required. To specify no
|
798
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
799
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
800
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
801
|
+
#
|
802
|
+
# @overload get_table_spec(name: nil, field_mask: nil)
|
803
|
+
# Pass arguments to `get_table_spec` via keyword arguments. Note that at
|
804
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
805
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
806
|
+
#
|
807
|
+
# @param name [::String]
|
808
|
+
# Required. The resource name of the table spec to retrieve.
|
809
|
+
# @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
|
810
|
+
# Mask specifying which fields to read.
|
811
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
812
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec]
|
813
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
814
|
+
#
|
815
|
+
# @return [::Google::Cloud::AutoML::V1beta1::TableSpec]
|
816
|
+
#
|
817
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
818
|
+
def get_table_spec request, options = nil
|
819
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
820
|
+
|
821
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest
|
822
|
+
|
823
|
+
# Converts hash and nil to an options object
|
824
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
825
|
+
|
826
|
+
# Customize the options with defaults
|
827
|
+
call_metadata = @config.rpcs.get_table_spec.metadata.to_h
|
828
|
+
|
829
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
830
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
831
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
832
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
833
|
+
transports_version_send: [:rest]
|
834
|
+
|
835
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
836
|
+
|
837
|
+
options.apply_defaults timeout: @config.rpcs.get_table_spec.timeout,
|
838
|
+
metadata: call_metadata,
|
839
|
+
retry_policy: @config.rpcs.get_table_spec.retry_policy
|
840
|
+
|
841
|
+
options.apply_defaults timeout: @config.timeout,
|
842
|
+
metadata: @config.metadata,
|
843
|
+
retry_policy: @config.retry_policy
|
844
|
+
|
845
|
+
@auto_ml_stub.get_table_spec request, options do |result, operation|
|
846
|
+
yield result, operation if block_given?
|
847
|
+
return result
|
848
|
+
end
|
849
|
+
rescue ::Gapic::Rest::Error => e
|
850
|
+
raise ::Google::Cloud::Error.from_error(e)
|
851
|
+
end
|
852
|
+
|
853
|
+
##
|
854
|
+
# Lists table specs in a dataset.
|
855
|
+
#
|
856
|
+
# @overload list_table_specs(request, options = nil)
|
857
|
+
# Pass arguments to `list_table_specs` via a request object, either of type
|
858
|
+
# {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash.
|
859
|
+
#
|
860
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash]
|
861
|
+
# A request object representing the call parameters. Required. To specify no
|
862
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
863
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
864
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
865
|
+
#
|
866
|
+
# @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil)
|
867
|
+
# Pass arguments to `list_table_specs` via keyword arguments. Note that at
|
868
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
869
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
870
|
+
#
|
871
|
+
# @param parent [::String]
|
872
|
+
# Required. The resource name of the dataset to list table specs from.
|
873
|
+
# @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
|
874
|
+
# Mask specifying which fields to read.
|
875
|
+
# @param filter [::String]
|
876
|
+
# Filter expression, see go/filtering.
|
877
|
+
# @param page_size [::Integer]
|
878
|
+
# Requested page size. The server can return fewer results than requested.
|
879
|
+
# If unspecified, the server will pick a default size.
|
880
|
+
# @param page_token [::String]
|
881
|
+
# A token identifying a page of results for the server to return.
|
882
|
+
# Typically obtained from the
|
883
|
+
# {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous
|
884
|
+
# {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_table_specs AutoMl.ListTableSpecs} call.
|
885
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
886
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>]
|
887
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
888
|
+
#
|
889
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>]
|
890
|
+
#
|
891
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
892
|
+
def list_table_specs request, options = nil
|
893
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
894
|
+
|
895
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest
|
896
|
+
|
897
|
+
# Converts hash and nil to an options object
|
898
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
899
|
+
|
900
|
+
# Customize the options with defaults
|
901
|
+
call_metadata = @config.rpcs.list_table_specs.metadata.to_h
|
902
|
+
|
903
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
904
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
905
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
906
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
907
|
+
transports_version_send: [:rest]
|
908
|
+
|
909
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
910
|
+
|
911
|
+
options.apply_defaults timeout: @config.rpcs.list_table_specs.timeout,
|
912
|
+
metadata: call_metadata,
|
913
|
+
retry_policy: @config.rpcs.list_table_specs.retry_policy
|
914
|
+
|
915
|
+
options.apply_defaults timeout: @config.timeout,
|
916
|
+
metadata: @config.metadata,
|
917
|
+
retry_policy: @config.retry_policy
|
918
|
+
|
919
|
+
@auto_ml_stub.list_table_specs request, options do |result, operation|
|
920
|
+
result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_table_specs, "table_specs", request, result, options
|
921
|
+
yield result, operation if block_given?
|
922
|
+
return result
|
923
|
+
end
|
924
|
+
rescue ::Gapic::Rest::Error => e
|
925
|
+
raise ::Google::Cloud::Error.from_error(e)
|
926
|
+
end
|
927
|
+
|
928
|
+
##
|
929
|
+
# Updates a table spec.
|
930
|
+
#
|
931
|
+
# @overload update_table_spec(request, options = nil)
|
932
|
+
# Pass arguments to `update_table_spec` via a request object, either of type
|
933
|
+
# {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash.
|
934
|
+
#
|
935
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash]
|
936
|
+
# A request object representing the call parameters. Required. To specify no
|
937
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
938
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
939
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
940
|
+
#
|
941
|
+
# @overload update_table_spec(table_spec: nil, update_mask: nil)
|
942
|
+
# Pass arguments to `update_table_spec` via keyword arguments. Note that at
|
943
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
944
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
945
|
+
#
|
946
|
+
# @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash]
|
947
|
+
# Required. The table spec which replaces the resource on the server.
|
948
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
949
|
+
# The update mask applies to the resource.
|
950
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
951
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec]
|
952
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
953
|
+
#
|
954
|
+
# @return [::Google::Cloud::AutoML::V1beta1::TableSpec]
|
955
|
+
#
|
956
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
957
|
+
def update_table_spec request, options = nil
|
958
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
959
|
+
|
960
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest
|
961
|
+
|
962
|
+
# Converts hash and nil to an options object
|
963
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
964
|
+
|
965
|
+
# Customize the options with defaults
|
966
|
+
call_metadata = @config.rpcs.update_table_spec.metadata.to_h
|
967
|
+
|
968
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
969
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
970
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
971
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
972
|
+
transports_version_send: [:rest]
|
973
|
+
|
974
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
975
|
+
|
976
|
+
options.apply_defaults timeout: @config.rpcs.update_table_spec.timeout,
|
977
|
+
metadata: call_metadata,
|
978
|
+
retry_policy: @config.rpcs.update_table_spec.retry_policy
|
979
|
+
|
980
|
+
options.apply_defaults timeout: @config.timeout,
|
981
|
+
metadata: @config.metadata,
|
982
|
+
retry_policy: @config.retry_policy
|
983
|
+
|
984
|
+
@auto_ml_stub.update_table_spec request, options do |result, operation|
|
985
|
+
yield result, operation if block_given?
|
986
|
+
return result
|
987
|
+
end
|
988
|
+
rescue ::Gapic::Rest::Error => e
|
989
|
+
raise ::Google::Cloud::Error.from_error(e)
|
990
|
+
end
|
991
|
+
|
992
|
+
##
|
993
|
+
# Gets a column spec.
|
994
|
+
#
|
995
|
+
# @overload get_column_spec(request, options = nil)
|
996
|
+
# Pass arguments to `get_column_spec` via a request object, either of type
|
997
|
+
# {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash.
|
998
|
+
#
|
999
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash]
|
1000
|
+
# A request object representing the call parameters. Required. To specify no
|
1001
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1002
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1003
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1004
|
+
#
|
1005
|
+
# @overload get_column_spec(name: nil, field_mask: nil)
|
1006
|
+
# Pass arguments to `get_column_spec` via keyword arguments. Note that at
|
1007
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1008
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1009
|
+
#
|
1010
|
+
# @param name [::String]
|
1011
|
+
# Required. The resource name of the column spec to retrieve.
|
1012
|
+
# @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1013
|
+
# Mask specifying which fields to read.
|
1014
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1015
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec]
|
1016
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1017
|
+
#
|
1018
|
+
# @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec]
|
1019
|
+
#
|
1020
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1021
|
+
def get_column_spec request, options = nil
|
1022
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1023
|
+
|
1024
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest
|
1025
|
+
|
1026
|
+
# Converts hash and nil to an options object
|
1027
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1028
|
+
|
1029
|
+
# Customize the options with defaults
|
1030
|
+
call_metadata = @config.rpcs.get_column_spec.metadata.to_h
|
1031
|
+
|
1032
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1033
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1034
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1035
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1036
|
+
transports_version_send: [:rest]
|
1037
|
+
|
1038
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1039
|
+
|
1040
|
+
options.apply_defaults timeout: @config.rpcs.get_column_spec.timeout,
|
1041
|
+
metadata: call_metadata,
|
1042
|
+
retry_policy: @config.rpcs.get_column_spec.retry_policy
|
1043
|
+
|
1044
|
+
options.apply_defaults timeout: @config.timeout,
|
1045
|
+
metadata: @config.metadata,
|
1046
|
+
retry_policy: @config.retry_policy
|
1047
|
+
|
1048
|
+
@auto_ml_stub.get_column_spec request, options do |result, operation|
|
1049
|
+
yield result, operation if block_given?
|
1050
|
+
return result
|
1051
|
+
end
|
1052
|
+
rescue ::Gapic::Rest::Error => e
|
1053
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
##
|
1057
|
+
# Lists column specs in a table spec.
|
1058
|
+
#
|
1059
|
+
# @overload list_column_specs(request, options = nil)
|
1060
|
+
# Pass arguments to `list_column_specs` via a request object, either of type
|
1061
|
+
# {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash.
|
1062
|
+
#
|
1063
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash]
|
1064
|
+
# A request object representing the call parameters. Required. To specify no
|
1065
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1066
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1067
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1068
|
+
#
|
1069
|
+
# @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil)
|
1070
|
+
# Pass arguments to `list_column_specs` via keyword arguments. Note that at
|
1071
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1072
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1073
|
+
#
|
1074
|
+
# @param parent [::String]
|
1075
|
+
# Required. The resource name of the table spec to list column specs from.
|
1076
|
+
# @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1077
|
+
# Mask specifying which fields to read.
|
1078
|
+
# @param filter [::String]
|
1079
|
+
# Filter expression, see go/filtering.
|
1080
|
+
# @param page_size [::Integer]
|
1081
|
+
# Requested page size. The server can return fewer results than requested.
|
1082
|
+
# If unspecified, the server will pick a default size.
|
1083
|
+
# @param page_token [::String]
|
1084
|
+
# A token identifying a page of results for the server to return.
|
1085
|
+
# Typically obtained from the
|
1086
|
+
# {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous
|
1087
|
+
# {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_column_specs AutoMl.ListColumnSpecs} call.
|
1088
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1089
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>]
|
1090
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1091
|
+
#
|
1092
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>]
|
1093
|
+
#
|
1094
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1095
|
+
def list_column_specs request, options = nil
|
1096
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1097
|
+
|
1098
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest
|
1099
|
+
|
1100
|
+
# Converts hash and nil to an options object
|
1101
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1102
|
+
|
1103
|
+
# Customize the options with defaults
|
1104
|
+
call_metadata = @config.rpcs.list_column_specs.metadata.to_h
|
1105
|
+
|
1106
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1107
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1108
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1109
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1110
|
+
transports_version_send: [:rest]
|
1111
|
+
|
1112
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1113
|
+
|
1114
|
+
options.apply_defaults timeout: @config.rpcs.list_column_specs.timeout,
|
1115
|
+
metadata: call_metadata,
|
1116
|
+
retry_policy: @config.rpcs.list_column_specs.retry_policy
|
1117
|
+
|
1118
|
+
options.apply_defaults timeout: @config.timeout,
|
1119
|
+
metadata: @config.metadata,
|
1120
|
+
retry_policy: @config.retry_policy
|
1121
|
+
|
1122
|
+
@auto_ml_stub.list_column_specs request, options do |result, operation|
|
1123
|
+
result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_column_specs, "column_specs", request, result, options
|
1124
|
+
yield result, operation if block_given?
|
1125
|
+
return result
|
1126
|
+
end
|
1127
|
+
rescue ::Gapic::Rest::Error => e
|
1128
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1129
|
+
end
|
1130
|
+
|
1131
|
+
##
|
1132
|
+
# Updates a column spec.
|
1133
|
+
#
|
1134
|
+
# @overload update_column_spec(request, options = nil)
|
1135
|
+
# Pass arguments to `update_column_spec` via a request object, either of type
|
1136
|
+
# {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash.
|
1137
|
+
#
|
1138
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash]
|
1139
|
+
# A request object representing the call parameters. Required. To specify no
|
1140
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1141
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1142
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1143
|
+
#
|
1144
|
+
# @overload update_column_spec(column_spec: nil, update_mask: nil)
|
1145
|
+
# Pass arguments to `update_column_spec` via keyword arguments. Note that at
|
1146
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1147
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1148
|
+
#
|
1149
|
+
# @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash]
|
1150
|
+
# Required. The column spec which replaces the resource on the server.
|
1151
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1152
|
+
# The update mask applies to the resource.
|
1153
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1154
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec]
|
1155
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1156
|
+
#
|
1157
|
+
# @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec]
|
1158
|
+
#
|
1159
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1160
|
+
def update_column_spec request, options = nil
|
1161
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1162
|
+
|
1163
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest
|
1164
|
+
|
1165
|
+
# Converts hash and nil to an options object
|
1166
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1167
|
+
|
1168
|
+
# Customize the options with defaults
|
1169
|
+
call_metadata = @config.rpcs.update_column_spec.metadata.to_h
|
1170
|
+
|
1171
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1172
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1173
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1174
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1175
|
+
transports_version_send: [:rest]
|
1176
|
+
|
1177
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1178
|
+
|
1179
|
+
options.apply_defaults timeout: @config.rpcs.update_column_spec.timeout,
|
1180
|
+
metadata: call_metadata,
|
1181
|
+
retry_policy: @config.rpcs.update_column_spec.retry_policy
|
1182
|
+
|
1183
|
+
options.apply_defaults timeout: @config.timeout,
|
1184
|
+
metadata: @config.metadata,
|
1185
|
+
retry_policy: @config.retry_policy
|
1186
|
+
|
1187
|
+
@auto_ml_stub.update_column_spec request, options do |result, operation|
|
1188
|
+
yield result, operation if block_given?
|
1189
|
+
return result
|
1190
|
+
end
|
1191
|
+
rescue ::Gapic::Rest::Error => e
|
1192
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
##
|
1196
|
+
# Creates a model.
|
1197
|
+
# Returns a Model in the {::Google::Longrunning::Operation#response response}
|
1198
|
+
# field when it completes.
|
1199
|
+
# When you create a model, several model evaluations are created for it:
|
1200
|
+
# a global evaluation, and one evaluation for each annotation spec.
|
1201
|
+
#
|
1202
|
+
# @overload create_model(request, options = nil)
|
1203
|
+
# Pass arguments to `create_model` via a request object, either of type
|
1204
|
+
# {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash.
|
1205
|
+
#
|
1206
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash]
|
1207
|
+
# A request object representing the call parameters. Required. To specify no
|
1208
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1209
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1210
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1211
|
+
#
|
1212
|
+
# @overload create_model(parent: nil, model: nil)
|
1213
|
+
# Pass arguments to `create_model` via keyword arguments. Note that at
|
1214
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1215
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1216
|
+
#
|
1217
|
+
# @param parent [::String]
|
1218
|
+
# Required. Resource name of the parent project where the model is being created.
|
1219
|
+
# @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash]
|
1220
|
+
# Required. The model to create.
|
1221
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1222
|
+
# @yieldparam result [::Gapic::Operation]
|
1223
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1224
|
+
#
|
1225
|
+
# @return [::Gapic::Operation]
|
1226
|
+
#
|
1227
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1228
|
+
def create_model request, options = nil
|
1229
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1230
|
+
|
1231
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest
|
1232
|
+
|
1233
|
+
# Converts hash and nil to an options object
|
1234
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1235
|
+
|
1236
|
+
# Customize the options with defaults
|
1237
|
+
call_metadata = @config.rpcs.create_model.metadata.to_h
|
1238
|
+
|
1239
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1240
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1241
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1242
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1243
|
+
transports_version_send: [:rest]
|
1244
|
+
|
1245
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1246
|
+
|
1247
|
+
options.apply_defaults timeout: @config.rpcs.create_model.timeout,
|
1248
|
+
metadata: call_metadata,
|
1249
|
+
retry_policy: @config.rpcs.create_model.retry_policy
|
1250
|
+
|
1251
|
+
options.apply_defaults timeout: @config.timeout,
|
1252
|
+
metadata: @config.metadata,
|
1253
|
+
retry_policy: @config.retry_policy
|
1254
|
+
|
1255
|
+
@auto_ml_stub.create_model request, options do |result, operation|
|
1256
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1257
|
+
yield result, operation if block_given?
|
1258
|
+
return result
|
1259
|
+
end
|
1260
|
+
rescue ::Gapic::Rest::Error => e
|
1261
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1262
|
+
end
|
1263
|
+
|
1264
|
+
##
|
1265
|
+
# Gets a model.
|
1266
|
+
#
|
1267
|
+
# @overload get_model(request, options = nil)
|
1268
|
+
# Pass arguments to `get_model` via a request object, either of type
|
1269
|
+
# {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash.
|
1270
|
+
#
|
1271
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash]
|
1272
|
+
# A request object representing the call parameters. Required. To specify no
|
1273
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1274
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1275
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1276
|
+
#
|
1277
|
+
# @overload get_model(name: nil)
|
1278
|
+
# Pass arguments to `get_model` via keyword arguments. Note that at
|
1279
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1280
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1281
|
+
#
|
1282
|
+
# @param name [::String]
|
1283
|
+
# Required. Resource name of the model.
|
1284
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1285
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model]
|
1286
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1287
|
+
#
|
1288
|
+
# @return [::Google::Cloud::AutoML::V1beta1::Model]
|
1289
|
+
#
|
1290
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1291
|
+
def get_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::V1beta1::GetModelRequest
|
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.get_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::V1beta1::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.get_model.timeout,
|
1311
|
+
metadata: call_metadata,
|
1312
|
+
retry_policy: @config.rpcs.get_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.get_model request, options do |result, operation|
|
1319
|
+
yield result, operation if block_given?
|
1320
|
+
return result
|
1321
|
+
end
|
1322
|
+
rescue ::Gapic::Rest::Error => e
|
1323
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1324
|
+
end
|
1325
|
+
|
1326
|
+
##
|
1327
|
+
# Lists models.
|
1328
|
+
#
|
1329
|
+
# @overload list_models(request, options = nil)
|
1330
|
+
# Pass arguments to `list_models` via a request object, either of type
|
1331
|
+
# {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash.
|
1332
|
+
#
|
1333
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash]
|
1334
|
+
# A request object representing the call parameters. Required. To specify no
|
1335
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1336
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1337
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1338
|
+
#
|
1339
|
+
# @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
1340
|
+
# Pass arguments to `list_models` via keyword arguments. Note that at
|
1341
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1342
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1343
|
+
#
|
1344
|
+
# @param parent [::String]
|
1345
|
+
# Required. Resource name of the project, from which to list the models.
|
1346
|
+
# @param filter [::String]
|
1347
|
+
# An expression for filtering the results of the request.
|
1348
|
+
#
|
1349
|
+
# * `model_metadata` - for existence of the case (e.g.
|
1350
|
+
# `video_classification_model_metadata:*`).
|
1351
|
+
# * `dataset_id` - for = or !=. Some examples of using the filter are:
|
1352
|
+
#
|
1353
|
+
# * `image_classification_model_metadata:*` --> The model has
|
1354
|
+
# `image_classification_model_metadata`.
|
1355
|
+
# * `dataset_id=5` --> The model was created from a dataset with ID 5.
|
1356
|
+
# @param page_size [::Integer]
|
1357
|
+
# Requested page size.
|
1358
|
+
# @param page_token [::String]
|
1359
|
+
# A token identifying a page of results for the server to return
|
1360
|
+
# Typically obtained via
|
1361
|
+
# {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous
|
1362
|
+
# {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_models AutoMl.ListModels} call.
|
1363
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1364
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>]
|
1365
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1366
|
+
#
|
1367
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>]
|
1368
|
+
#
|
1369
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1370
|
+
def list_models request, options = nil
|
1371
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1372
|
+
|
1373
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest
|
1374
|
+
|
1375
|
+
# Converts hash and nil to an options object
|
1376
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1377
|
+
|
1378
|
+
# Customize the options with defaults
|
1379
|
+
call_metadata = @config.rpcs.list_models.metadata.to_h
|
1380
|
+
|
1381
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1382
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1383
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1384
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1385
|
+
transports_version_send: [:rest]
|
1386
|
+
|
1387
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1388
|
+
|
1389
|
+
options.apply_defaults timeout: @config.rpcs.list_models.timeout,
|
1390
|
+
metadata: call_metadata,
|
1391
|
+
retry_policy: @config.rpcs.list_models.retry_policy
|
1392
|
+
|
1393
|
+
options.apply_defaults timeout: @config.timeout,
|
1394
|
+
metadata: @config.metadata,
|
1395
|
+
retry_policy: @config.retry_policy
|
1396
|
+
|
1397
|
+
@auto_ml_stub.list_models request, options do |result, operation|
|
1398
|
+
result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, options
|
1399
|
+
yield result, operation if block_given?
|
1400
|
+
return result
|
1401
|
+
end
|
1402
|
+
rescue ::Gapic::Rest::Error => e
|
1403
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1404
|
+
end
|
1405
|
+
|
1406
|
+
##
|
1407
|
+
# Deletes a model.
|
1408
|
+
# Returns `google.protobuf.Empty` in the
|
1409
|
+
# {::Google::Longrunning::Operation#response response} field when it completes,
|
1410
|
+
# and `delete_details` in the
|
1411
|
+
# {::Google::Longrunning::Operation#metadata metadata} field.
|
1412
|
+
#
|
1413
|
+
# @overload delete_model(request, options = nil)
|
1414
|
+
# Pass arguments to `delete_model` via a request object, either of type
|
1415
|
+
# {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash.
|
1416
|
+
#
|
1417
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash]
|
1418
|
+
# A request object representing the call parameters. Required. To specify no
|
1419
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1420
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1421
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1422
|
+
#
|
1423
|
+
# @overload delete_model(name: nil)
|
1424
|
+
# Pass arguments to `delete_model` via keyword arguments. Note that at
|
1425
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1426
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1427
|
+
#
|
1428
|
+
# @param name [::String]
|
1429
|
+
# Required. Resource name of the model being deleted.
|
1430
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1431
|
+
# @yieldparam result [::Gapic::Operation]
|
1432
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1433
|
+
#
|
1434
|
+
# @return [::Gapic::Operation]
|
1435
|
+
#
|
1436
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1437
|
+
def delete_model request, options = nil
|
1438
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1439
|
+
|
1440
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest
|
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.delete_model.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::V1beta1::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.delete_model.timeout,
|
1457
|
+
metadata: call_metadata,
|
1458
|
+
retry_policy: @config.rpcs.delete_model.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.delete_model request, options do |result, operation|
|
1465
|
+
result = ::Gapic::Operation.new result, @operations_client, options: 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
|
+
# Deploys a model. If a model is already deployed, deploying it with the
|
1475
|
+
# same parameters has no effect. Deploying with different parametrs
|
1476
|
+
# (as e.g. changing
|
1477
|
+
#
|
1478
|
+
# [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number])
|
1479
|
+
# will reset the deployment state without pausing the model's availability.
|
1480
|
+
#
|
1481
|
+
# Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage
|
1482
|
+
# deployment automatically.
|
1483
|
+
#
|
1484
|
+
# Returns an empty response in the
|
1485
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
1486
|
+
#
|
1487
|
+
# @overload deploy_model(request, options = nil)
|
1488
|
+
# Pass arguments to `deploy_model` via a request object, either of type
|
1489
|
+
# {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash.
|
1490
|
+
#
|
1491
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash]
|
1492
|
+
# A request object representing the call parameters. Required. To specify no
|
1493
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1494
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1495
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1496
|
+
#
|
1497
|
+
# @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil)
|
1498
|
+
# Pass arguments to `deploy_model` via keyword arguments. Note that at
|
1499
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1500
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1501
|
+
#
|
1502
|
+
# @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash]
|
1503
|
+
# Model deployment metadata specific to Image Object Detection.
|
1504
|
+
# @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash]
|
1505
|
+
# Model deployment metadata specific to Image Classification.
|
1506
|
+
# @param name [::String]
|
1507
|
+
# Required. Resource name of the model to deploy.
|
1508
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1509
|
+
# @yieldparam result [::Gapic::Operation]
|
1510
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1511
|
+
#
|
1512
|
+
# @return [::Gapic::Operation]
|
1513
|
+
#
|
1514
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1515
|
+
def deploy_model request, options = nil
|
1516
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1517
|
+
|
1518
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest
|
1519
|
+
|
1520
|
+
# Converts hash and nil to an options object
|
1521
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1522
|
+
|
1523
|
+
# Customize the options with defaults
|
1524
|
+
call_metadata = @config.rpcs.deploy_model.metadata.to_h
|
1525
|
+
|
1526
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1527
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1528
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1529
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1530
|
+
transports_version_send: [:rest]
|
1531
|
+
|
1532
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1533
|
+
|
1534
|
+
options.apply_defaults timeout: @config.rpcs.deploy_model.timeout,
|
1535
|
+
metadata: call_metadata,
|
1536
|
+
retry_policy: @config.rpcs.deploy_model.retry_policy
|
1537
|
+
|
1538
|
+
options.apply_defaults timeout: @config.timeout,
|
1539
|
+
metadata: @config.metadata,
|
1540
|
+
retry_policy: @config.retry_policy
|
1541
|
+
|
1542
|
+
@auto_ml_stub.deploy_model request, options do |result, operation|
|
1543
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1544
|
+
yield result, operation if block_given?
|
1545
|
+
return result
|
1546
|
+
end
|
1547
|
+
rescue ::Gapic::Rest::Error => e
|
1548
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1549
|
+
end
|
1550
|
+
|
1551
|
+
##
|
1552
|
+
# Undeploys a model. If the model is not deployed this method has no effect.
|
1553
|
+
#
|
1554
|
+
# Only applicable for Text Classification, Image Object Detection and Tables;
|
1555
|
+
# all other domains manage deployment automatically.
|
1556
|
+
#
|
1557
|
+
# Returns an empty response in the
|
1558
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
1559
|
+
#
|
1560
|
+
# @overload undeploy_model(request, options = nil)
|
1561
|
+
# Pass arguments to `undeploy_model` via a request object, either of type
|
1562
|
+
# {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash.
|
1563
|
+
#
|
1564
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash]
|
1565
|
+
# A request object representing the call parameters. Required. To specify no
|
1566
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1567
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1568
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1569
|
+
#
|
1570
|
+
# @overload undeploy_model(name: nil)
|
1571
|
+
# Pass arguments to `undeploy_model` via keyword arguments. Note that at
|
1572
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1573
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1574
|
+
#
|
1575
|
+
# @param name [::String]
|
1576
|
+
# Required. Resource name of the model to undeploy.
|
1577
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1578
|
+
# @yieldparam result [::Gapic::Operation]
|
1579
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1580
|
+
#
|
1581
|
+
# @return [::Gapic::Operation]
|
1582
|
+
#
|
1583
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1584
|
+
def undeploy_model request, options = nil
|
1585
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1586
|
+
|
1587
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest
|
1588
|
+
|
1589
|
+
# Converts hash and nil to an options object
|
1590
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1591
|
+
|
1592
|
+
# Customize the options with defaults
|
1593
|
+
call_metadata = @config.rpcs.undeploy_model.metadata.to_h
|
1594
|
+
|
1595
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1596
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1597
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1598
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1599
|
+
transports_version_send: [:rest]
|
1600
|
+
|
1601
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1602
|
+
|
1603
|
+
options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout,
|
1604
|
+
metadata: call_metadata,
|
1605
|
+
retry_policy: @config.rpcs.undeploy_model.retry_policy
|
1606
|
+
|
1607
|
+
options.apply_defaults timeout: @config.timeout,
|
1608
|
+
metadata: @config.metadata,
|
1609
|
+
retry_policy: @config.retry_policy
|
1610
|
+
|
1611
|
+
@auto_ml_stub.undeploy_model request, options do |result, operation|
|
1612
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1613
|
+
yield result, operation if block_given?
|
1614
|
+
return result
|
1615
|
+
end
|
1616
|
+
rescue ::Gapic::Rest::Error => e
|
1617
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1618
|
+
end
|
1619
|
+
|
1620
|
+
##
|
1621
|
+
# Exports a trained, "export-able", model to a user specified Google Cloud
|
1622
|
+
# Storage location. A model is considered export-able if and only if it has
|
1623
|
+
# an export format defined for it in
|
1624
|
+
#
|
1625
|
+
# {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}.
|
1626
|
+
#
|
1627
|
+
# Returns an empty response in the
|
1628
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
1629
|
+
#
|
1630
|
+
# @overload export_model(request, options = nil)
|
1631
|
+
# Pass arguments to `export_model` via a request object, either of type
|
1632
|
+
# {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash.
|
1633
|
+
#
|
1634
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash]
|
1635
|
+
# A request object representing the call parameters. Required. To specify no
|
1636
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1637
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1638
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1639
|
+
#
|
1640
|
+
# @overload export_model(name: nil, output_config: nil)
|
1641
|
+
# Pass arguments to `export_model` via keyword arguments. Note that at
|
1642
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1643
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1644
|
+
#
|
1645
|
+
# @param name [::String]
|
1646
|
+
# Required. The resource name of the model to export.
|
1647
|
+
# @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash]
|
1648
|
+
# Required. The desired output location and configuration.
|
1649
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1650
|
+
# @yieldparam result [::Gapic::Operation]
|
1651
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1652
|
+
#
|
1653
|
+
# @return [::Gapic::Operation]
|
1654
|
+
#
|
1655
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1656
|
+
def export_model request, options = nil
|
1657
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1658
|
+
|
1659
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest
|
1660
|
+
|
1661
|
+
# Converts hash and nil to an options object
|
1662
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1663
|
+
|
1664
|
+
# Customize the options with defaults
|
1665
|
+
call_metadata = @config.rpcs.export_model.metadata.to_h
|
1666
|
+
|
1667
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1668
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1669
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1670
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1671
|
+
transports_version_send: [:rest]
|
1672
|
+
|
1673
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1674
|
+
|
1675
|
+
options.apply_defaults timeout: @config.rpcs.export_model.timeout,
|
1676
|
+
metadata: call_metadata,
|
1677
|
+
retry_policy: @config.rpcs.export_model.retry_policy
|
1678
|
+
|
1679
|
+
options.apply_defaults timeout: @config.timeout,
|
1680
|
+
metadata: @config.metadata,
|
1681
|
+
retry_policy: @config.retry_policy
|
1682
|
+
|
1683
|
+
@auto_ml_stub.export_model request, options do |result, operation|
|
1684
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1685
|
+
yield result, operation if block_given?
|
1686
|
+
return result
|
1687
|
+
end
|
1688
|
+
rescue ::Gapic::Rest::Error => e
|
1689
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1690
|
+
end
|
1691
|
+
|
1692
|
+
##
|
1693
|
+
# Exports examples on which the model was evaluated (i.e. which were in the
|
1694
|
+
# TEST set of the dataset the model was created from), together with their
|
1695
|
+
# ground truth annotations and the annotations created (predicted) by the
|
1696
|
+
# model.
|
1697
|
+
# The examples, ground truth and predictions are exported in the state
|
1698
|
+
# they were at the moment the model was evaluated.
|
1699
|
+
#
|
1700
|
+
# This export is available only for 30 days since the model evaluation is
|
1701
|
+
# created.
|
1702
|
+
#
|
1703
|
+
# Currently only available for Tables.
|
1704
|
+
#
|
1705
|
+
# Returns an empty response in the
|
1706
|
+
# {::Google::Longrunning::Operation#response response} field when it completes.
|
1707
|
+
#
|
1708
|
+
# @overload export_evaluated_examples(request, options = nil)
|
1709
|
+
# Pass arguments to `export_evaluated_examples` via a request object, either of type
|
1710
|
+
# {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash.
|
1711
|
+
#
|
1712
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash]
|
1713
|
+
# A request object representing the call parameters. Required. To specify no
|
1714
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1715
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1716
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1717
|
+
#
|
1718
|
+
# @overload export_evaluated_examples(name: nil, output_config: nil)
|
1719
|
+
# Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at
|
1720
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1721
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1722
|
+
#
|
1723
|
+
# @param name [::String]
|
1724
|
+
# Required. The resource name of the model whose evaluated examples are to
|
1725
|
+
# be exported.
|
1726
|
+
# @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash]
|
1727
|
+
# Required. The desired output location and configuration.
|
1728
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1729
|
+
# @yieldparam result [::Gapic::Operation]
|
1730
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1731
|
+
#
|
1732
|
+
# @return [::Gapic::Operation]
|
1733
|
+
#
|
1734
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1735
|
+
def export_evaluated_examples request, options = nil
|
1736
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1737
|
+
|
1738
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest
|
1739
|
+
|
1740
|
+
# Converts hash and nil to an options object
|
1741
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1742
|
+
|
1743
|
+
# Customize the options with defaults
|
1744
|
+
call_metadata = @config.rpcs.export_evaluated_examples.metadata.to_h
|
1745
|
+
|
1746
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1747
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1748
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1749
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1750
|
+
transports_version_send: [:rest]
|
1751
|
+
|
1752
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1753
|
+
|
1754
|
+
options.apply_defaults timeout: @config.rpcs.export_evaluated_examples.timeout,
|
1755
|
+
metadata: call_metadata,
|
1756
|
+
retry_policy: @config.rpcs.export_evaluated_examples.retry_policy
|
1757
|
+
|
1758
|
+
options.apply_defaults timeout: @config.timeout,
|
1759
|
+
metadata: @config.metadata,
|
1760
|
+
retry_policy: @config.retry_policy
|
1761
|
+
|
1762
|
+
@auto_ml_stub.export_evaluated_examples request, options do |result, operation|
|
1763
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1764
|
+
yield result, operation if block_given?
|
1765
|
+
return result
|
1766
|
+
end
|
1767
|
+
rescue ::Gapic::Rest::Error => e
|
1768
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1769
|
+
end
|
1770
|
+
|
1771
|
+
##
|
1772
|
+
# Gets a model evaluation.
|
1773
|
+
#
|
1774
|
+
# @overload get_model_evaluation(request, options = nil)
|
1775
|
+
# Pass arguments to `get_model_evaluation` via a request object, either of type
|
1776
|
+
# {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash.
|
1777
|
+
#
|
1778
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash]
|
1779
|
+
# A request object representing the call parameters. Required. To specify no
|
1780
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1781
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1782
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1783
|
+
#
|
1784
|
+
# @overload get_model_evaluation(name: nil)
|
1785
|
+
# Pass arguments to `get_model_evaluation` via keyword arguments. Note that at
|
1786
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1787
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1788
|
+
#
|
1789
|
+
# @param name [::String]
|
1790
|
+
# Required. Resource name for the model evaluation.
|
1791
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1792
|
+
# @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation]
|
1793
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1794
|
+
#
|
1795
|
+
# @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation]
|
1796
|
+
#
|
1797
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1798
|
+
def get_model_evaluation request, options = nil
|
1799
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1800
|
+
|
1801
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest
|
1802
|
+
|
1803
|
+
# Converts hash and nil to an options object
|
1804
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1805
|
+
|
1806
|
+
# Customize the options with defaults
|
1807
|
+
call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h
|
1808
|
+
|
1809
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1810
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1811
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1812
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1813
|
+
transports_version_send: [:rest]
|
1814
|
+
|
1815
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1816
|
+
|
1817
|
+
options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout,
|
1818
|
+
metadata: call_metadata,
|
1819
|
+
retry_policy: @config.rpcs.get_model_evaluation.retry_policy
|
1820
|
+
|
1821
|
+
options.apply_defaults timeout: @config.timeout,
|
1822
|
+
metadata: @config.metadata,
|
1823
|
+
retry_policy: @config.retry_policy
|
1824
|
+
|
1825
|
+
@auto_ml_stub.get_model_evaluation request, options do |result, operation|
|
1826
|
+
yield result, operation if block_given?
|
1827
|
+
return result
|
1828
|
+
end
|
1829
|
+
rescue ::Gapic::Rest::Error => e
|
1830
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1831
|
+
end
|
1832
|
+
|
1833
|
+
##
|
1834
|
+
# Lists model evaluations.
|
1835
|
+
#
|
1836
|
+
# @overload list_model_evaluations(request, options = nil)
|
1837
|
+
# Pass arguments to `list_model_evaluations` via a request object, either of type
|
1838
|
+
# {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash.
|
1839
|
+
#
|
1840
|
+
# @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash]
|
1841
|
+
# A request object representing the call parameters. Required. To specify no
|
1842
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1843
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1844
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1845
|
+
#
|
1846
|
+
# @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
1847
|
+
# Pass arguments to `list_model_evaluations` via keyword arguments. Note that at
|
1848
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1849
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1850
|
+
#
|
1851
|
+
# @param parent [::String]
|
1852
|
+
# Required. Resource name of the model to list the model evaluations for.
|
1853
|
+
# If modelId is set as "-", this will list model evaluations from across all
|
1854
|
+
# models of the parent location.
|
1855
|
+
# @param filter [::String]
|
1856
|
+
# An expression for filtering the results of the request.
|
1857
|
+
#
|
1858
|
+
# * `annotation_spec_id` - for =, != or existence. See example below for
|
1859
|
+
# the last.
|
1860
|
+
#
|
1861
|
+
# Some examples of using the filter are:
|
1862
|
+
#
|
1863
|
+
# * `annotation_spec_id!=4` --> The model evaluation was done for
|
1864
|
+
# annotation spec with ID different than 4.
|
1865
|
+
# * `NOT annotation_spec_id:*` --> The model evaluation was done for
|
1866
|
+
# aggregate of all annotation specs.
|
1867
|
+
# @param page_size [::Integer]
|
1868
|
+
# Requested page size.
|
1869
|
+
# @param page_token [::String]
|
1870
|
+
# A token identifying a page of results for the server to return.
|
1871
|
+
# Typically obtained via
|
1872
|
+
# {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous
|
1873
|
+
# {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call.
|
1874
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1875
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>]
|
1876
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1877
|
+
#
|
1878
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>]
|
1879
|
+
#
|
1880
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1881
|
+
def list_model_evaluations request, options = nil
|
1882
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1883
|
+
|
1884
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest
|
1885
|
+
|
1886
|
+
# Converts hash and nil to an options object
|
1887
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1888
|
+
|
1889
|
+
# Customize the options with defaults
|
1890
|
+
call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h
|
1891
|
+
|
1892
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1893
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1894
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1895
|
+
gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION,
|
1896
|
+
transports_version_send: [:rest]
|
1897
|
+
|
1898
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1899
|
+
|
1900
|
+
options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout,
|
1901
|
+
metadata: call_metadata,
|
1902
|
+
retry_policy: @config.rpcs.list_model_evaluations.retry_policy
|
1903
|
+
|
1904
|
+
options.apply_defaults timeout: @config.timeout,
|
1905
|
+
metadata: @config.metadata,
|
1906
|
+
retry_policy: @config.retry_policy
|
1907
|
+
|
1908
|
+
@auto_ml_stub.list_model_evaluations request, options do |result, operation|
|
1909
|
+
result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, options
|
1910
|
+
yield result, operation if block_given?
|
1911
|
+
return result
|
1912
|
+
end
|
1913
|
+
rescue ::Gapic::Rest::Error => e
|
1914
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1915
|
+
end
|
1916
|
+
|
1917
|
+
##
|
1918
|
+
# Configuration class for the AutoMl REST API.
|
1919
|
+
#
|
1920
|
+
# This class represents the configuration for AutoMl REST,
|
1921
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1922
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1923
|
+
# applied individually to specific RPCs. See
|
1924
|
+
# {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration::Rpcs}
|
1925
|
+
# for a list of RPCs that can be configured independently.
|
1926
|
+
#
|
1927
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1928
|
+
# on construction.
|
1929
|
+
#
|
1930
|
+
# @example
|
1931
|
+
#
|
1932
|
+
# # Modify the global config, setting the timeout for
|
1933
|
+
# # create_dataset to 20 seconds,
|
1934
|
+
# # and all remaining timeouts to 10 seconds.
|
1935
|
+
# ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.configure do |config|
|
1936
|
+
# config.timeout = 10.0
|
1937
|
+
# config.rpcs.create_dataset.timeout = 20.0
|
1938
|
+
# end
|
1939
|
+
#
|
1940
|
+
# # Apply the above configuration only to a new client.
|
1941
|
+
# client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config|
|
1942
|
+
# config.timeout = 10.0
|
1943
|
+
# config.rpcs.create_dataset.timeout = 20.0
|
1944
|
+
# end
|
1945
|
+
#
|
1946
|
+
# @!attribute [rw] endpoint
|
1947
|
+
# The hostname or hostname:port of the service endpoint.
|
1948
|
+
# Defaults to `"automl.googleapis.com"`.
|
1949
|
+
# @return [::String]
|
1950
|
+
# @!attribute [rw] credentials
|
1951
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1952
|
+
# * (`String`) The path to a service account key file in JSON format
|
1953
|
+
# * (`Hash`) A service account key as a Hash
|
1954
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1955
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1956
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1957
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1958
|
+
# * (`nil`) indicating no credentials
|
1959
|
+
# @return [::Object]
|
1960
|
+
# @!attribute [rw] scope
|
1961
|
+
# The OAuth scopes
|
1962
|
+
# @return [::Array<::String>]
|
1963
|
+
# @!attribute [rw] lib_name
|
1964
|
+
# The library name as recorded in instrumentation and logging
|
1965
|
+
# @return [::String]
|
1966
|
+
# @!attribute [rw] lib_version
|
1967
|
+
# The library version as recorded in instrumentation and logging
|
1968
|
+
# @return [::String]
|
1969
|
+
# @!attribute [rw] timeout
|
1970
|
+
# The call timeout in seconds.
|
1971
|
+
# @return [::Numeric]
|
1972
|
+
# @!attribute [rw] metadata
|
1973
|
+
# Additional headers to be sent with the call.
|
1974
|
+
# @return [::Hash{::Symbol=>::String}]
|
1975
|
+
# @!attribute [rw] retry_policy
|
1976
|
+
# The retry policy. The value is a hash with the following keys:
|
1977
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1978
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1979
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1980
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1981
|
+
# trigger a retry.
|
1982
|
+
# @return [::Hash]
|
1983
|
+
# @!attribute [rw] quota_project
|
1984
|
+
# A separate project against which to charge quota.
|
1985
|
+
# @return [::String]
|
1986
|
+
#
|
1987
|
+
class Configuration
|
1988
|
+
extend ::Gapic::Config
|
1989
|
+
|
1990
|
+
config_attr :endpoint, "automl.googleapis.com", ::String
|
1991
|
+
config_attr :credentials, nil do |value|
|
1992
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1993
|
+
allowed.any? { |klass| klass === value }
|
1994
|
+
end
|
1995
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1996
|
+
config_attr :lib_name, nil, ::String, nil
|
1997
|
+
config_attr :lib_version, nil, ::String, nil
|
1998
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1999
|
+
config_attr :metadata, nil, ::Hash, nil
|
2000
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2001
|
+
config_attr :quota_project, nil, ::String, nil
|
2002
|
+
|
2003
|
+
# @private
|
2004
|
+
def initialize parent_config = nil
|
2005
|
+
@parent_config = parent_config unless parent_config.nil?
|
2006
|
+
|
2007
|
+
yield self if block_given?
|
2008
|
+
end
|
2009
|
+
|
2010
|
+
##
|
2011
|
+
# Configurations for individual RPCs
|
2012
|
+
# @return [Rpcs]
|
2013
|
+
#
|
2014
|
+
def rpcs
|
2015
|
+
@rpcs ||= begin
|
2016
|
+
parent_rpcs = nil
|
2017
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2018
|
+
Rpcs.new parent_rpcs
|
2019
|
+
end
|
2020
|
+
end
|
2021
|
+
|
2022
|
+
##
|
2023
|
+
# Configuration RPC class for the AutoMl API.
|
2024
|
+
#
|
2025
|
+
# Includes fields providing the configuration for each RPC in this service.
|
2026
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2027
|
+
# the following configuration fields:
|
2028
|
+
#
|
2029
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2030
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
2031
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2032
|
+
# include the following keys:
|
2033
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2034
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2035
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2036
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2037
|
+
# trigger a retry.
|
2038
|
+
#
|
2039
|
+
class Rpcs
|
2040
|
+
##
|
2041
|
+
# RPC-specific configuration for `create_dataset`
|
2042
|
+
# @return [::Gapic::Config::Method]
|
2043
|
+
#
|
2044
|
+
attr_reader :create_dataset
|
2045
|
+
##
|
2046
|
+
# RPC-specific configuration for `get_dataset`
|
2047
|
+
# @return [::Gapic::Config::Method]
|
2048
|
+
#
|
2049
|
+
attr_reader :get_dataset
|
2050
|
+
##
|
2051
|
+
# RPC-specific configuration for `list_datasets`
|
2052
|
+
# @return [::Gapic::Config::Method]
|
2053
|
+
#
|
2054
|
+
attr_reader :list_datasets
|
2055
|
+
##
|
2056
|
+
# RPC-specific configuration for `update_dataset`
|
2057
|
+
# @return [::Gapic::Config::Method]
|
2058
|
+
#
|
2059
|
+
attr_reader :update_dataset
|
2060
|
+
##
|
2061
|
+
# RPC-specific configuration for `delete_dataset`
|
2062
|
+
# @return [::Gapic::Config::Method]
|
2063
|
+
#
|
2064
|
+
attr_reader :delete_dataset
|
2065
|
+
##
|
2066
|
+
# RPC-specific configuration for `import_data`
|
2067
|
+
# @return [::Gapic::Config::Method]
|
2068
|
+
#
|
2069
|
+
attr_reader :import_data
|
2070
|
+
##
|
2071
|
+
# RPC-specific configuration for `export_data`
|
2072
|
+
# @return [::Gapic::Config::Method]
|
2073
|
+
#
|
2074
|
+
attr_reader :export_data
|
2075
|
+
##
|
2076
|
+
# RPC-specific configuration for `get_annotation_spec`
|
2077
|
+
# @return [::Gapic::Config::Method]
|
2078
|
+
#
|
2079
|
+
attr_reader :get_annotation_spec
|
2080
|
+
##
|
2081
|
+
# RPC-specific configuration for `get_table_spec`
|
2082
|
+
# @return [::Gapic::Config::Method]
|
2083
|
+
#
|
2084
|
+
attr_reader :get_table_spec
|
2085
|
+
##
|
2086
|
+
# RPC-specific configuration for `list_table_specs`
|
2087
|
+
# @return [::Gapic::Config::Method]
|
2088
|
+
#
|
2089
|
+
attr_reader :list_table_specs
|
2090
|
+
##
|
2091
|
+
# RPC-specific configuration for `update_table_spec`
|
2092
|
+
# @return [::Gapic::Config::Method]
|
2093
|
+
#
|
2094
|
+
attr_reader :update_table_spec
|
2095
|
+
##
|
2096
|
+
# RPC-specific configuration for `get_column_spec`
|
2097
|
+
# @return [::Gapic::Config::Method]
|
2098
|
+
#
|
2099
|
+
attr_reader :get_column_spec
|
2100
|
+
##
|
2101
|
+
# RPC-specific configuration for `list_column_specs`
|
2102
|
+
# @return [::Gapic::Config::Method]
|
2103
|
+
#
|
2104
|
+
attr_reader :list_column_specs
|
2105
|
+
##
|
2106
|
+
# RPC-specific configuration for `update_column_spec`
|
2107
|
+
# @return [::Gapic::Config::Method]
|
2108
|
+
#
|
2109
|
+
attr_reader :update_column_spec
|
2110
|
+
##
|
2111
|
+
# RPC-specific configuration for `create_model`
|
2112
|
+
# @return [::Gapic::Config::Method]
|
2113
|
+
#
|
2114
|
+
attr_reader :create_model
|
2115
|
+
##
|
2116
|
+
# RPC-specific configuration for `get_model`
|
2117
|
+
# @return [::Gapic::Config::Method]
|
2118
|
+
#
|
2119
|
+
attr_reader :get_model
|
2120
|
+
##
|
2121
|
+
# RPC-specific configuration for `list_models`
|
2122
|
+
# @return [::Gapic::Config::Method]
|
2123
|
+
#
|
2124
|
+
attr_reader :list_models
|
2125
|
+
##
|
2126
|
+
# RPC-specific configuration for `delete_model`
|
2127
|
+
# @return [::Gapic::Config::Method]
|
2128
|
+
#
|
2129
|
+
attr_reader :delete_model
|
2130
|
+
##
|
2131
|
+
# RPC-specific configuration for `deploy_model`
|
2132
|
+
# @return [::Gapic::Config::Method]
|
2133
|
+
#
|
2134
|
+
attr_reader :deploy_model
|
2135
|
+
##
|
2136
|
+
# RPC-specific configuration for `undeploy_model`
|
2137
|
+
# @return [::Gapic::Config::Method]
|
2138
|
+
#
|
2139
|
+
attr_reader :undeploy_model
|
2140
|
+
##
|
2141
|
+
# RPC-specific configuration for `export_model`
|
2142
|
+
# @return [::Gapic::Config::Method]
|
2143
|
+
#
|
2144
|
+
attr_reader :export_model
|
2145
|
+
##
|
2146
|
+
# RPC-specific configuration for `export_evaluated_examples`
|
2147
|
+
# @return [::Gapic::Config::Method]
|
2148
|
+
#
|
2149
|
+
attr_reader :export_evaluated_examples
|
2150
|
+
##
|
2151
|
+
# RPC-specific configuration for `get_model_evaluation`
|
2152
|
+
# @return [::Gapic::Config::Method]
|
2153
|
+
#
|
2154
|
+
attr_reader :get_model_evaluation
|
2155
|
+
##
|
2156
|
+
# RPC-specific configuration for `list_model_evaluations`
|
2157
|
+
# @return [::Gapic::Config::Method]
|
2158
|
+
#
|
2159
|
+
attr_reader :list_model_evaluations
|
2160
|
+
|
2161
|
+
# @private
|
2162
|
+
def initialize parent_rpcs = nil
|
2163
|
+
create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset
|
2164
|
+
@create_dataset = ::Gapic::Config::Method.new create_dataset_config
|
2165
|
+
get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset
|
2166
|
+
@get_dataset = ::Gapic::Config::Method.new get_dataset_config
|
2167
|
+
list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets
|
2168
|
+
@list_datasets = ::Gapic::Config::Method.new list_datasets_config
|
2169
|
+
update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset
|
2170
|
+
@update_dataset = ::Gapic::Config::Method.new update_dataset_config
|
2171
|
+
delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset
|
2172
|
+
@delete_dataset = ::Gapic::Config::Method.new delete_dataset_config
|
2173
|
+
import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data
|
2174
|
+
@import_data = ::Gapic::Config::Method.new import_data_config
|
2175
|
+
export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data
|
2176
|
+
@export_data = ::Gapic::Config::Method.new export_data_config
|
2177
|
+
get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec
|
2178
|
+
@get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config
|
2179
|
+
get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec
|
2180
|
+
@get_table_spec = ::Gapic::Config::Method.new get_table_spec_config
|
2181
|
+
list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs
|
2182
|
+
@list_table_specs = ::Gapic::Config::Method.new list_table_specs_config
|
2183
|
+
update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec
|
2184
|
+
@update_table_spec = ::Gapic::Config::Method.new update_table_spec_config
|
2185
|
+
get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec
|
2186
|
+
@get_column_spec = ::Gapic::Config::Method.new get_column_spec_config
|
2187
|
+
list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs
|
2188
|
+
@list_column_specs = ::Gapic::Config::Method.new list_column_specs_config
|
2189
|
+
update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec
|
2190
|
+
@update_column_spec = ::Gapic::Config::Method.new update_column_spec_config
|
2191
|
+
create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model
|
2192
|
+
@create_model = ::Gapic::Config::Method.new create_model_config
|
2193
|
+
get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model
|
2194
|
+
@get_model = ::Gapic::Config::Method.new get_model_config
|
2195
|
+
list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models
|
2196
|
+
@list_models = ::Gapic::Config::Method.new list_models_config
|
2197
|
+
delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model
|
2198
|
+
@delete_model = ::Gapic::Config::Method.new delete_model_config
|
2199
|
+
deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model
|
2200
|
+
@deploy_model = ::Gapic::Config::Method.new deploy_model_config
|
2201
|
+
undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model
|
2202
|
+
@undeploy_model = ::Gapic::Config::Method.new undeploy_model_config
|
2203
|
+
export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model
|
2204
|
+
@export_model = ::Gapic::Config::Method.new export_model_config
|
2205
|
+
export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples
|
2206
|
+
@export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config
|
2207
|
+
get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation
|
2208
|
+
@get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config
|
2209
|
+
list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations
|
2210
|
+
@list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config
|
2211
|
+
|
2212
|
+
yield self if block_given?
|
2213
|
+
end
|
2214
|
+
end
|
2215
|
+
end
|
2216
|
+
end
|
2217
|
+
end
|
2218
|
+
end
|
2219
|
+
end
|
2220
|
+
end
|
2221
|
+
end
|
2222
|
+
end
|