Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: generated/googleapis/lib/iam/v1.dart

Issue 2987103002: Api-Roll 52: 2017-07-31 (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.iam.v1; 3 library googleapis.iam.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;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
13 ApiRequestError, DetailedApiRequestError; 13 ApiRequestError, DetailedApiRequestError;
14 14
15 const core.String USER_AGENT = 'dart-api-client iam/v1'; 15 const core.String USER_AGENT = 'dart-api-client iam/v1';
16 16
17 /** 17 /**
18 * Manages identity and access control for Google Cloud Platform resources, 18 * Manages identity and access control for Google Cloud Platform resources,
19 * including the creation of service accounts, which you can use to authenticate 19 * including the creation of service accounts, which you can use to authenticate
20 * to Google and make API calls. 20 * to Google and make API calls.
21 */ 21 */
22 class IamApi { 22 class IamApi {
23 /** View and manage your data across Google Cloud Platform services */ 23 /** View and manage your data across Google Cloud Platform services */
24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm"; 24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
25 25
26 26
27 final commons.ApiRequester _requester; 27 final commons.ApiRequester _requester;
28 28
29 OrganizationsResourceApi get organizations => new OrganizationsResourceApi(_re quester);
30 PermissionsResourceApi get permissions => new PermissionsResourceApi(_requeste r);
29 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); 31 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
30 RolesResourceApi get roles => new RolesResourceApi(_requester); 32 RolesResourceApi get roles => new RolesResourceApi(_requester);
31 33
32 IamApi(http.Client client, {core.String rootUrl: "https://iam.googleapis.com/" , core.String servicePath: ""}) : 34 IamApi(http.Client client, {core.String rootUrl: "https://iam.googleapis.com/" , core.String servicePath: ""}) :
33 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 35 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
34 } 36 }
35 37
36 38
39 class OrganizationsResourceApi {
40 final commons.ApiRequester _requester;
41
42 OrganizationsRolesResourceApi get roles => new OrganizationsRolesResourceApi(_ requester);
43
44 OrganizationsResourceApi(commons.ApiRequester client) :
45 _requester = client;
46 }
47
48
49 class OrganizationsRolesResourceApi {
50 final commons.ApiRequester _requester;
51
52 OrganizationsRolesResourceApi(commons.ApiRequester client) :
53 _requester = client;
54
55 /**
56 * Creates a new Role.
57 *
58 * [request] - The metadata request object.
59 *
60 * Request parameters:
61 *
62 * [parent] - The resource name of the parent resource in one of the following
63 * formats:
64 * `organizations/{ORGANIZATION_ID}`
65 * `projects/{PROJECT_ID}`
66 * Value must have pattern "^organizations/[^/]+$".
67 *
68 * Completes with a [Role].
69 *
70 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
71 * error.
72 *
73 * If the used [http.Client] completes with an error when making a REST call,
74 * this method will complete with the same error.
75 */
76 async.Future<Role> create(CreateRoleRequest request, core.String parent) {
77 var _url = null;
78 var _queryParams = new core.Map();
79 var _uploadMedia = null;
80 var _uploadOptions = null;
81 var _downloadOptions = commons.DownloadOptions.Metadata;
82 var _body = null;
83
84 if (request != null) {
85 _body = convert.JSON.encode((request).toJson());
86 }
87 if (parent == null) {
88 throw new core.ArgumentError("Parameter parent is required.");
89 }
90
91 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles';
92
93 var _response = _requester.request(_url,
94 "POST",
95 body: _body,
96 queryParams: _queryParams,
97 uploadOptions: _uploadOptions,
98 uploadMedia: _uploadMedia,
99 downloadOptions: _downloadOptions);
100 return _response.then((data) => new Role.fromJson(data));
101 }
102
103 /**
104 * Soft deletes a role. The role is suspended and cannot be used to create new
105 * IAM Policy Bindings.
106 * The Role will not be included in `ListRoles()` unless `show_deleted` is set
107 * in the `ListRolesRequest`. The Role contains the deleted boolean set.
108 * Existing Bindings remains, but are inactive. The Role can be undeleted
109 * within 7 days. After 7 days the Role is deleted and all Bindings associated
110 * with the role are removed.
111 *
112 * Request parameters:
113 *
114 * [name] - The resource name of the role in one of the following formats:
115 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
116 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
117 * Value must have pattern "^organizations/[^/]+/roles/[^/]+$".
118 *
119 * [etag] - Used to perform a consistent read-modify-write.
120 *
121 * Completes with a [Role].
122 *
123 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
124 * error.
125 *
126 * If the used [http.Client] completes with an error when making a REST call,
127 * this method will complete with the same error.
128 */
129 async.Future<Role> delete(core.String name, {core.String etag}) {
130 var _url = null;
131 var _queryParams = new core.Map();
132 var _uploadMedia = null;
133 var _uploadOptions = null;
134 var _downloadOptions = commons.DownloadOptions.Metadata;
135 var _body = null;
136
137 if (name == null) {
138 throw new core.ArgumentError("Parameter name is required.");
139 }
140 if (etag != null) {
141 _queryParams["etag"] = [etag];
142 }
143
144 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
145
146 var _response = _requester.request(_url,
147 "DELETE",
148 body: _body,
149 queryParams: _queryParams,
150 uploadOptions: _uploadOptions,
151 uploadMedia: _uploadMedia,
152 downloadOptions: _downloadOptions);
153 return _response.then((data) => new Role.fromJson(data));
154 }
155
156 /**
157 * Gets a Role definition.
158 *
159 * Request parameters:
160 *
161 * [name] - The resource name of the role in one of the following formats:
162 * `roles/{ROLE_NAME}`
163 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
164 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
165 * Value must have pattern "^organizations/[^/]+/roles/[^/]+$".
166 *
167 * Completes with a [Role].
168 *
169 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
170 * error.
171 *
172 * If the used [http.Client] completes with an error when making a REST call,
173 * this method will complete with the same error.
174 */
175 async.Future<Role> get(core.String name) {
176 var _url = null;
177 var _queryParams = new core.Map();
178 var _uploadMedia = null;
179 var _uploadOptions = null;
180 var _downloadOptions = commons.DownloadOptions.Metadata;
181 var _body = null;
182
183 if (name == null) {
184 throw new core.ArgumentError("Parameter name is required.");
185 }
186
187 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
188
189 var _response = _requester.request(_url,
190 "GET",
191 body: _body,
192 queryParams: _queryParams,
193 uploadOptions: _uploadOptions,
194 uploadMedia: _uploadMedia,
195 downloadOptions: _downloadOptions);
196 return _response.then((data) => new Role.fromJson(data));
197 }
198
199 /**
200 * Lists the Roles defined on a resource.
201 *
202 * Request parameters:
203 *
204 * [parent] - The resource name of the parent resource in one of the following
205 * formats:
206 * `` (empty string) -- this refers to curated roles.
207 * `organizations/{ORGANIZATION_ID}`
208 * `projects/{PROJECT_ID}`
209 * Value must have pattern "^organizations/[^/]+$".
210 *
211 * [pageToken] - Optional pagination token returned in an earlier
212 * ListRolesResponse.
213 *
214 * [pageSize] - Optional limit on the number of roles to include in the
215 * response.
216 *
217 * [view] - Optional view for the returned Role objects.
218 * Possible string values are:
219 * - "BASIC" : A BASIC.
220 * - "FULL" : A FULL.
221 *
222 * [showDeleted] - Include Roles that have been deleted.
223 *
224 * Completes with a [ListRolesResponse].
225 *
226 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
227 * error.
228 *
229 * If the used [http.Client] completes with an error when making a REST call,
230 * this method will complete with the same error.
231 */
232 async.Future<ListRolesResponse> list(core.String parent, {core.String pageToke n, core.int pageSize, core.String view, core.bool showDeleted}) {
233 var _url = null;
234 var _queryParams = new core.Map();
235 var _uploadMedia = null;
236 var _uploadOptions = null;
237 var _downloadOptions = commons.DownloadOptions.Metadata;
238 var _body = null;
239
240 if (parent == null) {
241 throw new core.ArgumentError("Parameter parent is required.");
242 }
243 if (pageToken != null) {
244 _queryParams["pageToken"] = [pageToken];
245 }
246 if (pageSize != null) {
247 _queryParams["pageSize"] = ["${pageSize}"];
248 }
249 if (view != null) {
250 _queryParams["view"] = [view];
251 }
252 if (showDeleted != null) {
253 _queryParams["showDeleted"] = ["${showDeleted}"];
254 }
255
256 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles';
257
258 var _response = _requester.request(_url,
259 "GET",
260 body: _body,
261 queryParams: _queryParams,
262 uploadOptions: _uploadOptions,
263 uploadMedia: _uploadMedia,
264 downloadOptions: _downloadOptions);
265 return _response.then((data) => new ListRolesResponse.fromJson(data));
266 }
267
268 /**
269 * Updates a Role definition.
270 *
271 * [request] - The metadata request object.
272 *
273 * Request parameters:
274 *
275 * [name] - The resource name of the role in one of the following formats:
276 * `roles/{ROLE_NAME}`
277 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
278 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
279 * Value must have pattern "^organizations/[^/]+/roles/[^/]+$".
280 *
281 * [updateMask] - A mask describing which fields in the Role have changed.
282 *
283 * Completes with a [Role].
284 *
285 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
286 * error.
287 *
288 * If the used [http.Client] completes with an error when making a REST call,
289 * this method will complete with the same error.
290 */
291 async.Future<Role> patch(Role request, core.String name, {core.String updateMa sk}) {
292 var _url = null;
293 var _queryParams = new core.Map();
294 var _uploadMedia = null;
295 var _uploadOptions = null;
296 var _downloadOptions = commons.DownloadOptions.Metadata;
297 var _body = null;
298
299 if (request != null) {
300 _body = convert.JSON.encode((request).toJson());
301 }
302 if (name == null) {
303 throw new core.ArgumentError("Parameter name is required.");
304 }
305 if (updateMask != null) {
306 _queryParams["updateMask"] = [updateMask];
307 }
308
309 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
310
311 var _response = _requester.request(_url,
312 "PATCH",
313 body: _body,
314 queryParams: _queryParams,
315 uploadOptions: _uploadOptions,
316 uploadMedia: _uploadMedia,
317 downloadOptions: _downloadOptions);
318 return _response.then((data) => new Role.fromJson(data));
319 }
320
321 /**
322 * Undelete a Role, bringing it back in its previous state.
323 *
324 * [request] - The metadata request object.
325 *
326 * Request parameters:
327 *
328 * [name] - The resource name of the role in one of the following formats:
329 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
330 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
331 * Value must have pattern "^organizations/[^/]+/roles/[^/]+$".
332 *
333 * Completes with a [Role].
334 *
335 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
336 * error.
337 *
338 * If the used [http.Client] completes with an error when making a REST call,
339 * this method will complete with the same error.
340 */
341 async.Future<Role> undelete(UndeleteRoleRequest request, core.String name) {
342 var _url = null;
343 var _queryParams = new core.Map();
344 var _uploadMedia = null;
345 var _uploadOptions = null;
346 var _downloadOptions = commons.DownloadOptions.Metadata;
347 var _body = null;
348
349 if (request != null) {
350 _body = convert.JSON.encode((request).toJson());
351 }
352 if (name == null) {
353 throw new core.ArgumentError("Parameter name is required.");
354 }
355
356 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':undelete';
357
358 var _response = _requester.request(_url,
359 "POST",
360 body: _body,
361 queryParams: _queryParams,
362 uploadOptions: _uploadOptions,
363 uploadMedia: _uploadMedia,
364 downloadOptions: _downloadOptions);
365 return _response.then((data) => new Role.fromJson(data));
366 }
367
368 }
369
370
371 class PermissionsResourceApi {
372 final commons.ApiRequester _requester;
373
374 PermissionsResourceApi(commons.ApiRequester client) :
375 _requester = client;
376
377 /**
378 * Lists the permissions testable on a resource.
379 * A permission is testable if it can be tested for an identity on a resource.
380 *
381 * [request] - The metadata request object.
382 *
383 * Request parameters:
384 *
385 * Completes with a [QueryTestablePermissionsResponse].
386 *
387 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
388 * error.
389 *
390 * If the used [http.Client] completes with an error when making a REST call,
391 * this method will complete with the same error.
392 */
393 async.Future<QueryTestablePermissionsResponse> queryTestablePermissions(QueryT establePermissionsRequest request) {
394 var _url = null;
395 var _queryParams = new core.Map();
396 var _uploadMedia = null;
397 var _uploadOptions = null;
398 var _downloadOptions = commons.DownloadOptions.Metadata;
399 var _body = null;
400
401 if (request != null) {
402 _body = convert.JSON.encode((request).toJson());
403 }
404
405 _url = 'v1/permissions:queryTestablePermissions';
406
407 var _response = _requester.request(_url,
408 "POST",
409 body: _body,
410 queryParams: _queryParams,
411 uploadOptions: _uploadOptions,
412 uploadMedia: _uploadMedia,
413 downloadOptions: _downloadOptions);
414 return _response.then((data) => new QueryTestablePermissionsResponse.fromJso n(data));
415 }
416
417 }
418
419
37 class ProjectsResourceApi { 420 class ProjectsResourceApi {
38 final commons.ApiRequester _requester; 421 final commons.ApiRequester _requester;
39 422
423 ProjectsRolesResourceApi get roles => new ProjectsRolesResourceApi(_requester) ;
40 ProjectsServiceAccountsResourceApi get serviceAccounts => new ProjectsServiceA ccountsResourceApi(_requester); 424 ProjectsServiceAccountsResourceApi get serviceAccounts => new ProjectsServiceA ccountsResourceApi(_requester);
41 425
42 ProjectsResourceApi(commons.ApiRequester client) : 426 ProjectsResourceApi(commons.ApiRequester client) :
43 _requester = client; 427 _requester = client;
44 } 428 }
45 429
46 430
431 class ProjectsRolesResourceApi {
432 final commons.ApiRequester _requester;
433
434 ProjectsRolesResourceApi(commons.ApiRequester client) :
435 _requester = client;
436
437 /**
438 * Creates a new Role.
439 *
440 * [request] - The metadata request object.
441 *
442 * Request parameters:
443 *
444 * [parent] - The resource name of the parent resource in one of the following
445 * formats:
446 * `organizations/{ORGANIZATION_ID}`
447 * `projects/{PROJECT_ID}`
448 * Value must have pattern "^projects/[^/]+$".
449 *
450 * Completes with a [Role].
451 *
452 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
453 * error.
454 *
455 * If the used [http.Client] completes with an error when making a REST call,
456 * this method will complete with the same error.
457 */
458 async.Future<Role> create(CreateRoleRequest request, core.String parent) {
459 var _url = null;
460 var _queryParams = new core.Map();
461 var _uploadMedia = null;
462 var _uploadOptions = null;
463 var _downloadOptions = commons.DownloadOptions.Metadata;
464 var _body = null;
465
466 if (request != null) {
467 _body = convert.JSON.encode((request).toJson());
468 }
469 if (parent == null) {
470 throw new core.ArgumentError("Parameter parent is required.");
471 }
472
473 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles';
474
475 var _response = _requester.request(_url,
476 "POST",
477 body: _body,
478 queryParams: _queryParams,
479 uploadOptions: _uploadOptions,
480 uploadMedia: _uploadMedia,
481 downloadOptions: _downloadOptions);
482 return _response.then((data) => new Role.fromJson(data));
483 }
484
485 /**
486 * Soft deletes a role. The role is suspended and cannot be used to create new
487 * IAM Policy Bindings.
488 * The Role will not be included in `ListRoles()` unless `show_deleted` is set
489 * in the `ListRolesRequest`. The Role contains the deleted boolean set.
490 * Existing Bindings remains, but are inactive. The Role can be undeleted
491 * within 7 days. After 7 days the Role is deleted and all Bindings associated
492 * with the role are removed.
493 *
494 * Request parameters:
495 *
496 * [name] - The resource name of the role in one of the following formats:
497 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
498 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
499 * Value must have pattern "^projects/[^/]+/roles/[^/]+$".
500 *
501 * [etag] - Used to perform a consistent read-modify-write.
502 *
503 * Completes with a [Role].
504 *
505 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
506 * error.
507 *
508 * If the used [http.Client] completes with an error when making a REST call,
509 * this method will complete with the same error.
510 */
511 async.Future<Role> delete(core.String name, {core.String etag}) {
512 var _url = null;
513 var _queryParams = new core.Map();
514 var _uploadMedia = null;
515 var _uploadOptions = null;
516 var _downloadOptions = commons.DownloadOptions.Metadata;
517 var _body = null;
518
519 if (name == null) {
520 throw new core.ArgumentError("Parameter name is required.");
521 }
522 if (etag != null) {
523 _queryParams["etag"] = [etag];
524 }
525
526 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
527
528 var _response = _requester.request(_url,
529 "DELETE",
530 body: _body,
531 queryParams: _queryParams,
532 uploadOptions: _uploadOptions,
533 uploadMedia: _uploadMedia,
534 downloadOptions: _downloadOptions);
535 return _response.then((data) => new Role.fromJson(data));
536 }
537
538 /**
539 * Gets a Role definition.
540 *
541 * Request parameters:
542 *
543 * [name] - The resource name of the role in one of the following formats:
544 * `roles/{ROLE_NAME}`
545 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
546 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
547 * Value must have pattern "^projects/[^/]+/roles/[^/]+$".
548 *
549 * Completes with a [Role].
550 *
551 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
552 * error.
553 *
554 * If the used [http.Client] completes with an error when making a REST call,
555 * this method will complete with the same error.
556 */
557 async.Future<Role> get(core.String name) {
558 var _url = null;
559 var _queryParams = new core.Map();
560 var _uploadMedia = null;
561 var _uploadOptions = null;
562 var _downloadOptions = commons.DownloadOptions.Metadata;
563 var _body = null;
564
565 if (name == null) {
566 throw new core.ArgumentError("Parameter name is required.");
567 }
568
569 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
570
571 var _response = _requester.request(_url,
572 "GET",
573 body: _body,
574 queryParams: _queryParams,
575 uploadOptions: _uploadOptions,
576 uploadMedia: _uploadMedia,
577 downloadOptions: _downloadOptions);
578 return _response.then((data) => new Role.fromJson(data));
579 }
580
581 /**
582 * Lists the Roles defined on a resource.
583 *
584 * Request parameters:
585 *
586 * [parent] - The resource name of the parent resource in one of the following
587 * formats:
588 * `` (empty string) -- this refers to curated roles.
589 * `organizations/{ORGANIZATION_ID}`
590 * `projects/{PROJECT_ID}`
591 * Value must have pattern "^projects/[^/]+$".
592 *
593 * [showDeleted] - Include Roles that have been deleted.
594 *
595 * [pageToken] - Optional pagination token returned in an earlier
596 * ListRolesResponse.
597 *
598 * [pageSize] - Optional limit on the number of roles to include in the
599 * response.
600 *
601 * [view] - Optional view for the returned Role objects.
602 * Possible string values are:
603 * - "BASIC" : A BASIC.
604 * - "FULL" : A FULL.
605 *
606 * Completes with a [ListRolesResponse].
607 *
608 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
609 * error.
610 *
611 * If the used [http.Client] completes with an error when making a REST call,
612 * this method will complete with the same error.
613 */
614 async.Future<ListRolesResponse> list(core.String parent, {core.bool showDelete d, core.String pageToken, core.int pageSize, core.String view}) {
615 var _url = null;
616 var _queryParams = new core.Map();
617 var _uploadMedia = null;
618 var _uploadOptions = null;
619 var _downloadOptions = commons.DownloadOptions.Metadata;
620 var _body = null;
621
622 if (parent == null) {
623 throw new core.ArgumentError("Parameter parent is required.");
624 }
625 if (showDeleted != null) {
626 _queryParams["showDeleted"] = ["${showDeleted}"];
627 }
628 if (pageToken != null) {
629 _queryParams["pageToken"] = [pageToken];
630 }
631 if (pageSize != null) {
632 _queryParams["pageSize"] = ["${pageSize}"];
633 }
634 if (view != null) {
635 _queryParams["view"] = [view];
636 }
637
638 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/roles';
639
640 var _response = _requester.request(_url,
641 "GET",
642 body: _body,
643 queryParams: _queryParams,
644 uploadOptions: _uploadOptions,
645 uploadMedia: _uploadMedia,
646 downloadOptions: _downloadOptions);
647 return _response.then((data) => new ListRolesResponse.fromJson(data));
648 }
649
650 /**
651 * Updates a Role definition.
652 *
653 * [request] - The metadata request object.
654 *
655 * Request parameters:
656 *
657 * [name] - The resource name of the role in one of the following formats:
658 * `roles/{ROLE_NAME}`
659 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
660 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
661 * Value must have pattern "^projects/[^/]+/roles/[^/]+$".
662 *
663 * [updateMask] - A mask describing which fields in the Role have changed.
664 *
665 * Completes with a [Role].
666 *
667 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
668 * error.
669 *
670 * If the used [http.Client] completes with an error when making a REST call,
671 * this method will complete with the same error.
672 */
673 async.Future<Role> patch(Role request, core.String name, {core.String updateMa sk}) {
674 var _url = null;
675 var _queryParams = new core.Map();
676 var _uploadMedia = null;
677 var _uploadOptions = null;
678 var _downloadOptions = commons.DownloadOptions.Metadata;
679 var _body = null;
680
681 if (request != null) {
682 _body = convert.JSON.encode((request).toJson());
683 }
684 if (name == null) {
685 throw new core.ArgumentError("Parameter name is required.");
686 }
687 if (updateMask != null) {
688 _queryParams["updateMask"] = [updateMask];
689 }
690
691 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
692
693 var _response = _requester.request(_url,
694 "PATCH",
695 body: _body,
696 queryParams: _queryParams,
697 uploadOptions: _uploadOptions,
698 uploadMedia: _uploadMedia,
699 downloadOptions: _downloadOptions);
700 return _response.then((data) => new Role.fromJson(data));
701 }
702
703 /**
704 * Undelete a Role, bringing it back in its previous state.
705 *
706 * [request] - The metadata request object.
707 *
708 * Request parameters:
709 *
710 * [name] - The resource name of the role in one of the following formats:
711 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
712 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
713 * Value must have pattern "^projects/[^/]+/roles/[^/]+$".
714 *
715 * Completes with a [Role].
716 *
717 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
718 * error.
719 *
720 * If the used [http.Client] completes with an error when making a REST call,
721 * this method will complete with the same error.
722 */
723 async.Future<Role> undelete(UndeleteRoleRequest request, core.String name) {
724 var _url = null;
725 var _queryParams = new core.Map();
726 var _uploadMedia = null;
727 var _uploadOptions = null;
728 var _downloadOptions = commons.DownloadOptions.Metadata;
729 var _body = null;
730
731 if (request != null) {
732 _body = convert.JSON.encode((request).toJson());
733 }
734 if (name == null) {
735 throw new core.ArgumentError("Parameter name is required.");
736 }
737
738 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':undelete';
739
740 var _response = _requester.request(_url,
741 "POST",
742 body: _body,
743 queryParams: _queryParams,
744 uploadOptions: _uploadOptions,
745 uploadMedia: _uploadMedia,
746 downloadOptions: _downloadOptions);
747 return _response.then((data) => new Role.fromJson(data));
748 }
749
750 }
751
752
47 class ProjectsServiceAccountsResourceApi { 753 class ProjectsServiceAccountsResourceApi {
48 final commons.ApiRequester _requester; 754 final commons.ApiRequester _requester;
49 755
50 ProjectsServiceAccountsKeysResourceApi get keys => new ProjectsServiceAccounts KeysResourceApi(_requester); 756 ProjectsServiceAccountsKeysResourceApi get keys => new ProjectsServiceAccounts KeysResourceApi(_requester);
51 757
52 ProjectsServiceAccountsResourceApi(commons.ApiRequester client) : 758 ProjectsServiceAccountsResourceApi(commons.ApiRequester client) :
53 _requester = client; 759 _requester = client;
54 760
55 /** 761 /**
56 * Creates a ServiceAccount 762 * Creates a ServiceAccount
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 } 1468 }
763 1469
764 1470
765 class RolesResourceApi { 1471 class RolesResourceApi {
766 final commons.ApiRequester _requester; 1472 final commons.ApiRequester _requester;
767 1473
768 RolesResourceApi(commons.ApiRequester client) : 1474 RolesResourceApi(commons.ApiRequester client) :
769 _requester = client; 1475 _requester = client;
770 1476
771 /** 1477 /**
1478 * Gets a Role definition.
1479 *
1480 * Request parameters:
1481 *
1482 * [name] - The resource name of the role in one of the following formats:
1483 * `roles/{ROLE_NAME}`
1484 * `organizations/{ORGANIZATION_ID}/roles/{ROLE_NAME}`
1485 * `projects/{PROJECT_ID}/roles/{ROLE_NAME}`
1486 * Value must have pattern "^roles/[^/]+$".
1487 *
1488 * Completes with a [Role].
1489 *
1490 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1491 * error.
1492 *
1493 * If the used [http.Client] completes with an error when making a REST call,
1494 * this method will complete with the same error.
1495 */
1496 async.Future<Role> get(core.String name) {
1497 var _url = null;
1498 var _queryParams = new core.Map();
1499 var _uploadMedia = null;
1500 var _uploadOptions = null;
1501 var _downloadOptions = commons.DownloadOptions.Metadata;
1502 var _body = null;
1503
1504 if (name == null) {
1505 throw new core.ArgumentError("Parameter name is required.");
1506 }
1507
1508 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
1509
1510 var _response = _requester.request(_url,
1511 "GET",
1512 body: _body,
1513 queryParams: _queryParams,
1514 uploadOptions: _uploadOptions,
1515 uploadMedia: _uploadMedia,
1516 downloadOptions: _downloadOptions);
1517 return _response.then((data) => new Role.fromJson(data));
1518 }
1519
1520 /**
1521 * Lists the Roles defined on a resource.
1522 *
1523 * Request parameters:
1524 *
1525 * [pageToken] - Optional pagination token returned in an earlier
1526 * ListRolesResponse.
1527 *
1528 * [pageSize] - Optional limit on the number of roles to include in the
1529 * response.
1530 *
1531 * [view] - Optional view for the returned Role objects.
1532 * Possible string values are:
1533 * - "BASIC" : A BASIC.
1534 * - "FULL" : A FULL.
1535 *
1536 * [parent] - The resource name of the parent resource in one of the following
1537 * formats:
1538 * `` (empty string) -- this refers to curated roles.
1539 * `organizations/{ORGANIZATION_ID}`
1540 * `projects/{PROJECT_ID}`
1541 *
1542 * [showDeleted] - Include Roles that have been deleted.
1543 *
1544 * Completes with a [ListRolesResponse].
1545 *
1546 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1547 * error.
1548 *
1549 * If the used [http.Client] completes with an error when making a REST call,
1550 * this method will complete with the same error.
1551 */
1552 async.Future<ListRolesResponse> list({core.String pageToken, core.int pageSize , core.String view, core.String parent, core.bool showDeleted}) {
1553 var _url = null;
1554 var _queryParams = new core.Map();
1555 var _uploadMedia = null;
1556 var _uploadOptions = null;
1557 var _downloadOptions = commons.DownloadOptions.Metadata;
1558 var _body = null;
1559
1560 if (pageToken != null) {
1561 _queryParams["pageToken"] = [pageToken];
1562 }
1563 if (pageSize != null) {
1564 _queryParams["pageSize"] = ["${pageSize}"];
1565 }
1566 if (view != null) {
1567 _queryParams["view"] = [view];
1568 }
1569 if (parent != null) {
1570 _queryParams["parent"] = [parent];
1571 }
1572 if (showDeleted != null) {
1573 _queryParams["showDeleted"] = ["${showDeleted}"];
1574 }
1575
1576 _url = 'v1/roles';
1577
1578 var _response = _requester.request(_url,
1579 "GET",
1580 body: _body,
1581 queryParams: _queryParams,
1582 uploadOptions: _uploadOptions,
1583 uploadMedia: _uploadMedia,
1584 downloadOptions: _downloadOptions);
1585 return _response.then((data) => new ListRolesResponse.fromJson(data));
1586 }
1587
1588 /**
772 * Queries roles that can be granted on a particular resource. 1589 * Queries roles that can be granted on a particular resource.
773 * A role is grantable if it can be used as the role in a binding for a policy 1590 * A role is grantable if it can be used as the role in a binding for a policy
774 * for that resource. 1591 * for that resource.
775 * 1592 *
776 * [request] - The metadata request object. 1593 * [request] - The metadata request object.
777 * 1594 *
778 * Request parameters: 1595 * Request parameters:
779 * 1596 *
780 * Completes with a [QueryGrantableRolesResponse]. 1597 * Completes with a [QueryGrantableRolesResponse].
781 * 1598 *
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 /** 1721 /**
905 * The action that was performed on a Binding. 1722 * The action that was performed on a Binding.
906 * Required 1723 * Required
907 * Possible string values are: 1724 * Possible string values are:
908 * - "ACTION_UNSPECIFIED" : Unspecified. 1725 * - "ACTION_UNSPECIFIED" : Unspecified.
909 * - "ADD" : Addition of a Binding. 1726 * - "ADD" : Addition of a Binding.
910 * - "REMOVE" : Removal of a Binding. 1727 * - "REMOVE" : Removal of a Binding.
911 */ 1728 */
912 core.String action; 1729 core.String action;
913 /** 1730 /**
1731 * The condition that is associated with this binding.
1732 * This field is GOOGLE_INTERNAL.
1733 * This field is not logged in IAM side because it's only for audit logging.
1734 * Optional
1735 */
1736 Expr condition;
1737 /**
914 * A single identity requesting access for a Cloud Platform resource. 1738 * A single identity requesting access for a Cloud Platform resource.
915 * Follows the same format of Binding.members. 1739 * Follows the same format of Binding.members.
916 * Required 1740 * Required
917 */ 1741 */
918 core.String member; 1742 core.String member;
919 /** 1743 /**
920 * Role that is assigned to `members`. 1744 * Role that is assigned to `members`.
921 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. 1745 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
922 * Required 1746 * Required
923 */ 1747 */
924 core.String role; 1748 core.String role;
925 1749
926 BindingDelta(); 1750 BindingDelta();
927 1751
928 BindingDelta.fromJson(core.Map _json) { 1752 BindingDelta.fromJson(core.Map _json) {
929 if (_json.containsKey("action")) { 1753 if (_json.containsKey("action")) {
930 action = _json["action"]; 1754 action = _json["action"];
931 } 1755 }
1756 if (_json.containsKey("condition")) {
1757 condition = new Expr.fromJson(_json["condition"]);
1758 }
932 if (_json.containsKey("member")) { 1759 if (_json.containsKey("member")) {
933 member = _json["member"]; 1760 member = _json["member"];
934 } 1761 }
935 if (_json.containsKey("role")) { 1762 if (_json.containsKey("role")) {
936 role = _json["role"]; 1763 role = _json["role"];
937 } 1764 }
938 } 1765 }
939 1766
940 core.Map<core.String, core.Object> toJson() { 1767 core.Map<core.String, core.Object> toJson() {
941 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1768 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
942 if (action != null) { 1769 if (action != null) {
943 _json["action"] = action; 1770 _json["action"] = action;
944 } 1771 }
1772 if (condition != null) {
1773 _json["condition"] = (condition).toJson();
1774 }
945 if (member != null) { 1775 if (member != null) {
946 _json["member"] = member; 1776 _json["member"] = member;
947 } 1777 }
948 if (role != null) { 1778 if (role != null) {
949 _json["role"] = role; 1779 _json["role"] = role;
950 } 1780 }
951 return _json; 1781 return _json;
952 } 1782 }
953 } 1783 }
954 1784
1785 /** The request to create a new role. */
1786 class CreateRoleRequest {
1787 /** The Role resource to create. */
1788 Role role;
1789 /** The role id to use for this role. */
1790 core.String roleId;
1791
1792 CreateRoleRequest();
1793
1794 CreateRoleRequest.fromJson(core.Map _json) {
1795 if (_json.containsKey("role")) {
1796 role = new Role.fromJson(_json["role"]);
1797 }
1798 if (_json.containsKey("roleId")) {
1799 roleId = _json["roleId"];
1800 }
1801 }
1802
1803 core.Map<core.String, core.Object> toJson() {
1804 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
1805 if (role != null) {
1806 _json["role"] = (role).toJson();
1807 }
1808 if (roleId != null) {
1809 _json["roleId"] = roleId;
1810 }
1811 return _json;
1812 }
1813 }
1814
955 /** The service account key create request. */ 1815 /** The service account key create request. */
956 class CreateServiceAccountKeyRequest { 1816 class CreateServiceAccountKeyRequest {
957 core.bool includePublicKeyData; 1817 core.bool includePublicKeyData;
958 /** 1818 /**
959 * Which type of key and algorithm to use for the key. 1819 * Which type of key and algorithm to use for the key.
960 * The default is currently a 2K RSA key. However this may change in the 1820 * The default is currently a 2K RSA key. However this may change in the
961 * future. 1821 * future.
962 * Possible string values are: 1822 * Possible string values are:
963 * - "KEY_ALG_UNSPECIFIED" : An unspecified key algorithm. 1823 * - "KEY_ALG_UNSPECIFIED" : An unspecified key algorithm.
964 * - "KEY_ALG_RSA_1024" : 1k RSA Key. 1824 * - "KEY_ALG_RSA_1024" : 1k RSA Key.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 1923
1064 Empty.fromJson(core.Map _json) { 1924 Empty.fromJson(core.Map _json) {
1065 } 1925 }
1066 1926
1067 core.Map<core.String, core.Object> toJson() { 1927 core.Map<core.String, core.Object> toJson() {
1068 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1928 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
1069 return _json; 1929 return _json;
1070 } 1930 }
1071 } 1931 }
1072 1932
1933 /**
1934 * Represents an expression text. Example:
1935 *
1936 * title: "User account presence"
1937 * description: "Determines whether the request has a user account"
1938 * expression: "size(request.user) > 0"
1939 */
1940 class Expr {
1941 /**
1942 * An optional description of the expression. This is a longer text which
1943 * describes the expression, e.g. when hovered over it in a UI.
1944 */
1945 core.String description;
1946 /**
1947 * Textual representation of an expression in
1948 * Common Expression Language syntax.
1949 *
1950 * The application context of the containing message determines which
1951 * well-known feature set of CEL is supported.
1952 */
1953 core.String expression;
1954 /**
1955 * An optional string indicating the location of the expression for error
1956 * reporting, e.g. a file name and a position in the file.
1957 */
1958 core.String location;
1959 /**
1960 * An optional title for the expression, i.e. a short string describing
1961 * its purpose. This can be used e.g. in UIs which allow to enter the
1962 * expression.
1963 */
1964 core.String title;
1965
1966 Expr();
1967
1968 Expr.fromJson(core.Map _json) {
1969 if (_json.containsKey("description")) {
1970 description = _json["description"];
1971 }
1972 if (_json.containsKey("expression")) {
1973 expression = _json["expression"];
1974 }
1975 if (_json.containsKey("location")) {
1976 location = _json["location"];
1977 }
1978 if (_json.containsKey("title")) {
1979 title = _json["title"];
1980 }
1981 }
1982
1983 core.Map<core.String, core.Object> toJson() {
1984 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
1985 if (description != null) {
1986 _json["description"] = description;
1987 }
1988 if (expression != null) {
1989 _json["expression"] = expression;
1990 }
1991 if (location != null) {
1992 _json["location"] = location;
1993 }
1994 if (title != null) {
1995 _json["title"] = title;
1996 }
1997 return _json;
1998 }
1999 }
2000
2001 /** The response containing the roles defined under a resource. */
2002 class ListRolesResponse {
2003 /**
2004 * To retrieve the next page of results, set
2005 * `ListRolesRequest.page_token` to this value.
2006 */
2007 core.String nextPageToken;
2008 /** The Roles defined on this resource. */
2009 core.List<Role> roles;
2010
2011 ListRolesResponse();
2012
2013 ListRolesResponse.fromJson(core.Map _json) {
2014 if (_json.containsKey("nextPageToken")) {
2015 nextPageToken = _json["nextPageToken"];
2016 }
2017 if (_json.containsKey("roles")) {
2018 roles = _json["roles"].map((value) => new Role.fromJson(value)).toList();
2019 }
2020 }
2021
2022 core.Map<core.String, core.Object> toJson() {
2023 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
2024 if (nextPageToken != null) {
2025 _json["nextPageToken"] = nextPageToken;
2026 }
2027 if (roles != null) {
2028 _json["roles"] = roles.map((value) => (value).toJson()).toList();
2029 }
2030 return _json;
2031 }
2032 }
2033
1073 /** The service account keys list response. */ 2034 /** The service account keys list response. */
1074 class ListServiceAccountKeysResponse { 2035 class ListServiceAccountKeysResponse {
1075 /** The public keys for the service account. */ 2036 /** The public keys for the service account. */
1076 core.List<ServiceAccountKey> keys; 2037 core.List<ServiceAccountKey> keys;
1077 2038
1078 ListServiceAccountKeysResponse(); 2039 ListServiceAccountKeysResponse();
1079 2040
1080 ListServiceAccountKeysResponse.fromJson(core.Map _json) { 2041 ListServiceAccountKeysResponse.fromJson(core.Map _json) {
1081 if (_json.containsKey("keys")) { 2042 if (_json.containsKey("keys")) {
1082 keys = _json["keys"].map((value) => new ServiceAccountKey.fromJson(value)) .toList(); 2043 keys = _json["keys"].map((value) => new ServiceAccountKey.fromJson(value)) .toList();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 if (accounts != null) { 2080 if (accounts != null) {
1120 _json["accounts"] = accounts.map((value) => (value).toJson()).toList(); 2081 _json["accounts"] = accounts.map((value) => (value).toJson()).toList();
1121 } 2082 }
1122 if (nextPageToken != null) { 2083 if (nextPageToken != null) {
1123 _json["nextPageToken"] = nextPageToken; 2084 _json["nextPageToken"] = nextPageToken;
1124 } 2085 }
1125 return _json; 2086 return _json;
1126 } 2087 }
1127 } 2088 }
1128 2089
2090 /** A permission which can be included by a role. */
2091 class Permission {
2092 /**
2093 * The current custom role support level.
2094 * Possible string values are:
2095 * - "SUPPORTED" : Permission is fully supported for custom role use.
2096 * - "TESTING" : Permission is being tested to check custom role
2097 * compatibility.
2098 * - "NOT_SUPPORTED" : Permission is not supported for custom role use.
2099 */
2100 core.String customRolesSupportLevel;
2101 /** A brief description of what this Permission is used for. */
2102 core.String description;
2103 /** The name of this Permission. */
2104 core.String name;
2105 /** This permission can ONLY be used in predefined roles. */
2106 core.bool onlyInPredefinedRoles;
2107 /**
2108 * The current launch stage of the permission.
2109 * Possible string values are:
2110 * - "ALPHA" : The permission is currently in an alpha phase.
2111 * - "BETA" : The permission is currently in a beta phase.
2112 * - "GA" : The permission is generally available.
2113 * - "DEPRECATED" : The permission is being deprecated.
2114 */
2115 core.String stage;
2116 /** The title of this Permission. */
2117 core.String title;
2118
2119 Permission();
2120
2121 Permission.fromJson(core.Map _json) {
2122 if (_json.containsKey("customRolesSupportLevel")) {
2123 customRolesSupportLevel = _json["customRolesSupportLevel"];
2124 }
2125 if (_json.containsKey("description")) {
2126 description = _json["description"];
2127 }
2128 if (_json.containsKey("name")) {
2129 name = _json["name"];
2130 }
2131 if (_json.containsKey("onlyInPredefinedRoles")) {
2132 onlyInPredefinedRoles = _json["onlyInPredefinedRoles"];
2133 }
2134 if (_json.containsKey("stage")) {
2135 stage = _json["stage"];
2136 }
2137 if (_json.containsKey("title")) {
2138 title = _json["title"];
2139 }
2140 }
2141
2142 core.Map<core.String, core.Object> toJson() {
2143 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
2144 if (customRolesSupportLevel != null) {
2145 _json["customRolesSupportLevel"] = customRolesSupportLevel;
2146 }
2147 if (description != null) {
2148 _json["description"] = description;
2149 }
2150 if (name != null) {
2151 _json["name"] = name;
2152 }
2153 if (onlyInPredefinedRoles != null) {
2154 _json["onlyInPredefinedRoles"] = onlyInPredefinedRoles;
2155 }
2156 if (stage != null) {
2157 _json["stage"] = stage;
2158 }
2159 if (title != null) {
2160 _json["title"] = title;
2161 }
2162 return _json;
2163 }
2164 }
2165
1129 /** 2166 /**
1130 * Defines an Identity and Access Management (IAM) policy. It is used to 2167 * Defines an Identity and Access Management (IAM) policy. It is used to
1131 * specify access control policies for Cloud Platform resources. 2168 * specify access control policies for Cloud Platform resources.
1132 * 2169 *
1133 * 2170 *
1134 * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of 2171 * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
1135 * `members` to a `role`, where the members can be user accounts, Google groups, 2172 * `members` to a `role`, where the members can be user accounts, Google groups,
1136 * Google domains, and service accounts. A `role` is a named list of permissions 2173 * Google domains, and service accounts. A `role` is a named list of permissions
1137 * defined by IAM. 2174 * defined by IAM.
1138 * 2175 *
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 * `//cloudresourcemanager.googleapis.com/projects/my-project`. 2286 * `//cloudresourcemanager.googleapis.com/projects/my-project`.
1250 */ 2287 */
1251 core.String fullResourceName; 2288 core.String fullResourceName;
1252 /** Optional limit on the number of roles to include in the response. */ 2289 /** Optional limit on the number of roles to include in the response. */
1253 core.int pageSize; 2290 core.int pageSize;
1254 /** 2291 /**
1255 * Optional pagination token returned in an earlier 2292 * Optional pagination token returned in an earlier
1256 * QueryGrantableRolesResponse. 2293 * QueryGrantableRolesResponse.
1257 */ 2294 */
1258 core.String pageToken; 2295 core.String pageToken;
2296 /**
2297 *
2298 * Possible string values are:
2299 * - "BASIC" : Omits the `included_permissions` field.
2300 * This is the default value.
2301 * - "FULL" : Returns all fields.
2302 */
2303 core.String view;
1259 2304
1260 QueryGrantableRolesRequest(); 2305 QueryGrantableRolesRequest();
1261 2306
1262 QueryGrantableRolesRequest.fromJson(core.Map _json) { 2307 QueryGrantableRolesRequest.fromJson(core.Map _json) {
1263 if (_json.containsKey("fullResourceName")) { 2308 if (_json.containsKey("fullResourceName")) {
1264 fullResourceName = _json["fullResourceName"]; 2309 fullResourceName = _json["fullResourceName"];
1265 } 2310 }
1266 if (_json.containsKey("pageSize")) { 2311 if (_json.containsKey("pageSize")) {
1267 pageSize = _json["pageSize"]; 2312 pageSize = _json["pageSize"];
1268 } 2313 }
1269 if (_json.containsKey("pageToken")) { 2314 if (_json.containsKey("pageToken")) {
1270 pageToken = _json["pageToken"]; 2315 pageToken = _json["pageToken"];
1271 } 2316 }
2317 if (_json.containsKey("view")) {
2318 view = _json["view"];
2319 }
1272 } 2320 }
1273 2321
1274 core.Map<core.String, core.Object> toJson() { 2322 core.Map<core.String, core.Object> toJson() {
1275 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2323 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
1276 if (fullResourceName != null) { 2324 if (fullResourceName != null) {
1277 _json["fullResourceName"] = fullResourceName; 2325 _json["fullResourceName"] = fullResourceName;
1278 } 2326 }
1279 if (pageSize != null) { 2327 if (pageSize != null) {
1280 _json["pageSize"] = pageSize; 2328 _json["pageSize"] = pageSize;
1281 } 2329 }
1282 if (pageToken != null) { 2330 if (pageToken != null) {
1283 _json["pageToken"] = pageToken; 2331 _json["pageToken"] = pageToken;
1284 } 2332 }
2333 if (view != null) {
2334 _json["view"] = view;
2335 }
1285 return _json; 2336 return _json;
1286 } 2337 }
1287 } 2338 }
1288 2339
1289 /** The grantable role query response. */ 2340 /** The grantable role query response. */
1290 class QueryGrantableRolesResponse { 2341 class QueryGrantableRolesResponse {
1291 /** 2342 /**
1292 * To retrieve the next page of results, set 2343 * To retrieve the next page of results, set
1293 * `QueryGrantableRolesRequest.page_token` to this value. 2344 * `QueryGrantableRolesRequest.page_token` to this value.
1294 */ 2345 */
(...skipping 17 matching lines...) Expand all
1312 if (nextPageToken != null) { 2363 if (nextPageToken != null) {
1313 _json["nextPageToken"] = nextPageToken; 2364 _json["nextPageToken"] = nextPageToken;
1314 } 2365 }
1315 if (roles != null) { 2366 if (roles != null) {
1316 _json["roles"] = roles.map((value) => (value).toJson()).toList(); 2367 _json["roles"] = roles.map((value) => (value).toJson()).toList();
1317 } 2368 }
1318 return _json; 2369 return _json;
1319 } 2370 }
1320 } 2371 }
1321 2372
2373 /** A request to get permissions which can be tested on a resource. */
2374 class QueryTestablePermissionsRequest {
2375 /**
2376 * Required. The full resource name to query from the list of testable
2377 * permissions.
2378 *
2379 * The name follows the Google Cloud Platform resource format.
2380 * For example, a Cloud Platform project with id `my-project` will be named
2381 * `//cloudresourcemanager.googleapis.com/projects/my-project`.
2382 */
2383 core.String fullResourceName;
2384 /**
2385 * Optional limit on the number of permissions to include in the response.
2386 */
2387 core.int pageSize;
2388 /**
2389 * Optional pagination token returned in an earlier
2390 * QueryTestablePermissionsRequest.
2391 */
2392 core.String pageToken;
2393
2394 QueryTestablePermissionsRequest();
2395
2396 QueryTestablePermissionsRequest.fromJson(core.Map _json) {
2397 if (_json.containsKey("fullResourceName")) {
2398 fullResourceName = _json["fullResourceName"];
2399 }
2400 if (_json.containsKey("pageSize")) {
2401 pageSize = _json["pageSize"];
2402 }
2403 if (_json.containsKey("pageToken")) {
2404 pageToken = _json["pageToken"];
2405 }
2406 }
2407
2408 core.Map<core.String, core.Object> toJson() {
2409 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
2410 if (fullResourceName != null) {
2411 _json["fullResourceName"] = fullResourceName;
2412 }
2413 if (pageSize != null) {
2414 _json["pageSize"] = pageSize;
2415 }
2416 if (pageToken != null) {
2417 _json["pageToken"] = pageToken;
2418 }
2419 return _json;
2420 }
2421 }
2422
2423 /** The response containing permissions which can be tested on a resource. */
2424 class QueryTestablePermissionsResponse {
2425 /**
2426 * To retrieve the next page of results, set
2427 * `QueryTestableRolesRequest.page_token` to this value.
2428 */
2429 core.String nextPageToken;
2430 /** The Permissions testable on the requested resource. */
2431 core.List<Permission> permissions;
2432
2433 QueryTestablePermissionsResponse();
2434
2435 QueryTestablePermissionsResponse.fromJson(core.Map _json) {
2436 if (_json.containsKey("nextPageToken")) {
2437 nextPageToken = _json["nextPageToken"];
2438 }
2439 if (_json.containsKey("permissions")) {
2440 permissions = _json["permissions"].map((value) => new Permission.fromJson( value)).toList();
2441 }
2442 }
2443
2444 core.Map<core.String, core.Object> toJson() {
2445 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
2446 if (nextPageToken != null) {
2447 _json["nextPageToken"] = nextPageToken;
2448 }
2449 if (permissions != null) {
2450 _json["permissions"] = permissions.map((value) => (value).toJson()).toList ();
2451 }
2452 return _json;
2453 }
2454 }
2455
1322 /** A role in the Identity and Access Management API. */ 2456 /** A role in the Identity and Access Management API. */
1323 class Role { 2457 class Role {
2458 /**
2459 * The current deleted state of the role. This field is read only.
2460 * It will be ignored in calls to CreateRole and UpdateRole.
2461 */
2462 core.bool deleted;
1324 /** Optional. A human-readable description for the role. */ 2463 /** Optional. A human-readable description for the role. */
1325 core.String description; 2464 core.String description;
2465 /** Used to perform a consistent read-modify-write. */
2466 core.String etag;
2467 core.List<core.int> get etagAsBytes {
2468 return convert.BASE64.decode(etag);
2469 }
2470
2471 void set etagAsBytes(core.List<core.int> _bytes) {
2472 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- ");
2473 }
2474 /**
2475 * The names of the permissions this role grants when bound in an IAM policy.
2476 */
2477 core.List<core.String> includedPermissions;
1326 /** 2478 /**
1327 * The name of the role. 2479 * The name of the role.
1328 * 2480 *
1329 * When Role is used in CreateRole, the role name must not be set. 2481 * When Role is used in CreateRole, the role name must not be set.
1330 * 2482 *
1331 * When Role is used in output and other input such as UpdateRole, the role 2483 * When Role is used in output and other input such as UpdateRole, the role
1332 * name is the complete path, e.g., roles/logging.viewer for curated roles 2484 * name is the complete path, e.g., roles/logging.viewer for curated roles
1333 * and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles. 2485 * and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
1334 */ 2486 */
1335 core.String name; 2487 core.String name;
1336 /** 2488 /**
2489 * The current launch stage of the role.
2490 * Possible string values are:
2491 * - "ALPHA" : The user has indicated this role is currently in an alpha
2492 * phase.
2493 * - "BETA" : The user has indicated this role is currently in a beta phase.
2494 * - "GA" : The user has indicated this role is generally available.
2495 * - "DEPRECATED" : The user has indicated this role is being deprecated.
2496 * - "DISABLED" : This role is disabled and will not contribute permissions to
2497 * any members
2498 * it is granted to in policies.
2499 * - "EAP" : The user has indicated this role is currently in an eap phase.
2500 */
2501 core.String stage;
2502 /**
1337 * Optional. A human-readable title for the role. Typically this 2503 * Optional. A human-readable title for the role. Typically this
1338 * is limited to 100 UTF-8 bytes. 2504 * is limited to 100 UTF-8 bytes.
1339 */ 2505 */
1340 core.String title; 2506 core.String title;
1341 2507
1342 Role(); 2508 Role();
1343 2509
1344 Role.fromJson(core.Map _json) { 2510 Role.fromJson(core.Map _json) {
2511 if (_json.containsKey("deleted")) {
2512 deleted = _json["deleted"];
2513 }
1345 if (_json.containsKey("description")) { 2514 if (_json.containsKey("description")) {
1346 description = _json["description"]; 2515 description = _json["description"];
1347 } 2516 }
2517 if (_json.containsKey("etag")) {
2518 etag = _json["etag"];
2519 }
2520 if (_json.containsKey("includedPermissions")) {
2521 includedPermissions = _json["includedPermissions"];
2522 }
1348 if (_json.containsKey("name")) { 2523 if (_json.containsKey("name")) {
1349 name = _json["name"]; 2524 name = _json["name"];
1350 } 2525 }
2526 if (_json.containsKey("stage")) {
2527 stage = _json["stage"];
2528 }
1351 if (_json.containsKey("title")) { 2529 if (_json.containsKey("title")) {
1352 title = _json["title"]; 2530 title = _json["title"];
1353 } 2531 }
1354 } 2532 }
1355 2533
1356 core.Map<core.String, core.Object> toJson() { 2534 core.Map<core.String, core.Object> toJson() {
1357 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2535 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
2536 if (deleted != null) {
2537 _json["deleted"] = deleted;
2538 }
1358 if (description != null) { 2539 if (description != null) {
1359 _json["description"] = description; 2540 _json["description"] = description;
1360 } 2541 }
2542 if (etag != null) {
2543 _json["etag"] = etag;
2544 }
2545 if (includedPermissions != null) {
2546 _json["includedPermissions"] = includedPermissions;
2547 }
1361 if (name != null) { 2548 if (name != null) {
1362 _json["name"] = name; 2549 _json["name"] = name;
1363 } 2550 }
2551 if (stage != null) {
2552 _json["stage"] = stage;
2553 }
1364 if (title != null) { 2554 if (title != null) {
1365 _json["title"] = title; 2555 _json["title"] = title;
1366 } 2556 }
1367 return _json; 2557 return _json;
1368 } 2558 }
1369 } 2559 }
1370 2560
1371 /** 2561 /**
1372 * A service account in the Identity and Access Management API. 2562 * A service account in the Identity and Access Management API.
1373 * 2563 *
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 core.String keyAlgorithm; 2699 core.String keyAlgorithm;
1510 /** 2700 /**
1511 * The resource name of the service account key in the following format 2701 * The resource name of the service account key in the following format
1512 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`. 2702 * `projects/{PROJECT_ID}/serviceAccounts/{SERVICE_ACCOUNT_EMAIL}/keys/{key}`.
1513 */ 2703 */
1514 core.String name; 2704 core.String name;
1515 /** 2705 /**
1516 * The private key data. Only provided in `CreateServiceAccountKey` 2706 * The private key data. Only provided in `CreateServiceAccountKey`
1517 * responses. Make sure to keep the private key data secure because it 2707 * responses. Make sure to keep the private key data secure because it
1518 * allows for the assertion of the service account identity. 2708 * allows for the assertion of the service account identity.
2709 * When decoded, the private key data can be used to authenticate with
2710 * Google API client libraries and with
2711 * <a href="/sdk/gcloud/reference/auth/activate-service-account">gcloud
2712 * auth activate-service-account</a>.
1519 */ 2713 */
1520 core.String privateKeyData; 2714 core.String privateKeyData;
1521 core.List<core.int> get privateKeyDataAsBytes { 2715 core.List<core.int> get privateKeyDataAsBytes {
1522 return convert.BASE64.decode(privateKeyData); 2716 return convert.BASE64.decode(privateKeyData);
1523 } 2717 }
1524 2718
1525 void set privateKeyDataAsBytes(core.List<core.int> _bytes) { 2719 void set privateKeyDataAsBytes(core.List<core.int> _bytes) {
1526 privateKeyData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceA ll("+", "-"); 2720 privateKeyData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceA ll("+", "-");
1527 } 2721 }
1528 /** 2722 /**
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 } 2993 }
1800 2994
1801 core.Map<core.String, core.Object> toJson() { 2995 core.Map<core.String, core.Object> toJson() {
1802 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2996 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
1803 if (permissions != null) { 2997 if (permissions != null) {
1804 _json["permissions"] = permissions; 2998 _json["permissions"] = permissions;
1805 } 2999 }
1806 return _json; 3000 return _json;
1807 } 3001 }
1808 } 3002 }
3003
3004 /** The request to undelete an existing role. */
3005 class UndeleteRoleRequest {
3006 /** Used to perform a consistent read-modify-write. */
3007 core.String etag;
3008 core.List<core.int> get etagAsBytes {
3009 return convert.BASE64.decode(etag);
3010 }
3011
3012 void set etagAsBytes(core.List<core.int> _bytes) {
3013 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- ");
3014 }
3015
3016 UndeleteRoleRequest();
3017
3018 UndeleteRoleRequest.fromJson(core.Map _json) {
3019 if (_json.containsKey("etag")) {
3020 etag = _json["etag"];
3021 }
3022 }
3023
3024 core.Map<core.String, core.Object> toJson() {
3025 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>();
3026 if (etag != null) {
3027 _json["etag"] = etag;
3028 }
3029 return _json;
3030 }
3031 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/genomics/v1.dart ('k') | generated/googleapis/lib/identitytoolkit/v3.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698