OLD | NEW |
(Empty) | |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 3 library googleapis.sourcerepo.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:http/http.dart' as http; |
| 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; |
| 14 |
| 15 const core.String USER_AGENT = 'dart-api-client sourcerepo/v1'; |
| 16 |
| 17 /** Access source code repositories hosted by Google. */ |
| 18 class SourcerepoApi { |
| 19 /** View and manage your data across Google Cloud Platform services */ |
| 20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
| 21 |
| 22 |
| 23 final commons.ApiRequester _requester; |
| 24 |
| 25 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
| 26 |
| 27 SourcerepoApi(http.Client client, {core.String rootUrl: "https://sourcerepo.go
ogleapis.com/", core.String servicePath: ""}) : |
| 28 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 29 } |
| 30 |
| 31 |
| 32 class ProjectsResourceApi { |
| 33 final commons.ApiRequester _requester; |
| 34 |
| 35 ProjectsReposResourceApi get repos => new ProjectsReposResourceApi(_requester)
; |
| 36 |
| 37 ProjectsResourceApi(commons.ApiRequester client) : |
| 38 _requester = client; |
| 39 } |
| 40 |
| 41 |
| 42 class ProjectsReposResourceApi { |
| 43 final commons.ApiRequester _requester; |
| 44 |
| 45 ProjectsReposResourceApi(commons.ApiRequester client) : |
| 46 _requester = client; |
| 47 |
| 48 /** |
| 49 * Creates a repo in the given project with the given name.. |
| 50 * |
| 51 * If the named repository already exists, `CreateRepo` returns |
| 52 * `ALREADY_EXISTS`. |
| 53 * |
| 54 * [request] - The metadata request object. |
| 55 * |
| 56 * Request parameters: |
| 57 * |
| 58 * [parent] - The project in which to create the repo. Values are of the form |
| 59 * `projects/<project>`. |
| 60 * Value must have pattern "^projects/[^/]+$". |
| 61 * |
| 62 * Completes with a [Repo]. |
| 63 * |
| 64 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 65 * error. |
| 66 * |
| 67 * If the used [http.Client] completes with an error when making a REST call, |
| 68 * this method will complete with the same error. |
| 69 */ |
| 70 async.Future<Repo> create(Repo request, core.String parent) { |
| 71 var _url = null; |
| 72 var _queryParams = new core.Map(); |
| 73 var _uploadMedia = null; |
| 74 var _uploadOptions = null; |
| 75 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 76 var _body = null; |
| 77 |
| 78 if (request != null) { |
| 79 _body = convert.JSON.encode((request).toJson()); |
| 80 } |
| 81 if (parent == null) { |
| 82 throw new core.ArgumentError("Parameter parent is required."); |
| 83 } |
| 84 |
| 85 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/repos'; |
| 86 |
| 87 var _response = _requester.request(_url, |
| 88 "POST", |
| 89 body: _body, |
| 90 queryParams: _queryParams, |
| 91 uploadOptions: _uploadOptions, |
| 92 uploadMedia: _uploadMedia, |
| 93 downloadOptions: _downloadOptions); |
| 94 return _response.then((data) => new Repo.fromJson(data)); |
| 95 } |
| 96 |
| 97 /** |
| 98 * Deletes a repo. |
| 99 * |
| 100 * Request parameters: |
| 101 * |
| 102 * [name] - The name of the repo to delete. Values are of the form |
| 103 * `projects/<project>/repos/<repo>`. |
| 104 * Value must have pattern "^projects/[^/]+/repos/.+$". |
| 105 * |
| 106 * Completes with a [Empty]. |
| 107 * |
| 108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 109 * error. |
| 110 * |
| 111 * If the used [http.Client] completes with an error when making a REST call, |
| 112 * this method will complete with the same error. |
| 113 */ |
| 114 async.Future<Empty> delete(core.String name) { |
| 115 var _url = null; |
| 116 var _queryParams = new core.Map(); |
| 117 var _uploadMedia = null; |
| 118 var _uploadOptions = null; |
| 119 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 120 var _body = null; |
| 121 |
| 122 if (name == null) { |
| 123 throw new core.ArgumentError("Parameter name is required."); |
| 124 } |
| 125 |
| 126 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 127 |
| 128 var _response = _requester.request(_url, |
| 129 "DELETE", |
| 130 body: _body, |
| 131 queryParams: _queryParams, |
| 132 uploadOptions: _uploadOptions, |
| 133 uploadMedia: _uploadMedia, |
| 134 downloadOptions: _downloadOptions); |
| 135 return _response.then((data) => new Empty.fromJson(data)); |
| 136 } |
| 137 |
| 138 /** |
| 139 * Returns information about a repo. |
| 140 * |
| 141 * Request parameters: |
| 142 * |
| 143 * [name] - The name of the requested repository. Values are of the form |
| 144 * `projects/<project>/repos/<repo>`. |
| 145 * Value must have pattern "^projects/[^/]+/repos/.+$". |
| 146 * |
| 147 * Completes with a [Repo]. |
| 148 * |
| 149 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 150 * error. |
| 151 * |
| 152 * If the used [http.Client] completes with an error when making a REST call, |
| 153 * this method will complete with the same error. |
| 154 */ |
| 155 async.Future<Repo> get(core.String name) { |
| 156 var _url = null; |
| 157 var _queryParams = new core.Map(); |
| 158 var _uploadMedia = null; |
| 159 var _uploadOptions = null; |
| 160 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 161 var _body = null; |
| 162 |
| 163 if (name == null) { |
| 164 throw new core.ArgumentError("Parameter name is required."); |
| 165 } |
| 166 |
| 167 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 168 |
| 169 var _response = _requester.request(_url, |
| 170 "GET", |
| 171 body: _body, |
| 172 queryParams: _queryParams, |
| 173 uploadOptions: _uploadOptions, |
| 174 uploadMedia: _uploadMedia, |
| 175 downloadOptions: _downloadOptions); |
| 176 return _response.then((data) => new Repo.fromJson(data)); |
| 177 } |
| 178 |
| 179 /** |
| 180 * Gets the access control policy for a resource. |
| 181 * Returns an empty policy if the resource exists and does not have a policy |
| 182 * set. |
| 183 * |
| 184 * Request parameters: |
| 185 * |
| 186 * [resource] - REQUIRED: The resource for which the policy is being |
| 187 * requested. |
| 188 * See the operation documentation for the appropriate value for this field. |
| 189 * Value must have pattern "^projects/[^/]+/repos/.+$". |
| 190 * |
| 191 * Completes with a [Policy]. |
| 192 * |
| 193 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 194 * error. |
| 195 * |
| 196 * If the used [http.Client] completes with an error when making a REST call, |
| 197 * this method will complete with the same error. |
| 198 */ |
| 199 async.Future<Policy> getIamPolicy(core.String resource) { |
| 200 var _url = null; |
| 201 var _queryParams = new core.Map(); |
| 202 var _uploadMedia = null; |
| 203 var _uploadOptions = null; |
| 204 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 205 var _body = null; |
| 206 |
| 207 if (resource == null) { |
| 208 throw new core.ArgumentError("Parameter resource is required."); |
| 209 } |
| 210 |
| 211 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam
Policy'; |
| 212 |
| 213 var _response = _requester.request(_url, |
| 214 "GET", |
| 215 body: _body, |
| 216 queryParams: _queryParams, |
| 217 uploadOptions: _uploadOptions, |
| 218 uploadMedia: _uploadMedia, |
| 219 downloadOptions: _downloadOptions); |
| 220 return _response.then((data) => new Policy.fromJson(data)); |
| 221 } |
| 222 |
| 223 /** |
| 224 * Returns all repos belonging to a project. |
| 225 * |
| 226 * Request parameters: |
| 227 * |
| 228 * [name] - The project ID whose repos should be listed. Values are of the |
| 229 * form |
| 230 * `projects/<project>`. |
| 231 * Value must have pattern "^projects/[^/]+$". |
| 232 * |
| 233 * Completes with a [ListReposResponse]. |
| 234 * |
| 235 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 236 * error. |
| 237 * |
| 238 * If the used [http.Client] completes with an error when making a REST call, |
| 239 * this method will complete with the same error. |
| 240 */ |
| 241 async.Future<ListReposResponse> list(core.String name) { |
| 242 var _url = null; |
| 243 var _queryParams = new core.Map(); |
| 244 var _uploadMedia = null; |
| 245 var _uploadOptions = null; |
| 246 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 247 var _body = null; |
| 248 |
| 249 if (name == null) { |
| 250 throw new core.ArgumentError("Parameter name is required."); |
| 251 } |
| 252 |
| 253 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + '/repos'; |
| 254 |
| 255 var _response = _requester.request(_url, |
| 256 "GET", |
| 257 body: _body, |
| 258 queryParams: _queryParams, |
| 259 uploadOptions: _uploadOptions, |
| 260 uploadMedia: _uploadMedia, |
| 261 downloadOptions: _downloadOptions); |
| 262 return _response.then((data) => new ListReposResponse.fromJson(data)); |
| 263 } |
| 264 |
| 265 /** |
| 266 * Sets the access control policy on the specified resource. Replaces any |
| 267 * existing policy. |
| 268 * |
| 269 * [request] - The metadata request object. |
| 270 * |
| 271 * Request parameters: |
| 272 * |
| 273 * [resource] - REQUIRED: The resource for which the policy is being |
| 274 * specified. |
| 275 * See the operation documentation for the appropriate value for this field. |
| 276 * Value must have pattern "^projects/[^/]+/repos/.+$". |
| 277 * |
| 278 * Completes with a [Policy]. |
| 279 * |
| 280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 281 * error. |
| 282 * |
| 283 * If the used [http.Client] completes with an error when making a REST call, |
| 284 * this method will complete with the same error. |
| 285 */ |
| 286 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res
ource) { |
| 287 var _url = null; |
| 288 var _queryParams = new core.Map(); |
| 289 var _uploadMedia = null; |
| 290 var _uploadOptions = null; |
| 291 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 292 var _body = null; |
| 293 |
| 294 if (request != null) { |
| 295 _body = convert.JSON.encode((request).toJson()); |
| 296 } |
| 297 if (resource == null) { |
| 298 throw new core.ArgumentError("Parameter resource is required."); |
| 299 } |
| 300 |
| 301 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setIam
Policy'; |
| 302 |
| 303 var _response = _requester.request(_url, |
| 304 "POST", |
| 305 body: _body, |
| 306 queryParams: _queryParams, |
| 307 uploadOptions: _uploadOptions, |
| 308 uploadMedia: _uploadMedia, |
| 309 downloadOptions: _downloadOptions); |
| 310 return _response.then((data) => new Policy.fromJson(data)); |
| 311 } |
| 312 |
| 313 /** |
| 314 * Returns permissions that a caller has on the specified resource. |
| 315 * If the resource does not exist, this will return an empty set of |
| 316 * permissions, not a NOT_FOUND error. |
| 317 * |
| 318 * [request] - The metadata request object. |
| 319 * |
| 320 * Request parameters: |
| 321 * |
| 322 * [resource] - REQUIRED: The resource for which the policy detail is being |
| 323 * requested. |
| 324 * See the operation documentation for the appropriate value for this field. |
| 325 * Value must have pattern "^projects/[^/]+/repos/.+$". |
| 326 * |
| 327 * Completes with a [TestIamPermissionsResponse]. |
| 328 * |
| 329 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 330 * error. |
| 331 * |
| 332 * If the used [http.Client] completes with an error when making a REST call, |
| 333 * this method will complete with the same error. |
| 334 */ |
| 335 async.Future<TestIamPermissionsResponse> testIamPermissions(TestIamPermissions
Request request, core.String resource) { |
| 336 var _url = null; |
| 337 var _queryParams = new core.Map(); |
| 338 var _uploadMedia = null; |
| 339 var _uploadOptions = null; |
| 340 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 341 var _body = null; |
| 342 |
| 343 if (request != null) { |
| 344 _body = convert.JSON.encode((request).toJson()); |
| 345 } |
| 346 if (resource == null) { |
| 347 throw new core.ArgumentError("Parameter resource is required."); |
| 348 } |
| 349 |
| 350 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':testIa
mPermissions'; |
| 351 |
| 352 var _response = _requester.request(_url, |
| 353 "POST", |
| 354 body: _body, |
| 355 queryParams: _queryParams, |
| 356 uploadOptions: _uploadOptions, |
| 357 uploadMedia: _uploadMedia, |
| 358 downloadOptions: _downloadOptions); |
| 359 return _response.then((data) => new TestIamPermissionsResponse.fromJson(data
)); |
| 360 } |
| 361 |
| 362 } |
| 363 |
| 364 |
| 365 |
| 366 /** |
| 367 * Specifies the audit configuration for a service. |
| 368 * It consists of which permission types are logged, and what identities, if |
| 369 * any, are exempted from logging. |
| 370 * An AuditConifg must have one or more AuditLogConfigs. |
| 371 * |
| 372 * If there are AuditConfigs for both `allServices` and a specific service, |
| 373 * the union of the two AuditConfigs is used for that service: the log_types |
| 374 * specified in each AuditConfig are enabled, and the exempted_members in each |
| 375 * AuditConfig are exempted. |
| 376 * Example Policy with multiple AuditConfigs: |
| 377 * { |
| 378 * "audit_configs": [ |
| 379 * { |
| 380 * "service": "allServices" |
| 381 * "audit_log_configs": [ |
| 382 * { |
| 383 * "log_type": "DATA_READ", |
| 384 * "exempted_members": [ |
| 385 * "user:foo@gmail.com" |
| 386 * ] |
| 387 * }, |
| 388 * { |
| 389 * "log_type": "DATA_WRITE", |
| 390 * }, |
| 391 * { |
| 392 * "log_type": "ADMIN_READ", |
| 393 * } |
| 394 * ] |
| 395 * }, |
| 396 * { |
| 397 * "service": "fooservice@googleapis.com" |
| 398 * "audit_log_configs": [ |
| 399 * { |
| 400 * "log_type": "DATA_READ", |
| 401 * }, |
| 402 * { |
| 403 * "log_type": "DATA_WRITE", |
| 404 * "exempted_members": [ |
| 405 * "user:bar@gmail.com" |
| 406 * ] |
| 407 * } |
| 408 * ] |
| 409 * } |
| 410 * ] |
| 411 * } |
| 412 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 413 * logging. It also exempts foo@gmail.com from DATA_READ logging, and |
| 414 * bar@gmail.com from DATA_WRITE logging. |
| 415 */ |
| 416 class AuditConfig { |
| 417 /** |
| 418 * The configuration for logging of each type of permission. |
| 419 * Next ID: 4 |
| 420 */ |
| 421 core.List<AuditLogConfig> auditLogConfigs; |
| 422 core.List<core.String> exemptedMembers; |
| 423 /** |
| 424 * Specifies a service that will be enabled for audit logging. |
| 425 * For example, `resourcemanager`, `storage`, `compute`. |
| 426 * `allServices` is a special value that covers all services. |
| 427 */ |
| 428 core.String service; |
| 429 |
| 430 AuditConfig(); |
| 431 |
| 432 AuditConfig.fromJson(core.Map _json) { |
| 433 if (_json.containsKey("auditLogConfigs")) { |
| 434 auditLogConfigs = _json["auditLogConfigs"].map((value) => new AuditLogConf
ig.fromJson(value)).toList(); |
| 435 } |
| 436 if (_json.containsKey("exemptedMembers")) { |
| 437 exemptedMembers = _json["exemptedMembers"]; |
| 438 } |
| 439 if (_json.containsKey("service")) { |
| 440 service = _json["service"]; |
| 441 } |
| 442 } |
| 443 |
| 444 core.Map toJson() { |
| 445 var _json = new core.Map(); |
| 446 if (auditLogConfigs != null) { |
| 447 _json["auditLogConfigs"] = auditLogConfigs.map((value) => (value).toJson()
).toList(); |
| 448 } |
| 449 if (exemptedMembers != null) { |
| 450 _json["exemptedMembers"] = exemptedMembers; |
| 451 } |
| 452 if (service != null) { |
| 453 _json["service"] = service; |
| 454 } |
| 455 return _json; |
| 456 } |
| 457 } |
| 458 |
| 459 /** |
| 460 * Provides the configuration for logging a type of permissions. |
| 461 * Example: |
| 462 * |
| 463 * { |
| 464 * "audit_log_configs": [ |
| 465 * { |
| 466 * "log_type": "DATA_READ", |
| 467 * "exempted_members": [ |
| 468 * "user:foo@gmail.com" |
| 469 * ] |
| 470 * }, |
| 471 * { |
| 472 * "log_type": "DATA_WRITE", |
| 473 * } |
| 474 * ] |
| 475 * } |
| 476 * |
| 477 * This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting |
| 478 * foo@gmail.com from DATA_READ logging. |
| 479 */ |
| 480 class AuditLogConfig { |
| 481 /** |
| 482 * Specifies the identities that do not cause logging for this type of |
| 483 * permission. |
| 484 * Follows the same format of Binding.members. |
| 485 */ |
| 486 core.List<core.String> exemptedMembers; |
| 487 /** |
| 488 * The log type that this config enables. |
| 489 * Possible string values are: |
| 490 * - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this. |
| 491 * - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy |
| 492 * - "DATA_WRITE" : Data writes. Example: CloudSQL Users create |
| 493 * - "DATA_READ" : Data reads. Example: CloudSQL Users list |
| 494 */ |
| 495 core.String logType; |
| 496 |
| 497 AuditLogConfig(); |
| 498 |
| 499 AuditLogConfig.fromJson(core.Map _json) { |
| 500 if (_json.containsKey("exemptedMembers")) { |
| 501 exemptedMembers = _json["exemptedMembers"]; |
| 502 } |
| 503 if (_json.containsKey("logType")) { |
| 504 logType = _json["logType"]; |
| 505 } |
| 506 } |
| 507 |
| 508 core.Map toJson() { |
| 509 var _json = new core.Map(); |
| 510 if (exemptedMembers != null) { |
| 511 _json["exemptedMembers"] = exemptedMembers; |
| 512 } |
| 513 if (logType != null) { |
| 514 _json["logType"] = logType; |
| 515 } |
| 516 return _json; |
| 517 } |
| 518 } |
| 519 |
| 520 /** Associates `members` with a `role`. */ |
| 521 class Binding { |
| 522 /** |
| 523 * Specifies the identities requesting access for a Cloud Platform resource. |
| 524 * `members` can have the following values: |
| 525 * |
| 526 * * `allUsers`: A special identifier that represents anyone who is |
| 527 * on the internet; with or without a Google account. |
| 528 * |
| 529 * * `allAuthenticatedUsers`: A special identifier that represents anyone |
| 530 * who is authenticated with a Google account or a service account. |
| 531 * |
| 532 * * `user:{emailid}`: An email address that represents a specific Google |
| 533 * account. For example, `alice@gmail.com` or `joe@example.com`. |
| 534 * |
| 535 * |
| 536 * * `serviceAccount:{emailid}`: An email address that represents a service |
| 537 * account. For example, `my-other-app@appspot.gserviceaccount.com`. |
| 538 * |
| 539 * * `group:{emailid}`: An email address that represents a Google group. |
| 540 * For example, `admins@example.com`. |
| 541 * |
| 542 * * `domain:{domain}`: A Google Apps domain name that represents all the |
| 543 * users of that domain. For example, `google.com` or `example.com`. |
| 544 */ |
| 545 core.List<core.String> members; |
| 546 /** |
| 547 * Role that is assigned to `members`. |
| 548 * For example, `roles/viewer`, `roles/editor`, or `roles/owner`. |
| 549 * Required |
| 550 */ |
| 551 core.String role; |
| 552 |
| 553 Binding(); |
| 554 |
| 555 Binding.fromJson(core.Map _json) { |
| 556 if (_json.containsKey("members")) { |
| 557 members = _json["members"]; |
| 558 } |
| 559 if (_json.containsKey("role")) { |
| 560 role = _json["role"]; |
| 561 } |
| 562 } |
| 563 |
| 564 core.Map toJson() { |
| 565 var _json = new core.Map(); |
| 566 if (members != null) { |
| 567 _json["members"] = members; |
| 568 } |
| 569 if (role != null) { |
| 570 _json["role"] = role; |
| 571 } |
| 572 return _json; |
| 573 } |
| 574 } |
| 575 |
| 576 /** Write a Cloud Audit log */ |
| 577 class CloudAuditOptions { |
| 578 |
| 579 CloudAuditOptions(); |
| 580 |
| 581 CloudAuditOptions.fromJson(core.Map _json) { |
| 582 } |
| 583 |
| 584 core.Map toJson() { |
| 585 var _json = new core.Map(); |
| 586 return _json; |
| 587 } |
| 588 } |
| 589 |
| 590 /** A condition to be met. */ |
| 591 class Condition { |
| 592 /** |
| 593 * Trusted attributes supplied by the IAM system. |
| 594 * Possible string values are: |
| 595 * - "NO_ATTR" : Default non-attribute. |
| 596 * - "AUTHORITY" : Either principal or (if present) authority selector. |
| 597 * - "ATTRIBUTION" : The principal (even if an authority selector is present), |
| 598 * which |
| 599 * must only be used for attribution, not authorization. |
| 600 * - "APPROVER" : An approver (distinct from the requester) that has |
| 601 * authorized this |
| 602 * request. |
| 603 * When used with IN, the condition indicates that one of the approvers |
| 604 * associated with the request matches the specified principal, or is a |
| 605 * member of the specified group. Approvers can only grant additional |
| 606 * access, and are thus only used in a strictly positive context |
| 607 * (e.g. ALLOW/IN or DENY/NOT_IN). |
| 608 * See: go/rpc-security-policy-dynamicauth. |
| 609 * - "JUSTIFICATION_TYPE" : What types of justifications have been supplied |
| 610 * with this request. |
| 611 * String values should match enum names from tech.iam.JustificationType, |
| 612 * e.g. "MANUAL_STRING". It is not permitted to grant access based on |
| 613 * the *absence* of a justification, so justification conditions can only |
| 614 * be used in a "positive" context (e.g., ALLOW/IN or DENY/NOT_IN). |
| 615 * |
| 616 * Multiple justifications, e.g., a Buganizer ID and a manually-entered |
| 617 * reason, are normal and supported. |
| 618 */ |
| 619 core.String iam; |
| 620 /** |
| 621 * An operator to apply the subject with. |
| 622 * Possible string values are: |
| 623 * - "NO_OP" : Default no-op. |
| 624 * - "EQUALS" : DEPRECATED. Use IN instead. |
| 625 * - "NOT_EQUALS" : DEPRECATED. Use NOT_IN instead. |
| 626 * - "IN" : The condition is true if the subject (or any element of it if it |
| 627 * is |
| 628 * a set) matches any of the supplied values. |
| 629 * - "NOT_IN" : The condition is true if the subject (or every element of it |
| 630 * if it is |
| 631 * a set) matches none of the supplied values. |
| 632 * - "DISCHARGED" : Subject is discharged |
| 633 */ |
| 634 core.String op; |
| 635 /** Trusted attributes discharged by the service. */ |
| 636 core.String svc; |
| 637 /** |
| 638 * Trusted attributes supplied by any service that owns resources and uses |
| 639 * the IAM system for access control. |
| 640 * Possible string values are: |
| 641 * - "NO_ATTR" : Default non-attribute type |
| 642 * - "REGION" : Region of the resource |
| 643 * - "SERVICE" : Service name |
| 644 * - "NAME" : Resource name |
| 645 * - "IP" : IP address of the caller |
| 646 */ |
| 647 core.String sys; |
| 648 /** DEPRECATED. Use 'values' instead. */ |
| 649 core.String value; |
| 650 /** The objects of the condition. This is mutually exclusive with 'value'. */ |
| 651 core.List<core.String> values; |
| 652 |
| 653 Condition(); |
| 654 |
| 655 Condition.fromJson(core.Map _json) { |
| 656 if (_json.containsKey("iam")) { |
| 657 iam = _json["iam"]; |
| 658 } |
| 659 if (_json.containsKey("op")) { |
| 660 op = _json["op"]; |
| 661 } |
| 662 if (_json.containsKey("svc")) { |
| 663 svc = _json["svc"]; |
| 664 } |
| 665 if (_json.containsKey("sys")) { |
| 666 sys = _json["sys"]; |
| 667 } |
| 668 if (_json.containsKey("value")) { |
| 669 value = _json["value"]; |
| 670 } |
| 671 if (_json.containsKey("values")) { |
| 672 values = _json["values"]; |
| 673 } |
| 674 } |
| 675 |
| 676 core.Map toJson() { |
| 677 var _json = new core.Map(); |
| 678 if (iam != null) { |
| 679 _json["iam"] = iam; |
| 680 } |
| 681 if (op != null) { |
| 682 _json["op"] = op; |
| 683 } |
| 684 if (svc != null) { |
| 685 _json["svc"] = svc; |
| 686 } |
| 687 if (sys != null) { |
| 688 _json["sys"] = sys; |
| 689 } |
| 690 if (value != null) { |
| 691 _json["value"] = value; |
| 692 } |
| 693 if (values != null) { |
| 694 _json["values"] = values; |
| 695 } |
| 696 return _json; |
| 697 } |
| 698 } |
| 699 |
| 700 /** Options for counters */ |
| 701 class CounterOptions { |
| 702 /** The field value to attribute. */ |
| 703 core.String field; |
| 704 /** The metric to update. */ |
| 705 core.String metric; |
| 706 |
| 707 CounterOptions(); |
| 708 |
| 709 CounterOptions.fromJson(core.Map _json) { |
| 710 if (_json.containsKey("field")) { |
| 711 field = _json["field"]; |
| 712 } |
| 713 if (_json.containsKey("metric")) { |
| 714 metric = _json["metric"]; |
| 715 } |
| 716 } |
| 717 |
| 718 core.Map toJson() { |
| 719 var _json = new core.Map(); |
| 720 if (field != null) { |
| 721 _json["field"] = field; |
| 722 } |
| 723 if (metric != null) { |
| 724 _json["metric"] = metric; |
| 725 } |
| 726 return _json; |
| 727 } |
| 728 } |
| 729 |
| 730 /** Write a Data Access (Gin) log */ |
| 731 class DataAccessOptions { |
| 732 |
| 733 DataAccessOptions(); |
| 734 |
| 735 DataAccessOptions.fromJson(core.Map _json) { |
| 736 } |
| 737 |
| 738 core.Map toJson() { |
| 739 var _json = new core.Map(); |
| 740 return _json; |
| 741 } |
| 742 } |
| 743 |
| 744 /** |
| 745 * A generic empty message that you can re-use to avoid defining duplicated |
| 746 * empty messages in your APIs. A typical example is to use it as the request |
| 747 * or the response type of an API method. For instance: |
| 748 * |
| 749 * service Foo { |
| 750 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 751 * } |
| 752 * |
| 753 * The JSON representation for `Empty` is empty JSON object `{}`. |
| 754 */ |
| 755 class Empty { |
| 756 |
| 757 Empty(); |
| 758 |
| 759 Empty.fromJson(core.Map _json) { |
| 760 } |
| 761 |
| 762 core.Map toJson() { |
| 763 var _json = new core.Map(); |
| 764 return _json; |
| 765 } |
| 766 } |
| 767 |
| 768 /** Response for ListRepos. */ |
| 769 class ListReposResponse { |
| 770 /** The listed repos. */ |
| 771 core.List<Repo> repos; |
| 772 |
| 773 ListReposResponse(); |
| 774 |
| 775 ListReposResponse.fromJson(core.Map _json) { |
| 776 if (_json.containsKey("repos")) { |
| 777 repos = _json["repos"].map((value) => new Repo.fromJson(value)).toList(); |
| 778 } |
| 779 } |
| 780 |
| 781 core.Map toJson() { |
| 782 var _json = new core.Map(); |
| 783 if (repos != null) { |
| 784 _json["repos"] = repos.map((value) => (value).toJson()).toList(); |
| 785 } |
| 786 return _json; |
| 787 } |
| 788 } |
| 789 |
| 790 /** |
| 791 * Specifies what kind of log the caller must write |
| 792 * Increment a streamz counter with the specified metric and field names. |
| 793 * |
| 794 * Metric names should start with a '/', generally be lowercase-only, |
| 795 * and end in "_count". Field names should not contain an initial slash. |
| 796 * The actual exported metric names will have "/iam/policy" prepended. |
| 797 * |
| 798 * Field names correspond to IAM request parameters and field values are |
| 799 * their respective values. |
| 800 * |
| 801 * At present the only supported field names are |
| 802 * - "iam_principal", corresponding to IAMContext.principal; |
| 803 * - "" (empty string), resulting in one aggretated counter with no field. |
| 804 * |
| 805 * Examples: |
| 806 * counter { metric: "/debug_access_count" field: "iam_principal" } |
| 807 * ==> increment counter /iam/policy/backend_debug_access_count |
| 808 * {iam_principal=[value of IAMContext.principal]} |
| 809 * |
| 810 * At this time we do not support: |
| 811 * * multiple field names (though this may be supported in the future) |
| 812 * * decrementing the counter |
| 813 * * incrementing it by anything other than 1 |
| 814 */ |
| 815 class LogConfig { |
| 816 /** Cloud audit options. */ |
| 817 CloudAuditOptions cloudAudit; |
| 818 /** Counter options. */ |
| 819 CounterOptions counter; |
| 820 /** Data access options. */ |
| 821 DataAccessOptions dataAccess; |
| 822 |
| 823 LogConfig(); |
| 824 |
| 825 LogConfig.fromJson(core.Map _json) { |
| 826 if (_json.containsKey("cloudAudit")) { |
| 827 cloudAudit = new CloudAuditOptions.fromJson(_json["cloudAudit"]); |
| 828 } |
| 829 if (_json.containsKey("counter")) { |
| 830 counter = new CounterOptions.fromJson(_json["counter"]); |
| 831 } |
| 832 if (_json.containsKey("dataAccess")) { |
| 833 dataAccess = new DataAccessOptions.fromJson(_json["dataAccess"]); |
| 834 } |
| 835 } |
| 836 |
| 837 core.Map toJson() { |
| 838 var _json = new core.Map(); |
| 839 if (cloudAudit != null) { |
| 840 _json["cloudAudit"] = (cloudAudit).toJson(); |
| 841 } |
| 842 if (counter != null) { |
| 843 _json["counter"] = (counter).toJson(); |
| 844 } |
| 845 if (dataAccess != null) { |
| 846 _json["dataAccess"] = (dataAccess).toJson(); |
| 847 } |
| 848 return _json; |
| 849 } |
| 850 } |
| 851 |
| 852 /** |
| 853 * Configuration to automatically mirror a repository from another |
| 854 * hosting service, for example GitHub or BitBucket. |
| 855 */ |
| 856 class MirrorConfig { |
| 857 /** |
| 858 * ID of the SSH deploy key at the other hosting service. |
| 859 * Removing this key from the other service would deauthorize |
| 860 * Google Cloud Source Repositories from mirroring. |
| 861 */ |
| 862 core.String deployKeyId; |
| 863 /** URL of the main repository at the other hosting service. */ |
| 864 core.String url; |
| 865 /** |
| 866 * ID of the webhook listening to updates to trigger mirroring. |
| 867 * Removing this webook from the other hosting service will stop |
| 868 * Google Cloud Source Repositories from receiving notifications, |
| 869 * and thereby disabling mirroring. |
| 870 */ |
| 871 core.String webhookId; |
| 872 |
| 873 MirrorConfig(); |
| 874 |
| 875 MirrorConfig.fromJson(core.Map _json) { |
| 876 if (_json.containsKey("deployKeyId")) { |
| 877 deployKeyId = _json["deployKeyId"]; |
| 878 } |
| 879 if (_json.containsKey("url")) { |
| 880 url = _json["url"]; |
| 881 } |
| 882 if (_json.containsKey("webhookId")) { |
| 883 webhookId = _json["webhookId"]; |
| 884 } |
| 885 } |
| 886 |
| 887 core.Map toJson() { |
| 888 var _json = new core.Map(); |
| 889 if (deployKeyId != null) { |
| 890 _json["deployKeyId"] = deployKeyId; |
| 891 } |
| 892 if (url != null) { |
| 893 _json["url"] = url; |
| 894 } |
| 895 if (webhookId != null) { |
| 896 _json["webhookId"] = webhookId; |
| 897 } |
| 898 return _json; |
| 899 } |
| 900 } |
| 901 |
| 902 /** |
| 903 * Defines an Identity and Access Management (IAM) policy. It is used to |
| 904 * specify access control policies for Cloud Platform resources. |
| 905 * |
| 906 * |
| 907 * A `Policy` consists of a list of `bindings`. A `Binding` binds a list of |
| 908 * `members` to a `role`, where the members can be user accounts, Google groups, |
| 909 * Google domains, and service accounts. A `role` is a named list of permissions |
| 910 * defined by IAM. |
| 911 * |
| 912 * **Example** |
| 913 * |
| 914 * { |
| 915 * "bindings": [ |
| 916 * { |
| 917 * "role": "roles/owner", |
| 918 * "members": [ |
| 919 * "user:mike@example.com", |
| 920 * "group:admins@example.com", |
| 921 * "domain:google.com", |
| 922 * "serviceAccount:my-other-app@appspot.gserviceaccount.com", |
| 923 * ] |
| 924 * }, |
| 925 * { |
| 926 * "role": "roles/viewer", |
| 927 * "members": ["user:sean@example.com"] |
| 928 * } |
| 929 * ] |
| 930 * } |
| 931 * |
| 932 * For a description of IAM and its features, see the |
| 933 * [IAM developer's guide](https://cloud.google.com/iam). |
| 934 */ |
| 935 class Policy { |
| 936 /** Specifies cloud audit logging configuration for this policy. */ |
| 937 core.List<AuditConfig> auditConfigs; |
| 938 /** |
| 939 * Associates a list of `members` to a `role`. |
| 940 * Multiple `bindings` must not be specified for the same `role`. |
| 941 * `bindings` with no members will result in an error. |
| 942 */ |
| 943 core.List<Binding> bindings; |
| 944 /** |
| 945 * `etag` is used for optimistic concurrency control as a way to help |
| 946 * prevent simultaneous updates of a policy from overwriting each other. |
| 947 * It is strongly suggested that systems make use of the `etag` in the |
| 948 * read-modify-write cycle to perform policy updates in order to avoid race |
| 949 * conditions: An `etag` is returned in the response to `getIamPolicy`, and |
| 950 * systems are expected to put that etag in the request to `setIamPolicy` to |
| 951 * ensure that their change will be applied to the same version of the policy. |
| 952 * |
| 953 * If no `etag` is provided in the call to `setIamPolicy`, then the existing |
| 954 * policy is overwritten blindly. |
| 955 */ |
| 956 core.String etag; |
| 957 core.List<core.int> get etagAsBytes { |
| 958 return convert.BASE64.decode(etag); |
| 959 } |
| 960 |
| 961 void set etagAsBytes(core.List<core.int> _bytes) { |
| 962 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
| 963 } |
| 964 core.bool iamOwned; |
| 965 /** |
| 966 * If more than one rule is specified, the rules are applied in the following |
| 967 * manner: |
| 968 * - All matching LOG rules are always applied. |
| 969 * - If any DENY/DENY_WITH_LOG rule matches, permission is denied. |
| 970 * Logging will be applied if one or more matching rule requires logging. |
| 971 * - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is |
| 972 * granted. |
| 973 * Logging will be applied if one or more matching rule requires logging. |
| 974 * - Otherwise, if no rule applies, permission is denied. |
| 975 */ |
| 976 core.List<Rule> rules; |
| 977 /** Version of the `Policy`. The default version is 0. */ |
| 978 core.int version; |
| 979 |
| 980 Policy(); |
| 981 |
| 982 Policy.fromJson(core.Map _json) { |
| 983 if (_json.containsKey("auditConfigs")) { |
| 984 auditConfigs = _json["auditConfigs"].map((value) => new AuditConfig.fromJs
on(value)).toList(); |
| 985 } |
| 986 if (_json.containsKey("bindings")) { |
| 987 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t
oList(); |
| 988 } |
| 989 if (_json.containsKey("etag")) { |
| 990 etag = _json["etag"]; |
| 991 } |
| 992 if (_json.containsKey("iamOwned")) { |
| 993 iamOwned = _json["iamOwned"]; |
| 994 } |
| 995 if (_json.containsKey("rules")) { |
| 996 rules = _json["rules"].map((value) => new Rule.fromJson(value)).toList(); |
| 997 } |
| 998 if (_json.containsKey("version")) { |
| 999 version = _json["version"]; |
| 1000 } |
| 1001 } |
| 1002 |
| 1003 core.Map toJson() { |
| 1004 var _json = new core.Map(); |
| 1005 if (auditConfigs != null) { |
| 1006 _json["auditConfigs"] = auditConfigs.map((value) => (value).toJson()).toLi
st(); |
| 1007 } |
| 1008 if (bindings != null) { |
| 1009 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); |
| 1010 } |
| 1011 if (etag != null) { |
| 1012 _json["etag"] = etag; |
| 1013 } |
| 1014 if (iamOwned != null) { |
| 1015 _json["iamOwned"] = iamOwned; |
| 1016 } |
| 1017 if (rules != null) { |
| 1018 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
| 1019 } |
| 1020 if (version != null) { |
| 1021 _json["version"] = version; |
| 1022 } |
| 1023 return _json; |
| 1024 } |
| 1025 } |
| 1026 |
| 1027 /** |
| 1028 * A repository (or repo) is a Git repository storing versioned source content. |
| 1029 */ |
| 1030 class Repo { |
| 1031 /** How this repository mirrors a repository managed by another service. */ |
| 1032 MirrorConfig mirrorConfig; |
| 1033 /** |
| 1034 * Resource name of the repository, of the form |
| 1035 * `projects/<project>/repos/<repo>`. |
| 1036 */ |
| 1037 core.String name; |
| 1038 /** The size in bytes of the repo. */ |
| 1039 core.String size; |
| 1040 /** URL to clone the repository from Google Cloud Source Repositories. */ |
| 1041 core.String url; |
| 1042 |
| 1043 Repo(); |
| 1044 |
| 1045 Repo.fromJson(core.Map _json) { |
| 1046 if (_json.containsKey("mirrorConfig")) { |
| 1047 mirrorConfig = new MirrorConfig.fromJson(_json["mirrorConfig"]); |
| 1048 } |
| 1049 if (_json.containsKey("name")) { |
| 1050 name = _json["name"]; |
| 1051 } |
| 1052 if (_json.containsKey("size")) { |
| 1053 size = _json["size"]; |
| 1054 } |
| 1055 if (_json.containsKey("url")) { |
| 1056 url = _json["url"]; |
| 1057 } |
| 1058 } |
| 1059 |
| 1060 core.Map toJson() { |
| 1061 var _json = new core.Map(); |
| 1062 if (mirrorConfig != null) { |
| 1063 _json["mirrorConfig"] = (mirrorConfig).toJson(); |
| 1064 } |
| 1065 if (name != null) { |
| 1066 _json["name"] = name; |
| 1067 } |
| 1068 if (size != null) { |
| 1069 _json["size"] = size; |
| 1070 } |
| 1071 if (url != null) { |
| 1072 _json["url"] = url; |
| 1073 } |
| 1074 return _json; |
| 1075 } |
| 1076 } |
| 1077 |
| 1078 /** A rule to be applied in a Policy. */ |
| 1079 class Rule { |
| 1080 /** |
| 1081 * Required |
| 1082 * Possible string values are: |
| 1083 * - "NO_ACTION" : Default no action. |
| 1084 * - "ALLOW" : Matching 'Entries' grant access. |
| 1085 * - "ALLOW_WITH_LOG" : Matching 'Entries' grant access and the caller |
| 1086 * promises to log |
| 1087 * the request per the returned log_configs. |
| 1088 * - "DENY" : Matching 'Entries' deny access. |
| 1089 * - "DENY_WITH_LOG" : Matching 'Entries' deny access and the caller promises |
| 1090 * to log |
| 1091 * the request per the returned log_configs. |
| 1092 * - "LOG" : Matching 'Entries' tell IAM.Check callers to generate logs. |
| 1093 */ |
| 1094 core.String action; |
| 1095 /** Additional restrictions that must be met */ |
| 1096 core.List<Condition> conditions; |
| 1097 /** Human-readable description of the rule. */ |
| 1098 core.String description; |
| 1099 /** |
| 1100 * If one or more 'in' clauses are specified, the rule matches if |
| 1101 * the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. |
| 1102 */ |
| 1103 core.List<core.String> in_; |
| 1104 /** |
| 1105 * The config returned to callers of tech.iam.IAM.CheckPolicy for any entries |
| 1106 * that match the LOG action. |
| 1107 */ |
| 1108 core.List<LogConfig> logConfig; |
| 1109 /** |
| 1110 * If one or more 'not_in' clauses are specified, the rule matches |
| 1111 * if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. |
| 1112 * The format for in and not_in entries is the same as for members in a |
| 1113 * Binding (see google/iam/v1/policy.proto). |
| 1114 */ |
| 1115 core.List<core.String> notIn; |
| 1116 /** |
| 1117 * A permission is a string of form '<service>.<resource type>.<verb>' |
| 1118 * (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, |
| 1119 * and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. |
| 1120 */ |
| 1121 core.List<core.String> permissions; |
| 1122 |
| 1123 Rule(); |
| 1124 |
| 1125 Rule.fromJson(core.Map _json) { |
| 1126 if (_json.containsKey("action")) { |
| 1127 action = _json["action"]; |
| 1128 } |
| 1129 if (_json.containsKey("conditions")) { |
| 1130 conditions = _json["conditions"].map((value) => new Condition.fromJson(val
ue)).toList(); |
| 1131 } |
| 1132 if (_json.containsKey("description")) { |
| 1133 description = _json["description"]; |
| 1134 } |
| 1135 if (_json.containsKey("in")) { |
| 1136 in_ = _json["in"]; |
| 1137 } |
| 1138 if (_json.containsKey("logConfig")) { |
| 1139 logConfig = _json["logConfig"].map((value) => new LogConfig.fromJson(value
)).toList(); |
| 1140 } |
| 1141 if (_json.containsKey("notIn")) { |
| 1142 notIn = _json["notIn"]; |
| 1143 } |
| 1144 if (_json.containsKey("permissions")) { |
| 1145 permissions = _json["permissions"]; |
| 1146 } |
| 1147 } |
| 1148 |
| 1149 core.Map toJson() { |
| 1150 var _json = new core.Map(); |
| 1151 if (action != null) { |
| 1152 _json["action"] = action; |
| 1153 } |
| 1154 if (conditions != null) { |
| 1155 _json["conditions"] = conditions.map((value) => (value).toJson()).toList()
; |
| 1156 } |
| 1157 if (description != null) { |
| 1158 _json["description"] = description; |
| 1159 } |
| 1160 if (in_ != null) { |
| 1161 _json["in"] = in_; |
| 1162 } |
| 1163 if (logConfig != null) { |
| 1164 _json["logConfig"] = logConfig.map((value) => (value).toJson()).toList(); |
| 1165 } |
| 1166 if (notIn != null) { |
| 1167 _json["notIn"] = notIn; |
| 1168 } |
| 1169 if (permissions != null) { |
| 1170 _json["permissions"] = permissions; |
| 1171 } |
| 1172 return _json; |
| 1173 } |
| 1174 } |
| 1175 |
| 1176 /** Request message for `SetIamPolicy` method. */ |
| 1177 class SetIamPolicyRequest { |
| 1178 /** |
| 1179 * REQUIRED: The complete policy to be applied to the `resource`. The size of |
| 1180 * the policy is limited to a few 10s of KB. An empty policy is a |
| 1181 * valid policy but certain Cloud Platform services (such as Projects) |
| 1182 * might reject them. |
| 1183 */ |
| 1184 Policy policy; |
| 1185 /** |
| 1186 * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only |
| 1187 * the fields in the mask will be modified. If no mask is provided, a default |
| 1188 * mask is used: |
| 1189 * paths: "bindings, etag" |
| 1190 * This field is only used by Cloud IAM. |
| 1191 */ |
| 1192 core.String updateMask; |
| 1193 |
| 1194 SetIamPolicyRequest(); |
| 1195 |
| 1196 SetIamPolicyRequest.fromJson(core.Map _json) { |
| 1197 if (_json.containsKey("policy")) { |
| 1198 policy = new Policy.fromJson(_json["policy"]); |
| 1199 } |
| 1200 if (_json.containsKey("updateMask")) { |
| 1201 updateMask = _json["updateMask"]; |
| 1202 } |
| 1203 } |
| 1204 |
| 1205 core.Map toJson() { |
| 1206 var _json = new core.Map(); |
| 1207 if (policy != null) { |
| 1208 _json["policy"] = (policy).toJson(); |
| 1209 } |
| 1210 if (updateMask != null) { |
| 1211 _json["updateMask"] = updateMask; |
| 1212 } |
| 1213 return _json; |
| 1214 } |
| 1215 } |
| 1216 |
| 1217 /** Request message for `TestIamPermissions` method. */ |
| 1218 class TestIamPermissionsRequest { |
| 1219 /** |
| 1220 * The set of permissions to check for the `resource`. Permissions with |
| 1221 * wildcards (such as '*' or 'storage.*') are not allowed. For more |
| 1222 * information see |
| 1223 * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
| 1224 */ |
| 1225 core.List<core.String> permissions; |
| 1226 |
| 1227 TestIamPermissionsRequest(); |
| 1228 |
| 1229 TestIamPermissionsRequest.fromJson(core.Map _json) { |
| 1230 if (_json.containsKey("permissions")) { |
| 1231 permissions = _json["permissions"]; |
| 1232 } |
| 1233 } |
| 1234 |
| 1235 core.Map toJson() { |
| 1236 var _json = new core.Map(); |
| 1237 if (permissions != null) { |
| 1238 _json["permissions"] = permissions; |
| 1239 } |
| 1240 return _json; |
| 1241 } |
| 1242 } |
| 1243 |
| 1244 /** Response message for `TestIamPermissions` method. */ |
| 1245 class TestIamPermissionsResponse { |
| 1246 /** |
| 1247 * A subset of `TestPermissionsRequest.permissions` that the caller is |
| 1248 * allowed. |
| 1249 */ |
| 1250 core.List<core.String> permissions; |
| 1251 |
| 1252 TestIamPermissionsResponse(); |
| 1253 |
| 1254 TestIamPermissionsResponse.fromJson(core.Map _json) { |
| 1255 if (_json.containsKey("permissions")) { |
| 1256 permissions = _json["permissions"]; |
| 1257 } |
| 1258 } |
| 1259 |
| 1260 core.Map toJson() { |
| 1261 var _json = new core.Map(); |
| 1262 if (permissions != null) { |
| 1263 _json["permissions"] = permissions; |
| 1264 } |
| 1265 return _json; |
| 1266 } |
| 1267 } |
OLD | NEW |