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