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.deploymentmanager.v2; | 3 library googleapis.deploymentmanager.v2; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 * | 113 * |
114 * Request parameters: | 114 * Request parameters: |
115 * | 115 * |
116 * [project] - The project ID for this request. | 116 * [project] - The project ID for this request. |
117 * Value must have pattern | 117 * Value must have pattern |
118 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". | 118 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
119 * | 119 * |
120 * [deployment] - The name of the deployment for this request. | 120 * [deployment] - The name of the deployment for this request. |
121 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 121 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
122 * | 122 * |
| 123 * [deletePolicy] - Sets the policy to use for deleting resources. |
| 124 * Possible string values are: |
| 125 * - "ABANDON" |
| 126 * - "DELETE" |
| 127 * |
123 * Completes with a [Operation]. | 128 * Completes with a [Operation]. |
124 * | 129 * |
125 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 130 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
126 * error. | 131 * error. |
127 * | 132 * |
128 * If the used [http.Client] completes with an error when making a REST call, | 133 * If the used [http.Client] completes with an error when making a REST call, |
129 * this method will complete with the same error. | 134 * this method will complete with the same error. |
130 */ | 135 */ |
131 async.Future<Operation> delete(core.String project, core.String deployment) { | 136 async.Future<Operation> delete(core.String project, core.String deployment, {c
ore.String deletePolicy}) { |
132 var _url = null; | 137 var _url = null; |
133 var _queryParams = new core.Map(); | 138 var _queryParams = new core.Map(); |
134 var _uploadMedia = null; | 139 var _uploadMedia = null; |
135 var _uploadOptions = null; | 140 var _uploadOptions = null; |
136 var _downloadOptions = commons.DownloadOptions.Metadata; | 141 var _downloadOptions = commons.DownloadOptions.Metadata; |
137 var _body = null; | 142 var _body = null; |
138 | 143 |
139 if (project == null) { | 144 if (project == null) { |
140 throw new core.ArgumentError("Parameter project is required."); | 145 throw new core.ArgumentError("Parameter project is required."); |
141 } | 146 } |
142 if (deployment == null) { | 147 if (deployment == null) { |
143 throw new core.ArgumentError("Parameter deployment is required."); | 148 throw new core.ArgumentError("Parameter deployment is required."); |
144 } | 149 } |
| 150 if (deletePolicy != null) { |
| 151 _queryParams["deletePolicy"] = [deletePolicy]; |
| 152 } |
145 | 153 |
146 _url = commons.Escaper.ecapeVariable('$project') + '/global/deployments/' +
commons.Escaper.ecapeVariable('$deployment'); | 154 _url = commons.Escaper.ecapeVariable('$project') + '/global/deployments/' +
commons.Escaper.ecapeVariable('$deployment'); |
147 | 155 |
148 var _response = _requester.request(_url, | 156 var _response = _requester.request(_url, |
149 "DELETE", | 157 "DELETE", |
150 body: _body, | 158 body: _body, |
151 queryParams: _queryParams, | 159 queryParams: _queryParams, |
152 uploadOptions: _uploadOptions, | 160 uploadOptions: _uploadOptions, |
153 uploadMedia: _uploadMedia, | 161 uploadMedia: _uploadMedia, |
154 downloadOptions: _downloadOptions); | 162 downloadOptions: _downloadOptions); |
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 uploadMedia: _uploadMedia, | 1333 uploadMedia: _uploadMedia, |
1326 downloadOptions: _downloadOptions); | 1334 downloadOptions: _downloadOptions); |
1327 return _response.then((data) => new TypesListResponse.fromJson(data)); | 1335 return _response.then((data) => new TypesListResponse.fromJson(data)); |
1328 } | 1336 } |
1329 | 1337 |
1330 } | 1338 } |
1331 | 1339 |
1332 | 1340 |
1333 | 1341 |
1334 /** | 1342 /** |
1335 * Enables "data access" audit logging for a service and specifies a list of | 1343 * Provides the configuration for non-admin_activity logging for a service. |
1336 * members that are log-exempted. | 1344 * Controls exemptions and specific log sub-types. |
1337 */ | 1345 */ |
1338 class AuditConfig { | 1346 class AuditConfig { |
| 1347 /** The configuration for each type of logging */ |
| 1348 core.List<AuditLogConfig> auditLogConfigs; |
1339 /** | 1349 /** |
1340 * Specifies the identities that are exempted from "data access" audit logging | 1350 * Specifies the identities that are exempted from "data access" audit logging |
1341 * for the `service` specified above. Follows the same format of | 1351 * for the `service` specified above. Follows the same format of |
1342 * Binding.members. | 1352 * Binding.members. |
1343 */ | 1353 */ |
1344 core.List<core.String> exemptedMembers; | 1354 core.List<core.String> exemptedMembers; |
1345 /** | 1355 /** |
1346 * Specifies a service that will be enabled for "data access" audit logging. | 1356 * Specifies a service that will be enabled for audit logging. For example, |
1347 * For example, `resourcemanager`, `storage`, `compute`. `allServices` is a | 1357 * `resourcemanager`, `storage`, `compute`. `allServices` is a special value |
1348 * special value that covers all services. | 1358 * that covers all services. |
1349 */ | 1359 */ |
1350 core.String service; | 1360 core.String service; |
1351 | 1361 |
1352 AuditConfig(); | 1362 AuditConfig(); |
1353 | 1363 |
1354 AuditConfig.fromJson(core.Map _json) { | 1364 AuditConfig.fromJson(core.Map _json) { |
| 1365 if (_json.containsKey("auditLogConfigs")) { |
| 1366 auditLogConfigs = _json["auditLogConfigs"].map((value) => new AuditLogConf
ig.fromJson(value)).toList(); |
| 1367 } |
1355 if (_json.containsKey("exemptedMembers")) { | 1368 if (_json.containsKey("exemptedMembers")) { |
1356 exemptedMembers = _json["exemptedMembers"]; | 1369 exemptedMembers = _json["exemptedMembers"]; |
1357 } | 1370 } |
1358 if (_json.containsKey("service")) { | 1371 if (_json.containsKey("service")) { |
1359 service = _json["service"]; | 1372 service = _json["service"]; |
1360 } | 1373 } |
1361 } | 1374 } |
1362 | 1375 |
1363 core.Map toJson() { | 1376 core.Map toJson() { |
1364 var _json = new core.Map(); | 1377 var _json = new core.Map(); |
| 1378 if (auditLogConfigs != null) { |
| 1379 _json["auditLogConfigs"] = auditLogConfigs.map((value) => (value).toJson()
).toList(); |
| 1380 } |
1365 if (exemptedMembers != null) { | 1381 if (exemptedMembers != null) { |
1366 _json["exemptedMembers"] = exemptedMembers; | 1382 _json["exemptedMembers"] = exemptedMembers; |
1367 } | 1383 } |
1368 if (service != null) { | 1384 if (service != null) { |
1369 _json["service"] = service; | 1385 _json["service"] = service; |
1370 } | 1386 } |
1371 return _json; | 1387 return _json; |
1372 } | 1388 } |
1373 } | 1389 } |
1374 | 1390 |
| 1391 /** Provides the configuration for a sub-type of logging. */ |
| 1392 class AuditLogConfig { |
| 1393 /** |
| 1394 * Specifies the identities that are exempted from this type of logging |
| 1395 * Follows the same format of Binding.members. |
| 1396 */ |
| 1397 core.List<core.String> exemptedMembers; |
| 1398 /** The log type that this config enables. */ |
| 1399 core.String logType; |
| 1400 |
| 1401 AuditLogConfig(); |
| 1402 |
| 1403 AuditLogConfig.fromJson(core.Map _json) { |
| 1404 if (_json.containsKey("exemptedMembers")) { |
| 1405 exemptedMembers = _json["exemptedMembers"]; |
| 1406 } |
| 1407 if (_json.containsKey("logType")) { |
| 1408 logType = _json["logType"]; |
| 1409 } |
| 1410 } |
| 1411 |
| 1412 core.Map toJson() { |
| 1413 var _json = new core.Map(); |
| 1414 if (exemptedMembers != null) { |
| 1415 _json["exemptedMembers"] = exemptedMembers; |
| 1416 } |
| 1417 if (logType != null) { |
| 1418 _json["logType"] = logType; |
| 1419 } |
| 1420 return _json; |
| 1421 } |
| 1422 } |
| 1423 |
1375 /** Associates `members` with a `role`. */ | 1424 /** Associates `members` with a `role`. */ |
1376 class Binding { | 1425 class Binding { |
1377 /** | 1426 /** |
1378 * Specifies the identities requesting access for a Cloud Platform resource. | 1427 * Specifies the identities requesting access for a Cloud Platform resource. |
1379 * `members` can have the following values: | 1428 * `members` can have the following values: |
1380 * | 1429 * |
1381 * * `allUsers`: A special identifier that represents anyone who is on the | 1430 * * `allUsers`: A special identifier that represents anyone who is on the |
1382 * internet; with or without a Google account. | 1431 * internet; with or without a Google account. |
1383 * | 1432 * |
1384 * * `allAuthenticatedUsers`: A special identifier that represents anyone who | 1433 * * `allAuthenticatedUsers`: A special identifier that represents anyone who |
(...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3393 var _json = new core.Map(); | 3442 var _json = new core.Map(); |
3394 if (nextPageToken != null) { | 3443 if (nextPageToken != null) { |
3395 _json["nextPageToken"] = nextPageToken; | 3444 _json["nextPageToken"] = nextPageToken; |
3396 } | 3445 } |
3397 if (types != null) { | 3446 if (types != null) { |
3398 _json["types"] = types.map((value) => (value).toJson()).toList(); | 3447 _json["types"] = types.map((value) => (value).toJson()).toList(); |
3399 } | 3448 } |
3400 return _json; | 3449 return _json; |
3401 } | 3450 } |
3402 } | 3451 } |
OLD | NEW |