OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.container.v1; | 3 library googleapis.container.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 class ProjectsZonesClustersResourceApi { | 104 class ProjectsZonesClustersResourceApi { |
105 final commons.ApiRequester _requester; | 105 final commons.ApiRequester _requester; |
106 | 106 |
107 ProjectsZonesClustersNodePoolsResourceApi get nodePools => new ProjectsZonesCl
ustersNodePoolsResourceApi(_requester); | 107 ProjectsZonesClustersNodePoolsResourceApi get nodePools => new ProjectsZonesCl
ustersNodePoolsResourceApi(_requester); |
108 | 108 |
109 ProjectsZonesClustersResourceApi(commons.ApiRequester client) : | 109 ProjectsZonesClustersResourceApi(commons.ApiRequester client) : |
110 _requester = client; | 110 _requester = client; |
111 | 111 |
112 /** | 112 /** |
| 113 * Sets the addons of a specific cluster. |
| 114 * |
| 115 * [request] - The metadata request object. |
| 116 * |
| 117 * Request parameters: |
| 118 * |
| 119 * [projectId] - The Google Developers Console [project ID or project |
| 120 * number](https://support.google.com/cloud/answer/6158840). |
| 121 * |
| 122 * [zone] - The name of the Google Compute Engine |
| 123 * [zone](/compute/docs/zones#available) in which the cluster |
| 124 * resides. |
| 125 * |
| 126 * [clusterId] - The name of the cluster to upgrade. |
| 127 * |
| 128 * Completes with a [Operation]. |
| 129 * |
| 130 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 131 * error. |
| 132 * |
| 133 * If the used [http.Client] completes with an error when making a REST call, |
| 134 * this method will complete with the same error. |
| 135 */ |
| 136 async.Future<Operation> addons(SetAddonsConfigRequest request, core.String pro
jectId, core.String zone, core.String clusterId) { |
| 137 var _url = null; |
| 138 var _queryParams = new core.Map(); |
| 139 var _uploadMedia = null; |
| 140 var _uploadOptions = null; |
| 141 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 142 var _body = null; |
| 143 |
| 144 if (request != null) { |
| 145 _body = convert.JSON.encode((request).toJson()); |
| 146 } |
| 147 if (projectId == null) { |
| 148 throw new core.ArgumentError("Parameter projectId is required."); |
| 149 } |
| 150 if (zone == null) { |
| 151 throw new core.ArgumentError("Parameter zone is required."); |
| 152 } |
| 153 if (clusterId == null) { |
| 154 throw new core.ArgumentError("Parameter clusterId is required."); |
| 155 } |
| 156 |
| 157 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/addons'; |
| 158 |
| 159 var _response = _requester.request(_url, |
| 160 "POST", |
| 161 body: _body, |
| 162 queryParams: _queryParams, |
| 163 uploadOptions: _uploadOptions, |
| 164 uploadMedia: _uploadMedia, |
| 165 downloadOptions: _downloadOptions); |
| 166 return _response.then((data) => new Operation.fromJson(data)); |
| 167 } |
| 168 |
| 169 /** |
113 * Completes master IP rotation. | 170 * Completes master IP rotation. |
114 * | 171 * |
115 * [request] - The metadata request object. | 172 * [request] - The metadata request object. |
116 * | 173 * |
117 * Request parameters: | 174 * Request parameters: |
118 * | 175 * |
119 * [projectId] - The Google Developers Console [project ID or project | 176 * [projectId] - The Google Developers Console [project ID or project |
120 * number](https://developers.google.com/console/help/new/#projectnumber). | 177 * number](https://developers.google.com/console/help/new/#projectnumber). |
121 * | 178 * |
122 * [zone] - The name of the Google Compute Engine | 179 * [zone] - The name of the Google Compute Engine |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 "GET", | 498 "GET", |
442 body: _body, | 499 body: _body, |
443 queryParams: _queryParams, | 500 queryParams: _queryParams, |
444 uploadOptions: _uploadOptions, | 501 uploadOptions: _uploadOptions, |
445 uploadMedia: _uploadMedia, | 502 uploadMedia: _uploadMedia, |
446 downloadOptions: _downloadOptions); | 503 downloadOptions: _downloadOptions); |
447 return _response.then((data) => new ListClustersResponse.fromJson(data)); | 504 return _response.then((data) => new ListClustersResponse.fromJson(data)); |
448 } | 505 } |
449 | 506 |
450 /** | 507 /** |
451 * Sets labels on a cluster. | 508 * Sets the locations of a specific cluster. |
452 * | 509 * |
453 * [request] - The metadata request object. | 510 * [request] - The metadata request object. |
454 * | 511 * |
455 * Request parameters: | 512 * Request parameters: |
456 * | 513 * |
457 * [projectId] - The Google Developers Console [project ID or project | 514 * [projectId] - The Google Developers Console [project ID or project |
458 * number](https://developers.google.com/console/help/new/#projectnumber). | 515 * number](https://support.google.com/cloud/answer/6158840). |
459 * | 516 * |
460 * [zone] - The name of the Google Compute Engine | 517 * [zone] - The name of the Google Compute Engine |
461 * [zone](/compute/docs/zones#available) in which the cluster | 518 * [zone](/compute/docs/zones#available) in which the cluster |
462 * resides. | 519 * resides. |
463 * | 520 * |
464 * [clusterId] - The name of the cluster. | 521 * [clusterId] - The name of the cluster to upgrade. |
465 * | 522 * |
466 * Completes with a [Operation]. | 523 * Completes with a [Operation]. |
467 * | 524 * |
468 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 525 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
469 * error. | 526 * error. |
470 * | 527 * |
471 * If the used [http.Client] completes with an error when making a REST call, | 528 * If the used [http.Client] completes with an error when making a REST call, |
472 * this method will complete with the same error. | 529 * this method will complete with the same error. |
473 */ | 530 */ |
474 async.Future<Operation> resourceLabels(SetLabelsRequest request, core.String p
rojectId, core.String zone, core.String clusterId) { | 531 async.Future<Operation> locations(SetLocationsRequest request, core.String pro
jectId, core.String zone, core.String clusterId) { |
475 var _url = null; | 532 var _url = null; |
476 var _queryParams = new core.Map(); | 533 var _queryParams = new core.Map(); |
477 var _uploadMedia = null; | 534 var _uploadMedia = null; |
478 var _uploadOptions = null; | 535 var _uploadOptions = null; |
479 var _downloadOptions = commons.DownloadOptions.Metadata; | 536 var _downloadOptions = commons.DownloadOptions.Metadata; |
480 var _body = null; | 537 var _body = null; |
481 | 538 |
482 if (request != null) { | 539 if (request != null) { |
483 _body = convert.JSON.encode((request).toJson()); | 540 _body = convert.JSON.encode((request).toJson()); |
484 } | 541 } |
485 if (projectId == null) { | 542 if (projectId == null) { |
486 throw new core.ArgumentError("Parameter projectId is required."); | 543 throw new core.ArgumentError("Parameter projectId is required."); |
487 } | 544 } |
488 if (zone == null) { | 545 if (zone == null) { |
489 throw new core.ArgumentError("Parameter zone is required."); | 546 throw new core.ArgumentError("Parameter zone is required."); |
490 } | 547 } |
491 if (clusterId == null) { | 548 if (clusterId == null) { |
492 throw new core.ArgumentError("Parameter clusterId is required."); | 549 throw new core.ArgumentError("Parameter clusterId is required."); |
493 } | 550 } |
494 | 551 |
495 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/resourceLabels'; | 552 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/locations'; |
496 | 553 |
497 var _response = _requester.request(_url, | 554 var _response = _requester.request(_url, |
498 "POST", | 555 "POST", |
499 body: _body, | 556 body: _body, |
500 queryParams: _queryParams, | 557 queryParams: _queryParams, |
501 uploadOptions: _uploadOptions, | 558 uploadOptions: _uploadOptions, |
502 uploadMedia: _uploadMedia, | 559 uploadMedia: _uploadMedia, |
503 downloadOptions: _downloadOptions); | 560 downloadOptions: _downloadOptions); |
504 return _response.then((data) => new Operation.fromJson(data)); | 561 return _response.then((data) => new Operation.fromJson(data)); |
505 } | 562 } |
506 | 563 |
507 /** | 564 /** |
508 * Used to set master auth materials. Currently supports :- | 565 * Sets the logging service of a specific cluster. |
509 * Changing the admin password of a specific cluster. | |
510 * This can be either via password generation or explicitly set the password. | |
511 * | 566 * |
512 * [request] - The metadata request object. | 567 * [request] - The metadata request object. |
513 * | 568 * |
514 * Request parameters: | 569 * Request parameters: |
515 * | 570 * |
516 * [projectId] - The Google Developers Console [project ID or project | 571 * [projectId] - The Google Developers Console [project ID or project |
517 * number](https://support.google.com/cloud/answer/6158840). | 572 * number](https://support.google.com/cloud/answer/6158840). |
518 * | 573 * |
519 * [zone] - The name of the Google Compute Engine | 574 * [zone] - The name of the Google Compute Engine |
520 * [zone](/compute/docs/zones#available) in which the cluster | 575 * [zone](/compute/docs/zones#available) in which the cluster |
521 * resides. | 576 * resides. |
522 * | 577 * |
523 * [clusterId] - The name of the cluster to upgrade. | 578 * [clusterId] - The name of the cluster to upgrade. |
524 * | 579 * |
525 * Completes with a [Operation]. | 580 * Completes with a [Operation]. |
526 * | 581 * |
527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 582 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
528 * error. | 583 * error. |
529 * | 584 * |
530 * If the used [http.Client] completes with an error when making a REST call, | 585 * If the used [http.Client] completes with an error when making a REST call, |
531 * this method will complete with the same error. | 586 * this method will complete with the same error. |
532 */ | 587 */ |
533 async.Future<Operation> setMasterAuth(SetMasterAuthRequest request, core.Strin
g projectId, core.String zone, core.String clusterId) { | 588 async.Future<Operation> logging(SetLoggingServiceRequest request, core.String
projectId, core.String zone, core.String clusterId) { |
534 var _url = null; | 589 var _url = null; |
535 var _queryParams = new core.Map(); | 590 var _queryParams = new core.Map(); |
536 var _uploadMedia = null; | 591 var _uploadMedia = null; |
537 var _uploadOptions = null; | 592 var _uploadOptions = null; |
538 var _downloadOptions = commons.DownloadOptions.Metadata; | 593 var _downloadOptions = commons.DownloadOptions.Metadata; |
539 var _body = null; | 594 var _body = null; |
540 | 595 |
541 if (request != null) { | 596 if (request != null) { |
542 _body = convert.JSON.encode((request).toJson()); | 597 _body = convert.JSON.encode((request).toJson()); |
543 } | 598 } |
544 if (projectId == null) { | 599 if (projectId == null) { |
545 throw new core.ArgumentError("Parameter projectId is required."); | 600 throw new core.ArgumentError("Parameter projectId is required."); |
546 } | 601 } |
547 if (zone == null) { | 602 if (zone == null) { |
548 throw new core.ArgumentError("Parameter zone is required."); | 603 throw new core.ArgumentError("Parameter zone is required."); |
549 } | 604 } |
550 if (clusterId == null) { | 605 if (clusterId == null) { |
551 throw new core.ArgumentError("Parameter clusterId is required."); | 606 throw new core.ArgumentError("Parameter clusterId is required."); |
552 } | 607 } |
553 | 608 |
554 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + ':setMasterAuth'; | 609 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/logging'; |
555 | 610 |
556 var _response = _requester.request(_url, | 611 var _response = _requester.request(_url, |
557 "POST", | 612 "POST", |
558 body: _body, | 613 body: _body, |
559 queryParams: _queryParams, | 614 queryParams: _queryParams, |
560 uploadOptions: _uploadOptions, | 615 uploadOptions: _uploadOptions, |
561 uploadMedia: _uploadMedia, | 616 uploadMedia: _uploadMedia, |
562 downloadOptions: _downloadOptions); | 617 downloadOptions: _downloadOptions); |
563 return _response.then((data) => new Operation.fromJson(data)); | 618 return _response.then((data) => new Operation.fromJson(data)); |
564 } | 619 } |
565 | 620 |
566 /** | 621 /** |
567 * Start master IP rotation. | 622 * Updates the master of a specific cluster. |
568 * | 623 * |
569 * [request] - The metadata request object. | 624 * [request] - The metadata request object. |
570 * | 625 * |
571 * Request parameters: | 626 * Request parameters: |
572 * | 627 * |
573 * [projectId] - The Google Developers Console [project ID or project | 628 * [projectId] - The Google Developers Console [project ID or project |
574 * number](https://developers.google.com/console/help/new/#projectnumber). | 629 * number](https://support.google.com/cloud/answer/6158840). |
575 * | 630 * |
576 * [zone] - The name of the Google Compute Engine | 631 * [zone] - The name of the Google Compute Engine |
577 * [zone](/compute/docs/zones#available) in which the cluster | 632 * [zone](/compute/docs/zones#available) in which the cluster |
578 * resides. | 633 * resides. |
579 * | 634 * |
580 * [clusterId] - The name of the cluster. | 635 * [clusterId] - The name of the cluster to upgrade. |
581 * | 636 * |
582 * Completes with a [Operation]. | 637 * Completes with a [Operation]. |
583 * | 638 * |
584 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 639 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
585 * error. | 640 * error. |
586 * | 641 * |
587 * If the used [http.Client] completes with an error when making a REST call, | 642 * If the used [http.Client] completes with an error when making a REST call, |
588 * this method will complete with the same error. | 643 * this method will complete with the same error. |
589 */ | 644 */ |
590 async.Future<Operation> startIpRotation(StartIPRotationRequest request, core.S
tring projectId, core.String zone, core.String clusterId) { | 645 async.Future<Operation> master(UpdateMasterRequest request, core.String projec
tId, core.String zone, core.String clusterId) { |
591 var _url = null; | 646 var _url = null; |
592 var _queryParams = new core.Map(); | 647 var _queryParams = new core.Map(); |
593 var _uploadMedia = null; | 648 var _uploadMedia = null; |
594 var _uploadOptions = null; | 649 var _uploadOptions = null; |
595 var _downloadOptions = commons.DownloadOptions.Metadata; | 650 var _downloadOptions = commons.DownloadOptions.Metadata; |
596 var _body = null; | 651 var _body = null; |
597 | 652 |
598 if (request != null) { | 653 if (request != null) { |
599 _body = convert.JSON.encode((request).toJson()); | 654 _body = convert.JSON.encode((request).toJson()); |
600 } | 655 } |
601 if (projectId == null) { | 656 if (projectId == null) { |
602 throw new core.ArgumentError("Parameter projectId is required."); | 657 throw new core.ArgumentError("Parameter projectId is required."); |
603 } | 658 } |
604 if (zone == null) { | 659 if (zone == null) { |
605 throw new core.ArgumentError("Parameter zone is required."); | 660 throw new core.ArgumentError("Parameter zone is required."); |
606 } | 661 } |
607 if (clusterId == null) { | 662 if (clusterId == null) { |
608 throw new core.ArgumentError("Parameter clusterId is required."); | 663 throw new core.ArgumentError("Parameter clusterId is required."); |
609 } | 664 } |
610 | 665 |
611 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + ':startIpRotation'; | 666 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/master'; |
612 | 667 |
613 var _response = _requester.request(_url, | 668 var _response = _requester.request(_url, |
614 "POST", | 669 "POST", |
615 body: _body, | 670 body: _body, |
616 queryParams: _queryParams, | 671 queryParams: _queryParams, |
617 uploadOptions: _uploadOptions, | 672 uploadOptions: _uploadOptions, |
618 uploadMedia: _uploadMedia, | 673 uploadMedia: _uploadMedia, |
619 downloadOptions: _downloadOptions); | 674 downloadOptions: _downloadOptions); |
620 return _response.then((data) => new Operation.fromJson(data)); | 675 return _response.then((data) => new Operation.fromJson(data)); |
621 } | 676 } |
622 | 677 |
623 /** | 678 /** |
624 * Updates the settings of a specific cluster. | 679 * Sets the monitoring service of a specific cluster. |
625 * | 680 * |
626 * [request] - The metadata request object. | 681 * [request] - The metadata request object. |
627 * | 682 * |
628 * Request parameters: | 683 * Request parameters: |
629 * | 684 * |
630 * [projectId] - The Google Developers Console [project ID or project | 685 * [projectId] - The Google Developers Console [project ID or project |
631 * number](https://support.google.com/cloud/answer/6158840). | 686 * number](https://support.google.com/cloud/answer/6158840). |
632 * | 687 * |
633 * [zone] - The name of the Google Compute Engine | 688 * [zone] - The name of the Google Compute Engine |
634 * [zone](/compute/docs/zones#available) in which the cluster | 689 * [zone](/compute/docs/zones#available) in which the cluster |
635 * resides. | 690 * resides. |
636 * | 691 * |
637 * [clusterId] - The name of the cluster to upgrade. | 692 * [clusterId] - The name of the cluster to upgrade. |
638 * | 693 * |
639 * Completes with a [Operation]. | 694 * Completes with a [Operation]. |
640 * | 695 * |
641 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 696 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
642 * error. | 697 * error. |
643 * | 698 * |
644 * If the used [http.Client] completes with an error when making a REST call, | 699 * If the used [http.Client] completes with an error when making a REST call, |
645 * this method will complete with the same error. | 700 * this method will complete with the same error. |
646 */ | 701 */ |
647 async.Future<Operation> update(UpdateClusterRequest request, core.String proje
ctId, core.String zone, core.String clusterId) { | 702 async.Future<Operation> monitoring(SetMonitoringServiceRequest request, core.S
tring projectId, core.String zone, core.String clusterId) { |
648 var _url = null; | 703 var _url = null; |
649 var _queryParams = new core.Map(); | 704 var _queryParams = new core.Map(); |
650 var _uploadMedia = null; | 705 var _uploadMedia = null; |
651 var _uploadOptions = null; | 706 var _uploadOptions = null; |
652 var _downloadOptions = commons.DownloadOptions.Metadata; | 707 var _downloadOptions = commons.DownloadOptions.Metadata; |
653 var _body = null; | 708 var _body = null; |
654 | 709 |
655 if (request != null) { | 710 if (request != null) { |
656 _body = convert.JSON.encode((request).toJson()); | 711 _body = convert.JSON.encode((request).toJson()); |
657 } | 712 } |
658 if (projectId == null) { | 713 if (projectId == null) { |
659 throw new core.ArgumentError("Parameter projectId is required."); | 714 throw new core.ArgumentError("Parameter projectId is required."); |
660 } | 715 } |
661 if (zone == null) { | 716 if (zone == null) { |
662 throw new core.ArgumentError("Parameter zone is required."); | 717 throw new core.ArgumentError("Parameter zone is required."); |
663 } | 718 } |
664 if (clusterId == null) { | 719 if (clusterId == null) { |
665 throw new core.ArgumentError("Parameter clusterId is required."); | 720 throw new core.ArgumentError("Parameter clusterId is required."); |
666 } | 721 } |
667 | 722 |
668 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId'); | 723 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/monitoring'; |
669 | 724 |
670 var _response = _requester.request(_url, | 725 var _response = _requester.request(_url, |
671 "PUT", | 726 "POST", |
672 body: _body, | 727 body: _body, |
673 queryParams: _queryParams, | 728 queryParams: _queryParams, |
674 uploadOptions: _uploadOptions, | 729 uploadOptions: _uploadOptions, |
675 uploadMedia: _uploadMedia, | 730 uploadMedia: _uploadMedia, |
676 downloadOptions: _downloadOptions); | 731 downloadOptions: _downloadOptions); |
677 return _response.then((data) => new Operation.fromJson(data)); | 732 return _response.then((data) => new Operation.fromJson(data)); |
678 } | 733 } |
679 | 734 |
680 } | |
681 | |
682 | |
683 class ProjectsZonesClustersNodePoolsResourceApi { | |
684 final commons.ApiRequester _requester; | |
685 | |
686 ProjectsZonesClustersNodePoolsResourceApi(commons.ApiRequester client) : | |
687 _requester = client; | |
688 | |
689 /** | 735 /** |
690 * Creates a node pool for a cluster. | 736 * Sets labels on a cluster. |
691 * | 737 * |
692 * [request] - The metadata request object. | 738 * [request] - The metadata request object. |
693 * | 739 * |
694 * Request parameters: | 740 * Request parameters: |
695 * | 741 * |
696 * [projectId] - The Google Developers Console [project ID or project | 742 * [projectId] - The Google Developers Console [project ID or project |
697 * number](https://developers.google.com/console/help/new/#projectnumber). | 743 * number](https://developers.google.com/console/help/new/#projectnumber). |
698 * | 744 * |
699 * [zone] - The name of the Google Compute Engine | 745 * [zone] - The name of the Google Compute Engine |
700 * [zone](/compute/docs/zones#available) in which the cluster | 746 * [zone](/compute/docs/zones#available) in which the cluster |
701 * resides. | 747 * resides. |
702 * | 748 * |
703 * [clusterId] - The name of the cluster. | 749 * [clusterId] - The name of the cluster. |
704 * | 750 * |
705 * Completes with a [Operation]. | 751 * Completes with a [Operation]. |
706 * | 752 * |
707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 753 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
708 * error. | 754 * error. |
709 * | 755 * |
710 * If the used [http.Client] completes with an error when making a REST call, | 756 * If the used [http.Client] completes with an error when making a REST call, |
711 * this method will complete with the same error. | 757 * this method will complete with the same error. |
712 */ | 758 */ |
713 async.Future<Operation> create(CreateNodePoolRequest request, core.String proj
ectId, core.String zone, core.String clusterId) { | 759 async.Future<Operation> resourceLabels(SetLabelsRequest request, core.String p
rojectId, core.String zone, core.String clusterId) { |
714 var _url = null; | 760 var _url = null; |
715 var _queryParams = new core.Map(); | 761 var _queryParams = new core.Map(); |
716 var _uploadMedia = null; | 762 var _uploadMedia = null; |
717 var _uploadOptions = null; | 763 var _uploadOptions = null; |
718 var _downloadOptions = commons.DownloadOptions.Metadata; | 764 var _downloadOptions = commons.DownloadOptions.Metadata; |
719 var _body = null; | 765 var _body = null; |
720 | 766 |
721 if (request != null) { | 767 if (request != null) { |
722 _body = convert.JSON.encode((request).toJson()); | 768 _body = convert.JSON.encode((request).toJson()); |
723 } | 769 } |
724 if (projectId == null) { | 770 if (projectId == null) { |
725 throw new core.ArgumentError("Parameter projectId is required."); | 771 throw new core.ArgumentError("Parameter projectId is required."); |
726 } | 772 } |
727 if (zone == null) { | 773 if (zone == null) { |
728 throw new core.ArgumentError("Parameter zone is required."); | 774 throw new core.ArgumentError("Parameter zone is required."); |
729 } | 775 } |
730 if (clusterId == null) { | 776 if (clusterId == null) { |
731 throw new core.ArgumentError("Parameter clusterId is required."); | 777 throw new core.ArgumentError("Parameter clusterId is required."); |
732 } | 778 } |
733 | 779 |
734 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools'; | 780 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/resourceLabels'; |
735 | 781 |
736 var _response = _requester.request(_url, | 782 var _response = _requester.request(_url, |
737 "POST", | 783 "POST", |
738 body: _body, | 784 body: _body, |
739 queryParams: _queryParams, | 785 queryParams: _queryParams, |
740 uploadOptions: _uploadOptions, | 786 uploadOptions: _uploadOptions, |
741 uploadMedia: _uploadMedia, | 787 uploadMedia: _uploadMedia, |
742 downloadOptions: _downloadOptions); | 788 downloadOptions: _downloadOptions); |
743 return _response.then((data) => new Operation.fromJson(data)); | 789 return _response.then((data) => new Operation.fromJson(data)); |
744 } | 790 } |
745 | 791 |
746 /** | 792 /** |
747 * Deletes a node pool from a cluster. | 793 * Used to set master auth materials. Currently supports :- |
| 794 * Changing the admin password of a specific cluster. |
| 795 * This can be either via password generation or explicitly set the password. |
| 796 * |
| 797 * [request] - The metadata request object. |
748 * | 798 * |
749 * Request parameters: | 799 * Request parameters: |
750 * | 800 * |
751 * [projectId] - The Google Developers Console [project ID or project | 801 * [projectId] - The Google Developers Console [project ID or project |
752 * number](https://developers.google.com/console/help/new/#projectnumber). | 802 * number](https://support.google.com/cloud/answer/6158840). |
753 * | 803 * |
754 * [zone] - The name of the Google Compute Engine | 804 * [zone] - The name of the Google Compute Engine |
755 * [zone](/compute/docs/zones#available) in which the cluster | 805 * [zone](/compute/docs/zones#available) in which the cluster |
756 * resides. | 806 * resides. |
757 * | 807 * |
758 * [clusterId] - The name of the cluster. | 808 * [clusterId] - The name of the cluster to upgrade. |
759 * | |
760 * [nodePoolId] - The name of the node pool to delete. | |
761 * | 809 * |
762 * Completes with a [Operation]. | 810 * Completes with a [Operation]. |
763 * | 811 * |
764 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 812 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
765 * error. | 813 * error. |
766 * | 814 * |
767 * If the used [http.Client] completes with an error when making a REST call, | 815 * If the used [http.Client] completes with an error when making a REST call, |
768 * this method will complete with the same error. | 816 * this method will complete with the same error. |
769 */ | 817 */ |
770 async.Future<Operation> delete(core.String projectId, core.String zone, core.S
tring clusterId, core.String nodePoolId) { | 818 async.Future<Operation> setMasterAuth(SetMasterAuthRequest request, core.Strin
g projectId, core.String zone, core.String clusterId) { |
771 var _url = null; | 819 var _url = null; |
772 var _queryParams = new core.Map(); | 820 var _queryParams = new core.Map(); |
773 var _uploadMedia = null; | 821 var _uploadMedia = null; |
774 var _uploadOptions = null; | 822 var _uploadOptions = null; |
775 var _downloadOptions = commons.DownloadOptions.Metadata; | 823 var _downloadOptions = commons.DownloadOptions.Metadata; |
776 var _body = null; | 824 var _body = null; |
777 | 825 |
| 826 if (request != null) { |
| 827 _body = convert.JSON.encode((request).toJson()); |
| 828 } |
778 if (projectId == null) { | 829 if (projectId == null) { |
779 throw new core.ArgumentError("Parameter projectId is required."); | 830 throw new core.ArgumentError("Parameter projectId is required."); |
780 } | 831 } |
781 if (zone == null) { | 832 if (zone == null) { |
782 throw new core.ArgumentError("Parameter zone is required."); | 833 throw new core.ArgumentError("Parameter zone is required."); |
783 } | 834 } |
784 if (clusterId == null) { | 835 if (clusterId == null) { |
785 throw new core.ArgumentError("Parameter clusterId is required."); | 836 throw new core.ArgumentError("Parameter clusterId is required."); |
786 } | 837 } |
787 if (nodePoolId == null) { | |
788 throw new core.ArgumentError("Parameter nodePoolId is required."); | |
789 } | |
790 | 838 |
791 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId'); | 839 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + ':setMasterAuth'; |
792 | 840 |
793 var _response = _requester.request(_url, | 841 var _response = _requester.request(_url, |
794 "DELETE", | 842 "POST", |
795 body: _body, | 843 body: _body, |
796 queryParams: _queryParams, | 844 queryParams: _queryParams, |
797 uploadOptions: _uploadOptions, | 845 uploadOptions: _uploadOptions, |
798 uploadMedia: _uploadMedia, | 846 uploadMedia: _uploadMedia, |
799 downloadOptions: _downloadOptions); | 847 downloadOptions: _downloadOptions); |
800 return _response.then((data) => new Operation.fromJson(data)); | 848 return _response.then((data) => new Operation.fromJson(data)); |
801 } | 849 } |
802 | 850 |
803 /** | 851 /** |
804 * Retrieves the node pool requested. | 852 * Enables/Disables Network Policy for a cluster. |
| 853 * |
| 854 * [request] - The metadata request object. |
805 * | 855 * |
806 * Request parameters: | 856 * Request parameters: |
807 * | 857 * |
808 * [projectId] - The Google Developers Console [project ID or project | 858 * [projectId] - The Google Developers Console [project ID or project |
809 * number](https://developers.google.com/console/help/new/#projectnumber). | 859 * number](https://developers.google.com/console/help/new/#projectnumber). |
810 * | 860 * |
811 * [zone] - The name of the Google Compute Engine | 861 * [zone] - The name of the Google Compute Engine |
812 * [zone](/compute/docs/zones#available) in which the cluster | 862 * [zone](/compute/docs/zones#available) in which the cluster |
813 * resides. | 863 * resides. |
814 * | 864 * |
815 * [clusterId] - The name of the cluster. | 865 * [clusterId] - The name of the cluster. |
816 * | 866 * |
817 * [nodePoolId] - The name of the node pool. | 867 * Completes with a [Operation]. |
818 * | |
819 * Completes with a [NodePool]. | |
820 * | 868 * |
821 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 869 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
822 * error. | 870 * error. |
823 * | 871 * |
824 * If the used [http.Client] completes with an error when making a REST call, | 872 * If the used [http.Client] completes with an error when making a REST call, |
825 * this method will complete with the same error. | 873 * this method will complete with the same error. |
826 */ | 874 */ |
827 async.Future<NodePool> get(core.String projectId, core.String zone, core.Strin
g clusterId, core.String nodePoolId) { | 875 async.Future<Operation> setNetworkPolicy(SetNetworkPolicyRequest request, core
.String projectId, core.String zone, core.String clusterId) { |
828 var _url = null; | 876 var _url = null; |
829 var _queryParams = new core.Map(); | 877 var _queryParams = new core.Map(); |
830 var _uploadMedia = null; | 878 var _uploadMedia = null; |
831 var _uploadOptions = null; | 879 var _uploadOptions = null; |
832 var _downloadOptions = commons.DownloadOptions.Metadata; | 880 var _downloadOptions = commons.DownloadOptions.Metadata; |
833 var _body = null; | 881 var _body = null; |
834 | 882 |
| 883 if (request != null) { |
| 884 _body = convert.JSON.encode((request).toJson()); |
| 885 } |
835 if (projectId == null) { | 886 if (projectId == null) { |
836 throw new core.ArgumentError("Parameter projectId is required."); | 887 throw new core.ArgumentError("Parameter projectId is required."); |
837 } | 888 } |
838 if (zone == null) { | 889 if (zone == null) { |
839 throw new core.ArgumentError("Parameter zone is required."); | 890 throw new core.ArgumentError("Parameter zone is required."); |
840 } | 891 } |
841 if (clusterId == null) { | 892 if (clusterId == null) { |
842 throw new core.ArgumentError("Parameter clusterId is required."); | 893 throw new core.ArgumentError("Parameter clusterId is required."); |
843 } | 894 } |
844 if (nodePoolId == null) { | |
845 throw new core.ArgumentError("Parameter nodePoolId is required."); | |
846 } | |
847 | 895 |
848 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId'); | 896 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + ':setNetworkPolicy'; |
849 | 897 |
850 var _response = _requester.request(_url, | 898 var _response = _requester.request(_url, |
851 "GET", | 899 "POST", |
852 body: _body, | 900 body: _body, |
853 queryParams: _queryParams, | 901 queryParams: _queryParams, |
854 uploadOptions: _uploadOptions, | 902 uploadOptions: _uploadOptions, |
855 uploadMedia: _uploadMedia, | 903 uploadMedia: _uploadMedia, |
856 downloadOptions: _downloadOptions); | 904 downloadOptions: _downloadOptions); |
857 return _response.then((data) => new NodePool.fromJson(data)); | 905 return _response.then((data) => new Operation.fromJson(data)); |
858 } | 906 } |
859 | 907 |
860 /** | 908 /** |
861 * Lists the node pools for a cluster. | 909 * Start master IP rotation. |
| 910 * |
| 911 * [request] - The metadata request object. |
862 * | 912 * |
863 * Request parameters: | 913 * Request parameters: |
864 * | 914 * |
865 * [projectId] - The Google Developers Console [project ID or project | 915 * [projectId] - The Google Developers Console [project ID or project |
866 * number](https://developers.google.com/console/help/new/#projectnumber). | 916 * number](https://developers.google.com/console/help/new/#projectnumber). |
867 * | 917 * |
868 * [zone] - The name of the Google Compute Engine | 918 * [zone] - The name of the Google Compute Engine |
869 * [zone](/compute/docs/zones#available) in which the cluster | 919 * [zone](/compute/docs/zones#available) in which the cluster |
870 * resides. | 920 * resides. |
871 * | 921 * |
872 * [clusterId] - The name of the cluster. | 922 * [clusterId] - The name of the cluster. |
873 * | 923 * |
874 * Completes with a [ListNodePoolsResponse]. | 924 * Completes with a [Operation]. |
875 * | 925 * |
876 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 926 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
877 * error. | 927 * error. |
878 * | 928 * |
879 * If the used [http.Client] completes with an error when making a REST call, | 929 * If the used [http.Client] completes with an error when making a REST call, |
880 * this method will complete with the same error. | 930 * this method will complete with the same error. |
881 */ | 931 */ |
882 async.Future<ListNodePoolsResponse> list(core.String projectId, core.String zo
ne, core.String clusterId) { | 932 async.Future<Operation> startIpRotation(StartIPRotationRequest request, core.S
tring projectId, core.String zone, core.String clusterId) { |
883 var _url = null; | 933 var _url = null; |
884 var _queryParams = new core.Map(); | 934 var _queryParams = new core.Map(); |
885 var _uploadMedia = null; | 935 var _uploadMedia = null; |
886 var _uploadOptions = null; | 936 var _uploadOptions = null; |
887 var _downloadOptions = commons.DownloadOptions.Metadata; | 937 var _downloadOptions = commons.DownloadOptions.Metadata; |
888 var _body = null; | 938 var _body = null; |
889 | 939 |
| 940 if (request != null) { |
| 941 _body = convert.JSON.encode((request).toJson()); |
| 942 } |
890 if (projectId == null) { | 943 if (projectId == null) { |
891 throw new core.ArgumentError("Parameter projectId is required."); | 944 throw new core.ArgumentError("Parameter projectId is required."); |
892 } | 945 } |
893 if (zone == null) { | 946 if (zone == null) { |
894 throw new core.ArgumentError("Parameter zone is required."); | 947 throw new core.ArgumentError("Parameter zone is required."); |
895 } | 948 } |
896 if (clusterId == null) { | 949 if (clusterId == null) { |
897 throw new core.ArgumentError("Parameter clusterId is required."); | 950 throw new core.ArgumentError("Parameter clusterId is required."); |
898 } | 951 } |
899 | 952 |
900 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools'; | 953 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + ':startIpRotation'; |
901 | 954 |
902 var _response = _requester.request(_url, | 955 var _response = _requester.request(_url, |
903 "GET", | 956 "POST", |
904 body: _body, | 957 body: _body, |
905 queryParams: _queryParams, | 958 queryParams: _queryParams, |
906 uploadOptions: _uploadOptions, | 959 uploadOptions: _uploadOptions, |
907 uploadMedia: _uploadMedia, | 960 uploadMedia: _uploadMedia, |
908 downloadOptions: _downloadOptions); | 961 downloadOptions: _downloadOptions); |
909 return _response.then((data) => new ListNodePoolsResponse.fromJson(data)); | 962 return _response.then((data) => new Operation.fromJson(data)); |
910 } | 963 } |
911 | 964 |
912 /** | 965 /** |
913 * Roll back the previously Aborted or Failed NodePool upgrade. | 966 * Updates the settings of a specific cluster. |
914 * This will be an no-op if the last upgrade successfully completed. | |
915 * | 967 * |
916 * [request] - The metadata request object. | 968 * [request] - The metadata request object. |
917 * | 969 * |
918 * Request parameters: | 970 * Request parameters: |
919 * | 971 * |
920 * [projectId] - The Google Developers Console [project ID or project | 972 * [projectId] - The Google Developers Console [project ID or project |
921 * number](https://support.google.com/cloud/answer/6158840). | 973 * number](https://support.google.com/cloud/answer/6158840). |
922 * | 974 * |
923 * [zone] - The name of the Google Compute Engine | 975 * [zone] - The name of the Google Compute Engine |
924 * [zone](/compute/docs/zones#available) in which the cluster | 976 * [zone](/compute/docs/zones#available) in which the cluster |
925 * resides. | 977 * resides. |
926 * | 978 * |
927 * [clusterId] - The name of the cluster to rollback. | 979 * [clusterId] - The name of the cluster to upgrade. |
928 * | |
929 * [nodePoolId] - The name of the node pool to rollback. | |
930 * | 980 * |
931 * Completes with a [Operation]. | 981 * Completes with a [Operation]. |
932 * | 982 * |
933 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 983 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
934 * error. | 984 * error. |
935 * | 985 * |
936 * If the used [http.Client] completes with an error when making a REST call, | 986 * If the used [http.Client] completes with an error when making a REST call, |
937 * this method will complete with the same error. | 987 * this method will complete with the same error. |
938 */ | 988 */ |
939 async.Future<Operation> rollback(RollbackNodePoolUpgradeRequest request, core.
String projectId, core.String zone, core.String clusterId, core.String nodePoolI
d) { | 989 async.Future<Operation> update(UpdateClusterRequest request, core.String proje
ctId, core.String zone, core.String clusterId) { |
940 var _url = null; | 990 var _url = null; |
941 var _queryParams = new core.Map(); | 991 var _queryParams = new core.Map(); |
942 var _uploadMedia = null; | 992 var _uploadMedia = null; |
943 var _uploadOptions = null; | 993 var _uploadOptions = null; |
944 var _downloadOptions = commons.DownloadOptions.Metadata; | 994 var _downloadOptions = commons.DownloadOptions.Metadata; |
945 var _body = null; | 995 var _body = null; |
946 | 996 |
947 if (request != null) { | 997 if (request != null) { |
948 _body = convert.JSON.encode((request).toJson()); | 998 _body = convert.JSON.encode((request).toJson()); |
949 } | 999 } |
950 if (projectId == null) { | 1000 if (projectId == null) { |
951 throw new core.ArgumentError("Parameter projectId is required."); | 1001 throw new core.ArgumentError("Parameter projectId is required."); |
952 } | 1002 } |
953 if (zone == null) { | 1003 if (zone == null) { |
954 throw new core.ArgumentError("Parameter zone is required."); | 1004 throw new core.ArgumentError("Parameter zone is required."); |
955 } | 1005 } |
956 if (clusterId == null) { | 1006 if (clusterId == null) { |
957 throw new core.ArgumentError("Parameter clusterId is required."); | 1007 throw new core.ArgumentError("Parameter clusterId is required."); |
958 } | 1008 } |
959 if (nodePoolId == null) { | |
960 throw new core.ArgumentError("Parameter nodePoolId is required."); | |
961 } | |
962 | 1009 |
963 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId') + ':rollback'; | 1010 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId'); |
964 | 1011 |
965 var _response = _requester.request(_url, | 1012 var _response = _requester.request(_url, |
966 "POST", | 1013 "PUT", |
967 body: _body, | 1014 body: _body, |
968 queryParams: _queryParams, | 1015 queryParams: _queryParams, |
969 uploadOptions: _uploadOptions, | 1016 uploadOptions: _uploadOptions, |
970 uploadMedia: _uploadMedia, | 1017 uploadMedia: _uploadMedia, |
971 downloadOptions: _downloadOptions); | 1018 downloadOptions: _downloadOptions); |
972 return _response.then((data) => new Operation.fromJson(data)); | 1019 return _response.then((data) => new Operation.fromJson(data)); |
973 } | 1020 } |
974 | 1021 |
| 1022 } |
| 1023 |
| 1024 |
| 1025 class ProjectsZonesClustersNodePoolsResourceApi { |
| 1026 final commons.ApiRequester _requester; |
| 1027 |
| 1028 ProjectsZonesClustersNodePoolsResourceApi(commons.ApiRequester client) : |
| 1029 _requester = client; |
| 1030 |
975 /** | 1031 /** |
976 * Sets the NodeManagement options for a node pool. | 1032 * Sets the autoscaling settings of a specific node pool. |
977 * | 1033 * |
978 * [request] - The metadata request object. | 1034 * [request] - The metadata request object. |
979 * | 1035 * |
980 * Request parameters: | 1036 * Request parameters: |
981 * | 1037 * |
982 * [projectId] - The Google Developers Console [project ID or project | 1038 * [projectId] - The Google Developers Console [project ID or project |
983 * number](https://support.google.com/cloud/answer/6158840). | 1039 * number](https://support.google.com/cloud/answer/6158840). |
984 * | 1040 * |
985 * [zone] - The name of the Google Compute Engine | 1041 * [zone] - The name of the Google Compute Engine |
986 * [zone](/compute/docs/zones#available) in which the cluster | 1042 * [zone](/compute/docs/zones#available) in which the cluster |
987 * resides. | 1043 * resides. |
988 * | 1044 * |
989 * [clusterId] - The name of the cluster to update. | 1045 * [clusterId] - The name of the cluster to upgrade. |
990 * | 1046 * |
991 * [nodePoolId] - The name of the node pool to update. | 1047 * [nodePoolId] - The name of the node pool to upgrade. |
992 * | 1048 * |
993 * Completes with a [Operation]. | 1049 * Completes with a [Operation]. |
994 * | 1050 * |
995 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1051 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
996 * error. | 1052 * error. |
997 * | 1053 * |
998 * If the used [http.Client] completes with an error when making a REST call, | 1054 * If the used [http.Client] completes with an error when making a REST call, |
999 * this method will complete with the same error. | 1055 * this method will complete with the same error. |
1000 */ | 1056 */ |
1001 async.Future<Operation> setManagement(SetNodePoolManagementRequest request, co
re.String projectId, core.String zone, core.String clusterId, core.String nodePo
olId) { | 1057 async.Future<Operation> autoscaling(SetNodePoolAutoscalingRequest request, cor
e.String projectId, core.String zone, core.String clusterId, core.String nodePoo
lId) { |
1002 var _url = null; | 1058 var _url = null; |
1003 var _queryParams = new core.Map(); | 1059 var _queryParams = new core.Map(); |
1004 var _uploadMedia = null; | 1060 var _uploadMedia = null; |
1005 var _uploadOptions = null; | 1061 var _uploadOptions = null; |
1006 var _downloadOptions = commons.DownloadOptions.Metadata; | 1062 var _downloadOptions = commons.DownloadOptions.Metadata; |
1007 var _body = null; | 1063 var _body = null; |
1008 | 1064 |
1009 if (request != null) { | 1065 if (request != null) { |
1010 _body = convert.JSON.encode((request).toJson()); | 1066 _body = convert.JSON.encode((request).toJson()); |
1011 } | 1067 } |
1012 if (projectId == null) { | 1068 if (projectId == null) { |
1013 throw new core.ArgumentError("Parameter projectId is required."); | 1069 throw new core.ArgumentError("Parameter projectId is required."); |
1014 } | 1070 } |
1015 if (zone == null) { | 1071 if (zone == null) { |
1016 throw new core.ArgumentError("Parameter zone is required."); | 1072 throw new core.ArgumentError("Parameter zone is required."); |
1017 } | 1073 } |
1018 if (clusterId == null) { | 1074 if (clusterId == null) { |
1019 throw new core.ArgumentError("Parameter clusterId is required."); | 1075 throw new core.ArgumentError("Parameter clusterId is required."); |
1020 } | 1076 } |
1021 if (nodePoolId == null) { | 1077 if (nodePoolId == null) { |
1022 throw new core.ArgumentError("Parameter nodePoolId is required."); | 1078 throw new core.ArgumentError("Parameter nodePoolId is required."); |
1023 } | 1079 } |
1024 | 1080 |
1025 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId') + '/setManagement'; | 1081 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId') + '/autoscaling'; |
1026 | 1082 |
1027 var _response = _requester.request(_url, | 1083 var _response = _requester.request(_url, |
1028 "POST", | 1084 "POST", |
1029 body: _body, | 1085 body: _body, |
1030 queryParams: _queryParams, | 1086 queryParams: _queryParams, |
1031 uploadOptions: _uploadOptions, | 1087 uploadOptions: _uploadOptions, |
1032 uploadMedia: _uploadMedia, | 1088 uploadMedia: _uploadMedia, |
1033 downloadOptions: _downloadOptions); | 1089 downloadOptions: _downloadOptions); |
1034 return _response.then((data) => new Operation.fromJson(data)); | 1090 return _response.then((data) => new Operation.fromJson(data)); |
1035 } | 1091 } |
1036 | 1092 |
1037 } | |
1038 | |
1039 | |
1040 class ProjectsZonesOperationsResourceApi { | |
1041 final commons.ApiRequester _requester; | |
1042 | |
1043 ProjectsZonesOperationsResourceApi(commons.ApiRequester client) : | |
1044 _requester = client; | |
1045 | |
1046 /** | 1093 /** |
1047 * Cancels the specified operation. | 1094 * Creates a node pool for a cluster. |
1048 * | 1095 * |
1049 * [request] - The metadata request object. | 1096 * [request] - The metadata request object. |
1050 * | 1097 * |
1051 * Request parameters: | 1098 * Request parameters: |
1052 * | 1099 * |
1053 * [projectId] - The Google Developers Console [project ID or project | 1100 * [projectId] - The Google Developers Console [project ID or project |
1054 * number](https://support.google.com/cloud/answer/6158840). | 1101 * number](https://developers.google.com/console/help/new/#projectnumber). |
1055 * | 1102 * |
1056 * [zone] - The name of the Google Compute Engine | 1103 * [zone] - The name of the Google Compute Engine |
1057 * [zone](/compute/docs/zones#available) in which the operation resides. | 1104 * [zone](/compute/docs/zones#available) in which the cluster |
| 1105 * resides. |
1058 * | 1106 * |
1059 * [operationId] - The server-assigned `name` of the operation. | 1107 * [clusterId] - The name of the cluster. |
1060 * | 1108 * |
1061 * Completes with a [Empty]. | 1109 * Completes with a [Operation]. |
1062 * | 1110 * |
1063 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1111 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1064 * error. | 1112 * error. |
1065 * | 1113 * |
1066 * If the used [http.Client] completes with an error when making a REST call, | 1114 * If the used [http.Client] completes with an error when making a REST call, |
1067 * this method will complete with the same error. | 1115 * this method will complete with the same error. |
1068 */ | 1116 */ |
1069 async.Future<Empty> cancel(CancelOperationRequest request, core.String project
Id, core.String zone, core.String operationId) { | 1117 async.Future<Operation> create(CreateNodePoolRequest request, core.String proj
ectId, core.String zone, core.String clusterId) { |
1070 var _url = null; | 1118 var _url = null; |
1071 var _queryParams = new core.Map(); | 1119 var _queryParams = new core.Map(); |
1072 var _uploadMedia = null; | 1120 var _uploadMedia = null; |
1073 var _uploadOptions = null; | 1121 var _uploadOptions = null; |
1074 var _downloadOptions = commons.DownloadOptions.Metadata; | 1122 var _downloadOptions = commons.DownloadOptions.Metadata; |
1075 var _body = null; | 1123 var _body = null; |
1076 | 1124 |
1077 if (request != null) { | 1125 if (request != null) { |
1078 _body = convert.JSON.encode((request).toJson()); | 1126 _body = convert.JSON.encode((request).toJson()); |
1079 } | 1127 } |
1080 if (projectId == null) { | 1128 if (projectId == null) { |
1081 throw new core.ArgumentError("Parameter projectId is required."); | 1129 throw new core.ArgumentError("Parameter projectId is required."); |
1082 } | 1130 } |
1083 if (zone == null) { | 1131 if (zone == null) { |
1084 throw new core.ArgumentError("Parameter zone is required."); | 1132 throw new core.ArgumentError("Parameter zone is required."); |
1085 } | 1133 } |
1086 if (operationId == null) { | 1134 if (clusterId == null) { |
1087 throw new core.ArgumentError("Parameter operationId is required."); | 1135 throw new core.ArgumentError("Parameter clusterId is required."); |
1088 } | 1136 } |
1089 | 1137 |
1090 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/operations/' + commons.Escaper.
ecapeVariable('$operationId') + ':cancel'; | 1138 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools'; |
1091 | 1139 |
1092 var _response = _requester.request(_url, | 1140 var _response = _requester.request(_url, |
1093 "POST", | 1141 "POST", |
1094 body: _body, | 1142 body: _body, |
1095 queryParams: _queryParams, | 1143 queryParams: _queryParams, |
1096 uploadOptions: _uploadOptions, | 1144 uploadOptions: _uploadOptions, |
1097 uploadMedia: _uploadMedia, | 1145 uploadMedia: _uploadMedia, |
1098 downloadOptions: _downloadOptions); | 1146 downloadOptions: _downloadOptions); |
1099 return _response.then((data) => new Empty.fromJson(data)); | 1147 return _response.then((data) => new Operation.fromJson(data)); |
1100 } | 1148 } |
1101 | 1149 |
1102 /** | 1150 /** |
1103 * Gets the specified operation. | 1151 * Deletes a node pool from a cluster. |
1104 * | 1152 * |
1105 * Request parameters: | 1153 * Request parameters: |
1106 * | 1154 * |
1107 * [projectId] - The Google Developers Console [project ID or project | 1155 * [projectId] - The Google Developers Console [project ID or project |
1108 * number](https://support.google.com/cloud/answer/6158840). | 1156 * number](https://developers.google.com/console/help/new/#projectnumber). |
1109 * | 1157 * |
1110 * [zone] - The name of the Google Compute Engine | 1158 * [zone] - The name of the Google Compute Engine |
1111 * [zone](/compute/docs/zones#available) in which the cluster | 1159 * [zone](/compute/docs/zones#available) in which the cluster |
1112 * resides. | 1160 * resides. |
1113 * | 1161 * |
1114 * [operationId] - The server-assigned `name` of the operation. | 1162 * [clusterId] - The name of the cluster. |
| 1163 * |
| 1164 * [nodePoolId] - The name of the node pool to delete. |
1115 * | 1165 * |
1116 * Completes with a [Operation]. | 1166 * Completes with a [Operation]. |
1117 * | 1167 * |
1118 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1168 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1119 * error. | 1169 * error. |
1120 * | 1170 * |
1121 * If the used [http.Client] completes with an error when making a REST call, | 1171 * If the used [http.Client] completes with an error when making a REST call, |
1122 * this method will complete with the same error. | 1172 * this method will complete with the same error. |
1123 */ | 1173 */ |
1124 async.Future<Operation> get(core.String projectId, core.String zone, core.Stri
ng operationId) { | 1174 async.Future<Operation> delete(core.String projectId, core.String zone, core.S
tring clusterId, core.String nodePoolId) { |
1125 var _url = null; | 1175 var _url = null; |
1126 var _queryParams = new core.Map(); | 1176 var _queryParams = new core.Map(); |
1127 var _uploadMedia = null; | 1177 var _uploadMedia = null; |
1128 var _uploadOptions = null; | 1178 var _uploadOptions = null; |
1129 var _downloadOptions = commons.DownloadOptions.Metadata; | 1179 var _downloadOptions = commons.DownloadOptions.Metadata; |
1130 var _body = null; | 1180 var _body = null; |
1131 | 1181 |
1132 if (projectId == null) { | 1182 if (projectId == null) { |
1133 throw new core.ArgumentError("Parameter projectId is required."); | 1183 throw new core.ArgumentError("Parameter projectId is required."); |
1134 } | 1184 } |
1135 if (zone == null) { | 1185 if (zone == null) { |
1136 throw new core.ArgumentError("Parameter zone is required."); | 1186 throw new core.ArgumentError("Parameter zone is required."); |
1137 } | 1187 } |
1138 if (operationId == null) { | 1188 if (clusterId == null) { |
1139 throw new core.ArgumentError("Parameter operationId is required."); | 1189 throw new core.ArgumentError("Parameter clusterId is required."); |
| 1190 } |
| 1191 if (nodePoolId == null) { |
| 1192 throw new core.ArgumentError("Parameter nodePoolId is required."); |
1140 } | 1193 } |
1141 | 1194 |
1142 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/operations/' + commons.Escaper.
ecapeVariable('$operationId'); | 1195 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId'); |
1143 | 1196 |
1144 var _response = _requester.request(_url, | 1197 var _response = _requester.request(_url, |
1145 "GET", | 1198 "DELETE", |
1146 body: _body, | 1199 body: _body, |
1147 queryParams: _queryParams, | 1200 queryParams: _queryParams, |
1148 uploadOptions: _uploadOptions, | 1201 uploadOptions: _uploadOptions, |
1149 uploadMedia: _uploadMedia, | 1202 uploadMedia: _uploadMedia, |
1150 downloadOptions: _downloadOptions); | 1203 downloadOptions: _downloadOptions); |
1151 return _response.then((data) => new Operation.fromJson(data)); | 1204 return _response.then((data) => new Operation.fromJson(data)); |
1152 } | 1205 } |
1153 | 1206 |
1154 /** | 1207 /** |
1155 * Lists all operations in a project in a specific zone or all zones. | 1208 * Retrieves the node pool requested. |
1156 * | 1209 * |
1157 * Request parameters: | 1210 * Request parameters: |
1158 * | 1211 * |
1159 * [projectId] - The Google Developers Console [project ID or project | 1212 * [projectId] - The Google Developers Console [project ID or project |
1160 * number](https://support.google.com/cloud/answer/6158840). | 1213 * number](https://developers.google.com/console/help/new/#projectnumber). |
1161 * | 1214 * |
1162 * [zone] - The name of the Google Compute Engine | 1215 * [zone] - The name of the Google Compute Engine |
1163 * [zone](/compute/docs/zones#available) | 1216 * [zone](/compute/docs/zones#available) in which the cluster |
1164 * to return operations for, or `-` for all zones. | 1217 * resides. |
1165 * | 1218 * |
1166 * Completes with a [ListOperationsResponse]. | 1219 * [clusterId] - The name of the cluster. |
| 1220 * |
| 1221 * [nodePoolId] - The name of the node pool. |
| 1222 * |
| 1223 * Completes with a [NodePool]. |
1167 * | 1224 * |
1168 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1225 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1169 * error. | 1226 * error. |
1170 * | 1227 * |
1171 * If the used [http.Client] completes with an error when making a REST call, | 1228 * If the used [http.Client] completes with an error when making a REST call, |
1172 * this method will complete with the same error. | 1229 * this method will complete with the same error. |
1173 */ | 1230 */ |
1174 async.Future<ListOperationsResponse> list(core.String projectId, core.String z
one) { | 1231 async.Future<NodePool> get(core.String projectId, core.String zone, core.Strin
g clusterId, core.String nodePoolId) { |
1175 var _url = null; | 1232 var _url = null; |
1176 var _queryParams = new core.Map(); | 1233 var _queryParams = new core.Map(); |
1177 var _uploadMedia = null; | 1234 var _uploadMedia = null; |
1178 var _uploadOptions = null; | 1235 var _uploadOptions = null; |
1179 var _downloadOptions = commons.DownloadOptions.Metadata; | 1236 var _downloadOptions = commons.DownloadOptions.Metadata; |
1180 var _body = null; | 1237 var _body = null; |
1181 | 1238 |
1182 if (projectId == null) { | 1239 if (projectId == null) { |
1183 throw new core.ArgumentError("Parameter projectId is required."); | 1240 throw new core.ArgumentError("Parameter projectId is required."); |
1184 } | 1241 } |
1185 if (zone == null) { | 1242 if (zone == null) { |
1186 throw new core.ArgumentError("Parameter zone is required."); | 1243 throw new core.ArgumentError("Parameter zone is required."); |
1187 } | 1244 } |
| 1245 if (clusterId == null) { |
| 1246 throw new core.ArgumentError("Parameter clusterId is required."); |
| 1247 } |
| 1248 if (nodePoolId == null) { |
| 1249 throw new core.ArgumentError("Parameter nodePoolId is required."); |
| 1250 } |
| 1251 |
| 1252 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId'); |
| 1253 |
| 1254 var _response = _requester.request(_url, |
| 1255 "GET", |
| 1256 body: _body, |
| 1257 queryParams: _queryParams, |
| 1258 uploadOptions: _uploadOptions, |
| 1259 uploadMedia: _uploadMedia, |
| 1260 downloadOptions: _downloadOptions); |
| 1261 return _response.then((data) => new NodePool.fromJson(data)); |
| 1262 } |
| 1263 |
| 1264 /** |
| 1265 * Lists the node pools for a cluster. |
| 1266 * |
| 1267 * Request parameters: |
| 1268 * |
| 1269 * [projectId] - The Google Developers Console [project ID or project |
| 1270 * number](https://developers.google.com/console/help/new/#projectnumber). |
| 1271 * |
| 1272 * [zone] - The name of the Google Compute Engine |
| 1273 * [zone](/compute/docs/zones#available) in which the cluster |
| 1274 * resides. |
| 1275 * |
| 1276 * [clusterId] - The name of the cluster. |
| 1277 * |
| 1278 * Completes with a [ListNodePoolsResponse]. |
| 1279 * |
| 1280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1281 * error. |
| 1282 * |
| 1283 * If the used [http.Client] completes with an error when making a REST call, |
| 1284 * this method will complete with the same error. |
| 1285 */ |
| 1286 async.Future<ListNodePoolsResponse> list(core.String projectId, core.String zo
ne, core.String clusterId) { |
| 1287 var _url = null; |
| 1288 var _queryParams = new core.Map(); |
| 1289 var _uploadMedia = null; |
| 1290 var _uploadOptions = null; |
| 1291 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1292 var _body = null; |
| 1293 |
| 1294 if (projectId == null) { |
| 1295 throw new core.ArgumentError("Parameter projectId is required."); |
| 1296 } |
| 1297 if (zone == null) { |
| 1298 throw new core.ArgumentError("Parameter zone is required."); |
| 1299 } |
| 1300 if (clusterId == null) { |
| 1301 throw new core.ArgumentError("Parameter clusterId is required."); |
| 1302 } |
| 1303 |
| 1304 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools'; |
| 1305 |
| 1306 var _response = _requester.request(_url, |
| 1307 "GET", |
| 1308 body: _body, |
| 1309 queryParams: _queryParams, |
| 1310 uploadOptions: _uploadOptions, |
| 1311 uploadMedia: _uploadMedia, |
| 1312 downloadOptions: _downloadOptions); |
| 1313 return _response.then((data) => new ListNodePoolsResponse.fromJson(data)); |
| 1314 } |
| 1315 |
| 1316 /** |
| 1317 * Roll back the previously Aborted or Failed NodePool upgrade. |
| 1318 * This will be an no-op if the last upgrade successfully completed. |
| 1319 * |
| 1320 * [request] - The metadata request object. |
| 1321 * |
| 1322 * Request parameters: |
| 1323 * |
| 1324 * [projectId] - The Google Developers Console [project ID or project |
| 1325 * number](https://support.google.com/cloud/answer/6158840). |
| 1326 * |
| 1327 * [zone] - The name of the Google Compute Engine |
| 1328 * [zone](/compute/docs/zones#available) in which the cluster |
| 1329 * resides. |
| 1330 * |
| 1331 * [clusterId] - The name of the cluster to rollback. |
| 1332 * |
| 1333 * [nodePoolId] - The name of the node pool to rollback. |
| 1334 * |
| 1335 * Completes with a [Operation]. |
| 1336 * |
| 1337 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1338 * error. |
| 1339 * |
| 1340 * If the used [http.Client] completes with an error when making a REST call, |
| 1341 * this method will complete with the same error. |
| 1342 */ |
| 1343 async.Future<Operation> rollback(RollbackNodePoolUpgradeRequest request, core.
String projectId, core.String zone, core.String clusterId, core.String nodePoolI
d) { |
| 1344 var _url = null; |
| 1345 var _queryParams = new core.Map(); |
| 1346 var _uploadMedia = null; |
| 1347 var _uploadOptions = null; |
| 1348 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1349 var _body = null; |
| 1350 |
| 1351 if (request != null) { |
| 1352 _body = convert.JSON.encode((request).toJson()); |
| 1353 } |
| 1354 if (projectId == null) { |
| 1355 throw new core.ArgumentError("Parameter projectId is required."); |
| 1356 } |
| 1357 if (zone == null) { |
| 1358 throw new core.ArgumentError("Parameter zone is required."); |
| 1359 } |
| 1360 if (clusterId == null) { |
| 1361 throw new core.ArgumentError("Parameter clusterId is required."); |
| 1362 } |
| 1363 if (nodePoolId == null) { |
| 1364 throw new core.ArgumentError("Parameter nodePoolId is required."); |
| 1365 } |
| 1366 |
| 1367 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId') + ':rollback'; |
| 1368 |
| 1369 var _response = _requester.request(_url, |
| 1370 "POST", |
| 1371 body: _body, |
| 1372 queryParams: _queryParams, |
| 1373 uploadOptions: _uploadOptions, |
| 1374 uploadMedia: _uploadMedia, |
| 1375 downloadOptions: _downloadOptions); |
| 1376 return _response.then((data) => new Operation.fromJson(data)); |
| 1377 } |
| 1378 |
| 1379 /** |
| 1380 * Sets the NodeManagement options for a node pool. |
| 1381 * |
| 1382 * [request] - The metadata request object. |
| 1383 * |
| 1384 * Request parameters: |
| 1385 * |
| 1386 * [projectId] - The Google Developers Console [project ID or project |
| 1387 * number](https://support.google.com/cloud/answer/6158840). |
| 1388 * |
| 1389 * [zone] - The name of the Google Compute Engine |
| 1390 * [zone](/compute/docs/zones#available) in which the cluster |
| 1391 * resides. |
| 1392 * |
| 1393 * [clusterId] - The name of the cluster to update. |
| 1394 * |
| 1395 * [nodePoolId] - The name of the node pool to update. |
| 1396 * |
| 1397 * Completes with a [Operation]. |
| 1398 * |
| 1399 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1400 * error. |
| 1401 * |
| 1402 * If the used [http.Client] completes with an error when making a REST call, |
| 1403 * this method will complete with the same error. |
| 1404 */ |
| 1405 async.Future<Operation> setManagement(SetNodePoolManagementRequest request, co
re.String projectId, core.String zone, core.String clusterId, core.String nodePo
olId) { |
| 1406 var _url = null; |
| 1407 var _queryParams = new core.Map(); |
| 1408 var _uploadMedia = null; |
| 1409 var _uploadOptions = null; |
| 1410 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1411 var _body = null; |
| 1412 |
| 1413 if (request != null) { |
| 1414 _body = convert.JSON.encode((request).toJson()); |
| 1415 } |
| 1416 if (projectId == null) { |
| 1417 throw new core.ArgumentError("Parameter projectId is required."); |
| 1418 } |
| 1419 if (zone == null) { |
| 1420 throw new core.ArgumentError("Parameter zone is required."); |
| 1421 } |
| 1422 if (clusterId == null) { |
| 1423 throw new core.ArgumentError("Parameter clusterId is required."); |
| 1424 } |
| 1425 if (nodePoolId == null) { |
| 1426 throw new core.ArgumentError("Parameter nodePoolId is required."); |
| 1427 } |
| 1428 |
| 1429 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId') + '/setManagement'; |
| 1430 |
| 1431 var _response = _requester.request(_url, |
| 1432 "POST", |
| 1433 body: _body, |
| 1434 queryParams: _queryParams, |
| 1435 uploadOptions: _uploadOptions, |
| 1436 uploadMedia: _uploadMedia, |
| 1437 downloadOptions: _downloadOptions); |
| 1438 return _response.then((data) => new Operation.fromJson(data)); |
| 1439 } |
| 1440 |
| 1441 /** |
| 1442 * Sets the size of a specific node pool. |
| 1443 * |
| 1444 * [request] - The metadata request object. |
| 1445 * |
| 1446 * Request parameters: |
| 1447 * |
| 1448 * [projectId] - The Google Developers Console [project ID or project |
| 1449 * number](https://support.google.com/cloud/answer/6158840). |
| 1450 * |
| 1451 * [zone] - The name of the Google Compute Engine |
| 1452 * [zone](/compute/docs/zones#available) in which the cluster |
| 1453 * resides. |
| 1454 * |
| 1455 * [clusterId] - The name of the cluster to update. |
| 1456 * |
| 1457 * [nodePoolId] - The name of the node pool to update. |
| 1458 * |
| 1459 * Completes with a [Operation]. |
| 1460 * |
| 1461 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1462 * error. |
| 1463 * |
| 1464 * If the used [http.Client] completes with an error when making a REST call, |
| 1465 * this method will complete with the same error. |
| 1466 */ |
| 1467 async.Future<Operation> setSize(SetNodePoolSizeRequest request, core.String pr
ojectId, core.String zone, core.String clusterId, core.String nodePoolId) { |
| 1468 var _url = null; |
| 1469 var _queryParams = new core.Map(); |
| 1470 var _uploadMedia = null; |
| 1471 var _uploadOptions = null; |
| 1472 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1473 var _body = null; |
| 1474 |
| 1475 if (request != null) { |
| 1476 _body = convert.JSON.encode((request).toJson()); |
| 1477 } |
| 1478 if (projectId == null) { |
| 1479 throw new core.ArgumentError("Parameter projectId is required."); |
| 1480 } |
| 1481 if (zone == null) { |
| 1482 throw new core.ArgumentError("Parameter zone is required."); |
| 1483 } |
| 1484 if (clusterId == null) { |
| 1485 throw new core.ArgumentError("Parameter clusterId is required."); |
| 1486 } |
| 1487 if (nodePoolId == null) { |
| 1488 throw new core.ArgumentError("Parameter nodePoolId is required."); |
| 1489 } |
| 1490 |
| 1491 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId') + '/setSize'; |
| 1492 |
| 1493 var _response = _requester.request(_url, |
| 1494 "POST", |
| 1495 body: _body, |
| 1496 queryParams: _queryParams, |
| 1497 uploadOptions: _uploadOptions, |
| 1498 uploadMedia: _uploadMedia, |
| 1499 downloadOptions: _downloadOptions); |
| 1500 return _response.then((data) => new Operation.fromJson(data)); |
| 1501 } |
| 1502 |
| 1503 /** |
| 1504 * Updates the version and/or image type of a specific node pool. |
| 1505 * |
| 1506 * [request] - The metadata request object. |
| 1507 * |
| 1508 * Request parameters: |
| 1509 * |
| 1510 * [projectId] - The Google Developers Console [project ID or project |
| 1511 * number](https://support.google.com/cloud/answer/6158840). |
| 1512 * |
| 1513 * [zone] - The name of the Google Compute Engine |
| 1514 * [zone](/compute/docs/zones#available) in which the cluster |
| 1515 * resides. |
| 1516 * |
| 1517 * [clusterId] - The name of the cluster to upgrade. |
| 1518 * |
| 1519 * [nodePoolId] - The name of the node pool to upgrade. |
| 1520 * |
| 1521 * Completes with a [Operation]. |
| 1522 * |
| 1523 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1524 * error. |
| 1525 * |
| 1526 * If the used [http.Client] completes with an error when making a REST call, |
| 1527 * this method will complete with the same error. |
| 1528 */ |
| 1529 async.Future<Operation> update(UpdateNodePoolRequest request, core.String proj
ectId, core.String zone, core.String clusterId, core.String nodePoolId) { |
| 1530 var _url = null; |
| 1531 var _queryParams = new core.Map(); |
| 1532 var _uploadMedia = null; |
| 1533 var _uploadOptions = null; |
| 1534 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1535 var _body = null; |
| 1536 |
| 1537 if (request != null) { |
| 1538 _body = convert.JSON.encode((request).toJson()); |
| 1539 } |
| 1540 if (projectId == null) { |
| 1541 throw new core.ArgumentError("Parameter projectId is required."); |
| 1542 } |
| 1543 if (zone == null) { |
| 1544 throw new core.ArgumentError("Parameter zone is required."); |
| 1545 } |
| 1546 if (clusterId == null) { |
| 1547 throw new core.ArgumentError("Parameter clusterId is required."); |
| 1548 } |
| 1549 if (nodePoolId == null) { |
| 1550 throw new core.ArgumentError("Parameter nodePoolId is required."); |
| 1551 } |
| 1552 |
| 1553 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/clusters/' + commons.Escaper.ec
apeVariable('$clusterId') + '/nodePools/' + commons.Escaper.ecapeVariable('$node
PoolId') + '/update'; |
| 1554 |
| 1555 var _response = _requester.request(_url, |
| 1556 "POST", |
| 1557 body: _body, |
| 1558 queryParams: _queryParams, |
| 1559 uploadOptions: _uploadOptions, |
| 1560 uploadMedia: _uploadMedia, |
| 1561 downloadOptions: _downloadOptions); |
| 1562 return _response.then((data) => new Operation.fromJson(data)); |
| 1563 } |
| 1564 |
| 1565 } |
| 1566 |
| 1567 |
| 1568 class ProjectsZonesOperationsResourceApi { |
| 1569 final commons.ApiRequester _requester; |
| 1570 |
| 1571 ProjectsZonesOperationsResourceApi(commons.ApiRequester client) : |
| 1572 _requester = client; |
| 1573 |
| 1574 /** |
| 1575 * Cancels the specified operation. |
| 1576 * |
| 1577 * [request] - The metadata request object. |
| 1578 * |
| 1579 * Request parameters: |
| 1580 * |
| 1581 * [projectId] - The Google Developers Console [project ID or project |
| 1582 * number](https://support.google.com/cloud/answer/6158840). |
| 1583 * |
| 1584 * [zone] - The name of the Google Compute Engine |
| 1585 * [zone](/compute/docs/zones#available) in which the operation resides. |
| 1586 * |
| 1587 * [operationId] - The server-assigned `name` of the operation. |
| 1588 * |
| 1589 * Completes with a [Empty]. |
| 1590 * |
| 1591 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1592 * error. |
| 1593 * |
| 1594 * If the used [http.Client] completes with an error when making a REST call, |
| 1595 * this method will complete with the same error. |
| 1596 */ |
| 1597 async.Future<Empty> cancel(CancelOperationRequest request, core.String project
Id, core.String zone, core.String operationId) { |
| 1598 var _url = null; |
| 1599 var _queryParams = new core.Map(); |
| 1600 var _uploadMedia = null; |
| 1601 var _uploadOptions = null; |
| 1602 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1603 var _body = null; |
| 1604 |
| 1605 if (request != null) { |
| 1606 _body = convert.JSON.encode((request).toJson()); |
| 1607 } |
| 1608 if (projectId == null) { |
| 1609 throw new core.ArgumentError("Parameter projectId is required."); |
| 1610 } |
| 1611 if (zone == null) { |
| 1612 throw new core.ArgumentError("Parameter zone is required."); |
| 1613 } |
| 1614 if (operationId == null) { |
| 1615 throw new core.ArgumentError("Parameter operationId is required."); |
| 1616 } |
| 1617 |
| 1618 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/operations/' + commons.Escaper.
ecapeVariable('$operationId') + ':cancel'; |
| 1619 |
| 1620 var _response = _requester.request(_url, |
| 1621 "POST", |
| 1622 body: _body, |
| 1623 queryParams: _queryParams, |
| 1624 uploadOptions: _uploadOptions, |
| 1625 uploadMedia: _uploadMedia, |
| 1626 downloadOptions: _downloadOptions); |
| 1627 return _response.then((data) => new Empty.fromJson(data)); |
| 1628 } |
| 1629 |
| 1630 /** |
| 1631 * Gets the specified operation. |
| 1632 * |
| 1633 * Request parameters: |
| 1634 * |
| 1635 * [projectId] - The Google Developers Console [project ID or project |
| 1636 * number](https://support.google.com/cloud/answer/6158840). |
| 1637 * |
| 1638 * [zone] - The name of the Google Compute Engine |
| 1639 * [zone](/compute/docs/zones#available) in which the cluster |
| 1640 * resides. |
| 1641 * |
| 1642 * [operationId] - The server-assigned `name` of the operation. |
| 1643 * |
| 1644 * Completes with a [Operation]. |
| 1645 * |
| 1646 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1647 * error. |
| 1648 * |
| 1649 * If the used [http.Client] completes with an error when making a REST call, |
| 1650 * this method will complete with the same error. |
| 1651 */ |
| 1652 async.Future<Operation> get(core.String projectId, core.String zone, core.Stri
ng operationId) { |
| 1653 var _url = null; |
| 1654 var _queryParams = new core.Map(); |
| 1655 var _uploadMedia = null; |
| 1656 var _uploadOptions = null; |
| 1657 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1658 var _body = null; |
| 1659 |
| 1660 if (projectId == null) { |
| 1661 throw new core.ArgumentError("Parameter projectId is required."); |
| 1662 } |
| 1663 if (zone == null) { |
| 1664 throw new core.ArgumentError("Parameter zone is required."); |
| 1665 } |
| 1666 if (operationId == null) { |
| 1667 throw new core.ArgumentError("Parameter operationId is required."); |
| 1668 } |
| 1669 |
| 1670 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/operations/' + commons.Escaper.
ecapeVariable('$operationId'); |
| 1671 |
| 1672 var _response = _requester.request(_url, |
| 1673 "GET", |
| 1674 body: _body, |
| 1675 queryParams: _queryParams, |
| 1676 uploadOptions: _uploadOptions, |
| 1677 uploadMedia: _uploadMedia, |
| 1678 downloadOptions: _downloadOptions); |
| 1679 return _response.then((data) => new Operation.fromJson(data)); |
| 1680 } |
| 1681 |
| 1682 /** |
| 1683 * Lists all operations in a project in a specific zone or all zones. |
| 1684 * |
| 1685 * Request parameters: |
| 1686 * |
| 1687 * [projectId] - The Google Developers Console [project ID or project |
| 1688 * number](https://support.google.com/cloud/answer/6158840). |
| 1689 * |
| 1690 * [zone] - The name of the Google Compute Engine |
| 1691 * [zone](/compute/docs/zones#available) |
| 1692 * to return operations for, or `-` for all zones. |
| 1693 * |
| 1694 * Completes with a [ListOperationsResponse]. |
| 1695 * |
| 1696 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1697 * error. |
| 1698 * |
| 1699 * If the used [http.Client] completes with an error when making a REST call, |
| 1700 * this method will complete with the same error. |
| 1701 */ |
| 1702 async.Future<ListOperationsResponse> list(core.String projectId, core.String z
one) { |
| 1703 var _url = null; |
| 1704 var _queryParams = new core.Map(); |
| 1705 var _uploadMedia = null; |
| 1706 var _uploadOptions = null; |
| 1707 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1708 var _body = null; |
| 1709 |
| 1710 if (projectId == null) { |
| 1711 throw new core.ArgumentError("Parameter projectId is required."); |
| 1712 } |
| 1713 if (zone == null) { |
| 1714 throw new core.ArgumentError("Parameter zone is required."); |
| 1715 } |
1188 | 1716 |
1189 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/operations'; | 1717 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/zone
s/' + commons.Escaper.ecapeVariable('$zone') + '/operations'; |
1190 | 1718 |
1191 var _response = _requester.request(_url, | 1719 var _response = _requester.request(_url, |
1192 "GET", | 1720 "GET", |
1193 body: _body, | 1721 body: _body, |
1194 queryParams: _queryParams, | 1722 queryParams: _queryParams, |
1195 uploadOptions: _uploadOptions, | 1723 uploadOptions: _uploadOptions, |
1196 uploadMedia: _uploadMedia, | 1724 uploadMedia: _uploadMedia, |
1197 downloadOptions: _downloadOptions); | 1725 downloadOptions: _downloadOptions); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 | 1817 |
1290 CancelOperationRequest.fromJson(core.Map _json) { | 1818 CancelOperationRequest.fromJson(core.Map _json) { |
1291 } | 1819 } |
1292 | 1820 |
1293 core.Map<core.String, core.Object> toJson() { | 1821 core.Map<core.String, core.Object> toJson() { |
1294 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1822 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
1295 return _json; | 1823 return _json; |
1296 } | 1824 } |
1297 } | 1825 } |
1298 | 1826 |
| 1827 /** Configuration for client certificates on the cluster. */ |
| 1828 class ClientCertificateConfig { |
| 1829 /** Issue a client certificate. */ |
| 1830 core.bool issueClientCertificate; |
| 1831 |
| 1832 ClientCertificateConfig(); |
| 1833 |
| 1834 ClientCertificateConfig.fromJson(core.Map _json) { |
| 1835 if (_json.containsKey("issueClientCertificate")) { |
| 1836 issueClientCertificate = _json["issueClientCertificate"]; |
| 1837 } |
| 1838 } |
| 1839 |
| 1840 core.Map<core.String, core.Object> toJson() { |
| 1841 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1842 if (issueClientCertificate != null) { |
| 1843 _json["issueClientCertificate"] = issueClientCertificate; |
| 1844 } |
| 1845 return _json; |
| 1846 } |
| 1847 } |
| 1848 |
1299 /** A Google Container Engine cluster. */ | 1849 /** A Google Container Engine cluster. */ |
1300 class Cluster { | 1850 class Cluster { |
1301 /** Configurations for the various addons available to run in the cluster. */ | 1851 /** Configurations for the various addons available to run in the cluster. */ |
1302 AddonsConfig addonsConfig; | 1852 AddonsConfig addonsConfig; |
1303 /** | 1853 /** |
1304 * The IP address range of the container pods in this cluster, in | 1854 * The IP address range of the container pods in this cluster, in |
1305 * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) | 1855 * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) |
1306 * notation (e.g. `10.96.0.0/14`). Leave blank to have | 1856 * notation (e.g. `10.96.0.0/14`). Leave blank to have |
1307 * one automatically chosen or specify a `/14` block in `10.0.0.0/8`. | 1857 * one automatically chosen or specify a `/14` block in `10.0.0.0/8`. |
1308 */ | 1858 */ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 * "node_config") will be used to create a "NodePool" object with an | 1914 * "node_config") will be used to create a "NodePool" object with an |
1365 * auto-generated name. Do not use this and a node_pool at the same time. | 1915 * auto-generated name. Do not use this and a node_pool at the same time. |
1366 */ | 1916 */ |
1367 core.int initialNodeCount; | 1917 core.int initialNodeCount; |
1368 /** | 1918 /** |
1369 * [Output only] The resource URLs of [instance | 1919 * [Output only] The resource URLs of [instance |
1370 * groups](/compute/docs/instance-groups/) associated with this | 1920 * groups](/compute/docs/instance-groups/) associated with this |
1371 * cluster. | 1921 * cluster. |
1372 */ | 1922 */ |
1373 core.List<core.String> instanceGroupUrls; | 1923 core.List<core.String> instanceGroupUrls; |
| 1924 /** Configuration for cluster IP allocation. */ |
| 1925 IPAllocationPolicy ipAllocationPolicy; |
1374 /** The fingerprint of the set of labels for this cluster. */ | 1926 /** The fingerprint of the set of labels for this cluster. */ |
1375 core.String labelFingerprint; | 1927 core.String labelFingerprint; |
1376 /** Configuration for the legacy ABAC authorization mode. */ | 1928 /** Configuration for the legacy ABAC authorization mode. */ |
1377 LegacyAbac legacyAbac; | 1929 LegacyAbac legacyAbac; |
1378 /** | 1930 /** |
1379 * The list of Google Compute Engine | 1931 * The list of Google Compute Engine |
1380 * [locations](/compute/docs/zones#available) in which the cluster's nodes | 1932 * [locations](/compute/docs/zones#available) in which the cluster's nodes |
1381 * should be located. | 1933 * should be located. |
1382 */ | 1934 */ |
1383 core.List<core.String> locations; | 1935 core.List<core.String> locations; |
(...skipping 26 matching lines...) Expand all Loading... |
1410 * * Must end with a number or a letter. | 1962 * * Must end with a number or a letter. |
1411 */ | 1963 */ |
1412 core.String name; | 1964 core.String name; |
1413 /** | 1965 /** |
1414 * The name of the Google Compute Engine | 1966 * The name of the Google Compute Engine |
1415 * [network](/compute/docs/networks-and-firewalls#networks) to which the | 1967 * [network](/compute/docs/networks-and-firewalls#networks) to which the |
1416 * cluster is connected. If left unspecified, the `default` network | 1968 * cluster is connected. If left unspecified, the `default` network |
1417 * will be used. | 1969 * will be used. |
1418 */ | 1970 */ |
1419 core.String network; | 1971 core.String network; |
| 1972 /** Configuration options for the NetworkPolicy feature. */ |
| 1973 NetworkPolicy networkPolicy; |
1420 /** | 1974 /** |
1421 * Parameters used in creating the cluster's nodes. | 1975 * Parameters used in creating the cluster's nodes. |
1422 * See `nodeConfig` for the description of its properties. | 1976 * See `nodeConfig` for the description of its properties. |
1423 * For requests, this field should only be used in lieu of a | 1977 * For requests, this field should only be used in lieu of a |
1424 * "node_pool" object, since this configuration (along with the | 1978 * "node_pool" object, since this configuration (along with the |
1425 * "initial_node_count") will be used to create a "NodePool" object with an | 1979 * "initial_node_count") will be used to create a "NodePool" object with an |
1426 * auto-generated name. Do not use this and a node_pool at the same time. | 1980 * auto-generated name. Do not use this and a node_pool at the same time. |
1427 * For responses, this field will be populated with the node configuration of | 1981 * For responses, this field will be populated with the node configuration of |
1428 * the first node pool. | 1982 * the first node pool. |
1429 * | 1983 * |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1528 } | 2082 } |
1529 if (_json.containsKey("initialClusterVersion")) { | 2083 if (_json.containsKey("initialClusterVersion")) { |
1530 initialClusterVersion = _json["initialClusterVersion"]; | 2084 initialClusterVersion = _json["initialClusterVersion"]; |
1531 } | 2085 } |
1532 if (_json.containsKey("initialNodeCount")) { | 2086 if (_json.containsKey("initialNodeCount")) { |
1533 initialNodeCount = _json["initialNodeCount"]; | 2087 initialNodeCount = _json["initialNodeCount"]; |
1534 } | 2088 } |
1535 if (_json.containsKey("instanceGroupUrls")) { | 2089 if (_json.containsKey("instanceGroupUrls")) { |
1536 instanceGroupUrls = _json["instanceGroupUrls"]; | 2090 instanceGroupUrls = _json["instanceGroupUrls"]; |
1537 } | 2091 } |
| 2092 if (_json.containsKey("ipAllocationPolicy")) { |
| 2093 ipAllocationPolicy = new IPAllocationPolicy.fromJson(_json["ipAllocationPo
licy"]); |
| 2094 } |
1538 if (_json.containsKey("labelFingerprint")) { | 2095 if (_json.containsKey("labelFingerprint")) { |
1539 labelFingerprint = _json["labelFingerprint"]; | 2096 labelFingerprint = _json["labelFingerprint"]; |
1540 } | 2097 } |
1541 if (_json.containsKey("legacyAbac")) { | 2098 if (_json.containsKey("legacyAbac")) { |
1542 legacyAbac = new LegacyAbac.fromJson(_json["legacyAbac"]); | 2099 legacyAbac = new LegacyAbac.fromJson(_json["legacyAbac"]); |
1543 } | 2100 } |
1544 if (_json.containsKey("locations")) { | 2101 if (_json.containsKey("locations")) { |
1545 locations = _json["locations"]; | 2102 locations = _json["locations"]; |
1546 } | 2103 } |
1547 if (_json.containsKey("loggingService")) { | 2104 if (_json.containsKey("loggingService")) { |
1548 loggingService = _json["loggingService"]; | 2105 loggingService = _json["loggingService"]; |
1549 } | 2106 } |
1550 if (_json.containsKey("masterAuth")) { | 2107 if (_json.containsKey("masterAuth")) { |
1551 masterAuth = new MasterAuth.fromJson(_json["masterAuth"]); | 2108 masterAuth = new MasterAuth.fromJson(_json["masterAuth"]); |
1552 } | 2109 } |
1553 if (_json.containsKey("monitoringService")) { | 2110 if (_json.containsKey("monitoringService")) { |
1554 monitoringService = _json["monitoringService"]; | 2111 monitoringService = _json["monitoringService"]; |
1555 } | 2112 } |
1556 if (_json.containsKey("name")) { | 2113 if (_json.containsKey("name")) { |
1557 name = _json["name"]; | 2114 name = _json["name"]; |
1558 } | 2115 } |
1559 if (_json.containsKey("network")) { | 2116 if (_json.containsKey("network")) { |
1560 network = _json["network"]; | 2117 network = _json["network"]; |
1561 } | 2118 } |
| 2119 if (_json.containsKey("networkPolicy")) { |
| 2120 networkPolicy = new NetworkPolicy.fromJson(_json["networkPolicy"]); |
| 2121 } |
1562 if (_json.containsKey("nodeConfig")) { | 2122 if (_json.containsKey("nodeConfig")) { |
1563 nodeConfig = new NodeConfig.fromJson(_json["nodeConfig"]); | 2123 nodeConfig = new NodeConfig.fromJson(_json["nodeConfig"]); |
1564 } | 2124 } |
1565 if (_json.containsKey("nodeIpv4CidrSize")) { | 2125 if (_json.containsKey("nodeIpv4CidrSize")) { |
1566 nodeIpv4CidrSize = _json["nodeIpv4CidrSize"]; | 2126 nodeIpv4CidrSize = _json["nodeIpv4CidrSize"]; |
1567 } | 2127 } |
1568 if (_json.containsKey("nodePools")) { | 2128 if (_json.containsKey("nodePools")) { |
1569 nodePools = _json["nodePools"].map((value) => new NodePool.fromJson(value)
).toList(); | 2129 nodePools = _json["nodePools"].map((value) => new NodePool.fromJson(value)
).toList(); |
1570 } | 2130 } |
1571 if (_json.containsKey("resourceLabels")) { | 2131 if (_json.containsKey("resourceLabels")) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1625 } | 2185 } |
1626 if (initialClusterVersion != null) { | 2186 if (initialClusterVersion != null) { |
1627 _json["initialClusterVersion"] = initialClusterVersion; | 2187 _json["initialClusterVersion"] = initialClusterVersion; |
1628 } | 2188 } |
1629 if (initialNodeCount != null) { | 2189 if (initialNodeCount != null) { |
1630 _json["initialNodeCount"] = initialNodeCount; | 2190 _json["initialNodeCount"] = initialNodeCount; |
1631 } | 2191 } |
1632 if (instanceGroupUrls != null) { | 2192 if (instanceGroupUrls != null) { |
1633 _json["instanceGroupUrls"] = instanceGroupUrls; | 2193 _json["instanceGroupUrls"] = instanceGroupUrls; |
1634 } | 2194 } |
| 2195 if (ipAllocationPolicy != null) { |
| 2196 _json["ipAllocationPolicy"] = (ipAllocationPolicy).toJson(); |
| 2197 } |
1635 if (labelFingerprint != null) { | 2198 if (labelFingerprint != null) { |
1636 _json["labelFingerprint"] = labelFingerprint; | 2199 _json["labelFingerprint"] = labelFingerprint; |
1637 } | 2200 } |
1638 if (legacyAbac != null) { | 2201 if (legacyAbac != null) { |
1639 _json["legacyAbac"] = (legacyAbac).toJson(); | 2202 _json["legacyAbac"] = (legacyAbac).toJson(); |
1640 } | 2203 } |
1641 if (locations != null) { | 2204 if (locations != null) { |
1642 _json["locations"] = locations; | 2205 _json["locations"] = locations; |
1643 } | 2206 } |
1644 if (loggingService != null) { | 2207 if (loggingService != null) { |
1645 _json["loggingService"] = loggingService; | 2208 _json["loggingService"] = loggingService; |
1646 } | 2209 } |
1647 if (masterAuth != null) { | 2210 if (masterAuth != null) { |
1648 _json["masterAuth"] = (masterAuth).toJson(); | 2211 _json["masterAuth"] = (masterAuth).toJson(); |
1649 } | 2212 } |
1650 if (monitoringService != null) { | 2213 if (monitoringService != null) { |
1651 _json["monitoringService"] = monitoringService; | 2214 _json["monitoringService"] = monitoringService; |
1652 } | 2215 } |
1653 if (name != null) { | 2216 if (name != null) { |
1654 _json["name"] = name; | 2217 _json["name"] = name; |
1655 } | 2218 } |
1656 if (network != null) { | 2219 if (network != null) { |
1657 _json["network"] = network; | 2220 _json["network"] = network; |
1658 } | 2221 } |
| 2222 if (networkPolicy != null) { |
| 2223 _json["networkPolicy"] = (networkPolicy).toJson(); |
| 2224 } |
1659 if (nodeConfig != null) { | 2225 if (nodeConfig != null) { |
1660 _json["nodeConfig"] = (nodeConfig).toJson(); | 2226 _json["nodeConfig"] = (nodeConfig).toJson(); |
1661 } | 2227 } |
1662 if (nodeIpv4CidrSize != null) { | 2228 if (nodeIpv4CidrSize != null) { |
1663 _json["nodeIpv4CidrSize"] = nodeIpv4CidrSize; | 2229 _json["nodeIpv4CidrSize"] = nodeIpv4CidrSize; |
1664 } | 2230 } |
1665 if (nodePools != null) { | 2231 if (nodePools != null) { |
1666 _json["nodePools"] = nodePools.map((value) => (value).toJson()).toList(); | 2232 _json["nodePools"] = nodePools.map((value) => (value).toJson()).toList(); |
1667 } | 2233 } |
1668 if (resourceLabels != null) { | 2234 if (resourceLabels != null) { |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1944 } | 2510 } |
1945 } | 2511 } |
1946 | 2512 |
1947 core.Map<core.String, core.Object> toJson() { | 2513 core.Map<core.String, core.Object> toJson() { |
1948 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2514 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
1949 if (disabled != null) { | 2515 if (disabled != null) { |
1950 _json["disabled"] = disabled; | 2516 _json["disabled"] = disabled; |
1951 } | 2517 } |
1952 return _json; | 2518 return _json; |
1953 } | 2519 } |
| 2520 } |
| 2521 |
| 2522 /** Configuration for controlling how IPs are allocated in the cluster. */ |
| 2523 class IPAllocationPolicy { |
| 2524 /** |
| 2525 * The IP address range for the cluster pod IPs. If this field is set, then |
| 2526 * `cluster.cluster_ipv4_cidr` must be left blank. |
| 2527 * |
| 2528 * This field is only applicable when `use_ip_aliases` is true. |
| 2529 * |
| 2530 * Set to blank to have a range will be chosen with the default size. |
| 2531 * |
| 2532 * Set to /netmask (e.g. `/14`) to have a range be chosen with a specific |
| 2533 * netmask. |
| 2534 * |
| 2535 * Set to a |
| 2536 * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) |
| 2537 * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. |
| 2538 * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range |
| 2539 * to use. |
| 2540 */ |
| 2541 core.String clusterIpv4Cidr; |
| 2542 /** |
| 2543 * Whether a new subnetwork will be created automatically for the cluster. |
| 2544 * |
| 2545 * This field is only applicable when `use_ip_aliases` is true. |
| 2546 */ |
| 2547 core.bool createSubnetwork; |
| 2548 /** |
| 2549 * The IP address range of the instance IPs in this cluster. |
| 2550 * |
| 2551 * This is applicable only if `create_subnetwork` is true. |
| 2552 * |
| 2553 * Set to blank to have a range will be chosen with the default size. |
| 2554 * |
| 2555 * Set to /netmask (e.g. `/14`) to have a range be chosen with a specific |
| 2556 * netmask. |
| 2557 * |
| 2558 * Set to a |
| 2559 * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) |
| 2560 * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. |
| 2561 * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range |
| 2562 * to use. |
| 2563 */ |
| 2564 core.String nodeIpv4Cidr; |
| 2565 /** |
| 2566 * The IP address range of the services IPs in this cluster. If blank, a range |
| 2567 * will be automatically chosen with the default size. |
| 2568 * |
| 2569 * This field is only applicable when `use_ip_aliases` is true. |
| 2570 * |
| 2571 * Set to blank to have a range will be chosen with the default size. |
| 2572 * |
| 2573 * Set to /netmask (e.g. `/14`) to have a range be chosen with a specific |
| 2574 * netmask. |
| 2575 * |
| 2576 * Set to a |
| 2577 * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) |
| 2578 * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. |
| 2579 * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range |
| 2580 * to use. |
| 2581 */ |
| 2582 core.String servicesIpv4Cidr; |
| 2583 /** |
| 2584 * A custom subnetwork name to be used if `create_subnetwork` is true. If |
| 2585 * this field is empty, then an automatic name will choosen for the new |
| 2586 * subnetwork. |
| 2587 */ |
| 2588 core.String subnetworkName; |
| 2589 /** Whether alias IPs will be used for pod IPs in the cluster. */ |
| 2590 core.bool useIpAliases; |
| 2591 |
| 2592 IPAllocationPolicy(); |
| 2593 |
| 2594 IPAllocationPolicy.fromJson(core.Map _json) { |
| 2595 if (_json.containsKey("clusterIpv4Cidr")) { |
| 2596 clusterIpv4Cidr = _json["clusterIpv4Cidr"]; |
| 2597 } |
| 2598 if (_json.containsKey("createSubnetwork")) { |
| 2599 createSubnetwork = _json["createSubnetwork"]; |
| 2600 } |
| 2601 if (_json.containsKey("nodeIpv4Cidr")) { |
| 2602 nodeIpv4Cidr = _json["nodeIpv4Cidr"]; |
| 2603 } |
| 2604 if (_json.containsKey("servicesIpv4Cidr")) { |
| 2605 servicesIpv4Cidr = _json["servicesIpv4Cidr"]; |
| 2606 } |
| 2607 if (_json.containsKey("subnetworkName")) { |
| 2608 subnetworkName = _json["subnetworkName"]; |
| 2609 } |
| 2610 if (_json.containsKey("useIpAliases")) { |
| 2611 useIpAliases = _json["useIpAliases"]; |
| 2612 } |
| 2613 } |
| 2614 |
| 2615 core.Map<core.String, core.Object> toJson() { |
| 2616 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 2617 if (clusterIpv4Cidr != null) { |
| 2618 _json["clusterIpv4Cidr"] = clusterIpv4Cidr; |
| 2619 } |
| 2620 if (createSubnetwork != null) { |
| 2621 _json["createSubnetwork"] = createSubnetwork; |
| 2622 } |
| 2623 if (nodeIpv4Cidr != null) { |
| 2624 _json["nodeIpv4Cidr"] = nodeIpv4Cidr; |
| 2625 } |
| 2626 if (servicesIpv4Cidr != null) { |
| 2627 _json["servicesIpv4Cidr"] = servicesIpv4Cidr; |
| 2628 } |
| 2629 if (subnetworkName != null) { |
| 2630 _json["subnetworkName"] = subnetworkName; |
| 2631 } |
| 2632 if (useIpAliases != null) { |
| 2633 _json["useIpAliases"] = useIpAliases; |
| 2634 } |
| 2635 return _json; |
| 2636 } |
1954 } | 2637 } |
1955 | 2638 |
1956 /** | 2639 /** |
1957 * Configuration for the legacy Attribute Based Access Control authorization | 2640 * Configuration for the legacy Attribute Based Access Control authorization |
1958 * mode. | 2641 * mode. |
1959 */ | 2642 */ |
1960 class LegacyAbac { | 2643 class LegacyAbac { |
1961 /** | 2644 /** |
1962 * Whether the ABAC authorizer is enabled for this cluster. When enabled, | 2645 * Whether the ABAC authorizer is enabled for this cluster. When enabled, |
1963 * identities in the system, including service accounts, nodes, and | 2646 * identities in the system, including service accounts, nodes, and |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2079 * Authentication can be done using HTTP basic auth or using client | 2762 * Authentication can be done using HTTP basic auth or using client |
2080 * certificates. | 2763 * certificates. |
2081 */ | 2764 */ |
2082 class MasterAuth { | 2765 class MasterAuth { |
2083 /** | 2766 /** |
2084 * [Output only] Base64-encoded public certificate used by clients to | 2767 * [Output only] Base64-encoded public certificate used by clients to |
2085 * authenticate to the cluster endpoint. | 2768 * authenticate to the cluster endpoint. |
2086 */ | 2769 */ |
2087 core.String clientCertificate; | 2770 core.String clientCertificate; |
2088 /** | 2771 /** |
| 2772 * Configuration for client certificate authentication on the cluster. If no |
| 2773 * configuration is specified, a client certificate is issued. |
| 2774 */ |
| 2775 ClientCertificateConfig clientCertificateConfig; |
| 2776 /** |
2089 * [Output only] Base64-encoded private key used by clients to authenticate | 2777 * [Output only] Base64-encoded private key used by clients to authenticate |
2090 * to the cluster endpoint. | 2778 * to the cluster endpoint. |
2091 */ | 2779 */ |
2092 core.String clientKey; | 2780 core.String clientKey; |
2093 /** | 2781 /** |
2094 * [Output only] Base64-encoded public certificate that is the root of | 2782 * [Output only] Base64-encoded public certificate that is the root of |
2095 * trust for the cluster. | 2783 * trust for the cluster. |
2096 */ | 2784 */ |
2097 core.String clusterCaCertificate; | 2785 core.String clusterCaCertificate; |
2098 /** | 2786 /** |
2099 * The password to use for HTTP basic authentication to the master endpoint. | 2787 * The password to use for HTTP basic authentication to the master endpoint. |
2100 * Because the master endpoint is open to the Internet, you should create a | 2788 * Because the master endpoint is open to the Internet, you should create a |
2101 * strong password. If a password is provided for cluster creation, username | 2789 * strong password. If a password is provided for cluster creation, username |
2102 * must be non-empty. | 2790 * must be non-empty. |
2103 */ | 2791 */ |
2104 core.String password; | 2792 core.String password; |
2105 /** | 2793 /** |
2106 * The username to use for HTTP basic authentication to the master endpoint. | 2794 * The username to use for HTTP basic authentication to the master endpoint. |
2107 * For clusters v1.6.0 and later, you can disable basic authentication by | 2795 * For clusters v1.6.0 and later, you can disable basic authentication by |
2108 * providing an empty username. | 2796 * providing an empty username. |
2109 */ | 2797 */ |
2110 core.String username; | 2798 core.String username; |
2111 | 2799 |
2112 MasterAuth(); | 2800 MasterAuth(); |
2113 | 2801 |
2114 MasterAuth.fromJson(core.Map _json) { | 2802 MasterAuth.fromJson(core.Map _json) { |
2115 if (_json.containsKey("clientCertificate")) { | 2803 if (_json.containsKey("clientCertificate")) { |
2116 clientCertificate = _json["clientCertificate"]; | 2804 clientCertificate = _json["clientCertificate"]; |
2117 } | 2805 } |
| 2806 if (_json.containsKey("clientCertificateConfig")) { |
| 2807 clientCertificateConfig = new ClientCertificateConfig.fromJson(_json["clie
ntCertificateConfig"]); |
| 2808 } |
2118 if (_json.containsKey("clientKey")) { | 2809 if (_json.containsKey("clientKey")) { |
2119 clientKey = _json["clientKey"]; | 2810 clientKey = _json["clientKey"]; |
2120 } | 2811 } |
2121 if (_json.containsKey("clusterCaCertificate")) { | 2812 if (_json.containsKey("clusterCaCertificate")) { |
2122 clusterCaCertificate = _json["clusterCaCertificate"]; | 2813 clusterCaCertificate = _json["clusterCaCertificate"]; |
2123 } | 2814 } |
2124 if (_json.containsKey("password")) { | 2815 if (_json.containsKey("password")) { |
2125 password = _json["password"]; | 2816 password = _json["password"]; |
2126 } | 2817 } |
2127 if (_json.containsKey("username")) { | 2818 if (_json.containsKey("username")) { |
2128 username = _json["username"]; | 2819 username = _json["username"]; |
2129 } | 2820 } |
2130 } | 2821 } |
2131 | 2822 |
2132 core.Map<core.String, core.Object> toJson() { | 2823 core.Map<core.String, core.Object> toJson() { |
2133 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2824 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
2134 if (clientCertificate != null) { | 2825 if (clientCertificate != null) { |
2135 _json["clientCertificate"] = clientCertificate; | 2826 _json["clientCertificate"] = clientCertificate; |
2136 } | 2827 } |
| 2828 if (clientCertificateConfig != null) { |
| 2829 _json["clientCertificateConfig"] = (clientCertificateConfig).toJson(); |
| 2830 } |
2137 if (clientKey != null) { | 2831 if (clientKey != null) { |
2138 _json["clientKey"] = clientKey; | 2832 _json["clientKey"] = clientKey; |
2139 } | 2833 } |
2140 if (clusterCaCertificate != null) { | 2834 if (clusterCaCertificate != null) { |
2141 _json["clusterCaCertificate"] = clusterCaCertificate; | 2835 _json["clusterCaCertificate"] = clusterCaCertificate; |
2142 } | 2836 } |
2143 if (password != null) { | 2837 if (password != null) { |
2144 _json["password"] = password; | 2838 _json["password"] = password; |
2145 } | 2839 } |
2146 if (username != null) { | 2840 if (username != null) { |
2147 _json["username"] = username; | 2841 _json["username"] = username; |
2148 } | 2842 } |
2149 return _json; | 2843 return _json; |
2150 } | 2844 } |
2151 } | 2845 } |
2152 | 2846 |
| 2847 /** |
| 2848 * Configuration options for the NetworkPolicy feature. |
| 2849 * https://kubernetes.io/docs/concepts/services-networking/networkpolicies/ |
| 2850 */ |
| 2851 class NetworkPolicy { |
| 2852 /** Whether network policy is enabled on the cluster. */ |
| 2853 core.bool enabled; |
| 2854 /** |
| 2855 * The selected network policy provider. |
| 2856 * Possible string values are: |
| 2857 * - "UNKNOWN" : Not set |
| 2858 * - "CALICO" : Tigera (Calico Felix). |
| 2859 */ |
| 2860 core.String provider; |
| 2861 |
| 2862 NetworkPolicy(); |
| 2863 |
| 2864 NetworkPolicy.fromJson(core.Map _json) { |
| 2865 if (_json.containsKey("enabled")) { |
| 2866 enabled = _json["enabled"]; |
| 2867 } |
| 2868 if (_json.containsKey("provider")) { |
| 2869 provider = _json["provider"]; |
| 2870 } |
| 2871 } |
| 2872 |
| 2873 core.Map<core.String, core.Object> toJson() { |
| 2874 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 2875 if (enabled != null) { |
| 2876 _json["enabled"] = enabled; |
| 2877 } |
| 2878 if (provider != null) { |
| 2879 _json["provider"] = provider; |
| 2880 } |
| 2881 return _json; |
| 2882 } |
| 2883 } |
| 2884 |
2153 /** Parameters that describe the nodes in a cluster. */ | 2885 /** Parameters that describe the nodes in a cluster. */ |
2154 class NodeConfig { | 2886 class NodeConfig { |
2155 /** | 2887 /** |
2156 * Size of the disk attached to each node, specified in GB. | 2888 * Size of the disk attached to each node, specified in GB. |
2157 * The smallest allowed disk size is 10GB. | 2889 * The smallest allowed disk size is 10GB. |
2158 * | 2890 * |
2159 * If unspecified, the default disk size is 100GB. | 2891 * If unspecified, the default disk size is 100GB. |
2160 */ | 2892 */ |
2161 core.int diskSizeGb; | 2893 core.int diskSizeGb; |
2162 /** | 2894 /** |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2569 * - "UPGRADE_NODES" : A node upgrade. | 3301 * - "UPGRADE_NODES" : A node upgrade. |
2570 * - "REPAIR_CLUSTER" : Cluster repair. | 3302 * - "REPAIR_CLUSTER" : Cluster repair. |
2571 * - "UPDATE_CLUSTER" : Cluster update. | 3303 * - "UPDATE_CLUSTER" : Cluster update. |
2572 * - "CREATE_NODE_POOL" : Node pool create. | 3304 * - "CREATE_NODE_POOL" : Node pool create. |
2573 * - "DELETE_NODE_POOL" : Node pool delete. | 3305 * - "DELETE_NODE_POOL" : Node pool delete. |
2574 * - "SET_NODE_POOL_MANAGEMENT" : Set node pool management. | 3306 * - "SET_NODE_POOL_MANAGEMENT" : Set node pool management. |
2575 * - "AUTO_REPAIR_NODES" : Automatic node pool repair. | 3307 * - "AUTO_REPAIR_NODES" : Automatic node pool repair. |
2576 * - "AUTO_UPGRADE_NODES" : Automatic node upgrade. | 3308 * - "AUTO_UPGRADE_NODES" : Automatic node upgrade. |
2577 * - "SET_LABELS" : Set labels. | 3309 * - "SET_LABELS" : Set labels. |
2578 * - "SET_MASTER_AUTH" : Set/generate master auth materials | 3310 * - "SET_MASTER_AUTH" : Set/generate master auth materials |
| 3311 * - "SET_NODE_POOL_SIZE" : Set node pool size. |
| 3312 * - "SET_NETWORK_POLICY" : Updates network policy for a cluster. |
2579 */ | 3313 */ |
2580 core.String operationType; | 3314 core.String operationType; |
2581 /** Server-defined URL for the resource. */ | 3315 /** Server-defined URL for the resource. */ |
2582 core.String selfLink; | 3316 core.String selfLink; |
2583 /** | 3317 /** |
2584 * The current status of the operation. | 3318 * The current status of the operation. |
2585 * Possible string values are: | 3319 * Possible string values are: |
2586 * - "STATUS_UNSPECIFIED" : Not set. | 3320 * - "STATUS_UNSPECIFIED" : Not set. |
2587 * - "PENDING" : The operation has been created. | 3321 * - "PENDING" : The operation has been created. |
2588 * - "RUNNING" : The operation is currently running. | 3322 * - "RUNNING" : The operation is currently running. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 if (validMasterVersions != null) { | 3459 if (validMasterVersions != null) { |
2726 _json["validMasterVersions"] = validMasterVersions; | 3460 _json["validMasterVersions"] = validMasterVersions; |
2727 } | 3461 } |
2728 if (validNodeVersions != null) { | 3462 if (validNodeVersions != null) { |
2729 _json["validNodeVersions"] = validNodeVersions; | 3463 _json["validNodeVersions"] = validNodeVersions; |
2730 } | 3464 } |
2731 return _json; | 3465 return _json; |
2732 } | 3466 } |
2733 } | 3467 } |
2734 | 3468 |
| 3469 /** SetAddonsConfigRequest sets the addons associated with the cluster. */ |
| 3470 class SetAddonsConfigRequest { |
| 3471 /** |
| 3472 * The desired configurations for the various addons available to run in the |
| 3473 * cluster. |
| 3474 */ |
| 3475 AddonsConfig addonsConfig; |
| 3476 |
| 3477 SetAddonsConfigRequest(); |
| 3478 |
| 3479 SetAddonsConfigRequest.fromJson(core.Map _json) { |
| 3480 if (_json.containsKey("addonsConfig")) { |
| 3481 addonsConfig = new AddonsConfig.fromJson(_json["addonsConfig"]); |
| 3482 } |
| 3483 } |
| 3484 |
| 3485 core.Map<core.String, core.Object> toJson() { |
| 3486 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3487 if (addonsConfig != null) { |
| 3488 _json["addonsConfig"] = (addonsConfig).toJson(); |
| 3489 } |
| 3490 return _json; |
| 3491 } |
| 3492 } |
| 3493 |
2735 /** | 3494 /** |
2736 * SetLabelsRequest sets the Google Cloud Platform labels on a Google Container | 3495 * SetLabelsRequest sets the Google Cloud Platform labels on a Google Container |
2737 * Engine cluster, which will in turn set them for Google Compute Engine | 3496 * Engine cluster, which will in turn set them for Google Compute Engine |
2738 * resources used by that cluster | 3497 * resources used by that cluster |
2739 */ | 3498 */ |
2740 class SetLabelsRequest { | 3499 class SetLabelsRequest { |
2741 /** | 3500 /** |
2742 * The fingerprint of the previous set of labels for this resource, | 3501 * The fingerprint of the previous set of labels for this resource, |
2743 * used to detect conflicts. The fingerprint is initially generated by | 3502 * used to detect conflicts. The fingerprint is initially generated by |
2744 * Container Engine and changes after every request to modify or update | 3503 * Container Engine and changes after every request to modify or update |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2791 | 3550 |
2792 core.Map<core.String, core.Object> toJson() { | 3551 core.Map<core.String, core.Object> toJson() { |
2793 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3552 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
2794 if (enabled != null) { | 3553 if (enabled != null) { |
2795 _json["enabled"] = enabled; | 3554 _json["enabled"] = enabled; |
2796 } | 3555 } |
2797 return _json; | 3556 return _json; |
2798 } | 3557 } |
2799 } | 3558 } |
2800 | 3559 |
| 3560 /** SetLocationsRequest sets the locations of the cluster. */ |
| 3561 class SetLocationsRequest { |
| 3562 /** |
| 3563 * The desired list of Google Compute Engine |
| 3564 * [locations](/compute/docs/zones#available) in which the cluster's nodes |
| 3565 * should be located. Changing the locations a cluster is in will result |
| 3566 * in nodes being either created or removed from the cluster, depending on |
| 3567 * whether locations are being added or removed. |
| 3568 * |
| 3569 * This list must always include the cluster's primary zone. |
| 3570 */ |
| 3571 core.List<core.String> locations; |
| 3572 |
| 3573 SetLocationsRequest(); |
| 3574 |
| 3575 SetLocationsRequest.fromJson(core.Map _json) { |
| 3576 if (_json.containsKey("locations")) { |
| 3577 locations = _json["locations"]; |
| 3578 } |
| 3579 } |
| 3580 |
| 3581 core.Map<core.String, core.Object> toJson() { |
| 3582 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3583 if (locations != null) { |
| 3584 _json["locations"] = locations; |
| 3585 } |
| 3586 return _json; |
| 3587 } |
| 3588 } |
| 3589 |
| 3590 /** SetLoggingServiceRequest sets the logging service of a cluster. */ |
| 3591 class SetLoggingServiceRequest { |
| 3592 /** |
| 3593 * The logging service the cluster should use to write metrics. |
| 3594 * Currently available options: |
| 3595 * |
| 3596 * * "logging.googleapis.com" - the Google Cloud Logging service |
| 3597 * * "none" - no metrics will be exported from the cluster |
| 3598 */ |
| 3599 core.String loggingService; |
| 3600 |
| 3601 SetLoggingServiceRequest(); |
| 3602 |
| 3603 SetLoggingServiceRequest.fromJson(core.Map _json) { |
| 3604 if (_json.containsKey("loggingService")) { |
| 3605 loggingService = _json["loggingService"]; |
| 3606 } |
| 3607 } |
| 3608 |
| 3609 core.Map<core.String, core.Object> toJson() { |
| 3610 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3611 if (loggingService != null) { |
| 3612 _json["loggingService"] = loggingService; |
| 3613 } |
| 3614 return _json; |
| 3615 } |
| 3616 } |
| 3617 |
2801 /** SetMasterAuthRequest updates the admin password of a cluster. */ | 3618 /** SetMasterAuthRequest updates the admin password of a cluster. */ |
2802 class SetMasterAuthRequest { | 3619 class SetMasterAuthRequest { |
2803 /** | 3620 /** |
2804 * The exact form of action to be taken on the master auth | 3621 * The exact form of action to be taken on the master auth |
2805 * Possible string values are: | 3622 * Possible string values are: |
2806 * - "UNKNOWN" : Operation is unknown and will error out | 3623 * - "UNKNOWN" : Operation is unknown and will error out |
2807 * - "SET_PASSWORD" : Set the password to a user generated value. | 3624 * - "SET_PASSWORD" : Set the password to a user generated value. |
2808 * - "GENERATE_PASSWORD" : Generate a new password and set it to that. | 3625 * - "GENERATE_PASSWORD" : Generate a new password and set it to that. |
2809 */ | 3626 */ |
2810 core.String action; | 3627 core.String action; |
(...skipping 16 matching lines...) Expand all Loading... |
2827 if (action != null) { | 3644 if (action != null) { |
2828 _json["action"] = action; | 3645 _json["action"] = action; |
2829 } | 3646 } |
2830 if (update != null) { | 3647 if (update != null) { |
2831 _json["update"] = (update).toJson(); | 3648 _json["update"] = (update).toJson(); |
2832 } | 3649 } |
2833 return _json; | 3650 return _json; |
2834 } | 3651 } |
2835 } | 3652 } |
2836 | 3653 |
| 3654 /** SetMonitoringServiceRequest sets the monitoring service of a cluster. */ |
| 3655 class SetMonitoringServiceRequest { |
| 3656 /** |
| 3657 * The monitoring service the cluster should use to write metrics. |
| 3658 * Currently available options: |
| 3659 * |
| 3660 * * "monitoring.googleapis.com" - the Google Cloud Monitoring service |
| 3661 * * "none" - no metrics will be exported from the cluster |
| 3662 */ |
| 3663 core.String monitoringService; |
| 3664 |
| 3665 SetMonitoringServiceRequest(); |
| 3666 |
| 3667 SetMonitoringServiceRequest.fromJson(core.Map _json) { |
| 3668 if (_json.containsKey("monitoringService")) { |
| 3669 monitoringService = _json["monitoringService"]; |
| 3670 } |
| 3671 } |
| 3672 |
| 3673 core.Map<core.String, core.Object> toJson() { |
| 3674 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3675 if (monitoringService != null) { |
| 3676 _json["monitoringService"] = monitoringService; |
| 3677 } |
| 3678 return _json; |
| 3679 } |
| 3680 } |
| 3681 |
| 3682 /** SetNetworkPolicyRequest enables/disables network policy for a cluster. */ |
| 3683 class SetNetworkPolicyRequest { |
| 3684 /** Configuration options for the NetworkPolicy feature. */ |
| 3685 NetworkPolicy networkPolicy; |
| 3686 |
| 3687 SetNetworkPolicyRequest(); |
| 3688 |
| 3689 SetNetworkPolicyRequest.fromJson(core.Map _json) { |
| 3690 if (_json.containsKey("networkPolicy")) { |
| 3691 networkPolicy = new NetworkPolicy.fromJson(_json["networkPolicy"]); |
| 3692 } |
| 3693 } |
| 3694 |
| 3695 core.Map<core.String, core.Object> toJson() { |
| 3696 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3697 if (networkPolicy != null) { |
| 3698 _json["networkPolicy"] = (networkPolicy).toJson(); |
| 3699 } |
| 3700 return _json; |
| 3701 } |
| 3702 } |
| 3703 |
| 3704 /** |
| 3705 * SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. |
| 3706 */ |
| 3707 class SetNodePoolAutoscalingRequest { |
| 3708 /** Autoscaling configuration for the node pool. */ |
| 3709 NodePoolAutoscaling autoscaling; |
| 3710 |
| 3711 SetNodePoolAutoscalingRequest(); |
| 3712 |
| 3713 SetNodePoolAutoscalingRequest.fromJson(core.Map _json) { |
| 3714 if (_json.containsKey("autoscaling")) { |
| 3715 autoscaling = new NodePoolAutoscaling.fromJson(_json["autoscaling"]); |
| 3716 } |
| 3717 } |
| 3718 |
| 3719 core.Map<core.String, core.Object> toJson() { |
| 3720 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3721 if (autoscaling != null) { |
| 3722 _json["autoscaling"] = (autoscaling).toJson(); |
| 3723 } |
| 3724 return _json; |
| 3725 } |
| 3726 } |
| 3727 |
2837 /** | 3728 /** |
2838 * SetNodePoolManagementRequest sets the node management properties of a node | 3729 * SetNodePoolManagementRequest sets the node management properties of a node |
2839 * pool. | 3730 * pool. |
2840 */ | 3731 */ |
2841 class SetNodePoolManagementRequest { | 3732 class SetNodePoolManagementRequest { |
2842 /** NodeManagement configuration for the node pool. */ | 3733 /** NodeManagement configuration for the node pool. */ |
2843 NodeManagement management; | 3734 NodeManagement management; |
2844 | 3735 |
2845 SetNodePoolManagementRequest(); | 3736 SetNodePoolManagementRequest(); |
2846 | 3737 |
2847 SetNodePoolManagementRequest.fromJson(core.Map _json) { | 3738 SetNodePoolManagementRequest.fromJson(core.Map _json) { |
2848 if (_json.containsKey("management")) { | 3739 if (_json.containsKey("management")) { |
2849 management = new NodeManagement.fromJson(_json["management"]); | 3740 management = new NodeManagement.fromJson(_json["management"]); |
2850 } | 3741 } |
2851 } | 3742 } |
2852 | 3743 |
2853 core.Map<core.String, core.Object> toJson() { | 3744 core.Map<core.String, core.Object> toJson() { |
2854 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3745 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
2855 if (management != null) { | 3746 if (management != null) { |
2856 _json["management"] = (management).toJson(); | 3747 _json["management"] = (management).toJson(); |
2857 } | 3748 } |
2858 return _json; | 3749 return _json; |
2859 } | 3750 } |
2860 } | 3751 } |
2861 | 3752 |
2862 /** | 3753 /** |
| 3754 * SetNodePoolSizeRequest sets the size a node |
| 3755 * pool. |
| 3756 */ |
| 3757 class SetNodePoolSizeRequest { |
| 3758 /** The desired node count for the pool. */ |
| 3759 core.int nodeCount; |
| 3760 |
| 3761 SetNodePoolSizeRequest(); |
| 3762 |
| 3763 SetNodePoolSizeRequest.fromJson(core.Map _json) { |
| 3764 if (_json.containsKey("nodeCount")) { |
| 3765 nodeCount = _json["nodeCount"]; |
| 3766 } |
| 3767 } |
| 3768 |
| 3769 core.Map<core.String, core.Object> toJson() { |
| 3770 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3771 if (nodeCount != null) { |
| 3772 _json["nodeCount"] = nodeCount; |
| 3773 } |
| 3774 return _json; |
| 3775 } |
| 3776 } |
| 3777 |
| 3778 /** |
2863 * StartIPRotationRequest creates a new IP for the cluster and then performs | 3779 * StartIPRotationRequest creates a new IP for the cluster and then performs |
2864 * a node upgrade on each node pool to point to the new IP. | 3780 * a node upgrade on each node pool to point to the new IP. |
2865 */ | 3781 */ |
2866 class StartIPRotationRequest { | 3782 class StartIPRotationRequest { |
2867 | 3783 |
2868 StartIPRotationRequest(); | 3784 StartIPRotationRequest(); |
2869 | 3785 |
2870 StartIPRotationRequest.fromJson(core.Map _json) { | 3786 StartIPRotationRequest.fromJson(core.Map _json) { |
2871 } | 3787 } |
2872 | 3788 |
(...skipping 17 matching lines...) Expand all Loading... |
2890 } | 3806 } |
2891 | 3807 |
2892 core.Map<core.String, core.Object> toJson() { | 3808 core.Map<core.String, core.Object> toJson() { |
2893 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3809 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
2894 if (update != null) { | 3810 if (update != null) { |
2895 _json["update"] = (update).toJson(); | 3811 _json["update"] = (update).toJson(); |
2896 } | 3812 } |
2897 return _json; | 3813 return _json; |
2898 } | 3814 } |
2899 } | 3815 } |
| 3816 |
| 3817 /** UpdateMasterRequest updates the master of the cluster. */ |
| 3818 class UpdateMasterRequest { |
| 3819 /** |
| 3820 * The Kubernetes version to change the master to. The only valid value is the |
| 3821 * latest supported version. Use "-" to have the server automatically select |
| 3822 * the latest version. |
| 3823 */ |
| 3824 core.String masterVersion; |
| 3825 |
| 3826 UpdateMasterRequest(); |
| 3827 |
| 3828 UpdateMasterRequest.fromJson(core.Map _json) { |
| 3829 if (_json.containsKey("masterVersion")) { |
| 3830 masterVersion = _json["masterVersion"]; |
| 3831 } |
| 3832 } |
| 3833 |
| 3834 core.Map<core.String, core.Object> toJson() { |
| 3835 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3836 if (masterVersion != null) { |
| 3837 _json["masterVersion"] = masterVersion; |
| 3838 } |
| 3839 return _json; |
| 3840 } |
| 3841 } |
| 3842 |
| 3843 /** UpdateNodePoolRequests update a node pool's image and/or version. */ |
| 3844 class UpdateNodePoolRequest { |
| 3845 /** The desired image type for the node pool. */ |
| 3846 core.String imageType; |
| 3847 /** |
| 3848 * The Kubernetes version to change the nodes to (typically an |
| 3849 * upgrade). Use `-` to upgrade to the latest version supported by |
| 3850 * the server. |
| 3851 */ |
| 3852 core.String nodeVersion; |
| 3853 |
| 3854 UpdateNodePoolRequest(); |
| 3855 |
| 3856 UpdateNodePoolRequest.fromJson(core.Map _json) { |
| 3857 if (_json.containsKey("imageType")) { |
| 3858 imageType = _json["imageType"]; |
| 3859 } |
| 3860 if (_json.containsKey("nodeVersion")) { |
| 3861 nodeVersion = _json["nodeVersion"]; |
| 3862 } |
| 3863 } |
| 3864 |
| 3865 core.Map<core.String, core.Object> toJson() { |
| 3866 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 3867 if (imageType != null) { |
| 3868 _json["imageType"] = imageType; |
| 3869 } |
| 3870 if (nodeVersion != null) { |
| 3871 _json["nodeVersion"] = nodeVersion; |
| 3872 } |
| 3873 return _json; |
| 3874 } |
| 3875 } |
OLD | NEW |