OLD | NEW |
(Empty) | |
| 1 library googleapis_beta.autoscaler.v1beta2; |
| 2 |
| 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; |
| 7 |
| 8 import "package:crypto/crypto.dart" as crypto; |
| 9 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; |
| 11 import '../common/common.dart' as common; |
| 12 |
| 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 |
| 16 /** |
| 17 * The Google Compute Engine Autoscaler API provides autoscaling for groups of |
| 18 * Cloud VMs. |
| 19 */ |
| 20 class AutoscalerApi { |
| 21 /** View and manage your Google Compute Engine resources */ |
| 22 static const ComputeScope = "https://www.googleapis.com/auth/compute"; |
| 23 |
| 24 /** View your Google Compute Engine resources */ |
| 25 static const ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.r
eadonly"; |
| 26 |
| 27 |
| 28 final common_internal.ApiRequester _requester; |
| 29 |
| 30 AutoscalersResourceApi get autoscalers => new AutoscalersResourceApi(_requeste
r); |
| 31 ZoneOperationsResourceApi get zoneOperations => new ZoneOperationsResourceApi(
_requester); |
| 32 |
| 33 AutoscalerApi(http.Client client) : |
| 34 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/autoscaler/v1beta2/"); |
| 35 } |
| 36 |
| 37 |
| 38 /** Not documented yet. */ |
| 39 class AutoscalersResourceApi { |
| 40 final common_internal.ApiRequester _requester; |
| 41 |
| 42 AutoscalersResourceApi(common_internal.ApiRequester client) : |
| 43 _requester = client; |
| 44 |
| 45 /** |
| 46 * Deletes the specified Autoscaler resource. |
| 47 * |
| 48 * Request parameters: |
| 49 * |
| 50 * [project] - Project ID of Autoscaler resource. |
| 51 * |
| 52 * [zone] - Zone name of Autoscaler resource. |
| 53 * |
| 54 * [autoscaler] - Name of the Autoscaler resource. |
| 55 * |
| 56 * Completes with a [Operation]. |
| 57 * |
| 58 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 59 * error. |
| 60 * |
| 61 * If the used [http.Client] completes with an error when making a REST call, |
| 62 * this method will complete with the same error. |
| 63 */ |
| 64 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing autoscaler) { |
| 65 var _url = null; |
| 66 var _queryParams = new core.Map(); |
| 67 var _uploadMedia = null; |
| 68 var _uploadOptions = null; |
| 69 var _downloadOptions = common.DownloadOptions.Metadata; |
| 70 var _body = null; |
| 71 |
| 72 if (project == null) { |
| 73 throw new core.ArgumentError("Parameter project is required."); |
| 74 } |
| 75 if (zone == null) { |
| 76 throw new core.ArgumentError("Parameter zone is required."); |
| 77 } |
| 78 if (autoscaler == null) { |
| 79 throw new core.ArgumentError("Parameter autoscaler is required."); |
| 80 } |
| 81 |
| 82 |
| 83 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers/' + comm
on_internal.Escaper.ecapeVariable('$autoscaler'); |
| 84 |
| 85 var _response = _requester.request(_url, |
| 86 "DELETE", |
| 87 body: _body, |
| 88 queryParams: _queryParams, |
| 89 uploadOptions: _uploadOptions, |
| 90 uploadMedia: _uploadMedia, |
| 91 downloadOptions: _downloadOptions); |
| 92 return _response.then((data) => new Operation.fromJson(data)); |
| 93 } |
| 94 |
| 95 /** |
| 96 * Gets the specified Autoscaler resource. |
| 97 * |
| 98 * Request parameters: |
| 99 * |
| 100 * [project] - Project ID of Autoscaler resource. |
| 101 * |
| 102 * [zone] - Zone name of Autoscaler resource. |
| 103 * |
| 104 * [autoscaler] - Name of the Autoscaler resource. |
| 105 * |
| 106 * Completes with a [Autoscaler]. |
| 107 * |
| 108 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 109 * error. |
| 110 * |
| 111 * If the used [http.Client] completes with an error when making a REST call, |
| 112 * this method will complete with the same error. |
| 113 */ |
| 114 async.Future<Autoscaler> get(core.String project, core.String zone, core.Strin
g autoscaler) { |
| 115 var _url = null; |
| 116 var _queryParams = new core.Map(); |
| 117 var _uploadMedia = null; |
| 118 var _uploadOptions = null; |
| 119 var _downloadOptions = common.DownloadOptions.Metadata; |
| 120 var _body = null; |
| 121 |
| 122 if (project == null) { |
| 123 throw new core.ArgumentError("Parameter project is required."); |
| 124 } |
| 125 if (zone == null) { |
| 126 throw new core.ArgumentError("Parameter zone is required."); |
| 127 } |
| 128 if (autoscaler == null) { |
| 129 throw new core.ArgumentError("Parameter autoscaler is required."); |
| 130 } |
| 131 |
| 132 |
| 133 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers/' + comm
on_internal.Escaper.ecapeVariable('$autoscaler'); |
| 134 |
| 135 var _response = _requester.request(_url, |
| 136 "GET", |
| 137 body: _body, |
| 138 queryParams: _queryParams, |
| 139 uploadOptions: _uploadOptions, |
| 140 uploadMedia: _uploadMedia, |
| 141 downloadOptions: _downloadOptions); |
| 142 return _response.then((data) => new Autoscaler.fromJson(data)); |
| 143 } |
| 144 |
| 145 /** |
| 146 * Adds new Autoscaler resource. |
| 147 * |
| 148 * [request] - The metadata request object. |
| 149 * |
| 150 * Request parameters: |
| 151 * |
| 152 * [project] - Project ID of Autoscaler resource. |
| 153 * |
| 154 * [zone] - Zone name of Autoscaler resource. |
| 155 * |
| 156 * Completes with a [Operation]. |
| 157 * |
| 158 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 159 * error. |
| 160 * |
| 161 * If the used [http.Client] completes with an error when making a REST call, |
| 162 * this method will complete with the same error. |
| 163 */ |
| 164 async.Future<Operation> insert(Autoscaler request, core.String project, core.S
tring zone) { |
| 165 var _url = null; |
| 166 var _queryParams = new core.Map(); |
| 167 var _uploadMedia = null; |
| 168 var _uploadOptions = null; |
| 169 var _downloadOptions = common.DownloadOptions.Metadata; |
| 170 var _body = null; |
| 171 |
| 172 if (request != null) { |
| 173 _body = convert.JSON.encode((request).toJson()); |
| 174 } |
| 175 if (project == null) { |
| 176 throw new core.ArgumentError("Parameter project is required."); |
| 177 } |
| 178 if (zone == null) { |
| 179 throw new core.ArgumentError("Parameter zone is required."); |
| 180 } |
| 181 |
| 182 |
| 183 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers'; |
| 184 |
| 185 var _response = _requester.request(_url, |
| 186 "POST", |
| 187 body: _body, |
| 188 queryParams: _queryParams, |
| 189 uploadOptions: _uploadOptions, |
| 190 uploadMedia: _uploadMedia, |
| 191 downloadOptions: _downloadOptions); |
| 192 return _response.then((data) => new Operation.fromJson(data)); |
| 193 } |
| 194 |
| 195 /** |
| 196 * Lists all Autoscaler resources in this zone. |
| 197 * |
| 198 * Request parameters: |
| 199 * |
| 200 * [project] - Project ID of Autoscaler resource. |
| 201 * |
| 202 * [zone] - Zone name of Autoscaler resource. |
| 203 * |
| 204 * [filter] - null |
| 205 * |
| 206 * [maxResults] - null |
| 207 * Value must be between "0" and "500". |
| 208 * |
| 209 * [pageToken] - null |
| 210 * |
| 211 * Completes with a [AutoscalerListResponse]. |
| 212 * |
| 213 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 214 * error. |
| 215 * |
| 216 * If the used [http.Client] completes with an error when making a REST call, |
| 217 * this method will complete with the same error. |
| 218 */ |
| 219 async.Future<AutoscalerListResponse> list(core.String project, core.String zon
e, {core.String filter, core.int maxResults, core.String pageToken}) { |
| 220 var _url = null; |
| 221 var _queryParams = new core.Map(); |
| 222 var _uploadMedia = null; |
| 223 var _uploadOptions = null; |
| 224 var _downloadOptions = common.DownloadOptions.Metadata; |
| 225 var _body = null; |
| 226 |
| 227 if (project == null) { |
| 228 throw new core.ArgumentError("Parameter project is required."); |
| 229 } |
| 230 if (zone == null) { |
| 231 throw new core.ArgumentError("Parameter zone is required."); |
| 232 } |
| 233 if (filter != null) { |
| 234 _queryParams["filter"] = [filter]; |
| 235 } |
| 236 if (maxResults != null) { |
| 237 _queryParams["maxResults"] = ["${maxResults}"]; |
| 238 } |
| 239 if (pageToken != null) { |
| 240 _queryParams["pageToken"] = [pageToken]; |
| 241 } |
| 242 |
| 243 |
| 244 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers'; |
| 245 |
| 246 var _response = _requester.request(_url, |
| 247 "GET", |
| 248 body: _body, |
| 249 queryParams: _queryParams, |
| 250 uploadOptions: _uploadOptions, |
| 251 uploadMedia: _uploadMedia, |
| 252 downloadOptions: _downloadOptions); |
| 253 return _response.then((data) => new AutoscalerListResponse.fromJson(data)); |
| 254 } |
| 255 |
| 256 /** |
| 257 * Update the entire content of the Autoscaler resource. This method supports |
| 258 * patch semantics. |
| 259 * |
| 260 * [request] - The metadata request object. |
| 261 * |
| 262 * Request parameters: |
| 263 * |
| 264 * [project] - Project ID of Autoscaler resource. |
| 265 * |
| 266 * [zone] - Zone name of Autoscaler resource. |
| 267 * |
| 268 * [autoscaler] - Name of the Autoscaler resource. |
| 269 * |
| 270 * Completes with a [Operation]. |
| 271 * |
| 272 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 273 * error. |
| 274 * |
| 275 * If the used [http.Client] completes with an error when making a REST call, |
| 276 * this method will complete with the same error. |
| 277 */ |
| 278 async.Future<Operation> patch(Autoscaler request, core.String project, core.St
ring zone, core.String autoscaler) { |
| 279 var _url = null; |
| 280 var _queryParams = new core.Map(); |
| 281 var _uploadMedia = null; |
| 282 var _uploadOptions = null; |
| 283 var _downloadOptions = common.DownloadOptions.Metadata; |
| 284 var _body = null; |
| 285 |
| 286 if (request != null) { |
| 287 _body = convert.JSON.encode((request).toJson()); |
| 288 } |
| 289 if (project == null) { |
| 290 throw new core.ArgumentError("Parameter project is required."); |
| 291 } |
| 292 if (zone == null) { |
| 293 throw new core.ArgumentError("Parameter zone is required."); |
| 294 } |
| 295 if (autoscaler == null) { |
| 296 throw new core.ArgumentError("Parameter autoscaler is required."); |
| 297 } |
| 298 |
| 299 |
| 300 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers/' + comm
on_internal.Escaper.ecapeVariable('$autoscaler'); |
| 301 |
| 302 var _response = _requester.request(_url, |
| 303 "PATCH", |
| 304 body: _body, |
| 305 queryParams: _queryParams, |
| 306 uploadOptions: _uploadOptions, |
| 307 uploadMedia: _uploadMedia, |
| 308 downloadOptions: _downloadOptions); |
| 309 return _response.then((data) => new Operation.fromJson(data)); |
| 310 } |
| 311 |
| 312 /** |
| 313 * Update the entire content of the Autoscaler resource. |
| 314 * |
| 315 * [request] - The metadata request object. |
| 316 * |
| 317 * Request parameters: |
| 318 * |
| 319 * [project] - Project ID of Autoscaler resource. |
| 320 * |
| 321 * [zone] - Zone name of Autoscaler resource. |
| 322 * |
| 323 * [autoscaler] - Name of the Autoscaler resource. |
| 324 * |
| 325 * Completes with a [Operation]. |
| 326 * |
| 327 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 328 * error. |
| 329 * |
| 330 * If the used [http.Client] completes with an error when making a REST call, |
| 331 * this method will complete with the same error. |
| 332 */ |
| 333 async.Future<Operation> update(Autoscaler request, core.String project, core.S
tring zone, core.String autoscaler) { |
| 334 var _url = null; |
| 335 var _queryParams = new core.Map(); |
| 336 var _uploadMedia = null; |
| 337 var _uploadOptions = null; |
| 338 var _downloadOptions = common.DownloadOptions.Metadata; |
| 339 var _body = null; |
| 340 |
| 341 if (request != null) { |
| 342 _body = convert.JSON.encode((request).toJson()); |
| 343 } |
| 344 if (project == null) { |
| 345 throw new core.ArgumentError("Parameter project is required."); |
| 346 } |
| 347 if (zone == null) { |
| 348 throw new core.ArgumentError("Parameter zone is required."); |
| 349 } |
| 350 if (autoscaler == null) { |
| 351 throw new core.ArgumentError("Parameter autoscaler is required."); |
| 352 } |
| 353 |
| 354 |
| 355 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers/' + comm
on_internal.Escaper.ecapeVariable('$autoscaler'); |
| 356 |
| 357 var _response = _requester.request(_url, |
| 358 "PUT", |
| 359 body: _body, |
| 360 queryParams: _queryParams, |
| 361 uploadOptions: _uploadOptions, |
| 362 uploadMedia: _uploadMedia, |
| 363 downloadOptions: _downloadOptions); |
| 364 return _response.then((data) => new Operation.fromJson(data)); |
| 365 } |
| 366 |
| 367 } |
| 368 |
| 369 |
| 370 /** Not documented yet. */ |
| 371 class ZoneOperationsResourceApi { |
| 372 final common_internal.ApiRequester _requester; |
| 373 |
| 374 ZoneOperationsResourceApi(common_internal.ApiRequester client) : |
| 375 _requester = client; |
| 376 |
| 377 /** |
| 378 * Deletes the specified zone-specific operation resource. |
| 379 * |
| 380 * Request parameters: |
| 381 * |
| 382 * [project] - null |
| 383 * Value must have pattern |
| 384 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
| 385 * |
| 386 * [zone] - null |
| 387 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 388 * |
| 389 * [operation] - null |
| 390 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 391 * |
| 392 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 393 * error. |
| 394 * |
| 395 * If the used [http.Client] completes with an error when making a REST call, |
| 396 * this method will complete with the same error. |
| 397 */ |
| 398 async.Future delete(core.String project, core.String zone, core.String operati
on) { |
| 399 var _url = null; |
| 400 var _queryParams = new core.Map(); |
| 401 var _uploadMedia = null; |
| 402 var _uploadOptions = null; |
| 403 var _downloadOptions = common.DownloadOptions.Metadata; |
| 404 var _body = null; |
| 405 |
| 406 if (project == null) { |
| 407 throw new core.ArgumentError("Parameter project is required."); |
| 408 } |
| 409 if (zone == null) { |
| 410 throw new core.ArgumentError("Parameter zone is required."); |
| 411 } |
| 412 if (operation == null) { |
| 413 throw new core.ArgumentError("Parameter operation is required."); |
| 414 } |
| 415 |
| 416 _downloadOptions = null; |
| 417 |
| 418 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc
aper.ecapeVariable('$operation'); |
| 419 |
| 420 var _response = _requester.request(_url, |
| 421 "DELETE", |
| 422 body: _body, |
| 423 queryParams: _queryParams, |
| 424 uploadOptions: _uploadOptions, |
| 425 uploadMedia: _uploadMedia, |
| 426 downloadOptions: _downloadOptions); |
| 427 return _response.then((data) => null); |
| 428 } |
| 429 |
| 430 /** |
| 431 * Retrieves the specified zone-specific operation resource. |
| 432 * |
| 433 * Request parameters: |
| 434 * |
| 435 * [project] - null |
| 436 * Value must have pattern |
| 437 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
| 438 * |
| 439 * [zone] - null |
| 440 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 441 * |
| 442 * [operation] - null |
| 443 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 444 * |
| 445 * Completes with a [Operation]. |
| 446 * |
| 447 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 448 * error. |
| 449 * |
| 450 * If the used [http.Client] completes with an error when making a REST call, |
| 451 * this method will complete with the same error. |
| 452 */ |
| 453 async.Future<Operation> get(core.String project, core.String zone, core.String
operation) { |
| 454 var _url = null; |
| 455 var _queryParams = new core.Map(); |
| 456 var _uploadMedia = null; |
| 457 var _uploadOptions = null; |
| 458 var _downloadOptions = common.DownloadOptions.Metadata; |
| 459 var _body = null; |
| 460 |
| 461 if (project == null) { |
| 462 throw new core.ArgumentError("Parameter project is required."); |
| 463 } |
| 464 if (zone == null) { |
| 465 throw new core.ArgumentError("Parameter zone is required."); |
| 466 } |
| 467 if (operation == null) { |
| 468 throw new core.ArgumentError("Parameter operation is required."); |
| 469 } |
| 470 |
| 471 |
| 472 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc
aper.ecapeVariable('$operation'); |
| 473 |
| 474 var _response = _requester.request(_url, |
| 475 "GET", |
| 476 body: _body, |
| 477 queryParams: _queryParams, |
| 478 uploadOptions: _uploadOptions, |
| 479 uploadMedia: _uploadMedia, |
| 480 downloadOptions: _downloadOptions); |
| 481 return _response.then((data) => new Operation.fromJson(data)); |
| 482 } |
| 483 |
| 484 /** |
| 485 * Retrieves the list of operation resources contained within the specified |
| 486 * zone. |
| 487 * |
| 488 * Request parameters: |
| 489 * |
| 490 * [project] - null |
| 491 * Value must have pattern |
| 492 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
| 493 * |
| 494 * [zone] - null |
| 495 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 496 * |
| 497 * [filter] - null |
| 498 * |
| 499 * [maxResults] - null |
| 500 * Value must be between "0" and "500". |
| 501 * |
| 502 * [pageToken] - null |
| 503 * |
| 504 * Completes with a [OperationList]. |
| 505 * |
| 506 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 507 * error. |
| 508 * |
| 509 * If the used [http.Client] completes with an error when making a REST call, |
| 510 * this method will complete with the same error. |
| 511 */ |
| 512 async.Future<OperationList> list(core.String project, core.String zone, {core.
String filter, core.int maxResults, core.String pageToken}) { |
| 513 var _url = null; |
| 514 var _queryParams = new core.Map(); |
| 515 var _uploadMedia = null; |
| 516 var _uploadOptions = null; |
| 517 var _downloadOptions = common.DownloadOptions.Metadata; |
| 518 var _body = null; |
| 519 |
| 520 if (project == null) { |
| 521 throw new core.ArgumentError("Parameter project is required."); |
| 522 } |
| 523 if (zone == null) { |
| 524 throw new core.ArgumentError("Parameter zone is required."); |
| 525 } |
| 526 if (filter != null) { |
| 527 _queryParams["filter"] = [filter]; |
| 528 } |
| 529 if (maxResults != null) { |
| 530 _queryParams["maxResults"] = ["${maxResults}"]; |
| 531 } |
| 532 if (pageToken != null) { |
| 533 _queryParams["pageToken"] = [pageToken]; |
| 534 } |
| 535 |
| 536 |
| 537 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations'; |
| 538 |
| 539 var _response = _requester.request(_url, |
| 540 "GET", |
| 541 body: _body, |
| 542 queryParams: _queryParams, |
| 543 uploadOptions: _uploadOptions, |
| 544 uploadMedia: _uploadMedia, |
| 545 downloadOptions: _downloadOptions); |
| 546 return _response.then((data) => new OperationList.fromJson(data)); |
| 547 } |
| 548 |
| 549 } |
| 550 |
| 551 |
| 552 |
| 553 /** Cloud Autoscaler resource. */ |
| 554 class Autoscaler { |
| 555 /** Configuration parameters for autoscaling algorithm. */ |
| 556 AutoscalingPolicy autoscalingPolicy; |
| 557 |
| 558 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
| 559 core.String creationTimestamp; |
| 560 |
| 561 /** |
| 562 * An optional textual description of the resource provided by the client. |
| 563 */ |
| 564 core.String description; |
| 565 |
| 566 /** |
| 567 * [Output Only] Unique identifier for the resource; defined by the server. |
| 568 */ |
| 569 core.String id; |
| 570 |
| 571 /** Name of the Autoscaler resource. Must be unique per project and zone. */ |
| 572 core.String name; |
| 573 |
| 574 /** [Output Only] A self-link to the Autoscaler configuration resource. */ |
| 575 core.String selfLink; |
| 576 |
| 577 /** |
| 578 * URL to the entity which will be autoscaled. Currently the only supported |
| 579 * value is ReplicaPool?s URL. Note: it is illegal to specify multiple |
| 580 * Autoscalers for the same target. |
| 581 */ |
| 582 core.String target; |
| 583 |
| 584 |
| 585 Autoscaler(); |
| 586 |
| 587 Autoscaler.fromJson(core.Map _json) { |
| 588 if (_json.containsKey("autoscalingPolicy")) { |
| 589 autoscalingPolicy = new AutoscalingPolicy.fromJson(_json["autoscalingPolic
y"]); |
| 590 } |
| 591 if (_json.containsKey("creationTimestamp")) { |
| 592 creationTimestamp = _json["creationTimestamp"]; |
| 593 } |
| 594 if (_json.containsKey("description")) { |
| 595 description = _json["description"]; |
| 596 } |
| 597 if (_json.containsKey("id")) { |
| 598 id = _json["id"]; |
| 599 } |
| 600 if (_json.containsKey("name")) { |
| 601 name = _json["name"]; |
| 602 } |
| 603 if (_json.containsKey("selfLink")) { |
| 604 selfLink = _json["selfLink"]; |
| 605 } |
| 606 if (_json.containsKey("target")) { |
| 607 target = _json["target"]; |
| 608 } |
| 609 } |
| 610 |
| 611 core.Map toJson() { |
| 612 var _json = new core.Map(); |
| 613 if (autoscalingPolicy != null) { |
| 614 _json["autoscalingPolicy"] = (autoscalingPolicy).toJson(); |
| 615 } |
| 616 if (creationTimestamp != null) { |
| 617 _json["creationTimestamp"] = creationTimestamp; |
| 618 } |
| 619 if (description != null) { |
| 620 _json["description"] = description; |
| 621 } |
| 622 if (id != null) { |
| 623 _json["id"] = id; |
| 624 } |
| 625 if (name != null) { |
| 626 _json["name"] = name; |
| 627 } |
| 628 if (selfLink != null) { |
| 629 _json["selfLink"] = selfLink; |
| 630 } |
| 631 if (target != null) { |
| 632 _json["target"] = target; |
| 633 } |
| 634 return _json; |
| 635 } |
| 636 } |
| 637 |
| 638 |
| 639 /** Not documented yet. */ |
| 640 class AutoscalerListResponse { |
| 641 /** Autoscaler resources. */ |
| 642 core.List<Autoscaler> items; |
| 643 |
| 644 /** [Output only] A token used to continue a truncated list request. */ |
| 645 core.String nextPageToken; |
| 646 |
| 647 |
| 648 AutoscalerListResponse(); |
| 649 |
| 650 AutoscalerListResponse.fromJson(core.Map _json) { |
| 651 if (_json.containsKey("items")) { |
| 652 items = _json["items"].map((value) => new Autoscaler.fromJson(value)).toLi
st(); |
| 653 } |
| 654 if (_json.containsKey("nextPageToken")) { |
| 655 nextPageToken = _json["nextPageToken"]; |
| 656 } |
| 657 } |
| 658 |
| 659 core.Map toJson() { |
| 660 var _json = new core.Map(); |
| 661 if (items != null) { |
| 662 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 663 } |
| 664 if (nextPageToken != null) { |
| 665 _json["nextPageToken"] = nextPageToken; |
| 666 } |
| 667 return _json; |
| 668 } |
| 669 } |
| 670 |
| 671 |
| 672 /** Cloud Autoscaler policy. */ |
| 673 class AutoscalingPolicy { |
| 674 /** |
| 675 * The number of seconds that the Autoscaler should wait between two |
| 676 * succeeding changes to the number of virtual machines. You should define an |
| 677 * interval that is at least as long as the initialization time of a virtual |
| 678 * machine and the time it may take for replica pool to create the virtual |
| 679 * machine. The default is 60 seconds. |
| 680 */ |
| 681 core.int coolDownPeriodSec; |
| 682 |
| 683 /** |
| 684 * Exactly one utilization policy should be provided. Configuration parameters |
| 685 * of CPU based autoscaling policy. |
| 686 */ |
| 687 AutoscalingPolicyCpuUtilization cpuUtilization; |
| 688 |
| 689 /** Configuration parameters of autoscaling based on custom metric. */ |
| 690 core.List<AutoscalingPolicyCustomMetricUtilization> customMetricUtilizations; |
| 691 |
| 692 /** Configuration parameters of autoscaling based on load balancer. */ |
| 693 AutoscalingPolicyLoadBalancingUtilization loadBalancingUtilization; |
| 694 |
| 695 /** The maximum number of replicas that the Autoscaler can scale up to. */ |
| 696 core.int maxNumReplicas; |
| 697 |
| 698 /** The minimum number of replicas that the Autoscaler can scale down to. */ |
| 699 core.int minNumReplicas; |
| 700 |
| 701 |
| 702 AutoscalingPolicy(); |
| 703 |
| 704 AutoscalingPolicy.fromJson(core.Map _json) { |
| 705 if (_json.containsKey("coolDownPeriodSec")) { |
| 706 coolDownPeriodSec = _json["coolDownPeriodSec"]; |
| 707 } |
| 708 if (_json.containsKey("cpuUtilization")) { |
| 709 cpuUtilization = new AutoscalingPolicyCpuUtilization.fromJson(_json["cpuUt
ilization"]); |
| 710 } |
| 711 if (_json.containsKey("customMetricUtilizations")) { |
| 712 customMetricUtilizations = _json["customMetricUtilizations"].map((value) =
> new AutoscalingPolicyCustomMetricUtilization.fromJson(value)).toList(); |
| 713 } |
| 714 if (_json.containsKey("loadBalancingUtilization")) { |
| 715 loadBalancingUtilization = new AutoscalingPolicyLoadBalancingUtilization.f
romJson(_json["loadBalancingUtilization"]); |
| 716 } |
| 717 if (_json.containsKey("maxNumReplicas")) { |
| 718 maxNumReplicas = _json["maxNumReplicas"]; |
| 719 } |
| 720 if (_json.containsKey("minNumReplicas")) { |
| 721 minNumReplicas = _json["minNumReplicas"]; |
| 722 } |
| 723 } |
| 724 |
| 725 core.Map toJson() { |
| 726 var _json = new core.Map(); |
| 727 if (coolDownPeriodSec != null) { |
| 728 _json["coolDownPeriodSec"] = coolDownPeriodSec; |
| 729 } |
| 730 if (cpuUtilization != null) { |
| 731 _json["cpuUtilization"] = (cpuUtilization).toJson(); |
| 732 } |
| 733 if (customMetricUtilizations != null) { |
| 734 _json["customMetricUtilizations"] = customMetricUtilizations.map((value) =
> (value).toJson()).toList(); |
| 735 } |
| 736 if (loadBalancingUtilization != null) { |
| 737 _json["loadBalancingUtilization"] = (loadBalancingUtilization).toJson(); |
| 738 } |
| 739 if (maxNumReplicas != null) { |
| 740 _json["maxNumReplicas"] = maxNumReplicas; |
| 741 } |
| 742 if (minNumReplicas != null) { |
| 743 _json["minNumReplicas"] = minNumReplicas; |
| 744 } |
| 745 return _json; |
| 746 } |
| 747 } |
| 748 |
| 749 |
| 750 /** CPU utilization policy. */ |
| 751 class AutoscalingPolicyCpuUtilization { |
| 752 /** |
| 753 * The target utilization that the Autoscaler should maintain. It is |
| 754 * represented as a fraction of used cores. For example: 6 cores used in |
| 755 * 8-core VM are represented here as 0.75. Must be a float value between (0, |
| 756 * 1]. If not defined, the default is 0.8. |
| 757 */ |
| 758 core.double utilizationTarget; |
| 759 |
| 760 |
| 761 AutoscalingPolicyCpuUtilization(); |
| 762 |
| 763 AutoscalingPolicyCpuUtilization.fromJson(core.Map _json) { |
| 764 if (_json.containsKey("utilizationTarget")) { |
| 765 utilizationTarget = _json["utilizationTarget"]; |
| 766 } |
| 767 } |
| 768 |
| 769 core.Map toJson() { |
| 770 var _json = new core.Map(); |
| 771 if (utilizationTarget != null) { |
| 772 _json["utilizationTarget"] = utilizationTarget; |
| 773 } |
| 774 return _json; |
| 775 } |
| 776 } |
| 777 |
| 778 |
| 779 /** Custom utilization metric policy. */ |
| 780 class AutoscalingPolicyCustomMetricUtilization { |
| 781 /** |
| 782 * Identifier of the metric. It should be a Cloud Monitoring metric. The |
| 783 * metric can not have negative values. The metric should be an utilization |
| 784 * metric (increasing number of VMs handling requests x times should reduce |
| 785 * average value of the metric roughly x times). For example you could use: |
| 786 * compute.googleapis.com/instance/network/received_bytes_count. |
| 787 */ |
| 788 core.String metric; |
| 789 |
| 790 /** |
| 791 * Target value of the metric which Autoscaler should maintain. Must be a |
| 792 * positive value. |
| 793 */ |
| 794 core.double utilizationTarget; |
| 795 |
| 796 |
| 797 AutoscalingPolicyCustomMetricUtilization(); |
| 798 |
| 799 AutoscalingPolicyCustomMetricUtilization.fromJson(core.Map _json) { |
| 800 if (_json.containsKey("metric")) { |
| 801 metric = _json["metric"]; |
| 802 } |
| 803 if (_json.containsKey("utilizationTarget")) { |
| 804 utilizationTarget = _json["utilizationTarget"]; |
| 805 } |
| 806 } |
| 807 |
| 808 core.Map toJson() { |
| 809 var _json = new core.Map(); |
| 810 if (metric != null) { |
| 811 _json["metric"] = metric; |
| 812 } |
| 813 if (utilizationTarget != null) { |
| 814 _json["utilizationTarget"] = utilizationTarget; |
| 815 } |
| 816 return _json; |
| 817 } |
| 818 } |
| 819 |
| 820 |
| 821 /** Load balancing utilization policy. */ |
| 822 class AutoscalingPolicyLoadBalancingUtilization { |
| 823 /** |
| 824 * Fraction of backend capacity utilization (set in HTTP load balancing |
| 825 * configuration) that Autoscaler should maintain. Must be a positive float |
| 826 * value. If not defined, the default is 0.8. For example if your |
| 827 * maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set |
| 828 * at 10 and you would like to keep number of instances such that each |
| 829 * instance receives 7 QPS on average, set this to 0.7. |
| 830 */ |
| 831 core.double utilizationTarget; |
| 832 |
| 833 |
| 834 AutoscalingPolicyLoadBalancingUtilization(); |
| 835 |
| 836 AutoscalingPolicyLoadBalancingUtilization.fromJson(core.Map _json) { |
| 837 if (_json.containsKey("utilizationTarget")) { |
| 838 utilizationTarget = _json["utilizationTarget"]; |
| 839 } |
| 840 } |
| 841 |
| 842 core.Map toJson() { |
| 843 var _json = new core.Map(); |
| 844 if (utilizationTarget != null) { |
| 845 _json["utilizationTarget"] = utilizationTarget; |
| 846 } |
| 847 return _json; |
| 848 } |
| 849 } |
| 850 |
| 851 |
| 852 /** Not documented yet. */ |
| 853 class OperationErrorErrors { |
| 854 /** Not documented yet. */ |
| 855 core.String code; |
| 856 |
| 857 /** Not documented yet. */ |
| 858 core.String location; |
| 859 |
| 860 /** Not documented yet. */ |
| 861 core.String message; |
| 862 |
| 863 |
| 864 OperationErrorErrors(); |
| 865 |
| 866 OperationErrorErrors.fromJson(core.Map _json) { |
| 867 if (_json.containsKey("code")) { |
| 868 code = _json["code"]; |
| 869 } |
| 870 if (_json.containsKey("location")) { |
| 871 location = _json["location"]; |
| 872 } |
| 873 if (_json.containsKey("message")) { |
| 874 message = _json["message"]; |
| 875 } |
| 876 } |
| 877 |
| 878 core.Map toJson() { |
| 879 var _json = new core.Map(); |
| 880 if (code != null) { |
| 881 _json["code"] = code; |
| 882 } |
| 883 if (location != null) { |
| 884 _json["location"] = location; |
| 885 } |
| 886 if (message != null) { |
| 887 _json["message"] = message; |
| 888 } |
| 889 return _json; |
| 890 } |
| 891 } |
| 892 |
| 893 |
| 894 /** Not documented yet. */ |
| 895 class OperationError { |
| 896 /** Not documented yet. */ |
| 897 core.List<OperationErrorErrors> errors; |
| 898 |
| 899 |
| 900 OperationError(); |
| 901 |
| 902 OperationError.fromJson(core.Map _json) { |
| 903 if (_json.containsKey("errors")) { |
| 904 errors = _json["errors"].map((value) => new OperationErrorErrors.fromJson(
value)).toList(); |
| 905 } |
| 906 } |
| 907 |
| 908 core.Map toJson() { |
| 909 var _json = new core.Map(); |
| 910 if (errors != null) { |
| 911 _json["errors"] = errors.map((value) => (value).toJson()).toList(); |
| 912 } |
| 913 return _json; |
| 914 } |
| 915 } |
| 916 |
| 917 |
| 918 /** Not documented yet. */ |
| 919 class OperationWarningsData { |
| 920 /** Not documented yet. */ |
| 921 core.String key; |
| 922 |
| 923 /** Not documented yet. */ |
| 924 core.String value; |
| 925 |
| 926 |
| 927 OperationWarningsData(); |
| 928 |
| 929 OperationWarningsData.fromJson(core.Map _json) { |
| 930 if (_json.containsKey("key")) { |
| 931 key = _json["key"]; |
| 932 } |
| 933 if (_json.containsKey("value")) { |
| 934 value = _json["value"]; |
| 935 } |
| 936 } |
| 937 |
| 938 core.Map toJson() { |
| 939 var _json = new core.Map(); |
| 940 if (key != null) { |
| 941 _json["key"] = key; |
| 942 } |
| 943 if (value != null) { |
| 944 _json["value"] = value; |
| 945 } |
| 946 return _json; |
| 947 } |
| 948 } |
| 949 |
| 950 |
| 951 /** Not documented yet. */ |
| 952 class OperationWarnings { |
| 953 /** Not documented yet. */ |
| 954 core.String code; |
| 955 |
| 956 /** Not documented yet. */ |
| 957 core.List<OperationWarningsData> data; |
| 958 |
| 959 /** Not documented yet. */ |
| 960 core.String message; |
| 961 |
| 962 |
| 963 OperationWarnings(); |
| 964 |
| 965 OperationWarnings.fromJson(core.Map _json) { |
| 966 if (_json.containsKey("code")) { |
| 967 code = _json["code"]; |
| 968 } |
| 969 if (_json.containsKey("data")) { |
| 970 data = _json["data"].map((value) => new OperationWarningsData.fromJson(val
ue)).toList(); |
| 971 } |
| 972 if (_json.containsKey("message")) { |
| 973 message = _json["message"]; |
| 974 } |
| 975 } |
| 976 |
| 977 core.Map toJson() { |
| 978 var _json = new core.Map(); |
| 979 if (code != null) { |
| 980 _json["code"] = code; |
| 981 } |
| 982 if (data != null) { |
| 983 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 984 } |
| 985 if (message != null) { |
| 986 _json["message"] = message; |
| 987 } |
| 988 return _json; |
| 989 } |
| 990 } |
| 991 |
| 992 |
| 993 /** Not documented yet. */ |
| 994 class Operation { |
| 995 /** Not documented yet. */ |
| 996 core.String clientOperationId; |
| 997 |
| 998 /** Not documented yet. */ |
| 999 core.String creationTimestamp; |
| 1000 |
| 1001 /** Not documented yet. */ |
| 1002 core.String endTime; |
| 1003 |
| 1004 /** Not documented yet. */ |
| 1005 OperationError error; |
| 1006 |
| 1007 /** Not documented yet. */ |
| 1008 core.String httpErrorMessage; |
| 1009 |
| 1010 /** Not documented yet. */ |
| 1011 core.int httpErrorStatusCode; |
| 1012 |
| 1013 /** Not documented yet. */ |
| 1014 core.String id; |
| 1015 |
| 1016 /** Not documented yet. */ |
| 1017 core.String insertTime; |
| 1018 |
| 1019 /** Type of the resource. */ |
| 1020 core.String kind; |
| 1021 |
| 1022 /** Not documented yet. */ |
| 1023 core.String name; |
| 1024 |
| 1025 /** Not documented yet. */ |
| 1026 core.String operationType; |
| 1027 |
| 1028 /** Not documented yet. */ |
| 1029 core.int progress; |
| 1030 |
| 1031 /** Not documented yet. */ |
| 1032 core.String region; |
| 1033 |
| 1034 /** Not documented yet. */ |
| 1035 core.String selfLink; |
| 1036 |
| 1037 /** Not documented yet. */ |
| 1038 core.String startTime; |
| 1039 |
| 1040 /** Not documented yet. */ |
| 1041 core.String status; |
| 1042 |
| 1043 /** Not documented yet. */ |
| 1044 core.String statusMessage; |
| 1045 |
| 1046 /** Not documented yet. */ |
| 1047 core.String targetId; |
| 1048 |
| 1049 /** Not documented yet. */ |
| 1050 core.String targetLink; |
| 1051 |
| 1052 /** Not documented yet. */ |
| 1053 core.String user; |
| 1054 |
| 1055 /** Not documented yet. */ |
| 1056 core.List<OperationWarnings> warnings; |
| 1057 |
| 1058 /** Not documented yet. */ |
| 1059 core.String zone; |
| 1060 |
| 1061 |
| 1062 Operation(); |
| 1063 |
| 1064 Operation.fromJson(core.Map _json) { |
| 1065 if (_json.containsKey("clientOperationId")) { |
| 1066 clientOperationId = _json["clientOperationId"]; |
| 1067 } |
| 1068 if (_json.containsKey("creationTimestamp")) { |
| 1069 creationTimestamp = _json["creationTimestamp"]; |
| 1070 } |
| 1071 if (_json.containsKey("endTime")) { |
| 1072 endTime = _json["endTime"]; |
| 1073 } |
| 1074 if (_json.containsKey("error")) { |
| 1075 error = new OperationError.fromJson(_json["error"]); |
| 1076 } |
| 1077 if (_json.containsKey("httpErrorMessage")) { |
| 1078 httpErrorMessage = _json["httpErrorMessage"]; |
| 1079 } |
| 1080 if (_json.containsKey("httpErrorStatusCode")) { |
| 1081 httpErrorStatusCode = _json["httpErrorStatusCode"]; |
| 1082 } |
| 1083 if (_json.containsKey("id")) { |
| 1084 id = _json["id"]; |
| 1085 } |
| 1086 if (_json.containsKey("insertTime")) { |
| 1087 insertTime = _json["insertTime"]; |
| 1088 } |
| 1089 if (_json.containsKey("kind")) { |
| 1090 kind = _json["kind"]; |
| 1091 } |
| 1092 if (_json.containsKey("name")) { |
| 1093 name = _json["name"]; |
| 1094 } |
| 1095 if (_json.containsKey("operationType")) { |
| 1096 operationType = _json["operationType"]; |
| 1097 } |
| 1098 if (_json.containsKey("progress")) { |
| 1099 progress = _json["progress"]; |
| 1100 } |
| 1101 if (_json.containsKey("region")) { |
| 1102 region = _json["region"]; |
| 1103 } |
| 1104 if (_json.containsKey("selfLink")) { |
| 1105 selfLink = _json["selfLink"]; |
| 1106 } |
| 1107 if (_json.containsKey("startTime")) { |
| 1108 startTime = _json["startTime"]; |
| 1109 } |
| 1110 if (_json.containsKey("status")) { |
| 1111 status = _json["status"]; |
| 1112 } |
| 1113 if (_json.containsKey("statusMessage")) { |
| 1114 statusMessage = _json["statusMessage"]; |
| 1115 } |
| 1116 if (_json.containsKey("targetId")) { |
| 1117 targetId = _json["targetId"]; |
| 1118 } |
| 1119 if (_json.containsKey("targetLink")) { |
| 1120 targetLink = _json["targetLink"]; |
| 1121 } |
| 1122 if (_json.containsKey("user")) { |
| 1123 user = _json["user"]; |
| 1124 } |
| 1125 if (_json.containsKey("warnings")) { |
| 1126 warnings = _json["warnings"].map((value) => new OperationWarnings.fromJson
(value)).toList(); |
| 1127 } |
| 1128 if (_json.containsKey("zone")) { |
| 1129 zone = _json["zone"]; |
| 1130 } |
| 1131 } |
| 1132 |
| 1133 core.Map toJson() { |
| 1134 var _json = new core.Map(); |
| 1135 if (clientOperationId != null) { |
| 1136 _json["clientOperationId"] = clientOperationId; |
| 1137 } |
| 1138 if (creationTimestamp != null) { |
| 1139 _json["creationTimestamp"] = creationTimestamp; |
| 1140 } |
| 1141 if (endTime != null) { |
| 1142 _json["endTime"] = endTime; |
| 1143 } |
| 1144 if (error != null) { |
| 1145 _json["error"] = (error).toJson(); |
| 1146 } |
| 1147 if (httpErrorMessage != null) { |
| 1148 _json["httpErrorMessage"] = httpErrorMessage; |
| 1149 } |
| 1150 if (httpErrorStatusCode != null) { |
| 1151 _json["httpErrorStatusCode"] = httpErrorStatusCode; |
| 1152 } |
| 1153 if (id != null) { |
| 1154 _json["id"] = id; |
| 1155 } |
| 1156 if (insertTime != null) { |
| 1157 _json["insertTime"] = insertTime; |
| 1158 } |
| 1159 if (kind != null) { |
| 1160 _json["kind"] = kind; |
| 1161 } |
| 1162 if (name != null) { |
| 1163 _json["name"] = name; |
| 1164 } |
| 1165 if (operationType != null) { |
| 1166 _json["operationType"] = operationType; |
| 1167 } |
| 1168 if (progress != null) { |
| 1169 _json["progress"] = progress; |
| 1170 } |
| 1171 if (region != null) { |
| 1172 _json["region"] = region; |
| 1173 } |
| 1174 if (selfLink != null) { |
| 1175 _json["selfLink"] = selfLink; |
| 1176 } |
| 1177 if (startTime != null) { |
| 1178 _json["startTime"] = startTime; |
| 1179 } |
| 1180 if (status != null) { |
| 1181 _json["status"] = status; |
| 1182 } |
| 1183 if (statusMessage != null) { |
| 1184 _json["statusMessage"] = statusMessage; |
| 1185 } |
| 1186 if (targetId != null) { |
| 1187 _json["targetId"] = targetId; |
| 1188 } |
| 1189 if (targetLink != null) { |
| 1190 _json["targetLink"] = targetLink; |
| 1191 } |
| 1192 if (user != null) { |
| 1193 _json["user"] = user; |
| 1194 } |
| 1195 if (warnings != null) { |
| 1196 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); |
| 1197 } |
| 1198 if (zone != null) { |
| 1199 _json["zone"] = zone; |
| 1200 } |
| 1201 return _json; |
| 1202 } |
| 1203 } |
| 1204 |
| 1205 |
| 1206 /** Not documented yet. */ |
| 1207 class OperationList { |
| 1208 /** Not documented yet. */ |
| 1209 core.String id; |
| 1210 |
| 1211 /** Not documented yet. */ |
| 1212 core.List<Operation> items; |
| 1213 |
| 1214 /** Type of resource. */ |
| 1215 core.String kind; |
| 1216 |
| 1217 /** Not documented yet. */ |
| 1218 core.String nextPageToken; |
| 1219 |
| 1220 /** Not documented yet. */ |
| 1221 core.String selfLink; |
| 1222 |
| 1223 |
| 1224 OperationList(); |
| 1225 |
| 1226 OperationList.fromJson(core.Map _json) { |
| 1227 if (_json.containsKey("id")) { |
| 1228 id = _json["id"]; |
| 1229 } |
| 1230 if (_json.containsKey("items")) { |
| 1231 items = _json["items"].map((value) => new Operation.fromJson(value)).toLis
t(); |
| 1232 } |
| 1233 if (_json.containsKey("kind")) { |
| 1234 kind = _json["kind"]; |
| 1235 } |
| 1236 if (_json.containsKey("nextPageToken")) { |
| 1237 nextPageToken = _json["nextPageToken"]; |
| 1238 } |
| 1239 if (_json.containsKey("selfLink")) { |
| 1240 selfLink = _json["selfLink"]; |
| 1241 } |
| 1242 } |
| 1243 |
| 1244 core.Map toJson() { |
| 1245 var _json = new core.Map(); |
| 1246 if (id != null) { |
| 1247 _json["id"] = id; |
| 1248 } |
| 1249 if (items != null) { |
| 1250 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1251 } |
| 1252 if (kind != null) { |
| 1253 _json["kind"] = kind; |
| 1254 } |
| 1255 if (nextPageToken != null) { |
| 1256 _json["nextPageToken"] = nextPageToken; |
| 1257 } |
| 1258 if (selfLink != null) { |
| 1259 _json["selfLink"] = selfLink; |
| 1260 } |
| 1261 return _json; |
| 1262 } |
| 1263 } |
| 1264 |
| 1265 |
OLD | NEW |