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

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

Issue 2485703002: Api-roll 42: 2016-11-08 (Closed)
Patch Set: Created 4 years, 1 month 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/books/v1.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;
(...skipping 22 matching lines...) Expand all
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) :
38 _requester = client; 38 _requester = client;
39 39
40 /** 40 /**
41 * Searches for political divisions by their natural name or OCD ID. 41 * Searches for political divisions by their natural name or OCD ID.
42 * 42 *
43 * [request] - The metadata request object.
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 Apache 49 * required patterns. In addition to that, most query operators of the Apache
48 * 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 an 55 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
54 * error. 56 * error.
55 * 57 *
56 * If the used [http.Client] completes with an error when making a REST call, 58 * If the used [http.Client] completes with an error when making a REST call,
57 * this method will complete with the same error. 59 * this method will complete with the same error.
58 */ 60 */
59 async.Future<DivisionSearchResponse> search({core.String query}) { 61 async.Future<DivisionSearchResponse> search(DivisionSearchRequest request, {co re.String query}) {
60 var _url = null; 62 var _url = null;
61 var _queryParams = new core.Map(); 63 var _queryParams = new core.Map();
62 var _uploadMedia = null; 64 var _uploadMedia = null;
63 var _uploadOptions = null; 65 var _uploadOptions = null;
64 var _downloadOptions = commons.DownloadOptions.Metadata; 66 var _downloadOptions = commons.DownloadOptions.Metadata;
65 var _body = null; 67 var _body = null;
66 68
69 if (request != null) {
70 _body = convert.JSON.encode((request).toJson());
71 }
67 if (query != null) { 72 if (query != null) {
68 _queryParams["query"] = [query]; 73 _queryParams["query"] = [query];
69 } 74 }
70 75
71 _url = 'divisions'; 76 _url = 'divisions';
72 77
73 var _response = _requester.request(_url, 78 var _response = _requester.request(_url,
74 "GET", 79 "GET",
75 body: _body, 80 body: _body,
76 queryParams: _queryParams, 81 queryParams: _queryParams,
77 uploadOptions: _uploadOptions, 82 uploadOptions: _uploadOptions,
78 uploadMedia: _uploadMedia, 83 uploadMedia: _uploadMedia,
79 downloadOptions: _downloadOptions); 84 downloadOptions: _downloadOptions);
80 return _response.then((data) => new DivisionSearchResponse.fromJson(data)); 85 return _response.then((data) => new DivisionSearchResponse.fromJson(data));
81 } 86 }
82 87
83 } 88 }
84 89
85 90
86 class ElectionsResourceApi { 91 class ElectionsResourceApi {
87 final commons.ApiRequester _requester; 92 final commons.ApiRequester _requester;
88 93
89 ElectionsResourceApi(commons.ApiRequester client) : 94 ElectionsResourceApi(commons.ApiRequester client) :
90 _requester = client; 95 _requester = client;
91 96
92 /** 97 /**
93 * List of available elections to query. 98 * List of available elections to query.
94 * 99 *
100 * [request] - The metadata request object.
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 an 106 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
100 * error. 107 * error.
101 * 108 *
102 * If the used [http.Client] completes with an error when making a REST call, 109 * If the used [http.Client] completes with an error when making a REST call,
103 * this method will complete with the same error. 110 * this method will complete with the same error.
104 */ 111 */
105 async.Future<ElectionsQueryResponse> electionQuery() { 112 async.Future<ElectionsQueryResponse> electionQuery(ElectionsQueryRequest reque st) {
106 var _url = null; 113 var _url = null;
107 var _queryParams = new core.Map(); 114 var _queryParams = new core.Map();
108 var _uploadMedia = null; 115 var _uploadMedia = null;
109 var _uploadOptions = null; 116 var _uploadOptions = null;
110 var _downloadOptions = commons.DownloadOptions.Metadata; 117 var _downloadOptions = commons.DownloadOptions.Metadata;
111 var _body = null; 118 var _body = null;
112 119
120 if (request != null) {
121 _body = convert.JSON.encode((request).toJson());
122 }
113 123
114 _url = 'elections'; 124 _url = 'elections';
115 125
116 var _response = _requester.request(_url, 126 var _response = _requester.request(_url,
117 "GET", 127 "GET",
118 body: _body, 128 body: _body,
119 queryParams: _queryParams, 129 queryParams: _queryParams,
120 uploadOptions: _uploadOptions, 130 uploadOptions: _uploadOptions,
121 uploadMedia: _uploadMedia, 131 uploadMedia: _uploadMedia,
122 downloadOptions: _downloadOptions); 132 downloadOptions: _downloadOptions);
123 return _response.then((data) => new ElectionsQueryResponse.fromJson(data)); 133 return _response.then((data) => new ElectionsQueryResponse.fromJson(data));
124 } 134 }
125 135
126 /** 136 /**
127 * 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
128 * address. 138 * address.
129 * 139 *
140 * [request] - The metadata request object.
141 *
130 * Request parameters: 142 * Request parameters:
131 * 143 *
132 * [address] - The registered address of the voter to look up. 144 * [address] - The registered address of the voter to look up.
133 * 145 *
134 * [electionId] - The unique ID of the election to look up. A list of election 146 * [electionId] - The unique ID of the election to look up. A list of election
135 * IDs can be obtained at 147 * IDs can be obtained at
136 * https://www.googleapis.com/civicinfo/{version}/elections 148 * https://www.googleapis.com/civicinfo/{version}/elections
137 * 149 *
138 * [officialOnly] - If set to true, only data from official state sources will 150 * [officialOnly] - If set to true, only data from official state sources will
139 * be returned. 151 * be returned.
140 * 152 *
141 * [returnAllAvailableData] - If set to true, the query will return the 153 * [returnAllAvailableData] - If set to true, the query will return the
142 * success codeand include any partial information when it is unable to 154 * success codeand include any partial information when it is unable to
143 * determine a matching address or unable to determine the election for 155 * determine a matching address or unable to determine the election for
144 * electionId=0 queries. 156 * electionId=0 queries.
145 * 157 *
146 * Completes with a [VoterInfoResponse]. 158 * Completes with a [VoterInfoResponse].
147 * 159 *
148 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 160 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
149 * error. 161 * error.
150 * 162 *
151 * If the used [http.Client] completes with an error when making a REST call, 163 * If the used [http.Client] completes with an error when making a REST call,
152 * this method will complete with the same error. 164 * this method will complete with the same error.
153 */ 165 */
154 async.Future<VoterInfoResponse> voterInfoQuery(core.String address, {core.Stri ng electionId, core.bool officialOnly, core.bool returnAllAvailableData}) { 166 async.Future<VoterInfoResponse> voterInfoQuery(VoterInfoRequest request, core. String address, {core.String electionId, core.bool officialOnly, core.bool retur nAllAvailableData}) {
155 var _url = null; 167 var _url = null;
156 var _queryParams = new core.Map(); 168 var _queryParams = new core.Map();
157 var _uploadMedia = null; 169 var _uploadMedia = null;
158 var _uploadOptions = null; 170 var _uploadOptions = null;
159 var _downloadOptions = commons.DownloadOptions.Metadata; 171 var _downloadOptions = commons.DownloadOptions.Metadata;
160 var _body = null; 172 var _body = null;
161 173
174 if (request != null) {
175 _body = convert.JSON.encode((request).toJson());
176 }
162 if (address == null) { 177 if (address == null) {
163 throw new core.ArgumentError("Parameter address is required."); 178 throw new core.ArgumentError("Parameter address is required.");
164 } 179 }
165 _queryParams["address"] = [address]; 180 _queryParams["address"] = [address];
166 if (electionId != null) { 181 if (electionId != null) {
167 _queryParams["electionId"] = [electionId]; 182 _queryParams["electionId"] = [electionId];
168 } 183 }
169 if (officialOnly != null) { 184 if (officialOnly != null) {
170 _queryParams["officialOnly"] = ["${officialOnly}"]; 185 _queryParams["officialOnly"] = ["${officialOnly}"];
171 } 186 }
(...skipping 19 matching lines...) Expand all
191 class RepresentativesResourceApi { 206 class RepresentativesResourceApi {
192 final commons.ApiRequester _requester; 207 final commons.ApiRequester _requester;
193 208
194 RepresentativesResourceApi(commons.ApiRequester client) : 209 RepresentativesResourceApi(commons.ApiRequester client) :
195 _requester = client; 210 _requester = client;
196 211
197 /** 212 /**
198 * Looks up political geography and representative information for a single 213 * Looks up political geography and representative information for a single
199 * address. 214 * address.
200 * 215 *
216 * [request] - The metadata request object.
217 *
201 * Request parameters: 218 * Request parameters:
202 * 219 *
203 * [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
204 * ocdId is not given in the URL. 221 * ocdId is not given in the URL.
205 * 222 *
206 * [includeOffices] - Whether to return information about offices and 223 * [includeOffices] - Whether to return information about offices and
207 * officials. If false, only the top-level district information will be 224 * officials. If false, only the top-level district information will be
208 * returned. 225 * returned.
209 * 226 *
210 * [levels] - A list of office levels to filter by. Only offices that serve at 227 * [levels] - A list of office levels to filter by. Only offices that serve at
211 * least one of these levels will be returned. Divisions that don't contain a 228 * least one of these levels will be returned. Divisions that don't contain a
212 * matching office will not be returned. 229 * matching office will not be returned.
213 * 230 *
214 * [roles] - A list of office roles to filter by. Only offices fulfilling one 231 * [roles] - A list of office roles to filter by. Only offices fulfilling one
215 * of these roles will be returned. Divisions that don't contain a matching 232 * of these roles will be returned. Divisions that don't contain a matching
216 * office will not be returned. 233 * office will not be returned.
217 * 234 *
218 * Completes with a [RepresentativeInfoResponse]. 235 * Completes with a [RepresentativeInfoResponse].
219 * 236 *
220 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 237 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
221 * error. 238 * error.
222 * 239 *
223 * If the used [http.Client] completes with an error when making a REST call, 240 * If the used [http.Client] completes with an error when making a REST call,
224 * this method will complete with the same error. 241 * this method will complete with the same error.
225 */ 242 */
226 async.Future<RepresentativeInfoResponse> representativeInfoByAddress({core.Str ing address, core.bool includeOffices, core.List<core.String> levels, core.List< core.String> roles}) { 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}) {
227 var _url = null; 244 var _url = null;
228 var _queryParams = new core.Map(); 245 var _queryParams = new core.Map();
229 var _uploadMedia = null; 246 var _uploadMedia = null;
230 var _uploadOptions = null; 247 var _uploadOptions = null;
231 var _downloadOptions = commons.DownloadOptions.Metadata; 248 var _downloadOptions = commons.DownloadOptions.Metadata;
232 var _body = null; 249 var _body = null;
233 250
251 if (request != null) {
252 _body = convert.JSON.encode((request).toJson());
253 }
234 if (address != null) { 254 if (address != null) {
235 _queryParams["address"] = [address]; 255 _queryParams["address"] = [address];
236 } 256 }
237 if (includeOffices != null) { 257 if (includeOffices != null) {
238 _queryParams["includeOffices"] = ["${includeOffices}"]; 258 _queryParams["includeOffices"] = ["${includeOffices}"];
239 } 259 }
240 if (levels != null) { 260 if (levels != null) {
241 _queryParams["levels"] = levels; 261 _queryParams["levels"] = levels;
242 } 262 }
243 if (roles != null) { 263 if (roles != null) {
244 _queryParams["roles"] = roles; 264 _queryParams["roles"] = roles;
245 } 265 }
246 266
247 _url = 'representatives'; 267 _url = 'representatives';
248 268
249 var _response = _requester.request(_url, 269 var _response = _requester.request(_url,
250 "GET", 270 "GET",
251 body: _body, 271 body: _body,
252 queryParams: _queryParams, 272 queryParams: _queryParams,
253 uploadOptions: _uploadOptions, 273 uploadOptions: _uploadOptions,
254 uploadMedia: _uploadMedia, 274 uploadMedia: _uploadMedia,
255 downloadOptions: _downloadOptions); 275 downloadOptions: _downloadOptions);
256 return _response.then((data) => new RepresentativeInfoResponse.fromJson(data )); 276 return _response.then((data) => new RepresentativeInfoResponse.fromJson(data ));
257 } 277 }
258 278
259 /** 279 /**
260 * Looks up representative information for a single geographic division. 280 * Looks up representative information for a single geographic division.
261 * 281 *
282 * [request] - The metadata request object.
283 *
262 * Request parameters: 284 * Request parameters:
263 * 285 *
264 * [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
265 * up. 287 * up.
266 * 288 *
267 * [levels] - A list of office levels to filter by. Only offices that serve at 289 * [levels] - A list of office levels to filter by. Only offices that serve at
268 * least one of these levels will be returned. Divisions that don't contain a 290 * least one of these levels will be returned. Divisions that don't contain a
269 * matching office will not be returned. 291 * matching office will not be returned.
270 * 292 *
271 * [recursive] - If true, information about all divisions contained in the 293 * [recursive] - If true, information about all divisions contained in the
272 * division requested will be included as well. For example, if querying 294 * division requested will be included as well. For example, if querying
273 * ocd-division/country:us/district:dc, this would also return all DC's wards 295 * ocd-division/country:us/district:dc, this would also return all DC's wards
274 * and ANCs. 296 * and ANCs.
275 * 297 *
276 * [roles] - A list of office roles to filter by. Only offices fulfilling one 298 * [roles] - A list of office roles to filter by. Only offices fulfilling one
277 * of these roles will be returned. Divisions that don't contain a matching 299 * of these roles will be returned. Divisions that don't contain a matching
278 * office will not be returned. 300 * office will not be returned.
279 * 301 *
280 * Completes with a [RepresentativeInfoData]. 302 * Completes with a [RepresentativeInfoData].
281 * 303 *
282 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 304 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
283 * error. 305 * error.
284 * 306 *
285 * If the used [http.Client] completes with an error when making a REST call, 307 * If the used [http.Client] completes with an error when making a REST call,
286 * this method will complete with the same error. 308 * this method will complete with the same error.
287 */ 309 */
288 async.Future<RepresentativeInfoData> representativeInfoByDivision(core.String ocdId, {core.List<core.String> levels, core.bool recursive, core.List<core.Strin g> roles}) { 310 async.Future<RepresentativeInfoData> representativeInfoByDivision(DivisionRepr esentativeInfoRequest request, core.String ocdId, {core.List<core.String> levels , core.bool recursive, core.List<core.String> roles}) {
289 var _url = null; 311 var _url = null;
290 var _queryParams = new core.Map(); 312 var _queryParams = new core.Map();
291 var _uploadMedia = null; 313 var _uploadMedia = null;
292 var _uploadOptions = null; 314 var _uploadOptions = null;
293 var _downloadOptions = commons.DownloadOptions.Metadata; 315 var _downloadOptions = commons.DownloadOptions.Metadata;
294 var _body = null; 316 var _body = null;
295 317
318 if (request != null) {
319 _body = convert.JSON.encode((request).toJson());
320 }
296 if (ocdId == null) { 321 if (ocdId == null) {
297 throw new core.ArgumentError("Parameter ocdId is required."); 322 throw new core.ArgumentError("Parameter ocdId is required.");
298 } 323 }
299 if (levels != null) { 324 if (levels != null) {
300 _queryParams["levels"] = levels; 325 _queryParams["levels"] = levels;
301 } 326 }
302 if (recursive != null) { 327 if (recursive != null) {
303 _queryParams["recursive"] = ["${recursive}"]; 328 _queryParams["recursive"] = ["${recursive}"];
304 } 329 }
305 if (roles != null) { 330 if (roles != null) {
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 } 560 }
536 561
537 /** Information about a candidate running for elected office. */ 562 /** Information about a candidate running for elected office. */
538 class Candidate { 563 class Candidate {
539 /** The URL for the candidate's campaign web site. */ 564 /** The URL for the candidate's campaign web site. */
540 core.String candidateUrl; 565 core.String candidateUrl;
541 /** A list of known (social) media channels for this candidate. */ 566 /** A list of known (social) media channels for this candidate. */
542 core.List<Channel> channels; 567 core.List<Channel> channels;
543 /** The email address for the candidate's campaign. */ 568 /** The email address for the candidate's campaign. */
544 core.String email; 569 core.String email;
545 /** The candidate's name. */ 570 /**
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
573 * candidate at the bottom of the ticket. e.g. "Mitt Romney / Paul Ryan"
574 */
546 core.String name; 575 core.String name;
547 /** The order the candidate appears on the ballot for this contest. */ 576 /** The order the candidate appears on the ballot for this contest. */
548 core.String orderOnBallot; 577 core.String orderOnBallot;
549 /** The full name of the party the candidate is a member of. */ 578 /** The full name of the party the candidate is a member of. */
550 core.String party; 579 core.String party;
551 /** The voice phone number for the candidate's campaign office. */ 580 /** The voice phone number for the candidate's campaign office. */
552 core.String phone; 581 core.String phone;
553 /** A URL for a photo of the candidate. */ 582 /** A URL for a photo of the candidate. */
554 core.String photoUrl; 583 core.String photoUrl;
555 584
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 if (special != null) { 937 if (special != null) {
909 _json["special"] = special; 938 _json["special"] = special;
910 } 939 }
911 if (type != null) { 940 if (type != null) {
912 _json["type"] = type; 941 _json["type"] = type;
913 } 942 }
914 return _json; 943 return _json;
915 } 944 }
916 } 945 }
917 946
947 class ContextParams {
948 core.String clientProfile;
949
950 ContextParams();
951
952 ContextParams.fromJson(core.Map _json) {
953 if (_json.containsKey("clientProfile")) {
954 clientProfile = _json["clientProfile"];
955 }
956 }
957
958 core.Map toJson() {
959 var _json = new core.Map();
960 if (clientProfile != null) {
961 _json["clientProfile"] = clientProfile;
962 }
963 return _json;
964 }
965 }
966
967 /** A request to look up representative information for a single division. */
968 class DivisionRepresentativeInfoRequest {
969 ContextParams contextParams;
970
971 DivisionRepresentativeInfoRequest();
972
973 DivisionRepresentativeInfoRequest.fromJson(core.Map _json) {
974 if (_json.containsKey("contextParams")) {
975 contextParams = new ContextParams.fromJson(_json["contextParams"]);
976 }
977 }
978
979 core.Map toJson() {
980 var _json = new core.Map();
981 if (contextParams != null) {
982 _json["contextParams"] = (contextParams).toJson();
983 }
984 return _json;
985 }
986 }
987
988 /** A search request for political geographies. */
989 class DivisionSearchRequest {
990 ContextParams contextParams;
991
992 DivisionSearchRequest();
993
994 DivisionSearchRequest.fromJson(core.Map _json) {
995 if (_json.containsKey("contextParams")) {
996 contextParams = new ContextParams.fromJson(_json["contextParams"]);
997 }
998 }
999
1000 core.Map toJson() {
1001 var _json = new core.Map();
1002 if (contextParams != null) {
1003 _json["contextParams"] = (contextParams).toJson();
1004 }
1005 return _json;
1006 }
1007 }
1008
918 /** The result of a division search query. */ 1009 /** The result of a division search query. */
919 class DivisionSearchResponse { 1010 class DivisionSearchResponse {
920 /** 1011 /**
921 * Identifies what kind of resource this is. Value: the fixed string 1012 * Identifies what kind of resource this is. Value: the fixed string
922 * "civicinfo#divisionSearchResponse". 1013 * "civicinfo#divisionSearchResponse".
923 */ 1014 */
924 core.String kind; 1015 core.String kind;
925 core.List<DivisionSearchResult> results; 1016 core.List<DivisionSearchResult> results;
926 1017
927 DivisionSearchResponse(); 1018 DivisionSearchResponse();
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 if (officePhoneNumber != null) { 1184 if (officePhoneNumber != null) {
1094 _json["officePhoneNumber"] = officePhoneNumber; 1185 _json["officePhoneNumber"] = officePhoneNumber;
1095 } 1186 }
1096 if (title != null) { 1187 if (title != null) {
1097 _json["title"] = title; 1188 _json["title"] = title;
1098 } 1189 }
1099 return _json; 1190 return _json;
1100 } 1191 }
1101 } 1192 }
1102 1193
1194 class ElectionsQueryRequest {
1195 ContextParams contextParams;
1196
1197 ElectionsQueryRequest();
1198
1199 ElectionsQueryRequest.fromJson(core.Map _json) {
1200 if (_json.containsKey("contextParams")) {
1201 contextParams = new ContextParams.fromJson(_json["contextParams"]);
1202 }
1203 }
1204
1205 core.Map toJson() {
1206 var _json = new core.Map();
1207 if (contextParams != null) {
1208 _json["contextParams"] = (contextParams).toJson();
1209 }
1210 return _json;
1211 }
1212 }
1213
1103 /** The list of elections available for this version of the API. */ 1214 /** The list of elections available for this version of the API. */
1104 class ElectionsQueryResponse { 1215 class ElectionsQueryResponse {
1105 /** A list of available elections */ 1216 /** A list of available elections */
1106 core.List<Election> elections; 1217 core.List<Election> elections;
1107 /** 1218 /**
1108 * Identifies what kind of resource this is. Value: the fixed string 1219 * Identifies what kind of resource this is. Value: the fixed string
1109 * "civicinfo#electionsQueryResponse". 1220 * "civicinfo#electionsQueryResponse".
1110 */ 1221 */
1111 core.String kind; 1222 core.String kind;
1112 1223
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 if (startDate != null) { 1612 if (startDate != null) {
1502 _json["startDate"] = startDate; 1613 _json["startDate"] = startDate;
1503 } 1614 }
1504 if (voterServices != null) { 1615 if (voterServices != null) {
1505 _json["voterServices"] = voterServices; 1616 _json["voterServices"] = voterServices;
1506 } 1617 }
1507 return _json; 1618 return _json;
1508 } 1619 }
1509 } 1620 }
1510 1621
1622 class PostalAddress {
1623 core.List<core.String> addressLines;
1624 core.String administrativeAreaName;
1625 core.String countryName;
1626 core.String countryNameCode;
1627 core.String dependentLocalityName;
1628 core.String dependentThoroughfareLeadingType;
1629 core.String dependentThoroughfareName;
1630 core.String dependentThoroughfarePostDirection;
1631 core.String dependentThoroughfarePreDirection;
1632 core.String dependentThoroughfareTrailingType;
1633 core.String dependentThoroughfaresConnector;
1634 core.String dependentThoroughfaresIndicator;
1635 core.String dependentThoroughfaresType;
1636 core.String firmName;
1637 core.bool isDisputed;
1638 core.String languageCode;
1639 core.String localityName;
1640 core.String postBoxNumber;
1641 core.String postalCodeNumber;
1642 core.String postalCodeNumberExtension;
1643 core.String premiseName;
1644 core.String recipientName;
1645 core.String sortingCode;
1646 core.String subAdministrativeAreaName;
1647 core.String subPremiseName;
1648 core.String thoroughfareLeadingType;
1649 core.String thoroughfareName;
1650 core.String thoroughfareNumber;
1651 core.String thoroughfarePostDirection;
1652 core.String thoroughfarePreDirection;
1653 core.String thoroughfareTrailingType;
1654
1655 PostalAddress();
1656
1657 PostalAddress.fromJson(core.Map _json) {
1658 if (_json.containsKey("addressLines")) {
1659 addressLines = _json["addressLines"];
1660 }
1661 if (_json.containsKey("administrativeAreaName")) {
1662 administrativeAreaName = _json["administrativeAreaName"];
1663 }
1664 if (_json.containsKey("countryName")) {
1665 countryName = _json["countryName"];
1666 }
1667 if (_json.containsKey("countryNameCode")) {
1668 countryNameCode = _json["countryNameCode"];
1669 }
1670 if (_json.containsKey("dependentLocalityName")) {
1671 dependentLocalityName = _json["dependentLocalityName"];
1672 }
1673 if (_json.containsKey("dependentThoroughfareLeadingType")) {
1674 dependentThoroughfareLeadingType = _json["dependentThoroughfareLeadingType "];
1675 }
1676 if (_json.containsKey("dependentThoroughfareName")) {
1677 dependentThoroughfareName = _json["dependentThoroughfareName"];
1678 }
1679 if (_json.containsKey("dependentThoroughfarePostDirection")) {
1680 dependentThoroughfarePostDirection = _json["dependentThoroughfarePostDirec tion"];
1681 }
1682 if (_json.containsKey("dependentThoroughfarePreDirection")) {
1683 dependentThoroughfarePreDirection = _json["dependentThoroughfarePreDirecti on"];
1684 }
1685 if (_json.containsKey("dependentThoroughfareTrailingType")) {
1686 dependentThoroughfareTrailingType = _json["dependentThoroughfareTrailingTy pe"];
1687 }
1688 if (_json.containsKey("dependentThoroughfaresConnector")) {
1689 dependentThoroughfaresConnector = _json["dependentThoroughfaresConnector"] ;
1690 }
1691 if (_json.containsKey("dependentThoroughfaresIndicator")) {
1692 dependentThoroughfaresIndicator = _json["dependentThoroughfaresIndicator"] ;
1693 }
1694 if (_json.containsKey("dependentThoroughfaresType")) {
1695 dependentThoroughfaresType = _json["dependentThoroughfaresType"];
1696 }
1697 if (_json.containsKey("firmName")) {
1698 firmName = _json["firmName"];
1699 }
1700 if (_json.containsKey("isDisputed")) {
1701 isDisputed = _json["isDisputed"];
1702 }
1703 if (_json.containsKey("languageCode")) {
1704 languageCode = _json["languageCode"];
1705 }
1706 if (_json.containsKey("localityName")) {
1707 localityName = _json["localityName"];
1708 }
1709 if (_json.containsKey("postBoxNumber")) {
1710 postBoxNumber = _json["postBoxNumber"];
1711 }
1712 if (_json.containsKey("postalCodeNumber")) {
1713 postalCodeNumber = _json["postalCodeNumber"];
1714 }
1715 if (_json.containsKey("postalCodeNumberExtension")) {
1716 postalCodeNumberExtension = _json["postalCodeNumberExtension"];
1717 }
1718 if (_json.containsKey("premiseName")) {
1719 premiseName = _json["premiseName"];
1720 }
1721 if (_json.containsKey("recipientName")) {
1722 recipientName = _json["recipientName"];
1723 }
1724 if (_json.containsKey("sortingCode")) {
1725 sortingCode = _json["sortingCode"];
1726 }
1727 if (_json.containsKey("subAdministrativeAreaName")) {
1728 subAdministrativeAreaName = _json["subAdministrativeAreaName"];
1729 }
1730 if (_json.containsKey("subPremiseName")) {
1731 subPremiseName = _json["subPremiseName"];
1732 }
1733 if (_json.containsKey("thoroughfareLeadingType")) {
1734 thoroughfareLeadingType = _json["thoroughfareLeadingType"];
1735 }
1736 if (_json.containsKey("thoroughfareName")) {
1737 thoroughfareName = _json["thoroughfareName"];
1738 }
1739 if (_json.containsKey("thoroughfareNumber")) {
1740 thoroughfareNumber = _json["thoroughfareNumber"];
1741 }
1742 if (_json.containsKey("thoroughfarePostDirection")) {
1743 thoroughfarePostDirection = _json["thoroughfarePostDirection"];
1744 }
1745 if (_json.containsKey("thoroughfarePreDirection")) {
1746 thoroughfarePreDirection = _json["thoroughfarePreDirection"];
1747 }
1748 if (_json.containsKey("thoroughfareTrailingType")) {
1749 thoroughfareTrailingType = _json["thoroughfareTrailingType"];
1750 }
1751 }
1752
1753 core.Map toJson() {
1754 var _json = new core.Map();
1755 if (addressLines != null) {
1756 _json["addressLines"] = addressLines;
1757 }
1758 if (administrativeAreaName != null) {
1759 _json["administrativeAreaName"] = administrativeAreaName;
1760 }
1761 if (countryName != null) {
1762 _json["countryName"] = countryName;
1763 }
1764 if (countryNameCode != null) {
1765 _json["countryNameCode"] = countryNameCode;
1766 }
1767 if (dependentLocalityName != null) {
1768 _json["dependentLocalityName"] = dependentLocalityName;
1769 }
1770 if (dependentThoroughfareLeadingType != null) {
1771 _json["dependentThoroughfareLeadingType"] = dependentThoroughfareLeadingTy pe;
1772 }
1773 if (dependentThoroughfareName != null) {
1774 _json["dependentThoroughfareName"] = dependentThoroughfareName;
1775 }
1776 if (dependentThoroughfarePostDirection != null) {
1777 _json["dependentThoroughfarePostDirection"] = dependentThoroughfarePostDir ection;
1778 }
1779 if (dependentThoroughfarePreDirection != null) {
1780 _json["dependentThoroughfarePreDirection"] = dependentThoroughfarePreDirec tion;
1781 }
1782 if (dependentThoroughfareTrailingType != null) {
1783 _json["dependentThoroughfareTrailingType"] = dependentThoroughfareTrailing Type;
1784 }
1785 if (dependentThoroughfaresConnector != null) {
1786 _json["dependentThoroughfaresConnector"] = dependentThoroughfaresConnector ;
1787 }
1788 if (dependentThoroughfaresIndicator != null) {
1789 _json["dependentThoroughfaresIndicator"] = dependentThoroughfaresIndicator ;
1790 }
1791 if (dependentThoroughfaresType != null) {
1792 _json["dependentThoroughfaresType"] = dependentThoroughfaresType;
1793 }
1794 if (firmName != null) {
1795 _json["firmName"] = firmName;
1796 }
1797 if (isDisputed != null) {
1798 _json["isDisputed"] = isDisputed;
1799 }
1800 if (languageCode != null) {
1801 _json["languageCode"] = languageCode;
1802 }
1803 if (localityName != null) {
1804 _json["localityName"] = localityName;
1805 }
1806 if (postBoxNumber != null) {
1807 _json["postBoxNumber"] = postBoxNumber;
1808 }
1809 if (postalCodeNumber != null) {
1810 _json["postalCodeNumber"] = postalCodeNumber;
1811 }
1812 if (postalCodeNumberExtension != null) {
1813 _json["postalCodeNumberExtension"] = postalCodeNumberExtension;
1814 }
1815 if (premiseName != null) {
1816 _json["premiseName"] = premiseName;
1817 }
1818 if (recipientName != null) {
1819 _json["recipientName"] = recipientName;
1820 }
1821 if (sortingCode != null) {
1822 _json["sortingCode"] = sortingCode;
1823 }
1824 if (subAdministrativeAreaName != null) {
1825 _json["subAdministrativeAreaName"] = subAdministrativeAreaName;
1826 }
1827 if (subPremiseName != null) {
1828 _json["subPremiseName"] = subPremiseName;
1829 }
1830 if (thoroughfareLeadingType != null) {
1831 _json["thoroughfareLeadingType"] = thoroughfareLeadingType;
1832 }
1833 if (thoroughfareName != null) {
1834 _json["thoroughfareName"] = thoroughfareName;
1835 }
1836 if (thoroughfareNumber != null) {
1837 _json["thoroughfareNumber"] = thoroughfareNumber;
1838 }
1839 if (thoroughfarePostDirection != null) {
1840 _json["thoroughfarePostDirection"] = thoroughfarePostDirection;
1841 }
1842 if (thoroughfarePreDirection != null) {
1843 _json["thoroughfarePreDirection"] = thoroughfarePreDirection;
1844 }
1845 if (thoroughfareTrailingType != null) {
1846 _json["thoroughfareTrailingType"] = thoroughfareTrailingType;
1847 }
1848 return _json;
1849 }
1850 }
1851
1511 class RepresentativeInfoData { 1852 class RepresentativeInfoData {
1512 /** Political geographic divisions that contain the requested address. */ 1853 /** Political geographic divisions that contain the requested address. */
1513 core.Map<core.String, GeographicDivision> divisions; 1854 core.Map<core.String, GeographicDivision> divisions;
1514 /** 1855 /**
1515 * Elected offices referenced by the divisions listed above. Will only be 1856 * Elected offices referenced by the divisions listed above. Will only be
1516 * present if includeOffices was true in the request. 1857 * present if includeOffices was true in the request.
1517 */ 1858 */
1518 core.List<Office> offices; 1859 core.List<Office> offices;
1519 /** 1860 /**
1520 * Officials holding the offices listed above. Will only be present if 1861 * Officials holding the offices listed above. Will only be present if
(...skipping 23 matching lines...) Expand all
1544 if (offices != null) { 1885 if (offices != null) {
1545 _json["offices"] = offices.map((value) => (value).toJson()).toList(); 1886 _json["offices"] = offices.map((value) => (value).toJson()).toList();
1546 } 1887 }
1547 if (officials != null) { 1888 if (officials != null) {
1548 _json["officials"] = officials.map((value) => (value).toJson()).toList(); 1889 _json["officials"] = officials.map((value) => (value).toJson()).toList();
1549 } 1890 }
1550 return _json; 1891 return _json;
1551 } 1892 }
1552 } 1893 }
1553 1894
1895 /**
1896 * A request for political geography and representative information for an
1897 * address.
1898 */
1899 class RepresentativeInfoRequest {
1900 ContextParams contextParams;
1901
1902 RepresentativeInfoRequest();
1903
1904 RepresentativeInfoRequest.fromJson(core.Map _json) {
1905 if (_json.containsKey("contextParams")) {
1906 contextParams = new ContextParams.fromJson(_json["contextParams"]);
1907 }
1908 }
1909
1910 core.Map toJson() {
1911 var _json = new core.Map();
1912 if (contextParams != null) {
1913 _json["contextParams"] = (contextParams).toJson();
1914 }
1915 return _json;
1916 }
1917 }
1918
1554 /** The result of a representative info lookup query. */ 1919 /** The result of a representative info lookup query. */
1555 class RepresentativeInfoResponse { 1920 class RepresentativeInfoResponse {
1556 /** Political geographic divisions that contain the requested address. */ 1921 /** Political geographic divisions that contain the requested address. */
1557 core.Map<core.String, GeographicDivision> divisions; 1922 core.Map<core.String, GeographicDivision> divisions;
1558 /** 1923 /**
1559 * Identifies what kind of resource this is. Value: the fixed string 1924 * Identifies what kind of resource this is. Value: the fixed string
1560 * "civicinfo#representativeInfoResponse". 1925 * "civicinfo#representativeInfoResponse".
1561 */ 1926 */
1562 core.String kind; 1927 core.String kind;
1563 /** The normalized version of the requested address */ 1928 /** The normalized version of the requested address */
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 if (name != null) { 2074 if (name != null) {
1710 _json["name"] = name; 2075 _json["name"] = name;
1711 } 2076 }
1712 if (official != null) { 2077 if (official != null) {
1713 _json["official"] = official; 2078 _json["official"] = official;
1714 } 2079 }
1715 return _json; 2080 return _json;
1716 } 2081 }
1717 } 2082 }
1718 2083
2084 /** A request for information about a voter. */
2085 class VoterInfoRequest {
2086 ContextParams contextParams;
2087 VoterInfoSegmentResult voterInfoSegmentResult;
2088
2089 VoterInfoRequest();
2090
2091 VoterInfoRequest.fromJson(core.Map _json) {
2092 if (_json.containsKey("contextParams")) {
2093 contextParams = new ContextParams.fromJson(_json["contextParams"]);
2094 }
2095 if (_json.containsKey("voterInfoSegmentResult")) {
2096 voterInfoSegmentResult = new VoterInfoSegmentResult.fromJson(_json["voterI nfoSegmentResult"]);
2097 }
2098 }
2099
2100 core.Map toJson() {
2101 var _json = new core.Map();
2102 if (contextParams != null) {
2103 _json["contextParams"] = (contextParams).toJson();
2104 }
2105 if (voterInfoSegmentResult != null) {
2106 _json["voterInfoSegmentResult"] = (voterInfoSegmentResult).toJson();
2107 }
2108 return _json;
2109 }
2110 }
2111
1719 /** The result of a voter info lookup query. */ 2112 /** The result of a voter info lookup query. */
1720 class VoterInfoResponse { 2113 class VoterInfoResponse {
1721 /** Contests that will appear on the voter's ballot. */ 2114 /** Contests that will appear on the voter's ballot. */
1722 core.List<Contest> contests; 2115 core.List<Contest> contests;
1723 /** 2116 /**
1724 * Locations where a voter is eligible to drop off a completed ballot. The 2117 * Locations where a voter is eligible to drop off a completed ballot. The
1725 * voter must have received and completed a ballot prior to arriving at the 2118 * voter must have received and completed a ballot prior to arriving at the
1726 * location. The location may not have ballots available on the premises. 2119 * location. The location may not have ballots available on the premises.
1727 * These locations could be open on or before election day as indicated in the 2120 * These locations could be open on or before election day as indicated in the
1728 * pollingHours field. 2121 * pollingHours field.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 } 2223 }
1831 if (precinctId != null) { 2224 if (precinctId != null) {
1832 _json["precinctId"] = precinctId; 2225 _json["precinctId"] = precinctId;
1833 } 2226 }
1834 if (state != null) { 2227 if (state != null) {
1835 _json["state"] = state.map((value) => (value).toJson()).toList(); 2228 _json["state"] = state.map((value) => (value).toJson()).toList();
1836 } 2229 }
1837 return _json; 2230 return _json;
1838 } 2231 }
1839 } 2232 }
2233
2234 class VoterInfoSegmentResult {
2235 core.String generatedMillis;
2236 PostalAddress postalAddress;
2237 VoterInfoRequest request;
2238 VoterInfoResponse response;
2239
2240 VoterInfoSegmentResult();
2241
2242 VoterInfoSegmentResult.fromJson(core.Map _json) {
2243 if (_json.containsKey("generatedMillis")) {
2244 generatedMillis = _json["generatedMillis"];
2245 }
2246 if (_json.containsKey("postalAddress")) {
2247 postalAddress = new PostalAddress.fromJson(_json["postalAddress"]);
2248 }
2249 if (_json.containsKey("request")) {
2250 request = new VoterInfoRequest.fromJson(_json["request"]);
2251 }
2252 if (_json.containsKey("response")) {
2253 response = new VoterInfoResponse.fromJson(_json["response"]);
2254 }
2255 }
2256
2257 core.Map toJson() {
2258 var _json = new core.Map();
2259 if (generatedMillis != null) {
2260 _json["generatedMillis"] = generatedMillis;
2261 }
2262 if (postalAddress != null) {
2263 _json["postalAddress"] = (postalAddress).toJson();
2264 }
2265 if (request != null) {
2266 _json["request"] = (request).toJson();
2267 }
2268 if (response != null) {
2269 _json["response"] = (response).toJson();
2270 }
2271 return _json;
2272 }
2273 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/books/v1.dart ('k') | generated/googleapis/lib/classroom/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698