google-apis-ml_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1718 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module MlV1
23
+ # AI Platform Training & Prediction API
24
+ #
25
+ # An API to enable creating and using machine learning models.
26
+ #
27
+ # @example
28
+ # require 'google/apis/ml_v1'
29
+ #
30
+ # Ml = Google::Apis::MlV1 # Alias the module
31
+ # service = Ml::CloudMachineLearningEngineService.new
32
+ #
33
+ # @see https://cloud.google.com/ml/
34
+ class CloudMachineLearningEngineService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://ml.googleapis.com/', '',
47
+ client_name: 'google-apis-ml_v1',
48
+ client_version: Google::Apis::MlV1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Performs explanation on the data in the request. `% dynamic include "/ai-
53
+ # platform/includes/___explain-request" %`
54
+ # @param [String] name
55
+ # Required. The resource name of a model or a version. Authorization: requires
56
+ # the `predict` permission on the specified resource.
57
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1ExplainRequest] google_cloud_ml_v1__explain_request_object
58
+ # @param [String] fields
59
+ # Selector specifying which fields to include in a partial response.
60
+ # @param [String] quota_user
61
+ # Available to use for quota purposes for server-side applications. Can be any
62
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
63
+ # @param [Google::Apis::RequestOptions] options
64
+ # Request-specific options
65
+ #
66
+ # @yield [result, err] Result & error if block supplied
67
+ # @yieldparam result [Google::Apis::MlV1::GoogleApiHttpBody] parsed result object
68
+ # @yieldparam err [StandardError] error object if request failed
69
+ #
70
+ # @return [Google::Apis::MlV1::GoogleApiHttpBody]
71
+ #
72
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
73
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
74
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
75
+ def explain_project(name, google_cloud_ml_v1__explain_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
76
+ command = make_simple_command(:post, 'v1/{+name}:explain', options)
77
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1ExplainRequest::Representation
78
+ command.request_object = google_cloud_ml_v1__explain_request_object
79
+ command.response_representation = Google::Apis::MlV1::GoogleApiHttpBody::Representation
80
+ command.response_class = Google::Apis::MlV1::GoogleApiHttpBody
81
+ command.params['name'] = name unless name.nil?
82
+ command.query['fields'] = fields unless fields.nil?
83
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
84
+ execute_or_queue_command(command, &block)
85
+ end
86
+
87
+ # Get the service account information associated with your project. You need
88
+ # this information in order to grant the service account permissions for the
89
+ # Google Cloud Storage location where you put your model training code for
90
+ # training the model with Google Cloud Machine Learning.
91
+ # @param [String] name
92
+ # Required. The project name.
93
+ # @param [String] fields
94
+ # Selector specifying which fields to include in a partial response.
95
+ # @param [String] quota_user
96
+ # Available to use for quota purposes for server-side applications. Can be any
97
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
98
+ # @param [Google::Apis::RequestOptions] options
99
+ # Request-specific options
100
+ #
101
+ # @yield [result, err] Result & error if block supplied
102
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse] parsed result object
103
+ # @yieldparam err [StandardError] error object if request failed
104
+ #
105
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse]
106
+ #
107
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
108
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
109
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
110
+ def get_project_config(name, fields: nil, quota_user: nil, options: nil, &block)
111
+ command = make_simple_command(:get, 'v1/{+name}:getConfig', options)
112
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse::Representation
113
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1GetConfigResponse
114
+ command.params['name'] = name unless name.nil?
115
+ command.query['fields'] = fields unless fields.nil?
116
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
117
+ execute_or_queue_command(command, &block)
118
+ end
119
+
120
+ # Performs online prediction on the data in the request. `% dynamic include "/ai-
121
+ # platform/includes/___predict-request" %`
122
+ # @param [String] name
123
+ # Required. The resource name of a model or a version. Authorization: requires
124
+ # the `predict` permission on the specified resource.
125
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1PredictRequest] google_cloud_ml_v1__predict_request_object
126
+ # @param [String] fields
127
+ # Selector specifying which fields to include in a partial response.
128
+ # @param [String] quota_user
129
+ # Available to use for quota purposes for server-side applications. Can be any
130
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
131
+ # @param [Google::Apis::RequestOptions] options
132
+ # Request-specific options
133
+ #
134
+ # @yield [result, err] Result & error if block supplied
135
+ # @yieldparam result [Google::Apis::MlV1::GoogleApiHttpBody] parsed result object
136
+ # @yieldparam err [StandardError] error object if request failed
137
+ #
138
+ # @return [Google::Apis::MlV1::GoogleApiHttpBody]
139
+ #
140
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
141
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
142
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
143
+ def predict_project(name, google_cloud_ml_v1__predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
144
+ command = make_simple_command(:post, 'v1/{+name}:predict', options)
145
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1PredictRequest::Representation
146
+ command.request_object = google_cloud_ml_v1__predict_request_object
147
+ command.response_representation = Google::Apis::MlV1::GoogleApiHttpBody::Representation
148
+ command.response_class = Google::Apis::MlV1::GoogleApiHttpBody
149
+ command.params['name'] = name unless name.nil?
150
+ command.query['fields'] = fields unless fields.nil?
151
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
152
+ execute_or_queue_command(command, &block)
153
+ end
154
+
155
+ # Cancels a running job.
156
+ # @param [String] name
157
+ # Required. The name of the job to cancel.
158
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1CancelJobRequest] google_cloud_ml_v1__cancel_job_request_object
159
+ # @param [String] fields
160
+ # Selector specifying which fields to include in a partial response.
161
+ # @param [String] quota_user
162
+ # Available to use for quota purposes for server-side applications. Can be any
163
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
164
+ # @param [Google::Apis::RequestOptions] options
165
+ # Request-specific options
166
+ #
167
+ # @yield [result, err] Result & error if block supplied
168
+ # @yieldparam result [Google::Apis::MlV1::GoogleProtobufEmpty] parsed result object
169
+ # @yieldparam err [StandardError] error object if request failed
170
+ #
171
+ # @return [Google::Apis::MlV1::GoogleProtobufEmpty]
172
+ #
173
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
174
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
175
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
176
+ def cancel_project_job(name, google_cloud_ml_v1__cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
177
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
178
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1CancelJobRequest::Representation
179
+ command.request_object = google_cloud_ml_v1__cancel_job_request_object
180
+ command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
181
+ command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
182
+ command.params['name'] = name unless name.nil?
183
+ command.query['fields'] = fields unless fields.nil?
184
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
185
+ execute_or_queue_command(command, &block)
186
+ end
187
+
188
+ # Creates a training or a batch prediction job.
189
+ # @param [String] parent
190
+ # Required. The project name.
191
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Job] google_cloud_ml_v1__job_object
192
+ # @param [String] fields
193
+ # Selector specifying which fields to include in a partial response.
194
+ # @param [String] quota_user
195
+ # Available to use for quota purposes for server-side applications. Can be any
196
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
197
+ # @param [Google::Apis::RequestOptions] options
198
+ # Request-specific options
199
+ #
200
+ # @yield [result, err] Result & error if block supplied
201
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Job] parsed result object
202
+ # @yieldparam err [StandardError] error object if request failed
203
+ #
204
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Job]
205
+ #
206
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
207
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
208
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
209
+ def create_project_job(parent, google_cloud_ml_v1__job_object = nil, fields: nil, quota_user: nil, options: nil, &block)
210
+ command = make_simple_command(:post, 'v1/{+parent}/jobs', options)
211
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
212
+ command.request_object = google_cloud_ml_v1__job_object
213
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
214
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job
215
+ command.params['parent'] = parent unless parent.nil?
216
+ command.query['fields'] = fields unless fields.nil?
217
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
218
+ execute_or_queue_command(command, &block)
219
+ end
220
+
221
+ # Describes a job.
222
+ # @param [String] name
223
+ # Required. The name of the job to get the description of.
224
+ # @param [String] fields
225
+ # Selector specifying which fields to include in a partial response.
226
+ # @param [String] quota_user
227
+ # Available to use for quota purposes for server-side applications. Can be any
228
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
229
+ # @param [Google::Apis::RequestOptions] options
230
+ # Request-specific options
231
+ #
232
+ # @yield [result, err] Result & error if block supplied
233
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Job] parsed result object
234
+ # @yieldparam err [StandardError] error object if request failed
235
+ #
236
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Job]
237
+ #
238
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
239
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
240
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
241
+ def get_project_job(name, fields: nil, quota_user: nil, options: nil, &block)
242
+ command = make_simple_command(:get, 'v1/{+name}', options)
243
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
244
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job
245
+ command.params['name'] = name unless name.nil?
246
+ command.query['fields'] = fields unless fields.nil?
247
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
248
+ execute_or_queue_command(command, &block)
249
+ end
250
+
251
+ # Gets the access control policy for a resource. Returns an empty policy if the
252
+ # resource exists and does not have a policy set.
253
+ # @param [String] resource
254
+ # REQUIRED: The resource for which the policy is being requested. See the
255
+ # operation documentation for the appropriate value for this field.
256
+ # @param [Fixnum] options_requested_policy_version
257
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
258
+ # 3. Requests specifying an invalid value will be rejected. Requests for
259
+ # policies with any conditional bindings must specify version 3. Policies
260
+ # without any conditional bindings may specify any valid value or leave the
261
+ # field unset. To learn which resources support conditions in their IAM policies,
262
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
263
+ # resource-policies).
264
+ # @param [String] fields
265
+ # Selector specifying which fields to include in a partial response.
266
+ # @param [String] quota_user
267
+ # Available to use for quota purposes for server-side applications. Can be any
268
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
269
+ # @param [Google::Apis::RequestOptions] options
270
+ # Request-specific options
271
+ #
272
+ # @yield [result, err] Result & error if block supplied
273
+ # @yieldparam result [Google::Apis::MlV1::GoogleIamV1Policy] parsed result object
274
+ # @yieldparam err [StandardError] error object if request failed
275
+ #
276
+ # @return [Google::Apis::MlV1::GoogleIamV1Policy]
277
+ #
278
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
279
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
280
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
281
+ def get_project_job_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
282
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
283
+ command.response_representation = Google::Apis::MlV1::GoogleIamV1Policy::Representation
284
+ command.response_class = Google::Apis::MlV1::GoogleIamV1Policy
285
+ command.params['resource'] = resource unless resource.nil?
286
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
287
+ command.query['fields'] = fields unless fields.nil?
288
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
289
+ execute_or_queue_command(command, &block)
290
+ end
291
+
292
+ # Lists the jobs in the project. If there are no jobs that match the request
293
+ # parameters, the list request returns an empty response body: ``.
294
+ # @param [String] parent
295
+ # Required. The name of the project for which to list jobs.
296
+ # @param [String] filter
297
+ # Optional. Specifies the subset of jobs to retrieve. You can filter on the
298
+ # value of one or more attributes of the job object. For example, retrieve jobs
299
+ # with a job identifier that starts with 'census': gcloud ai-platform jobs list -
300
+ # -filter='jobId:census*' List all failed jobs with names that start with 'rnn':
301
+ # gcloud ai-platform jobs list --filter='jobId:rnn* AND state:FAILED' For more
302
+ # examples, see the guide to monitoring jobs.
303
+ # @param [Fixnum] page_size
304
+ # Optional. The number of jobs to retrieve per "page" of results. If there are
305
+ # more remaining results than this number, the response message will contain a
306
+ # valid value in the `next_page_token` field. The default value is 20, and the
307
+ # maximum page size is 100.
308
+ # @param [String] page_token
309
+ # Optional. A page token to request the next page of results. You get the token
310
+ # from the `next_page_token` field of the response from the previous call.
311
+ # @param [String] fields
312
+ # Selector specifying which fields to include in a partial response.
313
+ # @param [String] quota_user
314
+ # Available to use for quota purposes for server-side applications. Can be any
315
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
316
+ # @param [Google::Apis::RequestOptions] options
317
+ # Request-specific options
318
+ #
319
+ # @yield [result, err] Result & error if block supplied
320
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse] parsed result object
321
+ # @yieldparam err [StandardError] error object if request failed
322
+ #
323
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse]
324
+ #
325
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
326
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
327
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
328
+ def list_project_jobs(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
329
+ command = make_simple_command(:get, 'v1/{+parent}/jobs', options)
330
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse::Representation
331
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListJobsResponse
332
+ command.params['parent'] = parent unless parent.nil?
333
+ command.query['filter'] = filter unless filter.nil?
334
+ command.query['pageSize'] = page_size unless page_size.nil?
335
+ command.query['pageToken'] = page_token unless page_token.nil?
336
+ command.query['fields'] = fields unless fields.nil?
337
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
338
+ execute_or_queue_command(command, &block)
339
+ end
340
+
341
+ # Updates a specific job resource. Currently the only supported fields to update
342
+ # are `labels`.
343
+ # @param [String] name
344
+ # Required. The job name.
345
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Job] google_cloud_ml_v1__job_object
346
+ # @param [String] update_mask
347
+ # Required. Specifies the path, relative to `Job`, of the field to update. To
348
+ # adopt etag mechanism, include `etag` field in the mask, and include the `etag`
349
+ # value in your job resource. For example, to change the labels of a job, the `
350
+ # update_mask` parameter would be specified as `labels`, `etag`, and the `PATCH`
351
+ # request body would specify the new value, as follows: ` "labels": ` "owner": "
352
+ # Google", "color": "Blue" ` "etag": "33a64df551425fcc55e4d42a148795d9f25f89d4" `
353
+ # If `etag` matches the one on the server, the labels of the job will be
354
+ # replaced with the given ones, and the server end `etag` will be recalculated.
355
+ # Currently the only supported update masks are `labels` and `etag`.
356
+ # @param [String] fields
357
+ # Selector specifying which fields to include in a partial response.
358
+ # @param [String] quota_user
359
+ # Available to use for quota purposes for server-side applications. Can be any
360
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
361
+ # @param [Google::Apis::RequestOptions] options
362
+ # Request-specific options
363
+ #
364
+ # @yield [result, err] Result & error if block supplied
365
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Job] parsed result object
366
+ # @yieldparam err [StandardError] error object if request failed
367
+ #
368
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Job]
369
+ #
370
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
371
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
372
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
373
+ def patch_project_job(name, google_cloud_ml_v1__job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
374
+ command = make_simple_command(:patch, 'v1/{+name}', options)
375
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
376
+ command.request_object = google_cloud_ml_v1__job_object
377
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Job::Representation
378
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Job
379
+ command.params['name'] = name unless name.nil?
380
+ command.query['updateMask'] = update_mask unless update_mask.nil?
381
+ command.query['fields'] = fields unless fields.nil?
382
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
383
+ execute_or_queue_command(command, &block)
384
+ end
385
+
386
+ # Sets the access control policy on the specified resource. Replaces any
387
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
388
+ # PERMISSION_DENIED` errors.
389
+ # @param [String] resource
390
+ # REQUIRED: The resource for which the policy is being specified. See the
391
+ # operation documentation for the appropriate value for this field.
392
+ # @param [Google::Apis::MlV1::GoogleIamV1SetIamPolicyRequest] google_iam_v1__set_iam_policy_request_object
393
+ # @param [String] fields
394
+ # Selector specifying which fields to include in a partial response.
395
+ # @param [String] quota_user
396
+ # Available to use for quota purposes for server-side applications. Can be any
397
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
398
+ # @param [Google::Apis::RequestOptions] options
399
+ # Request-specific options
400
+ #
401
+ # @yield [result, err] Result & error if block supplied
402
+ # @yieldparam result [Google::Apis::MlV1::GoogleIamV1Policy] parsed result object
403
+ # @yieldparam err [StandardError] error object if request failed
404
+ #
405
+ # @return [Google::Apis::MlV1::GoogleIamV1Policy]
406
+ #
407
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
408
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
409
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
410
+ def set_project_job_iam_policy(resource, google_iam_v1__set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
411
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
412
+ command.request_representation = Google::Apis::MlV1::GoogleIamV1SetIamPolicyRequest::Representation
413
+ command.request_object = google_iam_v1__set_iam_policy_request_object
414
+ command.response_representation = Google::Apis::MlV1::GoogleIamV1Policy::Representation
415
+ command.response_class = Google::Apis::MlV1::GoogleIamV1Policy
416
+ command.params['resource'] = resource unless resource.nil?
417
+ command.query['fields'] = fields unless fields.nil?
418
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
419
+ execute_or_queue_command(command, &block)
420
+ end
421
+
422
+ # Returns permissions that a caller has on the specified resource. If the
423
+ # resource does not exist, this will return an empty set of permissions, not a `
424
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
425
+ # permission-aware UIs and command-line tools, not for authorization checking.
426
+ # This operation may "fail open" without warning.
427
+ # @param [String] resource
428
+ # REQUIRED: The resource for which the policy detail is being requested. See the
429
+ # operation documentation for the appropriate value for this field.
430
+ # @param [Google::Apis::MlV1::GoogleIamV1TestIamPermissionsRequest] google_iam_v1__test_iam_permissions_request_object
431
+ # @param [String] fields
432
+ # Selector specifying which fields to include in a partial response.
433
+ # @param [String] quota_user
434
+ # Available to use for quota purposes for server-side applications. Can be any
435
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
436
+ # @param [Google::Apis::RequestOptions] options
437
+ # Request-specific options
438
+ #
439
+ # @yield [result, err] Result & error if block supplied
440
+ # @yieldparam result [Google::Apis::MlV1::GoogleIamV1TestIamPermissionsResponse] parsed result object
441
+ # @yieldparam err [StandardError] error object if request failed
442
+ #
443
+ # @return [Google::Apis::MlV1::GoogleIamV1TestIamPermissionsResponse]
444
+ #
445
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
446
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
447
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
448
+ def test_project_job_iam_permissions(resource, google_iam_v1__test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
449
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
450
+ command.request_representation = Google::Apis::MlV1::GoogleIamV1TestIamPermissionsRequest::Representation
451
+ command.request_object = google_iam_v1__test_iam_permissions_request_object
452
+ command.response_representation = Google::Apis::MlV1::GoogleIamV1TestIamPermissionsResponse::Representation
453
+ command.response_class = Google::Apis::MlV1::GoogleIamV1TestIamPermissionsResponse
454
+ command.params['resource'] = resource unless resource.nil?
455
+ command.query['fields'] = fields unless fields.nil?
456
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
457
+ execute_or_queue_command(command, &block)
458
+ end
459
+
460
+ # Get the complete list of CMLE capabilities in a location, along with their
461
+ # location-specific properties.
462
+ # @param [String] name
463
+ # Required. The name of the location.
464
+ # @param [String] fields
465
+ # Selector specifying which fields to include in a partial response.
466
+ # @param [String] quota_user
467
+ # Available to use for quota purposes for server-side applications. Can be any
468
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
469
+ # @param [Google::Apis::RequestOptions] options
470
+ # Request-specific options
471
+ #
472
+ # @yield [result, err] Result & error if block supplied
473
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Location] parsed result object
474
+ # @yieldparam err [StandardError] error object if request failed
475
+ #
476
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Location]
477
+ #
478
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
479
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
480
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
481
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
482
+ command = make_simple_command(:get, 'v1/{+name}', options)
483
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Location::Representation
484
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Location
485
+ command.params['name'] = name unless name.nil?
486
+ command.query['fields'] = fields unless fields.nil?
487
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
488
+ execute_or_queue_command(command, &block)
489
+ end
490
+
491
+ # List all locations that provides at least one type of CMLE capability.
492
+ # @param [String] parent
493
+ # Required. The name of the project for which available locations are to be
494
+ # listed (since some locations might be whitelisted for specific projects).
495
+ # @param [Fixnum] page_size
496
+ # Optional. The number of locations to retrieve per "page" of results. If there
497
+ # are more remaining results than this number, the response message will contain
498
+ # a valid value in the `next_page_token` field. The default value is 20, and the
499
+ # maximum page size is 100.
500
+ # @param [String] page_token
501
+ # Optional. A page token to request the next page of results. You get the token
502
+ # from the `next_page_token` field of the response from the previous call.
503
+ # @param [String] fields
504
+ # Selector specifying which fields to include in a partial response.
505
+ # @param [String] quota_user
506
+ # Available to use for quota purposes for server-side applications. Can be any
507
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
508
+ # @param [Google::Apis::RequestOptions] options
509
+ # Request-specific options
510
+ #
511
+ # @yield [result, err] Result & error if block supplied
512
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListLocationsResponse] parsed result object
513
+ # @yieldparam err [StandardError] error object if request failed
514
+ #
515
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListLocationsResponse]
516
+ #
517
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
518
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
519
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
520
+ def list_project_locations(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
521
+ command = make_simple_command(:get, 'v1/{+parent}/locations', options)
522
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListLocationsResponse::Representation
523
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListLocationsResponse
524
+ command.params['parent'] = parent unless parent.nil?
525
+ command.query['pageSize'] = page_size unless page_size.nil?
526
+ command.query['pageToken'] = page_token unless page_token.nil?
527
+ command.query['fields'] = fields unless fields.nil?
528
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
529
+ execute_or_queue_command(command, &block)
530
+ end
531
+
532
+ # Starts asynchronous cancellation on a long-running operation. The server makes
533
+ # a best effort to cancel the operation, but success is not guaranteed. If the
534
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
535
+ # Clients can use Operations.GetOperation or other methods to check whether the
536
+ # cancellation succeeded or whether the operation completed despite cancellation.
537
+ # On successful cancellation, the operation is not deleted; instead, it becomes
538
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
539
+ # corresponding to `Code.CANCELLED`.
540
+ # @param [String] name
541
+ # The name of the operation resource to be cancelled.
542
+ # @param [String] fields
543
+ # Selector specifying which fields to include in a partial response.
544
+ # @param [String] quota_user
545
+ # Available to use for quota purposes for server-side applications. Can be any
546
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
547
+ # @param [Google::Apis::RequestOptions] options
548
+ # Request-specific options
549
+ #
550
+ # @yield [result, err] Result & error if block supplied
551
+ # @yieldparam result [Google::Apis::MlV1::GoogleProtobufEmpty] parsed result object
552
+ # @yieldparam err [StandardError] error object if request failed
553
+ #
554
+ # @return [Google::Apis::MlV1::GoogleProtobufEmpty]
555
+ #
556
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
557
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
558
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
559
+ def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
560
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
561
+ command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
562
+ command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
563
+ command.params['name'] = name unless name.nil?
564
+ command.query['fields'] = fields unless fields.nil?
565
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
566
+ execute_or_queue_command(command, &block)
567
+ end
568
+
569
+ # Gets the latest state of a long-running operation. Clients can use this method
570
+ # to poll the operation result at intervals as recommended by the API service.
571
+ # @param [String] name
572
+ # The name of the operation resource.
573
+ # @param [String] fields
574
+ # Selector specifying which fields to include in a partial response.
575
+ # @param [String] quota_user
576
+ # Available to use for quota purposes for server-side applications. Can be any
577
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
578
+ # @param [Google::Apis::RequestOptions] options
579
+ # Request-specific options
580
+ #
581
+ # @yield [result, err] Result & error if block supplied
582
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
583
+ # @yieldparam err [StandardError] error object if request failed
584
+ #
585
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
586
+ #
587
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
588
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
589
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
590
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
591
+ command = make_simple_command(:get, 'v1/{+name}', options)
592
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
593
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
594
+ command.params['name'] = name unless name.nil?
595
+ command.query['fields'] = fields unless fields.nil?
596
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
597
+ execute_or_queue_command(command, &block)
598
+ end
599
+
600
+ # Creates a study.
601
+ # @param [String] parent
602
+ # Required. The project and location that the study belongs to. Format: projects/
603
+ # `project`/locations/`location`
604
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Study] google_cloud_ml_v1__study_object
605
+ # @param [String] study_id
606
+ # Required. The ID to use for the study, which will become the final component
607
+ # of the study's resource name.
608
+ # @param [String] fields
609
+ # Selector specifying which fields to include in a partial response.
610
+ # @param [String] quota_user
611
+ # Available to use for quota purposes for server-side applications. Can be any
612
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
613
+ # @param [Google::Apis::RequestOptions] options
614
+ # Request-specific options
615
+ #
616
+ # @yield [result, err] Result & error if block supplied
617
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Study] parsed result object
618
+ # @yieldparam err [StandardError] error object if request failed
619
+ #
620
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Study]
621
+ #
622
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
623
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
624
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
625
+ def create_project_location_study(parent, google_cloud_ml_v1__study_object = nil, study_id: nil, fields: nil, quota_user: nil, options: nil, &block)
626
+ command = make_simple_command(:post, 'v1/{+parent}/studies', options)
627
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Study::Representation
628
+ command.request_object = google_cloud_ml_v1__study_object
629
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Study::Representation
630
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Study
631
+ command.params['parent'] = parent unless parent.nil?
632
+ command.query['studyId'] = study_id unless study_id.nil?
633
+ command.query['fields'] = fields unless fields.nil?
634
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
635
+ execute_or_queue_command(command, &block)
636
+ end
637
+
638
+ # Deletes a study.
639
+ # @param [String] name
640
+ # Required. The study name.
641
+ # @param [String] fields
642
+ # Selector specifying which fields to include in a partial response.
643
+ # @param [String] quota_user
644
+ # Available to use for quota purposes for server-side applications. Can be any
645
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
646
+ # @param [Google::Apis::RequestOptions] options
647
+ # Request-specific options
648
+ #
649
+ # @yield [result, err] Result & error if block supplied
650
+ # @yieldparam result [Google::Apis::MlV1::GoogleProtobufEmpty] parsed result object
651
+ # @yieldparam err [StandardError] error object if request failed
652
+ #
653
+ # @return [Google::Apis::MlV1::GoogleProtobufEmpty]
654
+ #
655
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
656
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
657
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
658
+ def delete_project_location_study(name, fields: nil, quota_user: nil, options: nil, &block)
659
+ command = make_simple_command(:delete, 'v1/{+name}', options)
660
+ command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
661
+ command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
662
+ command.params['name'] = name unless name.nil?
663
+ command.query['fields'] = fields unless fields.nil?
664
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
665
+ execute_or_queue_command(command, &block)
666
+ end
667
+
668
+ # Gets a study.
669
+ # @param [String] name
670
+ # Required. The study name.
671
+ # @param [String] fields
672
+ # Selector specifying which fields to include in a partial response.
673
+ # @param [String] quota_user
674
+ # Available to use for quota purposes for server-side applications. Can be any
675
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
676
+ # @param [Google::Apis::RequestOptions] options
677
+ # Request-specific options
678
+ #
679
+ # @yield [result, err] Result & error if block supplied
680
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Study] parsed result object
681
+ # @yieldparam err [StandardError] error object if request failed
682
+ #
683
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Study]
684
+ #
685
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
686
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
687
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
688
+ def get_project_location_study(name, fields: nil, quota_user: nil, options: nil, &block)
689
+ command = make_simple_command(:get, 'v1/{+name}', options)
690
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Study::Representation
691
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Study
692
+ command.params['name'] = name unless name.nil?
693
+ command.query['fields'] = fields unless fields.nil?
694
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
695
+ execute_or_queue_command(command, &block)
696
+ end
697
+
698
+ # Lists all the studies in a region for an associated project.
699
+ # @param [String] parent
700
+ # Required. The project and location that the study belongs to. Format: projects/
701
+ # `project`/locations/`location`
702
+ # @param [String] fields
703
+ # Selector specifying which fields to include in a partial response.
704
+ # @param [String] quota_user
705
+ # Available to use for quota purposes for server-side applications. Can be any
706
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
707
+ # @param [Google::Apis::RequestOptions] options
708
+ # Request-specific options
709
+ #
710
+ # @yield [result, err] Result & error if block supplied
711
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListStudiesResponse] parsed result object
712
+ # @yieldparam err [StandardError] error object if request failed
713
+ #
714
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListStudiesResponse]
715
+ #
716
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
717
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
718
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
719
+ def list_project_location_studies(parent, fields: nil, quota_user: nil, options: nil, &block)
720
+ command = make_simple_command(:get, 'v1/{+parent}/studies', options)
721
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListStudiesResponse::Representation
722
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListStudiesResponse
723
+ command.params['parent'] = parent unless parent.nil?
724
+ command.query['fields'] = fields unless fields.nil?
725
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
726
+ execute_or_queue_command(command, &block)
727
+ end
728
+
729
+ # Adds a measurement of the objective metrics to a trial. This measurement is
730
+ # assumed to have been taken before the trial is complete.
731
+ # @param [String] name
732
+ # Required. The trial name.
733
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1AddTrialMeasurementRequest] google_cloud_ml_v1__add_trial_measurement_request_object
734
+ # @param [String] fields
735
+ # Selector specifying which fields to include in a partial response.
736
+ # @param [String] quota_user
737
+ # Available to use for quota purposes for server-side applications. Can be any
738
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
739
+ # @param [Google::Apis::RequestOptions] options
740
+ # Request-specific options
741
+ #
742
+ # @yield [result, err] Result & error if block supplied
743
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Trial] parsed result object
744
+ # @yieldparam err [StandardError] error object if request failed
745
+ #
746
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial]
747
+ #
748
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
749
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
750
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
751
+ def add_project_location_study_trial_measurement(name, google_cloud_ml_v1__add_trial_measurement_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
752
+ command = make_simple_command(:post, 'v1/{+name}:addMeasurement', options)
753
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1AddTrialMeasurementRequest::Representation
754
+ command.request_object = google_cloud_ml_v1__add_trial_measurement_request_object
755
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation
756
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial
757
+ command.params['name'] = name unless name.nil?
758
+ command.query['fields'] = fields unless fields.nil?
759
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
760
+ execute_or_queue_command(command, &block)
761
+ end
762
+
763
+ # Checks whether a trial should stop or not. Returns a long-running operation.
764
+ # When the operation is successful, it will contain a
765
+ # CheckTrialEarlyStoppingStateResponse.
766
+ # @param [String] name
767
+ # Required. The trial name.
768
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest] google_cloud_ml_v1__check_trial_early_stopping_state_request_object
769
+ # @param [String] fields
770
+ # Selector specifying which fields to include in a partial response.
771
+ # @param [String] quota_user
772
+ # Available to use for quota purposes for server-side applications. Can be any
773
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
774
+ # @param [Google::Apis::RequestOptions] options
775
+ # Request-specific options
776
+ #
777
+ # @yield [result, err] Result & error if block supplied
778
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
779
+ # @yieldparam err [StandardError] error object if request failed
780
+ #
781
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
782
+ #
783
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
784
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
785
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
786
+ def check_project_location_study_trial_early_stopping_state(name, google_cloud_ml_v1__check_trial_early_stopping_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
787
+ command = make_simple_command(:post, 'v1/{+name}:checkEarlyStoppingState', options)
788
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1CheckTrialEarlyStoppingStateRequest::Representation
789
+ command.request_object = google_cloud_ml_v1__check_trial_early_stopping_state_request_object
790
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
791
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
792
+ command.params['name'] = name unless name.nil?
793
+ command.query['fields'] = fields unless fields.nil?
794
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
795
+ execute_or_queue_command(command, &block)
796
+ end
797
+
798
+ # Marks a trial as complete.
799
+ # @param [String] name
800
+ # Required. The trial name.metat
801
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1CompleteTrialRequest] google_cloud_ml_v1__complete_trial_request_object
802
+ # @param [String] fields
803
+ # Selector specifying which fields to include in a partial response.
804
+ # @param [String] quota_user
805
+ # Available to use for quota purposes for server-side applications. Can be any
806
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
807
+ # @param [Google::Apis::RequestOptions] options
808
+ # Request-specific options
809
+ #
810
+ # @yield [result, err] Result & error if block supplied
811
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Trial] parsed result object
812
+ # @yieldparam err [StandardError] error object if request failed
813
+ #
814
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial]
815
+ #
816
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
817
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
818
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
819
+ def complete_project_location_study_trial(name, google_cloud_ml_v1__complete_trial_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
820
+ command = make_simple_command(:post, 'v1/{+name}:complete', options)
821
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1CompleteTrialRequest::Representation
822
+ command.request_object = google_cloud_ml_v1__complete_trial_request_object
823
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation
824
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial
825
+ command.params['name'] = name unless name.nil?
826
+ command.query['fields'] = fields unless fields.nil?
827
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
828
+ execute_or_queue_command(command, &block)
829
+ end
830
+
831
+ # Adds a user provided trial to a study.
832
+ # @param [String] parent
833
+ # Required. The name of the study that the trial belongs to.
834
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Trial] google_cloud_ml_v1__trial_object
835
+ # @param [String] fields
836
+ # Selector specifying which fields to include in a partial response.
837
+ # @param [String] quota_user
838
+ # Available to use for quota purposes for server-side applications. Can be any
839
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
840
+ # @param [Google::Apis::RequestOptions] options
841
+ # Request-specific options
842
+ #
843
+ # @yield [result, err] Result & error if block supplied
844
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Trial] parsed result object
845
+ # @yieldparam err [StandardError] error object if request failed
846
+ #
847
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial]
848
+ #
849
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
850
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
851
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
852
+ def create_project_location_study_trial(parent, google_cloud_ml_v1__trial_object = nil, fields: nil, quota_user: nil, options: nil, &block)
853
+ command = make_simple_command(:post, 'v1/{+parent}/trials', options)
854
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation
855
+ command.request_object = google_cloud_ml_v1__trial_object
856
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation
857
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial
858
+ command.params['parent'] = parent unless parent.nil?
859
+ command.query['fields'] = fields unless fields.nil?
860
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
861
+ execute_or_queue_command(command, &block)
862
+ end
863
+
864
+ # Deletes a trial.
865
+ # @param [String] name
866
+ # Required. The trial name.
867
+ # @param [String] fields
868
+ # Selector specifying which fields to include in a partial response.
869
+ # @param [String] quota_user
870
+ # Available to use for quota purposes for server-side applications. Can be any
871
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
872
+ # @param [Google::Apis::RequestOptions] options
873
+ # Request-specific options
874
+ #
875
+ # @yield [result, err] Result & error if block supplied
876
+ # @yieldparam result [Google::Apis::MlV1::GoogleProtobufEmpty] parsed result object
877
+ # @yieldparam err [StandardError] error object if request failed
878
+ #
879
+ # @return [Google::Apis::MlV1::GoogleProtobufEmpty]
880
+ #
881
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
882
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
883
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
884
+ def delete_project_location_study_trial(name, fields: nil, quota_user: nil, options: nil, &block)
885
+ command = make_simple_command(:delete, 'v1/{+name}', options)
886
+ command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
887
+ command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
888
+ command.params['name'] = name unless name.nil?
889
+ command.query['fields'] = fields unless fields.nil?
890
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
891
+ execute_or_queue_command(command, &block)
892
+ end
893
+
894
+ # Gets a trial.
895
+ # @param [String] name
896
+ # Required. The trial name.
897
+ # @param [String] fields
898
+ # Selector specifying which fields to include in a partial response.
899
+ # @param [String] quota_user
900
+ # Available to use for quota purposes for server-side applications. Can be any
901
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
902
+ # @param [Google::Apis::RequestOptions] options
903
+ # Request-specific options
904
+ #
905
+ # @yield [result, err] Result & error if block supplied
906
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Trial] parsed result object
907
+ # @yieldparam err [StandardError] error object if request failed
908
+ #
909
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial]
910
+ #
911
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
912
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
913
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
914
+ def get_project_location_study_trial(name, fields: nil, quota_user: nil, options: nil, &block)
915
+ command = make_simple_command(:get, 'v1/{+name}', options)
916
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation
917
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial
918
+ command.params['name'] = name unless name.nil?
919
+ command.query['fields'] = fields unless fields.nil?
920
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
921
+ execute_or_queue_command(command, &block)
922
+ end
923
+
924
+ # Lists the trials associated with a study.
925
+ # @param [String] parent
926
+ # Required. The name of the study that the trial belongs to.
927
+ # @param [String] fields
928
+ # Selector specifying which fields to include in a partial response.
929
+ # @param [String] quota_user
930
+ # Available to use for quota purposes for server-side applications. Can be any
931
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
932
+ # @param [Google::Apis::RequestOptions] options
933
+ # Request-specific options
934
+ #
935
+ # @yield [result, err] Result & error if block supplied
936
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListTrialsResponse] parsed result object
937
+ # @yieldparam err [StandardError] error object if request failed
938
+ #
939
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListTrialsResponse]
940
+ #
941
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
942
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
943
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
944
+ def list_project_location_study_trials(parent, fields: nil, quota_user: nil, options: nil, &block)
945
+ command = make_simple_command(:get, 'v1/{+parent}/trials', options)
946
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListTrialsResponse::Representation
947
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListTrialsResponse
948
+ command.params['parent'] = parent unless parent.nil?
949
+ command.query['fields'] = fields unless fields.nil?
950
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
951
+ execute_or_queue_command(command, &block)
952
+ end
953
+
954
+ # Lists the pareto-optimal trials for multi-objective study or the optimal
955
+ # trials for single-objective study. The definition of pareto-optimal can be
956
+ # checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency
957
+ # @param [String] parent
958
+ # Required. The name of the study that the pareto-optimal trial belongs to.
959
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1ListOptimalTrialsRequest] google_cloud_ml_v1__list_optimal_trials_request_object
960
+ # @param [String] fields
961
+ # Selector specifying which fields to include in a partial response.
962
+ # @param [String] quota_user
963
+ # Available to use for quota purposes for server-side applications. Can be any
964
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
965
+ # @param [Google::Apis::RequestOptions] options
966
+ # Request-specific options
967
+ #
968
+ # @yield [result, err] Result & error if block supplied
969
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListOptimalTrialsResponse] parsed result object
970
+ # @yieldparam err [StandardError] error object if request failed
971
+ #
972
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListOptimalTrialsResponse]
973
+ #
974
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
975
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
976
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
977
+ def list_project_location_study_trial_optimal_trials(parent, google_cloud_ml_v1__list_optimal_trials_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
978
+ command = make_simple_command(:post, 'v1/{+parent}/trials:listOptimalTrials', options)
979
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1ListOptimalTrialsRequest::Representation
980
+ command.request_object = google_cloud_ml_v1__list_optimal_trials_request_object
981
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListOptimalTrialsResponse::Representation
982
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListOptimalTrialsResponse
983
+ command.params['parent'] = parent unless parent.nil?
984
+ command.query['fields'] = fields unless fields.nil?
985
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
986
+ execute_or_queue_command(command, &block)
987
+ end
988
+
989
+ # Stops a trial.
990
+ # @param [String] name
991
+ # Required. The trial name.
992
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1StopTrialRequest] google_cloud_ml_v1__stop_trial_request_object
993
+ # @param [String] fields
994
+ # Selector specifying which fields to include in a partial response.
995
+ # @param [String] quota_user
996
+ # Available to use for quota purposes for server-side applications. Can be any
997
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
998
+ # @param [Google::Apis::RequestOptions] options
999
+ # Request-specific options
1000
+ #
1001
+ # @yield [result, err] Result & error if block supplied
1002
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Trial] parsed result object
1003
+ # @yieldparam err [StandardError] error object if request failed
1004
+ #
1005
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Trial]
1006
+ #
1007
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1008
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1009
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1010
+ def stop_project_location_study_trial(name, google_cloud_ml_v1__stop_trial_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1011
+ command = make_simple_command(:post, 'v1/{+name}:stop', options)
1012
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1StopTrialRequest::Representation
1013
+ command.request_object = google_cloud_ml_v1__stop_trial_request_object
1014
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Trial::Representation
1015
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Trial
1016
+ command.params['name'] = name unless name.nil?
1017
+ command.query['fields'] = fields unless fields.nil?
1018
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1019
+ execute_or_queue_command(command, &block)
1020
+ end
1021
+
1022
+ # Adds one or more trials to a study, with parameter values suggested by AI
1023
+ # Platform Vizier. Returns a long-running operation associated with the
1024
+ # generation of trial suggestions. When this long-running operation succeeds, it
1025
+ # will contain a SuggestTrialsResponse.
1026
+ # @param [String] parent
1027
+ # Required. The name of the study that the trial belongs to.
1028
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1SuggestTrialsRequest] google_cloud_ml_v1__suggest_trials_request_object
1029
+ # @param [String] fields
1030
+ # Selector specifying which fields to include in a partial response.
1031
+ # @param [String] quota_user
1032
+ # Available to use for quota purposes for server-side applications. Can be any
1033
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1034
+ # @param [Google::Apis::RequestOptions] options
1035
+ # Request-specific options
1036
+ #
1037
+ # @yield [result, err] Result & error if block supplied
1038
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
1039
+ # @yieldparam err [StandardError] error object if request failed
1040
+ #
1041
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
1042
+ #
1043
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1044
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1045
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1046
+ def suggest_project_location_study_trial(parent, google_cloud_ml_v1__suggest_trials_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1047
+ command = make_simple_command(:post, 'v1/{+parent}/trials:suggest', options)
1048
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1SuggestTrialsRequest::Representation
1049
+ command.request_object = google_cloud_ml_v1__suggest_trials_request_object
1050
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
1051
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
1052
+ command.params['parent'] = parent unless parent.nil?
1053
+ command.query['fields'] = fields unless fields.nil?
1054
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1055
+ execute_or_queue_command(command, &block)
1056
+ end
1057
+
1058
+ # Creates a model which will later contain one or more versions. You must add at
1059
+ # least one version before you can request predictions from the model. Add
1060
+ # versions by calling projects.models.versions.create.
1061
+ # @param [String] parent
1062
+ # Required. The project name.
1063
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Model] google_cloud_ml_v1__model_object
1064
+ # @param [String] fields
1065
+ # Selector specifying which fields to include in a partial response.
1066
+ # @param [String] quota_user
1067
+ # Available to use for quota purposes for server-side applications. Can be any
1068
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1069
+ # @param [Google::Apis::RequestOptions] options
1070
+ # Request-specific options
1071
+ #
1072
+ # @yield [result, err] Result & error if block supplied
1073
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Model] parsed result object
1074
+ # @yieldparam err [StandardError] error object if request failed
1075
+ #
1076
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Model]
1077
+ #
1078
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1079
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1080
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1081
+ def create_project_model(parent, google_cloud_ml_v1__model_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1082
+ command = make_simple_command(:post, 'v1/{+parent}/models', options)
1083
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
1084
+ command.request_object = google_cloud_ml_v1__model_object
1085
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
1086
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Model
1087
+ command.params['parent'] = parent unless parent.nil?
1088
+ command.query['fields'] = fields unless fields.nil?
1089
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1090
+ execute_or_queue_command(command, &block)
1091
+ end
1092
+
1093
+ # Deletes a model. You can only delete a model if there are no versions in it.
1094
+ # You can delete versions by calling projects.models.versions.delete.
1095
+ # @param [String] name
1096
+ # Required. The name of the model.
1097
+ # @param [String] fields
1098
+ # Selector specifying which fields to include in a partial response.
1099
+ # @param [String] quota_user
1100
+ # Available to use for quota purposes for server-side applications. Can be any
1101
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1102
+ # @param [Google::Apis::RequestOptions] options
1103
+ # Request-specific options
1104
+ #
1105
+ # @yield [result, err] Result & error if block supplied
1106
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
1107
+ # @yieldparam err [StandardError] error object if request failed
1108
+ #
1109
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
1110
+ #
1111
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1112
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1113
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1114
+ def delete_project_model(name, fields: nil, quota_user: nil, options: nil, &block)
1115
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1116
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
1117
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
1118
+ command.params['name'] = name unless name.nil?
1119
+ command.query['fields'] = fields unless fields.nil?
1120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1121
+ execute_or_queue_command(command, &block)
1122
+ end
1123
+
1124
+ # Gets information about a model, including its name, the description (if set),
1125
+ # and the default version (if at least one version of the model has been
1126
+ # deployed).
1127
+ # @param [String] name
1128
+ # Required. The name of the model.
1129
+ # @param [String] fields
1130
+ # Selector specifying which fields to include in a partial response.
1131
+ # @param [String] quota_user
1132
+ # Available to use for quota purposes for server-side applications. Can be any
1133
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1134
+ # @param [Google::Apis::RequestOptions] options
1135
+ # Request-specific options
1136
+ #
1137
+ # @yield [result, err] Result & error if block supplied
1138
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Model] parsed result object
1139
+ # @yieldparam err [StandardError] error object if request failed
1140
+ #
1141
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Model]
1142
+ #
1143
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1144
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1145
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1146
+ def get_project_model(name, fields: nil, quota_user: nil, options: nil, &block)
1147
+ command = make_simple_command(:get, 'v1/{+name}', options)
1148
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
1149
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Model
1150
+ command.params['name'] = name unless name.nil?
1151
+ command.query['fields'] = fields unless fields.nil?
1152
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1153
+ execute_or_queue_command(command, &block)
1154
+ end
1155
+
1156
+ # Gets the access control policy for a resource. Returns an empty policy if the
1157
+ # resource exists and does not have a policy set.
1158
+ # @param [String] resource
1159
+ # REQUIRED: The resource for which the policy is being requested. See the
1160
+ # operation documentation for the appropriate value for this field.
1161
+ # @param [Fixnum] options_requested_policy_version
1162
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
1163
+ # 3. Requests specifying an invalid value will be rejected. Requests for
1164
+ # policies with any conditional bindings must specify version 3. Policies
1165
+ # without any conditional bindings may specify any valid value or leave the
1166
+ # field unset. To learn which resources support conditions in their IAM policies,
1167
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
1168
+ # resource-policies).
1169
+ # @param [String] fields
1170
+ # Selector specifying which fields to include in a partial response.
1171
+ # @param [String] quota_user
1172
+ # Available to use for quota purposes for server-side applications. Can be any
1173
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1174
+ # @param [Google::Apis::RequestOptions] options
1175
+ # Request-specific options
1176
+ #
1177
+ # @yield [result, err] Result & error if block supplied
1178
+ # @yieldparam result [Google::Apis::MlV1::GoogleIamV1Policy] parsed result object
1179
+ # @yieldparam err [StandardError] error object if request failed
1180
+ #
1181
+ # @return [Google::Apis::MlV1::GoogleIamV1Policy]
1182
+ #
1183
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1184
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1185
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1186
+ def get_project_model_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
1187
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
1188
+ command.response_representation = Google::Apis::MlV1::GoogleIamV1Policy::Representation
1189
+ command.response_class = Google::Apis::MlV1::GoogleIamV1Policy
1190
+ command.params['resource'] = resource unless resource.nil?
1191
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
1192
+ command.query['fields'] = fields unless fields.nil?
1193
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1194
+ execute_or_queue_command(command, &block)
1195
+ end
1196
+
1197
+ # Lists the models in a project. Each project can contain multiple models, and
1198
+ # each model can have multiple versions. If there are no models that match the
1199
+ # request parameters, the list request returns an empty response body: ``.
1200
+ # @param [String] parent
1201
+ # Required. The name of the project whose models are to be listed.
1202
+ # @param [String] filter
1203
+ # Optional. Specifies the subset of models to retrieve.
1204
+ # @param [Fixnum] page_size
1205
+ # Optional. The number of models to retrieve per "page" of results. If there are
1206
+ # more remaining results than this number, the response message will contain a
1207
+ # valid value in the `next_page_token` field. The default value is 20, and the
1208
+ # maximum page size is 100.
1209
+ # @param [String] page_token
1210
+ # Optional. A page token to request the next page of results. You get the token
1211
+ # from the `next_page_token` field of the response from the previous call.
1212
+ # @param [String] fields
1213
+ # Selector specifying which fields to include in a partial response.
1214
+ # @param [String] quota_user
1215
+ # Available to use for quota purposes for server-side applications. Can be any
1216
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1217
+ # @param [Google::Apis::RequestOptions] options
1218
+ # Request-specific options
1219
+ #
1220
+ # @yield [result, err] Result & error if block supplied
1221
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse] parsed result object
1222
+ # @yieldparam err [StandardError] error object if request failed
1223
+ #
1224
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse]
1225
+ #
1226
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1227
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1228
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1229
+ def list_project_models(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1230
+ command = make_simple_command(:get, 'v1/{+parent}/models', options)
1231
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse::Representation
1232
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListModelsResponse
1233
+ command.params['parent'] = parent unless parent.nil?
1234
+ command.query['filter'] = filter unless filter.nil?
1235
+ command.query['pageSize'] = page_size unless page_size.nil?
1236
+ command.query['pageToken'] = page_token unless page_token.nil?
1237
+ command.query['fields'] = fields unless fields.nil?
1238
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1239
+ execute_or_queue_command(command, &block)
1240
+ end
1241
+
1242
+ # Updates a specific model resource. Currently the only supported fields to
1243
+ # update are `description` and `default_version.name`.
1244
+ # @param [String] name
1245
+ # Required. The project name.
1246
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Model] google_cloud_ml_v1__model_object
1247
+ # @param [String] update_mask
1248
+ # Required. Specifies the path, relative to `Model`, of the field to update. For
1249
+ # example, to change the description of a model to "foo" and set its default
1250
+ # version to "version_1", the `update_mask` parameter would be specified as `
1251
+ # description`, `default_version.name`, and the `PATCH` request body would
1252
+ # specify the new value, as follows: ` "description": "foo", "defaultVersion": `
1253
+ # "name":"version_1" ` ` Currently the supported update masks are `description`
1254
+ # and `default_version.name`.
1255
+ # @param [String] fields
1256
+ # Selector specifying which fields to include in a partial response.
1257
+ # @param [String] quota_user
1258
+ # Available to use for quota purposes for server-side applications. Can be any
1259
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1260
+ # @param [Google::Apis::RequestOptions] options
1261
+ # Request-specific options
1262
+ #
1263
+ # @yield [result, err] Result & error if block supplied
1264
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
1265
+ # @yieldparam err [StandardError] error object if request failed
1266
+ #
1267
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
1268
+ #
1269
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1270
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1271
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1272
+ def patch_project_model(name, google_cloud_ml_v1__model_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1273
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1274
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation
1275
+ command.request_object = google_cloud_ml_v1__model_object
1276
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
1277
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
1278
+ command.params['name'] = name unless name.nil?
1279
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1280
+ command.query['fields'] = fields unless fields.nil?
1281
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1282
+ execute_or_queue_command(command, &block)
1283
+ end
1284
+
1285
+ # Sets the access control policy on the specified resource. Replaces any
1286
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
1287
+ # PERMISSION_DENIED` errors.
1288
+ # @param [String] resource
1289
+ # REQUIRED: The resource for which the policy is being specified. See the
1290
+ # operation documentation for the appropriate value for this field.
1291
+ # @param [Google::Apis::MlV1::GoogleIamV1SetIamPolicyRequest] google_iam_v1__set_iam_policy_request_object
1292
+ # @param [String] fields
1293
+ # Selector specifying which fields to include in a partial response.
1294
+ # @param [String] quota_user
1295
+ # Available to use for quota purposes for server-side applications. Can be any
1296
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1297
+ # @param [Google::Apis::RequestOptions] options
1298
+ # Request-specific options
1299
+ #
1300
+ # @yield [result, err] Result & error if block supplied
1301
+ # @yieldparam result [Google::Apis::MlV1::GoogleIamV1Policy] parsed result object
1302
+ # @yieldparam err [StandardError] error object if request failed
1303
+ #
1304
+ # @return [Google::Apis::MlV1::GoogleIamV1Policy]
1305
+ #
1306
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1307
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1308
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1309
+ def set_project_model_iam_policy(resource, google_iam_v1__set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1310
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
1311
+ command.request_representation = Google::Apis::MlV1::GoogleIamV1SetIamPolicyRequest::Representation
1312
+ command.request_object = google_iam_v1__set_iam_policy_request_object
1313
+ command.response_representation = Google::Apis::MlV1::GoogleIamV1Policy::Representation
1314
+ command.response_class = Google::Apis::MlV1::GoogleIamV1Policy
1315
+ command.params['resource'] = resource unless resource.nil?
1316
+ command.query['fields'] = fields unless fields.nil?
1317
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1318
+ execute_or_queue_command(command, &block)
1319
+ end
1320
+
1321
+ # Returns permissions that a caller has on the specified resource. If the
1322
+ # resource does not exist, this will return an empty set of permissions, not a `
1323
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
1324
+ # permission-aware UIs and command-line tools, not for authorization checking.
1325
+ # This operation may "fail open" without warning.
1326
+ # @param [String] resource
1327
+ # REQUIRED: The resource for which the policy detail is being requested. See the
1328
+ # operation documentation for the appropriate value for this field.
1329
+ # @param [Google::Apis::MlV1::GoogleIamV1TestIamPermissionsRequest] google_iam_v1__test_iam_permissions_request_object
1330
+ # @param [String] fields
1331
+ # Selector specifying which fields to include in a partial response.
1332
+ # @param [String] quota_user
1333
+ # Available to use for quota purposes for server-side applications. Can be any
1334
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1335
+ # @param [Google::Apis::RequestOptions] options
1336
+ # Request-specific options
1337
+ #
1338
+ # @yield [result, err] Result & error if block supplied
1339
+ # @yieldparam result [Google::Apis::MlV1::GoogleIamV1TestIamPermissionsResponse] parsed result object
1340
+ # @yieldparam err [StandardError] error object if request failed
1341
+ #
1342
+ # @return [Google::Apis::MlV1::GoogleIamV1TestIamPermissionsResponse]
1343
+ #
1344
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1345
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1346
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1347
+ def test_project_model_iam_permissions(resource, google_iam_v1__test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1348
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
1349
+ command.request_representation = Google::Apis::MlV1::GoogleIamV1TestIamPermissionsRequest::Representation
1350
+ command.request_object = google_iam_v1__test_iam_permissions_request_object
1351
+ command.response_representation = Google::Apis::MlV1::GoogleIamV1TestIamPermissionsResponse::Representation
1352
+ command.response_class = Google::Apis::MlV1::GoogleIamV1TestIamPermissionsResponse
1353
+ command.params['resource'] = resource unless resource.nil?
1354
+ command.query['fields'] = fields unless fields.nil?
1355
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1356
+ execute_or_queue_command(command, &block)
1357
+ end
1358
+
1359
+ # Creates a new version of a model from a trained TensorFlow model. If the
1360
+ # version created in the cloud by this call is the first deployed version of the
1361
+ # specified model, it will be made the default version of the model. When you
1362
+ # add a version to a model that already has one or more versions, the default
1363
+ # version does not automatically change. If you want a new version to be the
1364
+ # default, you must call projects.models.versions.setDefault.
1365
+ # @param [String] parent
1366
+ # Required. The name of the model.
1367
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Version] google_cloud_ml_v1__version_object
1368
+ # @param [String] fields
1369
+ # Selector specifying which fields to include in a partial response.
1370
+ # @param [String] quota_user
1371
+ # Available to use for quota purposes for server-side applications. Can be any
1372
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1373
+ # @param [Google::Apis::RequestOptions] options
1374
+ # Request-specific options
1375
+ #
1376
+ # @yield [result, err] Result & error if block supplied
1377
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
1378
+ # @yieldparam err [StandardError] error object if request failed
1379
+ #
1380
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
1381
+ #
1382
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1383
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1384
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1385
+ def create_project_model_version(parent, google_cloud_ml_v1__version_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1386
+ command = make_simple_command(:post, 'v1/{+parent}/versions', options)
1387
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
1388
+ command.request_object = google_cloud_ml_v1__version_object
1389
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
1390
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
1391
+ command.params['parent'] = parent unless parent.nil?
1392
+ command.query['fields'] = fields unless fields.nil?
1393
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1394
+ execute_or_queue_command(command, &block)
1395
+ end
1396
+
1397
+ # Deletes a model version. Each model can have multiple versions deployed and in
1398
+ # use at any given time. Use this method to remove a single version. Note: You
1399
+ # cannot delete the version that is set as the default version of the model
1400
+ # unless it is the only remaining version.
1401
+ # @param [String] name
1402
+ # Required. The name of the version. You can get the names of all the versions
1403
+ # of a model by calling projects.models.versions.list.
1404
+ # @param [String] fields
1405
+ # Selector specifying which fields to include in a partial response.
1406
+ # @param [String] quota_user
1407
+ # Available to use for quota purposes for server-side applications. Can be any
1408
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1409
+ # @param [Google::Apis::RequestOptions] options
1410
+ # Request-specific options
1411
+ #
1412
+ # @yield [result, err] Result & error if block supplied
1413
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
1414
+ # @yieldparam err [StandardError] error object if request failed
1415
+ #
1416
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
1417
+ #
1418
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1419
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1420
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1421
+ def delete_project_model_version(name, fields: nil, quota_user: nil, options: nil, &block)
1422
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1423
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
1424
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
1425
+ command.params['name'] = name unless name.nil?
1426
+ command.query['fields'] = fields unless fields.nil?
1427
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1428
+ execute_or_queue_command(command, &block)
1429
+ end
1430
+
1431
+ # Gets information about a model version. Models can have multiple versions. You
1432
+ # can call projects.models.versions.list to get the same information that this
1433
+ # method returns for all of the versions of a model.
1434
+ # @param [String] name
1435
+ # Required. The name of the version.
1436
+ # @param [String] fields
1437
+ # Selector specifying which fields to include in a partial response.
1438
+ # @param [String] quota_user
1439
+ # Available to use for quota purposes for server-side applications. Can be any
1440
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1441
+ # @param [Google::Apis::RequestOptions] options
1442
+ # Request-specific options
1443
+ #
1444
+ # @yield [result, err] Result & error if block supplied
1445
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Version] parsed result object
1446
+ # @yieldparam err [StandardError] error object if request failed
1447
+ #
1448
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
1449
+ #
1450
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1451
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1452
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1453
+ def get_project_model_version(name, fields: nil, quota_user: nil, options: nil, &block)
1454
+ command = make_simple_command(:get, 'v1/{+name}', options)
1455
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
1456
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Version
1457
+ command.params['name'] = name unless name.nil?
1458
+ command.query['fields'] = fields unless fields.nil?
1459
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1460
+ execute_or_queue_command(command, &block)
1461
+ end
1462
+
1463
+ # Gets basic information about all the versions of a model. If you expect that a
1464
+ # model has many versions, or if you need to handle only a limited number of
1465
+ # results at a time, you can request that the list be retrieved in batches (
1466
+ # called pages). If there are no versions that match the request parameters, the
1467
+ # list request returns an empty response body: ``.
1468
+ # @param [String] parent
1469
+ # Required. The name of the model for which to list the version.
1470
+ # @param [String] filter
1471
+ # Optional. Specifies the subset of versions to retrieve.
1472
+ # @param [Fixnum] page_size
1473
+ # Optional. The number of versions to retrieve per "page" of results. If there
1474
+ # are more remaining results than this number, the response message will contain
1475
+ # a valid value in the `next_page_token` field. The default value is 20, and the
1476
+ # maximum page size is 100.
1477
+ # @param [String] page_token
1478
+ # Optional. A page token to request the next page of results. You get the token
1479
+ # from the `next_page_token` field of the response from the previous call.
1480
+ # @param [String] fields
1481
+ # Selector specifying which fields to include in a partial response.
1482
+ # @param [String] quota_user
1483
+ # Available to use for quota purposes for server-side applications. Can be any
1484
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1485
+ # @param [Google::Apis::RequestOptions] options
1486
+ # Request-specific options
1487
+ #
1488
+ # @yield [result, err] Result & error if block supplied
1489
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse] parsed result object
1490
+ # @yieldparam err [StandardError] error object if request failed
1491
+ #
1492
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse]
1493
+ #
1494
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1495
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1496
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1497
+ def list_project_model_versions(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1498
+ command = make_simple_command(:get, 'v1/{+parent}/versions', options)
1499
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse::Representation
1500
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1ListVersionsResponse
1501
+ command.params['parent'] = parent unless parent.nil?
1502
+ command.query['filter'] = filter unless filter.nil?
1503
+ command.query['pageSize'] = page_size unless page_size.nil?
1504
+ command.query['pageToken'] = page_token unless page_token.nil?
1505
+ command.query['fields'] = fields unless fields.nil?
1506
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1507
+ execute_or_queue_command(command, &block)
1508
+ end
1509
+
1510
+ # Updates the specified Version resource. Currently the only update-able fields
1511
+ # are `description`, `requestLoggingConfig`, `autoScaling.minNodes`, and `
1512
+ # manualScaling.nodes`.
1513
+ # @param [String] name
1514
+ # Required. The name of the model.
1515
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1Version] google_cloud_ml_v1__version_object
1516
+ # @param [String] update_mask
1517
+ # Required. Specifies the path, relative to `Version`, of the field to update.
1518
+ # Must be present and non-empty. For example, to change the description of a
1519
+ # version to "foo", the `update_mask` parameter would be specified as `
1520
+ # description`, and the `PATCH` request body would specify the new value, as
1521
+ # follows: ``` ` "description": "foo" ` ``` Currently the only supported update
1522
+ # mask fields are `description`, `requestLoggingConfig`, `autoScaling.minNodes`,
1523
+ # and `manualScaling.nodes`. However, you can only update `manualScaling.nodes`
1524
+ # if the version uses a [Compute Engine (N1) machine type](/ml-engine/docs/
1525
+ # machine-types-online-prediction).
1526
+ # @param [String] fields
1527
+ # Selector specifying which fields to include in a partial response.
1528
+ # @param [String] quota_user
1529
+ # Available to use for quota purposes for server-side applications. Can be any
1530
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1531
+ # @param [Google::Apis::RequestOptions] options
1532
+ # Request-specific options
1533
+ #
1534
+ # @yield [result, err] Result & error if block supplied
1535
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
1536
+ # @yieldparam err [StandardError] error object if request failed
1537
+ #
1538
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
1539
+ #
1540
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1541
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1542
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1543
+ def patch_project_model_version(name, google_cloud_ml_v1__version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1544
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1545
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
1546
+ command.request_object = google_cloud_ml_v1__version_object
1547
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
1548
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
1549
+ command.params['name'] = name unless name.nil?
1550
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1551
+ command.query['fields'] = fields unless fields.nil?
1552
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1553
+ execute_or_queue_command(command, &block)
1554
+ end
1555
+
1556
+ # Designates a version to be the default for the model. The default version is
1557
+ # used for prediction requests made against the model that don't specify a
1558
+ # version. The first version to be created for a model is automatically set as
1559
+ # the default. You must make any subsequent changes to the default version
1560
+ # setting manually using this method.
1561
+ # @param [String] name
1562
+ # Required. The name of the version to make the default for the model. You can
1563
+ # get the names of all the versions of a model by calling projects.models.
1564
+ # versions.list.
1565
+ # @param [Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest] google_cloud_ml_v1__set_default_version_request_object
1566
+ # @param [String] fields
1567
+ # Selector specifying which fields to include in a partial response.
1568
+ # @param [String] quota_user
1569
+ # Available to use for quota purposes for server-side applications. Can be any
1570
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1571
+ # @param [Google::Apis::RequestOptions] options
1572
+ # Request-specific options
1573
+ #
1574
+ # @yield [result, err] Result & error if block supplied
1575
+ # @yieldparam result [Google::Apis::MlV1::GoogleCloudMlV1Version] parsed result object
1576
+ # @yieldparam err [StandardError] error object if request failed
1577
+ #
1578
+ # @return [Google::Apis::MlV1::GoogleCloudMlV1Version]
1579
+ #
1580
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1581
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1582
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1583
+ def set_project_model_version_default(name, google_cloud_ml_v1__set_default_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1584
+ command = make_simple_command(:post, 'v1/{+name}:setDefault', options)
1585
+ command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1SetDefaultVersionRequest::Representation
1586
+ command.request_object = google_cloud_ml_v1__set_default_version_request_object
1587
+ command.response_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation
1588
+ command.response_class = Google::Apis::MlV1::GoogleCloudMlV1Version
1589
+ command.params['name'] = name unless name.nil?
1590
+ command.query['fields'] = fields unless fields.nil?
1591
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1592
+ execute_or_queue_command(command, &block)
1593
+ end
1594
+
1595
+ # Starts asynchronous cancellation on a long-running operation. The server makes
1596
+ # a best effort to cancel the operation, but success is not guaranteed. If the
1597
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1598
+ # Clients can use Operations.GetOperation or other methods to check whether the
1599
+ # cancellation succeeded or whether the operation completed despite cancellation.
1600
+ # On successful cancellation, the operation is not deleted; instead, it becomes
1601
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
1602
+ # corresponding to `Code.CANCELLED`.
1603
+ # @param [String] name
1604
+ # The name of the operation resource to be cancelled.
1605
+ # @param [String] fields
1606
+ # Selector specifying which fields to include in a partial response.
1607
+ # @param [String] quota_user
1608
+ # Available to use for quota purposes for server-side applications. Can be any
1609
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1610
+ # @param [Google::Apis::RequestOptions] options
1611
+ # Request-specific options
1612
+ #
1613
+ # @yield [result, err] Result & error if block supplied
1614
+ # @yieldparam result [Google::Apis::MlV1::GoogleProtobufEmpty] parsed result object
1615
+ # @yieldparam err [StandardError] error object if request failed
1616
+ #
1617
+ # @return [Google::Apis::MlV1::GoogleProtobufEmpty]
1618
+ #
1619
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1620
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1621
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1622
+ def cancel_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1623
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
1624
+ command.response_representation = Google::Apis::MlV1::GoogleProtobufEmpty::Representation
1625
+ command.response_class = Google::Apis::MlV1::GoogleProtobufEmpty
1626
+ command.params['name'] = name unless name.nil?
1627
+ command.query['fields'] = fields unless fields.nil?
1628
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1629
+ execute_or_queue_command(command, &block)
1630
+ end
1631
+
1632
+ # Gets the latest state of a long-running operation. Clients can use this method
1633
+ # to poll the operation result at intervals as recommended by the API service.
1634
+ # @param [String] name
1635
+ # The name of the operation resource.
1636
+ # @param [String] fields
1637
+ # Selector specifying which fields to include in a partial response.
1638
+ # @param [String] quota_user
1639
+ # Available to use for quota purposes for server-side applications. Can be any
1640
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1641
+ # @param [Google::Apis::RequestOptions] options
1642
+ # Request-specific options
1643
+ #
1644
+ # @yield [result, err] Result & error if block supplied
1645
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object
1646
+ # @yieldparam err [StandardError] error object if request failed
1647
+ #
1648
+ # @return [Google::Apis::MlV1::GoogleLongrunningOperation]
1649
+ #
1650
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1651
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1652
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1653
+ def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1654
+ command = make_simple_command(:get, 'v1/{+name}', options)
1655
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation
1656
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation
1657
+ command.params['name'] = name unless name.nil?
1658
+ command.query['fields'] = fields unless fields.nil?
1659
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1660
+ execute_or_queue_command(command, &block)
1661
+ end
1662
+
1663
+ # Lists operations that match the specified filter in the request. If the server
1664
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
1665
+ # binding allows API services to override the binding to use different resource
1666
+ # name schemes, such as `users/*/operations`. To override the binding, API
1667
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
1668
+ # service configuration. For backwards compatibility, the default name includes
1669
+ # the operations collection id, however overriding users must ensure the name
1670
+ # binding is the parent resource, without the operations collection id.
1671
+ # @param [String] name
1672
+ # The name of the operation's parent resource.
1673
+ # @param [String] filter
1674
+ # The standard list filter.
1675
+ # @param [Fixnum] page_size
1676
+ # The standard list page size.
1677
+ # @param [String] page_token
1678
+ # The standard list page token.
1679
+ # @param [String] fields
1680
+ # Selector specifying which fields to include in a partial response.
1681
+ # @param [String] quota_user
1682
+ # Available to use for quota purposes for server-side applications. Can be any
1683
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1684
+ # @param [Google::Apis::RequestOptions] options
1685
+ # Request-specific options
1686
+ #
1687
+ # @yield [result, err] Result & error if block supplied
1688
+ # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningListOperationsResponse] parsed result object
1689
+ # @yieldparam err [StandardError] error object if request failed
1690
+ #
1691
+ # @return [Google::Apis::MlV1::GoogleLongrunningListOperationsResponse]
1692
+ #
1693
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1694
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1695
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1696
+ def list_project_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1697
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
1698
+ command.response_representation = Google::Apis::MlV1::GoogleLongrunningListOperationsResponse::Representation
1699
+ command.response_class = Google::Apis::MlV1::GoogleLongrunningListOperationsResponse
1700
+ command.params['name'] = name unless name.nil?
1701
+ command.query['filter'] = filter unless filter.nil?
1702
+ command.query['pageSize'] = page_size unless page_size.nil?
1703
+ command.query['pageToken'] = page_token unless page_token.nil?
1704
+ command.query['fields'] = fields unless fields.nil?
1705
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1706
+ execute_or_queue_command(command, &block)
1707
+ end
1708
+
1709
+ protected
1710
+
1711
+ def apply_command_defaults(command)
1712
+ command.query['key'] = key unless key.nil?
1713
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1714
+ end
1715
+ end
1716
+ end
1717
+ end
1718
+ end