OLD | NEW |
(Empty) | |
| 1 library googleapis_beta.manager.v1beta2; |
| 2 |
| 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; |
| 7 |
| 8 import "package:crypto/crypto.dart" as crypto; |
| 9 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; |
| 11 import '../common/common.dart' as common; |
| 12 |
| 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 |
| 16 /** |
| 17 * The Deployment Manager API allows users to declaratively configure, deploy |
| 18 * and run complex solutions on the Google Cloud Platform. |
| 19 */ |
| 20 class ManagerApi { |
| 21 /** View and manage your applications deployed on Google App Engine */ |
| 22 static const AppengineAdminScope = "https://www.googleapis.com/auth/appengine.
admin"; |
| 23 |
| 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 /** View and manage your Google Compute Engine resources */ |
| 28 static const ComputeScope = "https://www.googleapis.com/auth/compute"; |
| 29 |
| 30 /** Manage your data in Google Cloud Storage */ |
| 31 static const DevstorageReadWriteScope = "https://www.googleapis.com/auth/devst
orage.read_write"; |
| 32 |
| 33 /** |
| 34 * View and manage your Google Cloud Platform management resources and |
| 35 * deployment status information |
| 36 */ |
| 37 static const NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudma
n"; |
| 38 |
| 39 /** |
| 40 * View your Google Cloud Platform management resources and deployment status |
| 41 * information |
| 42 */ |
| 43 static const NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev
.cloudman.readonly"; |
| 44 |
| 45 |
| 46 final common_internal.ApiRequester _requester; |
| 47 |
| 48 DeploymentsResourceApi get deployments => new DeploymentsResourceApi(_requeste
r); |
| 49 TemplatesResourceApi get templates => new TemplatesResourceApi(_requester); |
| 50 |
| 51 ManagerApi(http.Client client) : |
| 52 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/manager/v1beta2/projects/"); |
| 53 } |
| 54 |
| 55 |
| 56 /** Not documented yet. */ |
| 57 class DeploymentsResourceApi { |
| 58 final common_internal.ApiRequester _requester; |
| 59 |
| 60 DeploymentsResourceApi(common_internal.ApiRequester client) : |
| 61 _requester = client; |
| 62 |
| 63 /** |
| 64 * Not documented yet. |
| 65 * |
| 66 * Request parameters: |
| 67 * |
| 68 * [projectId] - null |
| 69 * |
| 70 * [region] - null |
| 71 * |
| 72 * [deploymentName] - null |
| 73 * |
| 74 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 75 * error. |
| 76 * |
| 77 * If the used [http.Client] completes with an error when making a REST call, |
| 78 * this method will complete with the same error. |
| 79 */ |
| 80 async.Future delete(core.String projectId, core.String region, core.String dep
loymentName) { |
| 81 var _url = null; |
| 82 var _queryParams = new core.Map(); |
| 83 var _uploadMedia = null; |
| 84 var _uploadOptions = null; |
| 85 var _downloadOptions = common.DownloadOptions.Metadata; |
| 86 var _body = null; |
| 87 |
| 88 if (projectId == null) { |
| 89 throw new core.ArgumentError("Parameter projectId is required."); |
| 90 } |
| 91 if (region == null) { |
| 92 throw new core.ArgumentError("Parameter region is required."); |
| 93 } |
| 94 if (deploymentName == null) { |
| 95 throw new core.ArgumentError("Parameter deploymentName is required."); |
| 96 } |
| 97 |
| 98 _downloadOptions = null; |
| 99 |
| 100 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/regions/' + c
ommon_internal.Escaper.ecapeVariable('$region') + '/deployments/' + common_inter
nal.Escaper.ecapeVariable('$deploymentName'); |
| 101 |
| 102 var _response = _requester.request(_url, |
| 103 "DELETE", |
| 104 body: _body, |
| 105 queryParams: _queryParams, |
| 106 uploadOptions: _uploadOptions, |
| 107 uploadMedia: _uploadMedia, |
| 108 downloadOptions: _downloadOptions); |
| 109 return _response.then((data) => null); |
| 110 } |
| 111 |
| 112 /** |
| 113 * Not documented yet. |
| 114 * |
| 115 * Request parameters: |
| 116 * |
| 117 * [projectId] - null |
| 118 * |
| 119 * [region] - null |
| 120 * |
| 121 * [deploymentName] - null |
| 122 * |
| 123 * Completes with a [Deployment]. |
| 124 * |
| 125 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 126 * error. |
| 127 * |
| 128 * If the used [http.Client] completes with an error when making a REST call, |
| 129 * this method will complete with the same error. |
| 130 */ |
| 131 async.Future<Deployment> get(core.String projectId, core.String region, core.S
tring deploymentName) { |
| 132 var _url = null; |
| 133 var _queryParams = new core.Map(); |
| 134 var _uploadMedia = null; |
| 135 var _uploadOptions = null; |
| 136 var _downloadOptions = common.DownloadOptions.Metadata; |
| 137 var _body = null; |
| 138 |
| 139 if (projectId == null) { |
| 140 throw new core.ArgumentError("Parameter projectId is required."); |
| 141 } |
| 142 if (region == null) { |
| 143 throw new core.ArgumentError("Parameter region is required."); |
| 144 } |
| 145 if (deploymentName == null) { |
| 146 throw new core.ArgumentError("Parameter deploymentName is required."); |
| 147 } |
| 148 |
| 149 |
| 150 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/regions/' + c
ommon_internal.Escaper.ecapeVariable('$region') + '/deployments/' + common_inter
nal.Escaper.ecapeVariable('$deploymentName'); |
| 151 |
| 152 var _response = _requester.request(_url, |
| 153 "GET", |
| 154 body: _body, |
| 155 queryParams: _queryParams, |
| 156 uploadOptions: _uploadOptions, |
| 157 uploadMedia: _uploadMedia, |
| 158 downloadOptions: _downloadOptions); |
| 159 return _response.then((data) => new Deployment.fromJson(data)); |
| 160 } |
| 161 |
| 162 /** |
| 163 * Not documented yet. |
| 164 * |
| 165 * [request] - The metadata request object. |
| 166 * |
| 167 * Request parameters: |
| 168 * |
| 169 * [projectId] - null |
| 170 * |
| 171 * [region] - null |
| 172 * |
| 173 * Completes with a [Deployment]. |
| 174 * |
| 175 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 176 * error. |
| 177 * |
| 178 * If the used [http.Client] completes with an error when making a REST call, |
| 179 * this method will complete with the same error. |
| 180 */ |
| 181 async.Future<Deployment> insert(Deployment request, core.String projectId, cor
e.String region) { |
| 182 var _url = null; |
| 183 var _queryParams = new core.Map(); |
| 184 var _uploadMedia = null; |
| 185 var _uploadOptions = null; |
| 186 var _downloadOptions = common.DownloadOptions.Metadata; |
| 187 var _body = null; |
| 188 |
| 189 if (request != null) { |
| 190 _body = convert.JSON.encode((request).toJson()); |
| 191 } |
| 192 if (projectId == null) { |
| 193 throw new core.ArgumentError("Parameter projectId is required."); |
| 194 } |
| 195 if (region == null) { |
| 196 throw new core.ArgumentError("Parameter region is required."); |
| 197 } |
| 198 |
| 199 |
| 200 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/regions/' + c
ommon_internal.Escaper.ecapeVariable('$region') + '/deployments'; |
| 201 |
| 202 var _response = _requester.request(_url, |
| 203 "POST", |
| 204 body: _body, |
| 205 queryParams: _queryParams, |
| 206 uploadOptions: _uploadOptions, |
| 207 uploadMedia: _uploadMedia, |
| 208 downloadOptions: _downloadOptions); |
| 209 return _response.then((data) => new Deployment.fromJson(data)); |
| 210 } |
| 211 |
| 212 /** |
| 213 * Not documented yet. |
| 214 * |
| 215 * Request parameters: |
| 216 * |
| 217 * [projectId] - null |
| 218 * |
| 219 * [region] - null |
| 220 * |
| 221 * [maxResults] - Maximum count of results to be returned. Acceptable values |
| 222 * are 0 to 100, inclusive. (Default: 50) |
| 223 * Value must be between "0" and "100". |
| 224 * |
| 225 * [pageToken] - Specifies a nextPageToken returned by a previous list |
| 226 * request. This token can be used to request the next page of results from a |
| 227 * previous list request. |
| 228 * |
| 229 * Completes with a [DeploymentsListResponse]. |
| 230 * |
| 231 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 232 * error. |
| 233 * |
| 234 * If the used [http.Client] completes with an error when making a REST call, |
| 235 * this method will complete with the same error. |
| 236 */ |
| 237 async.Future<DeploymentsListResponse> list(core.String projectId, core.String
region, {core.int maxResults, core.String pageToken}) { |
| 238 var _url = null; |
| 239 var _queryParams = new core.Map(); |
| 240 var _uploadMedia = null; |
| 241 var _uploadOptions = null; |
| 242 var _downloadOptions = common.DownloadOptions.Metadata; |
| 243 var _body = null; |
| 244 |
| 245 if (projectId == null) { |
| 246 throw new core.ArgumentError("Parameter projectId is required."); |
| 247 } |
| 248 if (region == null) { |
| 249 throw new core.ArgumentError("Parameter region is required."); |
| 250 } |
| 251 if (maxResults != null) { |
| 252 _queryParams["maxResults"] = ["${maxResults}"]; |
| 253 } |
| 254 if (pageToken != null) { |
| 255 _queryParams["pageToken"] = [pageToken]; |
| 256 } |
| 257 |
| 258 |
| 259 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/regions/' + c
ommon_internal.Escaper.ecapeVariable('$region') + '/deployments'; |
| 260 |
| 261 var _response = _requester.request(_url, |
| 262 "GET", |
| 263 body: _body, |
| 264 queryParams: _queryParams, |
| 265 uploadOptions: _uploadOptions, |
| 266 uploadMedia: _uploadMedia, |
| 267 downloadOptions: _downloadOptions); |
| 268 return _response.then((data) => new DeploymentsListResponse.fromJson(data)); |
| 269 } |
| 270 |
| 271 } |
| 272 |
| 273 |
| 274 /** Not documented yet. */ |
| 275 class TemplatesResourceApi { |
| 276 final common_internal.ApiRequester _requester; |
| 277 |
| 278 TemplatesResourceApi(common_internal.ApiRequester client) : |
| 279 _requester = client; |
| 280 |
| 281 /** |
| 282 * Not documented yet. |
| 283 * |
| 284 * Request parameters: |
| 285 * |
| 286 * [projectId] - null |
| 287 * |
| 288 * [templateName] - null |
| 289 * |
| 290 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 291 * error. |
| 292 * |
| 293 * If the used [http.Client] completes with an error when making a REST call, |
| 294 * this method will complete with the same error. |
| 295 */ |
| 296 async.Future delete(core.String projectId, core.String templateName) { |
| 297 var _url = null; |
| 298 var _queryParams = new core.Map(); |
| 299 var _uploadMedia = null; |
| 300 var _uploadOptions = null; |
| 301 var _downloadOptions = common.DownloadOptions.Metadata; |
| 302 var _body = null; |
| 303 |
| 304 if (projectId == null) { |
| 305 throw new core.ArgumentError("Parameter projectId is required."); |
| 306 } |
| 307 if (templateName == null) { |
| 308 throw new core.ArgumentError("Parameter templateName is required."); |
| 309 } |
| 310 |
| 311 _downloadOptions = null; |
| 312 |
| 313 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/templates/' +
common_internal.Escaper.ecapeVariable('$templateName'); |
| 314 |
| 315 var _response = _requester.request(_url, |
| 316 "DELETE", |
| 317 body: _body, |
| 318 queryParams: _queryParams, |
| 319 uploadOptions: _uploadOptions, |
| 320 uploadMedia: _uploadMedia, |
| 321 downloadOptions: _downloadOptions); |
| 322 return _response.then((data) => null); |
| 323 } |
| 324 |
| 325 /** |
| 326 * Not documented yet. |
| 327 * |
| 328 * Request parameters: |
| 329 * |
| 330 * [projectId] - null |
| 331 * |
| 332 * [templateName] - null |
| 333 * |
| 334 * Completes with a [Template]. |
| 335 * |
| 336 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 337 * error. |
| 338 * |
| 339 * If the used [http.Client] completes with an error when making a REST call, |
| 340 * this method will complete with the same error. |
| 341 */ |
| 342 async.Future<Template> get(core.String projectId, core.String templateName) { |
| 343 var _url = null; |
| 344 var _queryParams = new core.Map(); |
| 345 var _uploadMedia = null; |
| 346 var _uploadOptions = null; |
| 347 var _downloadOptions = common.DownloadOptions.Metadata; |
| 348 var _body = null; |
| 349 |
| 350 if (projectId == null) { |
| 351 throw new core.ArgumentError("Parameter projectId is required."); |
| 352 } |
| 353 if (templateName == null) { |
| 354 throw new core.ArgumentError("Parameter templateName is required."); |
| 355 } |
| 356 |
| 357 |
| 358 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/templates/' +
common_internal.Escaper.ecapeVariable('$templateName'); |
| 359 |
| 360 var _response = _requester.request(_url, |
| 361 "GET", |
| 362 body: _body, |
| 363 queryParams: _queryParams, |
| 364 uploadOptions: _uploadOptions, |
| 365 uploadMedia: _uploadMedia, |
| 366 downloadOptions: _downloadOptions); |
| 367 return _response.then((data) => new Template.fromJson(data)); |
| 368 } |
| 369 |
| 370 /** |
| 371 * Not documented yet. |
| 372 * |
| 373 * [request] - The metadata request object. |
| 374 * |
| 375 * Request parameters: |
| 376 * |
| 377 * [projectId] - null |
| 378 * |
| 379 * Completes with a [Template]. |
| 380 * |
| 381 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 382 * error. |
| 383 * |
| 384 * If the used [http.Client] completes with an error when making a REST call, |
| 385 * this method will complete with the same error. |
| 386 */ |
| 387 async.Future<Template> insert(Template request, core.String projectId) { |
| 388 var _url = null; |
| 389 var _queryParams = new core.Map(); |
| 390 var _uploadMedia = null; |
| 391 var _uploadOptions = null; |
| 392 var _downloadOptions = common.DownloadOptions.Metadata; |
| 393 var _body = null; |
| 394 |
| 395 if (request != null) { |
| 396 _body = convert.JSON.encode((request).toJson()); |
| 397 } |
| 398 if (projectId == null) { |
| 399 throw new core.ArgumentError("Parameter projectId is required."); |
| 400 } |
| 401 |
| 402 |
| 403 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/templates'; |
| 404 |
| 405 var _response = _requester.request(_url, |
| 406 "POST", |
| 407 body: _body, |
| 408 queryParams: _queryParams, |
| 409 uploadOptions: _uploadOptions, |
| 410 uploadMedia: _uploadMedia, |
| 411 downloadOptions: _downloadOptions); |
| 412 return _response.then((data) => new Template.fromJson(data)); |
| 413 } |
| 414 |
| 415 /** |
| 416 * Not documented yet. |
| 417 * |
| 418 * Request parameters: |
| 419 * |
| 420 * [projectId] - null |
| 421 * |
| 422 * [maxResults] - Maximum count of results to be returned. Acceptable values |
| 423 * are 0 to 100, inclusive. (Default: 50) |
| 424 * Value must be between "0" and "100". |
| 425 * |
| 426 * [pageToken] - Specifies a nextPageToken returned by a previous list |
| 427 * request. This token can be used to request the next page of results from a |
| 428 * previous list request. |
| 429 * |
| 430 * Completes with a [TemplatesListResponse]. |
| 431 * |
| 432 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 433 * error. |
| 434 * |
| 435 * If the used [http.Client] completes with an error when making a REST call, |
| 436 * this method will complete with the same error. |
| 437 */ |
| 438 async.Future<TemplatesListResponse> list(core.String projectId, {core.int maxR
esults, core.String pageToken}) { |
| 439 var _url = null; |
| 440 var _queryParams = new core.Map(); |
| 441 var _uploadMedia = null; |
| 442 var _uploadOptions = null; |
| 443 var _downloadOptions = common.DownloadOptions.Metadata; |
| 444 var _body = null; |
| 445 |
| 446 if (projectId == null) { |
| 447 throw new core.ArgumentError("Parameter projectId is required."); |
| 448 } |
| 449 if (maxResults != null) { |
| 450 _queryParams["maxResults"] = ["${maxResults}"]; |
| 451 } |
| 452 if (pageToken != null) { |
| 453 _queryParams["pageToken"] = [pageToken]; |
| 454 } |
| 455 |
| 456 |
| 457 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/templates'; |
| 458 |
| 459 var _response = _requester.request(_url, |
| 460 "GET", |
| 461 body: _body, |
| 462 queryParams: _queryParams, |
| 463 uploadOptions: _uploadOptions, |
| 464 uploadMedia: _uploadMedia, |
| 465 downloadOptions: _downloadOptions); |
| 466 return _response.then((data) => new TemplatesListResponse.fromJson(data)); |
| 467 } |
| 468 |
| 469 } |
| 470 |
| 471 |
| 472 |
| 473 /** |
| 474 * A Compute Engine network accessConfig. Identical to the accessConfig on |
| 475 * corresponding Compute Engine resource. |
| 476 */ |
| 477 class AccessConfig { |
| 478 /** Name of this access configuration. */ |
| 479 core.String name; |
| 480 |
| 481 /** An external IP address associated with this instance. */ |
| 482 core.String natIp; |
| 483 |
| 484 /** |
| 485 * Type of this access configuration file. (Currently only ONE_TO_ONE_NAT is |
| 486 * legal.) |
| 487 */ |
| 488 core.String type; |
| 489 |
| 490 |
| 491 AccessConfig(); |
| 492 |
| 493 AccessConfig.fromJson(core.Map _json) { |
| 494 if (_json.containsKey("name")) { |
| 495 name = _json["name"]; |
| 496 } |
| 497 if (_json.containsKey("natIp")) { |
| 498 natIp = _json["natIp"]; |
| 499 } |
| 500 if (_json.containsKey("type")) { |
| 501 type = _json["type"]; |
| 502 } |
| 503 } |
| 504 |
| 505 core.Map toJson() { |
| 506 var _json = new core.Map(); |
| 507 if (name != null) { |
| 508 _json["name"] = name; |
| 509 } |
| 510 if (natIp != null) { |
| 511 _json["natIp"] = natIp; |
| 512 } |
| 513 if (type != null) { |
| 514 _json["type"] = type; |
| 515 } |
| 516 return _json; |
| 517 } |
| 518 } |
| 519 |
| 520 |
| 521 /** |
| 522 * An Action encapsulates a set of commands as a single runnable module with |
| 523 * additional information needed during run-time. |
| 524 */ |
| 525 class Action { |
| 526 /** A list of commands to run sequentially for this action. */ |
| 527 core.List<core.String> commands; |
| 528 |
| 529 /** The timeout in milliseconds for this action to run. */ |
| 530 core.int timeoutMs; |
| 531 |
| 532 |
| 533 Action(); |
| 534 |
| 535 Action.fromJson(core.Map _json) { |
| 536 if (_json.containsKey("commands")) { |
| 537 commands = _json["commands"]; |
| 538 } |
| 539 if (_json.containsKey("timeoutMs")) { |
| 540 timeoutMs = _json["timeoutMs"]; |
| 541 } |
| 542 } |
| 543 |
| 544 core.Map toJson() { |
| 545 var _json = new core.Map(); |
| 546 if (commands != null) { |
| 547 _json["commands"] = commands; |
| 548 } |
| 549 if (timeoutMs != null) { |
| 550 _json["timeoutMs"] = timeoutMs; |
| 551 } |
| 552 return _json; |
| 553 } |
| 554 } |
| 555 |
| 556 |
| 557 /** An allowed port resource. */ |
| 558 class AllowedRule { |
| 559 /** ?tcp?, ?udp? or ?icmp? */ |
| 560 core.String IPProtocol; |
| 561 |
| 562 /** |
| 563 * List of ports or port ranges (Example inputs include: ["22"], [?33?, |
| 564 * "12345-12349"]. |
| 565 */ |
| 566 core.List<core.String> ports; |
| 567 |
| 568 |
| 569 AllowedRule(); |
| 570 |
| 571 AllowedRule.fromJson(core.Map _json) { |
| 572 if (_json.containsKey("IPProtocol")) { |
| 573 IPProtocol = _json["IPProtocol"]; |
| 574 } |
| 575 if (_json.containsKey("ports")) { |
| 576 ports = _json["ports"]; |
| 577 } |
| 578 } |
| 579 |
| 580 core.Map toJson() { |
| 581 var _json = new core.Map(); |
| 582 if (IPProtocol != null) { |
| 583 _json["IPProtocol"] = IPProtocol; |
| 584 } |
| 585 if (ports != null) { |
| 586 _json["ports"] = ports; |
| 587 } |
| 588 return _json; |
| 589 } |
| 590 } |
| 591 |
| 592 |
| 593 /** Not documented yet. */ |
| 594 class AutoscalingModule { |
| 595 /** Not documented yet. */ |
| 596 core.int coolDownPeriodSec; |
| 597 |
| 598 /** Not documented yet. */ |
| 599 core.String description; |
| 600 |
| 601 /** Not documented yet. */ |
| 602 core.int maxNumReplicas; |
| 603 |
| 604 /** Not documented yet. */ |
| 605 core.int minNumReplicas; |
| 606 |
| 607 /** Not documented yet. */ |
| 608 core.String signalType; |
| 609 |
| 610 /** Not documented yet. */ |
| 611 core.String targetModule; |
| 612 |
| 613 /** target_utilization should be in range [0,1]. */ |
| 614 core.double targetUtilization; |
| 615 |
| 616 |
| 617 AutoscalingModule(); |
| 618 |
| 619 AutoscalingModule.fromJson(core.Map _json) { |
| 620 if (_json.containsKey("coolDownPeriodSec")) { |
| 621 coolDownPeriodSec = _json["coolDownPeriodSec"]; |
| 622 } |
| 623 if (_json.containsKey("description")) { |
| 624 description = _json["description"]; |
| 625 } |
| 626 if (_json.containsKey("maxNumReplicas")) { |
| 627 maxNumReplicas = _json["maxNumReplicas"]; |
| 628 } |
| 629 if (_json.containsKey("minNumReplicas")) { |
| 630 minNumReplicas = _json["minNumReplicas"]; |
| 631 } |
| 632 if (_json.containsKey("signalType")) { |
| 633 signalType = _json["signalType"]; |
| 634 } |
| 635 if (_json.containsKey("targetModule")) { |
| 636 targetModule = _json["targetModule"]; |
| 637 } |
| 638 if (_json.containsKey("targetUtilization")) { |
| 639 targetUtilization = _json["targetUtilization"]; |
| 640 } |
| 641 } |
| 642 |
| 643 core.Map toJson() { |
| 644 var _json = new core.Map(); |
| 645 if (coolDownPeriodSec != null) { |
| 646 _json["coolDownPeriodSec"] = coolDownPeriodSec; |
| 647 } |
| 648 if (description != null) { |
| 649 _json["description"] = description; |
| 650 } |
| 651 if (maxNumReplicas != null) { |
| 652 _json["maxNumReplicas"] = maxNumReplicas; |
| 653 } |
| 654 if (minNumReplicas != null) { |
| 655 _json["minNumReplicas"] = minNumReplicas; |
| 656 } |
| 657 if (signalType != null) { |
| 658 _json["signalType"] = signalType; |
| 659 } |
| 660 if (targetModule != null) { |
| 661 _json["targetModule"] = targetModule; |
| 662 } |
| 663 if (targetUtilization != null) { |
| 664 _json["targetUtilization"] = targetUtilization; |
| 665 } |
| 666 return _json; |
| 667 } |
| 668 } |
| 669 |
| 670 |
| 671 /** Not documented yet. */ |
| 672 class AutoscalingModuleStatus { |
| 673 /** [Output Only] The URL of the corresponding Autoscaling configuration. */ |
| 674 core.String autoscalingConfigUrl; |
| 675 |
| 676 |
| 677 AutoscalingModuleStatus(); |
| 678 |
| 679 AutoscalingModuleStatus.fromJson(core.Map _json) { |
| 680 if (_json.containsKey("autoscalingConfigUrl")) { |
| 681 autoscalingConfigUrl = _json["autoscalingConfigUrl"]; |
| 682 } |
| 683 } |
| 684 |
| 685 core.Map toJson() { |
| 686 var _json = new core.Map(); |
| 687 if (autoscalingConfigUrl != null) { |
| 688 _json["autoscalingConfigUrl"] = autoscalingConfigUrl; |
| 689 } |
| 690 return _json; |
| 691 } |
| 692 } |
| 693 |
| 694 |
| 695 /** [Output Only] The current state of a replica or module. */ |
| 696 class DeployState { |
| 697 /** [Output Only] Human readable details about the current state. */ |
| 698 core.String details; |
| 699 |
| 700 /** |
| 701 * [Output Only] The status of the deployment. Possible values include: |
| 702 * - UNKNOWN |
| 703 * - DEPLOYING |
| 704 * - DEPLOYED |
| 705 * - DEPLOYMENT_FAILED |
| 706 * - DELETING |
| 707 * - DELETED |
| 708 * - DELETE_FAILED |
| 709 */ |
| 710 core.String status; |
| 711 |
| 712 |
| 713 DeployState(); |
| 714 |
| 715 DeployState.fromJson(core.Map _json) { |
| 716 if (_json.containsKey("details")) { |
| 717 details = _json["details"]; |
| 718 } |
| 719 if (_json.containsKey("status")) { |
| 720 status = _json["status"]; |
| 721 } |
| 722 } |
| 723 |
| 724 core.Map toJson() { |
| 725 var _json = new core.Map(); |
| 726 if (details != null) { |
| 727 _json["details"] = details; |
| 728 } |
| 729 if (status != null) { |
| 730 _json["status"] = status; |
| 731 } |
| 732 return _json; |
| 733 } |
| 734 } |
| 735 |
| 736 |
| 737 /** A deployment represents a physical instantiation of a Template. */ |
| 738 class Deployment { |
| 739 /** [Output Only] The time when this deployment was created. */ |
| 740 core.String creationDate; |
| 741 |
| 742 /** A user-supplied description of this Deployment. */ |
| 743 core.String description; |
| 744 |
| 745 /** [Output Only] List of status for the modules in this deployment. */ |
| 746 core.Map<core.String, ModuleStatus> modules; |
| 747 |
| 748 /** |
| 749 * Name of this deployment. The name must conform to the following regular |
| 750 * expression: [a-zA-Z0-9-_]{1,64} |
| 751 */ |
| 752 core.String name; |
| 753 |
| 754 /** |
| 755 * The set of parameter overrides to apply to the corresponding Template |
| 756 * before deploying. |
| 757 */ |
| 758 core.List<ParamOverride> overrides; |
| 759 |
| 760 /** [Output Only] Current status of this deployment. */ |
| 761 DeployState state; |
| 762 |
| 763 /** The name of the Template on which this deployment is based. */ |
| 764 core.String templateName; |
| 765 |
| 766 |
| 767 Deployment(); |
| 768 |
| 769 Deployment.fromJson(core.Map _json) { |
| 770 if (_json.containsKey("creationDate")) { |
| 771 creationDate = _json["creationDate"]; |
| 772 } |
| 773 if (_json.containsKey("description")) { |
| 774 description = _json["description"]; |
| 775 } |
| 776 if (_json.containsKey("modules")) { |
| 777 modules = common_internal.mapMap(_json["modules"], (item) => new ModuleSta
tus.fromJson(item)); |
| 778 } |
| 779 if (_json.containsKey("name")) { |
| 780 name = _json["name"]; |
| 781 } |
| 782 if (_json.containsKey("overrides")) { |
| 783 overrides = _json["overrides"].map((value) => new ParamOverride.fromJson(v
alue)).toList(); |
| 784 } |
| 785 if (_json.containsKey("state")) { |
| 786 state = new DeployState.fromJson(_json["state"]); |
| 787 } |
| 788 if (_json.containsKey("templateName")) { |
| 789 templateName = _json["templateName"]; |
| 790 } |
| 791 } |
| 792 |
| 793 core.Map toJson() { |
| 794 var _json = new core.Map(); |
| 795 if (creationDate != null) { |
| 796 _json["creationDate"] = creationDate; |
| 797 } |
| 798 if (description != null) { |
| 799 _json["description"] = description; |
| 800 } |
| 801 if (modules != null) { |
| 802 _json["modules"] = common_internal.mapMap(modules, (item) => (item).toJson
()); |
| 803 } |
| 804 if (name != null) { |
| 805 _json["name"] = name; |
| 806 } |
| 807 if (overrides != null) { |
| 808 _json["overrides"] = overrides.map((value) => (value).toJson()).toList(); |
| 809 } |
| 810 if (state != null) { |
| 811 _json["state"] = (state).toJson(); |
| 812 } |
| 813 if (templateName != null) { |
| 814 _json["templateName"] = templateName; |
| 815 } |
| 816 return _json; |
| 817 } |
| 818 } |
| 819 |
| 820 |
| 821 /** Not documented yet. */ |
| 822 class DeploymentsListResponse { |
| 823 /** Not documented yet. */ |
| 824 core.String nextPageToken; |
| 825 |
| 826 /** Not documented yet. */ |
| 827 core.List<Deployment> resources; |
| 828 |
| 829 |
| 830 DeploymentsListResponse(); |
| 831 |
| 832 DeploymentsListResponse.fromJson(core.Map _json) { |
| 833 if (_json.containsKey("nextPageToken")) { |
| 834 nextPageToken = _json["nextPageToken"]; |
| 835 } |
| 836 if (_json.containsKey("resources")) { |
| 837 resources = _json["resources"].map((value) => new Deployment.fromJson(valu
e)).toList(); |
| 838 } |
| 839 } |
| 840 |
| 841 core.Map toJson() { |
| 842 var _json = new core.Map(); |
| 843 if (nextPageToken != null) { |
| 844 _json["nextPageToken"] = nextPageToken; |
| 845 } |
| 846 if (resources != null) { |
| 847 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 848 } |
| 849 return _json; |
| 850 } |
| 851 } |
| 852 |
| 853 |
| 854 /** How to attach a disk to a Replica. */ |
| 855 class DiskAttachment { |
| 856 /** The device name of this disk. */ |
| 857 core.String deviceName; |
| 858 |
| 859 /** |
| 860 * A zero-based index to assign to this disk, where 0 is reserved for the boot |
| 861 * disk. If not specified, this is assigned by the server. |
| 862 */ |
| 863 core.int index; |
| 864 |
| 865 |
| 866 DiskAttachment(); |
| 867 |
| 868 DiskAttachment.fromJson(core.Map _json) { |
| 869 if (_json.containsKey("deviceName")) { |
| 870 deviceName = _json["deviceName"]; |
| 871 } |
| 872 if (_json.containsKey("index")) { |
| 873 index = _json["index"]; |
| 874 } |
| 875 } |
| 876 |
| 877 core.Map toJson() { |
| 878 var _json = new core.Map(); |
| 879 if (deviceName != null) { |
| 880 _json["deviceName"] = deviceName; |
| 881 } |
| 882 if (index != null) { |
| 883 _json["index"] = index; |
| 884 } |
| 885 return _json; |
| 886 } |
| 887 } |
| 888 |
| 889 |
| 890 /** An environment variable. */ |
| 891 class EnvVariable { |
| 892 /** Whether this variable is hidden or visible. */ |
| 893 core.bool hidden; |
| 894 |
| 895 /** Value of the environment variable. */ |
| 896 core.String value; |
| 897 |
| 898 |
| 899 EnvVariable(); |
| 900 |
| 901 EnvVariable.fromJson(core.Map _json) { |
| 902 if (_json.containsKey("hidden")) { |
| 903 hidden = _json["hidden"]; |
| 904 } |
| 905 if (_json.containsKey("value")) { |
| 906 value = _json["value"]; |
| 907 } |
| 908 } |
| 909 |
| 910 core.Map toJson() { |
| 911 var _json = new core.Map(); |
| 912 if (hidden != null) { |
| 913 _json["hidden"] = hidden; |
| 914 } |
| 915 if (value != null) { |
| 916 _json["value"] = value; |
| 917 } |
| 918 return _json; |
| 919 } |
| 920 } |
| 921 |
| 922 |
| 923 /** |
| 924 * A pre-existing persistent disk that will be attached to every Replica in the |
| 925 * Pool. |
| 926 */ |
| 927 class ExistingDisk { |
| 928 /** Optional. How the disk will be attached to the Replica. */ |
| 929 DiskAttachment attachment; |
| 930 |
| 931 /** |
| 932 * The fully-qualified URL of the Persistent Disk resource. It must be in the |
| 933 * same zone as the Pool. |
| 934 */ |
| 935 core.String source; |
| 936 |
| 937 |
| 938 ExistingDisk(); |
| 939 |
| 940 ExistingDisk.fromJson(core.Map _json) { |
| 941 if (_json.containsKey("attachment")) { |
| 942 attachment = new DiskAttachment.fromJson(_json["attachment"]); |
| 943 } |
| 944 if (_json.containsKey("source")) { |
| 945 source = _json["source"]; |
| 946 } |
| 947 } |
| 948 |
| 949 core.Map toJson() { |
| 950 var _json = new core.Map(); |
| 951 if (attachment != null) { |
| 952 _json["attachment"] = (attachment).toJson(); |
| 953 } |
| 954 if (source != null) { |
| 955 _json["source"] = source; |
| 956 } |
| 957 return _json; |
| 958 } |
| 959 } |
| 960 |
| 961 |
| 962 /** A Firewall resource */ |
| 963 class FirewallModule { |
| 964 /** The allowed ports or port ranges. */ |
| 965 core.List<AllowedRule> allowed; |
| 966 |
| 967 /** The description of the firewall (optional) */ |
| 968 core.String description; |
| 969 |
| 970 /** |
| 971 * The NetworkModule to which this firewall should apply. If not specified, or |
| 972 * if specified as 'default', this firewall will be applied to the 'default' |
| 973 * network. |
| 974 */ |
| 975 core.String network; |
| 976 |
| 977 /** |
| 978 * Source IP ranges to apply this firewall to, see the GCE Spec for details on |
| 979 * syntax |
| 980 */ |
| 981 core.List<core.String> sourceRanges; |
| 982 |
| 983 /** |
| 984 * Source Tags to apply this firewall to, see the GCE Spec for details on |
| 985 * syntax |
| 986 */ |
| 987 core.List<core.String> sourceTags; |
| 988 |
| 989 /** |
| 990 * Target Tags to apply this firewall to, see the GCE Spec for details on |
| 991 * syntax |
| 992 */ |
| 993 core.List<core.String> targetTags; |
| 994 |
| 995 |
| 996 FirewallModule(); |
| 997 |
| 998 FirewallModule.fromJson(core.Map _json) { |
| 999 if (_json.containsKey("allowed")) { |
| 1000 allowed = _json["allowed"].map((value) => new AllowedRule.fromJson(value))
.toList(); |
| 1001 } |
| 1002 if (_json.containsKey("description")) { |
| 1003 description = _json["description"]; |
| 1004 } |
| 1005 if (_json.containsKey("network")) { |
| 1006 network = _json["network"]; |
| 1007 } |
| 1008 if (_json.containsKey("sourceRanges")) { |
| 1009 sourceRanges = _json["sourceRanges"]; |
| 1010 } |
| 1011 if (_json.containsKey("sourceTags")) { |
| 1012 sourceTags = _json["sourceTags"]; |
| 1013 } |
| 1014 if (_json.containsKey("targetTags")) { |
| 1015 targetTags = _json["targetTags"]; |
| 1016 } |
| 1017 } |
| 1018 |
| 1019 core.Map toJson() { |
| 1020 var _json = new core.Map(); |
| 1021 if (allowed != null) { |
| 1022 _json["allowed"] = allowed.map((value) => (value).toJson()).toList(); |
| 1023 } |
| 1024 if (description != null) { |
| 1025 _json["description"] = description; |
| 1026 } |
| 1027 if (network != null) { |
| 1028 _json["network"] = network; |
| 1029 } |
| 1030 if (sourceRanges != null) { |
| 1031 _json["sourceRanges"] = sourceRanges; |
| 1032 } |
| 1033 if (sourceTags != null) { |
| 1034 _json["sourceTags"] = sourceTags; |
| 1035 } |
| 1036 if (targetTags != null) { |
| 1037 _json["targetTags"] = targetTags; |
| 1038 } |
| 1039 return _json; |
| 1040 } |
| 1041 } |
| 1042 |
| 1043 |
| 1044 /** Not documented yet. */ |
| 1045 class FirewallModuleStatus { |
| 1046 /** [Output Only] The URL of the corresponding Firewall resource. */ |
| 1047 core.String firewallUrl; |
| 1048 |
| 1049 |
| 1050 FirewallModuleStatus(); |
| 1051 |
| 1052 FirewallModuleStatus.fromJson(core.Map _json) { |
| 1053 if (_json.containsKey("firewallUrl")) { |
| 1054 firewallUrl = _json["firewallUrl"]; |
| 1055 } |
| 1056 } |
| 1057 |
| 1058 core.Map toJson() { |
| 1059 var _json = new core.Map(); |
| 1060 if (firewallUrl != null) { |
| 1061 _json["firewallUrl"] = firewallUrl; |
| 1062 } |
| 1063 return _json; |
| 1064 } |
| 1065 } |
| 1066 |
| 1067 |
| 1068 /** Not documented yet. */ |
| 1069 class HealthCheckModule { |
| 1070 /** Not documented yet. */ |
| 1071 core.int checkIntervalSec; |
| 1072 |
| 1073 /** Not documented yet. */ |
| 1074 core.String description; |
| 1075 |
| 1076 /** Not documented yet. */ |
| 1077 core.int healthyThreshold; |
| 1078 |
| 1079 /** Not documented yet. */ |
| 1080 core.String host; |
| 1081 |
| 1082 /** Not documented yet. */ |
| 1083 core.String path; |
| 1084 |
| 1085 /** Not documented yet. */ |
| 1086 core.int port; |
| 1087 |
| 1088 /** Not documented yet. */ |
| 1089 core.int timeoutSec; |
| 1090 |
| 1091 /** Not documented yet. */ |
| 1092 core.int unhealthyThreshold; |
| 1093 |
| 1094 |
| 1095 HealthCheckModule(); |
| 1096 |
| 1097 HealthCheckModule.fromJson(core.Map _json) { |
| 1098 if (_json.containsKey("checkIntervalSec")) { |
| 1099 checkIntervalSec = _json["checkIntervalSec"]; |
| 1100 } |
| 1101 if (_json.containsKey("description")) { |
| 1102 description = _json["description"]; |
| 1103 } |
| 1104 if (_json.containsKey("healthyThreshold")) { |
| 1105 healthyThreshold = _json["healthyThreshold"]; |
| 1106 } |
| 1107 if (_json.containsKey("host")) { |
| 1108 host = _json["host"]; |
| 1109 } |
| 1110 if (_json.containsKey("path")) { |
| 1111 path = _json["path"]; |
| 1112 } |
| 1113 if (_json.containsKey("port")) { |
| 1114 port = _json["port"]; |
| 1115 } |
| 1116 if (_json.containsKey("timeoutSec")) { |
| 1117 timeoutSec = _json["timeoutSec"]; |
| 1118 } |
| 1119 if (_json.containsKey("unhealthyThreshold")) { |
| 1120 unhealthyThreshold = _json["unhealthyThreshold"]; |
| 1121 } |
| 1122 } |
| 1123 |
| 1124 core.Map toJson() { |
| 1125 var _json = new core.Map(); |
| 1126 if (checkIntervalSec != null) { |
| 1127 _json["checkIntervalSec"] = checkIntervalSec; |
| 1128 } |
| 1129 if (description != null) { |
| 1130 _json["description"] = description; |
| 1131 } |
| 1132 if (healthyThreshold != null) { |
| 1133 _json["healthyThreshold"] = healthyThreshold; |
| 1134 } |
| 1135 if (host != null) { |
| 1136 _json["host"] = host; |
| 1137 } |
| 1138 if (path != null) { |
| 1139 _json["path"] = path; |
| 1140 } |
| 1141 if (port != null) { |
| 1142 _json["port"] = port; |
| 1143 } |
| 1144 if (timeoutSec != null) { |
| 1145 _json["timeoutSec"] = timeoutSec; |
| 1146 } |
| 1147 if (unhealthyThreshold != null) { |
| 1148 _json["unhealthyThreshold"] = unhealthyThreshold; |
| 1149 } |
| 1150 return _json; |
| 1151 } |
| 1152 } |
| 1153 |
| 1154 |
| 1155 /** Not documented yet. */ |
| 1156 class HealthCheckModuleStatus { |
| 1157 /** [Output Only] The HealthCheck URL. */ |
| 1158 core.String healthCheckUrl; |
| 1159 |
| 1160 |
| 1161 HealthCheckModuleStatus(); |
| 1162 |
| 1163 HealthCheckModuleStatus.fromJson(core.Map _json) { |
| 1164 if (_json.containsKey("healthCheckUrl")) { |
| 1165 healthCheckUrl = _json["healthCheckUrl"]; |
| 1166 } |
| 1167 } |
| 1168 |
| 1169 core.Map toJson() { |
| 1170 var _json = new core.Map(); |
| 1171 if (healthCheckUrl != null) { |
| 1172 _json["healthCheckUrl"] = healthCheckUrl; |
| 1173 } |
| 1174 return _json; |
| 1175 } |
| 1176 } |
| 1177 |
| 1178 |
| 1179 /** Not documented yet. */ |
| 1180 class LbModule { |
| 1181 /** Not documented yet. */ |
| 1182 core.String description; |
| 1183 |
| 1184 /** Not documented yet. */ |
| 1185 core.List<core.String> healthChecks; |
| 1186 |
| 1187 /** Not documented yet. */ |
| 1188 core.String ipAddress; |
| 1189 |
| 1190 /** Not documented yet. */ |
| 1191 core.String ipProtocol; |
| 1192 |
| 1193 /** Not documented yet. */ |
| 1194 core.String portRange; |
| 1195 |
| 1196 /** Not documented yet. */ |
| 1197 core.String sessionAffinity; |
| 1198 |
| 1199 /** Not documented yet. */ |
| 1200 core.List<core.String> targetModules; |
| 1201 |
| 1202 |
| 1203 LbModule(); |
| 1204 |
| 1205 LbModule.fromJson(core.Map _json) { |
| 1206 if (_json.containsKey("description")) { |
| 1207 description = _json["description"]; |
| 1208 } |
| 1209 if (_json.containsKey("healthChecks")) { |
| 1210 healthChecks = _json["healthChecks"]; |
| 1211 } |
| 1212 if (_json.containsKey("ipAddress")) { |
| 1213 ipAddress = _json["ipAddress"]; |
| 1214 } |
| 1215 if (_json.containsKey("ipProtocol")) { |
| 1216 ipProtocol = _json["ipProtocol"]; |
| 1217 } |
| 1218 if (_json.containsKey("portRange")) { |
| 1219 portRange = _json["portRange"]; |
| 1220 } |
| 1221 if (_json.containsKey("sessionAffinity")) { |
| 1222 sessionAffinity = _json["sessionAffinity"]; |
| 1223 } |
| 1224 if (_json.containsKey("targetModules")) { |
| 1225 targetModules = _json["targetModules"]; |
| 1226 } |
| 1227 } |
| 1228 |
| 1229 core.Map toJson() { |
| 1230 var _json = new core.Map(); |
| 1231 if (description != null) { |
| 1232 _json["description"] = description; |
| 1233 } |
| 1234 if (healthChecks != null) { |
| 1235 _json["healthChecks"] = healthChecks; |
| 1236 } |
| 1237 if (ipAddress != null) { |
| 1238 _json["ipAddress"] = ipAddress; |
| 1239 } |
| 1240 if (ipProtocol != null) { |
| 1241 _json["ipProtocol"] = ipProtocol; |
| 1242 } |
| 1243 if (portRange != null) { |
| 1244 _json["portRange"] = portRange; |
| 1245 } |
| 1246 if (sessionAffinity != null) { |
| 1247 _json["sessionAffinity"] = sessionAffinity; |
| 1248 } |
| 1249 if (targetModules != null) { |
| 1250 _json["targetModules"] = targetModules; |
| 1251 } |
| 1252 return _json; |
| 1253 } |
| 1254 } |
| 1255 |
| 1256 |
| 1257 /** Not documented yet. */ |
| 1258 class LbModuleStatus { |
| 1259 /** [Output Only] The URL of the corresponding ForwardingRule in GCE. */ |
| 1260 core.String forwardingRuleUrl; |
| 1261 |
| 1262 /** [Output Only] The URL of the corresponding TargetPool resource in GCE. */ |
| 1263 core.String targetPoolUrl; |
| 1264 |
| 1265 |
| 1266 LbModuleStatus(); |
| 1267 |
| 1268 LbModuleStatus.fromJson(core.Map _json) { |
| 1269 if (_json.containsKey("forwardingRuleUrl")) { |
| 1270 forwardingRuleUrl = _json["forwardingRuleUrl"]; |
| 1271 } |
| 1272 if (_json.containsKey("targetPoolUrl")) { |
| 1273 targetPoolUrl = _json["targetPoolUrl"]; |
| 1274 } |
| 1275 } |
| 1276 |
| 1277 core.Map toJson() { |
| 1278 var _json = new core.Map(); |
| 1279 if (forwardingRuleUrl != null) { |
| 1280 _json["forwardingRuleUrl"] = forwardingRuleUrl; |
| 1281 } |
| 1282 if (targetPoolUrl != null) { |
| 1283 _json["targetPoolUrl"] = targetPoolUrl; |
| 1284 } |
| 1285 return _json; |
| 1286 } |
| 1287 } |
| 1288 |
| 1289 |
| 1290 /** |
| 1291 * A Compute Engine metadata entry. Identical to the metadata on the |
| 1292 * corresponding Compute Engine resource. |
| 1293 */ |
| 1294 class Metadata { |
| 1295 /** The fingerprint of the metadata. */ |
| 1296 core.String fingerPrint; |
| 1297 |
| 1298 /** A list of metadata items. */ |
| 1299 core.List<MetadataItem> items; |
| 1300 |
| 1301 |
| 1302 Metadata(); |
| 1303 |
| 1304 Metadata.fromJson(core.Map _json) { |
| 1305 if (_json.containsKey("fingerPrint")) { |
| 1306 fingerPrint = _json["fingerPrint"]; |
| 1307 } |
| 1308 if (_json.containsKey("items")) { |
| 1309 items = _json["items"].map((value) => new MetadataItem.fromJson(value)).to
List(); |
| 1310 } |
| 1311 } |
| 1312 |
| 1313 core.Map toJson() { |
| 1314 var _json = new core.Map(); |
| 1315 if (fingerPrint != null) { |
| 1316 _json["fingerPrint"] = fingerPrint; |
| 1317 } |
| 1318 if (items != null) { |
| 1319 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1320 } |
| 1321 return _json; |
| 1322 } |
| 1323 } |
| 1324 |
| 1325 |
| 1326 /** |
| 1327 * A Compute Engine metadata item, defined as a key:value pair. Identical to the |
| 1328 * metadata on the corresponding Compute Engine resource. |
| 1329 */ |
| 1330 class MetadataItem { |
| 1331 /** A metadata key. */ |
| 1332 core.String key; |
| 1333 |
| 1334 /** A metadata value. */ |
| 1335 core.String value; |
| 1336 |
| 1337 |
| 1338 MetadataItem(); |
| 1339 |
| 1340 MetadataItem.fromJson(core.Map _json) { |
| 1341 if (_json.containsKey("key")) { |
| 1342 key = _json["key"]; |
| 1343 } |
| 1344 if (_json.containsKey("value")) { |
| 1345 value = _json["value"]; |
| 1346 } |
| 1347 } |
| 1348 |
| 1349 core.Map toJson() { |
| 1350 var _json = new core.Map(); |
| 1351 if (key != null) { |
| 1352 _json["key"] = key; |
| 1353 } |
| 1354 if (value != null) { |
| 1355 _json["value"] = value; |
| 1356 } |
| 1357 return _json; |
| 1358 } |
| 1359 } |
| 1360 |
| 1361 |
| 1362 /** |
| 1363 * A module in a configuration. A module represents a single homogeneous, |
| 1364 * possibly replicated task. |
| 1365 */ |
| 1366 class Module { |
| 1367 /** Not documented yet. */ |
| 1368 AutoscalingModule autoscalingModule; |
| 1369 |
| 1370 /** Not documented yet. */ |
| 1371 FirewallModule firewallModule; |
| 1372 |
| 1373 /** Not documented yet. */ |
| 1374 HealthCheckModule healthCheckModule; |
| 1375 |
| 1376 /** Not documented yet. */ |
| 1377 LbModule lbModule; |
| 1378 |
| 1379 /** Not documented yet. */ |
| 1380 NetworkModule networkModule; |
| 1381 |
| 1382 /** Not documented yet. */ |
| 1383 ReplicaPoolModule replicaPoolModule; |
| 1384 |
| 1385 /** |
| 1386 * The type of this module. Valid values ("AUTOSCALING", "FIREWALL", |
| 1387 * "HEALTH_CHECK", "LOAD_BALANCING", "NETWORK", "REPLICA_POOL") |
| 1388 */ |
| 1389 core.String type; |
| 1390 |
| 1391 |
| 1392 Module(); |
| 1393 |
| 1394 Module.fromJson(core.Map _json) { |
| 1395 if (_json.containsKey("autoscalingModule")) { |
| 1396 autoscalingModule = new AutoscalingModule.fromJson(_json["autoscalingModul
e"]); |
| 1397 } |
| 1398 if (_json.containsKey("firewallModule")) { |
| 1399 firewallModule = new FirewallModule.fromJson(_json["firewallModule"]); |
| 1400 } |
| 1401 if (_json.containsKey("healthCheckModule")) { |
| 1402 healthCheckModule = new HealthCheckModule.fromJson(_json["healthCheckModul
e"]); |
| 1403 } |
| 1404 if (_json.containsKey("lbModule")) { |
| 1405 lbModule = new LbModule.fromJson(_json["lbModule"]); |
| 1406 } |
| 1407 if (_json.containsKey("networkModule")) { |
| 1408 networkModule = new NetworkModule.fromJson(_json["networkModule"]); |
| 1409 } |
| 1410 if (_json.containsKey("replicaPoolModule")) { |
| 1411 replicaPoolModule = new ReplicaPoolModule.fromJson(_json["replicaPoolModul
e"]); |
| 1412 } |
| 1413 if (_json.containsKey("type")) { |
| 1414 type = _json["type"]; |
| 1415 } |
| 1416 } |
| 1417 |
| 1418 core.Map toJson() { |
| 1419 var _json = new core.Map(); |
| 1420 if (autoscalingModule != null) { |
| 1421 _json["autoscalingModule"] = (autoscalingModule).toJson(); |
| 1422 } |
| 1423 if (firewallModule != null) { |
| 1424 _json["firewallModule"] = (firewallModule).toJson(); |
| 1425 } |
| 1426 if (healthCheckModule != null) { |
| 1427 _json["healthCheckModule"] = (healthCheckModule).toJson(); |
| 1428 } |
| 1429 if (lbModule != null) { |
| 1430 _json["lbModule"] = (lbModule).toJson(); |
| 1431 } |
| 1432 if (networkModule != null) { |
| 1433 _json["networkModule"] = (networkModule).toJson(); |
| 1434 } |
| 1435 if (replicaPoolModule != null) { |
| 1436 _json["replicaPoolModule"] = (replicaPoolModule).toJson(); |
| 1437 } |
| 1438 if (type != null) { |
| 1439 _json["type"] = type; |
| 1440 } |
| 1441 return _json; |
| 1442 } |
| 1443 } |
| 1444 |
| 1445 |
| 1446 /** [Output Only] Aggregate status for a module. */ |
| 1447 class ModuleStatus { |
| 1448 /** |
| 1449 * [Output Only] The status of the AutoscalingModule, set for type |
| 1450 * AUTOSCALING. |
| 1451 */ |
| 1452 AutoscalingModuleStatus autoscalingModuleStatus; |
| 1453 |
| 1454 /** [Output Only] The status of the FirewallModule, set for type FIREWALL. */ |
| 1455 FirewallModuleStatus firewallModuleStatus; |
| 1456 |
| 1457 /** |
| 1458 * [Output Only] The status of the HealthCheckModule, set for type |
| 1459 * HEALTH_CHECK. |
| 1460 */ |
| 1461 HealthCheckModuleStatus healthCheckModuleStatus; |
| 1462 |
| 1463 /** [Output Only] The status of the LbModule, set for type LOAD_BALANCING. */ |
| 1464 LbModuleStatus lbModuleStatus; |
| 1465 |
| 1466 /** [Output Only] The status of the NetworkModule, set for type NETWORK. */ |
| 1467 NetworkModuleStatus networkModuleStatus; |
| 1468 |
| 1469 /** [Output Only] The status of the ReplicaPoolModule, set for type VM. */ |
| 1470 ReplicaPoolModuleStatus replicaPoolModuleStatus; |
| 1471 |
| 1472 /** [Output Only] The current state of the module. */ |
| 1473 DeployState state; |
| 1474 |
| 1475 /** [Output Only] The type of the module. */ |
| 1476 core.String type; |
| 1477 |
| 1478 |
| 1479 ModuleStatus(); |
| 1480 |
| 1481 ModuleStatus.fromJson(core.Map _json) { |
| 1482 if (_json.containsKey("autoscalingModuleStatus")) { |
| 1483 autoscalingModuleStatus = new AutoscalingModuleStatus.fromJson(_json["auto
scalingModuleStatus"]); |
| 1484 } |
| 1485 if (_json.containsKey("firewallModuleStatus")) { |
| 1486 firewallModuleStatus = new FirewallModuleStatus.fromJson(_json["firewallMo
duleStatus"]); |
| 1487 } |
| 1488 if (_json.containsKey("healthCheckModuleStatus")) { |
| 1489 healthCheckModuleStatus = new HealthCheckModuleStatus.fromJson(_json["heal
thCheckModuleStatus"]); |
| 1490 } |
| 1491 if (_json.containsKey("lbModuleStatus")) { |
| 1492 lbModuleStatus = new LbModuleStatus.fromJson(_json["lbModuleStatus"]); |
| 1493 } |
| 1494 if (_json.containsKey("networkModuleStatus")) { |
| 1495 networkModuleStatus = new NetworkModuleStatus.fromJson(_json["networkModul
eStatus"]); |
| 1496 } |
| 1497 if (_json.containsKey("replicaPoolModuleStatus")) { |
| 1498 replicaPoolModuleStatus = new ReplicaPoolModuleStatus.fromJson(_json["repl
icaPoolModuleStatus"]); |
| 1499 } |
| 1500 if (_json.containsKey("state")) { |
| 1501 state = new DeployState.fromJson(_json["state"]); |
| 1502 } |
| 1503 if (_json.containsKey("type")) { |
| 1504 type = _json["type"]; |
| 1505 } |
| 1506 } |
| 1507 |
| 1508 core.Map toJson() { |
| 1509 var _json = new core.Map(); |
| 1510 if (autoscalingModuleStatus != null) { |
| 1511 _json["autoscalingModuleStatus"] = (autoscalingModuleStatus).toJson(); |
| 1512 } |
| 1513 if (firewallModuleStatus != null) { |
| 1514 _json["firewallModuleStatus"] = (firewallModuleStatus).toJson(); |
| 1515 } |
| 1516 if (healthCheckModuleStatus != null) { |
| 1517 _json["healthCheckModuleStatus"] = (healthCheckModuleStatus).toJson(); |
| 1518 } |
| 1519 if (lbModuleStatus != null) { |
| 1520 _json["lbModuleStatus"] = (lbModuleStatus).toJson(); |
| 1521 } |
| 1522 if (networkModuleStatus != null) { |
| 1523 _json["networkModuleStatus"] = (networkModuleStatus).toJson(); |
| 1524 } |
| 1525 if (replicaPoolModuleStatus != null) { |
| 1526 _json["replicaPoolModuleStatus"] = (replicaPoolModuleStatus).toJson(); |
| 1527 } |
| 1528 if (state != null) { |
| 1529 _json["state"] = (state).toJson(); |
| 1530 } |
| 1531 if (type != null) { |
| 1532 _json["type"] = type; |
| 1533 } |
| 1534 return _json; |
| 1535 } |
| 1536 } |
| 1537 |
| 1538 |
| 1539 /** |
| 1540 * A Compute Engine NetworkInterface resource. Identical to the NetworkInterface |
| 1541 * on the corresponding Compute Engine resource. |
| 1542 */ |
| 1543 class NetworkInterface { |
| 1544 /** |
| 1545 * An array of configurations for this interface. This specifies how this |
| 1546 * interface is configured to interact with other network services |
| 1547 */ |
| 1548 core.List<AccessConfig> accessConfigs; |
| 1549 |
| 1550 /** Name of the interface. */ |
| 1551 core.String name; |
| 1552 |
| 1553 /** |
| 1554 * The name of the NetworkModule to which this interface applies. If not |
| 1555 * specified, or specified as 'default', this will use the 'default' network. |
| 1556 */ |
| 1557 core.String network; |
| 1558 |
| 1559 /** |
| 1560 * An optional IPV4 internal network address to assign to the instance for |
| 1561 * this network interface. |
| 1562 */ |
| 1563 core.String networkIp; |
| 1564 |
| 1565 |
| 1566 NetworkInterface(); |
| 1567 |
| 1568 NetworkInterface.fromJson(core.Map _json) { |
| 1569 if (_json.containsKey("accessConfigs")) { |
| 1570 accessConfigs = _json["accessConfigs"].map((value) => new AccessConfig.fro
mJson(value)).toList(); |
| 1571 } |
| 1572 if (_json.containsKey("name")) { |
| 1573 name = _json["name"]; |
| 1574 } |
| 1575 if (_json.containsKey("network")) { |
| 1576 network = _json["network"]; |
| 1577 } |
| 1578 if (_json.containsKey("networkIp")) { |
| 1579 networkIp = _json["networkIp"]; |
| 1580 } |
| 1581 } |
| 1582 |
| 1583 core.Map toJson() { |
| 1584 var _json = new core.Map(); |
| 1585 if (accessConfigs != null) { |
| 1586 _json["accessConfigs"] = accessConfigs.map((value) => (value).toJson()).to
List(); |
| 1587 } |
| 1588 if (name != null) { |
| 1589 _json["name"] = name; |
| 1590 } |
| 1591 if (network != null) { |
| 1592 _json["network"] = network; |
| 1593 } |
| 1594 if (networkIp != null) { |
| 1595 _json["networkIp"] = networkIp; |
| 1596 } |
| 1597 return _json; |
| 1598 } |
| 1599 } |
| 1600 |
| 1601 |
| 1602 /** Not documented yet. */ |
| 1603 class NetworkModule { |
| 1604 /** |
| 1605 * Required; The range of internal addresses that are legal on this network. |
| 1606 * This range is a CIDR specification, for example: 192.168.0.0/16. |
| 1607 */ |
| 1608 core.String IPv4Range; |
| 1609 |
| 1610 /** The description of the network. */ |
| 1611 core.String description; |
| 1612 |
| 1613 /** |
| 1614 * An optional address that is used for default routing to other networks. |
| 1615 * This must be within the range specified by IPv4Range, and is typicall the |
| 1616 * first usable address in that range. If not specified, the default value is |
| 1617 * the first usable address in IPv4Range. |
| 1618 */ |
| 1619 core.String gatewayIPv4; |
| 1620 |
| 1621 |
| 1622 NetworkModule(); |
| 1623 |
| 1624 NetworkModule.fromJson(core.Map _json) { |
| 1625 if (_json.containsKey("IPv4Range")) { |
| 1626 IPv4Range = _json["IPv4Range"]; |
| 1627 } |
| 1628 if (_json.containsKey("description")) { |
| 1629 description = _json["description"]; |
| 1630 } |
| 1631 if (_json.containsKey("gatewayIPv4")) { |
| 1632 gatewayIPv4 = _json["gatewayIPv4"]; |
| 1633 } |
| 1634 } |
| 1635 |
| 1636 core.Map toJson() { |
| 1637 var _json = new core.Map(); |
| 1638 if (IPv4Range != null) { |
| 1639 _json["IPv4Range"] = IPv4Range; |
| 1640 } |
| 1641 if (description != null) { |
| 1642 _json["description"] = description; |
| 1643 } |
| 1644 if (gatewayIPv4 != null) { |
| 1645 _json["gatewayIPv4"] = gatewayIPv4; |
| 1646 } |
| 1647 return _json; |
| 1648 } |
| 1649 } |
| 1650 |
| 1651 |
| 1652 /** Not documented yet. */ |
| 1653 class NetworkModuleStatus { |
| 1654 /** [Output Only] The URL of the corresponding Network resource. */ |
| 1655 core.String networkUrl; |
| 1656 |
| 1657 |
| 1658 NetworkModuleStatus(); |
| 1659 |
| 1660 NetworkModuleStatus.fromJson(core.Map _json) { |
| 1661 if (_json.containsKey("networkUrl")) { |
| 1662 networkUrl = _json["networkUrl"]; |
| 1663 } |
| 1664 } |
| 1665 |
| 1666 core.Map toJson() { |
| 1667 var _json = new core.Map(); |
| 1668 if (networkUrl != null) { |
| 1669 _json["networkUrl"] = networkUrl; |
| 1670 } |
| 1671 return _json; |
| 1672 } |
| 1673 } |
| 1674 |
| 1675 |
| 1676 /** |
| 1677 * A Persistent Disk resource that will be created and attached to each Replica |
| 1678 * in the Pool. Each Replica will have a unique persistent disk that is created |
| 1679 * and attached to that Replica. |
| 1680 */ |
| 1681 class NewDisk { |
| 1682 /** How the disk will be attached to the Replica. */ |
| 1683 DiskAttachment attachment; |
| 1684 |
| 1685 /** If true, then this disk will be deleted when the instance is deleted. */ |
| 1686 core.bool autoDelete; |
| 1687 |
| 1688 /** If true, indicates that this is the root persistent disk. */ |
| 1689 core.bool boot; |
| 1690 |
| 1691 /** |
| 1692 * Create the new disk using these parameters. The name of the disk will be |
| 1693 * <instance_name>-<five_random_charactersgt;. |
| 1694 */ |
| 1695 NewDiskInitializeParams initializeParams; |
| 1696 |
| 1697 |
| 1698 NewDisk(); |
| 1699 |
| 1700 NewDisk.fromJson(core.Map _json) { |
| 1701 if (_json.containsKey("attachment")) { |
| 1702 attachment = new DiskAttachment.fromJson(_json["attachment"]); |
| 1703 } |
| 1704 if (_json.containsKey("autoDelete")) { |
| 1705 autoDelete = _json["autoDelete"]; |
| 1706 } |
| 1707 if (_json.containsKey("boot")) { |
| 1708 boot = _json["boot"]; |
| 1709 } |
| 1710 if (_json.containsKey("initializeParams")) { |
| 1711 initializeParams = new NewDiskInitializeParams.fromJson(_json["initializeP
arams"]); |
| 1712 } |
| 1713 } |
| 1714 |
| 1715 core.Map toJson() { |
| 1716 var _json = new core.Map(); |
| 1717 if (attachment != null) { |
| 1718 _json["attachment"] = (attachment).toJson(); |
| 1719 } |
| 1720 if (autoDelete != null) { |
| 1721 _json["autoDelete"] = autoDelete; |
| 1722 } |
| 1723 if (boot != null) { |
| 1724 _json["boot"] = boot; |
| 1725 } |
| 1726 if (initializeParams != null) { |
| 1727 _json["initializeParams"] = (initializeParams).toJson(); |
| 1728 } |
| 1729 return _json; |
| 1730 } |
| 1731 } |
| 1732 |
| 1733 |
| 1734 /** Initialization parameters for creating a new disk. */ |
| 1735 class NewDiskInitializeParams { |
| 1736 /** The size of the created disk in gigabytes. */ |
| 1737 core.String diskSizeGb; |
| 1738 |
| 1739 /** The fully-qualified URL of a source image to use to create this disk. */ |
| 1740 core.String sourceImage; |
| 1741 |
| 1742 |
| 1743 NewDiskInitializeParams(); |
| 1744 |
| 1745 NewDiskInitializeParams.fromJson(core.Map _json) { |
| 1746 if (_json.containsKey("diskSizeGb")) { |
| 1747 diskSizeGb = _json["diskSizeGb"]; |
| 1748 } |
| 1749 if (_json.containsKey("sourceImage")) { |
| 1750 sourceImage = _json["sourceImage"]; |
| 1751 } |
| 1752 } |
| 1753 |
| 1754 core.Map toJson() { |
| 1755 var _json = new core.Map(); |
| 1756 if (diskSizeGb != null) { |
| 1757 _json["diskSizeGb"] = diskSizeGb; |
| 1758 } |
| 1759 if (sourceImage != null) { |
| 1760 _json["sourceImage"] = sourceImage; |
| 1761 } |
| 1762 return _json; |
| 1763 } |
| 1764 } |
| 1765 |
| 1766 |
| 1767 /** |
| 1768 * A specification for overriding parameters in a Template that corresponds to |
| 1769 * the Deployment. |
| 1770 */ |
| 1771 class ParamOverride { |
| 1772 /** |
| 1773 * A JSON Path expression that specifies which parameter should be overridden. |
| 1774 */ |
| 1775 core.String path; |
| 1776 |
| 1777 /** The new value to assign to the overridden parameter. */ |
| 1778 core.String value; |
| 1779 |
| 1780 |
| 1781 ParamOverride(); |
| 1782 |
| 1783 ParamOverride.fromJson(core.Map _json) { |
| 1784 if (_json.containsKey("path")) { |
| 1785 path = _json["path"]; |
| 1786 } |
| 1787 if (_json.containsKey("value")) { |
| 1788 value = _json["value"]; |
| 1789 } |
| 1790 } |
| 1791 |
| 1792 core.Map toJson() { |
| 1793 var _json = new core.Map(); |
| 1794 if (path != null) { |
| 1795 _json["path"] = path; |
| 1796 } |
| 1797 if (value != null) { |
| 1798 _json["value"] = value; |
| 1799 } |
| 1800 return _json; |
| 1801 } |
| 1802 } |
| 1803 |
| 1804 |
| 1805 /** Not documented yet. */ |
| 1806 class ReplicaPoolModule { |
| 1807 /** A list of environment variables. */ |
| 1808 core.Map<core.String, EnvVariable> envVariables; |
| 1809 |
| 1810 /** The Health Checks to configure for the ReplicaPoolModule */ |
| 1811 core.List<core.String> healthChecks; |
| 1812 |
| 1813 /** Number of replicas in this module. */ |
| 1814 core.int numReplicas; |
| 1815 |
| 1816 /** Information for a ReplicaPoolModule. */ |
| 1817 ReplicaPoolParams replicaPoolParams; |
| 1818 |
| 1819 /** |
| 1820 * [Output Only] The name of the Resource View associated with a |
| 1821 * ReplicaPoolModule. This field will be generated by the service. |
| 1822 */ |
| 1823 core.String resourceView; |
| 1824 |
| 1825 |
| 1826 ReplicaPoolModule(); |
| 1827 |
| 1828 ReplicaPoolModule.fromJson(core.Map _json) { |
| 1829 if (_json.containsKey("envVariables")) { |
| 1830 envVariables = common_internal.mapMap(_json["envVariables"], (item) => new
EnvVariable.fromJson(item)); |
| 1831 } |
| 1832 if (_json.containsKey("healthChecks")) { |
| 1833 healthChecks = _json["healthChecks"]; |
| 1834 } |
| 1835 if (_json.containsKey("numReplicas")) { |
| 1836 numReplicas = _json["numReplicas"]; |
| 1837 } |
| 1838 if (_json.containsKey("replicaPoolParams")) { |
| 1839 replicaPoolParams = new ReplicaPoolParams.fromJson(_json["replicaPoolParam
s"]); |
| 1840 } |
| 1841 if (_json.containsKey("resourceView")) { |
| 1842 resourceView = _json["resourceView"]; |
| 1843 } |
| 1844 } |
| 1845 |
| 1846 core.Map toJson() { |
| 1847 var _json = new core.Map(); |
| 1848 if (envVariables != null) { |
| 1849 _json["envVariables"] = common_internal.mapMap(envVariables, (item) => (it
em).toJson()); |
| 1850 } |
| 1851 if (healthChecks != null) { |
| 1852 _json["healthChecks"] = healthChecks; |
| 1853 } |
| 1854 if (numReplicas != null) { |
| 1855 _json["numReplicas"] = numReplicas; |
| 1856 } |
| 1857 if (replicaPoolParams != null) { |
| 1858 _json["replicaPoolParams"] = (replicaPoolParams).toJson(); |
| 1859 } |
| 1860 if (resourceView != null) { |
| 1861 _json["resourceView"] = resourceView; |
| 1862 } |
| 1863 return _json; |
| 1864 } |
| 1865 } |
| 1866 |
| 1867 |
| 1868 /** Not documented yet. */ |
| 1869 class ReplicaPoolModuleStatus { |
| 1870 /** [Output Only] The URL of the associated ReplicaPool resource. */ |
| 1871 core.String replicaPoolUrl; |
| 1872 |
| 1873 /** |
| 1874 * [Output Only] The URL of the Resource Group associated with this |
| 1875 * ReplicaPool. |
| 1876 */ |
| 1877 core.String resourceViewUrl; |
| 1878 |
| 1879 |
| 1880 ReplicaPoolModuleStatus(); |
| 1881 |
| 1882 ReplicaPoolModuleStatus.fromJson(core.Map _json) { |
| 1883 if (_json.containsKey("replicaPoolUrl")) { |
| 1884 replicaPoolUrl = _json["replicaPoolUrl"]; |
| 1885 } |
| 1886 if (_json.containsKey("resourceViewUrl")) { |
| 1887 resourceViewUrl = _json["resourceViewUrl"]; |
| 1888 } |
| 1889 } |
| 1890 |
| 1891 core.Map toJson() { |
| 1892 var _json = new core.Map(); |
| 1893 if (replicaPoolUrl != null) { |
| 1894 _json["replicaPoolUrl"] = replicaPoolUrl; |
| 1895 } |
| 1896 if (resourceViewUrl != null) { |
| 1897 _json["resourceViewUrl"] = resourceViewUrl; |
| 1898 } |
| 1899 return _json; |
| 1900 } |
| 1901 } |
| 1902 |
| 1903 |
| 1904 /** |
| 1905 * Configuration information for a ReplicaPools resource. Specifying an item |
| 1906 * within will determine the ReplicaPools API version used for a |
| 1907 * ReplicaPoolModule. Only one may be specified. |
| 1908 */ |
| 1909 class ReplicaPoolParams { |
| 1910 /** ReplicaPoolParams specifications for use with ReplicaPools v1beta1. */ |
| 1911 ReplicaPoolParamsV1Beta1 v1beta1; |
| 1912 |
| 1913 |
| 1914 ReplicaPoolParams(); |
| 1915 |
| 1916 ReplicaPoolParams.fromJson(core.Map _json) { |
| 1917 if (_json.containsKey("v1beta1")) { |
| 1918 v1beta1 = new ReplicaPoolParamsV1Beta1.fromJson(_json["v1beta1"]); |
| 1919 } |
| 1920 } |
| 1921 |
| 1922 core.Map toJson() { |
| 1923 var _json = new core.Map(); |
| 1924 if (v1beta1 != null) { |
| 1925 _json["v1beta1"] = (v1beta1).toJson(); |
| 1926 } |
| 1927 return _json; |
| 1928 } |
| 1929 } |
| 1930 |
| 1931 |
| 1932 /** |
| 1933 * Configuration information for a ReplicaPools v1beta1 API resource. Directly |
| 1934 * maps to ReplicaPool InitTemplate. |
| 1935 */ |
| 1936 class ReplicaPoolParamsV1Beta1 { |
| 1937 /** |
| 1938 * Whether these replicas should be restarted if they experience a failure. |
| 1939 * The default value is true. |
| 1940 */ |
| 1941 core.bool autoRestart; |
| 1942 |
| 1943 /** The base name for instances within this ReplicaPool. */ |
| 1944 core.String baseInstanceName; |
| 1945 |
| 1946 /** Enables IP Forwarding */ |
| 1947 core.bool canIpForward; |
| 1948 |
| 1949 /** An optional textual description of the resource. */ |
| 1950 core.String description; |
| 1951 |
| 1952 /** |
| 1953 * A list of existing Persistent Disk resources to attach to each replica in |
| 1954 * the pool. Each disk will be attached in read-only mode to every replica. |
| 1955 */ |
| 1956 core.List<ExistingDisk> disksToAttach; |
| 1957 |
| 1958 /** |
| 1959 * A list of Disk resources to create and attach to each Replica in the Pool. |
| 1960 * Currently, you can only define one disk and it must be a root persistent |
| 1961 * disk. Note that Replica Pool will create a root persistent disk for each |
| 1962 * replica. |
| 1963 */ |
| 1964 core.List<NewDisk> disksToCreate; |
| 1965 |
| 1966 /** |
| 1967 * Name of the Action to be run during initialization of a ReplicaPoolModule. |
| 1968 */ |
| 1969 core.String initAction; |
| 1970 |
| 1971 /** |
| 1972 * The machine type for this instance. Either a complete URL, or the resource |
| 1973 * name (e.g. n1-standard-1). |
| 1974 */ |
| 1975 core.String machineType; |
| 1976 |
| 1977 /** The metadata key/value pairs assigned to this instance. */ |
| 1978 Metadata metadata; |
| 1979 |
| 1980 /** |
| 1981 * A list of network interfaces for the instance. Currently only one interface |
| 1982 * is supported by Google Compute Engine. |
| 1983 */ |
| 1984 core.List<NetworkInterface> networkInterfaces; |
| 1985 |
| 1986 /** Not documented yet. */ |
| 1987 core.String onHostMaintenance; |
| 1988 |
| 1989 /** A list of Service Accounts to enable for this instance. */ |
| 1990 core.List<ServiceAccount> serviceAccounts; |
| 1991 |
| 1992 /** |
| 1993 * A list of tags to apply to the Google Compute Engine instance to identify |
| 1994 * resources. |
| 1995 */ |
| 1996 Tag tags; |
| 1997 |
| 1998 /** The zone for this ReplicaPool. */ |
| 1999 core.String zone; |
| 2000 |
| 2001 |
| 2002 ReplicaPoolParamsV1Beta1(); |
| 2003 |
| 2004 ReplicaPoolParamsV1Beta1.fromJson(core.Map _json) { |
| 2005 if (_json.containsKey("autoRestart")) { |
| 2006 autoRestart = _json["autoRestart"]; |
| 2007 } |
| 2008 if (_json.containsKey("baseInstanceName")) { |
| 2009 baseInstanceName = _json["baseInstanceName"]; |
| 2010 } |
| 2011 if (_json.containsKey("canIpForward")) { |
| 2012 canIpForward = _json["canIpForward"]; |
| 2013 } |
| 2014 if (_json.containsKey("description")) { |
| 2015 description = _json["description"]; |
| 2016 } |
| 2017 if (_json.containsKey("disksToAttach")) { |
| 2018 disksToAttach = _json["disksToAttach"].map((value) => new ExistingDisk.fro
mJson(value)).toList(); |
| 2019 } |
| 2020 if (_json.containsKey("disksToCreate")) { |
| 2021 disksToCreate = _json["disksToCreate"].map((value) => new NewDisk.fromJson
(value)).toList(); |
| 2022 } |
| 2023 if (_json.containsKey("initAction")) { |
| 2024 initAction = _json["initAction"]; |
| 2025 } |
| 2026 if (_json.containsKey("machineType")) { |
| 2027 machineType = _json["machineType"]; |
| 2028 } |
| 2029 if (_json.containsKey("metadata")) { |
| 2030 metadata = new Metadata.fromJson(_json["metadata"]); |
| 2031 } |
| 2032 if (_json.containsKey("networkInterfaces")) { |
| 2033 networkInterfaces = _json["networkInterfaces"].map((value) => new NetworkI
nterface.fromJson(value)).toList(); |
| 2034 } |
| 2035 if (_json.containsKey("onHostMaintenance")) { |
| 2036 onHostMaintenance = _json["onHostMaintenance"]; |
| 2037 } |
| 2038 if (_json.containsKey("serviceAccounts")) { |
| 2039 serviceAccounts = _json["serviceAccounts"].map((value) => new ServiceAccou
nt.fromJson(value)).toList(); |
| 2040 } |
| 2041 if (_json.containsKey("tags")) { |
| 2042 tags = new Tag.fromJson(_json["tags"]); |
| 2043 } |
| 2044 if (_json.containsKey("zone")) { |
| 2045 zone = _json["zone"]; |
| 2046 } |
| 2047 } |
| 2048 |
| 2049 core.Map toJson() { |
| 2050 var _json = new core.Map(); |
| 2051 if (autoRestart != null) { |
| 2052 _json["autoRestart"] = autoRestart; |
| 2053 } |
| 2054 if (baseInstanceName != null) { |
| 2055 _json["baseInstanceName"] = baseInstanceName; |
| 2056 } |
| 2057 if (canIpForward != null) { |
| 2058 _json["canIpForward"] = canIpForward; |
| 2059 } |
| 2060 if (description != null) { |
| 2061 _json["description"] = description; |
| 2062 } |
| 2063 if (disksToAttach != null) { |
| 2064 _json["disksToAttach"] = disksToAttach.map((value) => (value).toJson()).to
List(); |
| 2065 } |
| 2066 if (disksToCreate != null) { |
| 2067 _json["disksToCreate"] = disksToCreate.map((value) => (value).toJson()).to
List(); |
| 2068 } |
| 2069 if (initAction != null) { |
| 2070 _json["initAction"] = initAction; |
| 2071 } |
| 2072 if (machineType != null) { |
| 2073 _json["machineType"] = machineType; |
| 2074 } |
| 2075 if (metadata != null) { |
| 2076 _json["metadata"] = (metadata).toJson(); |
| 2077 } |
| 2078 if (networkInterfaces != null) { |
| 2079 _json["networkInterfaces"] = networkInterfaces.map((value) => (value).toJs
on()).toList(); |
| 2080 } |
| 2081 if (onHostMaintenance != null) { |
| 2082 _json["onHostMaintenance"] = onHostMaintenance; |
| 2083 } |
| 2084 if (serviceAccounts != null) { |
| 2085 _json["serviceAccounts"] = serviceAccounts.map((value) => (value).toJson()
).toList(); |
| 2086 } |
| 2087 if (tags != null) { |
| 2088 _json["tags"] = (tags).toJson(); |
| 2089 } |
| 2090 if (zone != null) { |
| 2091 _json["zone"] = zone; |
| 2092 } |
| 2093 return _json; |
| 2094 } |
| 2095 } |
| 2096 |
| 2097 |
| 2098 /** |
| 2099 * A Compute Engine service account, identical to the Compute Engine resource. |
| 2100 */ |
| 2101 class ServiceAccount { |
| 2102 /** Service account email address. */ |
| 2103 core.String email; |
| 2104 |
| 2105 /** List of OAuth2 scopes to obtain for the service account. */ |
| 2106 core.List<core.String> scopes; |
| 2107 |
| 2108 |
| 2109 ServiceAccount(); |
| 2110 |
| 2111 ServiceAccount.fromJson(core.Map _json) { |
| 2112 if (_json.containsKey("email")) { |
| 2113 email = _json["email"]; |
| 2114 } |
| 2115 if (_json.containsKey("scopes")) { |
| 2116 scopes = _json["scopes"]; |
| 2117 } |
| 2118 } |
| 2119 |
| 2120 core.Map toJson() { |
| 2121 var _json = new core.Map(); |
| 2122 if (email != null) { |
| 2123 _json["email"] = email; |
| 2124 } |
| 2125 if (scopes != null) { |
| 2126 _json["scopes"] = scopes; |
| 2127 } |
| 2128 return _json; |
| 2129 } |
| 2130 } |
| 2131 |
| 2132 |
| 2133 /** |
| 2134 * A Compute Engine Instance tag, identical to the tags on the corresponding |
| 2135 * Compute Engine Instance resource. |
| 2136 */ |
| 2137 class Tag { |
| 2138 /** The fingerprint of the tag. */ |
| 2139 core.String fingerPrint; |
| 2140 |
| 2141 /** Items contained in this tag. */ |
| 2142 core.List<core.String> items; |
| 2143 |
| 2144 |
| 2145 Tag(); |
| 2146 |
| 2147 Tag.fromJson(core.Map _json) { |
| 2148 if (_json.containsKey("fingerPrint")) { |
| 2149 fingerPrint = _json["fingerPrint"]; |
| 2150 } |
| 2151 if (_json.containsKey("items")) { |
| 2152 items = _json["items"]; |
| 2153 } |
| 2154 } |
| 2155 |
| 2156 core.Map toJson() { |
| 2157 var _json = new core.Map(); |
| 2158 if (fingerPrint != null) { |
| 2159 _json["fingerPrint"] = fingerPrint; |
| 2160 } |
| 2161 if (items != null) { |
| 2162 _json["items"] = items; |
| 2163 } |
| 2164 return _json; |
| 2165 } |
| 2166 } |
| 2167 |
| 2168 |
| 2169 /** A Template represents a complete configuration for a Deployment. */ |
| 2170 class Template { |
| 2171 /** Action definitions for use in Module intents in this Template. */ |
| 2172 core.Map<core.String, Action> actions; |
| 2173 |
| 2174 /** A user-supplied description of this Template. */ |
| 2175 core.String description; |
| 2176 |
| 2177 /** A list of modules for this Template. */ |
| 2178 core.Map<core.String, Module> modules; |
| 2179 |
| 2180 /** |
| 2181 * Name of this Template. The name must conform to the expression: |
| 2182 * [a-zA-Z0-9-_]{1,64} |
| 2183 */ |
| 2184 core.String name; |
| 2185 |
| 2186 |
| 2187 Template(); |
| 2188 |
| 2189 Template.fromJson(core.Map _json) { |
| 2190 if (_json.containsKey("actions")) { |
| 2191 actions = common_internal.mapMap(_json["actions"], (item) => new Action.fr
omJson(item)); |
| 2192 } |
| 2193 if (_json.containsKey("description")) { |
| 2194 description = _json["description"]; |
| 2195 } |
| 2196 if (_json.containsKey("modules")) { |
| 2197 modules = common_internal.mapMap(_json["modules"], (item) => new Module.fr
omJson(item)); |
| 2198 } |
| 2199 if (_json.containsKey("name")) { |
| 2200 name = _json["name"]; |
| 2201 } |
| 2202 } |
| 2203 |
| 2204 core.Map toJson() { |
| 2205 var _json = new core.Map(); |
| 2206 if (actions != null) { |
| 2207 _json["actions"] = common_internal.mapMap(actions, (item) => (item).toJson
()); |
| 2208 } |
| 2209 if (description != null) { |
| 2210 _json["description"] = description; |
| 2211 } |
| 2212 if (modules != null) { |
| 2213 _json["modules"] = common_internal.mapMap(modules, (item) => (item).toJson
()); |
| 2214 } |
| 2215 if (name != null) { |
| 2216 _json["name"] = name; |
| 2217 } |
| 2218 return _json; |
| 2219 } |
| 2220 } |
| 2221 |
| 2222 |
| 2223 /** Not documented yet. */ |
| 2224 class TemplatesListResponse { |
| 2225 /** Not documented yet. */ |
| 2226 core.String nextPageToken; |
| 2227 |
| 2228 /** Not documented yet. */ |
| 2229 core.List<Template> resources; |
| 2230 |
| 2231 |
| 2232 TemplatesListResponse(); |
| 2233 |
| 2234 TemplatesListResponse.fromJson(core.Map _json) { |
| 2235 if (_json.containsKey("nextPageToken")) { |
| 2236 nextPageToken = _json["nextPageToken"]; |
| 2237 } |
| 2238 if (_json.containsKey("resources")) { |
| 2239 resources = _json["resources"].map((value) => new Template.fromJson(value)
).toList(); |
| 2240 } |
| 2241 } |
| 2242 |
| 2243 core.Map toJson() { |
| 2244 var _json = new core.Map(); |
| 2245 if (nextPageToken != null) { |
| 2246 _json["nextPageToken"] = nextPageToken; |
| 2247 } |
| 2248 if (resources != null) { |
| 2249 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 2250 } |
| 2251 return _json; |
| 2252 } |
| 2253 } |
| 2254 |
| 2255 |
OLD | NEW |