Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: generated/googleapis_beta/lib/container/v1beta1.dart

Issue 698403003: Api roll 5: 2014-11-05 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 library googleapis_beta.container.v1beta1;
2
3 import "dart:core" as core;
4 import "dart:collection" as collection;
5 import "dart:async" as async;
6 import "dart:convert" as convert;
7
8 import "package:crypto/crypto.dart" as crypto;
9 import 'package:http/http.dart' as http;
10 import '../src/common_internal.dart' as common_internal;
11 import '../common/common.dart' as common;
12
13 export '../common/common.dart' show ApiRequestError;
14 export '../common/common.dart' show DetailedApiRequestError;
15
16 /**
17 * The Google Container Engine API is used for building and managing container
18 * based applications, powered by the open source Kubernetes technology.
19 */
20 class ContainerApi {
21 /** View and manage your data across Google Cloud Platform services */
22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
23
24
25 final common_internal.ApiRequester _requester;
26
27 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
28
29 ContainerApi(http.Client client) :
30 _requester = new common_internal.ApiRequester(client, "https://www.googlea pis.com/", "container/v1beta1/projects/");
31 }
32
33
34 /** Not documented yet. */
35 class ProjectsResourceApi {
36 final common_internal.ApiRequester _requester;
37
38 ProjectsClustersResourceApi get clusters => new ProjectsClustersResourceApi(_r equester);
39 ProjectsOperationsResourceApi get operations => new ProjectsOperationsResource Api(_requester);
40 ProjectsZonesResourceApi get zones => new ProjectsZonesResourceApi(_requester) ;
41
42 ProjectsResourceApi(common_internal.ApiRequester client) :
43 _requester = client;
44 }
45
46
47 /** Not documented yet. */
48 class ProjectsClustersResourceApi {
49 final common_internal.ApiRequester _requester;
50
51 ProjectsClustersResourceApi(common_internal.ApiRequester client) :
52 _requester = client;
53
54 /**
55 * Lists all clusters owned by a project across all zones.
56 *
57 * Request parameters:
58 *
59 * [projectId] - The Google Developers Console project ID or project number.
60 *
61 * Completes with a [ListAggregatedClustersResponse].
62 *
63 * Completes with a [common.ApiRequestError] if the API endpoint returned an
64 * error.
65 *
66 * If the used [http.Client] completes with an error when making a REST call,
67 * this method will complete with the same error.
68 */
69 async.Future<ListAggregatedClustersResponse> list(core.String projectId) {
70 var _url = null;
71 var _queryParams = new core.Map();
72 var _uploadMedia = null;
73 var _uploadOptions = null;
74 var _downloadOptions = common.DownloadOptions.Metadata;
75 var _body = null;
76
77 if (projectId == null) {
78 throw new core.ArgumentError("Parameter projectId is required.");
79 }
80
81
82 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/clusters';
83
84 var _response = _requester.request(_url,
85 "GET",
86 body: _body,
87 queryParams: _queryParams,
88 uploadOptions: _uploadOptions,
89 uploadMedia: _uploadMedia,
90 downloadOptions: _downloadOptions);
91 return _response.then((data) => new ListAggregatedClustersResponse.fromJson( data));
92 }
93
94 }
95
96
97 /** Not documented yet. */
98 class ProjectsOperationsResourceApi {
99 final common_internal.ApiRequester _requester;
100
101 ProjectsOperationsResourceApi(common_internal.ApiRequester client) :
102 _requester = client;
103
104 /**
105 * Lists all operations in a project, across all zones.
106 *
107 * Request parameters:
108 *
109 * [projectId] - The Google Developers Console project ID or project number.
110 *
111 * Completes with a [ListAggregatedOperationsResponse].
112 *
113 * Completes with a [common.ApiRequestError] if the API endpoint returned an
114 * error.
115 *
116 * If the used [http.Client] completes with an error when making a REST call,
117 * this method will complete with the same error.
118 */
119 async.Future<ListAggregatedOperationsResponse> list(core.String projectId) {
120 var _url = null;
121 var _queryParams = new core.Map();
122 var _uploadMedia = null;
123 var _uploadOptions = null;
124 var _downloadOptions = common.DownloadOptions.Metadata;
125 var _body = null;
126
127 if (projectId == null) {
128 throw new core.ArgumentError("Parameter projectId is required.");
129 }
130
131
132 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/operations';
133
134 var _response = _requester.request(_url,
135 "GET",
136 body: _body,
137 queryParams: _queryParams,
138 uploadOptions: _uploadOptions,
139 uploadMedia: _uploadMedia,
140 downloadOptions: _downloadOptions);
141 return _response.then((data) => new ListAggregatedOperationsResponse.fromJso n(data));
142 }
143
144 }
145
146
147 /** Not documented yet. */
148 class ProjectsZonesResourceApi {
149 final common_internal.ApiRequester _requester;
150
151 ProjectsZonesClustersResourceApi get clusters => new ProjectsZonesClustersReso urceApi(_requester);
152 ProjectsZonesOperationsResourceApi get operations => new ProjectsZonesOperatio nsResourceApi(_requester);
153
154 ProjectsZonesResourceApi(common_internal.ApiRequester client) :
155 _requester = client;
156 }
157
158
159 /** Not documented yet. */
160 class ProjectsZonesClustersResourceApi {
161 final common_internal.ApiRequester _requester;
162
163 ProjectsZonesClustersResourceApi(common_internal.ApiRequester client) :
164 _requester = client;
165
166 /**
167 * Creates a cluster, consisting of the specified number and type of Google
168 * Compute Engine instances, plus a Kubernetes master instance.
169 *
170 * The cluster is created in the project's default network.
171 *
172 * A firewall is added that allows traffic into port 443 on the master, which
173 * enables HTTPS. A firewall and a route is added for each node to allow the
174 * containers on that node to communicate with all other instances in the
175 * cluster.
176 *
177 * Finally, a route named k8s-iproute-10-xx-0-0 is created to track that the
178 * cluster's 10.xx.0.0/16 CIDR has been assigned.
179 *
180 * [request] - The metadata request object.
181 *
182 * Request parameters:
183 *
184 * [projectId] - The Google Developers Console project ID or project number.
185 *
186 * [zoneId] - The name of the Google Compute Engine zone in which the cluster
187 * resides.
188 *
189 * Completes with a [Operation].
190 *
191 * Completes with a [common.ApiRequestError] if the API endpoint returned an
192 * error.
193 *
194 * If the used [http.Client] completes with an error when making a REST call,
195 * this method will complete with the same error.
196 */
197 async.Future<Operation> create(CreateClusterRequest request, core.String proje ctId, core.String zoneId) {
198 var _url = null;
199 var _queryParams = new core.Map();
200 var _uploadMedia = null;
201 var _uploadOptions = null;
202 var _downloadOptions = common.DownloadOptions.Metadata;
203 var _body = null;
204
205 if (request != null) {
206 _body = convert.JSON.encode((request).toJson());
207 }
208 if (projectId == null) {
209 throw new core.ArgumentError("Parameter projectId is required.");
210 }
211 if (zoneId == null) {
212 throw new core.ArgumentError("Parameter zoneId is required.");
213 }
214
215
216 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/zones/' + com mon_internal.Escaper.ecapeVariable('$zoneId') + '/clusters';
217
218 var _response = _requester.request(_url,
219 "POST",
220 body: _body,
221 queryParams: _queryParams,
222 uploadOptions: _uploadOptions,
223 uploadMedia: _uploadMedia,
224 downloadOptions: _downloadOptions);
225 return _response.then((data) => new Operation.fromJson(data));
226 }
227
228 /**
229 * Deletes the cluster, including the Kubernetes master and all worker nodes.
230 *
231 * Firewalls and routes that were configured at cluster creation are also
232 * deleted.
233 *
234 * Request parameters:
235 *
236 * [projectId] - The Google Developers Console project ID or project number.
237 *
238 * [zoneId] - The name of the Google Compute Engine zone in which the cluster
239 * resides.
240 *
241 * [clusterId] - The name of the cluster to delete.
242 *
243 * Completes with a [Operation].
244 *
245 * Completes with a [common.ApiRequestError] if the API endpoint returned an
246 * error.
247 *
248 * If the used [http.Client] completes with an error when making a REST call,
249 * this method will complete with the same error.
250 */
251 async.Future<Operation> delete(core.String projectId, core.String zoneId, core .String clusterId) {
252 var _url = null;
253 var _queryParams = new core.Map();
254 var _uploadMedia = null;
255 var _uploadOptions = null;
256 var _downloadOptions = common.DownloadOptions.Metadata;
257 var _body = null;
258
259 if (projectId == null) {
260 throw new core.ArgumentError("Parameter projectId is required.");
261 }
262 if (zoneId == null) {
263 throw new core.ArgumentError("Parameter zoneId is required.");
264 }
265 if (clusterId == null) {
266 throw new core.ArgumentError("Parameter clusterId is required.");
267 }
268
269
270 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/zones/' + com mon_internal.Escaper.ecapeVariable('$zoneId') + '/clusters/' + common_internal.E scaper.ecapeVariable('$clusterId');
271
272 var _response = _requester.request(_url,
273 "DELETE",
274 body: _body,
275 queryParams: _queryParams,
276 uploadOptions: _uploadOptions,
277 uploadMedia: _uploadMedia,
278 downloadOptions: _downloadOptions);
279 return _response.then((data) => new Operation.fromJson(data));
280 }
281
282 /**
283 * Gets a specific cluster.
284 *
285 * Request parameters:
286 *
287 * [projectId] - The Google Developers Console project ID or project number.
288 *
289 * [zoneId] - The name of the Google Compute Engine zone in which the cluster
290 * resides.
291 *
292 * [clusterId] - The name of the cluster to retrieve.
293 *
294 * Completes with a [Cluster].
295 *
296 * Completes with a [common.ApiRequestError] if the API endpoint returned an
297 * error.
298 *
299 * If the used [http.Client] completes with an error when making a REST call,
300 * this method will complete with the same error.
301 */
302 async.Future<Cluster> get(core.String projectId, core.String zoneId, core.Stri ng clusterId) {
303 var _url = null;
304 var _queryParams = new core.Map();
305 var _uploadMedia = null;
306 var _uploadOptions = null;
307 var _downloadOptions = common.DownloadOptions.Metadata;
308 var _body = null;
309
310 if (projectId == null) {
311 throw new core.ArgumentError("Parameter projectId is required.");
312 }
313 if (zoneId == null) {
314 throw new core.ArgumentError("Parameter zoneId is required.");
315 }
316 if (clusterId == null) {
317 throw new core.ArgumentError("Parameter clusterId is required.");
318 }
319
320
321 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/zones/' + com mon_internal.Escaper.ecapeVariable('$zoneId') + '/clusters/' + common_internal.E scaper.ecapeVariable('$clusterId');
322
323 var _response = _requester.request(_url,
324 "GET",
325 body: _body,
326 queryParams: _queryParams,
327 uploadOptions: _uploadOptions,
328 uploadMedia: _uploadMedia,
329 downloadOptions: _downloadOptions);
330 return _response.then((data) => new Cluster.fromJson(data));
331 }
332
333 /**
334 * Lists all clusters owned by a project in the specified zone.
335 *
336 * Request parameters:
337 *
338 * [projectId] - The Google Developers Console project ID or project number.
339 *
340 * [zoneId] - The name of the Google Compute Engine zone in which the cluster
341 * resides.
342 *
343 * Completes with a [ListClustersResponse].
344 *
345 * Completes with a [common.ApiRequestError] if the API endpoint returned an
346 * error.
347 *
348 * If the used [http.Client] completes with an error when making a REST call,
349 * this method will complete with the same error.
350 */
351 async.Future<ListClustersResponse> list(core.String projectId, core.String zon eId) {
352 var _url = null;
353 var _queryParams = new core.Map();
354 var _uploadMedia = null;
355 var _uploadOptions = null;
356 var _downloadOptions = common.DownloadOptions.Metadata;
357 var _body = null;
358
359 if (projectId == null) {
360 throw new core.ArgumentError("Parameter projectId is required.");
361 }
362 if (zoneId == null) {
363 throw new core.ArgumentError("Parameter zoneId is required.");
364 }
365
366
367 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/zones/' + com mon_internal.Escaper.ecapeVariable('$zoneId') + '/clusters';
368
369 var _response = _requester.request(_url,
370 "GET",
371 body: _body,
372 queryParams: _queryParams,
373 uploadOptions: _uploadOptions,
374 uploadMedia: _uploadMedia,
375 downloadOptions: _downloadOptions);
376 return _response.then((data) => new ListClustersResponse.fromJson(data));
377 }
378
379 }
380
381
382 /** Not documented yet. */
383 class ProjectsZonesOperationsResourceApi {
384 final common_internal.ApiRequester _requester;
385
386 ProjectsZonesOperationsResourceApi(common_internal.ApiRequester client) :
387 _requester = client;
388
389 /**
390 * Gets the specified operation.
391 *
392 * Request parameters:
393 *
394 * [projectId] - The Google Developers Console project ID or project number.
395 *
396 * [zoneId] - The name of the Google Compute Engine zone in which the
397 * operation resides. This is always the same zone as the cluster with which
398 * the operation is associated.
399 *
400 * [operationId] - The server-assigned name of the operation.
401 *
402 * Completes with a [Operation].
403 *
404 * Completes with a [common.ApiRequestError] if the API endpoint returned an
405 * error.
406 *
407 * If the used [http.Client] completes with an error when making a REST call,
408 * this method will complete with the same error.
409 */
410 async.Future<Operation> get(core.String projectId, core.String zoneId, core.St ring operationId) {
411 var _url = null;
412 var _queryParams = new core.Map();
413 var _uploadMedia = null;
414 var _uploadOptions = null;
415 var _downloadOptions = common.DownloadOptions.Metadata;
416 var _body = null;
417
418 if (projectId == null) {
419 throw new core.ArgumentError("Parameter projectId is required.");
420 }
421 if (zoneId == null) {
422 throw new core.ArgumentError("Parameter zoneId is required.");
423 }
424 if (operationId == null) {
425 throw new core.ArgumentError("Parameter operationId is required.");
426 }
427
428
429 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/zones/' + com mon_internal.Escaper.ecapeVariable('$zoneId') + '/operations/' + common_internal .Escaper.ecapeVariable('$operationId');
430
431 var _response = _requester.request(_url,
432 "GET",
433 body: _body,
434 queryParams: _queryParams,
435 uploadOptions: _uploadOptions,
436 uploadMedia: _uploadMedia,
437 downloadOptions: _downloadOptions);
438 return _response.then((data) => new Operation.fromJson(data));
439 }
440
441 /**
442 * Lists all operations in a project in a specific zone.
443 *
444 * Request parameters:
445 *
446 * [projectId] - The Google Developers Console project ID or project number.
447 *
448 * [zoneId] - The name of the Google Compute Engine zone to return operations
449 * for.
450 *
451 * Completes with a [ListOperationsResponse].
452 *
453 * Completes with a [common.ApiRequestError] if the API endpoint returned an
454 * error.
455 *
456 * If the used [http.Client] completes with an error when making a REST call,
457 * this method will complete with the same error.
458 */
459 async.Future<ListOperationsResponse> list(core.String projectId, core.String z oneId) {
460 var _url = null;
461 var _queryParams = new core.Map();
462 var _uploadMedia = null;
463 var _uploadOptions = null;
464 var _downloadOptions = common.DownloadOptions.Metadata;
465 var _body = null;
466
467 if (projectId == null) {
468 throw new core.ArgumentError("Parameter projectId is required.");
469 }
470 if (zoneId == null) {
471 throw new core.ArgumentError("Parameter zoneId is required.");
472 }
473
474
475 _url = common_internal.Escaper.ecapeVariable('$projectId') + '/zones/' + com mon_internal.Escaper.ecapeVariable('$zoneId') + '/operations';
476
477 var _response = _requester.request(_url,
478 "GET",
479 body: _body,
480 queryParams: _queryParams,
481 uploadOptions: _uploadOptions,
482 uploadMedia: _uploadMedia,
483 downloadOptions: _downloadOptions);
484 return _response.then((data) => new ListOperationsResponse.fromJson(data));
485 }
486
487 }
488
489
490
491 /** Not documented yet. */
492 class Cluster {
493 /**
494 * The API version of the Kubernetes master and kubelets running in this
495 * cluster. Allowed value is 0.4.2, or leave blank to pick up the latest
496 * stable release.
497 */
498 core.String clusterApiVersion;
499
500 /**
501 * [Output only] The IP addresses of the container pods in this cluster, in
502 * CIDR notation (e.g. 1.2.3.4/29).
503 */
504 core.String containerIpv4Cidr;
505
506 /**
507 * [Output only] The time the cluster was created, in RFC3339 text format.
508 */
509 core.String creationTimestamp;
510
511 /** An optional description of this cluster. */
512 core.String description;
513
514 /**
515 * [Output only] The IP address of this cluster's Kubernetes master. The
516 * endpoint can be accessed from the internet at
517 * https://username:password@endpoint/.
518 *
519 * See the masterAuth property of this resource for username and password
520 * information.
521 */
522 core.String endpoint;
523
524 /**
525 * The HTTP basic authentication information for accessing the master. Because
526 * the master endpoint is open to the internet, you should create a strong
527 * password.
528 */
529 MasterAuth masterAuth;
530
531 /**
532 * The name of this cluster. The name must be unique within this project and
533 * zone, and can be up to 40 characters with the following restrictions:
534 * - Lowercase letters, numbers, and hyphens only.
535 * - Must start with a letter.
536 * - Must end with a number or a letter.
537 */
538 core.String name;
539
540 /**
541 * The machine type and image to use for all nodes in this cluster. See the
542 * descriptions of the child properties of nodeConfig.
543 */
544 NodeConfig nodeConfig;
545
546 /**
547 * [Output only] The size of the address space on each node for hosting
548 * containers.
549 */
550 core.int nodeRoutingPrefixSize;
551
552 /**
553 * The number of nodes to create in this cluster. You must ensure that your
554 * Compute Engine resource quota is sufficient for this number of instances
555 * plus one (to include the master). You must also have available firewall and
556 * routes quota.
557 */
558 core.int numNodes;
559
560 /**
561 * [Output only] The IP addresses of the Kubernetes services in this cluster,
562 * in CIDR notation (e.g. 1.2.3.4/29). Service addresses are always in the
563 * 10.0.0.0/16 range.
564 */
565 core.String servicesIpv4Cidr;
566
567 /**
568 * [Output only] The current status of this cluster.
569 * Possible string values are:
570 * - "error"
571 * - "provisioning"
572 * - "running"
573 * - "stopping"
574 */
575 core.String status;
576
577 /**
578 * [Output only] Additional information about the current status of this
579 * cluster, if available.
580 */
581 core.String statusMessage;
582
583 /**
584 * [Output only] The name of the Google Compute Engine zone in which the
585 * cluster resides.
586 */
587 core.String zone;
588
589
590 Cluster();
591
592 Cluster.fromJson(core.Map _json) {
593 if (_json.containsKey("clusterApiVersion")) {
594 clusterApiVersion = _json["clusterApiVersion"];
595 }
596 if (_json.containsKey("containerIpv4Cidr")) {
597 containerIpv4Cidr = _json["containerIpv4Cidr"];
598 }
599 if (_json.containsKey("creationTimestamp")) {
600 creationTimestamp = _json["creationTimestamp"];
601 }
602 if (_json.containsKey("description")) {
603 description = _json["description"];
604 }
605 if (_json.containsKey("endpoint")) {
606 endpoint = _json["endpoint"];
607 }
608 if (_json.containsKey("masterAuth")) {
609 masterAuth = new MasterAuth.fromJson(_json["masterAuth"]);
610 }
611 if (_json.containsKey("name")) {
612 name = _json["name"];
613 }
614 if (_json.containsKey("nodeConfig")) {
615 nodeConfig = new NodeConfig.fromJson(_json["nodeConfig"]);
616 }
617 if (_json.containsKey("nodeRoutingPrefixSize")) {
618 nodeRoutingPrefixSize = _json["nodeRoutingPrefixSize"];
619 }
620 if (_json.containsKey("numNodes")) {
621 numNodes = _json["numNodes"];
622 }
623 if (_json.containsKey("servicesIpv4Cidr")) {
624 servicesIpv4Cidr = _json["servicesIpv4Cidr"];
625 }
626 if (_json.containsKey("status")) {
627 status = _json["status"];
628 }
629 if (_json.containsKey("statusMessage")) {
630 statusMessage = _json["statusMessage"];
631 }
632 if (_json.containsKey("zone")) {
633 zone = _json["zone"];
634 }
635 }
636
637 core.Map toJson() {
638 var _json = new core.Map();
639 if (clusterApiVersion != null) {
640 _json["clusterApiVersion"] = clusterApiVersion;
641 }
642 if (containerIpv4Cidr != null) {
643 _json["containerIpv4Cidr"] = containerIpv4Cidr;
644 }
645 if (creationTimestamp != null) {
646 _json["creationTimestamp"] = creationTimestamp;
647 }
648 if (description != null) {
649 _json["description"] = description;
650 }
651 if (endpoint != null) {
652 _json["endpoint"] = endpoint;
653 }
654 if (masterAuth != null) {
655 _json["masterAuth"] = (masterAuth).toJson();
656 }
657 if (name != null) {
658 _json["name"] = name;
659 }
660 if (nodeConfig != null) {
661 _json["nodeConfig"] = (nodeConfig).toJson();
662 }
663 if (nodeRoutingPrefixSize != null) {
664 _json["nodeRoutingPrefixSize"] = nodeRoutingPrefixSize;
665 }
666 if (numNodes != null) {
667 _json["numNodes"] = numNodes;
668 }
669 if (servicesIpv4Cidr != null) {
670 _json["servicesIpv4Cidr"] = servicesIpv4Cidr;
671 }
672 if (status != null) {
673 _json["status"] = status;
674 }
675 if (statusMessage != null) {
676 _json["statusMessage"] = statusMessage;
677 }
678 if (zone != null) {
679 _json["zone"] = zone;
680 }
681 return _json;
682 }
683 }
684
685
686 /** Not documented yet. */
687 class CreateClusterRequest {
688 /** A cluster resource. */
689 Cluster cluster;
690
691
692 CreateClusterRequest();
693
694 CreateClusterRequest.fromJson(core.Map _json) {
695 if (_json.containsKey("cluster")) {
696 cluster = new Cluster.fromJson(_json["cluster"]);
697 }
698 }
699
700 core.Map toJson() {
701 var _json = new core.Map();
702 if (cluster != null) {
703 _json["cluster"] = (cluster).toJson();
704 }
705 return _json;
706 }
707 }
708
709
710 /** Not documented yet. */
711 class ListAggregatedClustersResponse {
712 /** A list of clusters in the project, across all zones. */
713 core.List<Cluster> clusters;
714
715
716 ListAggregatedClustersResponse();
717
718 ListAggregatedClustersResponse.fromJson(core.Map _json) {
719 if (_json.containsKey("clusters")) {
720 clusters = _json["clusters"].map((value) => new Cluster.fromJson(value)).t oList();
721 }
722 }
723
724 core.Map toJson() {
725 var _json = new core.Map();
726 if (clusters != null) {
727 _json["clusters"] = clusters.map((value) => (value).toJson()).toList();
728 }
729 return _json;
730 }
731 }
732
733
734 /** Not documented yet. */
735 class ListAggregatedOperationsResponse {
736 /** A list of operations in the project, across all zones. */
737 core.List<Operation> operations;
738
739
740 ListAggregatedOperationsResponse();
741
742 ListAggregatedOperationsResponse.fromJson(core.Map _json) {
743 if (_json.containsKey("operations")) {
744 operations = _json["operations"].map((value) => new Operation.fromJson(val ue)).toList();
745 }
746 }
747
748 core.Map toJson() {
749 var _json = new core.Map();
750 if (operations != null) {
751 _json["operations"] = operations.map((value) => (value).toJson()).toList() ;
752 }
753 return _json;
754 }
755 }
756
757
758 /** Not documented yet. */
759 class ListClustersResponse {
760 /** A list of clusters in the project in the specified zone. */
761 core.List<Cluster> clusters;
762
763
764 ListClustersResponse();
765
766 ListClustersResponse.fromJson(core.Map _json) {
767 if (_json.containsKey("clusters")) {
768 clusters = _json["clusters"].map((value) => new Cluster.fromJson(value)).t oList();
769 }
770 }
771
772 core.Map toJson() {
773 var _json = new core.Map();
774 if (clusters != null) {
775 _json["clusters"] = clusters.map((value) => (value).toJson()).toList();
776 }
777 return _json;
778 }
779 }
780
781
782 /** Not documented yet. */
783 class ListOperationsResponse {
784 /** A list of operations in the project in the specified zone. */
785 core.List<Operation> operations;
786
787
788 ListOperationsResponse();
789
790 ListOperationsResponse.fromJson(core.Map _json) {
791 if (_json.containsKey("operations")) {
792 operations = _json["operations"].map((value) => new Operation.fromJson(val ue)).toList();
793 }
794 }
795
796 core.Map toJson() {
797 var _json = new core.Map();
798 if (operations != null) {
799 _json["operations"] = operations.map((value) => (value).toJson()).toList() ;
800 }
801 return _json;
802 }
803 }
804
805
806 /** Not documented yet. */
807 class MasterAuth {
808 /** The password to use when accessing the Kubernetes master endpoint. */
809 core.String password;
810
811 /** The username to use when accessing the Kubernetes master endpoint. */
812 core.String user;
813
814
815 MasterAuth();
816
817 MasterAuth.fromJson(core.Map _json) {
818 if (_json.containsKey("password")) {
819 password = _json["password"];
820 }
821 if (_json.containsKey("user")) {
822 user = _json["user"];
823 }
824 }
825
826 core.Map toJson() {
827 var _json = new core.Map();
828 if (password != null) {
829 _json["password"] = password;
830 }
831 if (user != null) {
832 _json["user"] = user;
833 }
834 return _json;
835 }
836 }
837
838
839 /** Not documented yet. */
840 class NodeConfig {
841 /**
842 * The name of a Google Compute Engine machine type (e.g. n1-standard-1).
843 *
844 * If unspecified, the default machine type is n1-standard-1.
845 */
846 core.String machineType;
847
848 /**
849 * The fully-specified name of a Google Compute Engine image. For example:
850 * https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/b ackports-debian-7-wheezy-vYYYYMMDD
851 * (where YYYMMDD is the version date).
852 *
853 * If specifying an image, you are responsible for ensuring its compatibility
854 * with the Debian 7 backports image. We recommend leaving this field blank to
855 * accept the default backports-debian-7-wheezy value.
856 */
857 core.String sourceImage;
858
859
860 NodeConfig();
861
862 NodeConfig.fromJson(core.Map _json) {
863 if (_json.containsKey("machineType")) {
864 machineType = _json["machineType"];
865 }
866 if (_json.containsKey("sourceImage")) {
867 sourceImage = _json["sourceImage"];
868 }
869 }
870
871 core.Map toJson() {
872 var _json = new core.Map();
873 if (machineType != null) {
874 _json["machineType"] = machineType;
875 }
876 if (sourceImage != null) {
877 _json["sourceImage"] = sourceImage;
878 }
879 return _json;
880 }
881 }
882
883
884 /** Defines the operation resource. All fields are output only. */
885 class Operation {
886 /** If an error has occurred, a textual description of the error. */
887 core.String errorMessage;
888
889 /**
890 * The server-assigned ID for this operation. If the operation is fulfilled
891 * upfront, it may not have a resource name.
892 */
893 core.String name;
894
895 /**
896 * The operation type.
897 * Possible string values are:
898 * - "createCluster"
899 * - "deleteCluster"
900 */
901 core.String operationType;
902
903 /**
904 * The current status of the operation.
905 * Possible string values are:
906 * - "done"
907 * - "pending"
908 * - "running"
909 */
910 core.String status;
911
912 /**
913 * [Optional] The URL of the cluster resource that this operation is
914 * associated with.
915 */
916 core.String target;
917
918 /**
919 * The name of the Google Compute Engine zone in which the operation is taking
920 * place.
921 */
922 core.String zone;
923
924
925 Operation();
926
927 Operation.fromJson(core.Map _json) {
928 if (_json.containsKey("errorMessage")) {
929 errorMessage = _json["errorMessage"];
930 }
931 if (_json.containsKey("name")) {
932 name = _json["name"];
933 }
934 if (_json.containsKey("operationType")) {
935 operationType = _json["operationType"];
936 }
937 if (_json.containsKey("status")) {
938 status = _json["status"];
939 }
940 if (_json.containsKey("target")) {
941 target = _json["target"];
942 }
943 if (_json.containsKey("zone")) {
944 zone = _json["zone"];
945 }
946 }
947
948 core.Map toJson() {
949 var _json = new core.Map();
950 if (errorMessage != null) {
951 _json["errorMessage"] = errorMessage;
952 }
953 if (name != null) {
954 _json["name"] = name;
955 }
956 if (operationType != null) {
957 _json["operationType"] = operationType;
958 }
959 if (status != null) {
960 _json["status"] = status;
961 }
962 if (target != null) {
963 _json["target"] = target;
964 }
965 if (zone != null) {
966 _json["zone"] = zone;
967 }
968 return _json;
969 }
970 }
971
972
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698