Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: generated/googleapis/lib/civicinfo/v2.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « generated/googleapis/lib/calendar/v3.dart ('k') | generated/googleapis/lib/classroom/v1.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.civicinfo.v2; 3 library googleapis.civicinfo.v2;
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'
13 ApiRequestError, DetailedApiRequestError; 13 show ApiRequestError, DetailedApiRequestError;
14 14
15 const core.String USER_AGENT = 'dart-api-client civicinfo/v2'; 15 const core.String USER_AGENT = 'dart-api-client civicinfo/v2';
16 16
17 /** 17 /// Provides polling places, early vote locations, contest data, election
18 * Provides polling places, early vote locations, contest data, election 18 /// officials, and government representatives for U.S. residential addresses.
19 * officials, and government representatives for U.S. residential addresses.
20 */
21 class CivicinfoApi { 19 class CivicinfoApi {
22
23 final commons.ApiRequester _requester; 20 final commons.ApiRequester _requester;
24 21
25 DivisionsResourceApi get divisions => new DivisionsResourceApi(_requester); 22 DivisionsResourceApi get divisions => new DivisionsResourceApi(_requester);
26 ElectionsResourceApi get elections => new ElectionsResourceApi(_requester); 23 ElectionsResourceApi get elections => new ElectionsResourceApi(_requester);
27 RepresentativesResourceApi get representatives => new RepresentativesResourceA pi(_requester); 24 RepresentativesResourceApi get representatives =>
25 new RepresentativesResourceApi(_requester);
28 26
29 CivicinfoApi(http.Client client, {core.String rootUrl: "https://www.googleapis .com/", core.String servicePath: "civicinfo/v2/"}) : 27 CivicinfoApi(http.Client client,
30 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 28 {core.String rootUrl: "https://www.googleapis.com/",
29 core.String servicePath: "civicinfo/v2/"})
30 : _requester =
31 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
31 } 32 }
32 33
33
34 class DivisionsResourceApi { 34 class DivisionsResourceApi {
35 final commons.ApiRequester _requester; 35 final commons.ApiRequester _requester;
36 36
37 DivisionsResourceApi(commons.ApiRequester client) : 37 DivisionsResourceApi(commons.ApiRequester client) : _requester = client;
38 _requester = client;
39 38
40 /** 39 /// Searches for political divisions by their natural name or OCD ID.
41 * Searches for political divisions by their natural name or OCD ID. 40 ///
42 * 41 /// [request] - The metadata request object.
43 * [request] - The metadata request object. 42 ///
44 * 43 /// Request parameters:
45 * Request parameters: 44 ///
46 * 45 /// [query] - The search query. Queries can cover any parts of a OCD ID or a
47 * [query] - The search query. Queries can cover any parts of a OCD ID or a 46 /// human readable division name. All words given in the query are treated as
48 * human readable division name. All words given in the query are treated as 47 /// required patterns. In addition to that, most query operators of the
49 * required patterns. In addition to that, most query operators of the Apache 48 /// Apache Lucene library are supported. See
50 * Lucene library are supported. See 49 /// http://lucene.apache.org/core/2_9_4/queryparsersyntax.html
51 * http://lucene.apache.org/core/2_9_4/queryparsersyntax.html 50 ///
52 * 51 /// Completes with a [DivisionSearchResponse].
53 * Completes with a [DivisionSearchResponse]. 52 ///
54 * 53 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
55 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 54 /// an error.
56 * error. 55 ///
57 * 56 /// If the used [http.Client] completes with an error when making a REST
58 * If the used [http.Client] completes with an error when making a REST call, 57 /// call, this method will complete with the same error.
59 * this method will complete with the same error. 58 async.Future<DivisionSearchResponse> search(DivisionSearchRequest request,
60 */ 59 {core.String query}) {
61 async.Future<DivisionSearchResponse> search(DivisionSearchRequest request, {co re.String query}) {
62 var _url = null; 60 var _url = null;
63 var _queryParams = new core.Map(); 61 var _queryParams = new core.Map();
64 var _uploadMedia = null; 62 var _uploadMedia = null;
65 var _uploadOptions = null; 63 var _uploadOptions = null;
66 var _downloadOptions = commons.DownloadOptions.Metadata; 64 var _downloadOptions = commons.DownloadOptions.Metadata;
67 var _body = null; 65 var _body = null;
68 66
69 if (request != null) { 67 if (request != null) {
70 _body = convert.JSON.encode((request).toJson()); 68 _body = convert.JSON.encode((request).toJson());
71 } 69 }
72 if (query != null) { 70 if (query != null) {
73 _queryParams["query"] = [query]; 71 _queryParams["query"] = [query];
74 } 72 }
75 73
76 _url = 'divisions'; 74 _url = 'divisions';
77 75
78 var _response = _requester.request(_url, 76 var _response = _requester.request(_url, "GET",
79 "GET", 77 body: _body,
80 body: _body, 78 queryParams: _queryParams,
81 queryParams: _queryParams, 79 uploadOptions: _uploadOptions,
82 uploadOptions: _uploadOptions, 80 uploadMedia: _uploadMedia,
83 uploadMedia: _uploadMedia, 81 downloadOptions: _downloadOptions);
84 downloadOptions: _downloadOptions);
85 return _response.then((data) => new DivisionSearchResponse.fromJson(data)); 82 return _response.then((data) => new DivisionSearchResponse.fromJson(data));
86 } 83 }
87
88 } 84 }
89 85
90
91 class ElectionsResourceApi { 86 class ElectionsResourceApi {
92 final commons.ApiRequester _requester; 87 final commons.ApiRequester _requester;
93 88
94 ElectionsResourceApi(commons.ApiRequester client) : 89 ElectionsResourceApi(commons.ApiRequester client) : _requester = client;
95 _requester = client;
96 90
97 /** 91 /// List of available elections to query.
98 * List of available elections to query. 92 ///
99 * 93 /// [request] - The metadata request object.
100 * [request] - The metadata request object. 94 ///
101 * 95 /// Request parameters:
102 * Request parameters: 96 ///
103 * 97 /// Completes with a [ElectionsQueryResponse].
104 * Completes with a [ElectionsQueryResponse]. 98 ///
105 * 99 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
106 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 100 /// an error.
107 * error. 101 ///
108 * 102 /// If the used [http.Client] completes with an error when making a REST
109 * If the used [http.Client] completes with an error when making a REST call, 103 /// call, this method will complete with the same error.
110 * this method will complete with the same error. 104 async.Future<ElectionsQueryResponse> electionQuery(
111 */ 105 ElectionsQueryRequest request) {
112 async.Future<ElectionsQueryResponse> electionQuery(ElectionsQueryRequest reque st) {
113 var _url = null; 106 var _url = null;
114 var _queryParams = new core.Map(); 107 var _queryParams = new core.Map();
115 var _uploadMedia = null; 108 var _uploadMedia = null;
116 var _uploadOptions = null; 109 var _uploadOptions = null;
117 var _downloadOptions = commons.DownloadOptions.Metadata; 110 var _downloadOptions = commons.DownloadOptions.Metadata;
118 var _body = null; 111 var _body = null;
119 112
120 if (request != null) { 113 if (request != null) {
121 _body = convert.JSON.encode((request).toJson()); 114 _body = convert.JSON.encode((request).toJson());
122 } 115 }
123 116
124 _url = 'elections'; 117 _url = 'elections';
125 118
126 var _response = _requester.request(_url, 119 var _response = _requester.request(_url, "GET",
127 "GET", 120 body: _body,
128 body: _body, 121 queryParams: _queryParams,
129 queryParams: _queryParams, 122 uploadOptions: _uploadOptions,
130 uploadOptions: _uploadOptions, 123 uploadMedia: _uploadMedia,
131 uploadMedia: _uploadMedia, 124 downloadOptions: _downloadOptions);
132 downloadOptions: _downloadOptions);
133 return _response.then((data) => new ElectionsQueryResponse.fromJson(data)); 125 return _response.then((data) => new ElectionsQueryResponse.fromJson(data));
134 } 126 }
135 127
136 /** 128 /// Looks up information relevant to a voter based on the voter's registered
137 * Looks up information relevant to a voter based on the voter's registered 129 /// address.
138 * address. 130 ///
139 * 131 /// [request] - The metadata request object.
140 * [request] - The metadata request object. 132 ///
141 * 133 /// Request parameters:
142 * Request parameters: 134 ///
143 * 135 /// [address] - The registered address of the voter to look up.
144 * [address] - The registered address of the voter to look up. 136 ///
145 * 137 /// [electionId] - The unique ID of the election to look up. A list of
146 * [electionId] - The unique ID of the election to look up. A list of election 138 /// election IDs can be obtained at
147 * IDs can be obtained at 139 /// https://www.googleapis.com/civicinfo/{version}/elections
148 * https://www.googleapis.com/civicinfo/{version}/elections 140 ///
149 * 141 /// [officialOnly] - If set to true, only data from official state sources
150 * [officialOnly] - If set to true, only data from official state sources will 142 /// will be returned.
151 * be returned. 143 ///
152 * 144 /// [returnAllAvailableData] - If set to true, the query will return the
153 * [returnAllAvailableData] - If set to true, the query will return the 145 /// success codeand include any partial information when it is unable to
154 * success codeand include any partial information when it is unable to 146 /// determine a matching address or unable to determine the election for
155 * determine a matching address or unable to determine the election for 147 /// electionId=0 queries.
156 * electionId=0 queries. 148 ///
157 * 149 /// Completes with a [VoterInfoResponse].
158 * Completes with a [VoterInfoResponse]. 150 ///
159 * 151 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
160 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 152 /// an error.
161 * error. 153 ///
162 * 154 /// If the used [http.Client] completes with an error when making a REST
163 * If the used [http.Client] completes with an error when making a REST call, 155 /// call, this method will complete with the same error.
164 * this method will complete with the same error. 156 async.Future<VoterInfoResponse> voterInfoQuery(
165 */ 157 VoterInfoRequest request, core.String address,
166 async.Future<VoterInfoResponse> voterInfoQuery(VoterInfoRequest request, core. String address, {core.String electionId, core.bool officialOnly, core.bool retur nAllAvailableData}) { 158 {core.String electionId,
159 core.bool officialOnly,
160 core.bool returnAllAvailableData}) {
167 var _url = null; 161 var _url = null;
168 var _queryParams = new core.Map(); 162 var _queryParams = new core.Map();
169 var _uploadMedia = null; 163 var _uploadMedia = null;
170 var _uploadOptions = null; 164 var _uploadOptions = null;
171 var _downloadOptions = commons.DownloadOptions.Metadata; 165 var _downloadOptions = commons.DownloadOptions.Metadata;
172 var _body = null; 166 var _body = null;
173 167
174 if (request != null) { 168 if (request != null) {
175 _body = convert.JSON.encode((request).toJson()); 169 _body = convert.JSON.encode((request).toJson());
176 } 170 }
177 if (address == null) { 171 if (address == null) {
178 throw new core.ArgumentError("Parameter address is required."); 172 throw new core.ArgumentError("Parameter address is required.");
179 } 173 }
180 _queryParams["address"] = [address]; 174 _queryParams["address"] = [address];
181 if (electionId != null) { 175 if (electionId != null) {
182 _queryParams["electionId"] = [electionId]; 176 _queryParams["electionId"] = [electionId];
183 } 177 }
184 if (officialOnly != null) { 178 if (officialOnly != null) {
185 _queryParams["officialOnly"] = ["${officialOnly}"]; 179 _queryParams["officialOnly"] = ["${officialOnly}"];
186 } 180 }
187 if (returnAllAvailableData != null) { 181 if (returnAllAvailableData != null) {
188 _queryParams["returnAllAvailableData"] = ["${returnAllAvailableData}"]; 182 _queryParams["returnAllAvailableData"] = ["${returnAllAvailableData}"];
189 } 183 }
190 184
191 _url = 'voterinfo'; 185 _url = 'voterinfo';
192 186
193 var _response = _requester.request(_url, 187 var _response = _requester.request(_url, "GET",
194 "GET", 188 body: _body,
195 body: _body, 189 queryParams: _queryParams,
196 queryParams: _queryParams, 190 uploadOptions: _uploadOptions,
197 uploadOptions: _uploadOptions, 191 uploadMedia: _uploadMedia,
198 uploadMedia: _uploadMedia, 192 downloadOptions: _downloadOptions);
199 downloadOptions: _downloadOptions);
200 return _response.then((data) => new VoterInfoResponse.fromJson(data)); 193 return _response.then((data) => new VoterInfoResponse.fromJson(data));
201 } 194 }
202
203 } 195 }
204 196
205
206 class RepresentativesResourceApi { 197 class RepresentativesResourceApi {
207 final commons.ApiRequester _requester; 198 final commons.ApiRequester _requester;
208 199
209 RepresentativesResourceApi(commons.ApiRequester client) : 200 RepresentativesResourceApi(commons.ApiRequester client) : _requester = client;
210 _requester = client;
211 201
212 /** 202 /// Looks up political geography and representative information for a single
213 * Looks up political geography and representative information for a single 203 /// address.
214 * address. 204 ///
215 * 205 /// [request] - The metadata request object.
216 * [request] - The metadata request object. 206 ///
217 * 207 /// Request parameters:
218 * Request parameters: 208 ///
219 * 209 /// [address] - The address to look up. May only be specified if the field
220 * [address] - The address to look up. May only be specified if the field 210 /// ocdId is not given in the URL.
221 * ocdId is not given in the URL. 211 ///
222 * 212 /// [includeOffices] - Whether to return information about offices and
223 * [includeOffices] - Whether to return information about offices and 213 /// officials. If false, only the top-level district information will be
224 * officials. If false, only the top-level district information will be 214 /// returned.
225 * returned. 215 ///
226 * 216 /// [levels] - A list of office levels to filter by. Only offices that serve
227 * [levels] - A list of office levels to filter by. Only offices that serve at 217 /// at least one of these levels will be returned. Divisions that don't
228 * least one of these levels will be returned. Divisions that don't contain a 218 /// contain a matching office will not be returned.
229 * matching office will not be returned. 219 ///
230 * 220 /// [roles] - A list of office roles to filter by. Only offices fulfilling
231 * [roles] - A list of office roles to filter by. Only offices fulfilling one 221 /// one of these roles will be returned. Divisions that don't contain a
232 * of these roles will be returned. Divisions that don't contain a matching 222 /// matching office will not be returned.
233 * office will not be returned. 223 ///
234 * 224 /// Completes with a [RepresentativeInfoResponse].
235 * Completes with a [RepresentativeInfoResponse]. 225 ///
236 * 226 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
237 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 227 /// an error.
238 * error. 228 ///
239 * 229 /// If the used [http.Client] completes with an error when making a REST
240 * If the used [http.Client] completes with an error when making a REST call, 230 /// call, this method will complete with the same error.
241 * this method will complete with the same error. 231 async.Future<RepresentativeInfoResponse> representativeInfoByAddress(
242 */ 232 RepresentativeInfoRequest request,
243 async.Future<RepresentativeInfoResponse> representativeInfoByAddress(Represent ativeInfoRequest request, {core.String address, core.bool includeOffices, core.L ist<core.String> levels, core.List<core.String> roles}) { 233 {core.String address,
234 core.bool includeOffices,
235 core.List<core.String> levels,
236 core.List<core.String> roles}) {
244 var _url = null; 237 var _url = null;
245 var _queryParams = new core.Map(); 238 var _queryParams = new core.Map();
246 var _uploadMedia = null; 239 var _uploadMedia = null;
247 var _uploadOptions = null; 240 var _uploadOptions = null;
248 var _downloadOptions = commons.DownloadOptions.Metadata; 241 var _downloadOptions = commons.DownloadOptions.Metadata;
249 var _body = null; 242 var _body = null;
250 243
251 if (request != null) { 244 if (request != null) {
252 _body = convert.JSON.encode((request).toJson()); 245 _body = convert.JSON.encode((request).toJson());
253 } 246 }
254 if (address != null) { 247 if (address != null) {
255 _queryParams["address"] = [address]; 248 _queryParams["address"] = [address];
256 } 249 }
257 if (includeOffices != null) { 250 if (includeOffices != null) {
258 _queryParams["includeOffices"] = ["${includeOffices}"]; 251 _queryParams["includeOffices"] = ["${includeOffices}"];
259 } 252 }
260 if (levels != null) { 253 if (levels != null) {
261 _queryParams["levels"] = levels; 254 _queryParams["levels"] = levels;
262 } 255 }
263 if (roles != null) { 256 if (roles != null) {
264 _queryParams["roles"] = roles; 257 _queryParams["roles"] = roles;
265 } 258 }
266 259
267 _url = 'representatives'; 260 _url = 'representatives';
268 261
269 var _response = _requester.request(_url, 262 var _response = _requester.request(_url, "GET",
270 "GET", 263 body: _body,
271 body: _body, 264 queryParams: _queryParams,
272 queryParams: _queryParams, 265 uploadOptions: _uploadOptions,
273 uploadOptions: _uploadOptions, 266 uploadMedia: _uploadMedia,
274 uploadMedia: _uploadMedia, 267 downloadOptions: _downloadOptions);
275 downloadOptions: _downloadOptions); 268 return _response
276 return _response.then((data) => new RepresentativeInfoResponse.fromJson(data )); 269 .then((data) => new RepresentativeInfoResponse.fromJson(data));
277 } 270 }
278 271
279 /** 272 /// Looks up representative information for a single geographic division.
280 * Looks up representative information for a single geographic division. 273 ///
281 * 274 /// [request] - The metadata request object.
282 * [request] - The metadata request object. 275 ///
283 * 276 /// Request parameters:
284 * Request parameters: 277 ///
285 * 278 /// [ocdId] - The Open Civic Data division identifier of the division to look
286 * [ocdId] - The Open Civic Data division identifier of the division to look 279 /// up.
287 * up. 280 ///
288 * 281 /// [levels] - A list of office levels to filter by. Only offices that serve
289 * [levels] - A list of office levels to filter by. Only offices that serve at 282 /// at least one of these levels will be returned. Divisions that don't
290 * least one of these levels will be returned. Divisions that don't contain a 283 /// contain a matching office will not be returned.
291 * matching office will not be returned. 284 ///
292 * 285 /// [recursive] - If true, information about all divisions contained in the
293 * [recursive] - If true, information about all divisions contained in the 286 /// division requested will be included as well. For example, if querying
294 * division requested will be included as well. For example, if querying 287 /// ocd-division/country:us/district:dc, this would also return all DC's
295 * ocd-division/country:us/district:dc, this would also return all DC's wards 288 /// wards and ANCs.
296 * and ANCs. 289 ///
297 * 290 /// [roles] - A list of office roles to filter by. Only offices fulfilling
298 * [roles] - A list of office roles to filter by. Only offices fulfilling one 291 /// one of these roles will be returned. Divisions that don't contain a
299 * of these roles will be returned. Divisions that don't contain a matching 292 /// matching office will not be returned.
300 * office will not be returned. 293 ///
301 * 294 /// Completes with a [RepresentativeInfoData].
302 * Completes with a [RepresentativeInfoData]. 295 ///
303 * 296 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
304 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 297 /// an error.
305 * error. 298 ///
306 * 299 /// If the used [http.Client] completes with an error when making a REST
307 * If the used [http.Client] completes with an error when making a REST call, 300 /// call, this method will complete with the same error.
308 * this method will complete with the same error. 301 async.Future<RepresentativeInfoData> representativeInfoByDivision(
309 */ 302 DivisionRepresentativeInfoRequest request, core.String ocdId,
310 async.Future<RepresentativeInfoData> representativeInfoByDivision(DivisionRepr esentativeInfoRequest request, core.String ocdId, {core.List<core.String> levels , core.bool recursive, core.List<core.String> roles}) { 303 {core.List<core.String> levels,
304 core.bool recursive,
305 core.List<core.String> roles}) {
311 var _url = null; 306 var _url = null;
312 var _queryParams = new core.Map(); 307 var _queryParams = new core.Map();
313 var _uploadMedia = null; 308 var _uploadMedia = null;
314 var _uploadOptions = null; 309 var _uploadOptions = null;
315 var _downloadOptions = commons.DownloadOptions.Metadata; 310 var _downloadOptions = commons.DownloadOptions.Metadata;
316 var _body = null; 311 var _body = null;
317 312
318 if (request != null) { 313 if (request != null) {
319 _body = convert.JSON.encode((request).toJson()); 314 _body = convert.JSON.encode((request).toJson());
320 } 315 }
321 if (ocdId == null) { 316 if (ocdId == null) {
322 throw new core.ArgumentError("Parameter ocdId is required."); 317 throw new core.ArgumentError("Parameter ocdId is required.");
323 } 318 }
324 if (levels != null) { 319 if (levels != null) {
325 _queryParams["levels"] = levels; 320 _queryParams["levels"] = levels;
326 } 321 }
327 if (recursive != null) { 322 if (recursive != null) {
328 _queryParams["recursive"] = ["${recursive}"]; 323 _queryParams["recursive"] = ["${recursive}"];
329 } 324 }
330 if (roles != null) { 325 if (roles != null) {
331 _queryParams["roles"] = roles; 326 _queryParams["roles"] = roles;
332 } 327 }
333 328
334 _url = 'representatives/' + commons.Escaper.ecapeVariable('$ocdId'); 329 _url = 'representatives/' + commons.Escaper.ecapeVariable('$ocdId');
335 330
336 var _response = _requester.request(_url, 331 var _response = _requester.request(_url, "GET",
337 "GET", 332 body: _body,
338 body: _body, 333 queryParams: _queryParams,
339 queryParams: _queryParams, 334 uploadOptions: _uploadOptions,
340 uploadOptions: _uploadOptions, 335 uploadMedia: _uploadMedia,
341 uploadMedia: _uploadMedia, 336 downloadOptions: _downloadOptions);
342 downloadOptions: _downloadOptions);
343 return _response.then((data) => new RepresentativeInfoData.fromJson(data)); 337 return _response.then((data) => new RepresentativeInfoData.fromJson(data));
344 } 338 }
345
346 } 339 }
347 340
341 /// Describes information about a regional election administrative area.
342 class AdministrationRegion {
343 /// The election administration body for this area.
344 AdministrativeBody electionAdministrationBody;
348 345
346 /// An ID for this object. IDs may change in future requests and should not
347 /// be cached. Access to this field requires special access that can be
348 /// requested from the Request more link on the Quotas page.
349 core.String id;
349 350
350 /** Describes information about a regional election administrative area. */ 351 /// The city or county that provides election information for this voter.
351 class AdministrationRegion { 352 /// This object can have the same elements as state.
352 /** The election administration body for this area. */
353 AdministrativeBody electionAdministrationBody;
354 /**
355 * An ID for this object. IDs may change in future requests and should not be
356 * cached. Access to this field requires special access that can be requested
357 * from the Request more link on the Quotas page.
358 */
359 core.String id;
360 /**
361 * The city or county that provides election information for this voter. This
362 * object can have the same elements as state.
363 */
364 AdministrationRegion localJurisdiction; 353 AdministrationRegion localJurisdiction;
365 /** The name of the jurisdiction. */ 354
355 /// The name of the jurisdiction.
366 core.String name; 356 core.String name;
367 /** 357
368 * A list of sources for this area. If multiple sources are listed the data 358 /// A list of sources for this area. If multiple sources are listed the data
369 * has been aggregated from those sources. 359 /// has been aggregated from those sources.
370 */
371 core.List<Source> sources; 360 core.List<Source> sources;
372 361
373 AdministrationRegion(); 362 AdministrationRegion();
374 363
375 AdministrationRegion.fromJson(core.Map _json) { 364 AdministrationRegion.fromJson(core.Map _json) {
376 if (_json.containsKey("electionAdministrationBody")) { 365 if (_json.containsKey("electionAdministrationBody")) {
377 electionAdministrationBody = new AdministrativeBody.fromJson(_json["electi onAdministrationBody"]); 366 electionAdministrationBody =
367 new AdministrativeBody.fromJson(_json["electionAdministrationBody"]);
378 } 368 }
379 if (_json.containsKey("id")) { 369 if (_json.containsKey("id")) {
380 id = _json["id"]; 370 id = _json["id"];
381 } 371 }
382 if (_json.containsKey("local_jurisdiction")) { 372 if (_json.containsKey("local_jurisdiction")) {
383 localJurisdiction = new AdministrationRegion.fromJson(_json["local_jurisdi ction"]); 373 localJurisdiction =
374 new AdministrationRegion.fromJson(_json["local_jurisdiction"]);
384 } 375 }
385 if (_json.containsKey("name")) { 376 if (_json.containsKey("name")) {
386 name = _json["name"]; 377 name = _json["name"];
387 } 378 }
388 if (_json.containsKey("sources")) { 379 if (_json.containsKey("sources")) {
389 sources = _json["sources"].map((value) => new Source.fromJson(value)).toLi st(); 380 sources =
381 _json["sources"].map((value) => new Source.fromJson(value)).toList();
390 } 382 }
391 } 383 }
392 384
393 core.Map<core.String, core.Object> toJson() { 385 core.Map<core.String, core.Object> toJson() {
394 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 386 final core.Map<core.String, core.Object> _json =
387 new core.Map<core.String, core.Object>();
395 if (electionAdministrationBody != null) { 388 if (electionAdministrationBody != null) {
396 _json["electionAdministrationBody"] = (electionAdministrationBody).toJson( ); 389 _json["electionAdministrationBody"] =
390 (electionAdministrationBody).toJson();
397 } 391 }
398 if (id != null) { 392 if (id != null) {
399 _json["id"] = id; 393 _json["id"] = id;
400 } 394 }
401 if (localJurisdiction != null) { 395 if (localJurisdiction != null) {
402 _json["local_jurisdiction"] = (localJurisdiction).toJson(); 396 _json["local_jurisdiction"] = (localJurisdiction).toJson();
403 } 397 }
404 if (name != null) { 398 if (name != null) {
405 _json["name"] = name; 399 _json["name"] = name;
406 } 400 }
407 if (sources != null) { 401 if (sources != null) {
408 _json["sources"] = sources.map((value) => (value).toJson()).toList(); 402 _json["sources"] = sources.map((value) => (value).toJson()).toList();
409 } 403 }
410 return _json; 404 return _json;
411 } 405 }
412 } 406 }
413 407
414 /** 408 /// Information about an election administrative body (e.g. County Board of
415 * Information about an election administrative body (e.g. County Board of 409 /// Elections).
416 * Elections).
417 */
418 class AdministrativeBody { 410 class AdministrativeBody {
419 /** 411 /// A URL provided by this administrative body for information on absentee
420 * A URL provided by this administrative body for information on absentee 412 /// voting.
421 * voting.
422 */
423 core.String absenteeVotingInfoUrl; 413 core.String absenteeVotingInfoUrl;
424 core.List<core.String> addressLines; 414 core.List<core.String> addressLines;
425 /** 415
426 * A URL provided by this administrative body to give contest information to 416 /// A URL provided by this administrative body to give contest information to
427 * the voter. 417 /// the voter.
428 */
429 core.String ballotInfoUrl; 418 core.String ballotInfoUrl;
430 /** The mailing address of this administrative body. */ 419
420 /// The mailing address of this administrative body.
431 SimpleAddressType correspondenceAddress; 421 SimpleAddressType correspondenceAddress;
432 /** 422
433 * A URL provided by this administrative body for looking up general election 423 /// A URL provided by this administrative body for looking up general
434 * information. 424 /// election information.
435 */
436 core.String electionInfoUrl; 425 core.String electionInfoUrl;
437 /** The election officials for this election administrative body. */ 426
427 /// The election officials for this election administrative body.
438 core.List<ElectionOfficial> electionOfficials; 428 core.List<ElectionOfficial> electionOfficials;
439 /** 429
440 * A URL provided by this administrative body for confirming that the voter is 430 /// A URL provided by this administrative body for confirming that the voter
441 * registered to vote. 431 /// is registered to vote.
442 */
443 core.String electionRegistrationConfirmationUrl; 432 core.String electionRegistrationConfirmationUrl;
444 /** 433
445 * A URL provided by this administrative body for looking up how to register 434 /// A URL provided by this administrative body for looking up how to register
446 * to vote. 435 /// to vote.
447 */
448 core.String electionRegistrationUrl; 436 core.String electionRegistrationUrl;
449 /** 437
450 * A URL provided by this administrative body describing election rules to the 438 /// A URL provided by this administrative body describing election rules to
451 * voter. 439 /// the voter.
452 */
453 core.String electionRulesUrl; 440 core.String electionRulesUrl;
454 /** A description of the hours of operation for this administrative body. */ 441
442 /// A description of the hours of operation for this administrative body.
455 core.String hoursOfOperation; 443 core.String hoursOfOperation;
456 /** The name of this election administrative body. */ 444
445 /// The name of this election administrative body.
457 core.String name; 446 core.String name;
458 /** The physical address of this administrative body. */ 447
448 /// The physical address of this administrative body.
459 SimpleAddressType physicalAddress; 449 SimpleAddressType physicalAddress;
460 /** A description of the services this administrative body may provide. */ 450
451 /// A description of the services this administrative body may provide.
461 core.List<core.String> voterServices; 452 core.List<core.String> voterServices;
462 /** 453
463 * A URL provided by this administrative body for looking up where to vote. 454 /// A URL provided by this administrative body for looking up where to vote.
464 */
465 core.String votingLocationFinderUrl; 455 core.String votingLocationFinderUrl;
466 456
467 AdministrativeBody(); 457 AdministrativeBody();
468 458
469 AdministrativeBody.fromJson(core.Map _json) { 459 AdministrativeBody.fromJson(core.Map _json) {
470 if (_json.containsKey("absenteeVotingInfoUrl")) { 460 if (_json.containsKey("absenteeVotingInfoUrl")) {
471 absenteeVotingInfoUrl = _json["absenteeVotingInfoUrl"]; 461 absenteeVotingInfoUrl = _json["absenteeVotingInfoUrl"];
472 } 462 }
473 if (_json.containsKey("addressLines")) { 463 if (_json.containsKey("addressLines")) {
474 addressLines = _json["addressLines"]; 464 addressLines = _json["addressLines"];
475 } 465 }
476 if (_json.containsKey("ballotInfoUrl")) { 466 if (_json.containsKey("ballotInfoUrl")) {
477 ballotInfoUrl = _json["ballotInfoUrl"]; 467 ballotInfoUrl = _json["ballotInfoUrl"];
478 } 468 }
479 if (_json.containsKey("correspondenceAddress")) { 469 if (_json.containsKey("correspondenceAddress")) {
480 correspondenceAddress = new SimpleAddressType.fromJson(_json["corresponden ceAddress"]); 470 correspondenceAddress =
471 new SimpleAddressType.fromJson(_json["correspondenceAddress"]);
481 } 472 }
482 if (_json.containsKey("electionInfoUrl")) { 473 if (_json.containsKey("electionInfoUrl")) {
483 electionInfoUrl = _json["electionInfoUrl"]; 474 electionInfoUrl = _json["electionInfoUrl"];
484 } 475 }
485 if (_json.containsKey("electionOfficials")) { 476 if (_json.containsKey("electionOfficials")) {
486 electionOfficials = _json["electionOfficials"].map((value) => new Election Official.fromJson(value)).toList(); 477 electionOfficials = _json["electionOfficials"]
478 .map((value) => new ElectionOfficial.fromJson(value))
479 .toList();
487 } 480 }
488 if (_json.containsKey("electionRegistrationConfirmationUrl")) { 481 if (_json.containsKey("electionRegistrationConfirmationUrl")) {
489 electionRegistrationConfirmationUrl = _json["electionRegistrationConfirmat ionUrl"]; 482 electionRegistrationConfirmationUrl =
483 _json["electionRegistrationConfirmationUrl"];
490 } 484 }
491 if (_json.containsKey("electionRegistrationUrl")) { 485 if (_json.containsKey("electionRegistrationUrl")) {
492 electionRegistrationUrl = _json["electionRegistrationUrl"]; 486 electionRegistrationUrl = _json["electionRegistrationUrl"];
493 } 487 }
494 if (_json.containsKey("electionRulesUrl")) { 488 if (_json.containsKey("electionRulesUrl")) {
495 electionRulesUrl = _json["electionRulesUrl"]; 489 electionRulesUrl = _json["electionRulesUrl"];
496 } 490 }
497 if (_json.containsKey("hoursOfOperation")) { 491 if (_json.containsKey("hoursOfOperation")) {
498 hoursOfOperation = _json["hoursOfOperation"]; 492 hoursOfOperation = _json["hoursOfOperation"];
499 } 493 }
500 if (_json.containsKey("name")) { 494 if (_json.containsKey("name")) {
501 name = _json["name"]; 495 name = _json["name"];
502 } 496 }
503 if (_json.containsKey("physicalAddress")) { 497 if (_json.containsKey("physicalAddress")) {
504 physicalAddress = new SimpleAddressType.fromJson(_json["physicalAddress"]) ; 498 physicalAddress =
499 new SimpleAddressType.fromJson(_json["physicalAddress"]);
505 } 500 }
506 if (_json.containsKey("voter_services")) { 501 if (_json.containsKey("voter_services")) {
507 voterServices = _json["voter_services"]; 502 voterServices = _json["voter_services"];
508 } 503 }
509 if (_json.containsKey("votingLocationFinderUrl")) { 504 if (_json.containsKey("votingLocationFinderUrl")) {
510 votingLocationFinderUrl = _json["votingLocationFinderUrl"]; 505 votingLocationFinderUrl = _json["votingLocationFinderUrl"];
511 } 506 }
512 } 507 }
513 508
514 core.Map<core.String, core.Object> toJson() { 509 core.Map<core.String, core.Object> toJson() {
515 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 510 final core.Map<core.String, core.Object> _json =
511 new core.Map<core.String, core.Object>();
516 if (absenteeVotingInfoUrl != null) { 512 if (absenteeVotingInfoUrl != null) {
517 _json["absenteeVotingInfoUrl"] = absenteeVotingInfoUrl; 513 _json["absenteeVotingInfoUrl"] = absenteeVotingInfoUrl;
518 } 514 }
519 if (addressLines != null) { 515 if (addressLines != null) {
520 _json["addressLines"] = addressLines; 516 _json["addressLines"] = addressLines;
521 } 517 }
522 if (ballotInfoUrl != null) { 518 if (ballotInfoUrl != null) {
523 _json["ballotInfoUrl"] = ballotInfoUrl; 519 _json["ballotInfoUrl"] = ballotInfoUrl;
524 } 520 }
525 if (correspondenceAddress != null) { 521 if (correspondenceAddress != null) {
526 _json["correspondenceAddress"] = (correspondenceAddress).toJson(); 522 _json["correspondenceAddress"] = (correspondenceAddress).toJson();
527 } 523 }
528 if (electionInfoUrl != null) { 524 if (electionInfoUrl != null) {
529 _json["electionInfoUrl"] = electionInfoUrl; 525 _json["electionInfoUrl"] = electionInfoUrl;
530 } 526 }
531 if (electionOfficials != null) { 527 if (electionOfficials != null) {
532 _json["electionOfficials"] = electionOfficials.map((value) => (value).toJs on()).toList(); 528 _json["electionOfficials"] =
529 electionOfficials.map((value) => (value).toJson()).toList();
533 } 530 }
534 if (electionRegistrationConfirmationUrl != null) { 531 if (electionRegistrationConfirmationUrl != null) {
535 _json["electionRegistrationConfirmationUrl"] = electionRegistrationConfirm ationUrl; 532 _json["electionRegistrationConfirmationUrl"] =
533 electionRegistrationConfirmationUrl;
536 } 534 }
537 if (electionRegistrationUrl != null) { 535 if (electionRegistrationUrl != null) {
538 _json["electionRegistrationUrl"] = electionRegistrationUrl; 536 _json["electionRegistrationUrl"] = electionRegistrationUrl;
539 } 537 }
540 if (electionRulesUrl != null) { 538 if (electionRulesUrl != null) {
541 _json["electionRulesUrl"] = electionRulesUrl; 539 _json["electionRulesUrl"] = electionRulesUrl;
542 } 540 }
543 if (hoursOfOperation != null) { 541 if (hoursOfOperation != null) {
544 _json["hoursOfOperation"] = hoursOfOperation; 542 _json["hoursOfOperation"] = hoursOfOperation;
545 } 543 }
546 if (name != null) { 544 if (name != null) {
547 _json["name"] = name; 545 _json["name"] = name;
548 } 546 }
549 if (physicalAddress != null) { 547 if (physicalAddress != null) {
550 _json["physicalAddress"] = (physicalAddress).toJson(); 548 _json["physicalAddress"] = (physicalAddress).toJson();
551 } 549 }
552 if (voterServices != null) { 550 if (voterServices != null) {
553 _json["voter_services"] = voterServices; 551 _json["voter_services"] = voterServices;
554 } 552 }
555 if (votingLocationFinderUrl != null) { 553 if (votingLocationFinderUrl != null) {
556 _json["votingLocationFinderUrl"] = votingLocationFinderUrl; 554 _json["votingLocationFinderUrl"] = votingLocationFinderUrl;
557 } 555 }
558 return _json; 556 return _json;
559 } 557 }
560 } 558 }
561 559
562 /** Information about a candidate running for elected office. */ 560 /// Information about a candidate running for elected office.
563 class Candidate { 561 class Candidate {
564 /** The URL for the candidate's campaign web site. */ 562 /// The URL for the candidate's campaign web site.
565 core.String candidateUrl; 563 core.String candidateUrl;
566 /** A list of known (social) media channels for this candidate. */ 564
565 /// A list of known (social) media channels for this candidate.
567 core.List<Channel> channels; 566 core.List<Channel> channels;
568 /** The email address for the candidate's campaign. */ 567
568 /// The email address for the candidate's campaign.
569 core.String email; 569 core.String email;
570 /** 570
571 * The candidate's name. If this is a joint ticket it will indicate the name 571 /// The candidate's name. If this is a joint ticket it will indicate the name
572 * of the candidate at the top of a ticket followed by a / and that name of 572 /// of the candidate at the top of a ticket followed by a / and that name of
573 * candidate at the bottom of the ticket. e.g. "Mitt Romney / Paul Ryan" 573 /// candidate at the bottom of the ticket. e.g. "Mitt Romney / Paul Ryan"
574 */
575 core.String name; 574 core.String name;
576 /** The order the candidate appears on the ballot for this contest. */ 575
576 /// The order the candidate appears on the ballot for this contest.
577 core.String orderOnBallot; 577 core.String orderOnBallot;
578 /** The full name of the party the candidate is a member of. */ 578
579 /// The full name of the party the candidate is a member of.
579 core.String party; 580 core.String party;
580 /** The voice phone number for the candidate's campaign office. */ 581
582 /// The voice phone number for the candidate's campaign office.
581 core.String phone; 583 core.String phone;
582 /** A URL for a photo of the candidate. */ 584
585 /// A URL for a photo of the candidate.
583 core.String photoUrl; 586 core.String photoUrl;
584 587
585 Candidate(); 588 Candidate();
586 589
587 Candidate.fromJson(core.Map _json) { 590 Candidate.fromJson(core.Map _json) {
588 if (_json.containsKey("candidateUrl")) { 591 if (_json.containsKey("candidateUrl")) {
589 candidateUrl = _json["candidateUrl"]; 592 candidateUrl = _json["candidateUrl"];
590 } 593 }
591 if (_json.containsKey("channels")) { 594 if (_json.containsKey("channels")) {
592 channels = _json["channels"].map((value) => new Channel.fromJson(value)).t oList(); 595 channels = _json["channels"]
596 .map((value) => new Channel.fromJson(value))
597 .toList();
593 } 598 }
594 if (_json.containsKey("email")) { 599 if (_json.containsKey("email")) {
595 email = _json["email"]; 600 email = _json["email"];
596 } 601 }
597 if (_json.containsKey("name")) { 602 if (_json.containsKey("name")) {
598 name = _json["name"]; 603 name = _json["name"];
599 } 604 }
600 if (_json.containsKey("orderOnBallot")) { 605 if (_json.containsKey("orderOnBallot")) {
601 orderOnBallot = _json["orderOnBallot"]; 606 orderOnBallot = _json["orderOnBallot"];
602 } 607 }
603 if (_json.containsKey("party")) { 608 if (_json.containsKey("party")) {
604 party = _json["party"]; 609 party = _json["party"];
605 } 610 }
606 if (_json.containsKey("phone")) { 611 if (_json.containsKey("phone")) {
607 phone = _json["phone"]; 612 phone = _json["phone"];
608 } 613 }
609 if (_json.containsKey("photoUrl")) { 614 if (_json.containsKey("photoUrl")) {
610 photoUrl = _json["photoUrl"]; 615 photoUrl = _json["photoUrl"];
611 } 616 }
612 } 617 }
613 618
614 core.Map<core.String, core.Object> toJson() { 619 core.Map<core.String, core.Object> toJson() {
615 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 620 final core.Map<core.String, core.Object> _json =
621 new core.Map<core.String, core.Object>();
616 if (candidateUrl != null) { 622 if (candidateUrl != null) {
617 _json["candidateUrl"] = candidateUrl; 623 _json["candidateUrl"] = candidateUrl;
618 } 624 }
619 if (channels != null) { 625 if (channels != null) {
620 _json["channels"] = channels.map((value) => (value).toJson()).toList(); 626 _json["channels"] = channels.map((value) => (value).toJson()).toList();
621 } 627 }
622 if (email != null) { 628 if (email != null) {
623 _json["email"] = email; 629 _json["email"] = email;
624 } 630 }
625 if (name != null) { 631 if (name != null) {
626 _json["name"] = name; 632 _json["name"] = name;
627 } 633 }
628 if (orderOnBallot != null) { 634 if (orderOnBallot != null) {
629 _json["orderOnBallot"] = orderOnBallot; 635 _json["orderOnBallot"] = orderOnBallot;
630 } 636 }
631 if (party != null) { 637 if (party != null) {
632 _json["party"] = party; 638 _json["party"] = party;
633 } 639 }
634 if (phone != null) { 640 if (phone != null) {
635 _json["phone"] = phone; 641 _json["phone"] = phone;
636 } 642 }
637 if (photoUrl != null) { 643 if (photoUrl != null) {
638 _json["photoUrl"] = photoUrl; 644 _json["photoUrl"] = photoUrl;
639 } 645 }
640 return _json; 646 return _json;
641 } 647 }
642 } 648 }
643 649
644 /** A social media or web channel for a candidate. */ 650 /// A social media or web channel for a candidate.
645 class Channel { 651 class Channel {
646 /** The unique public identifier for the candidate's channel. */ 652 /// The unique public identifier for the candidate's channel.
647 core.String id; 653 core.String id;
648 /** 654
649 * The type of channel. The following is a list of types of channels, but is 655 /// The type of channel. The following is a list of types of channels, but is
650 * not exhaustive. More channel types may be added at a later time. One of: 656 /// not exhaustive. More channel types may be added at a later time. One of:
651 * GooglePlus, YouTube, Facebook, Twitter 657 /// GooglePlus, YouTube, Facebook, Twitter
652 */
653 core.String type; 658 core.String type;
654 659
655 Channel(); 660 Channel();
656 661
657 Channel.fromJson(core.Map _json) { 662 Channel.fromJson(core.Map _json) {
658 if (_json.containsKey("id")) { 663 if (_json.containsKey("id")) {
659 id = _json["id"]; 664 id = _json["id"];
660 } 665 }
661 if (_json.containsKey("type")) { 666 if (_json.containsKey("type")) {
662 type = _json["type"]; 667 type = _json["type"];
663 } 668 }
664 } 669 }
665 670
666 core.Map<core.String, core.Object> toJson() { 671 core.Map<core.String, core.Object> toJson() {
667 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 672 final core.Map<core.String, core.Object> _json =
673 new core.Map<core.String, core.Object>();
668 if (id != null) { 674 if (id != null) {
669 _json["id"] = id; 675 _json["id"] = id;
670 } 676 }
671 if (type != null) { 677 if (type != null) {
672 _json["type"] = type; 678 _json["type"] = type;
673 } 679 }
674 return _json; 680 return _json;
675 } 681 }
676 } 682 }
677 683
678 /** Information about a contest that appears on a voter's ballot. */ 684 /// Information about a contest that appears on a voter's ballot.
679 class Contest { 685 class Contest {
680 /** 686 /// A number specifying the position of this contest on the voter's ballot.
681 * A number specifying the position of this contest on the voter's ballot.
682 */
683 core.String ballotPlacement; 687 core.String ballotPlacement;
684 /** The candidate choices for this contest. */ 688
689 /// The candidate choices for this contest.
685 core.List<Candidate> candidates; 690 core.List<Candidate> candidates;
686 /** Information about the electoral district that this contest is in. */ 691
692 /// Information about the electoral district that this contest is in.
687 ElectoralDistrict district; 693 ElectoralDistrict district;
688 /** 694
689 * A description of any additional eligibility requirements for voting in this 695 /// A description of any additional eligibility requirements for voting in
690 * contest. 696 /// this contest.
691 */
692 core.String electorateSpecifications; 697 core.String electorateSpecifications;
693 /** 698
694 * An ID for this object. IDs may change in future requests and should not be 699 /// An ID for this object. IDs may change in future requests and should not
695 * cached. Access to this field requires special access that can be requested 700 /// be cached. Access to this field requires special access that can be
696 * from the Request more link on the Quotas page. 701 /// requested from the Request more link on the Quotas page.
697 */
698 core.String id; 702 core.String id;
699 /** 703
700 * The levels of government of the office for this contest. There may be more 704 /// The levels of government of the office for this contest. There may be
701 * than one in cases where a jurisdiction effectively acts at two different 705 /// more than one in cases where a jurisdiction effectively acts at two
702 * levels of government; for example, the mayor of the District of Columbia 706 /// different levels of government; for example, the mayor of the District of
703 * acts at "locality" level, but also effectively at both 707 /// Columbia acts at "locality" level, but also effectively at both
704 * "administrative-area-2" and "administrative-area-1". 708 /// "administrative-area-2" and "administrative-area-1".
705 */
706 core.List<core.String> level; 709 core.List<core.String> level;
707 /** 710
708 * The number of candidates that will be elected to office in this contest. 711 /// The number of candidates that will be elected to office in this contest.
709 */
710 core.String numberElected; 712 core.String numberElected;
711 /** The number of candidates that a voter may vote for in this contest. */ 713
714 /// The number of candidates that a voter may vote for in this contest.
712 core.String numberVotingFor; 715 core.String numberVotingFor;
713 /** The name of the office for this contest. */ 716
717 /// The name of the office for this contest.
714 core.String office; 718 core.String office;
715 /** If this is a partisan election, the name of the party it is for. */ 719
720 /// If this is a partisan election, the name of the party it is for.
716 core.String primaryParty; 721 core.String primaryParty;
717 /** 722
718 * The set of ballot responses for the referendum. A ballot response 723 /// The set of ballot responses for the referendum. A ballot response
719 * represents a line on the ballot. Common examples might include "yes" or 724 /// represents a line on the ballot. Common examples might include "yes" or
720 * "no" for referenda. This field is only populated for contests of type 725 /// "no" for referenda. This field is only populated for contests of type
721 * 'Referendum'. 726 /// 'Referendum'.
722 */
723 core.List<core.String> referendumBallotResponses; 727 core.List<core.String> referendumBallotResponses;
724 /** 728
725 * Specifies a short summary of the referendum that is typically on the ballot 729 /// Specifies a short summary of the referendum that is typically on the
726 * below the title but above the text. This field is only populated for 730 /// ballot below the title but above the text. This field is only populated
727 * contests of type 'Referendum'. 731 /// for contests of type 'Referendum'.
728 */
729 core.String referendumBrief; 732 core.String referendumBrief;
730 /** 733
731 * A statement in opposition to the referendum. It does not necessarily appear 734 /// A statement in opposition to the referendum. It does not necessarily
732 * on the ballot. This field is only populated for contests of type 735 /// appear on the ballot. This field is only populated for contests of type
733 * 'Referendum'. 736 /// 'Referendum'.
734 */
735 core.String referendumConStatement; 737 core.String referendumConStatement;
736 /** 738
737 * Specifies what effect abstaining (not voting) on the proposition will have 739 /// Specifies what effect abstaining (not voting) on the proposition will
738 * (i.e. whether abstaining is considered a vote against it). This field is 740 /// have (i.e. whether abstaining is considered a vote against it). This
739 * only populated for contests of type 'Referendum'. 741 /// field is only populated for contests of type 'Referendum'.
740 */
741 core.String referendumEffectOfAbstain; 742 core.String referendumEffectOfAbstain;
742 /** 743
743 * The threshold of votes that the referendum needs in order to pass, e.g. 744 /// The threshold of votes that the referendum needs in order to pass, e.g.
744 * "two-thirds". This field is only populated for contests of type 745 /// "two-thirds". This field is only populated for contests of type
745 * 'Referendum'. 746 /// 'Referendum'.
746 */
747 core.String referendumPassageThreshold; 747 core.String referendumPassageThreshold;
748 /** 748
749 * A statement in favor of the referendum. It does not necessarily appear on 749 /// A statement in favor of the referendum. It does not necessarily appear on
750 * the ballot. This field is only populated for contests of type 'Referendum'. 750 /// the ballot. This field is only populated for contests of type
751 */ 751 /// 'Referendum'.
752 core.String referendumProStatement; 752 core.String referendumProStatement;
753 /** 753
754 * A brief description of the referendum. This field is only populated for 754 /// A brief description of the referendum. This field is only populated for
755 * contests of type 'Referendum'. 755 /// contests of type 'Referendum'.
756 */
757 core.String referendumSubtitle; 756 core.String referendumSubtitle;
758 /** 757
759 * The full text of the referendum. This field is only populated for contests 758 /// The full text of the referendum. This field is only populated for
760 * of type 'Referendum'. 759 /// contests of type 'Referendum'.
761 */
762 core.String referendumText; 760 core.String referendumText;
763 /** 761
764 * The title of the referendum (e.g. 'Proposition 42'). This field is only 762 /// The title of the referendum (e.g. 'Proposition 42'). This field is only
765 * populated for contests of type 'Referendum'. 763 /// populated for contests of type 'Referendum'.
766 */
767 core.String referendumTitle; 764 core.String referendumTitle;
768 /** 765
769 * A link to the referendum. This field is only populated for contests of type 766 /// A link to the referendum. This field is only populated for contests of
770 * 'Referendum'. 767 /// type 'Referendum'.
771 */
772 core.String referendumUrl; 768 core.String referendumUrl;
773 /** The roles which this office fulfills. */ 769
770 /// The roles which this office fulfills.
774 core.List<core.String> roles; 771 core.List<core.String> roles;
775 /** 772
776 * A list of sources for this contest. If multiple sources are listed, the 773 /// A list of sources for this contest. If multiple sources are listed, the
777 * data has been aggregated from those sources. 774 /// data has been aggregated from those sources.
778 */
779 core.List<Source> sources; 775 core.List<Source> sources;
780 /** 776
781 * "Yes" or "No" depending on whether this a contest being held outside the 777 /// "Yes" or "No" depending on whether this a contest being held outside the
782 * normal election cycle. 778 /// normal election cycle.
783 */
784 core.String special; 779 core.String special;
785 /** 780
786 * The type of contest. Usually this will be 'General', 'Primary', or 781 /// The type of contest. Usually this will be 'General', 'Primary', or
787 * 'Run-off' for contests with candidates. For referenda this will be 782 /// 'Run-off' for contests with candidates. For referenda this will be
788 * 'Referendum'. For Retention contests this will typically be 'Retention'. 783 /// 'Referendum'. For Retention contests this will typically be 'Retention'.
789 */
790 core.String type; 784 core.String type;
791 785
792 Contest(); 786 Contest();
793 787
794 Contest.fromJson(core.Map _json) { 788 Contest.fromJson(core.Map _json) {
795 if (_json.containsKey("ballotPlacement")) { 789 if (_json.containsKey("ballotPlacement")) {
796 ballotPlacement = _json["ballotPlacement"]; 790 ballotPlacement = _json["ballotPlacement"];
797 } 791 }
798 if (_json.containsKey("candidates")) { 792 if (_json.containsKey("candidates")) {
799 candidates = _json["candidates"].map((value) => new Candidate.fromJson(val ue)).toList(); 793 candidates = _json["candidates"]
794 .map((value) => new Candidate.fromJson(value))
795 .toList();
800 } 796 }
801 if (_json.containsKey("district")) { 797 if (_json.containsKey("district")) {
802 district = new ElectoralDistrict.fromJson(_json["district"]); 798 district = new ElectoralDistrict.fromJson(_json["district"]);
803 } 799 }
804 if (_json.containsKey("electorateSpecifications")) { 800 if (_json.containsKey("electorateSpecifications")) {
805 electorateSpecifications = _json["electorateSpecifications"]; 801 electorateSpecifications = _json["electorateSpecifications"];
806 } 802 }
807 if (_json.containsKey("id")) { 803 if (_json.containsKey("id")) {
808 id = _json["id"]; 804 id = _json["id"];
809 } 805 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 if (_json.containsKey("referendumTitle")) { 845 if (_json.containsKey("referendumTitle")) {
850 referendumTitle = _json["referendumTitle"]; 846 referendumTitle = _json["referendumTitle"];
851 } 847 }
852 if (_json.containsKey("referendumUrl")) { 848 if (_json.containsKey("referendumUrl")) {
853 referendumUrl = _json["referendumUrl"]; 849 referendumUrl = _json["referendumUrl"];
854 } 850 }
855 if (_json.containsKey("roles")) { 851 if (_json.containsKey("roles")) {
856 roles = _json["roles"]; 852 roles = _json["roles"];
857 } 853 }
858 if (_json.containsKey("sources")) { 854 if (_json.containsKey("sources")) {
859 sources = _json["sources"].map((value) => new Source.fromJson(value)).toLi st(); 855 sources =
856 _json["sources"].map((value) => new Source.fromJson(value)).toList();
860 } 857 }
861 if (_json.containsKey("special")) { 858 if (_json.containsKey("special")) {
862 special = _json["special"]; 859 special = _json["special"];
863 } 860 }
864 if (_json.containsKey("type")) { 861 if (_json.containsKey("type")) {
865 type = _json["type"]; 862 type = _json["type"];
866 } 863 }
867 } 864 }
868 865
869 core.Map<core.String, core.Object> toJson() { 866 core.Map<core.String, core.Object> toJson() {
870 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 867 final core.Map<core.String, core.Object> _json =
868 new core.Map<core.String, core.Object>();
871 if (ballotPlacement != null) { 869 if (ballotPlacement != null) {
872 _json["ballotPlacement"] = ballotPlacement; 870 _json["ballotPlacement"] = ballotPlacement;
873 } 871 }
874 if (candidates != null) { 872 if (candidates != null) {
875 _json["candidates"] = candidates.map((value) => (value).toJson()).toList() ; 873 _json["candidates"] =
874 candidates.map((value) => (value).toJson()).toList();
876 } 875 }
877 if (district != null) { 876 if (district != null) {
878 _json["district"] = (district).toJson(); 877 _json["district"] = (district).toJson();
879 } 878 }
880 if (electorateSpecifications != null) { 879 if (electorateSpecifications != null) {
881 _json["electorateSpecifications"] = electorateSpecifications; 880 _json["electorateSpecifications"] = electorateSpecifications;
882 } 881 }
883 if (id != null) { 882 if (id != null) {
884 _json["id"] = id; 883 _json["id"] = id;
885 } 884 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 948
950 ContextParams(); 949 ContextParams();
951 950
952 ContextParams.fromJson(core.Map _json) { 951 ContextParams.fromJson(core.Map _json) {
953 if (_json.containsKey("clientProfile")) { 952 if (_json.containsKey("clientProfile")) {
954 clientProfile = _json["clientProfile"]; 953 clientProfile = _json["clientProfile"];
955 } 954 }
956 } 955 }
957 956
958 core.Map<core.String, core.Object> toJson() { 957 core.Map<core.String, core.Object> toJson() {
959 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 958 final core.Map<core.String, core.Object> _json =
959 new core.Map<core.String, core.Object>();
960 if (clientProfile != null) { 960 if (clientProfile != null) {
961 _json["clientProfile"] = clientProfile; 961 _json["clientProfile"] = clientProfile;
962 } 962 }
963 return _json; 963 return _json;
964 } 964 }
965 } 965 }
966 966
967 /** A request to look up representative information for a single division. */ 967 /// A request to look up representative information for a single division.
968 class DivisionRepresentativeInfoRequest { 968 class DivisionRepresentativeInfoRequest {
969 ContextParams contextParams; 969 ContextParams contextParams;
970 970
971 DivisionRepresentativeInfoRequest(); 971 DivisionRepresentativeInfoRequest();
972 972
973 DivisionRepresentativeInfoRequest.fromJson(core.Map _json) { 973 DivisionRepresentativeInfoRequest.fromJson(core.Map _json) {
974 if (_json.containsKey("contextParams")) { 974 if (_json.containsKey("contextParams")) {
975 contextParams = new ContextParams.fromJson(_json["contextParams"]); 975 contextParams = new ContextParams.fromJson(_json["contextParams"]);
976 } 976 }
977 } 977 }
978 978
979 core.Map<core.String, core.Object> toJson() { 979 core.Map<core.String, core.Object> toJson() {
980 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 980 final core.Map<core.String, core.Object> _json =
981 new core.Map<core.String, core.Object>();
981 if (contextParams != null) { 982 if (contextParams != null) {
982 _json["contextParams"] = (contextParams).toJson(); 983 _json["contextParams"] = (contextParams).toJson();
983 } 984 }
984 return _json; 985 return _json;
985 } 986 }
986 } 987 }
987 988
988 /** A search request for political geographies. */ 989 /// A search request for political geographies.
989 class DivisionSearchRequest { 990 class DivisionSearchRequest {
990 ContextParams contextParams; 991 ContextParams contextParams;
991 992
992 DivisionSearchRequest(); 993 DivisionSearchRequest();
993 994
994 DivisionSearchRequest.fromJson(core.Map _json) { 995 DivisionSearchRequest.fromJson(core.Map _json) {
995 if (_json.containsKey("contextParams")) { 996 if (_json.containsKey("contextParams")) {
996 contextParams = new ContextParams.fromJson(_json["contextParams"]); 997 contextParams = new ContextParams.fromJson(_json["contextParams"]);
997 } 998 }
998 } 999 }
999 1000
1000 core.Map<core.String, core.Object> toJson() { 1001 core.Map<core.String, core.Object> toJson() {
1001 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1002 final core.Map<core.String, core.Object> _json =
1003 new core.Map<core.String, core.Object>();
1002 if (contextParams != null) { 1004 if (contextParams != null) {
1003 _json["contextParams"] = (contextParams).toJson(); 1005 _json["contextParams"] = (contextParams).toJson();
1004 } 1006 }
1005 return _json; 1007 return _json;
1006 } 1008 }
1007 } 1009 }
1008 1010
1009 /** The result of a division search query. */ 1011 /// The result of a division search query.
1010 class DivisionSearchResponse { 1012 class DivisionSearchResponse {
1011 /** 1013 /// Identifies what kind of resource this is. Value: the fixed string
1012 * Identifies what kind of resource this is. Value: the fixed string 1014 /// "civicinfo#divisionSearchResponse".
1013 * "civicinfo#divisionSearchResponse".
1014 */
1015 core.String kind; 1015 core.String kind;
1016 core.List<DivisionSearchResult> results; 1016 core.List<DivisionSearchResult> results;
1017 1017
1018 DivisionSearchResponse(); 1018 DivisionSearchResponse();
1019 1019
1020 DivisionSearchResponse.fromJson(core.Map _json) { 1020 DivisionSearchResponse.fromJson(core.Map _json) {
1021 if (_json.containsKey("kind")) { 1021 if (_json.containsKey("kind")) {
1022 kind = _json["kind"]; 1022 kind = _json["kind"];
1023 } 1023 }
1024 if (_json.containsKey("results")) { 1024 if (_json.containsKey("results")) {
1025 results = _json["results"].map((value) => new DivisionSearchResult.fromJso n(value)).toList(); 1025 results = _json["results"]
1026 .map((value) => new DivisionSearchResult.fromJson(value))
1027 .toList();
1026 } 1028 }
1027 } 1029 }
1028 1030
1029 core.Map<core.String, core.Object> toJson() { 1031 core.Map<core.String, core.Object> toJson() {
1030 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1032 final core.Map<core.String, core.Object> _json =
1033 new core.Map<core.String, core.Object>();
1031 if (kind != null) { 1034 if (kind != null) {
1032 _json["kind"] = kind; 1035 _json["kind"] = kind;
1033 } 1036 }
1034 if (results != null) { 1037 if (results != null) {
1035 _json["results"] = results.map((value) => (value).toJson()).toList(); 1038 _json["results"] = results.map((value) => (value).toJson()).toList();
1036 } 1039 }
1037 return _json; 1040 return _json;
1038 } 1041 }
1039 } 1042 }
1040 1043
1041 /** 1044 /// Represents a political geographic division that matches the requested
1042 * Represents a political geographic division that matches the requested query. 1045 /// query.
1043 */
1044 class DivisionSearchResult { 1046 class DivisionSearchResult {
1045 /** 1047 /// Other Open Civic Data identifiers that refer to the same division -- for
1046 * Other Open Civic Data identifiers that refer to the same division -- for 1048 /// example, those that refer to other political divisions whose boundaries
1047 * example, those that refer to other political divisions whose boundaries are 1049 /// are defined to be coterminous with this one. For example,
1048 * defined to be coterminous with this one. For example, 1050 /// ocd-division/country:us/state:wy will include an alias of
1049 * ocd-division/country:us/state:wy will include an alias of 1051 /// ocd-division/country:us/state:wy/cd:1, since Wyoming has only one
1050 * ocd-division/country:us/state:wy/cd:1, since Wyoming has only one 1052 /// Congressional district.
1051 * Congressional district.
1052 */
1053 core.List<core.String> aliases; 1053 core.List<core.String> aliases;
1054 /** The name of the division. */ 1054
1055 /// The name of the division.
1055 core.String name; 1056 core.String name;
1056 /** The unique Open Civic Data identifier for this division. */ 1057
1058 /// The unique Open Civic Data identifier for this division.
1057 core.String ocdId; 1059 core.String ocdId;
1058 1060
1059 DivisionSearchResult(); 1061 DivisionSearchResult();
1060 1062
1061 DivisionSearchResult.fromJson(core.Map _json) { 1063 DivisionSearchResult.fromJson(core.Map _json) {
1062 if (_json.containsKey("aliases")) { 1064 if (_json.containsKey("aliases")) {
1063 aliases = _json["aliases"]; 1065 aliases = _json["aliases"];
1064 } 1066 }
1065 if (_json.containsKey("name")) { 1067 if (_json.containsKey("name")) {
1066 name = _json["name"]; 1068 name = _json["name"];
1067 } 1069 }
1068 if (_json.containsKey("ocdId")) { 1070 if (_json.containsKey("ocdId")) {
1069 ocdId = _json["ocdId"]; 1071 ocdId = _json["ocdId"];
1070 } 1072 }
1071 } 1073 }
1072 1074
1073 core.Map<core.String, core.Object> toJson() { 1075 core.Map<core.String, core.Object> toJson() {
1074 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1076 final core.Map<core.String, core.Object> _json =
1077 new core.Map<core.String, core.Object>();
1075 if (aliases != null) { 1078 if (aliases != null) {
1076 _json["aliases"] = aliases; 1079 _json["aliases"] = aliases;
1077 } 1080 }
1078 if (name != null) { 1081 if (name != null) {
1079 _json["name"] = name; 1082 _json["name"] = name;
1080 } 1083 }
1081 if (ocdId != null) { 1084 if (ocdId != null) {
1082 _json["ocdId"] = ocdId; 1085 _json["ocdId"] = ocdId;
1083 } 1086 }
1084 return _json; 1087 return _json;
1085 } 1088 }
1086 } 1089 }
1087 1090
1088 /** Information about the election that was queried. */ 1091 /// Information about the election that was queried.
1089 class Election { 1092 class Election {
1090 /** Day of the election in YYYY-MM-DD format. */ 1093 /// Day of the election in YYYY-MM-DD format.
1091 core.String electionDay; 1094 core.String electionDay;
1092 /** The unique ID of this election. */ 1095
1096 /// The unique ID of this election.
1093 core.String id; 1097 core.String id;
1094 /** A displayable name for the election. */ 1098
1099 /// A displayable name for the election.
1095 core.String name; 1100 core.String name;
1096 /** 1101
1097 * The political division of the election. Represented as an OCD Division ID. 1102 /// The political division of the election. Represented as an OCD Division
1098 * Voters within these political jurisdictions are covered by this election. 1103 /// ID. Voters within these political jurisdictions are covered by this
1099 * This is typically a state such as ocd-division/country:us/state:ca or for 1104 /// election. This is typically a state such as
1100 * the midterms or general election the entire US (i.e. 1105 /// ocd-division/country:us/state:ca or for the midterms or general election
1101 * ocd-division/country:us). 1106 /// the entire US (i.e. ocd-division/country:us).
1102 */
1103 core.String ocdDivisionId; 1107 core.String ocdDivisionId;
1104 1108
1105 Election(); 1109 Election();
1106 1110
1107 Election.fromJson(core.Map _json) { 1111 Election.fromJson(core.Map _json) {
1108 if (_json.containsKey("electionDay")) { 1112 if (_json.containsKey("electionDay")) {
1109 electionDay = _json["electionDay"]; 1113 electionDay = _json["electionDay"];
1110 } 1114 }
1111 if (_json.containsKey("id")) { 1115 if (_json.containsKey("id")) {
1112 id = _json["id"]; 1116 id = _json["id"];
1113 } 1117 }
1114 if (_json.containsKey("name")) { 1118 if (_json.containsKey("name")) {
1115 name = _json["name"]; 1119 name = _json["name"];
1116 } 1120 }
1117 if (_json.containsKey("ocdDivisionId")) { 1121 if (_json.containsKey("ocdDivisionId")) {
1118 ocdDivisionId = _json["ocdDivisionId"]; 1122 ocdDivisionId = _json["ocdDivisionId"];
1119 } 1123 }
1120 } 1124 }
1121 1125
1122 core.Map<core.String, core.Object> toJson() { 1126 core.Map<core.String, core.Object> toJson() {
1123 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1127 final core.Map<core.String, core.Object> _json =
1128 new core.Map<core.String, core.Object>();
1124 if (electionDay != null) { 1129 if (electionDay != null) {
1125 _json["electionDay"] = electionDay; 1130 _json["electionDay"] = electionDay;
1126 } 1131 }
1127 if (id != null) { 1132 if (id != null) {
1128 _json["id"] = id; 1133 _json["id"] = id;
1129 } 1134 }
1130 if (name != null) { 1135 if (name != null) {
1131 _json["name"] = name; 1136 _json["name"] = name;
1132 } 1137 }
1133 if (ocdDivisionId != null) { 1138 if (ocdDivisionId != null) {
1134 _json["ocdDivisionId"] = ocdDivisionId; 1139 _json["ocdDivisionId"] = ocdDivisionId;
1135 } 1140 }
1136 return _json; 1141 return _json;
1137 } 1142 }
1138 } 1143 }
1139 1144
1140 /** Information about individual election officials. */ 1145 /// Information about individual election officials.
1141 class ElectionOfficial { 1146 class ElectionOfficial {
1142 /** The email address of the election official. */ 1147 /// The email address of the election official.
1143 core.String emailAddress; 1148 core.String emailAddress;
1144 /** The fax number of the election official. */ 1149
1150 /// The fax number of the election official.
1145 core.String faxNumber; 1151 core.String faxNumber;
1146 /** The full name of the election official. */ 1152
1153 /// The full name of the election official.
1147 core.String name; 1154 core.String name;
1148 /** The office phone number of the election official. */ 1155
1156 /// The office phone number of the election official.
1149 core.String officePhoneNumber; 1157 core.String officePhoneNumber;
1150 /** The title of the election official. */ 1158
1159 /// The title of the election official.
1151 core.String title; 1160 core.String title;
1152 1161
1153 ElectionOfficial(); 1162 ElectionOfficial();
1154 1163
1155 ElectionOfficial.fromJson(core.Map _json) { 1164 ElectionOfficial.fromJson(core.Map _json) {
1156 if (_json.containsKey("emailAddress")) { 1165 if (_json.containsKey("emailAddress")) {
1157 emailAddress = _json["emailAddress"]; 1166 emailAddress = _json["emailAddress"];
1158 } 1167 }
1159 if (_json.containsKey("faxNumber")) { 1168 if (_json.containsKey("faxNumber")) {
1160 faxNumber = _json["faxNumber"]; 1169 faxNumber = _json["faxNumber"];
1161 } 1170 }
1162 if (_json.containsKey("name")) { 1171 if (_json.containsKey("name")) {
1163 name = _json["name"]; 1172 name = _json["name"];
1164 } 1173 }
1165 if (_json.containsKey("officePhoneNumber")) { 1174 if (_json.containsKey("officePhoneNumber")) {
1166 officePhoneNumber = _json["officePhoneNumber"]; 1175 officePhoneNumber = _json["officePhoneNumber"];
1167 } 1176 }
1168 if (_json.containsKey("title")) { 1177 if (_json.containsKey("title")) {
1169 title = _json["title"]; 1178 title = _json["title"];
1170 } 1179 }
1171 } 1180 }
1172 1181
1173 core.Map<core.String, core.Object> toJson() { 1182 core.Map<core.String, core.Object> toJson() {
1174 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1183 final core.Map<core.String, core.Object> _json =
1184 new core.Map<core.String, core.Object>();
1175 if (emailAddress != null) { 1185 if (emailAddress != null) {
1176 _json["emailAddress"] = emailAddress; 1186 _json["emailAddress"] = emailAddress;
1177 } 1187 }
1178 if (faxNumber != null) { 1188 if (faxNumber != null) {
1179 _json["faxNumber"] = faxNumber; 1189 _json["faxNumber"] = faxNumber;
1180 } 1190 }
1181 if (name != null) { 1191 if (name != null) {
1182 _json["name"] = name; 1192 _json["name"] = name;
1183 } 1193 }
1184 if (officePhoneNumber != null) { 1194 if (officePhoneNumber != null) {
(...skipping 11 matching lines...) Expand all
1196 1206
1197 ElectionsQueryRequest(); 1207 ElectionsQueryRequest();
1198 1208
1199 ElectionsQueryRequest.fromJson(core.Map _json) { 1209 ElectionsQueryRequest.fromJson(core.Map _json) {
1200 if (_json.containsKey("contextParams")) { 1210 if (_json.containsKey("contextParams")) {
1201 contextParams = new ContextParams.fromJson(_json["contextParams"]); 1211 contextParams = new ContextParams.fromJson(_json["contextParams"]);
1202 } 1212 }
1203 } 1213 }
1204 1214
1205 core.Map<core.String, core.Object> toJson() { 1215 core.Map<core.String, core.Object> toJson() {
1206 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1216 final core.Map<core.String, core.Object> _json =
1217 new core.Map<core.String, core.Object>();
1207 if (contextParams != null) { 1218 if (contextParams != null) {
1208 _json["contextParams"] = (contextParams).toJson(); 1219 _json["contextParams"] = (contextParams).toJson();
1209 } 1220 }
1210 return _json; 1221 return _json;
1211 } 1222 }
1212 } 1223 }
1213 1224
1214 /** The list of elections available for this version of the API. */ 1225 /// The list of elections available for this version of the API.
1215 class ElectionsQueryResponse { 1226 class ElectionsQueryResponse {
1216 /** A list of available elections */ 1227 /// A list of available elections
1217 core.List<Election> elections; 1228 core.List<Election> elections;
1218 /** 1229
1219 * Identifies what kind of resource this is. Value: the fixed string 1230 /// Identifies what kind of resource this is. Value: the fixed string
1220 * "civicinfo#electionsQueryResponse". 1231 /// "civicinfo#electionsQueryResponse".
1221 */
1222 core.String kind; 1232 core.String kind;
1223 1233
1224 ElectionsQueryResponse(); 1234 ElectionsQueryResponse();
1225 1235
1226 ElectionsQueryResponse.fromJson(core.Map _json) { 1236 ElectionsQueryResponse.fromJson(core.Map _json) {
1227 if (_json.containsKey("elections")) { 1237 if (_json.containsKey("elections")) {
1228 elections = _json["elections"].map((value) => new Election.fromJson(value) ).toList(); 1238 elections = _json["elections"]
1239 .map((value) => new Election.fromJson(value))
1240 .toList();
1229 } 1241 }
1230 if (_json.containsKey("kind")) { 1242 if (_json.containsKey("kind")) {
1231 kind = _json["kind"]; 1243 kind = _json["kind"];
1232 } 1244 }
1233 } 1245 }
1234 1246
1235 core.Map<core.String, core.Object> toJson() { 1247 core.Map<core.String, core.Object> toJson() {
1236 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1248 final core.Map<core.String, core.Object> _json =
1249 new core.Map<core.String, core.Object>();
1237 if (elections != null) { 1250 if (elections != null) {
1238 _json["elections"] = elections.map((value) => (value).toJson()).toList(); 1251 _json["elections"] = elections.map((value) => (value).toJson()).toList();
1239 } 1252 }
1240 if (kind != null) { 1253 if (kind != null) {
1241 _json["kind"] = kind; 1254 _json["kind"] = kind;
1242 } 1255 }
1243 return _json; 1256 return _json;
1244 } 1257 }
1245 } 1258 }
1246 1259
1247 /** Describes the geographic scope of a contest. */ 1260 /// Describes the geographic scope of a contest.
1248 class ElectoralDistrict { 1261 class ElectoralDistrict {
1249 /** 1262 /// An identifier for this district, relative to its scope. For example, the
1250 * An identifier for this district, relative to its scope. For example, the 1263 /// 34th State Senate district would have id "34" and a scope of stateUpper.
1251 * 34th State Senate district would have id "34" and a scope of stateUpper.
1252 */
1253 core.String id; 1264 core.String id;
1254 core.String kgForeignKey; 1265 core.String kgForeignKey;
1255 /** The name of the district. */ 1266
1267 /// The name of the district.
1256 core.String name; 1268 core.String name;
1257 /** 1269
1258 * The geographic scope of this district. If unspecified the district's 1270 /// The geographic scope of this district. If unspecified the district's
1259 * geography is not known. One of: national, statewide, congressional, 1271 /// geography is not known. One of: national, statewide, congressional,
1260 * stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide, 1272 /// stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide,
1261 * township, countyCouncil, cityCouncil, ward, special 1273 /// township, countyCouncil, cityCouncil, ward, special
1262 */
1263 core.String scope; 1274 core.String scope;
1264 1275
1265 ElectoralDistrict(); 1276 ElectoralDistrict();
1266 1277
1267 ElectoralDistrict.fromJson(core.Map _json) { 1278 ElectoralDistrict.fromJson(core.Map _json) {
1268 if (_json.containsKey("id")) { 1279 if (_json.containsKey("id")) {
1269 id = _json["id"]; 1280 id = _json["id"];
1270 } 1281 }
1271 if (_json.containsKey("kgForeignKey")) { 1282 if (_json.containsKey("kgForeignKey")) {
1272 kgForeignKey = _json["kgForeignKey"]; 1283 kgForeignKey = _json["kgForeignKey"];
1273 } 1284 }
1274 if (_json.containsKey("name")) { 1285 if (_json.containsKey("name")) {
1275 name = _json["name"]; 1286 name = _json["name"];
1276 } 1287 }
1277 if (_json.containsKey("scope")) { 1288 if (_json.containsKey("scope")) {
1278 scope = _json["scope"]; 1289 scope = _json["scope"];
1279 } 1290 }
1280 } 1291 }
1281 1292
1282 core.Map<core.String, core.Object> toJson() { 1293 core.Map<core.String, core.Object> toJson() {
1283 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1294 final core.Map<core.String, core.Object> _json =
1295 new core.Map<core.String, core.Object>();
1284 if (id != null) { 1296 if (id != null) {
1285 _json["id"] = id; 1297 _json["id"] = id;
1286 } 1298 }
1287 if (kgForeignKey != null) { 1299 if (kgForeignKey != null) {
1288 _json["kgForeignKey"] = kgForeignKey; 1300 _json["kgForeignKey"] = kgForeignKey;
1289 } 1301 }
1290 if (name != null) { 1302 if (name != null) {
1291 _json["name"] = name; 1303 _json["name"] = name;
1292 } 1304 }
1293 if (scope != null) { 1305 if (scope != null) {
1294 _json["scope"] = scope; 1306 _json["scope"] = scope;
1295 } 1307 }
1296 return _json; 1308 return _json;
1297 } 1309 }
1298 } 1310 }
1299 1311
1300 /** Describes a political geography. */ 1312 /// Describes a political geography.
1301 class GeographicDivision { 1313 class GeographicDivision {
1302 /** 1314 /// Any other valid OCD IDs that refer to the same division.
1303 * Any other valid OCD IDs that refer to the same division. 1315 ///
1304 * 1316 /// Because OCD IDs are meant to be human-readable and at least somewhat
1305 * Because OCD IDs are meant to be human-readable and at least somewhat 1317 /// predictable, there are occasionally several identifiers for a single
1306 * predictable, there are occasionally several identifiers for a single 1318 /// division. These identifiers are defined to be equivalent to one another,
1307 * division. These identifiers are defined to be equivalent to one another, 1319 /// and one is always indicated as the primary identifier. The primary
1308 * and one is always indicated as the primary identifier. The primary 1320 /// identifier will be returned in ocd_id above, and any other equivalent
1309 * identifier will be returned in ocd_id above, and any other equivalent valid 1321 /// valid identifiers will be returned in this list.
1310 * identifiers will be returned in this list. 1322 ///
1311 * 1323 /// For example, if this division's OCD ID is
1312 * For example, if this division's OCD ID is 1324 /// ocd-division/country:us/district:dc, this will contain
1313 * ocd-division/country:us/district:dc, this will contain 1325 /// ocd-division/country:us/state:dc.
1314 * ocd-division/country:us/state:dc.
1315 */
1316 core.List<core.String> alsoKnownAs; 1326 core.List<core.String> alsoKnownAs;
1317 /** The name of the division. */ 1327
1328 /// The name of the division.
1318 core.String name; 1329 core.String name;
1319 /** 1330
1320 * List of indices in the offices array, one for each office elected from this 1331 /// List of indices in the offices array, one for each office elected from
1321 * division. Will only be present if includeOffices was true (or absent) in 1332 /// this division. Will only be present if includeOffices was true (or
1322 * the request. 1333 /// absent) in the request.
1323 */
1324 core.List<core.int> officeIndices; 1334 core.List<core.int> officeIndices;
1325 1335
1326 GeographicDivision(); 1336 GeographicDivision();
1327 1337
1328 GeographicDivision.fromJson(core.Map _json) { 1338 GeographicDivision.fromJson(core.Map _json) {
1329 if (_json.containsKey("alsoKnownAs")) { 1339 if (_json.containsKey("alsoKnownAs")) {
1330 alsoKnownAs = _json["alsoKnownAs"]; 1340 alsoKnownAs = _json["alsoKnownAs"];
1331 } 1341 }
1332 if (_json.containsKey("name")) { 1342 if (_json.containsKey("name")) {
1333 name = _json["name"]; 1343 name = _json["name"];
1334 } 1344 }
1335 if (_json.containsKey("officeIndices")) { 1345 if (_json.containsKey("officeIndices")) {
1336 officeIndices = _json["officeIndices"]; 1346 officeIndices = _json["officeIndices"];
1337 } 1347 }
1338 } 1348 }
1339 1349
1340 core.Map<core.String, core.Object> toJson() { 1350 core.Map<core.String, core.Object> toJson() {
1341 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1351 final core.Map<core.String, core.Object> _json =
1352 new core.Map<core.String, core.Object>();
1342 if (alsoKnownAs != null) { 1353 if (alsoKnownAs != null) {
1343 _json["alsoKnownAs"] = alsoKnownAs; 1354 _json["alsoKnownAs"] = alsoKnownAs;
1344 } 1355 }
1345 if (name != null) { 1356 if (name != null) {
1346 _json["name"] = name; 1357 _json["name"] = name;
1347 } 1358 }
1348 if (officeIndices != null) { 1359 if (officeIndices != null) {
1349 _json["officeIndices"] = officeIndices; 1360 _json["officeIndices"] = officeIndices;
1350 } 1361 }
1351 return _json; 1362 return _json;
1352 } 1363 }
1353 } 1364 }
1354 1365
1355 /** Information about an Office held by one or more Officials. */ 1366 /// Information about an Office held by one or more Officials.
1356 class Office { 1367 class Office {
1357 /** The OCD ID of the division with which this office is associated. */ 1368 /// The OCD ID of the division with which this office is associated.
1358 core.String divisionId; 1369 core.String divisionId;
1359 /** 1370
1360 * The levels of government of which this office is part. There may be more 1371 /// The levels of government of which this office is part. There may be more
1361 * than one in cases where a jurisdiction effectively acts at two different 1372 /// than one in cases where a jurisdiction effectively acts at two different
1362 * levels of government; for example, the mayor of the District of Columbia 1373 /// levels of government; for example, the mayor of the District of Columbia
1363 * acts at "locality" level, but also effectively at both 1374 /// acts at "locality" level, but also effectively at both
1364 * "administrative-area-2" and "administrative-area-1". 1375 /// "administrative-area-2" and "administrative-area-1".
1365 */
1366 core.List<core.String> levels; 1376 core.List<core.String> levels;
1367 /** The human-readable name of the office. */ 1377
1378 /// The human-readable name of the office.
1368 core.String name; 1379 core.String name;
1369 /** 1380
1370 * List of indices in the officials array of people who presently hold this 1381 /// List of indices in the officials array of people who presently hold this
1371 * office. 1382 /// office.
1372 */
1373 core.List<core.int> officialIndices; 1383 core.List<core.int> officialIndices;
1374 /** 1384
1375 * The roles which this office fulfills. Roles are not meant to be exhaustive, 1385 /// The roles which this office fulfills. Roles are not meant to be
1376 * or to exactly specify the entire set of responsibilities of a given office, 1386 /// exhaustive, or to exactly specify the entire set of responsibilities of a
1377 * but are meant to be rough categories that are useful for general selection 1387 /// given office, but are meant to be rough categories that are useful for
1378 * from or sorting of a list of offices. 1388 /// general selection from or sorting of a list of offices.
1379 */
1380 core.List<core.String> roles; 1389 core.List<core.String> roles;
1381 /** 1390
1382 * A list of sources for this office. If multiple sources are listed, the data 1391 /// A list of sources for this office. If multiple sources are listed, the
1383 * has been aggregated from those sources. 1392 /// data has been aggregated from those sources.
1384 */
1385 core.List<Source> sources; 1393 core.List<Source> sources;
1386 1394
1387 Office(); 1395 Office();
1388 1396
1389 Office.fromJson(core.Map _json) { 1397 Office.fromJson(core.Map _json) {
1390 if (_json.containsKey("divisionId")) { 1398 if (_json.containsKey("divisionId")) {
1391 divisionId = _json["divisionId"]; 1399 divisionId = _json["divisionId"];
1392 } 1400 }
1393 if (_json.containsKey("levels")) { 1401 if (_json.containsKey("levels")) {
1394 levels = _json["levels"]; 1402 levels = _json["levels"];
1395 } 1403 }
1396 if (_json.containsKey("name")) { 1404 if (_json.containsKey("name")) {
1397 name = _json["name"]; 1405 name = _json["name"];
1398 } 1406 }
1399 if (_json.containsKey("officialIndices")) { 1407 if (_json.containsKey("officialIndices")) {
1400 officialIndices = _json["officialIndices"]; 1408 officialIndices = _json["officialIndices"];
1401 } 1409 }
1402 if (_json.containsKey("roles")) { 1410 if (_json.containsKey("roles")) {
1403 roles = _json["roles"]; 1411 roles = _json["roles"];
1404 } 1412 }
1405 if (_json.containsKey("sources")) { 1413 if (_json.containsKey("sources")) {
1406 sources = _json["sources"].map((value) => new Source.fromJson(value)).toLi st(); 1414 sources =
1415 _json["sources"].map((value) => new Source.fromJson(value)).toList();
1407 } 1416 }
1408 } 1417 }
1409 1418
1410 core.Map<core.String, core.Object> toJson() { 1419 core.Map<core.String, core.Object> toJson() {
1411 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1420 final core.Map<core.String, core.Object> _json =
1421 new core.Map<core.String, core.Object>();
1412 if (divisionId != null) { 1422 if (divisionId != null) {
1413 _json["divisionId"] = divisionId; 1423 _json["divisionId"] = divisionId;
1414 } 1424 }
1415 if (levels != null) { 1425 if (levels != null) {
1416 _json["levels"] = levels; 1426 _json["levels"] = levels;
1417 } 1427 }
1418 if (name != null) { 1428 if (name != null) {
1419 _json["name"] = name; 1429 _json["name"] = name;
1420 } 1430 }
1421 if (officialIndices != null) { 1431 if (officialIndices != null) {
1422 _json["officialIndices"] = officialIndices; 1432 _json["officialIndices"] = officialIndices;
1423 } 1433 }
1424 if (roles != null) { 1434 if (roles != null) {
1425 _json["roles"] = roles; 1435 _json["roles"] = roles;
1426 } 1436 }
1427 if (sources != null) { 1437 if (sources != null) {
1428 _json["sources"] = sources.map((value) => (value).toJson()).toList(); 1438 _json["sources"] = sources.map((value) => (value).toJson()).toList();
1429 } 1439 }
1430 return _json; 1440 return _json;
1431 } 1441 }
1432 } 1442 }
1433 1443
1434 /** Information about a person holding an elected office. */ 1444 /// Information about a person holding an elected office.
1435 class Official { 1445 class Official {
1436 /** Addresses at which to contact the official. */ 1446 /// Addresses at which to contact the official.
1437 core.List<SimpleAddressType> address; 1447 core.List<SimpleAddressType> address;
1438 /** A list of known (social) media channels for this official. */ 1448
1449 /// A list of known (social) media channels for this official.
1439 core.List<Channel> channels; 1450 core.List<Channel> channels;
1440 /** The direct email addresses for the official. */ 1451
1452 /// The direct email addresses for the official.
1441 core.List<core.String> emails; 1453 core.List<core.String> emails;
1442 /** The official's name. */ 1454
1455 /// The official's name.
1443 core.String name; 1456 core.String name;
1444 /** The full name of the party the official belongs to. */ 1457
1458 /// The full name of the party the official belongs to.
1445 core.String party; 1459 core.String party;
1446 /** The official's public contact phone numbers. */ 1460
1461 /// The official's public contact phone numbers.
1447 core.List<core.String> phones; 1462 core.List<core.String> phones;
1448 /** A URL for a photo of the official. */ 1463
1464 /// A URL for a photo of the official.
1449 core.String photoUrl; 1465 core.String photoUrl;
1450 /** The official's public website URLs. */ 1466
1467 /// The official's public website URLs.
1451 core.List<core.String> urls; 1468 core.List<core.String> urls;
1452 1469
1453 Official(); 1470 Official();
1454 1471
1455 Official.fromJson(core.Map _json) { 1472 Official.fromJson(core.Map _json) {
1456 if (_json.containsKey("address")) { 1473 if (_json.containsKey("address")) {
1457 address = _json["address"].map((value) => new SimpleAddressType.fromJson(v alue)).toList(); 1474 address = _json["address"]
1475 .map((value) => new SimpleAddressType.fromJson(value))
1476 .toList();
1458 } 1477 }
1459 if (_json.containsKey("channels")) { 1478 if (_json.containsKey("channels")) {
1460 channels = _json["channels"].map((value) => new Channel.fromJson(value)).t oList(); 1479 channels = _json["channels"]
1480 .map((value) => new Channel.fromJson(value))
1481 .toList();
1461 } 1482 }
1462 if (_json.containsKey("emails")) { 1483 if (_json.containsKey("emails")) {
1463 emails = _json["emails"]; 1484 emails = _json["emails"];
1464 } 1485 }
1465 if (_json.containsKey("name")) { 1486 if (_json.containsKey("name")) {
1466 name = _json["name"]; 1487 name = _json["name"];
1467 } 1488 }
1468 if (_json.containsKey("party")) { 1489 if (_json.containsKey("party")) {
1469 party = _json["party"]; 1490 party = _json["party"];
1470 } 1491 }
1471 if (_json.containsKey("phones")) { 1492 if (_json.containsKey("phones")) {
1472 phones = _json["phones"]; 1493 phones = _json["phones"];
1473 } 1494 }
1474 if (_json.containsKey("photoUrl")) { 1495 if (_json.containsKey("photoUrl")) {
1475 photoUrl = _json["photoUrl"]; 1496 photoUrl = _json["photoUrl"];
1476 } 1497 }
1477 if (_json.containsKey("urls")) { 1498 if (_json.containsKey("urls")) {
1478 urls = _json["urls"]; 1499 urls = _json["urls"];
1479 } 1500 }
1480 } 1501 }
1481 1502
1482 core.Map<core.String, core.Object> toJson() { 1503 core.Map<core.String, core.Object> toJson() {
1483 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1504 final core.Map<core.String, core.Object> _json =
1505 new core.Map<core.String, core.Object>();
1484 if (address != null) { 1506 if (address != null) {
1485 _json["address"] = address.map((value) => (value).toJson()).toList(); 1507 _json["address"] = address.map((value) => (value).toJson()).toList();
1486 } 1508 }
1487 if (channels != null) { 1509 if (channels != null) {
1488 _json["channels"] = channels.map((value) => (value).toJson()).toList(); 1510 _json["channels"] = channels.map((value) => (value).toJson()).toList();
1489 } 1511 }
1490 if (emails != null) { 1512 if (emails != null) {
1491 _json["emails"] = emails; 1513 _json["emails"] = emails;
1492 } 1514 }
1493 if (name != null) { 1515 if (name != null) {
1494 _json["name"] = name; 1516 _json["name"] = name;
1495 } 1517 }
1496 if (party != null) { 1518 if (party != null) {
1497 _json["party"] = party; 1519 _json["party"] = party;
1498 } 1520 }
1499 if (phones != null) { 1521 if (phones != null) {
1500 _json["phones"] = phones; 1522 _json["phones"] = phones;
1501 } 1523 }
1502 if (photoUrl != null) { 1524 if (photoUrl != null) {
1503 _json["photoUrl"] = photoUrl; 1525 _json["photoUrl"] = photoUrl;
1504 } 1526 }
1505 if (urls != null) { 1527 if (urls != null) {
1506 _json["urls"] = urls; 1528 _json["urls"] = urls;
1507 } 1529 }
1508 return _json; 1530 return _json;
1509 } 1531 }
1510 } 1532 }
1511 1533
1512 /** 1534 /// A location where a voter can vote. This may be an early vote site, an
1513 * A location where a voter can vote. This may be an early vote site, an 1535 /// election day voting location, or a drop off location for a completed
1514 * election day voting location, or a drop off location for a completed ballot. 1536 /// ballot.
1515 */
1516 class PollingLocation { 1537 class PollingLocation {
1517 /** The address of the location. */ 1538 /// The address of the location.
1518 SimpleAddressType address; 1539 SimpleAddressType address;
1519 /** 1540
1520 * The last date that this early vote site or drop off location may be used. 1541 /// The last date that this early vote site or drop off location may be used.
1521 * This field is not populated for polling locations. 1542 /// This field is not populated for polling locations.
1522 */
1523 core.String endDate; 1543 core.String endDate;
1524 /** 1544
1525 * An ID for this object. IDs may change in future requests and should not be 1545 /// An ID for this object. IDs may change in future requests and should not
1526 * cached. Access to this field requires special access that can be requested 1546 /// be cached. Access to this field requires special access that can be
1527 * from the Request more link on the Quotas page. 1547 /// requested from the Request more link on the Quotas page.
1528 */
1529 core.String id; 1548 core.String id;
1530 /** 1549
1531 * The name of the early vote site or drop off location. This field is not 1550 /// The name of the early vote site or drop off location. This field is not
1532 * populated for polling locations. 1551 /// populated for polling locations.
1533 */
1534 core.String name; 1552 core.String name;
1535 /** 1553
1536 * Notes about this location (e.g. accessibility ramp or entrance to use). 1554 /// Notes about this location (e.g. accessibility ramp or entrance to use).
1537 */
1538 core.String notes; 1555 core.String notes;
1539 /** A description of when this location is open. */ 1556
1557 /// A description of when this location is open.
1540 core.String pollingHours; 1558 core.String pollingHours;
1541 /** 1559
1542 * A list of sources for this location. If multiple sources are listed the 1560 /// A list of sources for this location. If multiple sources are listed the
1543 * data has been aggregated from those sources. 1561 /// data has been aggregated from those sources.
1544 */
1545 core.List<Source> sources; 1562 core.List<Source> sources;
1546 /** 1563
1547 * The first date that this early vote site or drop off location may be used. 1564 /// The first date that this early vote site or drop off location may be
1548 * This field is not populated for polling locations. 1565 /// used. This field is not populated for polling locations.
1549 */
1550 core.String startDate; 1566 core.String startDate;
1551 /** 1567
1552 * The services provided by this early vote site or drop off location. This 1568 /// The services provided by this early vote site or drop off location. This
1553 * field is not populated for polling locations. 1569 /// field is not populated for polling locations.
1554 */
1555 core.String voterServices; 1570 core.String voterServices;
1556 1571
1557 PollingLocation(); 1572 PollingLocation();
1558 1573
1559 PollingLocation.fromJson(core.Map _json) { 1574 PollingLocation.fromJson(core.Map _json) {
1560 if (_json.containsKey("address")) { 1575 if (_json.containsKey("address")) {
1561 address = new SimpleAddressType.fromJson(_json["address"]); 1576 address = new SimpleAddressType.fromJson(_json["address"]);
1562 } 1577 }
1563 if (_json.containsKey("endDate")) { 1578 if (_json.containsKey("endDate")) {
1564 endDate = _json["endDate"]; 1579 endDate = _json["endDate"];
1565 } 1580 }
1566 if (_json.containsKey("id")) { 1581 if (_json.containsKey("id")) {
1567 id = _json["id"]; 1582 id = _json["id"];
1568 } 1583 }
1569 if (_json.containsKey("name")) { 1584 if (_json.containsKey("name")) {
1570 name = _json["name"]; 1585 name = _json["name"];
1571 } 1586 }
1572 if (_json.containsKey("notes")) { 1587 if (_json.containsKey("notes")) {
1573 notes = _json["notes"]; 1588 notes = _json["notes"];
1574 } 1589 }
1575 if (_json.containsKey("pollingHours")) { 1590 if (_json.containsKey("pollingHours")) {
1576 pollingHours = _json["pollingHours"]; 1591 pollingHours = _json["pollingHours"];
1577 } 1592 }
1578 if (_json.containsKey("sources")) { 1593 if (_json.containsKey("sources")) {
1579 sources = _json["sources"].map((value) => new Source.fromJson(value)).toLi st(); 1594 sources =
1595 _json["sources"].map((value) => new Source.fromJson(value)).toList();
1580 } 1596 }
1581 if (_json.containsKey("startDate")) { 1597 if (_json.containsKey("startDate")) {
1582 startDate = _json["startDate"]; 1598 startDate = _json["startDate"];
1583 } 1599 }
1584 if (_json.containsKey("voterServices")) { 1600 if (_json.containsKey("voterServices")) {
1585 voterServices = _json["voterServices"]; 1601 voterServices = _json["voterServices"];
1586 } 1602 }
1587 } 1603 }
1588 1604
1589 core.Map<core.String, core.Object> toJson() { 1605 core.Map<core.String, core.Object> toJson() {
1590 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1606 final core.Map<core.String, core.Object> _json =
1607 new core.Map<core.String, core.Object>();
1591 if (address != null) { 1608 if (address != null) {
1592 _json["address"] = (address).toJson(); 1609 _json["address"] = (address).toJson();
1593 } 1610 }
1594 if (endDate != null) { 1611 if (endDate != null) {
1595 _json["endDate"] = endDate; 1612 _json["endDate"] = endDate;
1596 } 1613 }
1597 if (id != null) { 1614 if (id != null) {
1598 _json["id"] = id; 1615 _json["id"] = id;
1599 } 1616 }
1600 if (name != null) { 1617 if (name != null) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 if (_json.containsKey("countryName")) { 1681 if (_json.containsKey("countryName")) {
1665 countryName = _json["countryName"]; 1682 countryName = _json["countryName"];
1666 } 1683 }
1667 if (_json.containsKey("countryNameCode")) { 1684 if (_json.containsKey("countryNameCode")) {
1668 countryNameCode = _json["countryNameCode"]; 1685 countryNameCode = _json["countryNameCode"];
1669 } 1686 }
1670 if (_json.containsKey("dependentLocalityName")) { 1687 if (_json.containsKey("dependentLocalityName")) {
1671 dependentLocalityName = _json["dependentLocalityName"]; 1688 dependentLocalityName = _json["dependentLocalityName"];
1672 } 1689 }
1673 if (_json.containsKey("dependentThoroughfareLeadingType")) { 1690 if (_json.containsKey("dependentThoroughfareLeadingType")) {
1674 dependentThoroughfareLeadingType = _json["dependentThoroughfareLeadingType "]; 1691 dependentThoroughfareLeadingType =
1692 _json["dependentThoroughfareLeadingType"];
1675 } 1693 }
1676 if (_json.containsKey("dependentThoroughfareName")) { 1694 if (_json.containsKey("dependentThoroughfareName")) {
1677 dependentThoroughfareName = _json["dependentThoroughfareName"]; 1695 dependentThoroughfareName = _json["dependentThoroughfareName"];
1678 } 1696 }
1679 if (_json.containsKey("dependentThoroughfarePostDirection")) { 1697 if (_json.containsKey("dependentThoroughfarePostDirection")) {
1680 dependentThoroughfarePostDirection = _json["dependentThoroughfarePostDirec tion"]; 1698 dependentThoroughfarePostDirection =
1699 _json["dependentThoroughfarePostDirection"];
1681 } 1700 }
1682 if (_json.containsKey("dependentThoroughfarePreDirection")) { 1701 if (_json.containsKey("dependentThoroughfarePreDirection")) {
1683 dependentThoroughfarePreDirection = _json["dependentThoroughfarePreDirecti on"]; 1702 dependentThoroughfarePreDirection =
1703 _json["dependentThoroughfarePreDirection"];
1684 } 1704 }
1685 if (_json.containsKey("dependentThoroughfareTrailingType")) { 1705 if (_json.containsKey("dependentThoroughfareTrailingType")) {
1686 dependentThoroughfareTrailingType = _json["dependentThoroughfareTrailingTy pe"]; 1706 dependentThoroughfareTrailingType =
1707 _json["dependentThoroughfareTrailingType"];
1687 } 1708 }
1688 if (_json.containsKey("dependentThoroughfaresConnector")) { 1709 if (_json.containsKey("dependentThoroughfaresConnector")) {
1689 dependentThoroughfaresConnector = _json["dependentThoroughfaresConnector"] ; 1710 dependentThoroughfaresConnector =
1711 _json["dependentThoroughfaresConnector"];
1690 } 1712 }
1691 if (_json.containsKey("dependentThoroughfaresIndicator")) { 1713 if (_json.containsKey("dependentThoroughfaresIndicator")) {
1692 dependentThoroughfaresIndicator = _json["dependentThoroughfaresIndicator"] ; 1714 dependentThoroughfaresIndicator =
1715 _json["dependentThoroughfaresIndicator"];
1693 } 1716 }
1694 if (_json.containsKey("dependentThoroughfaresType")) { 1717 if (_json.containsKey("dependentThoroughfaresType")) {
1695 dependentThoroughfaresType = _json["dependentThoroughfaresType"]; 1718 dependentThoroughfaresType = _json["dependentThoroughfaresType"];
1696 } 1719 }
1697 if (_json.containsKey("firmName")) { 1720 if (_json.containsKey("firmName")) {
1698 firmName = _json["firmName"]; 1721 firmName = _json["firmName"];
1699 } 1722 }
1700 if (_json.containsKey("isDisputed")) { 1723 if (_json.containsKey("isDisputed")) {
1701 isDisputed = _json["isDisputed"]; 1724 isDisputed = _json["isDisputed"];
1702 } 1725 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1744 } 1767 }
1745 if (_json.containsKey("thoroughfarePreDirection")) { 1768 if (_json.containsKey("thoroughfarePreDirection")) {
1746 thoroughfarePreDirection = _json["thoroughfarePreDirection"]; 1769 thoroughfarePreDirection = _json["thoroughfarePreDirection"];
1747 } 1770 }
1748 if (_json.containsKey("thoroughfareTrailingType")) { 1771 if (_json.containsKey("thoroughfareTrailingType")) {
1749 thoroughfareTrailingType = _json["thoroughfareTrailingType"]; 1772 thoroughfareTrailingType = _json["thoroughfareTrailingType"];
1750 } 1773 }
1751 } 1774 }
1752 1775
1753 core.Map<core.String, core.Object> toJson() { 1776 core.Map<core.String, core.Object> toJson() {
1754 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1777 final core.Map<core.String, core.Object> _json =
1778 new core.Map<core.String, core.Object>();
1755 if (addressLines != null) { 1779 if (addressLines != null) {
1756 _json["addressLines"] = addressLines; 1780 _json["addressLines"] = addressLines;
1757 } 1781 }
1758 if (administrativeAreaName != null) { 1782 if (administrativeAreaName != null) {
1759 _json["administrativeAreaName"] = administrativeAreaName; 1783 _json["administrativeAreaName"] = administrativeAreaName;
1760 } 1784 }
1761 if (countryName != null) { 1785 if (countryName != null) {
1762 _json["countryName"] = countryName; 1786 _json["countryName"] = countryName;
1763 } 1787 }
1764 if (countryNameCode != null) { 1788 if (countryNameCode != null) {
1765 _json["countryNameCode"] = countryNameCode; 1789 _json["countryNameCode"] = countryNameCode;
1766 } 1790 }
1767 if (dependentLocalityName != null) { 1791 if (dependentLocalityName != null) {
1768 _json["dependentLocalityName"] = dependentLocalityName; 1792 _json["dependentLocalityName"] = dependentLocalityName;
1769 } 1793 }
1770 if (dependentThoroughfareLeadingType != null) { 1794 if (dependentThoroughfareLeadingType != null) {
1771 _json["dependentThoroughfareLeadingType"] = dependentThoroughfareLeadingTy pe; 1795 _json["dependentThoroughfareLeadingType"] =
1796 dependentThoroughfareLeadingType;
1772 } 1797 }
1773 if (dependentThoroughfareName != null) { 1798 if (dependentThoroughfareName != null) {
1774 _json["dependentThoroughfareName"] = dependentThoroughfareName; 1799 _json["dependentThoroughfareName"] = dependentThoroughfareName;
1775 } 1800 }
1776 if (dependentThoroughfarePostDirection != null) { 1801 if (dependentThoroughfarePostDirection != null) {
1777 _json["dependentThoroughfarePostDirection"] = dependentThoroughfarePostDir ection; 1802 _json["dependentThoroughfarePostDirection"] =
1803 dependentThoroughfarePostDirection;
1778 } 1804 }
1779 if (dependentThoroughfarePreDirection != null) { 1805 if (dependentThoroughfarePreDirection != null) {
1780 _json["dependentThoroughfarePreDirection"] = dependentThoroughfarePreDirec tion; 1806 _json["dependentThoroughfarePreDirection"] =
1807 dependentThoroughfarePreDirection;
1781 } 1808 }
1782 if (dependentThoroughfareTrailingType != null) { 1809 if (dependentThoroughfareTrailingType != null) {
1783 _json["dependentThoroughfareTrailingType"] = dependentThoroughfareTrailing Type; 1810 _json["dependentThoroughfareTrailingType"] =
1811 dependentThoroughfareTrailingType;
1784 } 1812 }
1785 if (dependentThoroughfaresConnector != null) { 1813 if (dependentThoroughfaresConnector != null) {
1786 _json["dependentThoroughfaresConnector"] = dependentThoroughfaresConnector ; 1814 _json["dependentThoroughfaresConnector"] =
1815 dependentThoroughfaresConnector;
1787 } 1816 }
1788 if (dependentThoroughfaresIndicator != null) { 1817 if (dependentThoroughfaresIndicator != null) {
1789 _json["dependentThoroughfaresIndicator"] = dependentThoroughfaresIndicator ; 1818 _json["dependentThoroughfaresIndicator"] =
1819 dependentThoroughfaresIndicator;
1790 } 1820 }
1791 if (dependentThoroughfaresType != null) { 1821 if (dependentThoroughfaresType != null) {
1792 _json["dependentThoroughfaresType"] = dependentThoroughfaresType; 1822 _json["dependentThoroughfaresType"] = dependentThoroughfaresType;
1793 } 1823 }
1794 if (firmName != null) { 1824 if (firmName != null) {
1795 _json["firmName"] = firmName; 1825 _json["firmName"] = firmName;
1796 } 1826 }
1797 if (isDisputed != null) { 1827 if (isDisputed != null) {
1798 _json["isDisputed"] = isDisputed; 1828 _json["isDisputed"] = isDisputed;
1799 } 1829 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 _json["thoroughfarePreDirection"] = thoroughfarePreDirection; 1873 _json["thoroughfarePreDirection"] = thoroughfarePreDirection;
1844 } 1874 }
1845 if (thoroughfareTrailingType != null) { 1875 if (thoroughfareTrailingType != null) {
1846 _json["thoroughfareTrailingType"] = thoroughfareTrailingType; 1876 _json["thoroughfareTrailingType"] = thoroughfareTrailingType;
1847 } 1877 }
1848 return _json; 1878 return _json;
1849 } 1879 }
1850 } 1880 }
1851 1881
1852 class RepresentativeInfoData { 1882 class RepresentativeInfoData {
1853 /** Political geographic divisions that contain the requested address. */ 1883 /// Political geographic divisions that contain the requested address.
1854 core.Map<core.String, GeographicDivision> divisions; 1884 core.Map<core.String, GeographicDivision> divisions;
1855 /** 1885
1856 * Elected offices referenced by the divisions listed above. Will only be 1886 /// Elected offices referenced by the divisions listed above. Will only be
1857 * present if includeOffices was true in the request. 1887 /// present if includeOffices was true in the request.
1858 */
1859 core.List<Office> offices; 1888 core.List<Office> offices;
1860 /** 1889
1861 * Officials holding the offices listed above. Will only be present if 1890 /// Officials holding the offices listed above. Will only be present if
1862 * includeOffices was true in the request. 1891 /// includeOffices was true in the request.
1863 */
1864 core.List<Official> officials; 1892 core.List<Official> officials;
1865 1893
1866 RepresentativeInfoData(); 1894 RepresentativeInfoData();
1867 1895
1868 RepresentativeInfoData.fromJson(core.Map _json) { 1896 RepresentativeInfoData.fromJson(core.Map _json) {
1869 if (_json.containsKey("divisions")) { 1897 if (_json.containsKey("divisions")) {
1870 divisions = commons.mapMap<core.Map<core.String, core.Object>, GeographicD ivision>(_json["divisions"], (core.Map<core.String, core.Object> item) => new Ge ographicDivision.fromJson(item)); 1898 divisions = commons
1899 .mapMap<core.Map<core.String, core.Object>, GeographicDivision>(
1900 _json["divisions"],
1901 (core.Map<core.String, core.Object> item) =>
1902 new GeographicDivision.fromJson(item));
1871 } 1903 }
1872 if (_json.containsKey("offices")) { 1904 if (_json.containsKey("offices")) {
1873 offices = _json["offices"].map((value) => new Office.fromJson(value)).toLi st(); 1905 offices =
1906 _json["offices"].map((value) => new Office.fromJson(value)).toList();
1874 } 1907 }
1875 if (_json.containsKey("officials")) { 1908 if (_json.containsKey("officials")) {
1876 officials = _json["officials"].map((value) => new Official.fromJson(value) ).toList(); 1909 officials = _json["officials"]
1910 .map((value) => new Official.fromJson(value))
1911 .toList();
1877 } 1912 }
1878 } 1913 }
1879 1914
1880 core.Map<core.String, core.Object> toJson() { 1915 core.Map<core.String, core.Object> toJson() {
1881 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1916 final core.Map<core.String, core.Object> _json =
1917 new core.Map<core.String, core.Object>();
1882 if (divisions != null) { 1918 if (divisions != null) {
1883 _json["divisions"] = commons.mapMap<GeographicDivision, core.Map<core.Stri ng, core.Object>>(divisions, (GeographicDivision item) => (item).toJson()); 1919 _json["divisions"] = commons
1920 .mapMap<GeographicDivision, core.Map<core.String, core.Object>>(
1921 divisions, (GeographicDivision item) => (item).toJson());
1884 } 1922 }
1885 if (offices != null) { 1923 if (offices != null) {
1886 _json["offices"] = offices.map((value) => (value).toJson()).toList(); 1924 _json["offices"] = offices.map((value) => (value).toJson()).toList();
1887 } 1925 }
1888 if (officials != null) { 1926 if (officials != null) {
1889 _json["officials"] = officials.map((value) => (value).toJson()).toList(); 1927 _json["officials"] = officials.map((value) => (value).toJson()).toList();
1890 } 1928 }
1891 return _json; 1929 return _json;
1892 } 1930 }
1893 } 1931 }
1894 1932
1895 /** 1933 /// A request for political geography and representative information for an
1896 * A request for political geography and representative information for an 1934 /// address.
1897 * address.
1898 */
1899 class RepresentativeInfoRequest { 1935 class RepresentativeInfoRequest {
1900 ContextParams contextParams; 1936 ContextParams contextParams;
1901 1937
1902 RepresentativeInfoRequest(); 1938 RepresentativeInfoRequest();
1903 1939
1904 RepresentativeInfoRequest.fromJson(core.Map _json) { 1940 RepresentativeInfoRequest.fromJson(core.Map _json) {
1905 if (_json.containsKey("contextParams")) { 1941 if (_json.containsKey("contextParams")) {
1906 contextParams = new ContextParams.fromJson(_json["contextParams"]); 1942 contextParams = new ContextParams.fromJson(_json["contextParams"]);
1907 } 1943 }
1908 } 1944 }
1909 1945
1910 core.Map<core.String, core.Object> toJson() { 1946 core.Map<core.String, core.Object> toJson() {
1911 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 1947 final core.Map<core.String, core.Object> _json =
1948 new core.Map<core.String, core.Object>();
1912 if (contextParams != null) { 1949 if (contextParams != null) {
1913 _json["contextParams"] = (contextParams).toJson(); 1950 _json["contextParams"] = (contextParams).toJson();
1914 } 1951 }
1915 return _json; 1952 return _json;
1916 } 1953 }
1917 } 1954 }
1918 1955
1919 /** The result of a representative info lookup query. */ 1956 /// The result of a representative info lookup query.
1920 class RepresentativeInfoResponse { 1957 class RepresentativeInfoResponse {
1921 /** Political geographic divisions that contain the requested address. */ 1958 /// Political geographic divisions that contain the requested address.
1922 core.Map<core.String, GeographicDivision> divisions; 1959 core.Map<core.String, GeographicDivision> divisions;
1923 /** 1960
1924 * Identifies what kind of resource this is. Value: the fixed string 1961 /// Identifies what kind of resource this is. Value: the fixed string
1925 * "civicinfo#representativeInfoResponse". 1962 /// "civicinfo#representativeInfoResponse".
1926 */
1927 core.String kind; 1963 core.String kind;
1928 /** The normalized version of the requested address */ 1964
1965 /// The normalized version of the requested address
1929 SimpleAddressType normalizedInput; 1966 SimpleAddressType normalizedInput;
1930 /** 1967
1931 * Elected offices referenced by the divisions listed above. Will only be 1968 /// Elected offices referenced by the divisions listed above. Will only be
1932 * present if includeOffices was true in the request. 1969 /// present if includeOffices was true in the request.
1933 */
1934 core.List<Office> offices; 1970 core.List<Office> offices;
1935 /** 1971
1936 * Officials holding the offices listed above. Will only be present if 1972 /// Officials holding the offices listed above. Will only be present if
1937 * includeOffices was true in the request. 1973 /// includeOffices was true in the request.
1938 */
1939 core.List<Official> officials; 1974 core.List<Official> officials;
1940 1975
1941 RepresentativeInfoResponse(); 1976 RepresentativeInfoResponse();
1942 1977
1943 RepresentativeInfoResponse.fromJson(core.Map _json) { 1978 RepresentativeInfoResponse.fromJson(core.Map _json) {
1944 if (_json.containsKey("divisions")) { 1979 if (_json.containsKey("divisions")) {
1945 divisions = commons.mapMap<core.Map<core.String, core.Object>, GeographicD ivision>(_json["divisions"], (core.Map<core.String, core.Object> item) => new Ge ographicDivision.fromJson(item)); 1980 divisions = commons
1981 .mapMap<core.Map<core.String, core.Object>, GeographicDivision>(
1982 _json["divisions"],
1983 (core.Map<core.String, core.Object> item) =>
1984 new GeographicDivision.fromJson(item));
1946 } 1985 }
1947 if (_json.containsKey("kind")) { 1986 if (_json.containsKey("kind")) {
1948 kind = _json["kind"]; 1987 kind = _json["kind"];
1949 } 1988 }
1950 if (_json.containsKey("normalizedInput")) { 1989 if (_json.containsKey("normalizedInput")) {
1951 normalizedInput = new SimpleAddressType.fromJson(_json["normalizedInput"]) ; 1990 normalizedInput =
1991 new SimpleAddressType.fromJson(_json["normalizedInput"]);
1952 } 1992 }
1953 if (_json.containsKey("offices")) { 1993 if (_json.containsKey("offices")) {
1954 offices = _json["offices"].map((value) => new Office.fromJson(value)).toLi st(); 1994 offices =
1995 _json["offices"].map((value) => new Office.fromJson(value)).toList();
1955 } 1996 }
1956 if (_json.containsKey("officials")) { 1997 if (_json.containsKey("officials")) {
1957 officials = _json["officials"].map((value) => new Official.fromJson(value) ).toList(); 1998 officials = _json["officials"]
1999 .map((value) => new Official.fromJson(value))
2000 .toList();
1958 } 2001 }
1959 } 2002 }
1960 2003
1961 core.Map<core.String, core.Object> toJson() { 2004 core.Map<core.String, core.Object> toJson() {
1962 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2005 final core.Map<core.String, core.Object> _json =
2006 new core.Map<core.String, core.Object>();
1963 if (divisions != null) { 2007 if (divisions != null) {
1964 _json["divisions"] = commons.mapMap<GeographicDivision, core.Map<core.Stri ng, core.Object>>(divisions, (GeographicDivision item) => (item).toJson()); 2008 _json["divisions"] = commons
2009 .mapMap<GeographicDivision, core.Map<core.String, core.Object>>(
2010 divisions, (GeographicDivision item) => (item).toJson());
1965 } 2011 }
1966 if (kind != null) { 2012 if (kind != null) {
1967 _json["kind"] = kind; 2013 _json["kind"] = kind;
1968 } 2014 }
1969 if (normalizedInput != null) { 2015 if (normalizedInput != null) {
1970 _json["normalizedInput"] = (normalizedInput).toJson(); 2016 _json["normalizedInput"] = (normalizedInput).toJson();
1971 } 2017 }
1972 if (offices != null) { 2018 if (offices != null) {
1973 _json["offices"] = offices.map((value) => (value).toJson()).toList(); 2019 _json["offices"] = offices.map((value) => (value).toJson()).toList();
1974 } 2020 }
1975 if (officials != null) { 2021 if (officials != null) {
1976 _json["officials"] = officials.map((value) => (value).toJson()).toList(); 2022 _json["officials"] = officials.map((value) => (value).toJson()).toList();
1977 } 2023 }
1978 return _json; 2024 return _json;
1979 } 2025 }
1980 } 2026 }
1981 2027
1982 /** A simple representation of an address. */ 2028 /// A simple representation of an address.
1983 class SimpleAddressType { 2029 class SimpleAddressType {
1984 /** The city or town for the address. */ 2030 /// The city or town for the address.
1985 core.String city; 2031 core.String city;
1986 /** The street name and number of this address. */ 2032
2033 /// The street name and number of this address.
1987 core.String line1; 2034 core.String line1;
1988 /** The second line the address, if needed. */ 2035
2036 /// The second line the address, if needed.
1989 core.String line2; 2037 core.String line2;
1990 /** The third line of the address, if needed. */ 2038
2039 /// The third line of the address, if needed.
1991 core.String line3; 2040 core.String line3;
1992 /** The name of the location. */ 2041
2042 /// The name of the location.
1993 core.String locationName; 2043 core.String locationName;
1994 /** The US two letter state abbreviation of the address. */ 2044
2045 /// The US two letter state abbreviation of the address.
1995 core.String state; 2046 core.String state;
1996 /** The US Postal Zip Code of the address. */ 2047
2048 /// The US Postal Zip Code of the address.
1997 core.String zip; 2049 core.String zip;
1998 2050
1999 SimpleAddressType(); 2051 SimpleAddressType();
2000 2052
2001 SimpleAddressType.fromJson(core.Map _json) { 2053 SimpleAddressType.fromJson(core.Map _json) {
2002 if (_json.containsKey("city")) { 2054 if (_json.containsKey("city")) {
2003 city = _json["city"]; 2055 city = _json["city"];
2004 } 2056 }
2005 if (_json.containsKey("line1")) { 2057 if (_json.containsKey("line1")) {
2006 line1 = _json["line1"]; 2058 line1 = _json["line1"];
2007 } 2059 }
2008 if (_json.containsKey("line2")) { 2060 if (_json.containsKey("line2")) {
2009 line2 = _json["line2"]; 2061 line2 = _json["line2"];
2010 } 2062 }
2011 if (_json.containsKey("line3")) { 2063 if (_json.containsKey("line3")) {
2012 line3 = _json["line3"]; 2064 line3 = _json["line3"];
2013 } 2065 }
2014 if (_json.containsKey("locationName")) { 2066 if (_json.containsKey("locationName")) {
2015 locationName = _json["locationName"]; 2067 locationName = _json["locationName"];
2016 } 2068 }
2017 if (_json.containsKey("state")) { 2069 if (_json.containsKey("state")) {
2018 state = _json["state"]; 2070 state = _json["state"];
2019 } 2071 }
2020 if (_json.containsKey("zip")) { 2072 if (_json.containsKey("zip")) {
2021 zip = _json["zip"]; 2073 zip = _json["zip"];
2022 } 2074 }
2023 } 2075 }
2024 2076
2025 core.Map<core.String, core.Object> toJson() { 2077 core.Map<core.String, core.Object> toJson() {
2026 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2078 final core.Map<core.String, core.Object> _json =
2079 new core.Map<core.String, core.Object>();
2027 if (city != null) { 2080 if (city != null) {
2028 _json["city"] = city; 2081 _json["city"] = city;
2029 } 2082 }
2030 if (line1 != null) { 2083 if (line1 != null) {
2031 _json["line1"] = line1; 2084 _json["line1"] = line1;
2032 } 2085 }
2033 if (line2 != null) { 2086 if (line2 != null) {
2034 _json["line2"] = line2; 2087 _json["line2"] = line2;
2035 } 2088 }
2036 if (line3 != null) { 2089 if (line3 != null) {
2037 _json["line3"] = line3; 2090 _json["line3"] = line3;
2038 } 2091 }
2039 if (locationName != null) { 2092 if (locationName != null) {
2040 _json["locationName"] = locationName; 2093 _json["locationName"] = locationName;
2041 } 2094 }
2042 if (state != null) { 2095 if (state != null) {
2043 _json["state"] = state; 2096 _json["state"] = state;
2044 } 2097 }
2045 if (zip != null) { 2098 if (zip != null) {
2046 _json["zip"] = zip; 2099 _json["zip"] = zip;
2047 } 2100 }
2048 return _json; 2101 return _json;
2049 } 2102 }
2050 } 2103 }
2051 2104
2052 /** 2105 /// Contains information about the data source for the element containing it.
2053 * Contains information about the data source for the element containing it.
2054 */
2055 class Source { 2106 class Source {
2056 /** The name of the data source. */ 2107 /// The name of the data source.
2057 core.String name; 2108 core.String name;
2058 /** Whether this data comes from an official government source. */ 2109
2110 /// Whether this data comes from an official government source.
2059 core.bool official; 2111 core.bool official;
2060 2112
2061 Source(); 2113 Source();
2062 2114
2063 Source.fromJson(core.Map _json) { 2115 Source.fromJson(core.Map _json) {
2064 if (_json.containsKey("name")) { 2116 if (_json.containsKey("name")) {
2065 name = _json["name"]; 2117 name = _json["name"];
2066 } 2118 }
2067 if (_json.containsKey("official")) { 2119 if (_json.containsKey("official")) {
2068 official = _json["official"]; 2120 official = _json["official"];
2069 } 2121 }
2070 } 2122 }
2071 2123
2072 core.Map<core.String, core.Object> toJson() { 2124 core.Map<core.String, core.Object> toJson() {
2073 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2125 final core.Map<core.String, core.Object> _json =
2126 new core.Map<core.String, core.Object>();
2074 if (name != null) { 2127 if (name != null) {
2075 _json["name"] = name; 2128 _json["name"] = name;
2076 } 2129 }
2077 if (official != null) { 2130 if (official != null) {
2078 _json["official"] = official; 2131 _json["official"] = official;
2079 } 2132 }
2080 return _json; 2133 return _json;
2081 } 2134 }
2082 } 2135 }
2083 2136
2084 /** A request for information about a voter. */ 2137 /// A request for information about a voter.
2085 class VoterInfoRequest { 2138 class VoterInfoRequest {
2086 ContextParams contextParams; 2139 ContextParams contextParams;
2087 VoterInfoSegmentResult voterInfoSegmentResult; 2140 VoterInfoSegmentResult voterInfoSegmentResult;
2088 2141
2089 VoterInfoRequest(); 2142 VoterInfoRequest();
2090 2143
2091 VoterInfoRequest.fromJson(core.Map _json) { 2144 VoterInfoRequest.fromJson(core.Map _json) {
2092 if (_json.containsKey("contextParams")) { 2145 if (_json.containsKey("contextParams")) {
2093 contextParams = new ContextParams.fromJson(_json["contextParams"]); 2146 contextParams = new ContextParams.fromJson(_json["contextParams"]);
2094 } 2147 }
2095 if (_json.containsKey("voterInfoSegmentResult")) { 2148 if (_json.containsKey("voterInfoSegmentResult")) {
2096 voterInfoSegmentResult = new VoterInfoSegmentResult.fromJson(_json["voterI nfoSegmentResult"]); 2149 voterInfoSegmentResult =
2150 new VoterInfoSegmentResult.fromJson(_json["voterInfoSegmentResult"]);
2097 } 2151 }
2098 } 2152 }
2099 2153
2100 core.Map<core.String, core.Object> toJson() { 2154 core.Map<core.String, core.Object> toJson() {
2101 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2155 final core.Map<core.String, core.Object> _json =
2156 new core.Map<core.String, core.Object>();
2102 if (contextParams != null) { 2157 if (contextParams != null) {
2103 _json["contextParams"] = (contextParams).toJson(); 2158 _json["contextParams"] = (contextParams).toJson();
2104 } 2159 }
2105 if (voterInfoSegmentResult != null) { 2160 if (voterInfoSegmentResult != null) {
2106 _json["voterInfoSegmentResult"] = (voterInfoSegmentResult).toJson(); 2161 _json["voterInfoSegmentResult"] = (voterInfoSegmentResult).toJson();
2107 } 2162 }
2108 return _json; 2163 return _json;
2109 } 2164 }
2110 } 2165 }
2111 2166
2112 /** The result of a voter info lookup query. */ 2167 /// The result of a voter info lookup query.
2113 class VoterInfoResponse { 2168 class VoterInfoResponse {
2114 /** Contests that will appear on the voter's ballot. */ 2169 /// Contests that will appear on the voter's ballot.
2115 core.List<Contest> contests; 2170 core.List<Contest> contests;
2116 /** 2171
2117 * Locations where a voter is eligible to drop off a completed ballot. The 2172 /// Locations where a voter is eligible to drop off a completed ballot. The
2118 * voter must have received and completed a ballot prior to arriving at the 2173 /// voter must have received and completed a ballot prior to arriving at the
2119 * location. The location may not have ballots available on the premises. 2174 /// location. The location may not have ballots available on the premises.
2120 * These locations could be open on or before election day as indicated in the 2175 /// These locations could be open on or before election day as indicated in
2121 * pollingHours field. 2176 /// the pollingHours field.
2122 */
2123 core.List<PollingLocation> dropOffLocations; 2177 core.List<PollingLocation> dropOffLocations;
2124 /** 2178
2125 * Locations where the voter is eligible to vote early, prior to election day. 2179 /// Locations where the voter is eligible to vote early, prior to election
2126 */ 2180 /// day.
2127 core.List<PollingLocation> earlyVoteSites; 2181 core.List<PollingLocation> earlyVoteSites;
2128 /** The election that was queried. */ 2182
2183 /// The election that was queried.
2129 Election election; 2184 Election election;
2130 /** 2185
2131 * Identifies what kind of resource this is. Value: the fixed string 2186 /// Identifies what kind of resource this is. Value: the fixed string
2132 * "civicinfo#voterInfoResponse". 2187 /// "civicinfo#voterInfoResponse".
2133 */
2134 core.String kind; 2188 core.String kind;
2135 /** 2189
2136 * Specifies whether voters in the precinct vote only by mailing their ballots 2190 /// Specifies whether voters in the precinct vote only by mailing their
2137 * (with the possible option of dropping off their ballots as well). 2191 /// ballots (with the possible option of dropping off their ballots as well).
2138 */
2139 core.bool mailOnly; 2192 core.bool mailOnly;
2140 /** The normalized version of the requested address */ 2193
2194 /// The normalized version of the requested address
2141 SimpleAddressType normalizedInput; 2195 SimpleAddressType normalizedInput;
2142 /** 2196
2143 * If no election ID was specified in the query, and there was more than one 2197 /// If no election ID was specified in the query, and there was more than one
2144 * election with data for the given voter, this will contain information about 2198 /// election with data for the given voter, this will contain information
2145 * the other elections that could apply. 2199 /// about the other elections that could apply.
2146 */
2147 core.List<Election> otherElections; 2200 core.List<Election> otherElections;
2148 /** Locations where the voter is eligible to vote on election day. */ 2201
2202 /// Locations where the voter is eligible to vote on election day.
2149 core.List<PollingLocation> pollingLocations; 2203 core.List<PollingLocation> pollingLocations;
2150 core.String precinctId; 2204 core.String precinctId;
2151 /** 2205
2152 * Local Election Information for the state that the voter votes in. For the 2206 /// Local Election Information for the state that the voter votes in. For the
2153 * US, there will only be one element in this array. 2207 /// US, there will only be one element in this array.
2154 */
2155 core.List<AdministrationRegion> state; 2208 core.List<AdministrationRegion> state;
2156 2209
2157 VoterInfoResponse(); 2210 VoterInfoResponse();
2158 2211
2159 VoterInfoResponse.fromJson(core.Map _json) { 2212 VoterInfoResponse.fromJson(core.Map _json) {
2160 if (_json.containsKey("contests")) { 2213 if (_json.containsKey("contests")) {
2161 contests = _json["contests"].map((value) => new Contest.fromJson(value)).t oList(); 2214 contests = _json["contests"]
2215 .map((value) => new Contest.fromJson(value))
2216 .toList();
2162 } 2217 }
2163 if (_json.containsKey("dropOffLocations")) { 2218 if (_json.containsKey("dropOffLocations")) {
2164 dropOffLocations = _json["dropOffLocations"].map((value) => new PollingLoc ation.fromJson(value)).toList(); 2219 dropOffLocations = _json["dropOffLocations"]
2220 .map((value) => new PollingLocation.fromJson(value))
2221 .toList();
2165 } 2222 }
2166 if (_json.containsKey("earlyVoteSites")) { 2223 if (_json.containsKey("earlyVoteSites")) {
2167 earlyVoteSites = _json["earlyVoteSites"].map((value) => new PollingLocatio n.fromJson(value)).toList(); 2224 earlyVoteSites = _json["earlyVoteSites"]
2225 .map((value) => new PollingLocation.fromJson(value))
2226 .toList();
2168 } 2227 }
2169 if (_json.containsKey("election")) { 2228 if (_json.containsKey("election")) {
2170 election = new Election.fromJson(_json["election"]); 2229 election = new Election.fromJson(_json["election"]);
2171 } 2230 }
2172 if (_json.containsKey("kind")) { 2231 if (_json.containsKey("kind")) {
2173 kind = _json["kind"]; 2232 kind = _json["kind"];
2174 } 2233 }
2175 if (_json.containsKey("mailOnly")) { 2234 if (_json.containsKey("mailOnly")) {
2176 mailOnly = _json["mailOnly"]; 2235 mailOnly = _json["mailOnly"];
2177 } 2236 }
2178 if (_json.containsKey("normalizedInput")) { 2237 if (_json.containsKey("normalizedInput")) {
2179 normalizedInput = new SimpleAddressType.fromJson(_json["normalizedInput"]) ; 2238 normalizedInput =
2239 new SimpleAddressType.fromJson(_json["normalizedInput"]);
2180 } 2240 }
2181 if (_json.containsKey("otherElections")) { 2241 if (_json.containsKey("otherElections")) {
2182 otherElections = _json["otherElections"].map((value) => new Election.fromJ son(value)).toList(); 2242 otherElections = _json["otherElections"]
2243 .map((value) => new Election.fromJson(value))
2244 .toList();
2183 } 2245 }
2184 if (_json.containsKey("pollingLocations")) { 2246 if (_json.containsKey("pollingLocations")) {
2185 pollingLocations = _json["pollingLocations"].map((value) => new PollingLoc ation.fromJson(value)).toList(); 2247 pollingLocations = _json["pollingLocations"]
2248 .map((value) => new PollingLocation.fromJson(value))
2249 .toList();
2186 } 2250 }
2187 if (_json.containsKey("precinctId")) { 2251 if (_json.containsKey("precinctId")) {
2188 precinctId = _json["precinctId"]; 2252 precinctId = _json["precinctId"];
2189 } 2253 }
2190 if (_json.containsKey("state")) { 2254 if (_json.containsKey("state")) {
2191 state = _json["state"].map((value) => new AdministrationRegion.fromJson(va lue)).toList(); 2255 state = _json["state"]
2256 .map((value) => new AdministrationRegion.fromJson(value))
2257 .toList();
2192 } 2258 }
2193 } 2259 }
2194 2260
2195 core.Map<core.String, core.Object> toJson() { 2261 core.Map<core.String, core.Object> toJson() {
2196 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2262 final core.Map<core.String, core.Object> _json =
2263 new core.Map<core.String, core.Object>();
2197 if (contests != null) { 2264 if (contests != null) {
2198 _json["contests"] = contests.map((value) => (value).toJson()).toList(); 2265 _json["contests"] = contests.map((value) => (value).toJson()).toList();
2199 } 2266 }
2200 if (dropOffLocations != null) { 2267 if (dropOffLocations != null) {
2201 _json["dropOffLocations"] = dropOffLocations.map((value) => (value).toJson ()).toList(); 2268 _json["dropOffLocations"] =
2269 dropOffLocations.map((value) => (value).toJson()).toList();
2202 } 2270 }
2203 if (earlyVoteSites != null) { 2271 if (earlyVoteSites != null) {
2204 _json["earlyVoteSites"] = earlyVoteSites.map((value) => (value).toJson()). toList(); 2272 _json["earlyVoteSites"] =
2273 earlyVoteSites.map((value) => (value).toJson()).toList();
2205 } 2274 }
2206 if (election != null) { 2275 if (election != null) {
2207 _json["election"] = (election).toJson(); 2276 _json["election"] = (election).toJson();
2208 } 2277 }
2209 if (kind != null) { 2278 if (kind != null) {
2210 _json["kind"] = kind; 2279 _json["kind"] = kind;
2211 } 2280 }
2212 if (mailOnly != null) { 2281 if (mailOnly != null) {
2213 _json["mailOnly"] = mailOnly; 2282 _json["mailOnly"] = mailOnly;
2214 } 2283 }
2215 if (normalizedInput != null) { 2284 if (normalizedInput != null) {
2216 _json["normalizedInput"] = (normalizedInput).toJson(); 2285 _json["normalizedInput"] = (normalizedInput).toJson();
2217 } 2286 }
2218 if (otherElections != null) { 2287 if (otherElections != null) {
2219 _json["otherElections"] = otherElections.map((value) => (value).toJson()). toList(); 2288 _json["otherElections"] =
2289 otherElections.map((value) => (value).toJson()).toList();
2220 } 2290 }
2221 if (pollingLocations != null) { 2291 if (pollingLocations != null) {
2222 _json["pollingLocations"] = pollingLocations.map((value) => (value).toJson ()).toList(); 2292 _json["pollingLocations"] =
2293 pollingLocations.map((value) => (value).toJson()).toList();
2223 } 2294 }
2224 if (precinctId != null) { 2295 if (precinctId != null) {
2225 _json["precinctId"] = precinctId; 2296 _json["precinctId"] = precinctId;
2226 } 2297 }
2227 if (state != null) { 2298 if (state != null) {
2228 _json["state"] = state.map((value) => (value).toJson()).toList(); 2299 _json["state"] = state.map((value) => (value).toJson()).toList();
2229 } 2300 }
2230 return _json; 2301 return _json;
2231 } 2302 }
2232 } 2303 }
(...skipping 15 matching lines...) Expand all
2248 } 2319 }
2249 if (_json.containsKey("request")) { 2320 if (_json.containsKey("request")) {
2250 request = new VoterInfoRequest.fromJson(_json["request"]); 2321 request = new VoterInfoRequest.fromJson(_json["request"]);
2251 } 2322 }
2252 if (_json.containsKey("response")) { 2323 if (_json.containsKey("response")) {
2253 response = new VoterInfoResponse.fromJson(_json["response"]); 2324 response = new VoterInfoResponse.fromJson(_json["response"]);
2254 } 2325 }
2255 } 2326 }
2256 2327
2257 core.Map<core.String, core.Object> toJson() { 2328 core.Map<core.String, core.Object> toJson() {
2258 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 2329 final core.Map<core.String, core.Object> _json =
2330 new core.Map<core.String, core.Object>();
2259 if (generatedMillis != null) { 2331 if (generatedMillis != null) {
2260 _json["generatedMillis"] = generatedMillis; 2332 _json["generatedMillis"] = generatedMillis;
2261 } 2333 }
2262 if (postalAddress != null) { 2334 if (postalAddress != null) {
2263 _json["postalAddress"] = (postalAddress).toJson(); 2335 _json["postalAddress"] = (postalAddress).toJson();
2264 } 2336 }
2265 if (request != null) { 2337 if (request != null) {
2266 _json["request"] = (request).toJson(); 2338 _json["request"] = (request).toJson();
2267 } 2339 }
2268 if (response != null) { 2340 if (response != null) {
2269 _json["response"] = (response).toJson(); 2341 _json["response"] = (response).toJson();
2270 } 2342 }
2271 return _json; 2343 return _json;
2272 } 2344 }
2273 } 2345 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/calendar/v3.dart ('k') | generated/googleapis/lib/classroom/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698