OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.books.v1; | 3 library googleapis.books.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 return _response.then((data) => null); | 1281 return _response.then((data) => null); |
1282 } | 1282 } |
1283 | 1283 |
1284 /** | 1284 /** |
1285 * Inserts a new annotation. | 1285 * Inserts a new annotation. |
1286 * | 1286 * |
1287 * [request] - The metadata request object. | 1287 * [request] - The metadata request object. |
1288 * | 1288 * |
1289 * Request parameters: | 1289 * Request parameters: |
1290 * | 1290 * |
| 1291 * [annotationId] - The ID for the annotation to insert. |
| 1292 * |
1291 * [country] - ISO-3166-1 code to override the IP-based location. | 1293 * [country] - ISO-3166-1 code to override the IP-based location. |
1292 * | 1294 * |
1293 * [showOnlySummaryInResponse] - Requests that only the summary of the | 1295 * [showOnlySummaryInResponse] - Requests that only the summary of the |
1294 * specified layer be provided in the response. | 1296 * specified layer be provided in the response. |
1295 * | 1297 * |
1296 * [source] - String to identify the originator of this request. | 1298 * [source] - String to identify the originator of this request. |
1297 * | 1299 * |
1298 * Completes with a [Annotation]. | 1300 * Completes with a [Annotation]. |
1299 * | 1301 * |
1300 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1302 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1301 * error. | 1303 * error. |
1302 * | 1304 * |
1303 * If the used [http.Client] completes with an error when making a REST call, | 1305 * If the used [http.Client] completes with an error when making a REST call, |
1304 * this method will complete with the same error. | 1306 * this method will complete with the same error. |
1305 */ | 1307 */ |
1306 async.Future<Annotation> insert(Annotation request, {core.String country, core
.bool showOnlySummaryInResponse, core.String source}) { | 1308 async.Future<Annotation> insert(Annotation request, {core.String annotationId,
core.String country, core.bool showOnlySummaryInResponse, core.String source})
{ |
1307 var _url = null; | 1309 var _url = null; |
1308 var _queryParams = new core.Map(); | 1310 var _queryParams = new core.Map(); |
1309 var _uploadMedia = null; | 1311 var _uploadMedia = null; |
1310 var _uploadOptions = null; | 1312 var _uploadOptions = null; |
1311 var _downloadOptions = commons.DownloadOptions.Metadata; | 1313 var _downloadOptions = commons.DownloadOptions.Metadata; |
1312 var _body = null; | 1314 var _body = null; |
1313 | 1315 |
1314 if (request != null) { | 1316 if (request != null) { |
1315 _body = convert.JSON.encode((request).toJson()); | 1317 _body = convert.JSON.encode((request).toJson()); |
1316 } | 1318 } |
| 1319 if (annotationId != null) { |
| 1320 _queryParams["annotationId"] = [annotationId]; |
| 1321 } |
1317 if (country != null) { | 1322 if (country != null) { |
1318 _queryParams["country"] = [country]; | 1323 _queryParams["country"] = [country]; |
1319 } | 1324 } |
1320 if (showOnlySummaryInResponse != null) { | 1325 if (showOnlySummaryInResponse != null) { |
1321 _queryParams["showOnlySummaryInResponse"] = ["${showOnlySummaryInResponse}
"]; | 1326 _queryParams["showOnlySummaryInResponse"] = ["${showOnlySummaryInResponse}
"]; |
1322 } | 1327 } |
1323 if (source != null) { | 1328 if (source != null) { |
1324 _queryParams["source"] = [source]; | 1329 _queryParams["source"] = [source]; |
1325 } | 1330 } |
1326 | 1331 |
(...skipping 4936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6263 | 6268 |
6264 core.Map toJson() { | 6269 core.Map toJson() { |
6265 var _json = new core.Map(); | 6270 var _json = new core.Map(); |
6266 if (optedState != null) { | 6271 if (optedState != null) { |
6267 _json["opted_state"] = optedState; | 6272 _json["opted_state"] = optedState; |
6268 } | 6273 } |
6269 return _json; | 6274 return _json; |
6270 } | 6275 } |
6271 } | 6276 } |
6272 | 6277 |
| 6278 class UsersettingsNotificationRewardExpirations { |
| 6279 core.String optedState; |
| 6280 |
| 6281 UsersettingsNotificationRewardExpirations(); |
| 6282 |
| 6283 UsersettingsNotificationRewardExpirations.fromJson(core.Map _json) { |
| 6284 if (_json.containsKey("opted_state")) { |
| 6285 optedState = _json["opted_state"]; |
| 6286 } |
| 6287 } |
| 6288 |
| 6289 core.Map toJson() { |
| 6290 var _json = new core.Map(); |
| 6291 if (optedState != null) { |
| 6292 _json["opted_state"] = optedState; |
| 6293 } |
| 6294 return _json; |
| 6295 } |
| 6296 } |
| 6297 |
6273 class UsersettingsNotification { | 6298 class UsersettingsNotification { |
6274 UsersettingsNotificationMoreFromAuthors moreFromAuthors; | 6299 UsersettingsNotificationMoreFromAuthors moreFromAuthors; |
6275 UsersettingsNotificationMoreFromSeries moreFromSeries; | 6300 UsersettingsNotificationMoreFromSeries moreFromSeries; |
| 6301 UsersettingsNotificationRewardExpirations rewardExpirations; |
6276 | 6302 |
6277 UsersettingsNotification(); | 6303 UsersettingsNotification(); |
6278 | 6304 |
6279 UsersettingsNotification.fromJson(core.Map _json) { | 6305 UsersettingsNotification.fromJson(core.Map _json) { |
6280 if (_json.containsKey("moreFromAuthors")) { | 6306 if (_json.containsKey("moreFromAuthors")) { |
6281 moreFromAuthors = new UsersettingsNotificationMoreFromAuthors.fromJson(_js
on["moreFromAuthors"]); | 6307 moreFromAuthors = new UsersettingsNotificationMoreFromAuthors.fromJson(_js
on["moreFromAuthors"]); |
6282 } | 6308 } |
6283 if (_json.containsKey("moreFromSeries")) { | 6309 if (_json.containsKey("moreFromSeries")) { |
6284 moreFromSeries = new UsersettingsNotificationMoreFromSeries.fromJson(_json
["moreFromSeries"]); | 6310 moreFromSeries = new UsersettingsNotificationMoreFromSeries.fromJson(_json
["moreFromSeries"]); |
6285 } | 6311 } |
| 6312 if (_json.containsKey("rewardExpirations")) { |
| 6313 rewardExpirations = new UsersettingsNotificationRewardExpirations.fromJson
(_json["rewardExpirations"]); |
| 6314 } |
6286 } | 6315 } |
6287 | 6316 |
6288 core.Map toJson() { | 6317 core.Map toJson() { |
6289 var _json = new core.Map(); | 6318 var _json = new core.Map(); |
6290 if (moreFromAuthors != null) { | 6319 if (moreFromAuthors != null) { |
6291 _json["moreFromAuthors"] = (moreFromAuthors).toJson(); | 6320 _json["moreFromAuthors"] = (moreFromAuthors).toJson(); |
6292 } | 6321 } |
6293 if (moreFromSeries != null) { | 6322 if (moreFromSeries != null) { |
6294 _json["moreFromSeries"] = (moreFromSeries).toJson(); | 6323 _json["moreFromSeries"] = (moreFromSeries).toJson(); |
6295 } | 6324 } |
| 6325 if (rewardExpirations != null) { |
| 6326 _json["rewardExpirations"] = (rewardExpirations).toJson(); |
| 6327 } |
6296 return _json; | 6328 return _json; |
6297 } | 6329 } |
6298 } | 6330 } |
6299 | 6331 |
6300 class Usersettings { | 6332 class Usersettings { |
6301 /** Resource type. */ | 6333 /** Resource type. */ |
6302 core.String kind; | 6334 core.String kind; |
6303 /** User settings in sub-objects, each for different purposes. */ | 6335 /** User settings in sub-objects, each for different purposes. */ |
6304 UsersettingsNotesExport notesExport; | 6336 UsersettingsNotesExport notesExport; |
6305 UsersettingsNotification notification; | 6337 UsersettingsNotification notification; |
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8283 } | 8315 } |
8284 if (shortSeriesBookTitle != null) { | 8316 if (shortSeriesBookTitle != null) { |
8285 _json["shortSeriesBookTitle"] = shortSeriesBookTitle; | 8317 _json["shortSeriesBookTitle"] = shortSeriesBookTitle; |
8286 } | 8318 } |
8287 if (volumeSeries != null) { | 8319 if (volumeSeries != null) { |
8288 _json["volumeSeries"] = volumeSeries.map((value) => (value).toJson()).toLi
st(); | 8320 _json["volumeSeries"] = volumeSeries.map((value) => (value).toJson()).toLi
st(); |
8289 } | 8321 } |
8290 return _json; | 8322 return _json; |
8291 } | 8323 } |
8292 } | 8324 } |
OLD | NEW |