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