OLD | NEW |
1 library googleapis.civicinfo.us_v1; | 1 library googleapis.civicinfo.us_v1; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1701 SimpleAddressType normalizedInput; | 1701 SimpleAddressType normalizedInput; |
1702 | 1702 |
1703 /** | 1703 /** |
1704 * Locations where the voter is eligible to vote on election day. For states | 1704 * Locations where the voter is eligible to vote on election day. For states |
1705 * with mail-in voting only, these locations will be nearby drop box | 1705 * with mail-in voting only, these locations will be nearby drop box |
1706 * locations. Drop box locations are free to the voter and may be used instead | 1706 * locations. Drop box locations are free to the voter and may be used instead |
1707 * of placing the ballot in the mail. | 1707 * of placing the ballot in the mail. |
1708 */ | 1708 */ |
1709 core.List<PollingLocation> pollingLocations; | 1709 core.List<PollingLocation> pollingLocations; |
1710 | 1710 |
| 1711 /** Not documented yet. */ |
| 1712 core.String precinctId; |
| 1713 |
1711 /** | 1714 /** |
1712 * Local Election Information for the state that the voter votes in. For the | 1715 * Local Election Information for the state that the voter votes in. For the |
1713 * US, there will only be one element in this array. | 1716 * US, there will only be one element in this array. |
1714 */ | 1717 */ |
1715 core.List<AdministrationRegion> state; | 1718 core.List<AdministrationRegion> state; |
1716 | 1719 |
1717 /** | 1720 /** |
1718 * The result of the request. One of: success, noStreetSegmentFound, | 1721 * The result of the request. One of: success, noStreetSegmentFound, |
1719 * addressUnparseable, noAddressParameter, multipleStreetSegmentsFound, | 1722 * addressUnparseable, noAddressParameter, multipleStreetSegmentsFound, |
1720 * electionOver, electionUnknown, internalLookupFailure | 1723 * electionOver, electionUnknown, internalLookupFailure |
(...skipping 15 matching lines...) Expand all Loading... |
1736 } | 1739 } |
1737 if (_json.containsKey("kind")) { | 1740 if (_json.containsKey("kind")) { |
1738 kind = _json["kind"]; | 1741 kind = _json["kind"]; |
1739 } | 1742 } |
1740 if (_json.containsKey("normalizedInput")) { | 1743 if (_json.containsKey("normalizedInput")) { |
1741 normalizedInput = new SimpleAddressType.fromJson(_json["normalizedInput"])
; | 1744 normalizedInput = new SimpleAddressType.fromJson(_json["normalizedInput"])
; |
1742 } | 1745 } |
1743 if (_json.containsKey("pollingLocations")) { | 1746 if (_json.containsKey("pollingLocations")) { |
1744 pollingLocations = _json["pollingLocations"].map((value) => new PollingLoc
ation.fromJson(value)).toList(); | 1747 pollingLocations = _json["pollingLocations"].map((value) => new PollingLoc
ation.fromJson(value)).toList(); |
1745 } | 1748 } |
| 1749 if (_json.containsKey("precinctId")) { |
| 1750 precinctId = _json["precinctId"]; |
| 1751 } |
1746 if (_json.containsKey("state")) { | 1752 if (_json.containsKey("state")) { |
1747 state = _json["state"].map((value) => new AdministrationRegion.fromJson(va
lue)).toList(); | 1753 state = _json["state"].map((value) => new AdministrationRegion.fromJson(va
lue)).toList(); |
1748 } | 1754 } |
1749 if (_json.containsKey("status")) { | 1755 if (_json.containsKey("status")) { |
1750 status = _json["status"]; | 1756 status = _json["status"]; |
1751 } | 1757 } |
1752 } | 1758 } |
1753 | 1759 |
1754 core.Map toJson() { | 1760 core.Map toJson() { |
1755 var _json = new core.Map(); | 1761 var _json = new core.Map(); |
1756 if (contests != null) { | 1762 if (contests != null) { |
1757 _json["contests"] = contests.map((value) => (value).toJson()).toList(); | 1763 _json["contests"] = contests.map((value) => (value).toJson()).toList(); |
1758 } | 1764 } |
1759 if (earlyVoteSites != null) { | 1765 if (earlyVoteSites != null) { |
1760 _json["earlyVoteSites"] = earlyVoteSites.map((value) => (value).toJson()).
toList(); | 1766 _json["earlyVoteSites"] = earlyVoteSites.map((value) => (value).toJson()).
toList(); |
1761 } | 1767 } |
1762 if (election != null) { | 1768 if (election != null) { |
1763 _json["election"] = (election).toJson(); | 1769 _json["election"] = (election).toJson(); |
1764 } | 1770 } |
1765 if (kind != null) { | 1771 if (kind != null) { |
1766 _json["kind"] = kind; | 1772 _json["kind"] = kind; |
1767 } | 1773 } |
1768 if (normalizedInput != null) { | 1774 if (normalizedInput != null) { |
1769 _json["normalizedInput"] = (normalizedInput).toJson(); | 1775 _json["normalizedInput"] = (normalizedInput).toJson(); |
1770 } | 1776 } |
1771 if (pollingLocations != null) { | 1777 if (pollingLocations != null) { |
1772 _json["pollingLocations"] = pollingLocations.map((value) => (value).toJson
()).toList(); | 1778 _json["pollingLocations"] = pollingLocations.map((value) => (value).toJson
()).toList(); |
1773 } | 1779 } |
| 1780 if (precinctId != null) { |
| 1781 _json["precinctId"] = precinctId; |
| 1782 } |
1774 if (state != null) { | 1783 if (state != null) { |
1775 _json["state"] = state.map((value) => (value).toJson()).toList(); | 1784 _json["state"] = state.map((value) => (value).toJson()).toList(); |
1776 } | 1785 } |
1777 if (status != null) { | 1786 if (status != null) { |
1778 _json["status"] = status; | 1787 _json["status"] = status; |
1779 } | 1788 } |
1780 return _json; | 1789 return _json; |
1781 } | 1790 } |
1782 } | 1791 } |
1783 | 1792 |
1784 | 1793 |
OLD | NEW |