| 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.discovery.v1; | 3 library googleapis.discovery.v1; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 DirectoryListItemsIcons.fromJson(core.Map _json) { | 139 DirectoryListItemsIcons.fromJson(core.Map _json) { |
| 140 if (_json.containsKey("x16")) { | 140 if (_json.containsKey("x16")) { |
| 141 x16 = _json["x16"]; | 141 x16 = _json["x16"]; |
| 142 } | 142 } |
| 143 if (_json.containsKey("x32")) { | 143 if (_json.containsKey("x32")) { |
| 144 x32 = _json["x32"]; | 144 x32 = _json["x32"]; |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 | 147 |
| 148 core.Map toJson() { | 148 core.Map<core.String, core.Object> toJson() { |
| 149 var _json = new core.Map(); | 149 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 150 if (x16 != null) { | 150 if (x16 != null) { |
| 151 _json["x16"] = x16; | 151 _json["x16"] = x16; |
| 152 } | 152 } |
| 153 if (x32 != null) { | 153 if (x32 != null) { |
| 154 _json["x32"] = x32; | 154 _json["x32"] = x32; |
| 155 } | 155 } |
| 156 return _json; | 156 return _json; |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 preferred = _json["preferred"]; | 217 preferred = _json["preferred"]; |
| 218 } | 218 } |
| 219 if (_json.containsKey("title")) { | 219 if (_json.containsKey("title")) { |
| 220 title = _json["title"]; | 220 title = _json["title"]; |
| 221 } | 221 } |
| 222 if (_json.containsKey("version")) { | 222 if (_json.containsKey("version")) { |
| 223 version = _json["version"]; | 223 version = _json["version"]; |
| 224 } | 224 } |
| 225 } | 225 } |
| 226 | 226 |
| 227 core.Map toJson() { | 227 core.Map<core.String, core.Object> toJson() { |
| 228 var _json = new core.Map(); | 228 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 229 if (description != null) { | 229 if (description != null) { |
| 230 _json["description"] = description; | 230 _json["description"] = description; |
| 231 } | 231 } |
| 232 if (discoveryLink != null) { | 232 if (discoveryLink != null) { |
| 233 _json["discoveryLink"] = discoveryLink; | 233 _json["discoveryLink"] = discoveryLink; |
| 234 } | 234 } |
| 235 if (discoveryRestUrl != null) { | 235 if (discoveryRestUrl != null) { |
| 236 _json["discoveryRestUrl"] = discoveryRestUrl; | 236 _json["discoveryRestUrl"] = discoveryRestUrl; |
| 237 } | 237 } |
| 238 if (documentationLink != null) { | 238 if (documentationLink != null) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 discoveryVersion = _json["discoveryVersion"]; | 281 discoveryVersion = _json["discoveryVersion"]; |
| 282 } | 282 } |
| 283 if (_json.containsKey("items")) { | 283 if (_json.containsKey("items")) { |
| 284 items = _json["items"].map((value) => new DirectoryListItems.fromJson(valu
e)).toList(); | 284 items = _json["items"].map((value) => new DirectoryListItems.fromJson(valu
e)).toList(); |
| 285 } | 285 } |
| 286 if (_json.containsKey("kind")) { | 286 if (_json.containsKey("kind")) { |
| 287 kind = _json["kind"]; | 287 kind = _json["kind"]; |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 | 290 |
| 291 core.Map toJson() { | 291 core.Map<core.String, core.Object> toJson() { |
| 292 var _json = new core.Map(); | 292 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 293 if (discoveryVersion != null) { | 293 if (discoveryVersion != null) { |
| 294 _json["discoveryVersion"] = discoveryVersion; | 294 _json["discoveryVersion"] = discoveryVersion; |
| 295 } | 295 } |
| 296 if (items != null) { | 296 if (items != null) { |
| 297 _json["items"] = items.map((value) => (value).toJson()).toList(); | 297 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 298 } | 298 } |
| 299 if (kind != null) { | 299 if (kind != null) { |
| 300 _json["kind"] = kind; | 300 _json["kind"] = kind; |
| 301 } | 301 } |
| 302 return _json; | 302 return _json; |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 | 305 |
| 306 /** Additional information about this property. */ | 306 /** Additional information about this property. */ |
| 307 class JsonSchemaAnnotations { | 307 class JsonSchemaAnnotations { |
| 308 /** A list of methods for which this property is required on requests. */ | 308 /** A list of methods for which this property is required on requests. */ |
| 309 core.List<core.String> required; | 309 core.List<core.String> required; |
| 310 | 310 |
| 311 JsonSchemaAnnotations(); | 311 JsonSchemaAnnotations(); |
| 312 | 312 |
| 313 JsonSchemaAnnotations.fromJson(core.Map _json) { | 313 JsonSchemaAnnotations.fromJson(core.Map _json) { |
| 314 if (_json.containsKey("required")) { | 314 if (_json.containsKey("required")) { |
| 315 required = _json["required"]; | 315 required = _json["required"]; |
| 316 } | 316 } |
| 317 } | 317 } |
| 318 | 318 |
| 319 core.Map toJson() { | 319 core.Map<core.String, core.Object> toJson() { |
| 320 var _json = new core.Map(); | 320 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 321 if (required != null) { | 321 if (required != null) { |
| 322 _json["required"] = required; | 322 _json["required"] = required; |
| 323 } | 323 } |
| 324 return _json; | 324 return _json; |
| 325 } | 325 } |
| 326 } | 326 } |
| 327 | 327 |
| 328 class JsonSchemaVariantMap { | 328 class JsonSchemaVariantMap { |
| 329 core.String P_ref; | 329 core.String P_ref; |
| 330 core.String typeValue; | 330 core.String typeValue; |
| 331 | 331 |
| 332 JsonSchemaVariantMap(); | 332 JsonSchemaVariantMap(); |
| 333 | 333 |
| 334 JsonSchemaVariantMap.fromJson(core.Map _json) { | 334 JsonSchemaVariantMap.fromJson(core.Map _json) { |
| 335 if (_json.containsKey("\$ref")) { | 335 if (_json.containsKey("\$ref")) { |
| 336 P_ref = _json["\$ref"]; | 336 P_ref = _json["\$ref"]; |
| 337 } | 337 } |
| 338 if (_json.containsKey("type_value")) { | 338 if (_json.containsKey("type_value")) { |
| 339 typeValue = _json["type_value"]; | 339 typeValue = _json["type_value"]; |
| 340 } | 340 } |
| 341 } | 341 } |
| 342 | 342 |
| 343 core.Map toJson() { | 343 core.Map<core.String, core.Object> toJson() { |
| 344 var _json = new core.Map(); | 344 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 345 if (P_ref != null) { | 345 if (P_ref != null) { |
| 346 _json["\$ref"] = P_ref; | 346 _json["\$ref"] = P_ref; |
| 347 } | 347 } |
| 348 if (typeValue != null) { | 348 if (typeValue != null) { |
| 349 _json["type_value"] = typeValue; | 349 _json["type_value"] = typeValue; |
| 350 } | 350 } |
| 351 return _json; | 351 return _json; |
| 352 } | 352 } |
| 353 } | 353 } |
| 354 | 354 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 367 | 367 |
| 368 JsonSchemaVariant.fromJson(core.Map _json) { | 368 JsonSchemaVariant.fromJson(core.Map _json) { |
| 369 if (_json.containsKey("discriminant")) { | 369 if (_json.containsKey("discriminant")) { |
| 370 discriminant = _json["discriminant"]; | 370 discriminant = _json["discriminant"]; |
| 371 } | 371 } |
| 372 if (_json.containsKey("map")) { | 372 if (_json.containsKey("map")) { |
| 373 map = _json["map"].map((value) => new JsonSchemaVariantMap.fromJson(value)
).toList(); | 373 map = _json["map"].map((value) => new JsonSchemaVariantMap.fromJson(value)
).toList(); |
| 374 } | 374 } |
| 375 } | 375 } |
| 376 | 376 |
| 377 core.Map toJson() { | 377 core.Map<core.String, core.Object> toJson() { |
| 378 var _json = new core.Map(); | 378 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 379 if (discriminant != null) { | 379 if (discriminant != null) { |
| 380 _json["discriminant"] = discriminant; | 380 _json["discriminant"] = discriminant; |
| 381 } | 381 } |
| 382 if (map != null) { | 382 if (map != null) { |
| 383 _json["map"] = map.map((value) => (value).toJson()).toList(); | 383 _json["map"] = map.map((value) => (value).toJson()).toList(); |
| 384 } | 384 } |
| 385 return _json; | 385 return _json; |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 | 388 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 if (_json.containsKey("maximum")) { | 503 if (_json.containsKey("maximum")) { |
| 504 maximum = _json["maximum"]; | 504 maximum = _json["maximum"]; |
| 505 } | 505 } |
| 506 if (_json.containsKey("minimum")) { | 506 if (_json.containsKey("minimum")) { |
| 507 minimum = _json["minimum"]; | 507 minimum = _json["minimum"]; |
| 508 } | 508 } |
| 509 if (_json.containsKey("pattern")) { | 509 if (_json.containsKey("pattern")) { |
| 510 pattern = _json["pattern"]; | 510 pattern = _json["pattern"]; |
| 511 } | 511 } |
| 512 if (_json.containsKey("properties")) { | 512 if (_json.containsKey("properties")) { |
| 513 properties = commons.mapMap(_json["properties"], (item) => new JsonSchema.
fromJson(item)); | 513 properties = commons.mapMap<core.Map<core.String, core.Object>, JsonSchema
>(_json["properties"], (core.Map<core.String, core.Object> item) => new JsonSche
ma.fromJson(item)); |
| 514 } | 514 } |
| 515 if (_json.containsKey("readOnly")) { | 515 if (_json.containsKey("readOnly")) { |
| 516 readOnly = _json["readOnly"]; | 516 readOnly = _json["readOnly"]; |
| 517 } | 517 } |
| 518 if (_json.containsKey("repeated")) { | 518 if (_json.containsKey("repeated")) { |
| 519 repeated = _json["repeated"]; | 519 repeated = _json["repeated"]; |
| 520 } | 520 } |
| 521 if (_json.containsKey("required")) { | 521 if (_json.containsKey("required")) { |
| 522 required = _json["required"]; | 522 required = _json["required"]; |
| 523 } | 523 } |
| 524 if (_json.containsKey("type")) { | 524 if (_json.containsKey("type")) { |
| 525 type = _json["type"]; | 525 type = _json["type"]; |
| 526 } | 526 } |
| 527 if (_json.containsKey("variant")) { | 527 if (_json.containsKey("variant")) { |
| 528 variant = new JsonSchemaVariant.fromJson(_json["variant"]); | 528 variant = new JsonSchemaVariant.fromJson(_json["variant"]); |
| 529 } | 529 } |
| 530 } | 530 } |
| 531 | 531 |
| 532 core.Map toJson() { | 532 core.Map<core.String, core.Object> toJson() { |
| 533 var _json = new core.Map(); | 533 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 534 if (P_ref != null) { | 534 if (P_ref != null) { |
| 535 _json["\$ref"] = P_ref; | 535 _json["\$ref"] = P_ref; |
| 536 } | 536 } |
| 537 if (additionalProperties != null) { | 537 if (additionalProperties != null) { |
| 538 _json["additionalProperties"] = (additionalProperties).toJson(); | 538 _json["additionalProperties"] = (additionalProperties).toJson(); |
| 539 } | 539 } |
| 540 if (annotations != null) { | 540 if (annotations != null) { |
| 541 _json["annotations"] = (annotations).toJson(); | 541 _json["annotations"] = (annotations).toJson(); |
| 542 } | 542 } |
| 543 if (default_ != null) { | 543 if (default_ != null) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 567 if (maximum != null) { | 567 if (maximum != null) { |
| 568 _json["maximum"] = maximum; | 568 _json["maximum"] = maximum; |
| 569 } | 569 } |
| 570 if (minimum != null) { | 570 if (minimum != null) { |
| 571 _json["minimum"] = minimum; | 571 _json["minimum"] = minimum; |
| 572 } | 572 } |
| 573 if (pattern != null) { | 573 if (pattern != null) { |
| 574 _json["pattern"] = pattern; | 574 _json["pattern"] = pattern; |
| 575 } | 575 } |
| 576 if (properties != null) { | 576 if (properties != null) { |
| 577 _json["properties"] = commons.mapMap(properties, (item) => (item).toJson()
); | 577 _json["properties"] = commons.mapMap<JsonSchema, core.Map<core.String, cor
e.Object>>(properties, (JsonSchema item) => (item).toJson()); |
| 578 } | 578 } |
| 579 if (readOnly != null) { | 579 if (readOnly != null) { |
| 580 _json["readOnly"] = readOnly; | 580 _json["readOnly"] = readOnly; |
| 581 } | 581 } |
| 582 if (repeated != null) { | 582 if (repeated != null) { |
| 583 _json["repeated"] = repeated; | 583 _json["repeated"] = repeated; |
| 584 } | 584 } |
| 585 if (required != null) { | 585 if (required != null) { |
| 586 _json["required"] = required; | 586 _json["required"] = required; |
| 587 } | 587 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 601 core.String description; | 601 core.String description; |
| 602 | 602 |
| 603 RestDescriptionAuthOauth2ScopesValue(); | 603 RestDescriptionAuthOauth2ScopesValue(); |
| 604 | 604 |
| 605 RestDescriptionAuthOauth2ScopesValue.fromJson(core.Map _json) { | 605 RestDescriptionAuthOauth2ScopesValue.fromJson(core.Map _json) { |
| 606 if (_json.containsKey("description")) { | 606 if (_json.containsKey("description")) { |
| 607 description = _json["description"]; | 607 description = _json["description"]; |
| 608 } | 608 } |
| 609 } | 609 } |
| 610 | 610 |
| 611 core.Map toJson() { | 611 core.Map<core.String, core.Object> toJson() { |
| 612 var _json = new core.Map(); | 612 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 613 if (description != null) { | 613 if (description != null) { |
| 614 _json["description"] = description; | 614 _json["description"] = description; |
| 615 } | 615 } |
| 616 return _json; | 616 return _json; |
| 617 } | 617 } |
| 618 } | 618 } |
| 619 | 619 |
| 620 /** OAuth 2.0 authentication information. */ | 620 /** OAuth 2.0 authentication information. */ |
| 621 class RestDescriptionAuthOauth2 { | 621 class RestDescriptionAuthOauth2 { |
| 622 /** Available OAuth 2.0 scopes. */ | 622 /** Available OAuth 2.0 scopes. */ |
| 623 core.Map<core.String, RestDescriptionAuthOauth2ScopesValue> scopes; | 623 core.Map<core.String, RestDescriptionAuthOauth2ScopesValue> scopes; |
| 624 | 624 |
| 625 RestDescriptionAuthOauth2(); | 625 RestDescriptionAuthOauth2(); |
| 626 | 626 |
| 627 RestDescriptionAuthOauth2.fromJson(core.Map _json) { | 627 RestDescriptionAuthOauth2.fromJson(core.Map _json) { |
| 628 if (_json.containsKey("scopes")) { | 628 if (_json.containsKey("scopes")) { |
| 629 scopes = commons.mapMap(_json["scopes"], (item) => new RestDescriptionAuth
Oauth2ScopesValue.fromJson(item)); | 629 scopes = commons.mapMap<core.Map<core.String, core.Object>, RestDescriptio
nAuthOauth2ScopesValue>(_json["scopes"], (core.Map<core.String, core.Object> ite
m) => new RestDescriptionAuthOauth2ScopesValue.fromJson(item)); |
| 630 } | 630 } |
| 631 } | 631 } |
| 632 | 632 |
| 633 core.Map toJson() { | 633 core.Map<core.String, core.Object> toJson() { |
| 634 var _json = new core.Map(); | 634 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 635 if (scopes != null) { | 635 if (scopes != null) { |
| 636 _json["scopes"] = commons.mapMap(scopes, (item) => (item).toJson()); | 636 _json["scopes"] = commons.mapMap<RestDescriptionAuthOauth2ScopesValue, cor
e.Map<core.String, core.Object>>(scopes, (RestDescriptionAuthOauth2ScopesValue i
tem) => (item).toJson()); |
| 637 } | 637 } |
| 638 return _json; | 638 return _json; |
| 639 } | 639 } |
| 640 } | 640 } |
| 641 | 641 |
| 642 /** Authentication information. */ | 642 /** Authentication information. */ |
| 643 class RestDescriptionAuth { | 643 class RestDescriptionAuth { |
| 644 /** OAuth 2.0 authentication information. */ | 644 /** OAuth 2.0 authentication information. */ |
| 645 RestDescriptionAuthOauth2 oauth2; | 645 RestDescriptionAuthOauth2 oauth2; |
| 646 | 646 |
| 647 RestDescriptionAuth(); | 647 RestDescriptionAuth(); |
| 648 | 648 |
| 649 RestDescriptionAuth.fromJson(core.Map _json) { | 649 RestDescriptionAuth.fromJson(core.Map _json) { |
| 650 if (_json.containsKey("oauth2")) { | 650 if (_json.containsKey("oauth2")) { |
| 651 oauth2 = new RestDescriptionAuthOauth2.fromJson(_json["oauth2"]); | 651 oauth2 = new RestDescriptionAuthOauth2.fromJson(_json["oauth2"]); |
| 652 } | 652 } |
| 653 } | 653 } |
| 654 | 654 |
| 655 core.Map toJson() { | 655 core.Map<core.String, core.Object> toJson() { |
| 656 var _json = new core.Map(); | 656 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 657 if (oauth2 != null) { | 657 if (oauth2 != null) { |
| 658 _json["oauth2"] = (oauth2).toJson(); | 658 _json["oauth2"] = (oauth2).toJson(); |
| 659 } | 659 } |
| 660 return _json; | 660 return _json; |
| 661 } | 661 } |
| 662 } | 662 } |
| 663 | 663 |
| 664 /** Links to 16x16 and 32x32 icons representing the API. */ | 664 /** Links to 16x16 and 32x32 icons representing the API. */ |
| 665 class RestDescriptionIcons { | 665 class RestDescriptionIcons { |
| 666 /** The URL of the 16x16 icon. */ | 666 /** The URL of the 16x16 icon. */ |
| 667 core.String x16; | 667 core.String x16; |
| 668 /** The URL of the 32x32 icon. */ | 668 /** The URL of the 32x32 icon. */ |
| 669 core.String x32; | 669 core.String x32; |
| 670 | 670 |
| 671 RestDescriptionIcons(); | 671 RestDescriptionIcons(); |
| 672 | 672 |
| 673 RestDescriptionIcons.fromJson(core.Map _json) { | 673 RestDescriptionIcons.fromJson(core.Map _json) { |
| 674 if (_json.containsKey("x16")) { | 674 if (_json.containsKey("x16")) { |
| 675 x16 = _json["x16"]; | 675 x16 = _json["x16"]; |
| 676 } | 676 } |
| 677 if (_json.containsKey("x32")) { | 677 if (_json.containsKey("x32")) { |
| 678 x32 = _json["x32"]; | 678 x32 = _json["x32"]; |
| 679 } | 679 } |
| 680 } | 680 } |
| 681 | 681 |
| 682 core.Map toJson() { | 682 core.Map<core.String, core.Object> toJson() { |
| 683 var _json = new core.Map(); | 683 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 684 if (x16 != null) { | 684 if (x16 != null) { |
| 685 _json["x16"] = x16; | 685 _json["x16"] = x16; |
| 686 } | 686 } |
| 687 if (x32 != null) { | 687 if (x32 != null) { |
| 688 _json["x32"] = x32; | 688 _json["x32"] = x32; |
| 689 } | 689 } |
| 690 return _json; | 690 return _json; |
| 691 } | 691 } |
| 692 } | 692 } |
| 693 | 693 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 if (_json.containsKey("id")) { | 803 if (_json.containsKey("id")) { |
| 804 id = _json["id"]; | 804 id = _json["id"]; |
| 805 } | 805 } |
| 806 if (_json.containsKey("kind")) { | 806 if (_json.containsKey("kind")) { |
| 807 kind = _json["kind"]; | 807 kind = _json["kind"]; |
| 808 } | 808 } |
| 809 if (_json.containsKey("labels")) { | 809 if (_json.containsKey("labels")) { |
| 810 labels = _json["labels"]; | 810 labels = _json["labels"]; |
| 811 } | 811 } |
| 812 if (_json.containsKey("methods")) { | 812 if (_json.containsKey("methods")) { |
| 813 methods = commons.mapMap(_json["methods"], (item) => new RestMethod.fromJs
on(item)); | 813 methods = commons.mapMap<core.Map<core.String, core.Object>, RestMethod>(_
json["methods"], (core.Map<core.String, core.Object> item) => new RestMethod.fro
mJson(item)); |
| 814 } | 814 } |
| 815 if (_json.containsKey("name")) { | 815 if (_json.containsKey("name")) { |
| 816 name = _json["name"]; | 816 name = _json["name"]; |
| 817 } | 817 } |
| 818 if (_json.containsKey("ownerDomain")) { | 818 if (_json.containsKey("ownerDomain")) { |
| 819 ownerDomain = _json["ownerDomain"]; | 819 ownerDomain = _json["ownerDomain"]; |
| 820 } | 820 } |
| 821 if (_json.containsKey("ownerName")) { | 821 if (_json.containsKey("ownerName")) { |
| 822 ownerName = _json["ownerName"]; | 822 ownerName = _json["ownerName"]; |
| 823 } | 823 } |
| 824 if (_json.containsKey("packagePath")) { | 824 if (_json.containsKey("packagePath")) { |
| 825 packagePath = _json["packagePath"]; | 825 packagePath = _json["packagePath"]; |
| 826 } | 826 } |
| 827 if (_json.containsKey("parameters")) { | 827 if (_json.containsKey("parameters")) { |
| 828 parameters = commons.mapMap(_json["parameters"], (item) => new JsonSchema.
fromJson(item)); | 828 parameters = commons.mapMap<core.Map<core.String, core.Object>, JsonSchema
>(_json["parameters"], (core.Map<core.String, core.Object> item) => new JsonSche
ma.fromJson(item)); |
| 829 } | 829 } |
| 830 if (_json.containsKey("protocol")) { | 830 if (_json.containsKey("protocol")) { |
| 831 protocol = _json["protocol"]; | 831 protocol = _json["protocol"]; |
| 832 } | 832 } |
| 833 if (_json.containsKey("resources")) { | 833 if (_json.containsKey("resources")) { |
| 834 resources = commons.mapMap(_json["resources"], (item) => new RestResource.
fromJson(item)); | 834 resources = commons.mapMap<core.Map<core.String, core.Object>, RestResourc
e>(_json["resources"], (core.Map<core.String, core.Object> item) => new RestReso
urce.fromJson(item)); |
| 835 } | 835 } |
| 836 if (_json.containsKey("revision")) { | 836 if (_json.containsKey("revision")) { |
| 837 revision = _json["revision"]; | 837 revision = _json["revision"]; |
| 838 } | 838 } |
| 839 if (_json.containsKey("rootUrl")) { | 839 if (_json.containsKey("rootUrl")) { |
| 840 rootUrl = _json["rootUrl"]; | 840 rootUrl = _json["rootUrl"]; |
| 841 } | 841 } |
| 842 if (_json.containsKey("schemas")) { | 842 if (_json.containsKey("schemas")) { |
| 843 schemas = commons.mapMap(_json["schemas"], (item) => new JsonSchema.fromJs
on(item)); | 843 schemas = commons.mapMap<core.Map<core.String, core.Object>, JsonSchema>(_
json["schemas"], (core.Map<core.String, core.Object> item) => new JsonSchema.fro
mJson(item)); |
| 844 } | 844 } |
| 845 if (_json.containsKey("servicePath")) { | 845 if (_json.containsKey("servicePath")) { |
| 846 servicePath = _json["servicePath"]; | 846 servicePath = _json["servicePath"]; |
| 847 } | 847 } |
| 848 if (_json.containsKey("title")) { | 848 if (_json.containsKey("title")) { |
| 849 title = _json["title"]; | 849 title = _json["title"]; |
| 850 } | 850 } |
| 851 if (_json.containsKey("version")) { | 851 if (_json.containsKey("version")) { |
| 852 version = _json["version"]; | 852 version = _json["version"]; |
| 853 } | 853 } |
| 854 if (_json.containsKey("version_module")) { | 854 if (_json.containsKey("version_module")) { |
| 855 versionModule = _json["version_module"]; | 855 versionModule = _json["version_module"]; |
| 856 } | 856 } |
| 857 } | 857 } |
| 858 | 858 |
| 859 core.Map toJson() { | 859 core.Map<core.String, core.Object> toJson() { |
| 860 var _json = new core.Map(); | 860 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 861 if (auth != null) { | 861 if (auth != null) { |
| 862 _json["auth"] = (auth).toJson(); | 862 _json["auth"] = (auth).toJson(); |
| 863 } | 863 } |
| 864 if (basePath != null) { | 864 if (basePath != null) { |
| 865 _json["basePath"] = basePath; | 865 _json["basePath"] = basePath; |
| 866 } | 866 } |
| 867 if (baseUrl != null) { | 867 if (baseUrl != null) { |
| 868 _json["baseUrl"] = baseUrl; | 868 _json["baseUrl"] = baseUrl; |
| 869 } | 869 } |
| 870 if (batchPath != null) { | 870 if (batchPath != null) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 897 if (id != null) { | 897 if (id != null) { |
| 898 _json["id"] = id; | 898 _json["id"] = id; |
| 899 } | 899 } |
| 900 if (kind != null) { | 900 if (kind != null) { |
| 901 _json["kind"] = kind; | 901 _json["kind"] = kind; |
| 902 } | 902 } |
| 903 if (labels != null) { | 903 if (labels != null) { |
| 904 _json["labels"] = labels; | 904 _json["labels"] = labels; |
| 905 } | 905 } |
| 906 if (methods != null) { | 906 if (methods != null) { |
| 907 _json["methods"] = commons.mapMap(methods, (item) => (item).toJson()); | 907 _json["methods"] = commons.mapMap<RestMethod, core.Map<core.String, core.O
bject>>(methods, (RestMethod item) => (item).toJson()); |
| 908 } | 908 } |
| 909 if (name != null) { | 909 if (name != null) { |
| 910 _json["name"] = name; | 910 _json["name"] = name; |
| 911 } | 911 } |
| 912 if (ownerDomain != null) { | 912 if (ownerDomain != null) { |
| 913 _json["ownerDomain"] = ownerDomain; | 913 _json["ownerDomain"] = ownerDomain; |
| 914 } | 914 } |
| 915 if (ownerName != null) { | 915 if (ownerName != null) { |
| 916 _json["ownerName"] = ownerName; | 916 _json["ownerName"] = ownerName; |
| 917 } | 917 } |
| 918 if (packagePath != null) { | 918 if (packagePath != null) { |
| 919 _json["packagePath"] = packagePath; | 919 _json["packagePath"] = packagePath; |
| 920 } | 920 } |
| 921 if (parameters != null) { | 921 if (parameters != null) { |
| 922 _json["parameters"] = commons.mapMap(parameters, (item) => (item).toJson()
); | 922 _json["parameters"] = commons.mapMap<JsonSchema, core.Map<core.String, cor
e.Object>>(parameters, (JsonSchema item) => (item).toJson()); |
| 923 } | 923 } |
| 924 if (protocol != null) { | 924 if (protocol != null) { |
| 925 _json["protocol"] = protocol; | 925 _json["protocol"] = protocol; |
| 926 } | 926 } |
| 927 if (resources != null) { | 927 if (resources != null) { |
| 928 _json["resources"] = commons.mapMap(resources, (item) => (item).toJson()); | 928 _json["resources"] = commons.mapMap<RestResource, core.Map<core.String, co
re.Object>>(resources, (RestResource item) => (item).toJson()); |
| 929 } | 929 } |
| 930 if (revision != null) { | 930 if (revision != null) { |
| 931 _json["revision"] = revision; | 931 _json["revision"] = revision; |
| 932 } | 932 } |
| 933 if (rootUrl != null) { | 933 if (rootUrl != null) { |
| 934 _json["rootUrl"] = rootUrl; | 934 _json["rootUrl"] = rootUrl; |
| 935 } | 935 } |
| 936 if (schemas != null) { | 936 if (schemas != null) { |
| 937 _json["schemas"] = commons.mapMap(schemas, (item) => (item).toJson()); | 937 _json["schemas"] = commons.mapMap<JsonSchema, core.Map<core.String, core.O
bject>>(schemas, (JsonSchema item) => (item).toJson()); |
| 938 } | 938 } |
| 939 if (servicePath != null) { | 939 if (servicePath != null) { |
| 940 _json["servicePath"] = servicePath; | 940 _json["servicePath"] = servicePath; |
| 941 } | 941 } |
| 942 if (title != null) { | 942 if (title != null) { |
| 943 _json["title"] = title; | 943 _json["title"] = title; |
| 944 } | 944 } |
| 945 if (version != null) { | 945 if (version != null) { |
| 946 _json["version"] = version; | 946 _json["version"] = version; |
| 947 } | 947 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 966 | 966 |
| 967 RestMethodMediaUploadProtocolsResumable.fromJson(core.Map _json) { | 967 RestMethodMediaUploadProtocolsResumable.fromJson(core.Map _json) { |
| 968 if (_json.containsKey("multipart")) { | 968 if (_json.containsKey("multipart")) { |
| 969 multipart = _json["multipart"]; | 969 multipart = _json["multipart"]; |
| 970 } | 970 } |
| 971 if (_json.containsKey("path")) { | 971 if (_json.containsKey("path")) { |
| 972 path = _json["path"]; | 972 path = _json["path"]; |
| 973 } | 973 } |
| 974 } | 974 } |
| 975 | 975 |
| 976 core.Map toJson() { | 976 core.Map<core.String, core.Object> toJson() { |
| 977 var _json = new core.Map(); | 977 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 978 if (multipart != null) { | 978 if (multipart != null) { |
| 979 _json["multipart"] = multipart; | 979 _json["multipart"] = multipart; |
| 980 } | 980 } |
| 981 if (path != null) { | 981 if (path != null) { |
| 982 _json["path"] = path; | 982 _json["path"] = path; |
| 983 } | 983 } |
| 984 return _json; | 984 return _json; |
| 985 } | 985 } |
| 986 } | 986 } |
| 987 | 987 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 999 | 999 |
| 1000 RestMethodMediaUploadProtocolsSimple.fromJson(core.Map _json) { | 1000 RestMethodMediaUploadProtocolsSimple.fromJson(core.Map _json) { |
| 1001 if (_json.containsKey("multipart")) { | 1001 if (_json.containsKey("multipart")) { |
| 1002 multipart = _json["multipart"]; | 1002 multipart = _json["multipart"]; |
| 1003 } | 1003 } |
| 1004 if (_json.containsKey("path")) { | 1004 if (_json.containsKey("path")) { |
| 1005 path = _json["path"]; | 1005 path = _json["path"]; |
| 1006 } | 1006 } |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 core.Map toJson() { | 1009 core.Map<core.String, core.Object> toJson() { |
| 1010 var _json = new core.Map(); | 1010 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1011 if (multipart != null) { | 1011 if (multipart != null) { |
| 1012 _json["multipart"] = multipart; | 1012 _json["multipart"] = multipart; |
| 1013 } | 1013 } |
| 1014 if (path != null) { | 1014 if (path != null) { |
| 1015 _json["path"] = path; | 1015 _json["path"] = path; |
| 1016 } | 1016 } |
| 1017 return _json; | 1017 return _json; |
| 1018 } | 1018 } |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 /** Supported upload protocols. */ | 1021 /** Supported upload protocols. */ |
| 1022 class RestMethodMediaUploadProtocols { | 1022 class RestMethodMediaUploadProtocols { |
| 1023 /** Supports the Resumable Media Upload protocol. */ | 1023 /** Supports the Resumable Media Upload protocol. */ |
| 1024 RestMethodMediaUploadProtocolsResumable resumable; | 1024 RestMethodMediaUploadProtocolsResumable resumable; |
| 1025 /** Supports uploading as a single HTTP request. */ | 1025 /** Supports uploading as a single HTTP request. */ |
| 1026 RestMethodMediaUploadProtocolsSimple simple; | 1026 RestMethodMediaUploadProtocolsSimple simple; |
| 1027 | 1027 |
| 1028 RestMethodMediaUploadProtocols(); | 1028 RestMethodMediaUploadProtocols(); |
| 1029 | 1029 |
| 1030 RestMethodMediaUploadProtocols.fromJson(core.Map _json) { | 1030 RestMethodMediaUploadProtocols.fromJson(core.Map _json) { |
| 1031 if (_json.containsKey("resumable")) { | 1031 if (_json.containsKey("resumable")) { |
| 1032 resumable = new RestMethodMediaUploadProtocolsResumable.fromJson(_json["re
sumable"]); | 1032 resumable = new RestMethodMediaUploadProtocolsResumable.fromJson(_json["re
sumable"]); |
| 1033 } | 1033 } |
| 1034 if (_json.containsKey("simple")) { | 1034 if (_json.containsKey("simple")) { |
| 1035 simple = new RestMethodMediaUploadProtocolsSimple.fromJson(_json["simple"]
); | 1035 simple = new RestMethodMediaUploadProtocolsSimple.fromJson(_json["simple"]
); |
| 1036 } | 1036 } |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 core.Map toJson() { | 1039 core.Map<core.String, core.Object> toJson() { |
| 1040 var _json = new core.Map(); | 1040 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1041 if (resumable != null) { | 1041 if (resumable != null) { |
| 1042 _json["resumable"] = (resumable).toJson(); | 1042 _json["resumable"] = (resumable).toJson(); |
| 1043 } | 1043 } |
| 1044 if (simple != null) { | 1044 if (simple != null) { |
| 1045 _json["simple"] = (simple).toJson(); | 1045 _json["simple"] = (simple).toJson(); |
| 1046 } | 1046 } |
| 1047 return _json; | 1047 return _json; |
| 1048 } | 1048 } |
| 1049 } | 1049 } |
| 1050 | 1050 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1064 accept = _json["accept"]; | 1064 accept = _json["accept"]; |
| 1065 } | 1065 } |
| 1066 if (_json.containsKey("maxSize")) { | 1066 if (_json.containsKey("maxSize")) { |
| 1067 maxSize = _json["maxSize"]; | 1067 maxSize = _json["maxSize"]; |
| 1068 } | 1068 } |
| 1069 if (_json.containsKey("protocols")) { | 1069 if (_json.containsKey("protocols")) { |
| 1070 protocols = new RestMethodMediaUploadProtocols.fromJson(_json["protocols"]
); | 1070 protocols = new RestMethodMediaUploadProtocols.fromJson(_json["protocols"]
); |
| 1071 } | 1071 } |
| 1072 } | 1072 } |
| 1073 | 1073 |
| 1074 core.Map toJson() { | 1074 core.Map<core.String, core.Object> toJson() { |
| 1075 var _json = new core.Map(); | 1075 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1076 if (accept != null) { | 1076 if (accept != null) { |
| 1077 _json["accept"] = accept; | 1077 _json["accept"] = accept; |
| 1078 } | 1078 } |
| 1079 if (maxSize != null) { | 1079 if (maxSize != null) { |
| 1080 _json["maxSize"] = maxSize; | 1080 _json["maxSize"] = maxSize; |
| 1081 } | 1081 } |
| 1082 if (protocols != null) { | 1082 if (protocols != null) { |
| 1083 _json["protocols"] = (protocols).toJson(); | 1083 _json["protocols"] = (protocols).toJson(); |
| 1084 } | 1084 } |
| 1085 return _json; | 1085 return _json; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1097 | 1097 |
| 1098 RestMethodRequest.fromJson(core.Map _json) { | 1098 RestMethodRequest.fromJson(core.Map _json) { |
| 1099 if (_json.containsKey("\$ref")) { | 1099 if (_json.containsKey("\$ref")) { |
| 1100 P_ref = _json["\$ref"]; | 1100 P_ref = _json["\$ref"]; |
| 1101 } | 1101 } |
| 1102 if (_json.containsKey("parameterName")) { | 1102 if (_json.containsKey("parameterName")) { |
| 1103 parameterName = _json["parameterName"]; | 1103 parameterName = _json["parameterName"]; |
| 1104 } | 1104 } |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 core.Map toJson() { | 1107 core.Map<core.String, core.Object> toJson() { |
| 1108 var _json = new core.Map(); | 1108 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1109 if (P_ref != null) { | 1109 if (P_ref != null) { |
| 1110 _json["\$ref"] = P_ref; | 1110 _json["\$ref"] = P_ref; |
| 1111 } | 1111 } |
| 1112 if (parameterName != null) { | 1112 if (parameterName != null) { |
| 1113 _json["parameterName"] = parameterName; | 1113 _json["parameterName"] = parameterName; |
| 1114 } | 1114 } |
| 1115 return _json; | 1115 return _json; |
| 1116 } | 1116 } |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 /** The schema for the response. */ | 1119 /** The schema for the response. */ |
| 1120 class RestMethodResponse { | 1120 class RestMethodResponse { |
| 1121 /** Schema ID for the response schema. */ | 1121 /** Schema ID for the response schema. */ |
| 1122 core.String P_ref; | 1122 core.String P_ref; |
| 1123 | 1123 |
| 1124 RestMethodResponse(); | 1124 RestMethodResponse(); |
| 1125 | 1125 |
| 1126 RestMethodResponse.fromJson(core.Map _json) { | 1126 RestMethodResponse.fromJson(core.Map _json) { |
| 1127 if (_json.containsKey("\$ref")) { | 1127 if (_json.containsKey("\$ref")) { |
| 1128 P_ref = _json["\$ref"]; | 1128 P_ref = _json["\$ref"]; |
| 1129 } | 1129 } |
| 1130 } | 1130 } |
| 1131 | 1131 |
| 1132 core.Map toJson() { | 1132 core.Map<core.String, core.Object> toJson() { |
| 1133 var _json = new core.Map(); | 1133 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1134 if (P_ref != null) { | 1134 if (P_ref != null) { |
| 1135 _json["\$ref"] = P_ref; | 1135 _json["\$ref"] = P_ref; |
| 1136 } | 1136 } |
| 1137 return _json; | 1137 return _json; |
| 1138 } | 1138 } |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 class RestMethod { | 1141 class RestMethod { |
| 1142 /** Description of this method. */ | 1142 /** Description of this method. */ |
| 1143 core.String description; | 1143 core.String description; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 if (_json.containsKey("id")) { | 1201 if (_json.containsKey("id")) { |
| 1202 id = _json["id"]; | 1202 id = _json["id"]; |
| 1203 } | 1203 } |
| 1204 if (_json.containsKey("mediaUpload")) { | 1204 if (_json.containsKey("mediaUpload")) { |
| 1205 mediaUpload = new RestMethodMediaUpload.fromJson(_json["mediaUpload"]); | 1205 mediaUpload = new RestMethodMediaUpload.fromJson(_json["mediaUpload"]); |
| 1206 } | 1206 } |
| 1207 if (_json.containsKey("parameterOrder")) { | 1207 if (_json.containsKey("parameterOrder")) { |
| 1208 parameterOrder = _json["parameterOrder"]; | 1208 parameterOrder = _json["parameterOrder"]; |
| 1209 } | 1209 } |
| 1210 if (_json.containsKey("parameters")) { | 1210 if (_json.containsKey("parameters")) { |
| 1211 parameters = commons.mapMap(_json["parameters"], (item) => new JsonSchema.
fromJson(item)); | 1211 parameters = commons.mapMap<core.Map<core.String, core.Object>, JsonSchema
>(_json["parameters"], (core.Map<core.String, core.Object> item) => new JsonSche
ma.fromJson(item)); |
| 1212 } | 1212 } |
| 1213 if (_json.containsKey("path")) { | 1213 if (_json.containsKey("path")) { |
| 1214 path = _json["path"]; | 1214 path = _json["path"]; |
| 1215 } | 1215 } |
| 1216 if (_json.containsKey("request")) { | 1216 if (_json.containsKey("request")) { |
| 1217 request = new RestMethodRequest.fromJson(_json["request"]); | 1217 request = new RestMethodRequest.fromJson(_json["request"]); |
| 1218 } | 1218 } |
| 1219 if (_json.containsKey("response")) { | 1219 if (_json.containsKey("response")) { |
| 1220 response = new RestMethodResponse.fromJson(_json["response"]); | 1220 response = new RestMethodResponse.fromJson(_json["response"]); |
| 1221 } | 1221 } |
| 1222 if (_json.containsKey("scopes")) { | 1222 if (_json.containsKey("scopes")) { |
| 1223 scopes = _json["scopes"]; | 1223 scopes = _json["scopes"]; |
| 1224 } | 1224 } |
| 1225 if (_json.containsKey("supportsMediaDownload")) { | 1225 if (_json.containsKey("supportsMediaDownload")) { |
| 1226 supportsMediaDownload = _json["supportsMediaDownload"]; | 1226 supportsMediaDownload = _json["supportsMediaDownload"]; |
| 1227 } | 1227 } |
| 1228 if (_json.containsKey("supportsMediaUpload")) { | 1228 if (_json.containsKey("supportsMediaUpload")) { |
| 1229 supportsMediaUpload = _json["supportsMediaUpload"]; | 1229 supportsMediaUpload = _json["supportsMediaUpload"]; |
| 1230 } | 1230 } |
| 1231 if (_json.containsKey("supportsSubscription")) { | 1231 if (_json.containsKey("supportsSubscription")) { |
| 1232 supportsSubscription = _json["supportsSubscription"]; | 1232 supportsSubscription = _json["supportsSubscription"]; |
| 1233 } | 1233 } |
| 1234 if (_json.containsKey("useMediaDownloadService")) { | 1234 if (_json.containsKey("useMediaDownloadService")) { |
| 1235 useMediaDownloadService = _json["useMediaDownloadService"]; | 1235 useMediaDownloadService = _json["useMediaDownloadService"]; |
| 1236 } | 1236 } |
| 1237 } | 1237 } |
| 1238 | 1238 |
| 1239 core.Map toJson() { | 1239 core.Map<core.String, core.Object> toJson() { |
| 1240 var _json = new core.Map(); | 1240 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1241 if (description != null) { | 1241 if (description != null) { |
| 1242 _json["description"] = description; | 1242 _json["description"] = description; |
| 1243 } | 1243 } |
| 1244 if (etagRequired != null) { | 1244 if (etagRequired != null) { |
| 1245 _json["etagRequired"] = etagRequired; | 1245 _json["etagRequired"] = etagRequired; |
| 1246 } | 1246 } |
| 1247 if (httpMethod != null) { | 1247 if (httpMethod != null) { |
| 1248 _json["httpMethod"] = httpMethod; | 1248 _json["httpMethod"] = httpMethod; |
| 1249 } | 1249 } |
| 1250 if (id != null) { | 1250 if (id != null) { |
| 1251 _json["id"] = id; | 1251 _json["id"] = id; |
| 1252 } | 1252 } |
| 1253 if (mediaUpload != null) { | 1253 if (mediaUpload != null) { |
| 1254 _json["mediaUpload"] = (mediaUpload).toJson(); | 1254 _json["mediaUpload"] = (mediaUpload).toJson(); |
| 1255 } | 1255 } |
| 1256 if (parameterOrder != null) { | 1256 if (parameterOrder != null) { |
| 1257 _json["parameterOrder"] = parameterOrder; | 1257 _json["parameterOrder"] = parameterOrder; |
| 1258 } | 1258 } |
| 1259 if (parameters != null) { | 1259 if (parameters != null) { |
| 1260 _json["parameters"] = commons.mapMap(parameters, (item) => (item).toJson()
); | 1260 _json["parameters"] = commons.mapMap<JsonSchema, core.Map<core.String, cor
e.Object>>(parameters, (JsonSchema item) => (item).toJson()); |
| 1261 } | 1261 } |
| 1262 if (path != null) { | 1262 if (path != null) { |
| 1263 _json["path"] = path; | 1263 _json["path"] = path; |
| 1264 } | 1264 } |
| 1265 if (request != null) { | 1265 if (request != null) { |
| 1266 _json["request"] = (request).toJson(); | 1266 _json["request"] = (request).toJson(); |
| 1267 } | 1267 } |
| 1268 if (response != null) { | 1268 if (response != null) { |
| 1269 _json["response"] = (response).toJson(); | 1269 _json["response"] = (response).toJson(); |
| 1270 } | 1270 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1290 class RestResource { | 1290 class RestResource { |
| 1291 /** Methods on this resource. */ | 1291 /** Methods on this resource. */ |
| 1292 core.Map<core.String, RestMethod> methods; | 1292 core.Map<core.String, RestMethod> methods; |
| 1293 /** Sub-resources on this resource. */ | 1293 /** Sub-resources on this resource. */ |
| 1294 core.Map<core.String, RestResource> resources; | 1294 core.Map<core.String, RestResource> resources; |
| 1295 | 1295 |
| 1296 RestResource(); | 1296 RestResource(); |
| 1297 | 1297 |
| 1298 RestResource.fromJson(core.Map _json) { | 1298 RestResource.fromJson(core.Map _json) { |
| 1299 if (_json.containsKey("methods")) { | 1299 if (_json.containsKey("methods")) { |
| 1300 methods = commons.mapMap(_json["methods"], (item) => new RestMethod.fromJs
on(item)); | 1300 methods = commons.mapMap<core.Map<core.String, core.Object>, RestMethod>(_
json["methods"], (core.Map<core.String, core.Object> item) => new RestMethod.fro
mJson(item)); |
| 1301 } | 1301 } |
| 1302 if (_json.containsKey("resources")) { | 1302 if (_json.containsKey("resources")) { |
| 1303 resources = commons.mapMap(_json["resources"], (item) => new RestResource.
fromJson(item)); | 1303 resources = commons.mapMap<core.Map<core.String, core.Object>, RestResourc
e>(_json["resources"], (core.Map<core.String, core.Object> item) => new RestReso
urce.fromJson(item)); |
| 1304 } | 1304 } |
| 1305 } | 1305 } |
| 1306 | 1306 |
| 1307 core.Map toJson() { | 1307 core.Map<core.String, core.Object> toJson() { |
| 1308 var _json = new core.Map(); | 1308 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1309 if (methods != null) { | 1309 if (methods != null) { |
| 1310 _json["methods"] = commons.mapMap(methods, (item) => (item).toJson()); | 1310 _json["methods"] = commons.mapMap<RestMethod, core.Map<core.String, core.O
bject>>(methods, (RestMethod item) => (item).toJson()); |
| 1311 } | 1311 } |
| 1312 if (resources != null) { | 1312 if (resources != null) { |
| 1313 _json["resources"] = commons.mapMap(resources, (item) => (item).toJson()); | 1313 _json["resources"] = commons.mapMap<RestResource, core.Map<core.String, co
re.Object>>(resources, (RestResource item) => (item).toJson()); |
| 1314 } | 1314 } |
| 1315 return _json; | 1315 return _json; |
| 1316 } | 1316 } |
| 1317 } | 1317 } |
| OLD | NEW |