OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.ml.v1; | 3 library googleapis.ml.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 /** | 42 /** |
43 * Get the service account information associated with your project. You need | 43 * Get the service account information associated with your project. You need |
44 * this information in order to grant the service account persmissions for | 44 * this information in order to grant the service account persmissions for |
45 * the Google Cloud Storage location where you put your model training code | 45 * the Google Cloud Storage location where you put your model training code |
46 * for training the model with Google Cloud Machine Learning. | 46 * for training the model with Google Cloud Machine Learning. |
47 * | 47 * |
48 * Request parameters: | 48 * Request parameters: |
49 * | 49 * |
50 * [name] - Required. The project name. | 50 * [name] - Required. The project name. |
51 * | |
52 * Authorization: requires `Viewer` role on the specified project. | |
53 * Value must have pattern "^projects/[^/]+$". | 51 * Value must have pattern "^projects/[^/]+$". |
54 * | 52 * |
55 * Completes with a [GoogleCloudMlV1GetConfigResponse]. | 53 * Completes with a [GoogleCloudMlV1GetConfigResponse]. |
56 * | 54 * |
57 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 55 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
58 * error. | 56 * error. |
59 * | 57 * |
60 * If the used [http.Client] completes with an error when making a REST call, | 58 * If the used [http.Client] completes with an error when making a REST call, |
61 * this method will complete with the same error. | 59 * this method will complete with the same error. |
62 */ | 60 */ |
(...skipping 25 matching lines...) Expand all Loading... |
88 * Performs prediction on the data in the request. | 86 * Performs prediction on the data in the request. |
89 * | 87 * |
90 * **** REMOVE FROM GENERATED DOCUMENTATION | 88 * **** REMOVE FROM GENERATED DOCUMENTATION |
91 * | 89 * |
92 * [request] - The metadata request object. | 90 * [request] - The metadata request object. |
93 * | 91 * |
94 * Request parameters: | 92 * Request parameters: |
95 * | 93 * |
96 * [name] - Required. The resource name of a model or a version. | 94 * [name] - Required. The resource name of a model or a version. |
97 * | 95 * |
98 * Authorization: requires `Viewer` role on the parent project. | 96 * Authorization: requires the `predict` permission on the specified resource. |
99 * Value must have pattern "^projects/.+$". | 97 * Value must have pattern "^projects/.+$". |
100 * | 98 * |
101 * Completes with a [GoogleApiHttpBody]. | 99 * Completes with a [GoogleApiHttpBody]. |
102 * | 100 * |
103 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 101 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
104 * error. | 102 * error. |
105 * | 103 * |
106 * If the used [http.Client] completes with an error when making a REST call, | 104 * If the used [http.Client] completes with an error when making a REST call, |
107 * this method will complete with the same error. | 105 * this method will complete with the same error. |
108 */ | 106 */ |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 _requester = client; | 141 _requester = client; |
144 | 142 |
145 /** | 143 /** |
146 * Cancels a running job. | 144 * Cancels a running job. |
147 * | 145 * |
148 * [request] - The metadata request object. | 146 * [request] - The metadata request object. |
149 * | 147 * |
150 * Request parameters: | 148 * Request parameters: |
151 * | 149 * |
152 * [name] - Required. The name of the job to cancel. | 150 * [name] - Required. The name of the job to cancel. |
153 * | |
154 * Authorization: requires `Editor` role on the parent project. | |
155 * Value must have pattern "^projects/[^/]+/jobs/[^/]+$". | 151 * Value must have pattern "^projects/[^/]+/jobs/[^/]+$". |
156 * | 152 * |
157 * Completes with a [GoogleProtobufEmpty]. | 153 * Completes with a [GoogleProtobufEmpty]. |
158 * | 154 * |
159 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 155 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
160 * error. | 156 * error. |
161 * | 157 * |
162 * If the used [http.Client] completes with an error when making a REST call, | 158 * If the used [http.Client] completes with an error when making a REST call, |
163 * this method will complete with the same error. | 159 * this method will complete with the same error. |
164 */ | 160 */ |
(...skipping 25 matching lines...) Expand all Loading... |
190 } | 186 } |
191 | 187 |
192 /** | 188 /** |
193 * Creates a training or a batch prediction job. | 189 * Creates a training or a batch prediction job. |
194 * | 190 * |
195 * [request] - The metadata request object. | 191 * [request] - The metadata request object. |
196 * | 192 * |
197 * Request parameters: | 193 * Request parameters: |
198 * | 194 * |
199 * [parent] - Required. The project name. | 195 * [parent] - Required. The project name. |
200 * | |
201 * Authorization: requires `Editor` role on the specified project. | |
202 * Value must have pattern "^projects/[^/]+$". | 196 * Value must have pattern "^projects/[^/]+$". |
203 * | 197 * |
204 * Completes with a [GoogleCloudMlV1Job]. | 198 * Completes with a [GoogleCloudMlV1Job]. |
205 * | 199 * |
206 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 200 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
207 * error. | 201 * error. |
208 * | 202 * |
209 * If the used [http.Client] completes with an error when making a REST call, | 203 * If the used [http.Client] completes with an error when making a REST call, |
210 * this method will complete with the same error. | 204 * this method will complete with the same error. |
211 */ | 205 */ |
(...skipping 23 matching lines...) Expand all Loading... |
235 downloadOptions: _downloadOptions); | 229 downloadOptions: _downloadOptions); |
236 return _response.then((data) => new GoogleCloudMlV1Job.fromJson(data)); | 230 return _response.then((data) => new GoogleCloudMlV1Job.fromJson(data)); |
237 } | 231 } |
238 | 232 |
239 /** | 233 /** |
240 * Describes a job. | 234 * Describes a job. |
241 * | 235 * |
242 * Request parameters: | 236 * Request parameters: |
243 * | 237 * |
244 * [name] - Required. The name of the job to get the description of. | 238 * [name] - Required. The name of the job to get the description of. |
245 * | |
246 * Authorization: requires `Viewer` role on the parent project. | |
247 * Value must have pattern "^projects/[^/]+/jobs/[^/]+$". | 239 * Value must have pattern "^projects/[^/]+/jobs/[^/]+$". |
248 * | 240 * |
249 * Completes with a [GoogleCloudMlV1Job]. | 241 * Completes with a [GoogleCloudMlV1Job]. |
250 * | 242 * |
251 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 243 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
252 * error. | 244 * error. |
253 * | 245 * |
254 * If the used [http.Client] completes with an error when making a REST call, | 246 * If the used [http.Client] completes with an error when making a REST call, |
255 * this method will complete with the same error. | 247 * this method will complete with the same error. |
256 */ | 248 */ |
(...skipping 20 matching lines...) Expand all Loading... |
277 downloadOptions: _downloadOptions); | 269 downloadOptions: _downloadOptions); |
278 return _response.then((data) => new GoogleCloudMlV1Job.fromJson(data)); | 270 return _response.then((data) => new GoogleCloudMlV1Job.fromJson(data)); |
279 } | 271 } |
280 | 272 |
281 /** | 273 /** |
282 * Lists the jobs in the project. | 274 * Lists the jobs in the project. |
283 * | 275 * |
284 * Request parameters: | 276 * Request parameters: |
285 * | 277 * |
286 * [parent] - Required. The name of the project for which to list jobs. | 278 * [parent] - Required. The name of the project for which to list jobs. |
287 * | |
288 * Authorization: requires `Viewer` role on the specified project. | |
289 * Value must have pattern "^projects/[^/]+$". | 279 * Value must have pattern "^projects/[^/]+$". |
290 * | 280 * |
291 * [filter] - Optional. Specifies the subset of jobs to retrieve. | |
292 * | |
293 * [pageToken] - Optional. A page token to request the next page of results. | 281 * [pageToken] - Optional. A page token to request the next page of results. |
294 * | 282 * |
295 * You get the token from the `next_page_token` field of the response from | 283 * You get the token from the `next_page_token` field of the response from |
296 * the previous call. | 284 * the previous call. |
297 * | 285 * |
298 * [pageSize] - Optional. The number of jobs to retrieve per "page" of | 286 * [pageSize] - Optional. The number of jobs to retrieve per "page" of |
299 * results. If there | 287 * results. If there |
300 * are more remaining results than this number, the response message will | 288 * are more remaining results than this number, the response message will |
301 * contain a valid value in the `next_page_token` field. | 289 * contain a valid value in the `next_page_token` field. |
302 * | 290 * |
303 * The default value is 20, and the maximum page size is 100. | 291 * The default value is 20, and the maximum page size is 100. |
304 * | 292 * |
| 293 * [filter] - Optional. Specifies the subset of jobs to retrieve. |
| 294 * |
305 * Completes with a [GoogleCloudMlV1ListJobsResponse]. | 295 * Completes with a [GoogleCloudMlV1ListJobsResponse]. |
306 * | 296 * |
307 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 297 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
308 * error. | 298 * error. |
309 * | 299 * |
310 * If the used [http.Client] completes with an error when making a REST call, | 300 * If the used [http.Client] completes with an error when making a REST call, |
311 * this method will complete with the same error. | 301 * this method will complete with the same error. |
312 */ | 302 */ |
313 async.Future<GoogleCloudMlV1ListJobsResponse> list(core.String parent, {core.S
tring filter, core.String pageToken, core.int pageSize}) { | 303 async.Future<GoogleCloudMlV1ListJobsResponse> list(core.String parent, {core.S
tring pageToken, core.int pageSize, core.String filter}) { |
314 var _url = null; | 304 var _url = null; |
315 var _queryParams = new core.Map(); | 305 var _queryParams = new core.Map(); |
316 var _uploadMedia = null; | 306 var _uploadMedia = null; |
317 var _uploadOptions = null; | 307 var _uploadOptions = null; |
318 var _downloadOptions = commons.DownloadOptions.Metadata; | 308 var _downloadOptions = commons.DownloadOptions.Metadata; |
319 var _body = null; | 309 var _body = null; |
320 | 310 |
321 if (parent == null) { | 311 if (parent == null) { |
322 throw new core.ArgumentError("Parameter parent is required."); | 312 throw new core.ArgumentError("Parameter parent is required."); |
323 } | 313 } |
324 if (filter != null) { | |
325 _queryParams["filter"] = [filter]; | |
326 } | |
327 if (pageToken != null) { | 314 if (pageToken != null) { |
328 _queryParams["pageToken"] = [pageToken]; | 315 _queryParams["pageToken"] = [pageToken]; |
329 } | 316 } |
330 if (pageSize != null) { | 317 if (pageSize != null) { |
331 _queryParams["pageSize"] = ["${pageSize}"]; | 318 _queryParams["pageSize"] = ["${pageSize}"]; |
332 } | 319 } |
| 320 if (filter != null) { |
| 321 _queryParams["filter"] = [filter]; |
| 322 } |
333 | 323 |
334 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/jobs'; | 324 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/jobs'; |
335 | 325 |
336 var _response = _requester.request(_url, | 326 var _response = _requester.request(_url, |
337 "GET", | 327 "GET", |
338 body: _body, | 328 body: _body, |
339 queryParams: _queryParams, | 329 queryParams: _queryParams, |
340 uploadOptions: _uploadOptions, | 330 uploadOptions: _uploadOptions, |
341 uploadMedia: _uploadMedia, | 331 uploadMedia: _uploadMedia, |
342 downloadOptions: _downloadOptions); | 332 downloadOptions: _downloadOptions); |
(...skipping 16 matching lines...) Expand all Loading... |
359 * | 349 * |
360 * You must add at least one version before you can request predictions from | 350 * You must add at least one version before you can request predictions from |
361 * the model. Add versions by calling | 351 * the model. Add versions by calling |
362 * [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.mod
els.versions/create). | 352 * [projects.models.versions.create](/ml-engine/reference/rest/v1/projects.mod
els.versions/create). |
363 * | 353 * |
364 * [request] - The metadata request object. | 354 * [request] - The metadata request object. |
365 * | 355 * |
366 * Request parameters: | 356 * Request parameters: |
367 * | 357 * |
368 * [parent] - Required. The project name. | 358 * [parent] - Required. The project name. |
369 * | |
370 * Authorization: requires `Editor` role on the specified project. | |
371 * Value must have pattern "^projects/[^/]+$". | 359 * Value must have pattern "^projects/[^/]+$". |
372 * | 360 * |
373 * Completes with a [GoogleCloudMlV1Model]. | 361 * Completes with a [GoogleCloudMlV1Model]. |
374 * | 362 * |
375 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 363 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
376 * error. | 364 * error. |
377 * | 365 * |
378 * If the used [http.Client] completes with an error when making a REST call, | 366 * If the used [http.Client] completes with an error when making a REST call, |
379 * this method will complete with the same error. | 367 * this method will complete with the same error. |
380 */ | 368 */ |
(...skipping 27 matching lines...) Expand all Loading... |
408 /** | 396 /** |
409 * Deletes a model. | 397 * Deletes a model. |
410 * | 398 * |
411 * You can only delete a model if there are no versions in it. You can delete | 399 * You can only delete a model if there are no versions in it. You can delete |
412 * versions by calling | 400 * versions by calling |
413 * [projects.models.versions.delete](/ml-engine/reference/rest/v1/projects.mod
els.versions/delete). | 401 * [projects.models.versions.delete](/ml-engine/reference/rest/v1/projects.mod
els.versions/delete). |
414 * | 402 * |
415 * Request parameters: | 403 * Request parameters: |
416 * | 404 * |
417 * [name] - Required. The name of the model. | 405 * [name] - Required. The name of the model. |
418 * | |
419 * Authorization: requires `Editor` role on the parent project. | |
420 * Value must have pattern "^projects/[^/]+/models/[^/]+$". | 406 * Value must have pattern "^projects/[^/]+/models/[^/]+$". |
421 * | 407 * |
422 * Completes with a [GoogleLongrunningOperation]. | 408 * Completes with a [GoogleLongrunningOperation]. |
423 * | 409 * |
424 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 410 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
425 * error. | 411 * error. |
426 * | 412 * |
427 * If the used [http.Client] completes with an error when making a REST call, | 413 * If the used [http.Client] completes with an error when making a REST call, |
428 * this method will complete with the same error. | 414 * this method will complete with the same error. |
429 */ | 415 */ |
(...skipping 22 matching lines...) Expand all Loading... |
452 } | 438 } |
453 | 439 |
454 /** | 440 /** |
455 * Gets information about a model, including its name, the description (if | 441 * Gets information about a model, including its name, the description (if |
456 * set), and the default version (if at least one version of the model has | 442 * set), and the default version (if at least one version of the model has |
457 * been deployed). | 443 * been deployed). |
458 * | 444 * |
459 * Request parameters: | 445 * Request parameters: |
460 * | 446 * |
461 * [name] - Required. The name of the model. | 447 * [name] - Required. The name of the model. |
462 * | |
463 * Authorization: requires `Viewer` role on the parent project. | |
464 * Value must have pattern "^projects/[^/]+/models/[^/]+$". | 448 * Value must have pattern "^projects/[^/]+/models/[^/]+$". |
465 * | 449 * |
466 * Completes with a [GoogleCloudMlV1Model]. | 450 * Completes with a [GoogleCloudMlV1Model]. |
467 * | 451 * |
468 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 452 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
469 * error. | 453 * error. |
470 * | 454 * |
471 * If the used [http.Client] completes with an error when making a REST call, | 455 * If the used [http.Client] completes with an error when making a REST call, |
472 * this method will complete with the same error. | 456 * this method will complete with the same error. |
473 */ | 457 */ |
(...skipping 15 matching lines...) Expand all Loading... |
489 "GET", | 473 "GET", |
490 body: _body, | 474 body: _body, |
491 queryParams: _queryParams, | 475 queryParams: _queryParams, |
492 uploadOptions: _uploadOptions, | 476 uploadOptions: _uploadOptions, |
493 uploadMedia: _uploadMedia, | 477 uploadMedia: _uploadMedia, |
494 downloadOptions: _downloadOptions); | 478 downloadOptions: _downloadOptions); |
495 return _response.then((data) => new GoogleCloudMlV1Model.fromJson(data)); | 479 return _response.then((data) => new GoogleCloudMlV1Model.fromJson(data)); |
496 } | 480 } |
497 | 481 |
498 /** | 482 /** |
| 483 * Gets the access control policy for a resource. |
| 484 * Returns an empty policy if the resource exists and does not have a policy |
| 485 * set. |
| 486 * |
| 487 * Request parameters: |
| 488 * |
| 489 * [resource] - REQUIRED: The resource for which the policy is being |
| 490 * requested. |
| 491 * See the operation documentation for the appropriate value for this field. |
| 492 * Value must have pattern "^projects/[^/]+/models/[^/]+$". |
| 493 * |
| 494 * Completes with a [GoogleIamV1Policy]. |
| 495 * |
| 496 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 497 * error. |
| 498 * |
| 499 * If the used [http.Client] completes with an error when making a REST call, |
| 500 * this method will complete with the same error. |
| 501 */ |
| 502 async.Future<GoogleIamV1Policy> getIamPolicy(core.String resource) { |
| 503 var _url = null; |
| 504 var _queryParams = new core.Map(); |
| 505 var _uploadMedia = null; |
| 506 var _uploadOptions = null; |
| 507 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 508 var _body = null; |
| 509 |
| 510 if (resource == null) { |
| 511 throw new core.ArgumentError("Parameter resource is required."); |
| 512 } |
| 513 |
| 514 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam
Policy'; |
| 515 |
| 516 var _response = _requester.request(_url, |
| 517 "GET", |
| 518 body: _body, |
| 519 queryParams: _queryParams, |
| 520 uploadOptions: _uploadOptions, |
| 521 uploadMedia: _uploadMedia, |
| 522 downloadOptions: _downloadOptions); |
| 523 return _response.then((data) => new GoogleIamV1Policy.fromJson(data)); |
| 524 } |
| 525 |
| 526 /** |
499 * Lists the models in a project. | 527 * Lists the models in a project. |
500 * | 528 * |
501 * Each project can contain multiple models, and each model can have multiple | 529 * Each project can contain multiple models, and each model can have multiple |
502 * versions. | 530 * versions. |
503 * | 531 * |
504 * Request parameters: | 532 * Request parameters: |
505 * | 533 * |
506 * [parent] - Required. The name of the project whose models are to be listed. | 534 * [parent] - Required. The name of the project whose models are to be listed. |
507 * | |
508 * Authorization: requires `Viewer` role on the specified project. | |
509 * Value must have pattern "^projects/[^/]+$". | 535 * Value must have pattern "^projects/[^/]+$". |
510 * | 536 * |
511 * [pageToken] - Optional. A page token to request the next page of results. | 537 * [pageToken] - Optional. A page token to request the next page of results. |
512 * | 538 * |
513 * You get the token from the `next_page_token` field of the response from | 539 * You get the token from the `next_page_token` field of the response from |
514 * the previous call. | 540 * the previous call. |
515 * | 541 * |
516 * [pageSize] - Optional. The number of models to retrieve per "page" of | 542 * [pageSize] - Optional. The number of models to retrieve per "page" of |
517 * results. If there | 543 * results. If there |
518 * are more remaining results than this number, the response message will | 544 * are more remaining results than this number, the response message will |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 var _response = _requester.request(_url, | 577 var _response = _requester.request(_url, |
552 "GET", | 578 "GET", |
553 body: _body, | 579 body: _body, |
554 queryParams: _queryParams, | 580 queryParams: _queryParams, |
555 uploadOptions: _uploadOptions, | 581 uploadOptions: _uploadOptions, |
556 uploadMedia: _uploadMedia, | 582 uploadMedia: _uploadMedia, |
557 downloadOptions: _downloadOptions); | 583 downloadOptions: _downloadOptions); |
558 return _response.then((data) => new GoogleCloudMlV1ListModelsResponse.fromJs
on(data)); | 584 return _response.then((data) => new GoogleCloudMlV1ListModelsResponse.fromJs
on(data)); |
559 } | 585 } |
560 | 586 |
| 587 /** |
| 588 * Sets the access control policy on the specified resource. Replaces any |
| 589 * existing policy. |
| 590 * |
| 591 * [request] - The metadata request object. |
| 592 * |
| 593 * Request parameters: |
| 594 * |
| 595 * [resource] - REQUIRED: The resource for which the policy is being |
| 596 * specified. |
| 597 * See the operation documentation for the appropriate value for this field. |
| 598 * Value must have pattern "^projects/[^/]+/models/[^/]+$". |
| 599 * |
| 600 * Completes with a [GoogleIamV1Policy]. |
| 601 * |
| 602 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 603 * error. |
| 604 * |
| 605 * If the used [http.Client] completes with an error when making a REST call, |
| 606 * this method will complete with the same error. |
| 607 */ |
| 608 async.Future<GoogleIamV1Policy> setIamPolicy(GoogleIamV1SetIamPolicyRequest re
quest, core.String resource) { |
| 609 var _url = null; |
| 610 var _queryParams = new core.Map(); |
| 611 var _uploadMedia = null; |
| 612 var _uploadOptions = null; |
| 613 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 614 var _body = null; |
| 615 |
| 616 if (request != null) { |
| 617 _body = convert.JSON.encode((request).toJson()); |
| 618 } |
| 619 if (resource == null) { |
| 620 throw new core.ArgumentError("Parameter resource is required."); |
| 621 } |
| 622 |
| 623 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam
Policy'; |
| 624 |
| 625 var _response = _requester.request(_url, |
| 626 "POST", |
| 627 body: _body, |
| 628 queryParams: _queryParams, |
| 629 uploadOptions: _uploadOptions, |
| 630 uploadMedia: _uploadMedia, |
| 631 downloadOptions: _downloadOptions); |
| 632 return _response.then((data) => new GoogleIamV1Policy.fromJson(data)); |
| 633 } |
| 634 |
| 635 /** |
| 636 * Returns permissions that a caller has on the specified resource. |
| 637 * If the resource does not exist, this will return an empty set of |
| 638 * permissions, not a NOT_FOUND error. |
| 639 * |
| 640 * Note: This operation is designed to be used for building permission-aware |
| 641 * UIs and command-line tools, not for authorization checking. This operation |
| 642 * may "fail open" without warning. |
| 643 * |
| 644 * [request] - The metadata request object. |
| 645 * |
| 646 * Request parameters: |
| 647 * |
| 648 * [resource] - REQUIRED: The resource for which the policy detail is being |
| 649 * requested. |
| 650 * See the operation documentation for the appropriate value for this field. |
| 651 * Value must have pattern "^projects/[^/]+/models/[^/]+$". |
| 652 * |
| 653 * Completes with a [GoogleIamV1TestIamPermissionsResponse]. |
| 654 * |
| 655 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 656 * error. |
| 657 * |
| 658 * If the used [http.Client] completes with an error when making a REST call, |
| 659 * this method will complete with the same error. |
| 660 */ |
| 661 async.Future<GoogleIamV1TestIamPermissionsResponse> testIamPermissions(GoogleI
amV1TestIamPermissionsRequest request, core.String resource) { |
| 662 var _url = null; |
| 663 var _queryParams = new core.Map(); |
| 664 var _uploadMedia = null; |
| 665 var _uploadOptions = null; |
| 666 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 667 var _body = null; |
| 668 |
| 669 if (request != null) { |
| 670 _body = convert.JSON.encode((request).toJson()); |
| 671 } |
| 672 if (resource == null) { |
| 673 throw new core.ArgumentError("Parameter resource is required."); |
| 674 } |
| 675 |
| 676 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa
mPermissions'; |
| 677 |
| 678 var _response = _requester.request(_url, |
| 679 "POST", |
| 680 body: _body, |
| 681 queryParams: _queryParams, |
| 682 uploadOptions: _uploadOptions, |
| 683 uploadMedia: _uploadMedia, |
| 684 downloadOptions: _downloadOptions); |
| 685 return _response.then((data) => new GoogleIamV1TestIamPermissionsResponse.fr
omJson(data)); |
| 686 } |
| 687 |
561 } | 688 } |
562 | 689 |
563 | 690 |
564 class ProjectsModelsVersionsResourceApi { | 691 class ProjectsModelsVersionsResourceApi { |
565 final commons.ApiRequester _requester; | 692 final commons.ApiRequester _requester; |
566 | 693 |
567 ProjectsModelsVersionsResourceApi(commons.ApiRequester client) : | 694 ProjectsModelsVersionsResourceApi(commons.ApiRequester client) : |
568 _requester = client; | 695 _requester = client; |
569 | 696 |
570 /** | 697 /** |
571 * Creates a new version of a model from a trained TensorFlow model. | 698 * Creates a new version of a model from a trained TensorFlow model. |
572 * | 699 * |
573 * If the version created in the cloud by this call is the first deployed | 700 * If the version created in the cloud by this call is the first deployed |
574 * version of the specified model, it will be made the default version of the | 701 * version of the specified model, it will be made the default version of the |
575 * model. When you add a version to a model that already has one or more | 702 * model. When you add a version to a model that already has one or more |
576 * versions, the default version does not automatically change. If you want a | 703 * versions, the default version does not automatically change. If you want a |
577 * new version to be the default, you must call | 704 * new version to be the default, you must call |
578 * [projects.models.versions.setDefault](/ml-engine/reference/rest/v1/projects
.models.versions/setDefault). | 705 * [projects.models.versions.setDefault](/ml-engine/reference/rest/v1/projects
.models.versions/setDefault). |
579 * | 706 * |
580 * [request] - The metadata request object. | 707 * [request] - The metadata request object. |
581 * | 708 * |
582 * Request parameters: | 709 * Request parameters: |
583 * | 710 * |
584 * [parent] - Required. The name of the model. | 711 * [parent] - Required. The name of the model. |
585 * | |
586 * Authorization: requires `Editor` role on the parent project. | |
587 * Value must have pattern "^projects/[^/]+/models/[^/]+$". | 712 * Value must have pattern "^projects/[^/]+/models/[^/]+$". |
588 * | 713 * |
589 * Completes with a [GoogleLongrunningOperation]. | 714 * Completes with a [GoogleLongrunningOperation]. |
590 * | 715 * |
591 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 716 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
592 * error. | 717 * error. |
593 * | 718 * |
594 * If the used [http.Client] completes with an error when making a REST call, | 719 * If the used [http.Client] completes with an error when making a REST call, |
595 * this method will complete with the same error. | 720 * this method will complete with the same error. |
596 */ | 721 */ |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 * | 754 * |
630 * Note: You cannot delete the version that is set as the default version | 755 * Note: You cannot delete the version that is set as the default version |
631 * of the model unless it is the only remaining version. | 756 * of the model unless it is the only remaining version. |
632 * | 757 * |
633 * Request parameters: | 758 * Request parameters: |
634 * | 759 * |
635 * [name] - Required. The name of the version. You can get the names of all | 760 * [name] - Required. The name of the version. You can get the names of all |
636 * the | 761 * the |
637 * versions of a model by calling | 762 * versions of a model by calling |
638 * [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.model
s.versions/list). | 763 * [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.model
s.versions/list). |
639 * | |
640 * Authorization: requires `Editor` role on the parent project. | |
641 * Value must have pattern "^projects/[^/]+/models/[^/]+/versions/[^/]+$". | 764 * Value must have pattern "^projects/[^/]+/models/[^/]+/versions/[^/]+$". |
642 * | 765 * |
643 * Completes with a [GoogleLongrunningOperation]. | 766 * Completes with a [GoogleLongrunningOperation]. |
644 * | 767 * |
645 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 768 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
646 * error. | 769 * error. |
647 * | 770 * |
648 * If the used [http.Client] completes with an error when making a REST call, | 771 * If the used [http.Client] completes with an error when making a REST call, |
649 * this method will complete with the same error. | 772 * this method will complete with the same error. |
650 */ | 773 */ |
(...skipping 25 matching lines...) Expand all Loading... |
676 * Gets information about a model version. | 799 * Gets information about a model version. |
677 * | 800 * |
678 * Models can have multiple versions. You can call | 801 * Models can have multiple versions. You can call |
679 * [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.model
s.versions/list) | 802 * [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.model
s.versions/list) |
680 * to get the same information that this method returns for all of the | 803 * to get the same information that this method returns for all of the |
681 * versions of a model. | 804 * versions of a model. |
682 * | 805 * |
683 * Request parameters: | 806 * Request parameters: |
684 * | 807 * |
685 * [name] - Required. The name of the version. | 808 * [name] - Required. The name of the version. |
686 * | |
687 * Authorization: requires `Viewer` role on the parent project. | |
688 * Value must have pattern "^projects/[^/]+/models/[^/]+/versions/[^/]+$". | 809 * Value must have pattern "^projects/[^/]+/models/[^/]+/versions/[^/]+$". |
689 * | 810 * |
690 * Completes with a [GoogleCloudMlV1Version]. | 811 * Completes with a [GoogleCloudMlV1Version]. |
691 * | 812 * |
692 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 813 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
693 * error. | 814 * error. |
694 * | 815 * |
695 * If the used [http.Client] completes with an error when making a REST call, | 816 * If the used [http.Client] completes with an error when making a REST call, |
696 * this method will complete with the same error. | 817 * this method will complete with the same error. |
697 */ | 818 */ |
(...skipping 24 matching lines...) Expand all Loading... |
722 /** | 843 /** |
723 * Gets basic information about all the versions of a model. | 844 * Gets basic information about all the versions of a model. |
724 * | 845 * |
725 * If you expect that a model has a lot of versions, or if you need to handle | 846 * If you expect that a model has a lot of versions, or if you need to handle |
726 * only a limited number of results at a time, you can request that the list | 847 * only a limited number of results at a time, you can request that the list |
727 * be retrieved in batches (called pages): | 848 * be retrieved in batches (called pages): |
728 * | 849 * |
729 * Request parameters: | 850 * Request parameters: |
730 * | 851 * |
731 * [parent] - Required. The name of the model for which to list the version. | 852 * [parent] - Required. The name of the model for which to list the version. |
732 * | |
733 * Authorization: requires `Viewer` role on the parent project. | |
734 * Value must have pattern "^projects/[^/]+/models/[^/]+$". | 853 * Value must have pattern "^projects/[^/]+/models/[^/]+$". |
735 * | 854 * |
736 * [pageToken] - Optional. A page token to request the next page of results. | 855 * [pageToken] - Optional. A page token to request the next page of results. |
737 * | 856 * |
738 * You get the token from the `next_page_token` field of the response from | 857 * You get the token from the `next_page_token` field of the response from |
739 * the previous call. | 858 * the previous call. |
740 * | 859 * |
741 * [pageSize] - Optional. The number of versions to retrieve per "page" of | 860 * [pageSize] - Optional. The number of versions to retrieve per "page" of |
742 * results. If | 861 * results. If |
743 * there are more remaining results than this number, the response message | 862 * there are more remaining results than this number, the response message |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 * | 914 * |
796 * [request] - The metadata request object. | 915 * [request] - The metadata request object. |
797 * | 916 * |
798 * Request parameters: | 917 * Request parameters: |
799 * | 918 * |
800 * [name] - Required. The name of the version to make the default for the | 919 * [name] - Required. The name of the version to make the default for the |
801 * model. You | 920 * model. You |
802 * can get the names of all the versions of a model by calling | 921 * can get the names of all the versions of a model by calling |
803 * [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.model
s.versions/list). | 922 * [projects.models.versions.list](/ml-engine/reference/rest/v1/projects.model
s.versions/list). |
804 * | 923 * |
805 * Authorization: requires `Editor` role on the parent project. | 924 * Authorization: `ml.models.update` permission is required on the parent |
| 925 * model. |
806 * Value must have pattern "^projects/[^/]+/models/[^/]+/versions/[^/]+$". | 926 * Value must have pattern "^projects/[^/]+/models/[^/]+/versions/[^/]+$". |
807 * | 927 * |
808 * Completes with a [GoogleCloudMlV1Version]. | 928 * Completes with a [GoogleCloudMlV1Version]. |
809 * | 929 * |
810 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 930 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
811 * error. | 931 * error. |
812 * | 932 * |
813 * If the used [http.Client] completes with an error when making a REST call, | 933 * If the used [http.Client] completes with an error when making a REST call, |
814 * this method will complete with the same error. | 934 * this method will complete with the same error. |
815 */ | 935 */ |
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2631 * the model service uses the specified location as the source of the model. | 2751 * the model service uses the specified location as the source of the model. |
2632 * Once deployed, the model version is hosted by the prediction service, so | 2752 * Once deployed, the model version is hosted by the prediction service, so |
2633 * this location is useful only as a historical record. | 2753 * this location is useful only as a historical record. |
2634 * The total number of model files can't exceed 1000. | 2754 * The total number of model files can't exceed 1000. |
2635 */ | 2755 */ |
2636 core.String deploymentUri; | 2756 core.String deploymentUri; |
2637 /** | 2757 /** |
2638 * Optional. The description specified for the version when it was created. | 2758 * Optional. The description specified for the version when it was created. |
2639 */ | 2759 */ |
2640 core.String description; | 2760 core.String description; |
| 2761 /** Output only. The details of a failure or a cancellation. */ |
| 2762 core.String errorMessage; |
2641 /** | 2763 /** |
2642 * Output only. If true, this version will be used to handle prediction | 2764 * Output only. If true, this version will be used to handle prediction |
2643 * requests that do not specify a version. | 2765 * requests that do not specify a version. |
2644 * | 2766 * |
2645 * You can change the default version by calling | 2767 * You can change the default version by calling |
2646 * [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/project
s.models.versions/setDefault). | 2768 * [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1/project
s.models.versions/setDefault). |
2647 */ | 2769 */ |
2648 core.bool isDefault; | 2770 core.bool isDefault; |
2649 /** Output only. The time the version was last used for prediction. */ | 2771 /** Output only. The time the version was last used for prediction. */ |
2650 core.String lastUseTime; | 2772 core.String lastUseTime; |
(...skipping 10 matching lines...) Expand all Loading... |
2661 * Required.The name specified for the version when it was created. | 2783 * Required.The name specified for the version when it was created. |
2662 * | 2784 * |
2663 * The version name must be unique within the model it is created in. | 2785 * The version name must be unique within the model it is created in. |
2664 */ | 2786 */ |
2665 core.String name; | 2787 core.String name; |
2666 /** | 2788 /** |
2667 * Optional. The Google Cloud ML runtime version to use for this deployment. | 2789 * Optional. The Google Cloud ML runtime version to use for this deployment. |
2668 * If not set, Google Cloud ML will choose a version. | 2790 * If not set, Google Cloud ML will choose a version. |
2669 */ | 2791 */ |
2670 core.String runtimeVersion; | 2792 core.String runtimeVersion; |
| 2793 /** |
| 2794 * Output only. The state of a version. |
| 2795 * Possible string values are: |
| 2796 * - "UNKNOWN" : The version state is unspecified. |
| 2797 * - "READY" : The version is ready for prediction. |
| 2798 * - "CREATING" : The version is still in the process of creation. |
| 2799 * - "FAILED" : The version failed to be created, possibly cancelled. |
| 2800 * `error_message` should contain the details of the failure. |
| 2801 */ |
| 2802 core.String state; |
2671 | 2803 |
2672 GoogleCloudMlV1Version(); | 2804 GoogleCloudMlV1Version(); |
2673 | 2805 |
2674 GoogleCloudMlV1Version.fromJson(core.Map _json) { | 2806 GoogleCloudMlV1Version.fromJson(core.Map _json) { |
2675 if (_json.containsKey("automaticScaling")) { | 2807 if (_json.containsKey("automaticScaling")) { |
2676 automaticScaling = new GoogleCloudMlV1AutomaticScaling.fromJson(_json["aut
omaticScaling"]); | 2808 automaticScaling = new GoogleCloudMlV1AutomaticScaling.fromJson(_json["aut
omaticScaling"]); |
2677 } | 2809 } |
2678 if (_json.containsKey("createTime")) { | 2810 if (_json.containsKey("createTime")) { |
2679 createTime = _json["createTime"]; | 2811 createTime = _json["createTime"]; |
2680 } | 2812 } |
2681 if (_json.containsKey("deploymentUri")) { | 2813 if (_json.containsKey("deploymentUri")) { |
2682 deploymentUri = _json["deploymentUri"]; | 2814 deploymentUri = _json["deploymentUri"]; |
2683 } | 2815 } |
2684 if (_json.containsKey("description")) { | 2816 if (_json.containsKey("description")) { |
2685 description = _json["description"]; | 2817 description = _json["description"]; |
2686 } | 2818 } |
| 2819 if (_json.containsKey("errorMessage")) { |
| 2820 errorMessage = _json["errorMessage"]; |
| 2821 } |
2687 if (_json.containsKey("isDefault")) { | 2822 if (_json.containsKey("isDefault")) { |
2688 isDefault = _json["isDefault"]; | 2823 isDefault = _json["isDefault"]; |
2689 } | 2824 } |
2690 if (_json.containsKey("lastUseTime")) { | 2825 if (_json.containsKey("lastUseTime")) { |
2691 lastUseTime = _json["lastUseTime"]; | 2826 lastUseTime = _json["lastUseTime"]; |
2692 } | 2827 } |
2693 if (_json.containsKey("manualScaling")) { | 2828 if (_json.containsKey("manualScaling")) { |
2694 manualScaling = new GoogleCloudMlV1ManualScaling.fromJson(_json["manualSca
ling"]); | 2829 manualScaling = new GoogleCloudMlV1ManualScaling.fromJson(_json["manualSca
ling"]); |
2695 } | 2830 } |
2696 if (_json.containsKey("name")) { | 2831 if (_json.containsKey("name")) { |
2697 name = _json["name"]; | 2832 name = _json["name"]; |
2698 } | 2833 } |
2699 if (_json.containsKey("runtimeVersion")) { | 2834 if (_json.containsKey("runtimeVersion")) { |
2700 runtimeVersion = _json["runtimeVersion"]; | 2835 runtimeVersion = _json["runtimeVersion"]; |
2701 } | 2836 } |
| 2837 if (_json.containsKey("state")) { |
| 2838 state = _json["state"]; |
| 2839 } |
2702 } | 2840 } |
2703 | 2841 |
2704 core.Map<core.String, core.Object> toJson() { | 2842 core.Map<core.String, core.Object> toJson() { |
2705 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2843 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
2706 if (automaticScaling != null) { | 2844 if (automaticScaling != null) { |
2707 _json["automaticScaling"] = (automaticScaling).toJson(); | 2845 _json["automaticScaling"] = (automaticScaling).toJson(); |
2708 } | 2846 } |
2709 if (createTime != null) { | 2847 if (createTime != null) { |
2710 _json["createTime"] = createTime; | 2848 _json["createTime"] = createTime; |
2711 } | 2849 } |
2712 if (deploymentUri != null) { | 2850 if (deploymentUri != null) { |
2713 _json["deploymentUri"] = deploymentUri; | 2851 _json["deploymentUri"] = deploymentUri; |
2714 } | 2852 } |
2715 if (description != null) { | 2853 if (description != null) { |
2716 _json["description"] = description; | 2854 _json["description"] = description; |
2717 } | 2855 } |
| 2856 if (errorMessage != null) { |
| 2857 _json["errorMessage"] = errorMessage; |
| 2858 } |
2718 if (isDefault != null) { | 2859 if (isDefault != null) { |
2719 _json["isDefault"] = isDefault; | 2860 _json["isDefault"] = isDefault; |
2720 } | 2861 } |
2721 if (lastUseTime != null) { | 2862 if (lastUseTime != null) { |
2722 _json["lastUseTime"] = lastUseTime; | 2863 _json["lastUseTime"] = lastUseTime; |
2723 } | 2864 } |
2724 if (manualScaling != null) { | 2865 if (manualScaling != null) { |
2725 _json["manualScaling"] = (manualScaling).toJson(); | 2866 _json["manualScaling"] = (manualScaling).toJson(); |
2726 } | 2867 } |
2727 if (name != null) { | 2868 if (name != null) { |
2728 _json["name"] = name; | 2869 _json["name"] = name; |
2729 } | 2870 } |
2730 if (runtimeVersion != null) { | 2871 if (runtimeVersion != null) { |
2731 _json["runtimeVersion"] = runtimeVersion; | 2872 _json["runtimeVersion"] = runtimeVersion; |
2732 } | 2873 } |
| 2874 if (state != null) { |
| 2875 _json["state"] = state; |
| 2876 } |
2733 return _json; | 2877 return _json; |
2734 } | 2878 } |
2735 } | 2879 } |
2736 | 2880 |
2737 /** Options for automatically scaling a model. */ | 2881 /** Options for automatically scaling a model. */ |
2738 class GoogleCloudMlV1beta1AutomaticScaling { | 2882 class GoogleCloudMlV1beta1AutomaticScaling { |
2739 /** | 2883 /** |
2740 * Optional. The minimum number of nodes to allocate for this model. These | 2884 * Optional. The minimum number of nodes to allocate for this model. These |
2741 * nodes are always up, starting from the time the model is deployed, so the | 2885 * nodes are always up, starting from the time the model is deployed, so the |
2742 * cost of operating this model will be at least | 2886 * cost of operating this model will be at least |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2909 * the model service uses the specified location as the source of the model. | 3053 * the model service uses the specified location as the source of the model. |
2910 * Once deployed, the model version is hosted by the prediction service, so | 3054 * Once deployed, the model version is hosted by the prediction service, so |
2911 * this location is useful only as a historical record. | 3055 * this location is useful only as a historical record. |
2912 * The total number of model files can't exceed 1000. | 3056 * The total number of model files can't exceed 1000. |
2913 */ | 3057 */ |
2914 core.String deploymentUri; | 3058 core.String deploymentUri; |
2915 /** | 3059 /** |
2916 * Optional. The description specified for the version when it was created. | 3060 * Optional. The description specified for the version when it was created. |
2917 */ | 3061 */ |
2918 core.String description; | 3062 core.String description; |
| 3063 /** Output only. The details of a failure or a cancellation. */ |
| 3064 core.String errorMessage; |
2919 /** | 3065 /** |
2920 * Output only. If true, this version will be used to handle prediction | 3066 * Output only. If true, this version will be used to handle prediction |
2921 * requests that do not specify a version. | 3067 * requests that do not specify a version. |
2922 * | 3068 * |
2923 * You can change the default version by calling | 3069 * You can change the default version by calling |
2924 * [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/pr
ojects.models.versions/setDefault). | 3070 * [projects.methods.versions.setDefault](/ml-engine/reference/rest/v1beta1/pr
ojects.models.versions/setDefault). |
2925 */ | 3071 */ |
2926 core.bool isDefault; | 3072 core.bool isDefault; |
2927 /** Output only. The time the version was last used for prediction. */ | 3073 /** Output only. The time the version was last used for prediction. */ |
2928 core.String lastUseTime; | 3074 core.String lastUseTime; |
(...skipping 10 matching lines...) Expand all Loading... |
2939 * Required.The name specified for the version when it was created. | 3085 * Required.The name specified for the version when it was created. |
2940 * | 3086 * |
2941 * The version name must be unique within the model it is created in. | 3087 * The version name must be unique within the model it is created in. |
2942 */ | 3088 */ |
2943 core.String name; | 3089 core.String name; |
2944 /** | 3090 /** |
2945 * Optional. The Google Cloud ML runtime version to use for this deployment. | 3091 * Optional. The Google Cloud ML runtime version to use for this deployment. |
2946 * If not set, Google Cloud ML will choose a version. | 3092 * If not set, Google Cloud ML will choose a version. |
2947 */ | 3093 */ |
2948 core.String runtimeVersion; | 3094 core.String runtimeVersion; |
| 3095 /** |
| 3096 * Output only. The state of a version. |
| 3097 * Possible string values are: |
| 3098 * - "UNKNOWN" : / The version state is unspecified. |
| 3099 * - "READY" : The version is ready for prediction. |
| 3100 * - "CREATING" : The version is still in the process of creation. |
| 3101 * - "FAILED" : The version failed to be created, possibly cancelled. |
| 3102 * `error_message` should contain the details of the failure. |
| 3103 */ |
| 3104 core.String state; |
2949 | 3105 |
2950 GoogleCloudMlV1beta1Version(); | 3106 GoogleCloudMlV1beta1Version(); |
2951 | 3107 |
2952 GoogleCloudMlV1beta1Version.fromJson(core.Map _json) { | 3108 GoogleCloudMlV1beta1Version.fromJson(core.Map _json) { |
2953 if (_json.containsKey("automaticScaling")) { | 3109 if (_json.containsKey("automaticScaling")) { |
2954 automaticScaling = new GoogleCloudMlV1beta1AutomaticScaling.fromJson(_json
["automaticScaling"]); | 3110 automaticScaling = new GoogleCloudMlV1beta1AutomaticScaling.fromJson(_json
["automaticScaling"]); |
2955 } | 3111 } |
2956 if (_json.containsKey("createTime")) { | 3112 if (_json.containsKey("createTime")) { |
2957 createTime = _json["createTime"]; | 3113 createTime = _json["createTime"]; |
2958 } | 3114 } |
2959 if (_json.containsKey("deploymentUri")) { | 3115 if (_json.containsKey("deploymentUri")) { |
2960 deploymentUri = _json["deploymentUri"]; | 3116 deploymentUri = _json["deploymentUri"]; |
2961 } | 3117 } |
2962 if (_json.containsKey("description")) { | 3118 if (_json.containsKey("description")) { |
2963 description = _json["description"]; | 3119 description = _json["description"]; |
2964 } | 3120 } |
| 3121 if (_json.containsKey("errorMessage")) { |
| 3122 errorMessage = _json["errorMessage"]; |
| 3123 } |
2965 if (_json.containsKey("isDefault")) { | 3124 if (_json.containsKey("isDefault")) { |
2966 isDefault = _json["isDefault"]; | 3125 isDefault = _json["isDefault"]; |
2967 } | 3126 } |
2968 if (_json.containsKey("lastUseTime")) { | 3127 if (_json.containsKey("lastUseTime")) { |
2969 lastUseTime = _json["lastUseTime"]; | 3128 lastUseTime = _json["lastUseTime"]; |
2970 } | 3129 } |
2971 if (_json.containsKey("manualScaling")) { | 3130 if (_json.containsKey("manualScaling")) { |
2972 manualScaling = new GoogleCloudMlV1beta1ManualScaling.fromJson(_json["manu
alScaling"]); | 3131 manualScaling = new GoogleCloudMlV1beta1ManualScaling.fromJson(_json["manu
alScaling"]); |
2973 } | 3132 } |
2974 if (_json.containsKey("name")) { | 3133 if (_json.containsKey("name")) { |
2975 name = _json["name"]; | 3134 name = _json["name"]; |
2976 } | 3135 } |
2977 if (_json.containsKey("runtimeVersion")) { | 3136 if (_json.containsKey("runtimeVersion")) { |
2978 runtimeVersion = _json["runtimeVersion"]; | 3137 runtimeVersion = _json["runtimeVersion"]; |
2979 } | 3138 } |
| 3139 if (_json.containsKey("state")) { |
| 3140 state = _json["state"]; |
| 3141 } |
2980 } | 3142 } |
2981 | 3143 |
2982 core.Map<core.String, core.Object> toJson() { | 3144 core.Map<core.String, core.Object> toJson() { |
2983 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3145 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
2984 if (automaticScaling != null) { | 3146 if (automaticScaling != null) { |
2985 _json["automaticScaling"] = (automaticScaling).toJson(); | 3147 _json["automaticScaling"] = (automaticScaling).toJson(); |
2986 } | 3148 } |
2987 if (createTime != null) { | 3149 if (createTime != null) { |
2988 _json["createTime"] = createTime; | 3150 _json["createTime"] = createTime; |
2989 } | 3151 } |
2990 if (deploymentUri != null) { | 3152 if (deploymentUri != null) { |
2991 _json["deploymentUri"] = deploymentUri; | 3153 _json["deploymentUri"] = deploymentUri; |
2992 } | 3154 } |
2993 if (description != null) { | 3155 if (description != null) { |
2994 _json["description"] = description; | 3156 _json["description"] = description; |
2995 } | 3157 } |
| 3158 if (errorMessage != null) { |
| 3159 _json["errorMessage"] = errorMessage; |
| 3160 } |
2996 if (isDefault != null) { | 3161 if (isDefault != null) { |
2997 _json["isDefault"] = isDefault; | 3162 _json["isDefault"] = isDefault; |
2998 } | 3163 } |
2999 if (lastUseTime != null) { | 3164 if (lastUseTime != null) { |
3000 _json["lastUseTime"] = lastUseTime; | 3165 _json["lastUseTime"] = lastUseTime; |
3001 } | 3166 } |
3002 if (manualScaling != null) { | 3167 if (manualScaling != null) { |
3003 _json["manualScaling"] = (manualScaling).toJson(); | 3168 _json["manualScaling"] = (manualScaling).toJson(); |
3004 } | 3169 } |
3005 if (name != null) { | 3170 if (name != null) { |
3006 _json["name"] = name; | 3171 _json["name"] = name; |
3007 } | 3172 } |
3008 if (runtimeVersion != null) { | 3173 if (runtimeVersion != null) { |
3009 _json["runtimeVersion"] = runtimeVersion; | 3174 _json["runtimeVersion"] = runtimeVersion; |
3010 } | 3175 } |
3011 return _json; | 3176 if (state != null) { |
3012 } | 3177 _json["state"] = state; |
3013 } | 3178 } |
| 3179 return _json; |
| 3180 } |
| 3181 } |
| 3182 |
| 3183 /** Write a Cloud Audit log */ |
| 3184 class GoogleIamV1LogConfigCloudAuditOptions { |
| 3185 /** |
| 3186 * The log_name to populate in the Cloud Audit Record. |
| 3187 * Possible string values are: |
| 3188 * - "UNSPECIFIED_LOG_NAME" : Default. Should not be used. |
| 3189 * - "ADMIN_ACTIVITY" : Corresponds to "cloudaudit.googleapis.com/activity" |
| 3190 * - "DATA_ACCESS" : Corresponds to "cloudaudit.googleapis.com/data_access" |
| 3191 */ |
| 3192 core.String logName; |
| 3193 |
| 3194 GoogleIamV1LogConfigCloudAuditOptions(); |
| 3195 |
| 3196 GoogleIamV1LogConfigCloudAuditOptions.fromJson(core.Map _json) { |
| 3197 if (_json.containsKey("logName")) { |
| 3198 logName = _json["logName"]; |
| 3199 } |
| 3200 } |
| 3201 |
| 3202 core.Map<core.String, core.Object> toJson() { |
| 3203 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3204 if (logName != null) { |
| 3205 _json["logName"] = logName; |
| 3206 } |
| 3207 return _json; |
| 3208 } |
| 3209 } |
| 3210 |
| 3211 /** Options for counters */ |
| 3212 class GoogleIamV1LogConfigCounterOptions { |
| 3213 /** The field value to attribute. */ |
| 3214 core.String field; |
| 3215 /** The metric to update. */ |
| 3216 core.String metric; |
| 3217 |
| 3218 GoogleIamV1LogConfigCounterOptions(); |
| 3219 |
| 3220 GoogleIamV1LogConfigCounterOptions.fromJson(core.Map _json) { |
| 3221 if (_json.containsKey("field")) { |
| 3222 field = _json["field"]; |
| 3223 } |
| 3224 if (_json.containsKey("metric")) { |
| 3225 metric = _json["metric"]; |
| 3226 } |
| 3227 } |
| 3228 |
| 3229 core.Map<core.String, core.Object> toJson() { |
| 3230 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3231 if (field != null) { |
| 3232 _json["field"] = field; |
| 3233 } |
| 3234 if (metric != null) { |
| 3235 _json["metric"] = metric; |
| 3236 } |
| 3237 return _json; |
| 3238 } |
| 3239 } |
| 3240 |
| 3241 /** Write a Data Access (Gin) log */ |
| 3242 class GoogleIamV1LogConfigDataAccessOptions { |
| 3243 |
| 3244 GoogleIamV1LogConfigDataAccessOptions(); |
| 3245 |
| 3246 GoogleIamV1LogConfigDataAccessOptions.fromJson(core.Map _json) { |
| 3247 } |
| 3248 |
| 3249 core.Map<core.String, core.Object> toJson() { |
| 3250 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3251 return _json; |
| 3252 } |
| 3253 } |
| 3254 |
| 3255 /** |
| 3256 * Specifies the audit configuration for a service. |
| 3257 * The configuration determines which permission types are logged, and what |
| 3258 * identities, if any, are exempted from logging. |
| 3259 * An AuditConfig must have one or more AuditLogConfigs. |
| 3260 * |
| 3261 * If there are AuditConfigs for both `allServices` and a specific service, |
| 3262 * the union of the two AuditConfigs is used for that service: the log_types |
| 3263 * specified in each AuditConfig are enabled, and the exempted_members in each |
| 3264 * AuditConfig are exempted. |
| 3265 * |
| 3266 * Example Policy with multiple AuditConfigs: |
| 3267 * |
| 3268 * { |
| 3269 * "audit_configs": [ |
| 3270 * { |
| 3271 * "service": "allServices" |
| 3272 * "audit_log_configs": [ |
| 3273 * { |
| 3274 * "log_type": "DATA_READ", |
| 3275 * "exempted_members": [ |
| 3276 * "user:foo@gmail.com" |
| 3277 * ] |
| 3278 * }, |
| 3279 * { |
| 3280 * "log_type": "DATA_WRITE", |
| 3281 * }, |
| 3282 * { |
| 3283 * "log_type": "ADMIN_READ", |
| 3284 * } |
| 3285 * ] |
| 3286 * }, |
| 3287 * { |
| 3288 * "service": "fooservice.googleapis.com" |
| 3289 * "audit_log_configs": [ |
| 3290 * { |
| 3291 * "log_type": "DATA_READ", |
| 3292 * }, |
| 3293 * { |
| 3294 * "log_type": "DATA_WRITE", |
| 3295 * "exempted_members": [ |
| 3296 * "user:bar@gmail.com" |
| 3297 * ] |
| 3298 * } |
| 3299 * ] |
| 3300 * } |
| 3301 * ] |
| 3302 * } |
| 3303 * |
| 3304 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 3305 * logging. It also exempts foo@gmail.com from DATA_READ logging, and |
| 3306 * bar@gmail.com from DATA_WRITE logging. |
| 3307 */ |
| 3308 class GoogleIamV1AuditConfig { |
| 3309 /** |
| 3310 * The configuration for logging of each type of permission. |
| 3311 * Next ID: 4 |
| 3312 */ |
| 3313 core.List<GoogleIamV1AuditLogConfig> auditLogConfigs; |
| 3314 core.List<core.String> exemptedMembers; |
| 3315 /** |
| 3316 * Specifies a service that will be enabled for audit logging. |
| 3317 * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. |
| 3318 * `allServices` is a special value that covers all services. |
| 3319 */ |
| 3320 core.String service; |
| 3321 |
| 3322 GoogleIamV1AuditConfig(); |
| 3323 |
| 3324 GoogleIamV1AuditConfig.fromJson(core.Map _json) { |
| 3325 if (_json.containsKey("auditLogConfigs")) { |
| 3326 auditLogConfigs = _json["auditLogConfigs"].map((value) => new GoogleIamV1A
uditLogConfig.fromJson(value)).toList(); |
| 3327 } |
| 3328 if (_json.containsKey("exemptedMembers")) { |
| 3329 exemptedMembers = _json["exemptedMembers"]; |
| 3330 } |
| 3331 if (_json.containsKey("service")) { |
| 3332 service = _json["service"]; |
| 3333 } |
| 3334 } |
| 3335 |
| 3336 core.Map<core.String, core.Object> toJson() { |
| 3337 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3338 if (auditLogConfigs != null) { |
| 3339 _json["auditLogConfigs"] = auditLogConfigs.map((value) => (value).toJson()
).toList(); |
| 3340 } |
| 3341 if (exemptedMembers != null) { |
| 3342 _json["exemptedMembers"] = exemptedMembers; |
| 3343 } |
| 3344 if (service != null) { |
| 3345 _json["service"] = service; |
| 3346 } |
| 3347 return _json; |
| 3348 } |
| 3349 } |
| 3350 |
| 3351 /** |
| 3352 * Provides the configuration for logging a type of permissions. |
| 3353 * Example: |
| 3354 * |
| 3355 * { |
| 3356 * "audit_log_configs": [ |
| 3357 * { |
| 3358 * "log_type": "DATA_READ", |
| 3359 * "exempted_members": [ |
| 3360 * "user:foo@gmail.com" |
| 3361 * ] |
| 3362 * }, |
| 3363 * { |
| 3364 * "log_type": "DATA_WRITE", |
| 3365 * } |
| 3366 * ] |
| 3367 * } |
| 3368 * |
| 3369 * This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 3370 * foo@gmail.com from DATA_READ logging. |
| 3371 */ |
| 3372 class GoogleIamV1AuditLogConfig { |
| 3373 /** |
| 3374 * Specifies the identities that do not cause logging for this type of |
| 3375 * permission. |
| 3376 * Follows the same format of Binding.members. |
| 3377 */ |
| 3378 core.List<core.String> exemptedMembers; |
| 3379 /** |
| 3380 * The log type that this config enables. |
| 3381 * Possible string values are: |
| 3382 * - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. |
| 3383 * - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy |
| 3384 * - "DATA_WRITE" : Data writes. Example: CloudSQL Users create |
| 3385 * - "DATA_READ" : Data reads. Example: CloudSQL Users list |
| 3386 */ |
| 3387 core.String logType; |
| 3388 |
| 3389 GoogleIamV1AuditLogConfig(); |
| 3390 |
| 3391 GoogleIamV1AuditLogConfig.fromJson(core.Map _json) { |
| 3392 if (_json.containsKey("exemptedMembers")) { |
| 3393 exemptedMembers = _json["exemptedMembers"]; |
| 3394 } |
| 3395 if (_json.containsKey("logType")) { |
| 3396 logType = _json["logType"]; |
| 3397 } |
| 3398 } |
| 3399 |
| 3400 core.Map<core.String, core.Object> toJson() { |
| 3401 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3402 if (exemptedMembers != null) { |
| 3403 _json["exemptedMembers"] = exemptedMembers; |
| 3404 } |
| 3405 if (logType != null) { |
| 3406 _json["logType"] = logType; |
| 3407 } |
| 3408 return _json; |
| 3409 } |
| 3410 } |
| 3411 |
| 3412 /** Associates `members` with a `role`. */ |
| 3413 class GoogleIamV1Binding { |
| 3414 /** |
| 3415 * The condition that is associated with this binding. |
| 3416 * NOTE: an unsatisfied condition will not allow user access via current |
| 3417 * binding. Different bindings, including their conditions, are examined |
| 3418 * independently. |
| 3419 * This field is GOOGLE_INTERNAL. |
| 3420 */ |
| 3421 GoogleTypeExpr condition; |
| 3422 /** |
| 3423 * Specifies the identities requesting access for a Cloud Platform resource. |
| 3424 * `members` can have the following values: |
| 3425 * |
| 3426 * * `allUsers`: A special identifier that represents anyone who is |
| 3427 * on the internet; with or without a Google account. |
| 3428 * |
| 3429 * * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 3430 * who is authenticated with a Google account or a service account. |
| 3431 * |
| 3432 * * `user:{emailid}`: An email address that represents a specific Google |
| 3433 * account. For example, `alice@gmail.com` or `joe@example.com`. |
| 3434 * |
| 3435 * |
| 3436 * * `serviceAccount:{emailid}`: An email address that represents a service |
| 3437 * account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 3438 * |
| 3439 * * `group:{emailid}`: An email address that represents a Google group. |
| 3440 * For example, `admins@example.com`. |
| 3441 * |
| 3442 * |
| 3443 * * `domain:{domain}`: A Google Apps domain name that represents all the |
| 3444 * users of that domain. For example, `google.com` or `example.com`. |
| 3445 */ |
| 3446 core.List<core.String> members; |
| 3447 /** |
| 3448 * Role that is assigned to `members`. |
| 3449 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 3450 * Required |
| 3451 */ |
| 3452 core.String role; |
| 3453 |
| 3454 GoogleIamV1Binding(); |
| 3455 |
| 3456 GoogleIamV1Binding.fromJson(core.Map _json) { |
| 3457 if (_json.containsKey("condition")) { |
| 3458 condition = new GoogleTypeExpr.fromJson(_json["condition"]); |
| 3459 } |
| 3460 if (_json.containsKey("members")) { |
| 3461 members = _json["members"]; |
| 3462 } |
| 3463 if (_json.containsKey("role")) { |
| 3464 role = _json["role"]; |
| 3465 } |
| 3466 } |
| 3467 |
| 3468 core.Map<core.String, core.Object> toJson() { |
| 3469 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3470 if (condition != null) { |
| 3471 _json["condition"] = (condition).toJson(); |
| 3472 } |
| 3473 if (members != null) { |
| 3474 _json["members"] = members; |
| 3475 } |
| 3476 if (role != null) { |
| 3477 _json["role"] = role; |
| 3478 } |
| 3479 return _json; |
| 3480 } |
| 3481 } |
| 3482 |
| 3483 /** A condition to be met. */ |
| 3484 class GoogleIamV1Condition { |
| 3485 /** |
| 3486 * Trusted attributes supplied by the IAM system. |
| 3487 * Possible string values are: |
| 3488 * - "NO_ATTR" : Default non-attribute. |
| 3489 * - "AUTHORITY" : Either principal or (if present) authority selector. |
| 3490 * - "ATTRIBUTION" : The principal (even if an authority selector is present), |
| 3491 * which |
| 3492 * must only be used for attribution, not authorization. |
| 3493 * - "APPROVER" : An approver (distinct from the requester) that has |
| 3494 * authorized this |
| 3495 * request. |
| 3496 * When used with IN, the condition indicates that one of the approvers |
| 3497 * associated with the request matches the specified principal, or is a |
| 3498 * member of the specified group. Approvers can only grant additional |
| 3499 * access, and are thus only used in a strictly positive context |
| 3500 * (e.g. ALLOW/IN or DENY/NOT_IN). |
| 3501 * - "JUSTIFICATION_TYPE" : What types of justifications have been supplied |
| 3502 * with this request. |
| 3503 * String values should match enum names from tech.iam.JustificationType, |
| 3504 * e.g. "MANUAL_STRING". It is not permitted to grant access based on |
| 3505 * the *absence* of a justification, so justification conditions can only |
| 3506 * be used in a "positive" context (e.g., ALLOW/IN or DENY/NOT_IN). |
| 3507 * |
| 3508 * Multiple justifications, e.g., a Buganizer ID and a manually-entered |
| 3509 * reason, are normal and supported. |
| 3510 */ |
| 3511 core.String iam; |
| 3512 /** |
| 3513 * An operator to apply the subject with. |
| 3514 * Possible string values are: |
| 3515 * - "NO_OP" : Default no-op. |
| 3516 * - "EQUALS" : DEPRECATED. Use IN instead. |
| 3517 * - "NOT_EQUALS" : DEPRECATED. Use NOT_IN instead. |
| 3518 * - "IN" : The condition is true if the subject (or any element of it if it |
| 3519 * is |
| 3520 * a set) matches any of the supplied values. |
| 3521 * - "NOT_IN" : The condition is true if the subject (or every element of it |
| 3522 * if it is |
| 3523 * a set) matches none of the supplied values. |
| 3524 * - "DISCHARGED" : Subject is discharged |
| 3525 */ |
| 3526 core.String op; |
| 3527 /** Trusted attributes discharged by the service. */ |
| 3528 core.String svc; |
| 3529 /** |
| 3530 * Trusted attributes supplied by any service that owns resources and uses |
| 3531 * the IAM system for access control. |
| 3532 * Possible string values are: |
| 3533 * - "NO_ATTR" : Default non-attribute type |
| 3534 * - "REGION" : Region of the resource |
| 3535 * - "SERVICE" : Service name |
| 3536 * - "NAME" : Resource name |
| 3537 * - "IP" : IP address of the caller |
| 3538 */ |
| 3539 core.String sys; |
| 3540 /** DEPRECATED. Use 'values' instead. */ |
| 3541 core.String value; |
| 3542 /** The objects of the condition. This is mutually exclusive with 'value'. */ |
| 3543 core.List<core.String> values; |
| 3544 |
| 3545 GoogleIamV1Condition(); |
| 3546 |
| 3547 GoogleIamV1Condition.fromJson(core.Map _json) { |
| 3548 if (_json.containsKey("iam")) { |
| 3549 iam = _json["iam"]; |
| 3550 } |
| 3551 if (_json.containsKey("op")) { |
| 3552 op = _json["op"]; |
| 3553 } |
| 3554 if (_json.containsKey("svc")) { |
| 3555 svc = _json["svc"]; |
| 3556 } |
| 3557 if (_json.containsKey("sys")) { |
| 3558 sys = _json["sys"]; |
| 3559 } |
| 3560 if (_json.containsKey("value")) { |
| 3561 value = _json["value"]; |
| 3562 } |
| 3563 if (_json.containsKey("values")) { |
| 3564 values = _json["values"]; |
| 3565 } |
| 3566 } |
| 3567 |
| 3568 core.Map<core.String, core.Object> toJson() { |
| 3569 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3570 if (iam != null) { |
| 3571 _json["iam"] = iam; |
| 3572 } |
| 3573 if (op != null) { |
| 3574 _json["op"] = op; |
| 3575 } |
| 3576 if (svc != null) { |
| 3577 _json["svc"] = svc; |
| 3578 } |
| 3579 if (sys != null) { |
| 3580 _json["sys"] = sys; |
| 3581 } |
| 3582 if (value != null) { |
| 3583 _json["value"] = value; |
| 3584 } |
| 3585 if (values != null) { |
| 3586 _json["values"] = values; |
| 3587 } |
| 3588 return _json; |
| 3589 } |
| 3590 } |
| 3591 |
| 3592 /** |
| 3593 * Specifies what kind of log the caller must write |
| 3594 * Increment a streamz counter with the specified metric and field names. |
| 3595 * |
| 3596 * Metric names should start with a '/', generally be lowercase-only, |
| 3597 * and end in "_count". Field names should not contain an initial slash. |
| 3598 * The actual exported metric names will have "/iam/policy" prepended. |
| 3599 * |
| 3600 * Field names correspond to IAM request parameters and field values are |
| 3601 * their respective values. |
| 3602 * |
| 3603 * At present the only supported field names are |
| 3604 * - "iam_principal", corresponding to IAMContext.principal; |
| 3605 * - "" (empty string), resulting in one aggretated counter with no field. |
| 3606 * |
| 3607 * Examples: |
| 3608 * counter { metric: "/debug_access_count" field: "iam_principal" } |
| 3609 * ==> increment counter /iam/policy/backend_debug_access_count |
| 3610 * {iam_principal=[value of IAMContext.principal]} |
| 3611 * |
| 3612 * At this time we do not support: |
| 3613 * * multiple field names (though this may be supported in the future) |
| 3614 * * decrementing the counter |
| 3615 * * incrementing it by anything other than 1 |
| 3616 */ |
| 3617 class GoogleIamV1LogConfig { |
| 3618 /** Cloud audit options. */ |
| 3619 GoogleIamV1LogConfigCloudAuditOptions cloudAudit; |
| 3620 /** Counter options. */ |
| 3621 GoogleIamV1LogConfigCounterOptions counter; |
| 3622 /** Data access options. */ |
| 3623 GoogleIamV1LogConfigDataAccessOptions dataAccess; |
| 3624 |
| 3625 GoogleIamV1LogConfig(); |
| 3626 |
| 3627 GoogleIamV1LogConfig.fromJson(core.Map _json) { |
| 3628 if (_json.containsKey("cloudAudit")) { |
| 3629 cloudAudit = new GoogleIamV1LogConfigCloudAuditOptions.fromJson(_json["clo
udAudit"]); |
| 3630 } |
| 3631 if (_json.containsKey("counter")) { |
| 3632 counter = new GoogleIamV1LogConfigCounterOptions.fromJson(_json["counter"]
); |
| 3633 } |
| 3634 if (_json.containsKey("dataAccess")) { |
| 3635 dataAccess = new GoogleIamV1LogConfigDataAccessOptions.fromJson(_json["dat
aAccess"]); |
| 3636 } |
| 3637 } |
| 3638 |
| 3639 core.Map<core.String, core.Object> toJson() { |
| 3640 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3641 if (cloudAudit != null) { |
| 3642 _json["cloudAudit"] = (cloudAudit).toJson(); |
| 3643 } |
| 3644 if (counter != null) { |
| 3645 _json["counter"] = (counter).toJson(); |
| 3646 } |
| 3647 if (dataAccess != null) { |
| 3648 _json["dataAccess"] = (dataAccess).toJson(); |
| 3649 } |
| 3650 return _json; |
| 3651 } |
| 3652 } |
| 3653 |
| 3654 /** |
| 3655 * Defines an Identity and Access Management (IAM) policy. It is used to |
| 3656 * specify access control policies for Cloud Platform resources. |
| 3657 * |
| 3658 * |
| 3659 * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
| 3660 * `members` to a `role`, where the members can be user accounts, Google groups, |
| 3661 * Google domains, and service accounts. A `role` is a named list of permissions |
| 3662 * defined by IAM. |
| 3663 * |
| 3664 * **Example** |
| 3665 * |
| 3666 * { |
| 3667 * "bindings": [ |
| 3668 * { |
| 3669 * "role": "roles/owner", |
| 3670 * "members": [ |
| 3671 * "user:mike@example.com", |
| 3672 * "group:admins@example.com", |
| 3673 * "domain:google.com", |
| 3674 * "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
| 3675 * ] |
| 3676 * }, |
| 3677 * { |
| 3678 * "role": "roles/viewer", |
| 3679 * "members": ["user:sean@example.com"] |
| 3680 * } |
| 3681 * ] |
| 3682 * } |
| 3683 * |
| 3684 * For a description of IAM and its features, see the |
| 3685 * [IAM developer's guide](https://cloud.google.com/iam). |
| 3686 */ |
| 3687 class GoogleIamV1Policy { |
| 3688 /** Specifies cloud audit logging configuration for this policy. */ |
| 3689 core.List<GoogleIamV1AuditConfig> auditConfigs; |
| 3690 /** |
| 3691 * Associates a list of `members` to a `role`. |
| 3692 * `bindings` with no members will result in an error. |
| 3693 */ |
| 3694 core.List<GoogleIamV1Binding> bindings; |
| 3695 /** |
| 3696 * `etag` is used for optimistic concurrency control as a way to help |
| 3697 * prevent simultaneous updates of a policy from overwriting each other. |
| 3698 * It is strongly suggested that systems make use of the `etag` in the |
| 3699 * read-modify-write cycle to perform policy updates in order to avoid race |
| 3700 * conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 3701 * systems are expected to put that etag in the request to `setIamPolicy` to |
| 3702 * ensure that their change will be applied to the same version of the policy. |
| 3703 * |
| 3704 * If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 3705 * policy is overwritten blindly. |
| 3706 */ |
| 3707 core.String etag; |
| 3708 core.List<core.int> get etagAsBytes { |
| 3709 return convert.BASE64.decode(etag); |
| 3710 } |
| 3711 |
| 3712 void set etagAsBytes(core.List<core.int> _bytes) { |
| 3713 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
| 3714 } |
| 3715 core.bool iamOwned; |
| 3716 /** |
| 3717 * If more than one rule is specified, the rules are applied in the following |
| 3718 * manner: |
| 3719 * - All matching LOG rules are always applied. |
| 3720 * - If any DENY/DENY_WITH_LOG rule matches, permission is denied. |
| 3721 * Logging will be applied if one or more matching rule requires logging. |
| 3722 * - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is |
| 3723 * granted. |
| 3724 * Logging will be applied if one or more matching rule requires logging. |
| 3725 * - Otherwise, if no rule applies, permission is denied. |
| 3726 */ |
| 3727 core.List<GoogleIamV1Rule> rules; |
| 3728 /** Version of the `Policy`. The default version is 0. */ |
| 3729 core.int version; |
| 3730 |
| 3731 GoogleIamV1Policy(); |
| 3732 |
| 3733 GoogleIamV1Policy.fromJson(core.Map _json) { |
| 3734 if (_json.containsKey("auditConfigs")) { |
| 3735 auditConfigs = _json["auditConfigs"].map((value) => new GoogleIamV1AuditCo
nfig.fromJson(value)).toList(); |
| 3736 } |
| 3737 if (_json.containsKey("bindings")) { |
| 3738 bindings = _json["bindings"].map((value) => new GoogleIamV1Binding.fromJso
n(value)).toList(); |
| 3739 } |
| 3740 if (_json.containsKey("etag")) { |
| 3741 etag = _json["etag"]; |
| 3742 } |
| 3743 if (_json.containsKey("iamOwned")) { |
| 3744 iamOwned = _json["iamOwned"]; |
| 3745 } |
| 3746 if (_json.containsKey("rules")) { |
| 3747 rules = _json["rules"].map((value) => new GoogleIamV1Rule.fromJson(value))
.toList(); |
| 3748 } |
| 3749 if (_json.containsKey("version")) { |
| 3750 version = _json["version"]; |
| 3751 } |
| 3752 } |
| 3753 |
| 3754 core.Map<core.String, core.Object> toJson() { |
| 3755 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3756 if (auditConfigs != null) { |
| 3757 _json["auditConfigs"] = auditConfigs.map((value) => (value).toJson()).toLi
st(); |
| 3758 } |
| 3759 if (bindings != null) { |
| 3760 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); |
| 3761 } |
| 3762 if (etag != null) { |
| 3763 _json["etag"] = etag; |
| 3764 } |
| 3765 if (iamOwned != null) { |
| 3766 _json["iamOwned"] = iamOwned; |
| 3767 } |
| 3768 if (rules != null) { |
| 3769 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
| 3770 } |
| 3771 if (version != null) { |
| 3772 _json["version"] = version; |
| 3773 } |
| 3774 return _json; |
| 3775 } |
| 3776 } |
| 3777 |
| 3778 /** A rule to be applied in a Policy. */ |
| 3779 class GoogleIamV1Rule { |
| 3780 /** |
| 3781 * Required |
| 3782 * Possible string values are: |
| 3783 * - "NO_ACTION" : Default no action. |
| 3784 * - "ALLOW" : Matching 'Entries' grant access. |
| 3785 * - "ALLOW_WITH_LOG" : Matching 'Entries' grant access and the caller |
| 3786 * promises to log |
| 3787 * the request per the returned log_configs. |
| 3788 * - "DENY" : Matching 'Entries' deny access. |
| 3789 * - "DENY_WITH_LOG" : Matching 'Entries' deny access and the caller promises |
| 3790 * to log |
| 3791 * the request per the returned log_configs. |
| 3792 * - "LOG" : Matching 'Entries' tell IAM.Check callers to generate logs. |
| 3793 */ |
| 3794 core.String action; |
| 3795 /** Additional restrictions that must be met */ |
| 3796 core.List<GoogleIamV1Condition> conditions; |
| 3797 /** Human-readable description of the rule. */ |
| 3798 core.String description; |
| 3799 /** |
| 3800 * If one or more 'in' clauses are specified, the rule matches if |
| 3801 * the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. |
| 3802 */ |
| 3803 core.List<core.String> in_; |
| 3804 /** |
| 3805 * The config returned to callers of tech.iam.IAM.CheckPolicy for any entries |
| 3806 * that match the LOG action. |
| 3807 */ |
| 3808 core.List<GoogleIamV1LogConfig> logConfig; |
| 3809 /** |
| 3810 * If one or more 'not_in' clauses are specified, the rule matches |
| 3811 * if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. |
| 3812 * The format for in and not_in entries is the same as for members in a |
| 3813 * Binding (see google/iam/v1/policy.proto). |
| 3814 */ |
| 3815 core.List<core.String> notIn; |
| 3816 /** |
| 3817 * A permission is a string of form '<service>.<resource type>.<verb>' |
| 3818 * (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, |
| 3819 * and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. |
| 3820 */ |
| 3821 core.List<core.String> permissions; |
| 3822 |
| 3823 GoogleIamV1Rule(); |
| 3824 |
| 3825 GoogleIamV1Rule.fromJson(core.Map _json) { |
| 3826 if (_json.containsKey("action")) { |
| 3827 action = _json["action"]; |
| 3828 } |
| 3829 if (_json.containsKey("conditions")) { |
| 3830 conditions = _json["conditions"].map((value) => new GoogleIamV1Condition.f
romJson(value)).toList(); |
| 3831 } |
| 3832 if (_json.containsKey("description")) { |
| 3833 description = _json["description"]; |
| 3834 } |
| 3835 if (_json.containsKey("in")) { |
| 3836 in_ = _json["in"]; |
| 3837 } |
| 3838 if (_json.containsKey("logConfig")) { |
| 3839 logConfig = _json["logConfig"].map((value) => new GoogleIamV1LogConfig.fro
mJson(value)).toList(); |
| 3840 } |
| 3841 if (_json.containsKey("notIn")) { |
| 3842 notIn = _json["notIn"]; |
| 3843 } |
| 3844 if (_json.containsKey("permissions")) { |
| 3845 permissions = _json["permissions"]; |
| 3846 } |
| 3847 } |
| 3848 |
| 3849 core.Map<core.String, core.Object> toJson() { |
| 3850 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3851 if (action != null) { |
| 3852 _json["action"] = action; |
| 3853 } |
| 3854 if (conditions != null) { |
| 3855 _json["conditions"] = conditions.map((value) => (value).toJson()).toList()
; |
| 3856 } |
| 3857 if (description != null) { |
| 3858 _json["description"] = description; |
| 3859 } |
| 3860 if (in_ != null) { |
| 3861 _json["in"] = in_; |
| 3862 } |
| 3863 if (logConfig != null) { |
| 3864 _json["logConfig"] = logConfig.map((value) => (value).toJson()).toList(); |
| 3865 } |
| 3866 if (notIn != null) { |
| 3867 _json["notIn"] = notIn; |
| 3868 } |
| 3869 if (permissions != null) { |
| 3870 _json["permissions"] = permissions; |
| 3871 } |
| 3872 return _json; |
| 3873 } |
| 3874 } |
| 3875 |
| 3876 /** Request message for `SetIamPolicy` method. */ |
| 3877 class GoogleIamV1SetIamPolicyRequest { |
| 3878 /** |
| 3879 * REQUIRED: The complete policy to be applied to the `resource`. The size of |
| 3880 * the policy is limited to a few 10s of KB. An empty policy is a |
| 3881 * valid policy but certain Cloud Platform services (such as Projects) |
| 3882 * might reject them. |
| 3883 */ |
| 3884 GoogleIamV1Policy policy; |
| 3885 /** |
| 3886 * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only |
| 3887 * the fields in the mask will be modified. If no mask is provided, the |
| 3888 * following default mask is used: |
| 3889 * paths: "bindings, etag" |
| 3890 * This field is only used by Cloud IAM. |
| 3891 */ |
| 3892 core.String updateMask; |
| 3893 |
| 3894 GoogleIamV1SetIamPolicyRequest(); |
| 3895 |
| 3896 GoogleIamV1SetIamPolicyRequest.fromJson(core.Map _json) { |
| 3897 if (_json.containsKey("policy")) { |
| 3898 policy = new GoogleIamV1Policy.fromJson(_json["policy"]); |
| 3899 } |
| 3900 if (_json.containsKey("updateMask")) { |
| 3901 updateMask = _json["updateMask"]; |
| 3902 } |
| 3903 } |
| 3904 |
| 3905 core.Map<core.String, core.Object> toJson() { |
| 3906 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3907 if (policy != null) { |
| 3908 _json["policy"] = (policy).toJson(); |
| 3909 } |
| 3910 if (updateMask != null) { |
| 3911 _json["updateMask"] = updateMask; |
| 3912 } |
| 3913 return _json; |
| 3914 } |
| 3915 } |
| 3916 |
| 3917 /** Request message for `TestIamPermissions` method. */ |
| 3918 class GoogleIamV1TestIamPermissionsRequest { |
| 3919 /** |
| 3920 * The set of permissions to check for the `resource`. Permissions with |
| 3921 * wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 3922 * information see |
| 3923 * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| 3924 */ |
| 3925 core.List<core.String> permissions; |
| 3926 |
| 3927 GoogleIamV1TestIamPermissionsRequest(); |
| 3928 |
| 3929 GoogleIamV1TestIamPermissionsRequest.fromJson(core.Map _json) { |
| 3930 if (_json.containsKey("permissions")) { |
| 3931 permissions = _json["permissions"]; |
| 3932 } |
| 3933 } |
| 3934 |
| 3935 core.Map<core.String, core.Object> toJson() { |
| 3936 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3937 if (permissions != null) { |
| 3938 _json["permissions"] = permissions; |
| 3939 } |
| 3940 return _json; |
| 3941 } |
| 3942 } |
| 3943 |
| 3944 /** Response message for `TestIamPermissions` method. */ |
| 3945 class GoogleIamV1TestIamPermissionsResponse { |
| 3946 /** |
| 3947 * A subset of `TestPermissionsRequest.permissions` that the caller is |
| 3948 * allowed. |
| 3949 */ |
| 3950 core.List<core.String> permissions; |
| 3951 |
| 3952 GoogleIamV1TestIamPermissionsResponse(); |
| 3953 |
| 3954 GoogleIamV1TestIamPermissionsResponse.fromJson(core.Map _json) { |
| 3955 if (_json.containsKey("permissions")) { |
| 3956 permissions = _json["permissions"]; |
| 3957 } |
| 3958 } |
| 3959 |
| 3960 core.Map<core.String, core.Object> toJson() { |
| 3961 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3962 if (permissions != null) { |
| 3963 _json["permissions"] = permissions; |
| 3964 } |
| 3965 return _json; |
| 3966 } |
| 3967 } |
3014 | 3968 |
3015 /** The response message for Operations.ListOperations. */ | 3969 /** The response message for Operations.ListOperations. */ |
3016 class GoogleLongrunningListOperationsResponse { | 3970 class GoogleLongrunningListOperationsResponse { |
3017 /** The standard List next-page token. */ | 3971 /** The standard List next-page token. */ |
3018 core.String nextPageToken; | 3972 core.String nextPageToken; |
3019 /** A list of operations that matches the specified filter in the request. */ | 3973 /** A list of operations that matches the specified filter in the request. */ |
3020 core.List<GoogleLongrunningOperation> operations; | 3974 core.List<GoogleLongrunningOperation> operations; |
3021 | 3975 |
3022 GoogleLongrunningListOperationsResponse(); | 3976 GoogleLongrunningListOperationsResponse(); |
3023 | 3977 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3246 } | 4200 } |
3247 if (details != null) { | 4201 if (details != null) { |
3248 _json["details"] = details; | 4202 _json["details"] = details; |
3249 } | 4203 } |
3250 if (message != null) { | 4204 if (message != null) { |
3251 _json["message"] = message; | 4205 _json["message"] = message; |
3252 } | 4206 } |
3253 return _json; | 4207 return _json; |
3254 } | 4208 } |
3255 } | 4209 } |
| 4210 |
| 4211 /** |
| 4212 * Represents an expression text. Example: |
| 4213 * |
| 4214 * title: "User account presence" |
| 4215 * description: "Determines whether the request has a user account" |
| 4216 * expression: "size(request.user) > 0" |
| 4217 */ |
| 4218 class GoogleTypeExpr { |
| 4219 /** |
| 4220 * An optional description of the expression. This is a longer text which |
| 4221 * describes the expression, e.g. when hovered over it in a UI. |
| 4222 */ |
| 4223 core.String description; |
| 4224 /** |
| 4225 * Textual representation of an expression in |
| 4226 * Common Expression Language syntax. |
| 4227 * |
| 4228 * The application context of the containing message determines which |
| 4229 * well-known feature set of CEL is supported. |
| 4230 */ |
| 4231 core.String expression; |
| 4232 /** |
| 4233 * An optional string indicating the location of the expression for error |
| 4234 * reporting, e.g. a file name and a position in the file. |
| 4235 */ |
| 4236 core.String location; |
| 4237 /** |
| 4238 * An optional title for the expression, i.e. a short string describing |
| 4239 * its purpose. This can be used e.g. in UIs which allow to enter the |
| 4240 * expression. |
| 4241 */ |
| 4242 core.String title; |
| 4243 |
| 4244 GoogleTypeExpr(); |
| 4245 |
| 4246 GoogleTypeExpr.fromJson(core.Map _json) { |
| 4247 if (_json.containsKey("description")) { |
| 4248 description = _json["description"]; |
| 4249 } |
| 4250 if (_json.containsKey("expression")) { |
| 4251 expression = _json["expression"]; |
| 4252 } |
| 4253 if (_json.containsKey("location")) { |
| 4254 location = _json["location"]; |
| 4255 } |
| 4256 if (_json.containsKey("title")) { |
| 4257 title = _json["title"]; |
| 4258 } |
| 4259 } |
| 4260 |
| 4261 core.Map<core.String, core.Object> toJson() { |
| 4262 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 4263 if (description != null) { |
| 4264 _json["description"] = description; |
| 4265 } |
| 4266 if (expression != null) { |
| 4267 _json["expression"] = expression; |
| 4268 } |
| 4269 if (location != null) { |
| 4270 _json["location"] = location; |
| 4271 } |
| 4272 if (title != null) { |
| 4273 _json["title"] = title; |
| 4274 } |
| 4275 return _json; |
| 4276 } |
| 4277 } |
OLD | NEW |