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