OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.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:crypto/crypto.dart' as crypto; | |
11 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
12 | 11 |
13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
15 | 14 |
16 const core.String USER_AGENT = 'dart-api-client iam/v1'; | 15 const core.String USER_AGENT = 'dart-api-client iam/v1'; |
17 | 16 |
18 /** | 17 /** |
19 * Manages identity and access control for Google Cloud Platform resources, | 18 * Manages identity and access control for Google Cloud Platform resources, |
20 * 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 |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 * strongly suggested that systems make use of the `etag` in the | 1088 * 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 | 1089 * 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 | 1090 * 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 | 1091 * 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. | 1092 * 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 | 1093 * If no `etag` is provided in the call to `setIamPolicy`, then the existing |
1095 * policy is overwritten blindly. | 1094 * policy is overwritten blindly. |
1096 */ | 1095 */ |
1097 core.String etag; | 1096 core.String etag; |
1098 core.List<core.int> get etagAsBytes { | 1097 core.List<core.int> get etagAsBytes { |
1099 return crypto.CryptoUtils.base64StringToBytes(etag); | 1098 return convert.BASE64.decode(etag); |
1100 } | 1099 } |
1101 | 1100 |
1102 void set etagAsBytes(core.List<core.int> _bytes) { | 1101 void set etagAsBytes(core.List<core.int> _bytes) { |
1103 etag = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1102 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
1104 } | 1103 } |
1105 core.List<Rule> rules; | 1104 core.List<Rule> rules; |
1106 /** Version of the `Policy`. The default version is 0. */ | 1105 /** Version of the `Policy`. The default version is 0. */ |
1107 core.int version; | 1106 core.int version; |
1108 | 1107 |
1109 Policy(); | 1108 Policy(); |
1110 | 1109 |
1111 Policy.fromJson(core.Map _json) { | 1110 Policy.fromJson(core.Map _json) { |
1112 if (_json.containsKey("bindings")) { | 1111 if (_json.containsKey("bindings")) { |
1113 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t
oList(); | 1112 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t
oList(); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1248 /** | 1247 /** |
1249 * Optional. A user-specified description of the service account. Must be | 1248 * Optional. A user-specified description of the service account. Must be |
1250 * fewer than 100 UTF-8 bytes. | 1249 * fewer than 100 UTF-8 bytes. |
1251 */ | 1250 */ |
1252 core.String displayName; | 1251 core.String displayName; |
1253 /** @OutputOnly Email address of the service account. */ | 1252 /** @OutputOnly Email address of the service account. */ |
1254 core.String email; | 1253 core.String email; |
1255 /** Used to perform a consistent read-modify-write. */ | 1254 /** Used to perform a consistent read-modify-write. */ |
1256 core.String etag; | 1255 core.String etag; |
1257 core.List<core.int> get etagAsBytes { | 1256 core.List<core.int> get etagAsBytes { |
1258 return crypto.CryptoUtils.base64StringToBytes(etag); | 1257 return convert.BASE64.decode(etag); |
1259 } | 1258 } |
1260 | 1259 |
1261 void set etagAsBytes(core.List<core.int> _bytes) { | 1260 void set etagAsBytes(core.List<core.int> _bytes) { |
1262 etag = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1261 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
1263 } | 1262 } |
1264 /** | 1263 /** |
1265 * The resource name of the service account in the format | 1264 * The resource name of the service account in the format |
1266 * "projects/{project}/serviceAccounts/{account}". In requests using '-' as a | 1265 * "projects/{project}/serviceAccounts/{account}". In requests using '-' as a |
1267 * wildcard for the project, will infer the project from the account and the | 1266 * 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 | 1267 * 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 | 1268 * account. In responses the resource name will always be in the format |
1270 * "projects/{project}/serviceAccounts/{email}". | 1269 * "projects/{project}/serviceAccounts/{email}". |
1271 */ | 1270 */ |
1272 core.String name; | 1271 core.String name; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 */ | 1340 */ |
1342 class ServiceAccountKey { | 1341 class ServiceAccountKey { |
1343 /** | 1342 /** |
1344 * The resource name of the service account key in the format | 1343 * The resource name of the service account key in the format |
1345 * "projects/{project}/serviceAccounts/{email}/keys/{key}". | 1344 * "projects/{project}/serviceAccounts/{email}/keys/{key}". |
1346 */ | 1345 */ |
1347 core.String name; | 1346 core.String name; |
1348 /** The key data. */ | 1347 /** The key data. */ |
1349 core.String privateKeyData; | 1348 core.String privateKeyData; |
1350 core.List<core.int> get privateKeyDataAsBytes { | 1349 core.List<core.int> get privateKeyDataAsBytes { |
1351 return crypto.CryptoUtils.base64StringToBytes(privateKeyData); | 1350 return convert.BASE64.decode(privateKeyData); |
1352 } | 1351 } |
1353 | 1352 |
1354 void set privateKeyDataAsBytes(core.List<core.int> _bytes) { | 1353 void set privateKeyDataAsBytes(core.List<core.int> _bytes) { |
1355 privateKeyData = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1354 privateKeyData = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceA
ll("+", "-"); |
1356 } | 1355 } |
1357 /** | 1356 /** |
1358 * The type of the private key. | 1357 * The type of the private key. |
1359 * Possible string values are: | 1358 * Possible string values are: |
1360 * - "TYPE_UNSPECIFIED" : A TYPE_UNSPECIFIED. | 1359 * - "TYPE_UNSPECIFIED" : A TYPE_UNSPECIFIED. |
1361 * - "TYPE_PKCS12_FILE" : A TYPE_PKCS12_FILE. | 1360 * - "TYPE_PKCS12_FILE" : A TYPE_PKCS12_FILE. |
1362 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : A TYPE_GOOGLE_CREDENTIALS_FILE. | 1361 * - "TYPE_GOOGLE_CREDENTIALS_FILE" : A TYPE_GOOGLE_CREDENTIALS_FILE. |
1363 */ | 1362 */ |
1364 core.String privateKeyType; | 1363 core.String privateKeyType; |
1365 /** The key can be used after this timestamp. */ | 1364 /** The key can be used after this timestamp. */ |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 } | 1431 } |
1433 return _json; | 1432 return _json; |
1434 } | 1433 } |
1435 } | 1434 } |
1436 | 1435 |
1437 /** The service account sign blob request. */ | 1436 /** The service account sign blob request. */ |
1438 class SignBlobRequest { | 1437 class SignBlobRequest { |
1439 /** The bytes to sign */ | 1438 /** The bytes to sign */ |
1440 core.String bytesToSign; | 1439 core.String bytesToSign; |
1441 core.List<core.int> get bytesToSignAsBytes { | 1440 core.List<core.int> get bytesToSignAsBytes { |
1442 return crypto.CryptoUtils.base64StringToBytes(bytesToSign); | 1441 return convert.BASE64.decode(bytesToSign); |
1443 } | 1442 } |
1444 | 1443 |
1445 void set bytesToSignAsBytes(core.List<core.int> _bytes) { | 1444 void set bytesToSignAsBytes(core.List<core.int> _bytes) { |
1446 bytesToSign = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1445 bytesToSign = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll(
"+", "-"); |
1447 } | 1446 } |
1448 | 1447 |
1449 SignBlobRequest(); | 1448 SignBlobRequest(); |
1450 | 1449 |
1451 SignBlobRequest.fromJson(core.Map _json) { | 1450 SignBlobRequest.fromJson(core.Map _json) { |
1452 if (_json.containsKey("bytesToSign")) { | 1451 if (_json.containsKey("bytesToSign")) { |
1453 bytesToSign = _json["bytesToSign"]; | 1452 bytesToSign = _json["bytesToSign"]; |
1454 } | 1453 } |
1455 } | 1454 } |
1456 | 1455 |
1457 core.Map toJson() { | 1456 core.Map toJson() { |
1458 var _json = new core.Map(); | 1457 var _json = new core.Map(); |
1459 if (bytesToSign != null) { | 1458 if (bytesToSign != null) { |
1460 _json["bytesToSign"] = bytesToSign; | 1459 _json["bytesToSign"] = bytesToSign; |
1461 } | 1460 } |
1462 return _json; | 1461 return _json; |
1463 } | 1462 } |
1464 } | 1463 } |
1465 | 1464 |
1466 /** The service account sign blob response. */ | 1465 /** The service account sign blob response. */ |
1467 class SignBlobResponse { | 1466 class SignBlobResponse { |
1468 /** The id of the key used to sign the blob. */ | 1467 /** The id of the key used to sign the blob. */ |
1469 core.String keyId; | 1468 core.String keyId; |
1470 /** The signed blob. */ | 1469 /** The signed blob. */ |
1471 core.String signature; | 1470 core.String signature; |
1472 core.List<core.int> get signatureAsBytes { | 1471 core.List<core.int> get signatureAsBytes { |
1473 return crypto.CryptoUtils.base64StringToBytes(signature); | 1472 return convert.BASE64.decode(signature); |
1474 } | 1473 } |
1475 | 1474 |
1476 void set signatureAsBytes(core.List<core.int> _bytes) { | 1475 void set signatureAsBytes(core.List<core.int> _bytes) { |
1477 signature = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1476 signature = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); |
1478 } | 1477 } |
1479 | 1478 |
1480 SignBlobResponse(); | 1479 SignBlobResponse(); |
1481 | 1480 |
1482 SignBlobResponse.fromJson(core.Map _json) { | 1481 SignBlobResponse.fromJson(core.Map _json) { |
1483 if (_json.containsKey("keyId")) { | 1482 if (_json.containsKey("keyId")) { |
1484 keyId = _json["keyId"]; | 1483 keyId = _json["keyId"]; |
1485 } | 1484 } |
1486 if (_json.containsKey("signature")) { | 1485 if (_json.containsKey("signature")) { |
1487 signature = _json["signature"]; | 1486 signature = _json["signature"]; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1543 } | 1542 } |
1544 | 1543 |
1545 core.Map toJson() { | 1544 core.Map toJson() { |
1546 var _json = new core.Map(); | 1545 var _json = new core.Map(); |
1547 if (permissions != null) { | 1546 if (permissions != null) { |
1548 _json["permissions"] = permissions; | 1547 _json["permissions"] = permissions; |
1549 } | 1548 } |
1550 return _json; | 1549 return _json; |
1551 } | 1550 } |
1552 } | 1551 } |
OLD | NEW |