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

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

Issue 2281923002: Api-roll 41: 2016-08-26 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 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/bigquery/v2.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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 * 131 *
132 * [address] - The registered address of the voter to look up. 132 * [address] - The registered address of the voter to look up.
133 * 133 *
134 * [electionId] - The unique ID of the election to look up. A list of election 134 * [electionId] - The unique ID of the election to look up. A list of election
135 * IDs can be obtained at 135 * IDs can be obtained at
136 * https://www.googleapis.com/civicinfo/{version}/elections 136 * https://www.googleapis.com/civicinfo/{version}/elections
137 * 137 *
138 * [officialOnly] - If set to true, only data from official state sources will 138 * [officialOnly] - If set to true, only data from official state sources will
139 * be returned. 139 * be returned.
140 * 140 *
141 * [returnAllAvailableData] - If set to true, the query will return the
142 * success codeand include any partial information when it is unable to
143 * determine a matching address or unable to determine the election for
144 * electionId=0 queries.
145 *
141 * Completes with a [VoterInfoResponse]. 146 * Completes with a [VoterInfoResponse].
142 * 147 *
143 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 148 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
144 * error. 149 * error.
145 * 150 *
146 * If the used [http.Client] completes with an error when making a REST call, 151 * If the used [http.Client] completes with an error when making a REST call,
147 * this method will complete with the same error. 152 * this method will complete with the same error.
148 */ 153 */
149 async.Future<VoterInfoResponse> voterInfoQuery(core.String address, {core.Stri ng electionId, core.bool officialOnly}) { 154 async.Future<VoterInfoResponse> voterInfoQuery(core.String address, {core.Stri ng electionId, core.bool officialOnly, core.bool returnAllAvailableData}) {
150 var _url = null; 155 var _url = null;
151 var _queryParams = new core.Map(); 156 var _queryParams = new core.Map();
152 var _uploadMedia = null; 157 var _uploadMedia = null;
153 var _uploadOptions = null; 158 var _uploadOptions = null;
154 var _downloadOptions = commons.DownloadOptions.Metadata; 159 var _downloadOptions = commons.DownloadOptions.Metadata;
155 var _body = null; 160 var _body = null;
156 161
157 if (address == null) { 162 if (address == null) {
158 throw new core.ArgumentError("Parameter address is required."); 163 throw new core.ArgumentError("Parameter address is required.");
159 } 164 }
160 _queryParams["address"] = [address]; 165 _queryParams["address"] = [address];
161 if (electionId != null) { 166 if (electionId != null) {
162 _queryParams["electionId"] = [electionId]; 167 _queryParams["electionId"] = [electionId];
163 } 168 }
164 if (officialOnly != null) { 169 if (officialOnly != null) {
165 _queryParams["officialOnly"] = ["${officialOnly}"]; 170 _queryParams["officialOnly"] = ["${officialOnly}"];
166 } 171 }
172 if (returnAllAvailableData != null) {
173 _queryParams["returnAllAvailableData"] = ["${returnAllAvailableData}"];
174 }
167 175
168 _url = 'voterinfo'; 176 _url = 'voterinfo';
169 177
170 var _response = _requester.request(_url, 178 var _response = _requester.request(_url,
171 "GET", 179 "GET",
172 body: _body, 180 body: _body,
173 queryParams: _queryParams, 181 queryParams: _queryParams,
174 uploadOptions: _uploadOptions, 182 uploadOptions: _uploadOptions,
175 uploadMedia: _uploadMedia, 183 uploadMedia: _uploadMedia,
176 downloadOptions: _downloadOptions); 184 downloadOptions: _downloadOptions);
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 core.String numberElected; 681 core.String numberElected;
674 /** The number of candidates that a voter may vote for in this contest. */ 682 /** The number of candidates that a voter may vote for in this contest. */
675 core.String numberVotingFor; 683 core.String numberVotingFor;
676 /** The name of the office for this contest. */ 684 /** The name of the office for this contest. */
677 core.String office; 685 core.String office;
678 /** If this is a partisan election, the name of the party it is for. */ 686 /** If this is a partisan election, the name of the party it is for. */
679 core.String primaryParty; 687 core.String primaryParty;
680 /** 688 /**
681 * The set of ballot responses for the referendum. A ballot response 689 * The set of ballot responses for the referendum. A ballot response
682 * represents a line on the ballot. Common examples might include "yes" or 690 * represents a line on the ballot. Common examples might include "yes" or
683 * "no" for referenda, or a judge's name for a retention contest. This field 691 * "no" for referenda. This field is only populated for contests of type
684 * is only populated for contests of type 'Referendum'. 692 * 'Referendum'.
685 */ 693 */
686 core.List<core.String> referendumBallotResponses; 694 core.List<core.String> referendumBallotResponses;
687 /** 695 /**
688 * Specifies a short summary of the referendum that is typically on the ballot 696 * Specifies a short summary of the referendum that is typically on the ballot
689 * below the title but above the text. This field is only populated for 697 * below the title but above the text. This field is only populated for
690 * contests of type 'Referendum'. 698 * contests of type 'Referendum'.
691 */ 699 */
692 core.String referendumBrief; 700 core.String referendumBrief;
693 /** 701 /**
694 * A statement in opposition to the referendum. It does not necessarily appear 702 * A statement in opposition to the referendum. It does not necessarily appear
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 */ 749 */
742 core.List<Source> sources; 750 core.List<Source> sources;
743 /** 751 /**
744 * "Yes" or "No" depending on whether this a contest being held outside the 752 * "Yes" or "No" depending on whether this a contest being held outside the
745 * normal election cycle. 753 * normal election cycle.
746 */ 754 */
747 core.String special; 755 core.String special;
748 /** 756 /**
749 * The type of contest. Usually this will be 'General', 'Primary', or 757 * The type of contest. Usually this will be 'General', 'Primary', or
750 * 'Run-off' for contests with candidates. For referenda this will be 758 * 'Run-off' for contests with candidates. For referenda this will be
751 * 'Referendum'. 759 * 'Referendum'. For Retention contests this will typically be 'Retention'.
752 */ 760 */
753 core.String type; 761 core.String type;
754 762
755 Contest(); 763 Contest();
756 764
757 Contest.fromJson(core.Map _json) { 765 Contest.fromJson(core.Map _json) {
758 if (_json.containsKey("ballotPlacement")) { 766 if (_json.containsKey("ballotPlacement")) {
759 ballotPlacement = _json["ballotPlacement"]; 767 ballotPlacement = _json["ballotPlacement"];
760 } 768 }
761 if (_json.containsKey("candidates")) { 769 if (_json.containsKey("candidates")) {
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 } 1133 }
1126 } 1134 }
1127 1135
1128 /** Describes the geographic scope of a contest. */ 1136 /** Describes the geographic scope of a contest. */
1129 class ElectoralDistrict { 1137 class ElectoralDistrict {
1130 /** 1138 /**
1131 * An identifier for this district, relative to its scope. For example, the 1139 * An identifier for this district, relative to its scope. For example, the
1132 * 34th State Senate district would have id "34" and a scope of stateUpper. 1140 * 34th State Senate district would have id "34" and a scope of stateUpper.
1133 */ 1141 */
1134 core.String id; 1142 core.String id;
1143 core.String kgForeignKey;
1135 /** The name of the district. */ 1144 /** The name of the district. */
1136 core.String name; 1145 core.String name;
1137 /** 1146 /**
1138 * The geographic scope of this district. If unspecified the district's 1147 * The geographic scope of this district. If unspecified the district's
1139 * geography is not known. One of: national, statewide, congressional, 1148 * geography is not known. One of: national, statewide, congressional,
1140 * stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide, 1149 * stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide,
1141 * township, countyCouncil, cityCouncil, ward, special 1150 * township, countyCouncil, cityCouncil, ward, special
1142 */ 1151 */
1143 core.String scope; 1152 core.String scope;
1144 1153
1145 ElectoralDistrict(); 1154 ElectoralDistrict();
1146 1155
1147 ElectoralDistrict.fromJson(core.Map _json) { 1156 ElectoralDistrict.fromJson(core.Map _json) {
1148 if (_json.containsKey("id")) { 1157 if (_json.containsKey("id")) {
1149 id = _json["id"]; 1158 id = _json["id"];
1150 } 1159 }
1160 if (_json.containsKey("kgForeignKey")) {
1161 kgForeignKey = _json["kgForeignKey"];
1162 }
1151 if (_json.containsKey("name")) { 1163 if (_json.containsKey("name")) {
1152 name = _json["name"]; 1164 name = _json["name"];
1153 } 1165 }
1154 if (_json.containsKey("scope")) { 1166 if (_json.containsKey("scope")) {
1155 scope = _json["scope"]; 1167 scope = _json["scope"];
1156 } 1168 }
1157 } 1169 }
1158 1170
1159 core.Map toJson() { 1171 core.Map toJson() {
1160 var _json = new core.Map(); 1172 var _json = new core.Map();
1161 if (id != null) { 1173 if (id != null) {
1162 _json["id"] = id; 1174 _json["id"] = id;
1163 } 1175 }
1176 if (kgForeignKey != null) {
1177 _json["kgForeignKey"] = kgForeignKey;
1178 }
1164 if (name != null) { 1179 if (name != null) {
1165 _json["name"] = name; 1180 _json["name"] = name;
1166 } 1181 }
1167 if (scope != null) { 1182 if (scope != null) {
1168 _json["scope"] = scope; 1183 _json["scope"] = scope;
1169 } 1184 }
1170 return _json; 1185 return _json;
1171 } 1186 }
1172 } 1187 }
1173 1188
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 } 1830 }
1816 if (precinctId != null) { 1831 if (precinctId != null) {
1817 _json["precinctId"] = precinctId; 1832 _json["precinctId"] = precinctId;
1818 } 1833 }
1819 if (state != null) { 1834 if (state != null) {
1820 _json["state"] = state.map((value) => (value).toJson()).toList(); 1835 _json["state"] = state.map((value) => (value).toJson()).toList();
1821 } 1836 }
1822 return _json; 1837 return _json;
1823 } 1838 }
1824 } 1839 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/bigquery/v2.dart ('k') | generated/googleapis/lib/classroom/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698