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

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

Issue 1797933002: Api-roll 33: 2016-03-14 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Added resources/*/CHANGELOG.md, addresssed comments Created 4 years, 9 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
(Empty)
1 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis.iam.v1;
4
5 import 'dart:core' as core;
6 import 'dart:async' as async;
7 import 'dart:convert' as convert;
8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:crypto/crypto.dart' as crypto;
11 import 'package:http/http.dart' as http;
12
13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
14 ApiRequestError, DetailedApiRequestError;
15
16 const core.String USER_AGENT = 'dart-api-client iam/v1';
17
18 /**
19 * Manages identity and access control for Google Cloud Platform resources,
20 * including the creation of service accounts, which you can use to authenticate
21 * to Google and make API calls.
22 */
23 class IamApi {
24 /** View and manage your data across Google Cloud Platform services */
25 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
26
27
28 final commons.ApiRequester _requester;
29
30 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
31
32 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);
34 }
35
36
37 class ProjectsResourceApi {
38 final commons.ApiRequester _requester;
39
40 ProjectsServiceAccountsResourceApi get serviceAccounts => new ProjectsServiceA ccountsResourceApi(_requester);
41
42 ProjectsResourceApi(commons.ApiRequester client) :
43 _requester = client;
44 }
45
46
47 class ProjectsServiceAccountsResourceApi {
48 final commons.ApiRequester _requester;
49
50 ProjectsServiceAccountsKeysResourceApi get keys => new ProjectsServiceAccounts KeysResourceApi(_requester);
51
52 ProjectsServiceAccountsResourceApi(commons.ApiRequester client) :
53 _requester = client;
54
55 /**
56 * Creates a service account and returns it.
57 *
58 * [request] - The metadata request object.
59 *
60 * Request parameters:
61 *
62 * [name] - Required. The resource name of the project associated with the
63 * service accounts, such as "projects/123"
64 * Value must have pattern "^projects/[^/]*$".
65 *
66 * Completes with a [ServiceAccount].
67 *
68 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
69 * error.
70 *
71 * If the used [http.Client] completes with an error when making a REST call,
72 * this method will complete with the same error.
73 */
74 async.Future<ServiceAccount> create(CreateServiceAccountRequest request, core. String name) {
75 var _url = null;
76 var _queryParams = new core.Map();
77 var _uploadMedia = null;
78 var _uploadOptions = null;
79 var _downloadOptions = commons.DownloadOptions.Metadata;
80 var _body = null;
81
82 if (request != null) {
83 _body = convert.JSON.encode((request).toJson());
84 }
85 if (name == null) {
86 throw new core.ArgumentError("Parameter name is required.");
87 }
88
89 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/serviceAcc ounts';
90
91 var _response = _requester.request(_url,
92 "POST",
93 body: _body,
94 queryParams: _queryParams,
95 uploadOptions: _uploadOptions,
96 uploadMedia: _uploadMedia,
97 downloadOptions: _downloadOptions);
98 return _response.then((data) => new ServiceAccount.fromJson(data));
99 }
100
101 /**
102 * Deletes a service acount.
103 *
104 * Request parameters:
105 *
106 * [name] - The resource name of the service account in the format
107 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for
108 * the project, will infer the project from the account. The account value can
109 * be the email address or the unique_id of the service account.
110 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$".
111 *
112 * Completes with a [Empty].
113 *
114 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
115 * error.
116 *
117 * If the used [http.Client] completes with an error when making a REST call,
118 * this method will complete with the same error.
119 */
120 async.Future<Empty> delete(core.String name) {
121 var _url = null;
122 var _queryParams = new core.Map();
123 var _uploadMedia = null;
124 var _uploadOptions = null;
125 var _downloadOptions = commons.DownloadOptions.Metadata;
126 var _body = null;
127
128 if (name == null) {
129 throw new core.ArgumentError("Parameter name is required.");
130 }
131
132 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
133
134 var _response = _requester.request(_url,
135 "DELETE",
136 body: _body,
137 queryParams: _queryParams,
138 uploadOptions: _uploadOptions,
139 uploadMedia: _uploadMedia,
140 downloadOptions: _downloadOptions);
141 return _response.then((data) => new Empty.fromJson(data));
142 }
143
144 /**
145 * Gets a ServiceAccount
146 *
147 * Request parameters:
148 *
149 * [name] - The resource name of the service account in the format
150 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for
151 * the project, will infer the project from the account. The account value can
152 * be the email address or the unique_id of the service account.
153 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$".
154 *
155 * Completes with a [ServiceAccount].
156 *
157 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
158 * error.
159 *
160 * If the used [http.Client] completes with an error when making a REST call,
161 * this method will complete with the same error.
162 */
163 async.Future<ServiceAccount> get(core.String name) {
164 var _url = null;
165 var _queryParams = new core.Map();
166 var _uploadMedia = null;
167 var _uploadOptions = null;
168 var _downloadOptions = commons.DownloadOptions.Metadata;
169 var _body = null;
170
171 if (name == null) {
172 throw new core.ArgumentError("Parameter name is required.");
173 }
174
175 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
176
177 var _response = _requester.request(_url,
178 "GET",
179 body: _body,
180 queryParams: _queryParams,
181 uploadOptions: _uploadOptions,
182 uploadMedia: _uploadMedia,
183 downloadOptions: _downloadOptions);
184 return _response.then((data) => new ServiceAccount.fromJson(data));
185 }
186
187 /**
188 * Returns the IAM access control policy for specified IAM resource.
189 *
190 * Request parameters:
191 *
192 * [resource] - REQUIRED: The resource for which the policy is being
193 * requested. `resource` is usually specified as a path, such as `projects / *
194 * project * / zones / * zone * / disks / * disk*`. The format for the path
195 * specified in this value is resource specific and is specified in the
196 * `getIamPolicy` documentation.
197 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$".
198 *
199 * Completes with a [Policy].
200 *
201 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
202 * error.
203 *
204 * If the used [http.Client] completes with an error when making a REST call,
205 * this method will complete with the same error.
206 */
207 async.Future<Policy> getIamPolicy(core.String resource) {
208 var _url = null;
209 var _queryParams = new core.Map();
210 var _uploadMedia = null;
211 var _uploadOptions = null;
212 var _downloadOptions = commons.DownloadOptions.Metadata;
213 var _body = null;
214
215 if (resource == null) {
216 throw new core.ArgumentError("Parameter resource is required.");
217 }
218
219 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam Policy';
220
221 var _response = _requester.request(_url,
222 "POST",
223 body: _body,
224 queryParams: _queryParams,
225 uploadOptions: _uploadOptions,
226 uploadMedia: _uploadMedia,
227 downloadOptions: _downloadOptions);
228 return _response.then((data) => new Policy.fromJson(data));
229 }
230
231 /**
232 * Lists service accounts for a project.
233 *
234 * Request parameters:
235 *
236 * [name] - Required. The resource name of the project associated with the
237 * service accounts, such as "projects/123"
238 * Value must have pattern "^projects/[^/]*$".
239 *
240 * [pageSize] - Optional limit on the number of service accounts to include in
241 * the response. Further accounts can subsequently be obtained by including
242 * the [ListServiceAccountsResponse.next_page_token] in a subsequent request.
243 *
244 * [pageToken] - Optional pagination token returned in an earlier
245 * [ListServiceAccountsResponse.next_page_token].
246 *
247 * Completes with a [ListServiceAccountsResponse].
248 *
249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
250 * error.
251 *
252 * If the used [http.Client] completes with an error when making a REST call,
253 * this method will complete with the same error.
254 */
255 async.Future<ListServiceAccountsResponse> list(core.String name, {core.int pag eSize, core.String pageToken}) {
256 var _url = null;
257 var _queryParams = new core.Map();
258 var _uploadMedia = null;
259 var _uploadOptions = null;
260 var _downloadOptions = commons.DownloadOptions.Metadata;
261 var _body = null;
262
263 if (name == null) {
264 throw new core.ArgumentError("Parameter name is required.");
265 }
266 if (pageSize != null) {
267 _queryParams["pageSize"] = ["${pageSize}"];
268 }
269 if (pageToken != null) {
270 _queryParams["pageToken"] = [pageToken];
271 }
272
273 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/serviceAcc ounts';
274
275 var _response = _requester.request(_url,
276 "GET",
277 body: _body,
278 queryParams: _queryParams,
279 uploadOptions: _uploadOptions,
280 uploadMedia: _uploadMedia,
281 downloadOptions: _downloadOptions);
282 return _response.then((data) => new ListServiceAccountsResponse.fromJson(dat a));
283 }
284
285 /**
286 * Sets the IAM access control policy for the specified IAM resource.
287 *
288 * [request] - The metadata request object.
289 *
290 * Request parameters:
291 *
292 * [resource] - REQUIRED: The resource for which the policy is being
293 * specified. `resource` is usually specified as a path, such as `projects / *
294 * project * / zones / * zone * / disks / * disk*`. The format for the path
295 * specified in this value is resource specific and is specified in the
296 * `setIamPolicy` documentation.
297 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$".
298 *
299 * Completes with a [Policy].
300 *
301 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
302 * error.
303 *
304 * If the used [http.Client] completes with an error when making a REST call,
305 * this method will complete with the same error.
306 */
307 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res ource) {
308 var _url = null;
309 var _queryParams = new core.Map();
310 var _uploadMedia = null;
311 var _uploadOptions = null;
312 var _downloadOptions = commons.DownloadOptions.Metadata;
313 var _body = null;
314
315 if (request != null) {
316 _body = convert.JSON.encode((request).toJson());
317 }
318 if (resource == null) {
319 throw new core.ArgumentError("Parameter resource is required.");
320 }
321
322 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam Policy';
323
324 var _response = _requester.request(_url,
325 "POST",
326 body: _body,
327 queryParams: _queryParams,
328 uploadOptions: _uploadOptions,
329 uploadMedia: _uploadMedia,
330 downloadOptions: _downloadOptions);
331 return _response.then((data) => new Policy.fromJson(data));
332 }
333
334 /**
335 * Signs a blob using a service account.
336 *
337 * [request] - The metadata request object.
338 *
339 * Request parameters:
340 *
341 * [name] - The resource name of the service account in the format
342 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for
343 * the project, will infer the project from the account. The account value can
344 * be the email address or the unique_id of the service account.
345 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$".
346 *
347 * Completes with a [SignBlobResponse].
348 *
349 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
350 * error.
351 *
352 * If the used [http.Client] completes with an error when making a REST call,
353 * this method will complete with the same error.
354 */
355 async.Future<SignBlobResponse> signBlob(SignBlobRequest request, core.String n ame) {
356 var _url = null;
357 var _queryParams = new core.Map();
358 var _uploadMedia = null;
359 var _uploadOptions = null;
360 var _downloadOptions = commons.DownloadOptions.Metadata;
361 var _body = null;
362
363 if (request != null) {
364 _body = convert.JSON.encode((request).toJson());
365 }
366 if (name == null) {
367 throw new core.ArgumentError("Parameter name is required.");
368 }
369
370 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':signBlob';
371
372 var _response = _requester.request(_url,
373 "POST",
374 body: _body,
375 queryParams: _queryParams,
376 uploadOptions: _uploadOptions,
377 uploadMedia: _uploadMedia,
378 downloadOptions: _downloadOptions);
379 return _response.then((data) => new SignBlobResponse.fromJson(data));
380 }
381
382 /**
383 * Tests the specified permissions against the IAM access control policy for
384 * the specified IAM resource.
385 *
386 * [request] - The metadata request object.
387 *
388 * Request parameters:
389 *
390 * [resource] - REQUIRED: The resource for which the policy detail is being
391 * requested. `resource` is usually specified as a path, such as `projects / *
392 * project * / zones / * zone * / disks / * disk*`. The format for the path
393 * specified in this value is resource specific and is specified in the
394 * `testIamPermissions` documentation.
395 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$".
396 *
397 * Completes with a [TestIamPermissionsResponse].
398 *
399 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
400 * error.
401 *
402 * If the used [http.Client] completes with an error when making a REST call,
403 * this method will complete with the same error.
404 */
405 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions Request request, core.String resource) {
406 var _url = null;
407 var _queryParams = new core.Map();
408 var _uploadMedia = null;
409 var _uploadOptions = null;
410 var _downloadOptions = commons.DownloadOptions.Metadata;
411 var _body = null;
412
413 if (request != null) {
414 _body = convert.JSON.encode((request).toJson());
415 }
416 if (resource == null) {
417 throw new core.ArgumentError("Parameter resource is required.");
418 }
419
420 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa mPermissions';
421
422 var _response = _requester.request(_url,
423 "POST",
424 body: _body,
425 queryParams: _queryParams,
426 uploadOptions: _uploadOptions,
427 uploadMedia: _uploadMedia,
428 downloadOptions: _downloadOptions);
429 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data ));
430 }
431
432 /**
433 * Updates a service account. Currently, only the following fields are
434 * updatable: 'display_name' . The 'etag' is mandatory.
435 *
436 * [request] - The metadata request object.
437 *
438 * Request parameters:
439 *
440 * [name] - The resource name of the service account in the format
441 * "projects/{project}/serviceAccounts/{account}". In requests using '-' as a
442 * wildcard for the project, will infer the project from the account and the
443 * account value can be the email address or the unique_id of the service
444 * account. In responses the resource name will always be in the format
445 * "projects/{project}/serviceAccounts/{email}".
446 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$".
447 *
448 * Completes with a [ServiceAccount].
449 *
450 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
451 * error.
452 *
453 * If the used [http.Client] completes with an error when making a REST call,
454 * this method will complete with the same error.
455 */
456 async.Future<ServiceAccount> update(ServiceAccount request, core.String name) {
457 var _url = null;
458 var _queryParams = new core.Map();
459 var _uploadMedia = null;
460 var _uploadOptions = null;
461 var _downloadOptions = commons.DownloadOptions.Metadata;
462 var _body = null;
463
464 if (request != null) {
465 _body = convert.JSON.encode((request).toJson());
466 }
467 if (name == null) {
468 throw new core.ArgumentError("Parameter name is required.");
469 }
470
471 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
472
473 var _response = _requester.request(_url,
474 "PUT",
475 body: _body,
476 queryParams: _queryParams,
477 uploadOptions: _uploadOptions,
478 uploadMedia: _uploadMedia,
479 downloadOptions: _downloadOptions);
480 return _response.then((data) => new ServiceAccount.fromJson(data));
481 }
482
483 }
484
485
486 class ProjectsServiceAccountsKeysResourceApi {
487 final commons.ApiRequester _requester;
488
489 ProjectsServiceAccountsKeysResourceApi(commons.ApiRequester client) :
490 _requester = client;
491
492 /**
493 * Creates a service account key and returns it.
494 *
495 * [request] - The metadata request object.
496 *
497 * Request parameters:
498 *
499 * [name] - The resource name of the service account in the format
500 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for
501 * the project, will infer the project from the account. The account value can
502 * be the email address or the unique_id of the service account.
503 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$".
504 *
505 * Completes with a [ServiceAccountKey].
506 *
507 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
508 * error.
509 *
510 * If the used [http.Client] completes with an error when making a REST call,
511 * this method will complete with the same error.
512 */
513 async.Future<ServiceAccountKey> create(CreateServiceAccountKeyRequest request, core.String name) {
514 var _url = null;
515 var _queryParams = new core.Map();
516 var _uploadMedia = null;
517 var _uploadOptions = null;
518 var _downloadOptions = commons.DownloadOptions.Metadata;
519 var _body = null;
520
521 if (request != null) {
522 _body = convert.JSON.encode((request).toJson());
523 }
524 if (name == null) {
525 throw new core.ArgumentError("Parameter name is required.");
526 }
527
528 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/keys';
529
530 var _response = _requester.request(_url,
531 "POST",
532 body: _body,
533 queryParams: _queryParams,
534 uploadOptions: _uploadOptions,
535 uploadMedia: _uploadMedia,
536 downloadOptions: _downloadOptions);
537 return _response.then((data) => new ServiceAccountKey.fromJson(data));
538 }
539
540 /**
541 * Deletes a service account key.
542 *
543 * Request parameters:
544 *
545 * [name] - The resource name of the service account key in the format
546 * "projects/{project}/serviceAccounts/{account}/keys/{key}". Using '-' as a
547 * wildcard for the project will infer the project from the account. The
548 * account value can be the email address or the unique_id of the service
549 * account.
550 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/] * /
551 * keys/[^/]*$".
552 *
553 * Completes with a [Empty].
554 *
555 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
556 * error.
557 *
558 * If the used [http.Client] completes with an error when making a REST call,
559 * this method will complete with the same error.
560 */
561 async.Future<Empty> delete(core.String name) {
562 var _url = null;
563 var _queryParams = new core.Map();
564 var _uploadMedia = null;
565 var _uploadOptions = null;
566 var _downloadOptions = commons.DownloadOptions.Metadata;
567 var _body = null;
568
569 if (name == null) {
570 throw new core.ArgumentError("Parameter name is required.");
571 }
572
573 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
574
575 var _response = _requester.request(_url,
576 "DELETE",
577 body: _body,
578 queryParams: _queryParams,
579 uploadOptions: _uploadOptions,
580 uploadMedia: _uploadMedia,
581 downloadOptions: _downloadOptions);
582 return _response.then((data) => new Empty.fromJson(data));
583 }
584
585 /**
586 * Gets the ServiceAccountKey by key id.
587 *
588 * Request parameters:
589 *
590 * [name] - The resource name of the service account key in the format
591 * "projects/{project}/serviceAccounts/{account}/keys/{key}". Using '-' as a
592 * wildcard for the project will infer the project from the account. The
593 * account value can be the email address or the unique_id of the service
594 * account.
595 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/] * /
596 * keys/[^/]*$".
597 *
598 * Completes with a [ServiceAccountKey].
599 *
600 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
601 * error.
602 *
603 * If the used [http.Client] completes with an error when making a REST call,
604 * this method will complete with the same error.
605 */
606 async.Future<ServiceAccountKey> get(core.String name) {
607 var _url = null;
608 var _queryParams = new core.Map();
609 var _uploadMedia = null;
610 var _uploadOptions = null;
611 var _downloadOptions = commons.DownloadOptions.Metadata;
612 var _body = null;
613
614 if (name == null) {
615 throw new core.ArgumentError("Parameter name is required.");
616 }
617
618 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
619
620 var _response = _requester.request(_url,
621 "GET",
622 body: _body,
623 queryParams: _queryParams,
624 uploadOptions: _uploadOptions,
625 uploadMedia: _uploadMedia,
626 downloadOptions: _downloadOptions);
627 return _response.then((data) => new ServiceAccountKey.fromJson(data));
628 }
629
630 /**
631 * Lists service account keys
632 *
633 * Request parameters:
634 *
635 * [name] - The resource name of the service account in the format
636 * "projects/{project}/serviceAccounts/{account}". Using '-' as a wildcard for
637 * the project, will infer the project from the account. The account value can
638 * be the email address or the unique_id of the service account.
639 * Value must have pattern "^projects/[^/] * / serviceAccounts/[^/]*$".
640 *
641 * [keyTypes] - The type of keys the user wants to list. If empty, all key
642 * types are included in the response. Duplicate key types are not allowed.
643 *
644 * Completes with a [ListServiceAccountKeysResponse].
645 *
646 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
647 * error.
648 *
649 * If the used [http.Client] completes with an error when making a REST call,
650 * this method will complete with the same error.
651 */
652 async.Future<ListServiceAccountKeysResponse> list(core.String name, {core.List <core.String> keyTypes}) {
653 var _url = null;
654 var _queryParams = new core.Map();
655 var _uploadMedia = null;
656 var _uploadOptions = null;
657 var _downloadOptions = commons.DownloadOptions.Metadata;
658 var _body = null;
659
660 if (name == null) {
661 throw new core.ArgumentError("Parameter name is required.");
662 }
663 if (keyTypes != null) {
664 _queryParams["keyTypes"] = keyTypes;
665 }
666
667 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/keys';
668
669 var _response = _requester.request(_url,
670 "GET",
671 body: _body,
672 queryParams: _queryParams,
673 uploadOptions: _uploadOptions,
674 uploadMedia: _uploadMedia,
675 downloadOptions: _downloadOptions);
676 return _response.then((data) => new ListServiceAccountKeysResponse.fromJson( data));
677 }
678
679 }
680
681
682
683 /** Associates `members` with a `role`. */
684 class Binding {
685 /**
686 * Specifies the identities requesting access for a Cloud Platform resource.
687 * `members` can have the following values: * `allUsers`: A special identifier
688 * that represents anyone who is on the internet; with or without a Google
689 * account. * `allAuthenticatedUsers`: A special identifier that represents
690 * anyone who is authenticated with a Google account or a service account. *
691 * `user:{emailid}`: An email address that represents a specific Google
692 * account. For example, `alice@gmail.com` or `joe@example.com`. *
693 * `serviceAccount:{emailid}`: An email address that represents a service
694 * account. For example, `my-other-app@appspot.gserviceaccount.com`. *
695 * `group:{emailid}`: An email address that represents a Google group. For
696 * example, `admins@example.com`. * `domain:{domain}`: A Google Apps domain
697 * name that represents all the users of that domain. For example,
698 * `google.com` or `example.com`.
699 */
700 core.List<core.String> members;
701 /**
702 * Role that is assigned to `members`. For example, `roles/viewer`,
703 * `roles/editor`, or `roles/owner`. Required
704 */
705 core.String role;
706
707 Binding();
708
709 Binding.fromJson(core.Map _json) {
710 if (_json.containsKey("members")) {
711 members = _json["members"];
712 }
713 if (_json.containsKey("role")) {
714 role = _json["role"];
715 }
716 }
717
718 core.Map toJson() {
719 var _json = new core.Map();
720 if (members != null) {
721 _json["members"] = members;
722 }
723 if (role != null) {
724 _json["role"] = role;
725 }
726 return _json;
727 }
728 }
729
730 /** Write a Cloud Audit log */
731 class CloudAuditOptions {
732
733 CloudAuditOptions();
734
735 CloudAuditOptions.fromJson(core.Map _json) {
736 }
737
738 core.Map toJson() {
739 var _json = new core.Map();
740 return _json;
741 }
742 }
743
744 /** A condition to be met. */
745 class Condition {
746 /**
747 * Trusted attributes supplied by the IAM system.
748 * Possible string values are:
749 * - "NO_ATTR" : A NO_ATTR.
750 * - "AUTHORITY" : A AUTHORITY.
751 * - "ATTRIBUTION" : A ATTRIBUTION.
752 */
753 core.String iam;
754 /**
755 * An operator to apply the subject with.
756 * Possible string values are:
757 * - "NO_OP" : A NO_OP.
758 * - "EQUALS" : A EQUALS.
759 * - "NOT_EQUALS" : A NOT_EQUALS.
760 * - "IN" : A IN.
761 * - "NOT_IN" : A NOT_IN.
762 * - "DISCHARGED" : A DISCHARGED.
763 */
764 core.String op;
765 /** Trusted attributes discharged by the service. */
766 core.String svc;
767 /**
768 * Trusted attributes supplied by any service that owns resources and uses the
769 * IAM system for access control.
770 * Possible string values are:
771 * - "NO_ATTR" : A NO_ATTR.
772 * - "REGION" : A REGION.
773 * - "SERVICE" : A SERVICE.
774 * - "NAME" : A NAME.
775 * - "IP" : A IP.
776 */
777 core.String sys;
778 /** The object of the condition. Exactly one of these must be set. */
779 core.String value;
780 /** The objects of the condition. This is mutually exclusive with 'value'. */
781 core.List<core.String> values;
782
783 Condition();
784
785 Condition.fromJson(core.Map _json) {
786 if (_json.containsKey("iam")) {
787 iam = _json["iam"];
788 }
789 if (_json.containsKey("op")) {
790 op = _json["op"];
791 }
792 if (_json.containsKey("svc")) {
793 svc = _json["svc"];
794 }
795 if (_json.containsKey("sys")) {
796 sys = _json["sys"];
797 }
798 if (_json.containsKey("value")) {
799 value = _json["value"];
800 }
801 if (_json.containsKey("values")) {
802 values = _json["values"];
803 }
804 }
805
806 core.Map toJson() {
807 var _json = new core.Map();
808 if (iam != null) {
809 _json["iam"] = iam;
810 }
811 if (op != null) {
812 _json["op"] = op;
813 }
814 if (svc != null) {
815 _json["svc"] = svc;
816 }
817 if (sys != null) {
818 _json["sys"] = sys;
819 }
820 if (value != null) {
821 _json["value"] = value;
822 }
823 if (values != null) {
824 _json["values"] = values;
825 }
826 return _json;
827 }
828 }
829
830 /** Options for counters */
831 class CounterOptions {
832 /** The field value to attribute. */
833 core.String field;
834 /** The metric to update. */
835 core.String metric;
836
837 CounterOptions();
838
839 CounterOptions.fromJson(core.Map _json) {
840 if (_json.containsKey("field")) {
841 field = _json["field"];
842 }
843 if (_json.containsKey("metric")) {
844 metric = _json["metric"];
845 }
846 }
847
848 core.Map toJson() {
849 var _json = new core.Map();
850 if (field != null) {
851 _json["field"] = field;
852 }
853 if (metric != null) {
854 _json["metric"] = metric;
855 }
856 return _json;
857 }
858 }
859
860 /** The service account key create request. */
861 class CreateServiceAccountKeyRequest {
862 /**
863 * The type of the key requested. GOOGLE_CREDENTIALS is the default key type.
864 * Possible string values are:
865 * - "TYPE_UNSPECIFIED" : A TYPE_UNSPECIFIED.
866 * - "TYPE_PKCS12_FILE" : A TYPE_PKCS12_FILE.
867 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : A TYPE_GOOGLE_CREDENTIALS_FILE.
868 */
869 core.String privateKeyType;
870
871 CreateServiceAccountKeyRequest();
872
873 CreateServiceAccountKeyRequest.fromJson(core.Map _json) {
874 if (_json.containsKey("privateKeyType")) {
875 privateKeyType = _json["privateKeyType"];
876 }
877 }
878
879 core.Map toJson() {
880 var _json = new core.Map();
881 if (privateKeyType != null) {
882 _json["privateKeyType"] = privateKeyType;
883 }
884 return _json;
885 }
886 }
887
888 /** The service account create request. */
889 class CreateServiceAccountRequest {
890 /**
891 * Required. The account id that is used to generate the service account email
892 * address and a stable unique id. It is unique within a project, must be 1-63
893 * characters long, and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])
894 * to comply with RFC1035.
895 */
896 core.String accountId;
897 /**
898 * The ServiceAccount resource to create. Currently, only the following values
899 * are user assignable: display_name .
900 */
901 ServiceAccount serviceAccount;
902
903 CreateServiceAccountRequest();
904
905 CreateServiceAccountRequest.fromJson(core.Map _json) {
906 if (_json.containsKey("accountId")) {
907 accountId = _json["accountId"];
908 }
909 if (_json.containsKey("serviceAccount")) {
910 serviceAccount = new ServiceAccount.fromJson(_json["serviceAccount"]);
911 }
912 }
913
914 core.Map toJson() {
915 var _json = new core.Map();
916 if (accountId != null) {
917 _json["accountId"] = accountId;
918 }
919 if (serviceAccount != null) {
920 _json["serviceAccount"] = (serviceAccount).toJson();
921 }
922 return _json;
923 }
924 }
925
926 /** Write a Data Access (Gin) log */
927 class DataAccessOptions {
928
929 DataAccessOptions();
930
931 DataAccessOptions.fromJson(core.Map _json) {
932 }
933
934 core.Map toJson() {
935 var _json = new core.Map();
936 return _json;
937 }
938 }
939
940 /**
941 * A generic empty message that you can re-use to avoid defining duplicated
942 * empty messages in your APIs. A typical example is to use it as the request or
943 * the response type of an API method. For instance: service Foo { rpc
944 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON
945 * representation for `Empty` is empty JSON object `{}`.
946 */
947 class Empty {
948
949 Empty();
950
951 Empty.fromJson(core.Map _json) {
952 }
953
954 core.Map toJson() {
955 var _json = new core.Map();
956 return _json;
957 }
958 }
959
960 /** The service account keys list response. */
961 class ListServiceAccountKeysResponse {
962 /** The public keys for the service account. */
963 core.List<ServiceAccountKey> keys;
964
965 ListServiceAccountKeysResponse();
966
967 ListServiceAccountKeysResponse.fromJson(core.Map _json) {
968 if (_json.containsKey("keys")) {
969 keys = _json["keys"].map((value) => new ServiceAccountKey.fromJson(value)) .toList();
970 }
971 }
972
973 core.Map toJson() {
974 var _json = new core.Map();
975 if (keys != null) {
976 _json["keys"] = keys.map((value) => (value).toJson()).toList();
977 }
978 return _json;
979 }
980 }
981
982 /** The service account list response. */
983 class ListServiceAccountsResponse {
984 /** The list of matching service accounts. */
985 core.List<ServiceAccount> accounts;
986 /**
987 * To retrieve the next page of results, set
988 * [ListServiceAccountsRequest.page_token] to this value.
989 */
990 core.String nextPageToken;
991
992 ListServiceAccountsResponse();
993
994 ListServiceAccountsResponse.fromJson(core.Map _json) {
995 if (_json.containsKey("accounts")) {
996 accounts = _json["accounts"].map((value) => new ServiceAccount.fromJson(va lue)).toList();
997 }
998 if (_json.containsKey("nextPageToken")) {
999 nextPageToken = _json["nextPageToken"];
1000 }
1001 }
1002
1003 core.Map toJson() {
1004 var _json = new core.Map();
1005 if (accounts != null) {
1006 _json["accounts"] = accounts.map((value) => (value).toJson()).toList();
1007 }
1008 if (nextPageToken != null) {
1009 _json["nextPageToken"] = nextPageToken;
1010 }
1011 return _json;
1012 }
1013 }
1014
1015 /**
1016 * Specifies what kind of log the caller must write Increment a streamz counter
1017 * with the specified metric and field names. Metric names should start with a
1018 * '/', generally be lowercase-only, and end in "_count". Field names should not
1019 * contain an initial slash. The actual exported metric names will have
1020 * "/iam/policy" prepended. Field names correspond to IAM request parameters and
1021 * field values are their respective values. At present only "iam_principal",
1022 * corresponding to IAMContext.principal, is supported. Examples: counter {
1023 * metric: "/debug_access_count" field: "iam_principal" } ==> increment counter
1024 * /iam/policy/backend_debug_access_count {iam_principal=[value of
1025 * IAMContext.principal]} At this time we do not support: * multiple field names
1026 * (though this may be supported in the future) * decrementing the counter *
1027 * incrementing it by anything other than 1
1028 */
1029 class LogConfig {
1030 /** Cloud audit options. */
1031 CloudAuditOptions cloudAudit;
1032 /** Counter options. */
1033 CounterOptions counter;
1034 /** Data access options. */
1035 DataAccessOptions dataAccess;
1036
1037 LogConfig();
1038
1039 LogConfig.fromJson(core.Map _json) {
1040 if (_json.containsKey("cloudAudit")) {
1041 cloudAudit = new CloudAuditOptions.fromJson(_json["cloudAudit"]);
1042 }
1043 if (_json.containsKey("counter")) {
1044 counter = new CounterOptions.fromJson(_json["counter"]);
1045 }
1046 if (_json.containsKey("dataAccess")) {
1047 dataAccess = new DataAccessOptions.fromJson(_json["dataAccess"]);
1048 }
1049 }
1050
1051 core.Map toJson() {
1052 var _json = new core.Map();
1053 if (cloudAudit != null) {
1054 _json["cloudAudit"] = (cloudAudit).toJson();
1055 }
1056 if (counter != null) {
1057 _json["counter"] = (counter).toJson();
1058 }
1059 if (dataAccess != null) {
1060 _json["dataAccess"] = (dataAccess).toJson();
1061 }
1062 return _json;
1063 }
1064 }
1065
1066 /**
1067 * Defines an Identity and Access Management (IAM) policy. It is used to specify
1068 * access control policies for Cloud Platform resources. A `Policy` consists of
1069 * a list of `bindings`. A `Binding` binds a list of `members` to a `role`,
1070 * where the members can be user accounts, Google groups, Google domains, and
1071 * service accounts. A `role` is a named list of permissions defined by IAM.
1072 * **Example** { "bindings": [ { "role": "roles/owner", "members": [
1073 * "user:mike@example.com", "group:admins@example.com", "domain:google.com",
1074 * "serviceAccount:my-other-app@appspot.gserviceaccount.com"] }, { "role":
1075 * "roles/viewer", "members": ["user:sean@example.com"] } ] } For a description
1076 * of IAM and its features, see the [IAM developer's
1077 * guide](https://cloud.google.com/iam).
1078 */
1079 class Policy {
1080 /**
1081 * Associates a list of `members` to a `role`. Multiple `bindings` must not be
1082 * specified for the same `role`. `bindings` with no members will result in an
1083 * error.
1084 */
1085 core.List<Binding> bindings;
1086 /**
1087 * `etag` is used for optimistic concurrency control as a way to help prevent
1088 * simultaneous updates of a policy from overwriting each other. It is
1089 * strongly suggested that systems make use of the `etag` in the
1090 * read-modify-write cycle to perform policy updates in order to avoid race
1091 * conditions: An `etag` is returned in the response to `getIamPolicy`, and
1092 * systems are expected to put that etag in the request to `setIamPolicy` to
1093 * ensure that their change will be applied to the same version of the policy.
1094 * If no `etag` is provided in the call to `setIamPolicy`, then the existing
1095 * policy is overwritten blindly.
1096 */
1097 core.String etag;
1098 core.List<core.int> get etagAsBytes {
1099 return crypto.CryptoUtils.base64StringToBytes(etag);
1100 }
1101
1102 void set etagAsBytes(core.List<core.int> _bytes) {
1103 etag = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
1104 }
1105 core.List<Rule> rules;
1106 /** Version of the `Policy`. The default version is 0. */
1107 core.int version;
1108
1109 Policy();
1110
1111 Policy.fromJson(core.Map _json) {
1112 if (_json.containsKey("bindings")) {
1113 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t oList();
1114 }
1115 if (_json.containsKey("etag")) {
1116 etag = _json["etag"];
1117 }
1118 if (_json.containsKey("rules")) {
1119 rules = _json["rules"].map((value) => new Rule.fromJson(value)).toList();
1120 }
1121 if (_json.containsKey("version")) {
1122 version = _json["version"];
1123 }
1124 }
1125
1126 core.Map toJson() {
1127 var _json = new core.Map();
1128 if (bindings != null) {
1129 _json["bindings"] = bindings.map((value) => (value).toJson()).toList();
1130 }
1131 if (etag != null) {
1132 _json["etag"] = etag;
1133 }
1134 if (rules != null) {
1135 _json["rules"] = rules.map((value) => (value).toJson()).toList();
1136 }
1137 if (version != null) {
1138 _json["version"] = version;
1139 }
1140 return _json;
1141 }
1142 }
1143
1144 /** A rule to be applied in a Policy. */
1145 class Rule {
1146 /**
1147 * Required
1148 * Possible string values are:
1149 * - "NO_ACTION" : A NO_ACTION.
1150 * - "ALLOW" : A ALLOW.
1151 * - "ALLOW_WITH_LOG" : A ALLOW_WITH_LOG.
1152 * - "DENY" : A DENY.
1153 * - "DENY_WITH_LOG" : A DENY_WITH_LOG.
1154 * - "LOG" : A LOG.
1155 */
1156 core.String action;
1157 /** Additional restrictions that must be met */
1158 core.List<Condition> conditions;
1159 /** Human-readable description of the rule. */
1160 core.String description;
1161 /**
1162 * The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in this set of
1163 * entries.
1164 */
1165 core.List<core.String> in_;
1166 /**
1167 * The config returned to callers of tech.iam.IAM.CheckPolicy for any entries
1168 * that match the LOG action.
1169 */
1170 core.List<LogConfig> logConfig;
1171 /**
1172 * The rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is not in this set of
1173 * entries. The format for in and not_in entries is the same as for members in
1174 * a Binding (see google/iam/v1/policy.proto).
1175 */
1176 core.List<core.String> notIn;
1177 /**
1178 * A permission is a string of form '..' (e.g., 'storage.buckets.list'). A
1179 * value of '*' matches all permissions, and a verb part of '*' (e.g.,
1180 * 'storage.buckets.*') matches all verbs.
1181 */
1182 core.List<core.String> permissions;
1183
1184 Rule();
1185
1186 Rule.fromJson(core.Map _json) {
1187 if (_json.containsKey("action")) {
1188 action = _json["action"];
1189 }
1190 if (_json.containsKey("conditions")) {
1191 conditions = _json["conditions"].map((value) => new Condition.fromJson(val ue)).toList();
1192 }
1193 if (_json.containsKey("description")) {
1194 description = _json["description"];
1195 }
1196 if (_json.containsKey("in")) {
1197 in_ = _json["in"];
1198 }
1199 if (_json.containsKey("logConfig")) {
1200 logConfig = _json["logConfig"].map((value) => new LogConfig.fromJson(value )).toList();
1201 }
1202 if (_json.containsKey("notIn")) {
1203 notIn = _json["notIn"];
1204 }
1205 if (_json.containsKey("permissions")) {
1206 permissions = _json["permissions"];
1207 }
1208 }
1209
1210 core.Map toJson() {
1211 var _json = new core.Map();
1212 if (action != null) {
1213 _json["action"] = action;
1214 }
1215 if (conditions != null) {
1216 _json["conditions"] = conditions.map((value) => (value).toJson()).toList() ;
1217 }
1218 if (description != null) {
1219 _json["description"] = description;
1220 }
1221 if (in_ != null) {
1222 _json["in"] = in_;
1223 }
1224 if (logConfig != null) {
1225 _json["logConfig"] = logConfig.map((value) => (value).toJson()).toList();
1226 }
1227 if (notIn != null) {
1228 _json["notIn"] = notIn;
1229 }
1230 if (permissions != null) {
1231 _json["permissions"] = permissions;
1232 }
1233 return _json;
1234 }
1235 }
1236
1237 /**
1238 * A service account in the Identity and Access Management API. To create a
1239 * service account, you specify the project_id and account_id for the account.
1240 * The account_id is unique within the project, and used to generate the service
1241 * account email address and a stable unique id. All other methods can identify
1242 * accounts using the format "projects/{project}/serviceAccounts/{account}".
1243 * Using '-' as a wildcard for the project, will infer the project from the
1244 * account. The account value can be the email address or the unique_id of the
1245 * service account.
1246 */
1247 class ServiceAccount {
1248 /**
1249 * Optional. A user-specified description of the service account. Must be
1250 * fewer than 100 UTF-8 bytes.
1251 */
1252 core.String displayName;
1253 /** @OutputOnly Email address of the service account. */
1254 core.String email;
1255 /** Used to perform a consistent read-modify-write. */
1256 core.String etag;
1257 core.List<core.int> get etagAsBytes {
1258 return crypto.CryptoUtils.base64StringToBytes(etag);
1259 }
1260
1261 void set etagAsBytes(core.List<core.int> _bytes) {
1262 etag = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
1263 }
1264 /**
1265 * The resource name of the service account in the format
1266 * "projects/{project}/serviceAccounts/{account}". In requests using '-' as a
1267 * wildcard for the project, will infer the project from the account and the
1268 * account value can be the email address or the unique_id of the service
1269 * account. In responses the resource name will always be in the format
1270 * "projects/{project}/serviceAccounts/{email}".
1271 */
1272 core.String name;
1273 /**
1274 * @OutputOnly. The OAuth2 client id for the service account. This is used in
1275 * conjunction with the OAuth2 clientconfig API to make three legged OAuth2
1276 * (3LO) flows to access the data of Google users.
1277 */
1278 core.String oauth2ClientId;
1279 /** @OutputOnly The id of the project that owns the service account. */
1280 core.String projectId;
1281 /** @OutputOnly unique and stable id of the service account. */
1282 core.String uniqueId;
1283
1284 ServiceAccount();
1285
1286 ServiceAccount.fromJson(core.Map _json) {
1287 if (_json.containsKey("displayName")) {
1288 displayName = _json["displayName"];
1289 }
1290 if (_json.containsKey("email")) {
1291 email = _json["email"];
1292 }
1293 if (_json.containsKey("etag")) {
1294 etag = _json["etag"];
1295 }
1296 if (_json.containsKey("name")) {
1297 name = _json["name"];
1298 }
1299 if (_json.containsKey("oauth2ClientId")) {
1300 oauth2ClientId = _json["oauth2ClientId"];
1301 }
1302 if (_json.containsKey("projectId")) {
1303 projectId = _json["projectId"];
1304 }
1305 if (_json.containsKey("uniqueId")) {
1306 uniqueId = _json["uniqueId"];
1307 }
1308 }
1309
1310 core.Map toJson() {
1311 var _json = new core.Map();
1312 if (displayName != null) {
1313 _json["displayName"] = displayName;
1314 }
1315 if (email != null) {
1316 _json["email"] = email;
1317 }
1318 if (etag != null) {
1319 _json["etag"] = etag;
1320 }
1321 if (name != null) {
1322 _json["name"] = name;
1323 }
1324 if (oauth2ClientId != null) {
1325 _json["oauth2ClientId"] = oauth2ClientId;
1326 }
1327 if (projectId != null) {
1328 _json["projectId"] = projectId;
1329 }
1330 if (uniqueId != null) {
1331 _json["uniqueId"] = uniqueId;
1332 }
1333 return _json;
1334 }
1335 }
1336
1337 /**
1338 * Represents a service account key. A service account can have 0 or more key
1339 * pairs. The private keys for these are not stored by Google.
1340 * ServiceAccountKeys are immutable.
1341 */
1342 class ServiceAccountKey {
1343 /**
1344 * The resource name of the service account key in the format
1345 * "projects/{project}/serviceAccounts/{email}/keys/{key}".
1346 */
1347 core.String name;
1348 /** The key data. */
1349 core.String privateKeyData;
1350 core.List<core.int> get privateKeyDataAsBytes {
1351 return crypto.CryptoUtils.base64StringToBytes(privateKeyData);
1352 }
1353
1354 void set privateKeyDataAsBytes(core.List<core.int> _bytes) {
1355 privateKeyData = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
1356 }
1357 /**
1358 * The type of the private key.
1359 * Possible string values are:
1360 * - "TYPE_UNSPECIFIED" : A TYPE_UNSPECIFIED.
1361 * - "TYPE_PKCS12_FILE" : A TYPE_PKCS12_FILE.
1362 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : A TYPE_GOOGLE_CREDENTIALS_FILE.
1363 */
1364 core.String privateKeyType;
1365 /** The key can be used after this timestamp. */
1366 core.String validAfterTime;
1367 /** The key can be used before this timestamp. */
1368 core.String validBeforeTime;
1369
1370 ServiceAccountKey();
1371
1372 ServiceAccountKey.fromJson(core.Map _json) {
1373 if (_json.containsKey("name")) {
1374 name = _json["name"];
1375 }
1376 if (_json.containsKey("privateKeyData")) {
1377 privateKeyData = _json["privateKeyData"];
1378 }
1379 if (_json.containsKey("privateKeyType")) {
1380 privateKeyType = _json["privateKeyType"];
1381 }
1382 if (_json.containsKey("validAfterTime")) {
1383 validAfterTime = _json["validAfterTime"];
1384 }
1385 if (_json.containsKey("validBeforeTime")) {
1386 validBeforeTime = _json["validBeforeTime"];
1387 }
1388 }
1389
1390 core.Map toJson() {
1391 var _json = new core.Map();
1392 if (name != null) {
1393 _json["name"] = name;
1394 }
1395 if (privateKeyData != null) {
1396 _json["privateKeyData"] = privateKeyData;
1397 }
1398 if (privateKeyType != null) {
1399 _json["privateKeyType"] = privateKeyType;
1400 }
1401 if (validAfterTime != null) {
1402 _json["validAfterTime"] = validAfterTime;
1403 }
1404 if (validBeforeTime != null) {
1405 _json["validBeforeTime"] = validBeforeTime;
1406 }
1407 return _json;
1408 }
1409 }
1410
1411 /** Request message for `SetIamPolicy` method. */
1412 class SetIamPolicyRequest {
1413 /**
1414 * REQUIRED: The complete policy to be applied to the `resource`. The size of
1415 * the policy is limited to a few 10s of KB. An empty policy is a valid policy
1416 * but certain Cloud Platform services (such as Projects) might reject them.
1417 */
1418 Policy policy;
1419
1420 SetIamPolicyRequest();
1421
1422 SetIamPolicyRequest.fromJson(core.Map _json) {
1423 if (_json.containsKey("policy")) {
1424 policy = new Policy.fromJson(_json["policy"]);
1425 }
1426 }
1427
1428 core.Map toJson() {
1429 var _json = new core.Map();
1430 if (policy != null) {
1431 _json["policy"] = (policy).toJson();
1432 }
1433 return _json;
1434 }
1435 }
1436
1437 /** The service account sign blob request. */
1438 class SignBlobRequest {
1439 /** The bytes to sign */
1440 core.String bytesToSign;
1441 core.List<core.int> get bytesToSignAsBytes {
1442 return crypto.CryptoUtils.base64StringToBytes(bytesToSign);
1443 }
1444
1445 void set bytesToSignAsBytes(core.List<core.int> _bytes) {
1446 bytesToSign = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
1447 }
1448
1449 SignBlobRequest();
1450
1451 SignBlobRequest.fromJson(core.Map _json) {
1452 if (_json.containsKey("bytesToSign")) {
1453 bytesToSign = _json["bytesToSign"];
1454 }
1455 }
1456
1457 core.Map toJson() {
1458 var _json = new core.Map();
1459 if (bytesToSign != null) {
1460 _json["bytesToSign"] = bytesToSign;
1461 }
1462 return _json;
1463 }
1464 }
1465
1466 /** The service account sign blob response. */
1467 class SignBlobResponse {
1468 /** The id of the key used to sign the blob. */
1469 core.String keyId;
1470 /** The signed blob. */
1471 core.String signature;
1472 core.List<core.int> get signatureAsBytes {
1473 return crypto.CryptoUtils.base64StringToBytes(signature);
1474 }
1475
1476 void set signatureAsBytes(core.List<core.int> _bytes) {
1477 signature = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
1478 }
1479
1480 SignBlobResponse();
1481
1482 SignBlobResponse.fromJson(core.Map _json) {
1483 if (_json.containsKey("keyId")) {
1484 keyId = _json["keyId"];
1485 }
1486 if (_json.containsKey("signature")) {
1487 signature = _json["signature"];
1488 }
1489 }
1490
1491 core.Map toJson() {
1492 var _json = new core.Map();
1493 if (keyId != null) {
1494 _json["keyId"] = keyId;
1495 }
1496 if (signature != null) {
1497 _json["signature"] = signature;
1498 }
1499 return _json;
1500 }
1501 }
1502
1503 /** Request message for `TestIamPermissions` method. */
1504 class TestIamPermissionsRequest {
1505 /**
1506 * The set of permissions to check for the `resource`. Permissions with
1507 * wildcards (such as '*' or 'storage.*') are not allowed. For more
1508 * information see IAM Overview.
1509 */
1510 core.List<core.String> permissions;
1511
1512 TestIamPermissionsRequest();
1513
1514 TestIamPermissionsRequest.fromJson(core.Map _json) {
1515 if (_json.containsKey("permissions")) {
1516 permissions = _json["permissions"];
1517 }
1518 }
1519
1520 core.Map toJson() {
1521 var _json = new core.Map();
1522 if (permissions != null) {
1523 _json["permissions"] = permissions;
1524 }
1525 return _json;
1526 }
1527 }
1528
1529 /** Response message for `TestIamPermissions` method. */
1530 class TestIamPermissionsResponse {
1531 /**
1532 * A subset of `TestPermissionsRequest.permissions` that the caller is
1533 * allowed.
1534 */
1535 core.List<core.String> permissions;
1536
1537 TestIamPermissionsResponse();
1538
1539 TestIamPermissionsResponse.fromJson(core.Map _json) {
1540 if (_json.containsKey("permissions")) {
1541 permissions = _json["permissions"];
1542 }
1543 }
1544
1545 core.Map toJson() {
1546 var _json = new core.Map();
1547 if (permissions != null) {
1548 _json["permissions"] = permissions;
1549 }
1550 return _json;
1551 }
1552 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/gmail/v1.dart ('k') | generated/googleapis/lib/identitytoolkit/v3.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698