OLD | NEW |
(Empty) | |
| 1 library googleapis.books.v1; |
| 2 |
| 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; |
| 7 |
| 8 import "package:crypto/crypto.dart" as crypto; |
| 9 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; |
| 11 import '../common/common.dart' as common_1; |
| 12 |
| 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 |
| 16 /** Lets you search for books and manage your Google Books library. */ |
| 17 class BooksApi { |
| 18 /** Manage your books */ |
| 19 static const BooksScope = "https://www.googleapis.com/auth/books"; |
| 20 |
| 21 |
| 22 final common_internal.ApiRequester _requester; |
| 23 |
| 24 BookshelvesResourceApi get bookshelves => new BookshelvesResourceApi(_requeste
r); |
| 25 CloudloadingResourceApi get cloudloading => new CloudloadingResourceApi(_reque
ster); |
| 26 LayersResourceApi get layers => new LayersResourceApi(_requester); |
| 27 MyconfigResourceApi get myconfig => new MyconfigResourceApi(_requester); |
| 28 MylibraryResourceApi get mylibrary => new MylibraryResourceApi(_requester); |
| 29 PromoofferResourceApi get promooffer => new PromoofferResourceApi(_requester); |
| 30 VolumesResourceApi get volumes => new VolumesResourceApi(_requester); |
| 31 |
| 32 BooksApi(http.Client client) : |
| 33 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/books/v1/"); |
| 34 } |
| 35 |
| 36 |
| 37 /** Not documented yet. */ |
| 38 class BookshelvesResourceApi { |
| 39 final common_internal.ApiRequester _requester; |
| 40 |
| 41 BookshelvesVolumesResourceApi get volumes => new BookshelvesVolumesResourceApi
(_requester); |
| 42 |
| 43 BookshelvesResourceApi(common_internal.ApiRequester client) : |
| 44 _requester = client; |
| 45 |
| 46 /** |
| 47 * Retrieves metadata for a specific bookshelf for the specified user. |
| 48 * |
| 49 * Request parameters: |
| 50 * |
| 51 * [userId] - ID of user for whom to retrieve bookshelves. |
| 52 * |
| 53 * [shelf] - ID of bookshelf to retrieve. |
| 54 * |
| 55 * [source] - String to identify the originator of this request. |
| 56 * |
| 57 * Completes with a [Bookshelf]. |
| 58 * |
| 59 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 60 * error. |
| 61 * |
| 62 * If the used [http.Client] completes with an error when making a REST call, |
| 63 * this method will complete with the same error. |
| 64 */ |
| 65 async.Future<Bookshelf> get(core.String userId, core.String shelf, {core.Strin
g source}) { |
| 66 var _url = null; |
| 67 var _queryParams = new core.Map(); |
| 68 var _uploadMedia = null; |
| 69 var _uploadOptions = null; |
| 70 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 71 var _body = null; |
| 72 |
| 73 if (userId == null) { |
| 74 throw new core.ArgumentError("Parameter userId is required."); |
| 75 } |
| 76 if (shelf == null) { |
| 77 throw new core.ArgumentError("Parameter shelf is required."); |
| 78 } |
| 79 if (source != null) { |
| 80 _queryParams["source"] = [source]; |
| 81 } |
| 82 |
| 83 |
| 84 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userId') + '/books
helves/' + common_internal.Escaper.ecapeVariable('$shelf'); |
| 85 |
| 86 var _response = _requester.request(_url, |
| 87 "GET", |
| 88 body: _body, |
| 89 queryParams: _queryParams, |
| 90 uploadOptions: _uploadOptions, |
| 91 uploadMedia: _uploadMedia, |
| 92 downloadOptions: _downloadOptions); |
| 93 return _response.then((data) => new Bookshelf.fromJson(data)); |
| 94 } |
| 95 |
| 96 /** |
| 97 * Retrieves a list of public bookshelves for the specified user. |
| 98 * |
| 99 * Request parameters: |
| 100 * |
| 101 * [userId] - ID of user for whom to retrieve bookshelves. |
| 102 * |
| 103 * [source] - String to identify the originator of this request. |
| 104 * |
| 105 * Completes with a [Bookshelves]. |
| 106 * |
| 107 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 108 * error. |
| 109 * |
| 110 * If the used [http.Client] completes with an error when making a REST call, |
| 111 * this method will complete with the same error. |
| 112 */ |
| 113 async.Future<Bookshelves> list(core.String userId, {core.String source}) { |
| 114 var _url = null; |
| 115 var _queryParams = new core.Map(); |
| 116 var _uploadMedia = null; |
| 117 var _uploadOptions = null; |
| 118 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 119 var _body = null; |
| 120 |
| 121 if (userId == null) { |
| 122 throw new core.ArgumentError("Parameter userId is required."); |
| 123 } |
| 124 if (source != null) { |
| 125 _queryParams["source"] = [source]; |
| 126 } |
| 127 |
| 128 |
| 129 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userId') + '/books
helves'; |
| 130 |
| 131 var _response = _requester.request(_url, |
| 132 "GET", |
| 133 body: _body, |
| 134 queryParams: _queryParams, |
| 135 uploadOptions: _uploadOptions, |
| 136 uploadMedia: _uploadMedia, |
| 137 downloadOptions: _downloadOptions); |
| 138 return _response.then((data) => new Bookshelves.fromJson(data)); |
| 139 } |
| 140 |
| 141 } |
| 142 |
| 143 |
| 144 /** Not documented yet. */ |
| 145 class BookshelvesVolumesResourceApi { |
| 146 final common_internal.ApiRequester _requester; |
| 147 |
| 148 BookshelvesVolumesResourceApi(common_internal.ApiRequester client) : |
| 149 _requester = client; |
| 150 |
| 151 /** |
| 152 * Retrieves volumes in a specific bookshelf for the specified user. |
| 153 * |
| 154 * Request parameters: |
| 155 * |
| 156 * [userId] - ID of user for whom to retrieve bookshelf volumes. |
| 157 * |
| 158 * [shelf] - ID of bookshelf to retrieve volumes. |
| 159 * |
| 160 * [maxResults] - Maximum number of results to return |
| 161 * |
| 162 * [showPreorders] - Set to true to show pre-ordered books. Defaults to false. |
| 163 * |
| 164 * [source] - String to identify the originator of this request. |
| 165 * |
| 166 * [startIndex] - Index of the first element to return (starts at 0) |
| 167 * |
| 168 * Completes with a [Volumes]. |
| 169 * |
| 170 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 171 * error. |
| 172 * |
| 173 * If the used [http.Client] completes with an error when making a REST call, |
| 174 * this method will complete with the same error. |
| 175 */ |
| 176 async.Future<Volumes> list(core.String userId, core.String shelf, {core.int ma
xResults, core.bool showPreorders, core.String source, core.int startIndex}) { |
| 177 var _url = null; |
| 178 var _queryParams = new core.Map(); |
| 179 var _uploadMedia = null; |
| 180 var _uploadOptions = null; |
| 181 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 182 var _body = null; |
| 183 |
| 184 if (userId == null) { |
| 185 throw new core.ArgumentError("Parameter userId is required."); |
| 186 } |
| 187 if (shelf == null) { |
| 188 throw new core.ArgumentError("Parameter shelf is required."); |
| 189 } |
| 190 if (maxResults != null) { |
| 191 _queryParams["maxResults"] = ["${maxResults}"]; |
| 192 } |
| 193 if (showPreorders != null) { |
| 194 _queryParams["showPreorders"] = ["${showPreorders}"]; |
| 195 } |
| 196 if (source != null) { |
| 197 _queryParams["source"] = [source]; |
| 198 } |
| 199 if (startIndex != null) { |
| 200 _queryParams["startIndex"] = ["${startIndex}"]; |
| 201 } |
| 202 |
| 203 |
| 204 _url = 'users/' + common_internal.Escaper.ecapeVariable('$userId') + '/books
helves/' + common_internal.Escaper.ecapeVariable('$shelf') + '/volumes'; |
| 205 |
| 206 var _response = _requester.request(_url, |
| 207 "GET", |
| 208 body: _body, |
| 209 queryParams: _queryParams, |
| 210 uploadOptions: _uploadOptions, |
| 211 uploadMedia: _uploadMedia, |
| 212 downloadOptions: _downloadOptions); |
| 213 return _response.then((data) => new Volumes.fromJson(data)); |
| 214 } |
| 215 |
| 216 } |
| 217 |
| 218 |
| 219 /** Not documented yet. */ |
| 220 class CloudloadingResourceApi { |
| 221 final common_internal.ApiRequester _requester; |
| 222 |
| 223 CloudloadingResourceApi(common_internal.ApiRequester client) : |
| 224 _requester = client; |
| 225 |
| 226 /** |
| 227 * Not documented yet. |
| 228 * |
| 229 * Request parameters: |
| 230 * |
| 231 * [driveDocumentId] - A drive document id. The upload_client_token must not |
| 232 * be set. |
| 233 * |
| 234 * [mimeType] - The document MIME type. It can be set only if the |
| 235 * drive_document_id is set. |
| 236 * |
| 237 * [name] - The document name. It can be set only if the drive_document_id is |
| 238 * set. |
| 239 * |
| 240 * [uploadClientToken] - null |
| 241 * |
| 242 * Completes with a [BooksCloudloadingResource]. |
| 243 * |
| 244 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 245 * error. |
| 246 * |
| 247 * If the used [http.Client] completes with an error when making a REST call, |
| 248 * this method will complete with the same error. |
| 249 */ |
| 250 async.Future<BooksCloudloadingResource> addBook({core.String driveDocumentId,
core.String mimeType, core.String name, core.String uploadClientToken}) { |
| 251 var _url = null; |
| 252 var _queryParams = new core.Map(); |
| 253 var _uploadMedia = null; |
| 254 var _uploadOptions = null; |
| 255 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 256 var _body = null; |
| 257 |
| 258 if (driveDocumentId != null) { |
| 259 _queryParams["drive_document_id"] = [driveDocumentId]; |
| 260 } |
| 261 if (mimeType != null) { |
| 262 _queryParams["mime_type"] = [mimeType]; |
| 263 } |
| 264 if (name != null) { |
| 265 _queryParams["name"] = [name]; |
| 266 } |
| 267 if (uploadClientToken != null) { |
| 268 _queryParams["upload_client_token"] = [uploadClientToken]; |
| 269 } |
| 270 |
| 271 |
| 272 _url = 'cloudloading/addBook'; |
| 273 |
| 274 var _response = _requester.request(_url, |
| 275 "POST", |
| 276 body: _body, |
| 277 queryParams: _queryParams, |
| 278 uploadOptions: _uploadOptions, |
| 279 uploadMedia: _uploadMedia, |
| 280 downloadOptions: _downloadOptions); |
| 281 return _response.then((data) => new BooksCloudloadingResource.fromJson(data)
); |
| 282 } |
| 283 |
| 284 /** |
| 285 * Remove the book and its contents |
| 286 * |
| 287 * Request parameters: |
| 288 * |
| 289 * [volumeId] - The id of the book to be removed. |
| 290 * |
| 291 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 292 * error. |
| 293 * |
| 294 * If the used [http.Client] completes with an error when making a REST call, |
| 295 * this method will complete with the same error. |
| 296 */ |
| 297 async.Future deleteBook(core.String volumeId) { |
| 298 var _url = null; |
| 299 var _queryParams = new core.Map(); |
| 300 var _uploadMedia = null; |
| 301 var _uploadOptions = null; |
| 302 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 303 var _body = null; |
| 304 |
| 305 if (volumeId == null) { |
| 306 throw new core.ArgumentError("Parameter volumeId is required."); |
| 307 } |
| 308 _queryParams["volumeId"] = [volumeId]; |
| 309 |
| 310 _downloadOptions = null; |
| 311 |
| 312 _url = 'cloudloading/deleteBook'; |
| 313 |
| 314 var _response = _requester.request(_url, |
| 315 "POST", |
| 316 body: _body, |
| 317 queryParams: _queryParams, |
| 318 uploadOptions: _uploadOptions, |
| 319 uploadMedia: _uploadMedia, |
| 320 downloadOptions: _downloadOptions); |
| 321 return _response.then((data) => null); |
| 322 } |
| 323 |
| 324 /** |
| 325 * Not documented yet. |
| 326 * |
| 327 * [request] - The metadata request object. |
| 328 * |
| 329 * Request parameters: |
| 330 * |
| 331 * Completes with a [BooksCloudloadingResource]. |
| 332 * |
| 333 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 334 * error. |
| 335 * |
| 336 * If the used [http.Client] completes with an error when making a REST call, |
| 337 * this method will complete with the same error. |
| 338 */ |
| 339 async.Future<BooksCloudloadingResource> updateBook(BooksCloudloadingResource r
equest) { |
| 340 var _url = null; |
| 341 var _queryParams = new core.Map(); |
| 342 var _uploadMedia = null; |
| 343 var _uploadOptions = null; |
| 344 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 345 var _body = null; |
| 346 |
| 347 if (request != null) { |
| 348 _body = convert.JSON.encode((request).toJson()); |
| 349 } |
| 350 |
| 351 |
| 352 _url = 'cloudloading/updateBook'; |
| 353 |
| 354 var _response = _requester.request(_url, |
| 355 "POST", |
| 356 body: _body, |
| 357 queryParams: _queryParams, |
| 358 uploadOptions: _uploadOptions, |
| 359 uploadMedia: _uploadMedia, |
| 360 downloadOptions: _downloadOptions); |
| 361 return _response.then((data) => new BooksCloudloadingResource.fromJson(data)
); |
| 362 } |
| 363 |
| 364 } |
| 365 |
| 366 |
| 367 /** Not documented yet. */ |
| 368 class LayersResourceApi { |
| 369 final common_internal.ApiRequester _requester; |
| 370 |
| 371 LayersAnnotationDataResourceApi get annotationData => new LayersAnnotationData
ResourceApi(_requester); |
| 372 LayersVolumeAnnotationsResourceApi get volumeAnnotations => new LayersVolumeAn
notationsResourceApi(_requester); |
| 373 |
| 374 LayersResourceApi(common_internal.ApiRequester client) : |
| 375 _requester = client; |
| 376 |
| 377 /** |
| 378 * Gets the layer summary for a volume. |
| 379 * |
| 380 * Request parameters: |
| 381 * |
| 382 * [volumeId] - The volume to retrieve layers for. |
| 383 * |
| 384 * [summaryId] - The ID for the layer to get the summary for. |
| 385 * |
| 386 * [contentVersion] - The content version for the requested volume. |
| 387 * |
| 388 * [source] - String to identify the originator of this request. |
| 389 * |
| 390 * Completes with a [Layersummary]. |
| 391 * |
| 392 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 393 * error. |
| 394 * |
| 395 * If the used [http.Client] completes with an error when making a REST call, |
| 396 * this method will complete with the same error. |
| 397 */ |
| 398 async.Future<Layersummary> get(core.String volumeId, core.String summaryId, {c
ore.String contentVersion, core.String source}) { |
| 399 var _url = null; |
| 400 var _queryParams = new core.Map(); |
| 401 var _uploadMedia = null; |
| 402 var _uploadOptions = null; |
| 403 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 404 var _body = null; |
| 405 |
| 406 if (volumeId == null) { |
| 407 throw new core.ArgumentError("Parameter volumeId is required."); |
| 408 } |
| 409 if (summaryId == null) { |
| 410 throw new core.ArgumentError("Parameter summaryId is required."); |
| 411 } |
| 412 if (contentVersion != null) { |
| 413 _queryParams["contentVersion"] = [contentVersion]; |
| 414 } |
| 415 if (source != null) { |
| 416 _queryParams["source"] = [source]; |
| 417 } |
| 418 |
| 419 |
| 420 _url = 'volumes/' + common_internal.Escaper.ecapeVariable('$volumeId') + '/l
ayersummary/' + common_internal.Escaper.ecapeVariable('$summaryId'); |
| 421 |
| 422 var _response = _requester.request(_url, |
| 423 "GET", |
| 424 body: _body, |
| 425 queryParams: _queryParams, |
| 426 uploadOptions: _uploadOptions, |
| 427 uploadMedia: _uploadMedia, |
| 428 downloadOptions: _downloadOptions); |
| 429 return _response.then((data) => new Layersummary.fromJson(data)); |
| 430 } |
| 431 |
| 432 /** |
| 433 * List the layer summaries for a volume. |
| 434 * |
| 435 * Request parameters: |
| 436 * |
| 437 * [volumeId] - The volume to retrieve layers for. |
| 438 * |
| 439 * [contentVersion] - The content version for the requested volume. |
| 440 * |
| 441 * [maxResults] - Maximum number of results to return |
| 442 * Value must be between "0" and "200". |
| 443 * |
| 444 * [pageToken] - The value of the nextToken from the previous page. |
| 445 * |
| 446 * [source] - String to identify the originator of this request. |
| 447 * |
| 448 * Completes with a [Layersummaries]. |
| 449 * |
| 450 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 451 * error. |
| 452 * |
| 453 * If the used [http.Client] completes with an error when making a REST call, |
| 454 * this method will complete with the same error. |
| 455 */ |
| 456 async.Future<Layersummaries> list(core.String volumeId, {core.String contentVe
rsion, core.int maxResults, core.String pageToken, core.String source}) { |
| 457 var _url = null; |
| 458 var _queryParams = new core.Map(); |
| 459 var _uploadMedia = null; |
| 460 var _uploadOptions = null; |
| 461 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 462 var _body = null; |
| 463 |
| 464 if (volumeId == null) { |
| 465 throw new core.ArgumentError("Parameter volumeId is required."); |
| 466 } |
| 467 if (contentVersion != null) { |
| 468 _queryParams["contentVersion"] = [contentVersion]; |
| 469 } |
| 470 if (maxResults != null) { |
| 471 _queryParams["maxResults"] = ["${maxResults}"]; |
| 472 } |
| 473 if (pageToken != null) { |
| 474 _queryParams["pageToken"] = [pageToken]; |
| 475 } |
| 476 if (source != null) { |
| 477 _queryParams["source"] = [source]; |
| 478 } |
| 479 |
| 480 |
| 481 _url = 'volumes/' + common_internal.Escaper.ecapeVariable('$volumeId') + '/l
ayersummary'; |
| 482 |
| 483 var _response = _requester.request(_url, |
| 484 "GET", |
| 485 body: _body, |
| 486 queryParams: _queryParams, |
| 487 uploadOptions: _uploadOptions, |
| 488 uploadMedia: _uploadMedia, |
| 489 downloadOptions: _downloadOptions); |
| 490 return _response.then((data) => new Layersummaries.fromJson(data)); |
| 491 } |
| 492 |
| 493 } |
| 494 |
| 495 |
| 496 /** Not documented yet. */ |
| 497 class LayersAnnotationDataResourceApi { |
| 498 final common_internal.ApiRequester _requester; |
| 499 |
| 500 LayersAnnotationDataResourceApi(common_internal.ApiRequester client) : |
| 501 _requester = client; |
| 502 |
| 503 /** |
| 504 * Gets the annotation data. |
| 505 * |
| 506 * Request parameters: |
| 507 * |
| 508 * [volumeId] - The volume to retrieve annotations for. |
| 509 * |
| 510 * [layerId] - The ID for the layer to get the annotations. |
| 511 * |
| 512 * [annotationDataId] - The ID of the annotation data to retrieve. |
| 513 * |
| 514 * [contentVersion] - The content version for the volume you are trying to |
| 515 * retrieve. |
| 516 * |
| 517 * [allowWebDefinitions] - For the dictionary layer. Whether or not to allow |
| 518 * web definitions. |
| 519 * |
| 520 * [h] - The requested pixel height for any images. If height is provided |
| 521 * width must also be provided. |
| 522 * |
| 523 * [locale] - The locale information for the data. ISO-639-1 language and |
| 524 * ISO-3166-1 country code. Ex: 'en_US'. |
| 525 * |
| 526 * [scale] - The requested scale for the image. |
| 527 * |
| 528 * [source] - String to identify the originator of this request. |
| 529 * |
| 530 * [w] - The requested pixel width for any images. If width is provided height |
| 531 * must also be provided. |
| 532 * |
| 533 * Completes with a [Annotationdata]. |
| 534 * |
| 535 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 536 * error. |
| 537 * |
| 538 * If the used [http.Client] completes with an error when making a REST call, |
| 539 * this method will complete with the same error. |
| 540 */ |
| 541 async.Future<Annotationdata> get(core.String volumeId, core.String layerId, co
re.String annotationDataId, core.String contentVersion, {core.bool allowWebDefin
itions, core.int h, core.String locale, core.int scale, core.String source, core
.int w}) { |
| 542 var _url = null; |
| 543 var _queryParams = new core.Map(); |
| 544 var _uploadMedia = null; |
| 545 var _uploadOptions = null; |
| 546 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 547 var _body = null; |
| 548 |
| 549 if (volumeId == null) { |
| 550 throw new core.ArgumentError("Parameter volumeId is required."); |
| 551 } |
| 552 if (layerId == null) { |
| 553 throw new core.ArgumentError("Parameter layerId is required."); |
| 554 } |
| 555 if (annotationDataId == null) { |
| 556 throw new core.ArgumentError("Parameter annotationDataId is required."); |
| 557 } |
| 558 if (contentVersion == null) { |
| 559 throw new core.ArgumentError("Parameter contentVersion is required."); |
| 560 } |
| 561 _queryParams["contentVersion"] = [contentVersion]; |
| 562 if (allowWebDefinitions != null) { |
| 563 _queryParams["allowWebDefinitions"] = ["${allowWebDefinitions}"]; |
| 564 } |
| 565 if (h != null) { |
| 566 _queryParams["h"] = ["${h}"]; |
| 567 } |
| 568 if (locale != null) { |
| 569 _queryParams["locale"] = [locale]; |
| 570 } |
| 571 if (scale != null) { |
| 572 _queryParams["scale"] = ["${scale}"]; |
| 573 } |
| 574 if (source != null) { |
| 575 _queryParams["source"] = [source]; |
| 576 } |
| 577 if (w != null) { |
| 578 _queryParams["w"] = ["${w}"]; |
| 579 } |
| 580 |
| 581 |
| 582 _url = 'volumes/' + common_internal.Escaper.ecapeVariable('$volumeId') + '/l
ayers/' + common_internal.Escaper.ecapeVariable('$layerId') + '/data/' + common_
internal.Escaper.ecapeVariable('$annotationDataId'); |
| 583 |
| 584 var _response = _requester.request(_url, |
| 585 "GET", |
| 586 body: _body, |
| 587 queryParams: _queryParams, |
| 588 uploadOptions: _uploadOptions, |
| 589 uploadMedia: _uploadMedia, |
| 590 downloadOptions: _downloadOptions); |
| 591 return _response.then((data) => new Annotationdata.fromJson(data)); |
| 592 } |
| 593 |
| 594 /** |
| 595 * Gets the annotation data for a volume and layer. |
| 596 * |
| 597 * Request parameters: |
| 598 * |
| 599 * [volumeId] - The volume to retrieve annotation data for. |
| 600 * |
| 601 * [layerId] - The ID for the layer to get the annotation data. |
| 602 * |
| 603 * [contentVersion] - The content version for the requested volume. |
| 604 * |
| 605 * [annotationDataId] - The list of Annotation Data Ids to retrieve. |
| 606 * Pagination is ignored if this is set. |
| 607 * |
| 608 * [h] - The requested pixel height for any images. If height is provided |
| 609 * width must also be provided. |
| 610 * |
| 611 * [locale] - The locale information for the data. ISO-639-1 language and |
| 612 * ISO-3166-1 country code. Ex: 'en_US'. |
| 613 * |
| 614 * [maxResults] - Maximum number of results to return |
| 615 * Value must be between "0" and "200". |
| 616 * |
| 617 * [pageToken] - The value of the nextToken from the previous page. |
| 618 * |
| 619 * [scale] - The requested scale for the image. |
| 620 * |
| 621 * [source] - String to identify the originator of this request. |
| 622 * |
| 623 * [updatedMax] - RFC 3339 timestamp to restrict to items updated prior to |
| 624 * this timestamp (exclusive). |
| 625 * |
| 626 * [updatedMin] - RFC 3339 timestamp to restrict to items updated since this |
| 627 * timestamp (inclusive). |
| 628 * |
| 629 * [w] - The requested pixel width for any images. If width is provided height |
| 630 * must also be provided. |
| 631 * |
| 632 * Completes with a [Annotationsdata]. |
| 633 * |
| 634 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 635 * error. |
| 636 * |
| 637 * If the used [http.Client] completes with an error when making a REST call, |
| 638 * this method will complete with the same error. |
| 639 */ |
| 640 async.Future<Annotationsdata> list(core.String volumeId, core.String layerId,
core.String contentVersion, {core.List<core.String> annotationDataId, core.int h
, core.String locale, core.int maxResults, core.String pageToken, core.int scale
, core.String source, core.String updatedMax, core.String updatedMin, core.int w
}) { |
| 641 var _url = null; |
| 642 var _queryParams = new core.Map(); |
| 643 var _uploadMedia = null; |
| 644 var _uploadOptions = null; |
| 645 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 646 var _body = null; |
| 647 |
| 648 if (volumeId == null) { |
| 649 throw new core.ArgumentError("Parameter volumeId is required."); |
| 650 } |
| 651 if (layerId == null) { |
| 652 throw new core.ArgumentError("Parameter layerId is required."); |
| 653 } |
| 654 if (contentVersion == null) { |
| 655 throw new core.ArgumentError("Parameter contentVersion is required."); |
| 656 } |
| 657 _queryParams["contentVersion"] = [contentVersion]; |
| 658 if (annotationDataId != null) { |
| 659 _queryParams["annotationDataId"] = annotationDataId; |
| 660 } |
| 661 if (h != null) { |
| 662 _queryParams["h"] = ["${h}"]; |
| 663 } |
| 664 if (locale != null) { |
| 665 _queryParams["locale"] = [locale]; |
| 666 } |
| 667 if (maxResults != null) { |
| 668 _queryParams["maxResults"] = ["${maxResults}"]; |
| 669 } |
| 670 if (pageToken != null) { |
| 671 _queryParams["pageToken"] = [pageToken]; |
| 672 } |
| 673 if (scale != null) { |
| 674 _queryParams["scale"] = ["${scale}"]; |
| 675 } |
| 676 if (source != null) { |
| 677 _queryParams["source"] = [source]; |
| 678 } |
| 679 if (updatedMax != null) { |
| 680 _queryParams["updatedMax"] = [updatedMax]; |
| 681 } |
| 682 if (updatedMin != null) { |
| 683 _queryParams["updatedMin"] = [updatedMin]; |
| 684 } |
| 685 if (w != null) { |
| 686 _queryParams["w"] = ["${w}"]; |
| 687 } |
| 688 |
| 689 |
| 690 _url = 'volumes/' + common_internal.Escaper.ecapeVariable('$volumeId') + '/l
ayers/' + common_internal.Escaper.ecapeVariable('$layerId') + '/data'; |
| 691 |
| 692 var _response = _requester.request(_url, |
| 693 "GET", |
| 694 body: _body, |
| 695 queryParams: _queryParams, |
| 696 uploadOptions: _uploadOptions, |
| 697 uploadMedia: _uploadMedia, |
| 698 downloadOptions: _downloadOptions); |
| 699 return _response.then((data) => new Annotationsdata.fromJson(data)); |
| 700 } |
| 701 |
| 702 } |
| 703 |
| 704 |
| 705 /** Not documented yet. */ |
| 706 class LayersVolumeAnnotationsResourceApi { |
| 707 final common_internal.ApiRequester _requester; |
| 708 |
| 709 LayersVolumeAnnotationsResourceApi(common_internal.ApiRequester client) : |
| 710 _requester = client; |
| 711 |
| 712 /** |
| 713 * Gets the volume annotation. |
| 714 * |
| 715 * Request parameters: |
| 716 * |
| 717 * [volumeId] - The volume to retrieve annotations for. |
| 718 * |
| 719 * [layerId] - The ID for the layer to get the annotations. |
| 720 * |
| 721 * [annotationId] - The ID of the volume annotation to retrieve. |
| 722 * |
| 723 * [locale] - The locale information for the data. ISO-639-1 language and |
| 724 * ISO-3166-1 country code. Ex: 'en_US'. |
| 725 * |
| 726 * [source] - String to identify the originator of this request. |
| 727 * |
| 728 * Completes with a [Volumeannotation]. |
| 729 * |
| 730 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 731 * error. |
| 732 * |
| 733 * If the used [http.Client] completes with an error when making a REST call, |
| 734 * this method will complete with the same error. |
| 735 */ |
| 736 async.Future<Volumeannotation> get(core.String volumeId, core.String layerId,
core.String annotationId, {core.String locale, core.String source}) { |
| 737 var _url = null; |
| 738 var _queryParams = new core.Map(); |
| 739 var _uploadMedia = null; |
| 740 var _uploadOptions = null; |
| 741 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 742 var _body = null; |
| 743 |
| 744 if (volumeId == null) { |
| 745 throw new core.ArgumentError("Parameter volumeId is required."); |
| 746 } |
| 747 if (layerId == null) { |
| 748 throw new core.ArgumentError("Parameter layerId is required."); |
| 749 } |
| 750 if (annotationId == null) { |
| 751 throw new core.ArgumentError("Parameter annotationId is required."); |
| 752 } |
| 753 if (locale != null) { |
| 754 _queryParams["locale"] = [locale]; |
| 755 } |
| 756 if (source != null) { |
| 757 _queryParams["source"] = [source]; |
| 758 } |
| 759 |
| 760 |
| 761 _url = 'volumes/' + common_internal.Escaper.ecapeVariable('$volumeId') + '/l
ayers/' + common_internal.Escaper.ecapeVariable('$layerId') + '/annotations/' +
common_internal.Escaper.ecapeVariable('$annotationId'); |
| 762 |
| 763 var _response = _requester.request(_url, |
| 764 "GET", |
| 765 body: _body, |
| 766 queryParams: _queryParams, |
| 767 uploadOptions: _uploadOptions, |
| 768 uploadMedia: _uploadMedia, |
| 769 downloadOptions: _downloadOptions); |
| 770 return _response.then((data) => new Volumeannotation.fromJson(data)); |
| 771 } |
| 772 |
| 773 /** |
| 774 * Gets the volume annotations for a volume and layer. |
| 775 * |
| 776 * Request parameters: |
| 777 * |
| 778 * [volumeId] - The volume to retrieve annotations for. |
| 779 * |
| 780 * [layerId] - The ID for the layer to get the annotations. |
| 781 * |
| 782 * [contentVersion] - The content version for the requested volume. |
| 783 * |
| 784 * [endOffset] - The end offset to end retrieving data from. |
| 785 * |
| 786 * [endPosition] - The end position to end retrieving data from. |
| 787 * |
| 788 * [locale] - The locale information for the data. ISO-639-1 language and |
| 789 * ISO-3166-1 country code. Ex: 'en_US'. |
| 790 * |
| 791 * [maxResults] - Maximum number of results to return |
| 792 * Value must be between "0" and "200". |
| 793 * |
| 794 * [pageToken] - The value of the nextToken from the previous page. |
| 795 * |
| 796 * [showDeleted] - Set to true to return deleted annotations. updatedMin must |
| 797 * be in the request to use this. Defaults to false. |
| 798 * |
| 799 * [source] - String to identify the originator of this request. |
| 800 * |
| 801 * [startOffset] - The start offset to start retrieving data from. |
| 802 * |
| 803 * [startPosition] - The start position to start retrieving data from. |
| 804 * |
| 805 * [updatedMax] - RFC 3339 timestamp to restrict to items updated prior to |
| 806 * this timestamp (exclusive). |
| 807 * |
| 808 * [updatedMin] - RFC 3339 timestamp to restrict to items updated since this |
| 809 * timestamp (inclusive). |
| 810 * |
| 811 * [volumeAnnotationsVersion] - The version of the volume annotations that you |
| 812 * are requesting. |
| 813 * |
| 814 * Completes with a [Volumeannotations]. |
| 815 * |
| 816 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 817 * error. |
| 818 * |
| 819 * If the used [http.Client] completes with an error when making a REST call, |
| 820 * this method will complete with the same error. |
| 821 */ |
| 822 async.Future<Volumeannotations> list(core.String volumeId, core.String layerId
, core.String contentVersion, {core.String endOffset, core.String endPosition, c
ore.String locale, core.int maxResults, core.String pageToken, core.bool showDel
eted, core.String source, core.String startOffset, core.String startPosition, co
re.String updatedMax, core.String updatedMin, core.String volumeAnnotationsVersi
on}) { |
| 823 var _url = null; |
| 824 var _queryParams = new core.Map(); |
| 825 var _uploadMedia = null; |
| 826 var _uploadOptions = null; |
| 827 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 828 var _body = null; |
| 829 |
| 830 if (volumeId == null) { |
| 831 throw new core.ArgumentError("Parameter volumeId is required."); |
| 832 } |
| 833 if (layerId == null) { |
| 834 throw new core.ArgumentError("Parameter layerId is required."); |
| 835 } |
| 836 if (contentVersion == null) { |
| 837 throw new core.ArgumentError("Parameter contentVersion is required."); |
| 838 } |
| 839 _queryParams["contentVersion"] = [contentVersion]; |
| 840 if (endOffset != null) { |
| 841 _queryParams["endOffset"] = [endOffset]; |
| 842 } |
| 843 if (endPosition != null) { |
| 844 _queryParams["endPosition"] = [endPosition]; |
| 845 } |
| 846 if (locale != null) { |
| 847 _queryParams["locale"] = [locale]; |
| 848 } |
| 849 if (maxResults != null) { |
| 850 _queryParams["maxResults"] = ["${maxResults}"]; |
| 851 } |
| 852 if (pageToken != null) { |
| 853 _queryParams["pageToken"] = [pageToken]; |
| 854 } |
| 855 if (showDeleted != null) { |
| 856 _queryParams["showDeleted"] = ["${showDeleted}"]; |
| 857 } |
| 858 if (source != null) { |
| 859 _queryParams["source"] = [source]; |
| 860 } |
| 861 if (startOffset != null) { |
| 862 _queryParams["startOffset"] = [startOffset]; |
| 863 } |
| 864 if (startPosition != null) { |
| 865 _queryParams["startPosition"] = [startPosition]; |
| 866 } |
| 867 if (updatedMax != null) { |
| 868 _queryParams["updatedMax"] = [updatedMax]; |
| 869 } |
| 870 if (updatedMin != null) { |
| 871 _queryParams["updatedMin"] = [updatedMin]; |
| 872 } |
| 873 if (volumeAnnotationsVersion != null) { |
| 874 _queryParams["volumeAnnotationsVersion"] = [volumeAnnotationsVersion]; |
| 875 } |
| 876 |
| 877 |
| 878 _url = 'volumes/' + common_internal.Escaper.ecapeVariable('$volumeId') + '/l
ayers/' + common_internal.Escaper.ecapeVariable('$layerId'); |
| 879 |
| 880 var _response = _requester.request(_url, |
| 881 "GET", |
| 882 body: _body, |
| 883 queryParams: _queryParams, |
| 884 uploadOptions: _uploadOptions, |
| 885 uploadMedia: _uploadMedia, |
| 886 downloadOptions: _downloadOptions); |
| 887 return _response.then((data) => new Volumeannotations.fromJson(data)); |
| 888 } |
| 889 |
| 890 } |
| 891 |
| 892 |
| 893 /** Not documented yet. */ |
| 894 class MyconfigResourceApi { |
| 895 final common_internal.ApiRequester _requester; |
| 896 |
| 897 MyconfigResourceApi(common_internal.ApiRequester client) : |
| 898 _requester = client; |
| 899 |
| 900 /** |
| 901 * Release downloaded content access restriction. |
| 902 * |
| 903 * Request parameters: |
| 904 * |
| 905 * [volumeIds] - The volume(s) to release restrictions for. |
| 906 * |
| 907 * [cpksver] - The device/version ID from which to release the restriction. |
| 908 * |
| 909 * [locale] - ISO-639-1, ISO-3166-1 codes for message localization, i.e. |
| 910 * en_US. |
| 911 * |
| 912 * [source] - String to identify the originator of this request. |
| 913 * |
| 914 * Completes with a [DownloadAccesses]. |
| 915 * |
| 916 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 917 * error. |
| 918 * |
| 919 * If the used [http.Client] completes with an error when making a REST call, |
| 920 * this method will complete with the same error. |
| 921 */ |
| 922 async.Future<DownloadAccesses> releaseDownloadAccess(core.List<core.String> vo
lumeIds, core.String cpksver, {core.String locale, core.String source}) { |
| 923 var _url = null; |
| 924 var _queryParams = new core.Map(); |
| 925 var _uploadMedia = null; |
| 926 var _uploadOptions = null; |
| 927 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 928 var _body = null; |
| 929 |
| 930 if (volumeIds == null || volumeIds.isEmpty) { |
| 931 throw new core.ArgumentError("Parameter volumeIds is required."); |
| 932 } |
| 933 _queryParams["volumeIds"] = volumeIds; |
| 934 if (cpksver == null) { |
| 935 throw new core.ArgumentError("Parameter cpksver is required."); |
| 936 } |
| 937 _queryParams["cpksver"] = [cpksver]; |
| 938 if (locale != null) { |
| 939 _queryParams["locale"] = [locale]; |
| 940 } |
| 941 if (source != null) { |
| 942 _queryParams["source"] = [source]; |
| 943 } |
| 944 |
| 945 |
| 946 _url = 'myconfig/releaseDownloadAccess'; |
| 947 |
| 948 var _response = _requester.request(_url, |
| 949 "POST", |
| 950 body: _body, |
| 951 queryParams: _queryParams, |
| 952 uploadOptions: _uploadOptions, |
| 953 uploadMedia: _uploadMedia, |
| 954 downloadOptions: _downloadOptions); |
| 955 return _response.then((data) => new DownloadAccesses.fromJson(data)); |
| 956 } |
| 957 |
| 958 /** |
| 959 * Request concurrent and download access restrictions. |
| 960 * |
| 961 * Request parameters: |
| 962 * |
| 963 * [source] - String to identify the originator of this request. |
| 964 * |
| 965 * [volumeId] - The volume to request concurrent/download restrictions for. |
| 966 * |
| 967 * [nonce] - The client nonce value. |
| 968 * |
| 969 * [cpksver] - The device/version ID from which to request the restrictions. |
| 970 * |
| 971 * [licenseTypes] - The type of access license to request. If not specified, |
| 972 * the default is BOTH. |
| 973 * Possible string values are: |
| 974 * - "BOTH" : Both concurrent and download licenses. |
| 975 * - "CONCURRENT" : Concurrent access license. |
| 976 * - "DOWNLOAD" : Offline download access license. |
| 977 * |
| 978 * [locale] - ISO-639-1, ISO-3166-1 codes for message localization, i.e. |
| 979 * en_US. |
| 980 * |
| 981 * Completes with a [RequestAccess]. |
| 982 * |
| 983 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 984 * error. |
| 985 * |
| 986 * If the used [http.Client] completes with an error when making a REST call, |
| 987 * this method will complete with the same error. |
| 988 */ |
| 989 async.Future<RequestAccess> requestAccess(core.String source, core.String volu
meId, core.String nonce, core.String cpksver, {core.String licenseTypes, core.St
ring locale}) { |
| 990 var _url = null; |
| 991 var _queryParams = new core.Map(); |
| 992 var _uploadMedia = null; |
| 993 var _uploadOptions = null; |
| 994 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 995 var _body = null; |
| 996 |
| 997 if (source == null) { |
| 998 throw new core.ArgumentError("Parameter source is required."); |
| 999 } |
| 1000 _queryParams["source"] = [source]; |
| 1001 if (volumeId == null) { |
| 1002 throw new core.ArgumentError("Parameter volumeId is required."); |
| 1003 } |
| 1004 _queryParams["volumeId"] = [volumeId]; |
| 1005 if (nonce == null) { |
| 1006 throw new core.ArgumentError("Parameter nonce is required."); |
| 1007 } |
| 1008 _queryParams["nonce"] = [nonce]; |
| 1009 if (cpksver == null) { |
| 1010 throw new core.ArgumentError("Parameter cpksver is required."); |
| 1011 } |
| 1012 _queryParams["cpksver"] = [cpksver]; |
| 1013 if (licenseTypes != null) { |
| 1014 _queryParams["licenseTypes"] = [licenseTypes]; |
| 1015 } |
| 1016 if (locale != null) { |
| 1017 _queryParams["locale"] = [locale]; |
| 1018 } |
| 1019 |
| 1020 |
| 1021 _url = 'myconfig/requestAccess'; |
| 1022 |
| 1023 var _response = _requester.request(_url, |
| 1024 "POST", |
| 1025 body: _body, |
| 1026 queryParams: _queryParams, |
| 1027 uploadOptions: _uploadOptions, |
| 1028 uploadMedia: _uploadMedia, |
| 1029 downloadOptions: _downloadOptions); |
| 1030 return _response.then((data) => new RequestAccess.fromJson(data)); |
| 1031 } |
| 1032 |
| 1033 /** |
| 1034 * Request downloaded content access for specified volumes on the My eBooks |
| 1035 * shelf. |
| 1036 * |
| 1037 * Request parameters: |
| 1038 * |
| 1039 * [source] - String to identify the originator of this request. |
| 1040 * |
| 1041 * [nonce] - The client nonce value. |
| 1042 * |
| 1043 * [cpksver] - The device/version ID from which to release the restriction. |
| 1044 * |
| 1045 * [features] - List of features supported by the client, i.e., 'RENTALS' |
| 1046 * |
| 1047 * [locale] - ISO-639-1, ISO-3166-1 codes for message localization, i.e. |
| 1048 * en_US. |
| 1049 * |
| 1050 * [showPreorders] - Set to true to show pre-ordered books. Defaults to false. |
| 1051 * |
| 1052 * [volumeIds] - The volume(s) to request download restrictions for. |
| 1053 * |
| 1054 * Completes with a [Volumes]. |
| 1055 * |
| 1056 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1057 * error. |
| 1058 * |
| 1059 * If the used [http.Client] completes with an error when making a REST call, |
| 1060 * this method will complete with the same error. |
| 1061 */ |
| 1062 async.Future<Volumes> syncVolumeLicenses(core.String source, core.String nonce
, core.String cpksver, {core.List<core.String> features, core.String locale, cor
e.bool showPreorders, core.List<core.String> volumeIds}) { |
| 1063 var _url = null; |
| 1064 var _queryParams = new core.Map(); |
| 1065 var _uploadMedia = null; |
| 1066 var _uploadOptions = null; |
| 1067 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1068 var _body = null; |
| 1069 |
| 1070 if (source == null) { |
| 1071 throw new core.ArgumentError("Parameter source is required."); |
| 1072 } |
| 1073 _queryParams["source"] = [source]; |
| 1074 if (nonce == null) { |
| 1075 throw new core.ArgumentError("Parameter nonce is required."); |
| 1076 } |
| 1077 _queryParams["nonce"] = [nonce]; |
| 1078 if (cpksver == null) { |
| 1079 throw new core.ArgumentError("Parameter cpksver is required."); |
| 1080 } |
| 1081 _queryParams["cpksver"] = [cpksver]; |
| 1082 if (features != null) { |
| 1083 _queryParams["features"] = features; |
| 1084 } |
| 1085 if (locale != null) { |
| 1086 _queryParams["locale"] = [locale]; |
| 1087 } |
| 1088 if (showPreorders != null) { |
| 1089 _queryParams["showPreorders"] = ["${showPreorders}"]; |
| 1090 } |
| 1091 if (volumeIds != null) { |
| 1092 _queryParams["volumeIds"] = volumeIds; |
| 1093 } |
| 1094 |
| 1095 |
| 1096 _url = 'myconfig/syncVolumeLicenses'; |
| 1097 |
| 1098 var _response = _requester.request(_url, |
| 1099 "POST", |
| 1100 body: _body, |
| 1101 queryParams: _queryParams, |
| 1102 uploadOptions: _uploadOptions, |
| 1103 uploadMedia: _uploadMedia, |
| 1104 downloadOptions: _downloadOptions); |
| 1105 return _response.then((data) => new Volumes.fromJson(data)); |
| 1106 } |
| 1107 |
| 1108 } |
| 1109 |
| 1110 |
| 1111 /** Not documented yet. */ |
| 1112 class MylibraryResourceApi { |
| 1113 final common_internal.ApiRequester _requester; |
| 1114 |
| 1115 MylibraryAnnotationsResourceApi get annotations => new MylibraryAnnotationsRes
ourceApi(_requester); |
| 1116 MylibraryBookshelvesResourceApi get bookshelves => new MylibraryBookshelvesRes
ourceApi(_requester); |
| 1117 MylibraryReadingpositionsResourceApi get readingpositions => new MylibraryRead
ingpositionsResourceApi(_requester); |
| 1118 |
| 1119 MylibraryResourceApi(common_internal.ApiRequester client) : |
| 1120 _requester = client; |
| 1121 } |
| 1122 |
| 1123 |
| 1124 /** Not documented yet. */ |
| 1125 class MylibraryAnnotationsResourceApi { |
| 1126 final common_internal.ApiRequester _requester; |
| 1127 |
| 1128 MylibraryAnnotationsResourceApi(common_internal.ApiRequester client) : |
| 1129 _requester = client; |
| 1130 |
| 1131 /** |
| 1132 * Deletes an annotation. |
| 1133 * |
| 1134 * Request parameters: |
| 1135 * |
| 1136 * [annotationId] - The ID for the annotation to delete. |
| 1137 * |
| 1138 * [source] - String to identify the originator of this request. |
| 1139 * |
| 1140 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1141 * error. |
| 1142 * |
| 1143 * If the used [http.Client] completes with an error when making a REST call, |
| 1144 * this method will complete with the same error. |
| 1145 */ |
| 1146 async.Future delete(core.String annotationId, {core.String source}) { |
| 1147 var _url = null; |
| 1148 var _queryParams = new core.Map(); |
| 1149 var _uploadMedia = null; |
| 1150 var _uploadOptions = null; |
| 1151 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1152 var _body = null; |
| 1153 |
| 1154 if (annotationId == null) { |
| 1155 throw new core.ArgumentError("Parameter annotationId is required."); |
| 1156 } |
| 1157 if (source != null) { |
| 1158 _queryParams["source"] = [source]; |
| 1159 } |
| 1160 |
| 1161 _downloadOptions = null; |
| 1162 |
| 1163 _url = 'mylibrary/annotations/' + common_internal.Escaper.ecapeVariable('$an
notationId'); |
| 1164 |
| 1165 var _response = _requester.request(_url, |
| 1166 "DELETE", |
| 1167 body: _body, |
| 1168 queryParams: _queryParams, |
| 1169 uploadOptions: _uploadOptions, |
| 1170 uploadMedia: _uploadMedia, |
| 1171 downloadOptions: _downloadOptions); |
| 1172 return _response.then((data) => null); |
| 1173 } |
| 1174 |
| 1175 /** |
| 1176 * Gets an annotation by its ID. |
| 1177 * |
| 1178 * Request parameters: |
| 1179 * |
| 1180 * [annotationId] - The ID for the annotation to retrieve. |
| 1181 * |
| 1182 * [source] - String to identify the originator of this request. |
| 1183 * |
| 1184 * Completes with a [Annotation]. |
| 1185 * |
| 1186 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1187 * error. |
| 1188 * |
| 1189 * If the used [http.Client] completes with an error when making a REST call, |
| 1190 * this method will complete with the same error. |
| 1191 */ |
| 1192 async.Future<Annotation> get(core.String annotationId, {core.String source}) { |
| 1193 var _url = null; |
| 1194 var _queryParams = new core.Map(); |
| 1195 var _uploadMedia = null; |
| 1196 var _uploadOptions = null; |
| 1197 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1198 var _body = null; |
| 1199 |
| 1200 if (annotationId == null) { |
| 1201 throw new core.ArgumentError("Parameter annotationId is required."); |
| 1202 } |
| 1203 if (source != null) { |
| 1204 _queryParams["source"] = [source]; |
| 1205 } |
| 1206 |
| 1207 |
| 1208 _url = 'mylibrary/annotations/' + common_internal.Escaper.ecapeVariable('$an
notationId'); |
| 1209 |
| 1210 var _response = _requester.request(_url, |
| 1211 "GET", |
| 1212 body: _body, |
| 1213 queryParams: _queryParams, |
| 1214 uploadOptions: _uploadOptions, |
| 1215 uploadMedia: _uploadMedia, |
| 1216 downloadOptions: _downloadOptions); |
| 1217 return _response.then((data) => new Annotation.fromJson(data)); |
| 1218 } |
| 1219 |
| 1220 /** |
| 1221 * Inserts a new annotation. |
| 1222 * |
| 1223 * [request] - The metadata request object. |
| 1224 * |
| 1225 * Request parameters: |
| 1226 * |
| 1227 * [showOnlySummaryInResponse] - Requests that only the summary of the |
| 1228 * specified layer be provided in the response. |
| 1229 * |
| 1230 * [source] - String to identify the originator of this request. |
| 1231 * |
| 1232 * Completes with a [Annotation]. |
| 1233 * |
| 1234 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1235 * error. |
| 1236 * |
| 1237 * If the used [http.Client] completes with an error when making a REST call, |
| 1238 * this method will complete with the same error. |
| 1239 */ |
| 1240 async.Future<Annotation> insert(Annotation request, {core.bool showOnlySummary
InResponse, core.String source}) { |
| 1241 var _url = null; |
| 1242 var _queryParams = new core.Map(); |
| 1243 var _uploadMedia = null; |
| 1244 var _uploadOptions = null; |
| 1245 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1246 var _body = null; |
| 1247 |
| 1248 if (request != null) { |
| 1249 _body = convert.JSON.encode((request).toJson()); |
| 1250 } |
| 1251 if (showOnlySummaryInResponse != null) { |
| 1252 _queryParams["showOnlySummaryInResponse"] = ["${showOnlySummaryInResponse}
"]; |
| 1253 } |
| 1254 if (source != null) { |
| 1255 _queryParams["source"] = [source]; |
| 1256 } |
| 1257 |
| 1258 |
| 1259 _url = 'mylibrary/annotations'; |
| 1260 |
| 1261 var _response = _requester.request(_url, |
| 1262 "POST", |
| 1263 body: _body, |
| 1264 queryParams: _queryParams, |
| 1265 uploadOptions: _uploadOptions, |
| 1266 uploadMedia: _uploadMedia, |
| 1267 downloadOptions: _downloadOptions); |
| 1268 return _response.then((data) => new Annotation.fromJson(data)); |
| 1269 } |
| 1270 |
| 1271 /** |
| 1272 * Retrieves a list of annotations, possibly filtered. |
| 1273 * |
| 1274 * Request parameters: |
| 1275 * |
| 1276 * [contentVersion] - The content version for the requested volume. |
| 1277 * |
| 1278 * [layerId] - The layer ID to limit annotation by. |
| 1279 * |
| 1280 * [layerIds] - The layer ID(s) to limit annotation by. |
| 1281 * |
| 1282 * [maxResults] - Maximum number of results to return |
| 1283 * Value must be between "0" and "40". |
| 1284 * |
| 1285 * [pageIds] - The page ID(s) for the volume that is being queried. |
| 1286 * |
| 1287 * [pageToken] - The value of the nextToken from the previous page. |
| 1288 * |
| 1289 * [showDeleted] - Set to true to return deleted annotations. updatedMin must |
| 1290 * be in the request to use this. Defaults to false. |
| 1291 * |
| 1292 * [source] - String to identify the originator of this request. |
| 1293 * |
| 1294 * [updatedMax] - RFC 3339 timestamp to restrict to items updated prior to |
| 1295 * this timestamp (exclusive). |
| 1296 * |
| 1297 * [updatedMin] - RFC 3339 timestamp to restrict to items updated since this |
| 1298 * timestamp (inclusive). |
| 1299 * |
| 1300 * [volumeId] - The volume to restrict annotations to. |
| 1301 * |
| 1302 * Completes with a [Annotations]. |
| 1303 * |
| 1304 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1305 * error. |
| 1306 * |
| 1307 * If the used [http.Client] completes with an error when making a REST call, |
| 1308 * this method will complete with the same error. |
| 1309 */ |
| 1310 async.Future<Annotations> list({core.String contentVersion, core.String layerI
d, core.List<core.String> layerIds, core.int maxResults, core.List<core.String>
pageIds, core.String pageToken, core.bool showDeleted, core.String source, core.
String updatedMax, core.String updatedMin, core.String volumeId}) { |
| 1311 var _url = null; |
| 1312 var _queryParams = new core.Map(); |
| 1313 var _uploadMedia = null; |
| 1314 var _uploadOptions = null; |
| 1315 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1316 var _body = null; |
| 1317 |
| 1318 if (contentVersion != null) { |
| 1319 _queryParams["contentVersion"] = [contentVersion]; |
| 1320 } |
| 1321 if (layerId != null) { |
| 1322 _queryParams["layerId"] = [layerId]; |
| 1323 } |
| 1324 if (layerIds != null) { |
| 1325 _queryParams["layerIds"] = layerIds; |
| 1326 } |
| 1327 if (maxResults != null) { |
| 1328 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1329 } |
| 1330 if (pageIds != null) { |
| 1331 _queryParams["pageIds"] = pageIds; |
| 1332 } |
| 1333 if (pageToken != null) { |
| 1334 _queryParams["pageToken"] = [pageToken]; |
| 1335 } |
| 1336 if (showDeleted != null) { |
| 1337 _queryParams["showDeleted"] = ["${showDeleted}"]; |
| 1338 } |
| 1339 if (source != null) { |
| 1340 _queryParams["source"] = [source]; |
| 1341 } |
| 1342 if (updatedMax != null) { |
| 1343 _queryParams["updatedMax"] = [updatedMax]; |
| 1344 } |
| 1345 if (updatedMin != null) { |
| 1346 _queryParams["updatedMin"] = [updatedMin]; |
| 1347 } |
| 1348 if (volumeId != null) { |
| 1349 _queryParams["volumeId"] = [volumeId]; |
| 1350 } |
| 1351 |
| 1352 |
| 1353 _url = 'mylibrary/annotations'; |
| 1354 |
| 1355 var _response = _requester.request(_url, |
| 1356 "GET", |
| 1357 body: _body, |
| 1358 queryParams: _queryParams, |
| 1359 uploadOptions: _uploadOptions, |
| 1360 uploadMedia: _uploadMedia, |
| 1361 downloadOptions: _downloadOptions); |
| 1362 return _response.then((data) => new Annotations.fromJson(data)); |
| 1363 } |
| 1364 |
| 1365 /** |
| 1366 * Gets the summary of specified layers. |
| 1367 * |
| 1368 * Request parameters: |
| 1369 * |
| 1370 * [layerIds] - Array of layer IDs to get the summary for. |
| 1371 * |
| 1372 * [volumeId] - Volume id to get the summary for. |
| 1373 * |
| 1374 * Completes with a [AnnotationsSummary]. |
| 1375 * |
| 1376 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1377 * error. |
| 1378 * |
| 1379 * If the used [http.Client] completes with an error when making a REST call, |
| 1380 * this method will complete with the same error. |
| 1381 */ |
| 1382 async.Future<AnnotationsSummary> summary(core.List<core.String> layerIds, core
.String volumeId) { |
| 1383 var _url = null; |
| 1384 var _queryParams = new core.Map(); |
| 1385 var _uploadMedia = null; |
| 1386 var _uploadOptions = null; |
| 1387 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1388 var _body = null; |
| 1389 |
| 1390 if (layerIds == null || layerIds.isEmpty) { |
| 1391 throw new core.ArgumentError("Parameter layerIds is required."); |
| 1392 } |
| 1393 _queryParams["layerIds"] = layerIds; |
| 1394 if (volumeId == null) { |
| 1395 throw new core.ArgumentError("Parameter volumeId is required."); |
| 1396 } |
| 1397 _queryParams["volumeId"] = [volumeId]; |
| 1398 |
| 1399 |
| 1400 _url = 'mylibrary/annotations/summary'; |
| 1401 |
| 1402 var _response = _requester.request(_url, |
| 1403 "POST", |
| 1404 body: _body, |
| 1405 queryParams: _queryParams, |
| 1406 uploadOptions: _uploadOptions, |
| 1407 uploadMedia: _uploadMedia, |
| 1408 downloadOptions: _downloadOptions); |
| 1409 return _response.then((data) => new AnnotationsSummary.fromJson(data)); |
| 1410 } |
| 1411 |
| 1412 /** |
| 1413 * Updates an existing annotation. |
| 1414 * |
| 1415 * [request] - The metadata request object. |
| 1416 * |
| 1417 * Request parameters: |
| 1418 * |
| 1419 * [annotationId] - The ID for the annotation to update. |
| 1420 * |
| 1421 * [source] - String to identify the originator of this request. |
| 1422 * |
| 1423 * Completes with a [Annotation]. |
| 1424 * |
| 1425 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1426 * error. |
| 1427 * |
| 1428 * If the used [http.Client] completes with an error when making a REST call, |
| 1429 * this method will complete with the same error. |
| 1430 */ |
| 1431 async.Future<Annotation> update(Annotation request, core.String annotationId,
{core.String source}) { |
| 1432 var _url = null; |
| 1433 var _queryParams = new core.Map(); |
| 1434 var _uploadMedia = null; |
| 1435 var _uploadOptions = null; |
| 1436 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1437 var _body = null; |
| 1438 |
| 1439 if (request != null) { |
| 1440 _body = convert.JSON.encode((request).toJson()); |
| 1441 } |
| 1442 if (annotationId == null) { |
| 1443 throw new core.ArgumentError("Parameter annotationId is required."); |
| 1444 } |
| 1445 if (source != null) { |
| 1446 _queryParams["source"] = [source]; |
| 1447 } |
| 1448 |
| 1449 |
| 1450 _url = 'mylibrary/annotations/' + common_internal.Escaper.ecapeVariable('$an
notationId'); |
| 1451 |
| 1452 var _response = _requester.request(_url, |
| 1453 "PUT", |
| 1454 body: _body, |
| 1455 queryParams: _queryParams, |
| 1456 uploadOptions: _uploadOptions, |
| 1457 uploadMedia: _uploadMedia, |
| 1458 downloadOptions: _downloadOptions); |
| 1459 return _response.then((data) => new Annotation.fromJson(data)); |
| 1460 } |
| 1461 |
| 1462 } |
| 1463 |
| 1464 |
| 1465 /** Not documented yet. */ |
| 1466 class MylibraryBookshelvesResourceApi { |
| 1467 final common_internal.ApiRequester _requester; |
| 1468 |
| 1469 MylibraryBookshelvesVolumesResourceApi get volumes => new MylibraryBookshelves
VolumesResourceApi(_requester); |
| 1470 |
| 1471 MylibraryBookshelvesResourceApi(common_internal.ApiRequester client) : |
| 1472 _requester = client; |
| 1473 |
| 1474 /** |
| 1475 * Adds a volume to a bookshelf. |
| 1476 * |
| 1477 * Request parameters: |
| 1478 * |
| 1479 * [shelf] - ID of bookshelf to which to add a volume. |
| 1480 * |
| 1481 * [volumeId] - ID of volume to add. |
| 1482 * |
| 1483 * [source] - String to identify the originator of this request. |
| 1484 * |
| 1485 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1486 * error. |
| 1487 * |
| 1488 * If the used [http.Client] completes with an error when making a REST call, |
| 1489 * this method will complete with the same error. |
| 1490 */ |
| 1491 async.Future addVolume(core.String shelf, core.String volumeId, {core.String s
ource}) { |
| 1492 var _url = null; |
| 1493 var _queryParams = new core.Map(); |
| 1494 var _uploadMedia = null; |
| 1495 var _uploadOptions = null; |
| 1496 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1497 var _body = null; |
| 1498 |
| 1499 if (shelf == null) { |
| 1500 throw new core.ArgumentError("Parameter shelf is required."); |
| 1501 } |
| 1502 if (volumeId == null) { |
| 1503 throw new core.ArgumentError("Parameter volumeId is required."); |
| 1504 } |
| 1505 _queryParams["volumeId"] = [volumeId]; |
| 1506 if (source != null) { |
| 1507 _queryParams["source"] = [source]; |
| 1508 } |
| 1509 |
| 1510 _downloadOptions = null; |
| 1511 |
| 1512 _url = 'mylibrary/bookshelves/' + common_internal.Escaper.ecapeVariable('$sh
elf') + '/addVolume'; |
| 1513 |
| 1514 var _response = _requester.request(_url, |
| 1515 "POST", |
| 1516 body: _body, |
| 1517 queryParams: _queryParams, |
| 1518 uploadOptions: _uploadOptions, |
| 1519 uploadMedia: _uploadMedia, |
| 1520 downloadOptions: _downloadOptions); |
| 1521 return _response.then((data) => null); |
| 1522 } |
| 1523 |
| 1524 /** |
| 1525 * Clears all volumes from a bookshelf. |
| 1526 * |
| 1527 * Request parameters: |
| 1528 * |
| 1529 * [shelf] - ID of bookshelf from which to remove a volume. |
| 1530 * |
| 1531 * [source] - String to identify the originator of this request. |
| 1532 * |
| 1533 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1534 * error. |
| 1535 * |
| 1536 * If the used [http.Client] completes with an error when making a REST call, |
| 1537 * this method will complete with the same error. |
| 1538 */ |
| 1539 async.Future clearVolumes(core.String shelf, {core.String source}) { |
| 1540 var _url = null; |
| 1541 var _queryParams = new core.Map(); |
| 1542 var _uploadMedia = null; |
| 1543 var _uploadOptions = null; |
| 1544 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1545 var _body = null; |
| 1546 |
| 1547 if (shelf == null) { |
| 1548 throw new core.ArgumentError("Parameter shelf is required."); |
| 1549 } |
| 1550 if (source != null) { |
| 1551 _queryParams["source"] = [source]; |
| 1552 } |
| 1553 |
| 1554 _downloadOptions = null; |
| 1555 |
| 1556 _url = 'mylibrary/bookshelves/' + common_internal.Escaper.ecapeVariable('$sh
elf') + '/clearVolumes'; |
| 1557 |
| 1558 var _response = _requester.request(_url, |
| 1559 "POST", |
| 1560 body: _body, |
| 1561 queryParams: _queryParams, |
| 1562 uploadOptions: _uploadOptions, |
| 1563 uploadMedia: _uploadMedia, |
| 1564 downloadOptions: _downloadOptions); |
| 1565 return _response.then((data) => null); |
| 1566 } |
| 1567 |
| 1568 /** |
| 1569 * Retrieves metadata for a specific bookshelf belonging to the authenticated |
| 1570 * user. |
| 1571 * |
| 1572 * Request parameters: |
| 1573 * |
| 1574 * [shelf] - ID of bookshelf to retrieve. |
| 1575 * |
| 1576 * [source] - String to identify the originator of this request. |
| 1577 * |
| 1578 * Completes with a [Bookshelf]. |
| 1579 * |
| 1580 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1581 * error. |
| 1582 * |
| 1583 * If the used [http.Client] completes with an error when making a REST call, |
| 1584 * this method will complete with the same error. |
| 1585 */ |
| 1586 async.Future<Bookshelf> get(core.String shelf, {core.String source}) { |
| 1587 var _url = null; |
| 1588 var _queryParams = new core.Map(); |
| 1589 var _uploadMedia = null; |
| 1590 var _uploadOptions = null; |
| 1591 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1592 var _body = null; |
| 1593 |
| 1594 if (shelf == null) { |
| 1595 throw new core.ArgumentError("Parameter shelf is required."); |
| 1596 } |
| 1597 if (source != null) { |
| 1598 _queryParams["source"] = [source]; |
| 1599 } |
| 1600 |
| 1601 |
| 1602 _url = 'mylibrary/bookshelves/' + common_internal.Escaper.ecapeVariable('$sh
elf'); |
| 1603 |
| 1604 var _response = _requester.request(_url, |
| 1605 "GET", |
| 1606 body: _body, |
| 1607 queryParams: _queryParams, |
| 1608 uploadOptions: _uploadOptions, |
| 1609 uploadMedia: _uploadMedia, |
| 1610 downloadOptions: _downloadOptions); |
| 1611 return _response.then((data) => new Bookshelf.fromJson(data)); |
| 1612 } |
| 1613 |
| 1614 /** |
| 1615 * Retrieves a list of bookshelves belonging to the authenticated user. |
| 1616 * |
| 1617 * Request parameters: |
| 1618 * |
| 1619 * [source] - String to identify the originator of this request. |
| 1620 * |
| 1621 * Completes with a [Bookshelves]. |
| 1622 * |
| 1623 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1624 * error. |
| 1625 * |
| 1626 * If the used [http.Client] completes with an error when making a REST call, |
| 1627 * this method will complete with the same error. |
| 1628 */ |
| 1629 async.Future<Bookshelves> list({core.String source}) { |
| 1630 var _url = null; |
| 1631 var _queryParams = new core.Map(); |
| 1632 var _uploadMedia = null; |
| 1633 var _uploadOptions = null; |
| 1634 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1635 var _body = null; |
| 1636 |
| 1637 if (source != null) { |
| 1638 _queryParams["source"] = [source]; |
| 1639 } |
| 1640 |
| 1641 |
| 1642 _url = 'mylibrary/bookshelves'; |
| 1643 |
| 1644 var _response = _requester.request(_url, |
| 1645 "GET", |
| 1646 body: _body, |
| 1647 queryParams: _queryParams, |
| 1648 uploadOptions: _uploadOptions, |
| 1649 uploadMedia: _uploadMedia, |
| 1650 downloadOptions: _downloadOptions); |
| 1651 return _response.then((data) => new Bookshelves.fromJson(data)); |
| 1652 } |
| 1653 |
| 1654 /** |
| 1655 * Moves a volume within a bookshelf. |
| 1656 * |
| 1657 * Request parameters: |
| 1658 * |
| 1659 * [shelf] - ID of bookshelf with the volume. |
| 1660 * |
| 1661 * [volumeId] - ID of volume to move. |
| 1662 * |
| 1663 * [volumePosition] - Position on shelf to move the item (0 puts the item |
| 1664 * before the current first item, 1 puts it between the first and the second |
| 1665 * and so on.) |
| 1666 * |
| 1667 * [source] - String to identify the originator of this request. |
| 1668 * |
| 1669 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1670 * error. |
| 1671 * |
| 1672 * If the used [http.Client] completes with an error when making a REST call, |
| 1673 * this method will complete with the same error. |
| 1674 */ |
| 1675 async.Future moveVolume(core.String shelf, core.String volumeId, core.int volu
mePosition, {core.String source}) { |
| 1676 var _url = null; |
| 1677 var _queryParams = new core.Map(); |
| 1678 var _uploadMedia = null; |
| 1679 var _uploadOptions = null; |
| 1680 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1681 var _body = null; |
| 1682 |
| 1683 if (shelf == null) { |
| 1684 throw new core.ArgumentError("Parameter shelf is required."); |
| 1685 } |
| 1686 if (volumeId == null) { |
| 1687 throw new core.ArgumentError("Parameter volumeId is required."); |
| 1688 } |
| 1689 _queryParams["volumeId"] = [volumeId]; |
| 1690 if (volumePosition == null) { |
| 1691 throw new core.ArgumentError("Parameter volumePosition is required."); |
| 1692 } |
| 1693 _queryParams["volumePosition"] = ["${volumePosition}"]; |
| 1694 if (source != null) { |
| 1695 _queryParams["source"] = [source]; |
| 1696 } |
| 1697 |
| 1698 _downloadOptions = null; |
| 1699 |
| 1700 _url = 'mylibrary/bookshelves/' + common_internal.Escaper.ecapeVariable('$sh
elf') + '/moveVolume'; |
| 1701 |
| 1702 var _response = _requester.request(_url, |
| 1703 "POST", |
| 1704 body: _body, |
| 1705 queryParams: _queryParams, |
| 1706 uploadOptions: _uploadOptions, |
| 1707 uploadMedia: _uploadMedia, |
| 1708 downloadOptions: _downloadOptions); |
| 1709 return _response.then((data) => null); |
| 1710 } |
| 1711 |
| 1712 /** |
| 1713 * Removes a volume from a bookshelf. |
| 1714 * |
| 1715 * Request parameters: |
| 1716 * |
| 1717 * [shelf] - ID of bookshelf from which to remove a volume. |
| 1718 * |
| 1719 * [volumeId] - ID of volume to remove. |
| 1720 * |
| 1721 * [source] - String to identify the originator of this request. |
| 1722 * |
| 1723 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1724 * error. |
| 1725 * |
| 1726 * If the used [http.Client] completes with an error when making a REST call, |
| 1727 * this method will complete with the same error. |
| 1728 */ |
| 1729 async.Future removeVolume(core.String shelf, core.String volumeId, {core.Strin
g source}) { |
| 1730 var _url = null; |
| 1731 var _queryParams = new core.Map(); |
| 1732 var _uploadMedia = null; |
| 1733 var _uploadOptions = null; |
| 1734 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1735 var _body = null; |
| 1736 |
| 1737 if (shelf == null) { |
| 1738 throw new core.ArgumentError("Parameter shelf is required."); |
| 1739 } |
| 1740 if (volumeId == null) { |
| 1741 throw new core.ArgumentError("Parameter volumeId is required."); |
| 1742 } |
| 1743 _queryParams["volumeId"] = [volumeId]; |
| 1744 if (source != null) { |
| 1745 _queryParams["source"] = [source]; |
| 1746 } |
| 1747 |
| 1748 _downloadOptions = null; |
| 1749 |
| 1750 _url = 'mylibrary/bookshelves/' + common_internal.Escaper.ecapeVariable('$sh
elf') + '/removeVolume'; |
| 1751 |
| 1752 var _response = _requester.request(_url, |
| 1753 "POST", |
| 1754 body: _body, |
| 1755 queryParams: _queryParams, |
| 1756 uploadOptions: _uploadOptions, |
| 1757 uploadMedia: _uploadMedia, |
| 1758 downloadOptions: _downloadOptions); |
| 1759 return _response.then((data) => null); |
| 1760 } |
| 1761 |
| 1762 } |
| 1763 |
| 1764 |
| 1765 /** Not documented yet. */ |
| 1766 class MylibraryBookshelvesVolumesResourceApi { |
| 1767 final common_internal.ApiRequester _requester; |
| 1768 |
| 1769 MylibraryBookshelvesVolumesResourceApi(common_internal.ApiRequester client) : |
| 1770 _requester = client; |
| 1771 |
| 1772 /** |
| 1773 * Gets volume information for volumes on a bookshelf. |
| 1774 * |
| 1775 * Request parameters: |
| 1776 * |
| 1777 * [shelf] - The bookshelf ID or name retrieve volumes for. |
| 1778 * |
| 1779 * [country] - ISO-3166-1 code to override the IP-based location. |
| 1780 * |
| 1781 * [maxResults] - Maximum number of results to return |
| 1782 * |
| 1783 * [projection] - Restrict information returned to a set of selected fields. |
| 1784 * Possible string values are: |
| 1785 * - "full" : Includes all volume data. |
| 1786 * - "lite" : Includes a subset of fields in volumeInfo and accessInfo. |
| 1787 * |
| 1788 * [q] - Full-text search query string in this bookshelf. |
| 1789 * |
| 1790 * [showPreorders] - Set to true to show pre-ordered books. Defaults to false. |
| 1791 * |
| 1792 * [source] - String to identify the originator of this request. |
| 1793 * |
| 1794 * [startIndex] - Index of the first element to return (starts at 0) |
| 1795 * |
| 1796 * Completes with a [Volumes]. |
| 1797 * |
| 1798 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1799 * error. |
| 1800 * |
| 1801 * If the used [http.Client] completes with an error when making a REST call, |
| 1802 * this method will complete with the same error. |
| 1803 */ |
| 1804 async.Future<Volumes> list(core.String shelf, {core.String country, core.int m
axResults, core.String projection, core.String q, core.bool showPreorders, core.
String source, core.int startIndex}) { |
| 1805 var _url = null; |
| 1806 var _queryParams = new core.Map(); |
| 1807 var _uploadMedia = null; |
| 1808 var _uploadOptions = null; |
| 1809 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1810 var _body = null; |
| 1811 |
| 1812 if (shelf == null) { |
| 1813 throw new core.ArgumentError("Parameter shelf is required."); |
| 1814 } |
| 1815 if (country != null) { |
| 1816 _queryParams["country"] = [country]; |
| 1817 } |
| 1818 if (maxResults != null) { |
| 1819 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1820 } |
| 1821 if (projection != null) { |
| 1822 _queryParams["projection"] = [projection]; |
| 1823 } |
| 1824 if (q != null) { |
| 1825 _queryParams["q"] = [q]; |
| 1826 } |
| 1827 if (showPreorders != null) { |
| 1828 _queryParams["showPreorders"] = ["${showPreorders}"]; |
| 1829 } |
| 1830 if (source != null) { |
| 1831 _queryParams["source"] = [source]; |
| 1832 } |
| 1833 if (startIndex != null) { |
| 1834 _queryParams["startIndex"] = ["${startIndex}"]; |
| 1835 } |
| 1836 |
| 1837 |
| 1838 _url = 'mylibrary/bookshelves/' + common_internal.Escaper.ecapeVariable('$sh
elf') + '/volumes'; |
| 1839 |
| 1840 var _response = _requester.request(_url, |
| 1841 "GET", |
| 1842 body: _body, |
| 1843 queryParams: _queryParams, |
| 1844 uploadOptions: _uploadOptions, |
| 1845 uploadMedia: _uploadMedia, |
| 1846 downloadOptions: _downloadOptions); |
| 1847 return _response.then((data) => new Volumes.fromJson(data)); |
| 1848 } |
| 1849 |
| 1850 } |
| 1851 |
| 1852 |
| 1853 /** Not documented yet. */ |
| 1854 class MylibraryReadingpositionsResourceApi { |
| 1855 final common_internal.ApiRequester _requester; |
| 1856 |
| 1857 MylibraryReadingpositionsResourceApi(common_internal.ApiRequester client) : |
| 1858 _requester = client; |
| 1859 |
| 1860 /** |
| 1861 * Retrieves my reading position information for a volume. |
| 1862 * |
| 1863 * Request parameters: |
| 1864 * |
| 1865 * [volumeId] - ID of volume for which to retrieve a reading position. |
| 1866 * |
| 1867 * [contentVersion] - Volume content version for which this reading position |
| 1868 * is requested. |
| 1869 * |
| 1870 * [source] - String to identify the originator of this request. |
| 1871 * |
| 1872 * Completes with a [ReadingPosition]. |
| 1873 * |
| 1874 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1875 * error. |
| 1876 * |
| 1877 * If the used [http.Client] completes with an error when making a REST call, |
| 1878 * this method will complete with the same error. |
| 1879 */ |
| 1880 async.Future<ReadingPosition> get(core.String volumeId, {core.String contentVe
rsion, core.String source}) { |
| 1881 var _url = null; |
| 1882 var _queryParams = new core.Map(); |
| 1883 var _uploadMedia = null; |
| 1884 var _uploadOptions = null; |
| 1885 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1886 var _body = null; |
| 1887 |
| 1888 if (volumeId == null) { |
| 1889 throw new core.ArgumentError("Parameter volumeId is required."); |
| 1890 } |
| 1891 if (contentVersion != null) { |
| 1892 _queryParams["contentVersion"] = [contentVersion]; |
| 1893 } |
| 1894 if (source != null) { |
| 1895 _queryParams["source"] = [source]; |
| 1896 } |
| 1897 |
| 1898 |
| 1899 _url = 'mylibrary/readingpositions/' + common_internal.Escaper.ecapeVariable
('$volumeId'); |
| 1900 |
| 1901 var _response = _requester.request(_url, |
| 1902 "GET", |
| 1903 body: _body, |
| 1904 queryParams: _queryParams, |
| 1905 uploadOptions: _uploadOptions, |
| 1906 uploadMedia: _uploadMedia, |
| 1907 downloadOptions: _downloadOptions); |
| 1908 return _response.then((data) => new ReadingPosition.fromJson(data)); |
| 1909 } |
| 1910 |
| 1911 /** |
| 1912 * Sets my reading position information for a volume. |
| 1913 * |
| 1914 * Request parameters: |
| 1915 * |
| 1916 * [volumeId] - ID of volume for which to update the reading position. |
| 1917 * |
| 1918 * [timestamp] - RFC 3339 UTC format timestamp associated with this reading |
| 1919 * position. |
| 1920 * |
| 1921 * [position] - Position string for the new volume reading position. |
| 1922 * |
| 1923 * [action] - Action that caused this reading position to be set. |
| 1924 * Possible string values are: |
| 1925 * - "bookmark" : User chose bookmark within volume. |
| 1926 * - "chapter" : User selected chapter from list. |
| 1927 * - "next-page" : Next page event. |
| 1928 * - "prev-page" : Previous page event. |
| 1929 * - "scroll" : User navigated to page. |
| 1930 * - "search" : User chose search results within volume. |
| 1931 * |
| 1932 * [contentVersion] - Volume content version for which this reading position |
| 1933 * applies. |
| 1934 * |
| 1935 * [deviceCookie] - Random persistent device cookie optional on set position. |
| 1936 * |
| 1937 * [source] - String to identify the originator of this request. |
| 1938 * |
| 1939 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 1940 * error. |
| 1941 * |
| 1942 * If the used [http.Client] completes with an error when making a REST call, |
| 1943 * this method will complete with the same error. |
| 1944 */ |
| 1945 async.Future setPosition(core.String volumeId, core.String timestamp, core.Str
ing position, {core.String action, core.String contentVersion, core.String devic
eCookie, core.String source}) { |
| 1946 var _url = null; |
| 1947 var _queryParams = new core.Map(); |
| 1948 var _uploadMedia = null; |
| 1949 var _uploadOptions = null; |
| 1950 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 1951 var _body = null; |
| 1952 |
| 1953 if (volumeId == null) { |
| 1954 throw new core.ArgumentError("Parameter volumeId is required."); |
| 1955 } |
| 1956 if (timestamp == null) { |
| 1957 throw new core.ArgumentError("Parameter timestamp is required."); |
| 1958 } |
| 1959 _queryParams["timestamp"] = [timestamp]; |
| 1960 if (position == null) { |
| 1961 throw new core.ArgumentError("Parameter position is required."); |
| 1962 } |
| 1963 _queryParams["position"] = [position]; |
| 1964 if (action != null) { |
| 1965 _queryParams["action"] = [action]; |
| 1966 } |
| 1967 if (contentVersion != null) { |
| 1968 _queryParams["contentVersion"] = [contentVersion]; |
| 1969 } |
| 1970 if (deviceCookie != null) { |
| 1971 _queryParams["deviceCookie"] = [deviceCookie]; |
| 1972 } |
| 1973 if (source != null) { |
| 1974 _queryParams["source"] = [source]; |
| 1975 } |
| 1976 |
| 1977 _downloadOptions = null; |
| 1978 |
| 1979 _url = 'mylibrary/readingpositions/' + common_internal.Escaper.ecapeVariable
('$volumeId') + '/setPosition'; |
| 1980 |
| 1981 var _response = _requester.request(_url, |
| 1982 "POST", |
| 1983 body: _body, |
| 1984 queryParams: _queryParams, |
| 1985 uploadOptions: _uploadOptions, |
| 1986 uploadMedia: _uploadMedia, |
| 1987 downloadOptions: _downloadOptions); |
| 1988 return _response.then((data) => null); |
| 1989 } |
| 1990 |
| 1991 } |
| 1992 |
| 1993 |
| 1994 /** Not documented yet. */ |
| 1995 class PromoofferResourceApi { |
| 1996 final common_internal.ApiRequester _requester; |
| 1997 |
| 1998 PromoofferResourceApi(common_internal.ApiRequester client) : |
| 1999 _requester = client; |
| 2000 |
| 2001 /** |
| 2002 * Not documented yet. |
| 2003 * |
| 2004 * Request parameters: |
| 2005 * |
| 2006 * [androidId] - device android_id |
| 2007 * |
| 2008 * [device] - device device |
| 2009 * |
| 2010 * [manufacturer] - device manufacturer |
| 2011 * |
| 2012 * [model] - device model |
| 2013 * |
| 2014 * [offerId] - null |
| 2015 * |
| 2016 * [product] - device product |
| 2017 * |
| 2018 * [serial] - device serial |
| 2019 * |
| 2020 * [volumeId] - Volume id to exercise the offer |
| 2021 * |
| 2022 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2023 * error. |
| 2024 * |
| 2025 * If the used [http.Client] completes with an error when making a REST call, |
| 2026 * this method will complete with the same error. |
| 2027 */ |
| 2028 async.Future accept({core.String androidId, core.String device, core.String ma
nufacturer, core.String model, core.String offerId, core.String product, core.St
ring serial, core.String volumeId}) { |
| 2029 var _url = null; |
| 2030 var _queryParams = new core.Map(); |
| 2031 var _uploadMedia = null; |
| 2032 var _uploadOptions = null; |
| 2033 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2034 var _body = null; |
| 2035 |
| 2036 if (androidId != null) { |
| 2037 _queryParams["androidId"] = [androidId]; |
| 2038 } |
| 2039 if (device != null) { |
| 2040 _queryParams["device"] = [device]; |
| 2041 } |
| 2042 if (manufacturer != null) { |
| 2043 _queryParams["manufacturer"] = [manufacturer]; |
| 2044 } |
| 2045 if (model != null) { |
| 2046 _queryParams["model"] = [model]; |
| 2047 } |
| 2048 if (offerId != null) { |
| 2049 _queryParams["offerId"] = [offerId]; |
| 2050 } |
| 2051 if (product != null) { |
| 2052 _queryParams["product"] = [product]; |
| 2053 } |
| 2054 if (serial != null) { |
| 2055 _queryParams["serial"] = [serial]; |
| 2056 } |
| 2057 if (volumeId != null) { |
| 2058 _queryParams["volumeId"] = [volumeId]; |
| 2059 } |
| 2060 |
| 2061 _downloadOptions = null; |
| 2062 |
| 2063 _url = 'promooffer/accept'; |
| 2064 |
| 2065 var _response = _requester.request(_url, |
| 2066 "POST", |
| 2067 body: _body, |
| 2068 queryParams: _queryParams, |
| 2069 uploadOptions: _uploadOptions, |
| 2070 uploadMedia: _uploadMedia, |
| 2071 downloadOptions: _downloadOptions); |
| 2072 return _response.then((data) => null); |
| 2073 } |
| 2074 |
| 2075 /** |
| 2076 * Not documented yet. |
| 2077 * |
| 2078 * Request parameters: |
| 2079 * |
| 2080 * [androidId] - device android_id |
| 2081 * |
| 2082 * [device] - device device |
| 2083 * |
| 2084 * [manufacturer] - device manufacturer |
| 2085 * |
| 2086 * [model] - device model |
| 2087 * |
| 2088 * [offerId] - Offer to dimiss |
| 2089 * |
| 2090 * [product] - device product |
| 2091 * |
| 2092 * [serial] - device serial |
| 2093 * |
| 2094 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2095 * error. |
| 2096 * |
| 2097 * If the used [http.Client] completes with an error when making a REST call, |
| 2098 * this method will complete with the same error. |
| 2099 */ |
| 2100 async.Future dismiss({core.String androidId, core.String device, core.String m
anufacturer, core.String model, core.String offerId, core.String product, core.S
tring serial}) { |
| 2101 var _url = null; |
| 2102 var _queryParams = new core.Map(); |
| 2103 var _uploadMedia = null; |
| 2104 var _uploadOptions = null; |
| 2105 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2106 var _body = null; |
| 2107 |
| 2108 if (androidId != null) { |
| 2109 _queryParams["androidId"] = [androidId]; |
| 2110 } |
| 2111 if (device != null) { |
| 2112 _queryParams["device"] = [device]; |
| 2113 } |
| 2114 if (manufacturer != null) { |
| 2115 _queryParams["manufacturer"] = [manufacturer]; |
| 2116 } |
| 2117 if (model != null) { |
| 2118 _queryParams["model"] = [model]; |
| 2119 } |
| 2120 if (offerId != null) { |
| 2121 _queryParams["offerId"] = [offerId]; |
| 2122 } |
| 2123 if (product != null) { |
| 2124 _queryParams["product"] = [product]; |
| 2125 } |
| 2126 if (serial != null) { |
| 2127 _queryParams["serial"] = [serial]; |
| 2128 } |
| 2129 |
| 2130 _downloadOptions = null; |
| 2131 |
| 2132 _url = 'promooffer/dismiss'; |
| 2133 |
| 2134 var _response = _requester.request(_url, |
| 2135 "POST", |
| 2136 body: _body, |
| 2137 queryParams: _queryParams, |
| 2138 uploadOptions: _uploadOptions, |
| 2139 uploadMedia: _uploadMedia, |
| 2140 downloadOptions: _downloadOptions); |
| 2141 return _response.then((data) => null); |
| 2142 } |
| 2143 |
| 2144 /** |
| 2145 * Returns a list of promo offers available to the user |
| 2146 * |
| 2147 * Request parameters: |
| 2148 * |
| 2149 * [androidId] - device android_id |
| 2150 * |
| 2151 * [device] - device device |
| 2152 * |
| 2153 * [manufacturer] - device manufacturer |
| 2154 * |
| 2155 * [model] - device model |
| 2156 * |
| 2157 * [product] - device product |
| 2158 * |
| 2159 * [serial] - device serial |
| 2160 * |
| 2161 * Completes with a [Offers]. |
| 2162 * |
| 2163 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2164 * error. |
| 2165 * |
| 2166 * If the used [http.Client] completes with an error when making a REST call, |
| 2167 * this method will complete with the same error. |
| 2168 */ |
| 2169 async.Future<Offers> get({core.String androidId, core.String device, core.Stri
ng manufacturer, core.String model, core.String product, core.String serial}) { |
| 2170 var _url = null; |
| 2171 var _queryParams = new core.Map(); |
| 2172 var _uploadMedia = null; |
| 2173 var _uploadOptions = null; |
| 2174 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2175 var _body = null; |
| 2176 |
| 2177 if (androidId != null) { |
| 2178 _queryParams["androidId"] = [androidId]; |
| 2179 } |
| 2180 if (device != null) { |
| 2181 _queryParams["device"] = [device]; |
| 2182 } |
| 2183 if (manufacturer != null) { |
| 2184 _queryParams["manufacturer"] = [manufacturer]; |
| 2185 } |
| 2186 if (model != null) { |
| 2187 _queryParams["model"] = [model]; |
| 2188 } |
| 2189 if (product != null) { |
| 2190 _queryParams["product"] = [product]; |
| 2191 } |
| 2192 if (serial != null) { |
| 2193 _queryParams["serial"] = [serial]; |
| 2194 } |
| 2195 |
| 2196 |
| 2197 _url = 'promooffer/get'; |
| 2198 |
| 2199 var _response = _requester.request(_url, |
| 2200 "GET", |
| 2201 body: _body, |
| 2202 queryParams: _queryParams, |
| 2203 uploadOptions: _uploadOptions, |
| 2204 uploadMedia: _uploadMedia, |
| 2205 downloadOptions: _downloadOptions); |
| 2206 return _response.then((data) => new Offers.fromJson(data)); |
| 2207 } |
| 2208 |
| 2209 } |
| 2210 |
| 2211 |
| 2212 /** Not documented yet. */ |
| 2213 class VolumesResourceApi { |
| 2214 final common_internal.ApiRequester _requester; |
| 2215 |
| 2216 VolumesAssociatedResourceApi get associated => new VolumesAssociatedResourceAp
i(_requester); |
| 2217 VolumesMybooksResourceApi get mybooks => new VolumesMybooksResourceApi(_reques
ter); |
| 2218 VolumesRecommendedResourceApi get recommended => new VolumesRecommendedResourc
eApi(_requester); |
| 2219 VolumesUseruploadedResourceApi get useruploaded => new VolumesUseruploadedReso
urceApi(_requester); |
| 2220 |
| 2221 VolumesResourceApi(common_internal.ApiRequester client) : |
| 2222 _requester = client; |
| 2223 |
| 2224 /** |
| 2225 * Gets volume information for a single volume. |
| 2226 * |
| 2227 * Request parameters: |
| 2228 * |
| 2229 * [volumeId] - ID of volume to retrieve. |
| 2230 * |
| 2231 * [country] - ISO-3166-1 code to override the IP-based location. |
| 2232 * |
| 2233 * [partner] - Brand results for partner ID. |
| 2234 * |
| 2235 * [projection] - Restrict information returned to a set of selected fields. |
| 2236 * Possible string values are: |
| 2237 * - "full" : Includes all volume data. |
| 2238 * - "lite" : Includes a subset of fields in volumeInfo and accessInfo. |
| 2239 * |
| 2240 * [source] - String to identify the originator of this request. |
| 2241 * |
| 2242 * Completes with a [Volume]. |
| 2243 * |
| 2244 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2245 * error. |
| 2246 * |
| 2247 * If the used [http.Client] completes with an error when making a REST call, |
| 2248 * this method will complete with the same error. |
| 2249 */ |
| 2250 async.Future<Volume> get(core.String volumeId, {core.String country, core.Stri
ng partner, core.String projection, core.String source}) { |
| 2251 var _url = null; |
| 2252 var _queryParams = new core.Map(); |
| 2253 var _uploadMedia = null; |
| 2254 var _uploadOptions = null; |
| 2255 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2256 var _body = null; |
| 2257 |
| 2258 if (volumeId == null) { |
| 2259 throw new core.ArgumentError("Parameter volumeId is required."); |
| 2260 } |
| 2261 if (country != null) { |
| 2262 _queryParams["country"] = [country]; |
| 2263 } |
| 2264 if (partner != null) { |
| 2265 _queryParams["partner"] = [partner]; |
| 2266 } |
| 2267 if (projection != null) { |
| 2268 _queryParams["projection"] = [projection]; |
| 2269 } |
| 2270 if (source != null) { |
| 2271 _queryParams["source"] = [source]; |
| 2272 } |
| 2273 |
| 2274 |
| 2275 _url = 'volumes/' + common_internal.Escaper.ecapeVariable('$volumeId'); |
| 2276 |
| 2277 var _response = _requester.request(_url, |
| 2278 "GET", |
| 2279 body: _body, |
| 2280 queryParams: _queryParams, |
| 2281 uploadOptions: _uploadOptions, |
| 2282 uploadMedia: _uploadMedia, |
| 2283 downloadOptions: _downloadOptions); |
| 2284 return _response.then((data) => new Volume.fromJson(data)); |
| 2285 } |
| 2286 |
| 2287 /** |
| 2288 * Performs a book search. |
| 2289 * |
| 2290 * Request parameters: |
| 2291 * |
| 2292 * [q] - Full-text search query string. |
| 2293 * |
| 2294 * [download] - Restrict to volumes by download availability. |
| 2295 * Possible string values are: |
| 2296 * - "epub" : All volumes with epub. |
| 2297 * |
| 2298 * [filter] - Filter search results. |
| 2299 * Possible string values are: |
| 2300 * - "ebooks" : All Google eBooks. |
| 2301 * - "free-ebooks" : Google eBook with full volume text viewability. |
| 2302 * - "full" : Public can view entire volume text. |
| 2303 * - "paid-ebooks" : Google eBook with a price. |
| 2304 * - "partial" : Public able to see parts of text. |
| 2305 * |
| 2306 * [langRestrict] - Restrict results to books with this language code. |
| 2307 * |
| 2308 * [libraryRestrict] - Restrict search to this user's library. |
| 2309 * Possible string values are: |
| 2310 * - "my-library" : Restrict to the user's library, any shelf. |
| 2311 * - "no-restrict" : Do not restrict based on user's library. |
| 2312 * |
| 2313 * [maxResults] - Maximum number of results to return. |
| 2314 * Value must be between "0" and "40". |
| 2315 * |
| 2316 * [orderBy] - Sort search results. |
| 2317 * Possible string values are: |
| 2318 * - "newest" : Most recently published. |
| 2319 * - "relevance" : Relevance to search terms. |
| 2320 * |
| 2321 * [partner] - Restrict and brand results for partner ID. |
| 2322 * |
| 2323 * [printType] - Restrict to books or magazines. |
| 2324 * Possible string values are: |
| 2325 * - "all" : All volume content types. |
| 2326 * - "books" : Just books. |
| 2327 * - "magazines" : Just magazines. |
| 2328 * |
| 2329 * [projection] - Restrict information returned to a set of selected fields. |
| 2330 * Possible string values are: |
| 2331 * - "full" : Includes all volume data. |
| 2332 * - "lite" : Includes a subset of fields in volumeInfo and accessInfo. |
| 2333 * |
| 2334 * [showPreorders] - Set to true to show books available for preorder. |
| 2335 * Defaults to false. |
| 2336 * |
| 2337 * [source] - String to identify the originator of this request. |
| 2338 * |
| 2339 * [startIndex] - Index of the first result to return (starts at 0) |
| 2340 * |
| 2341 * Completes with a [Volumes]. |
| 2342 * |
| 2343 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2344 * error. |
| 2345 * |
| 2346 * If the used [http.Client] completes with an error when making a REST call, |
| 2347 * this method will complete with the same error. |
| 2348 */ |
| 2349 async.Future<Volumes> list(core.String q, {core.String download, core.String f
ilter, core.String langRestrict, core.String libraryRestrict, core.int maxResult
s, core.String orderBy, core.String partner, core.String printType, core.String
projection, core.bool showPreorders, core.String source, core.int startIndex}) { |
| 2350 var _url = null; |
| 2351 var _queryParams = new core.Map(); |
| 2352 var _uploadMedia = null; |
| 2353 var _uploadOptions = null; |
| 2354 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2355 var _body = null; |
| 2356 |
| 2357 if (q == null) { |
| 2358 throw new core.ArgumentError("Parameter q is required."); |
| 2359 } |
| 2360 _queryParams["q"] = [q]; |
| 2361 if (download != null) { |
| 2362 _queryParams["download"] = [download]; |
| 2363 } |
| 2364 if (filter != null) { |
| 2365 _queryParams["filter"] = [filter]; |
| 2366 } |
| 2367 if (langRestrict != null) { |
| 2368 _queryParams["langRestrict"] = [langRestrict]; |
| 2369 } |
| 2370 if (libraryRestrict != null) { |
| 2371 _queryParams["libraryRestrict"] = [libraryRestrict]; |
| 2372 } |
| 2373 if (maxResults != null) { |
| 2374 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2375 } |
| 2376 if (orderBy != null) { |
| 2377 _queryParams["orderBy"] = [orderBy]; |
| 2378 } |
| 2379 if (partner != null) { |
| 2380 _queryParams["partner"] = [partner]; |
| 2381 } |
| 2382 if (printType != null) { |
| 2383 _queryParams["printType"] = [printType]; |
| 2384 } |
| 2385 if (projection != null) { |
| 2386 _queryParams["projection"] = [projection]; |
| 2387 } |
| 2388 if (showPreorders != null) { |
| 2389 _queryParams["showPreorders"] = ["${showPreorders}"]; |
| 2390 } |
| 2391 if (source != null) { |
| 2392 _queryParams["source"] = [source]; |
| 2393 } |
| 2394 if (startIndex != null) { |
| 2395 _queryParams["startIndex"] = ["${startIndex}"]; |
| 2396 } |
| 2397 |
| 2398 |
| 2399 _url = 'volumes'; |
| 2400 |
| 2401 var _response = _requester.request(_url, |
| 2402 "GET", |
| 2403 body: _body, |
| 2404 queryParams: _queryParams, |
| 2405 uploadOptions: _uploadOptions, |
| 2406 uploadMedia: _uploadMedia, |
| 2407 downloadOptions: _downloadOptions); |
| 2408 return _response.then((data) => new Volumes.fromJson(data)); |
| 2409 } |
| 2410 |
| 2411 } |
| 2412 |
| 2413 |
| 2414 /** Not documented yet. */ |
| 2415 class VolumesAssociatedResourceApi { |
| 2416 final common_internal.ApiRequester _requester; |
| 2417 |
| 2418 VolumesAssociatedResourceApi(common_internal.ApiRequester client) : |
| 2419 _requester = client; |
| 2420 |
| 2421 /** |
| 2422 * Return a list of associated books. |
| 2423 * |
| 2424 * Request parameters: |
| 2425 * |
| 2426 * [volumeId] - ID of the source volume. |
| 2427 * |
| 2428 * [association] - Association type. |
| 2429 * Possible string values are: |
| 2430 * - "end-of-sample" : Recommendations for display end-of-sample. |
| 2431 * - "end-of-volume" : Recommendations for display end-of-volume. |
| 2432 * |
| 2433 * [locale] - ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. |
| 2434 * Used for generating recommendations. |
| 2435 * |
| 2436 * [source] - String to identify the originator of this request. |
| 2437 * |
| 2438 * Completes with a [Volumes]. |
| 2439 * |
| 2440 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2441 * error. |
| 2442 * |
| 2443 * If the used [http.Client] completes with an error when making a REST call, |
| 2444 * this method will complete with the same error. |
| 2445 */ |
| 2446 async.Future<Volumes> list(core.String volumeId, {core.String association, cor
e.String locale, core.String source}) { |
| 2447 var _url = null; |
| 2448 var _queryParams = new core.Map(); |
| 2449 var _uploadMedia = null; |
| 2450 var _uploadOptions = null; |
| 2451 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2452 var _body = null; |
| 2453 |
| 2454 if (volumeId == null) { |
| 2455 throw new core.ArgumentError("Parameter volumeId is required."); |
| 2456 } |
| 2457 if (association != null) { |
| 2458 _queryParams["association"] = [association]; |
| 2459 } |
| 2460 if (locale != null) { |
| 2461 _queryParams["locale"] = [locale]; |
| 2462 } |
| 2463 if (source != null) { |
| 2464 _queryParams["source"] = [source]; |
| 2465 } |
| 2466 |
| 2467 |
| 2468 _url = 'volumes/' + common_internal.Escaper.ecapeVariable('$volumeId') + '/a
ssociated'; |
| 2469 |
| 2470 var _response = _requester.request(_url, |
| 2471 "GET", |
| 2472 body: _body, |
| 2473 queryParams: _queryParams, |
| 2474 uploadOptions: _uploadOptions, |
| 2475 uploadMedia: _uploadMedia, |
| 2476 downloadOptions: _downloadOptions); |
| 2477 return _response.then((data) => new Volumes.fromJson(data)); |
| 2478 } |
| 2479 |
| 2480 } |
| 2481 |
| 2482 |
| 2483 /** Not documented yet. */ |
| 2484 class VolumesMybooksResourceApi { |
| 2485 final common_internal.ApiRequester _requester; |
| 2486 |
| 2487 VolumesMybooksResourceApi(common_internal.ApiRequester client) : |
| 2488 _requester = client; |
| 2489 |
| 2490 /** |
| 2491 * Return a list of books in My Library. |
| 2492 * |
| 2493 * Request parameters: |
| 2494 * |
| 2495 * [acquireMethod] - How the book was aquired |
| 2496 * |
| 2497 * [locale] - ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used |
| 2498 * for generating recommendations. |
| 2499 * |
| 2500 * [maxResults] - Maximum number of results to return. |
| 2501 * Value must be between "0" and "100". |
| 2502 * |
| 2503 * [processingState] - The processing state of the user uploaded volumes to be |
| 2504 * returned. Applicable only if the UPLOADED is specified in the |
| 2505 * acquireMethod. |
| 2506 * |
| 2507 * [source] - String to identify the originator of this request. |
| 2508 * |
| 2509 * [startIndex] - Index of the first result to return (starts at 0) |
| 2510 * |
| 2511 * Completes with a [Volumes]. |
| 2512 * |
| 2513 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2514 * error. |
| 2515 * |
| 2516 * If the used [http.Client] completes with an error when making a REST call, |
| 2517 * this method will complete with the same error. |
| 2518 */ |
| 2519 async.Future<Volumes> list({core.List<core.String> acquireMethod, core.String
locale, core.int maxResults, core.List<core.String> processingState, core.String
source, core.int startIndex}) { |
| 2520 var _url = null; |
| 2521 var _queryParams = new core.Map(); |
| 2522 var _uploadMedia = null; |
| 2523 var _uploadOptions = null; |
| 2524 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2525 var _body = null; |
| 2526 |
| 2527 if (acquireMethod != null) { |
| 2528 _queryParams["acquireMethod"] = acquireMethod; |
| 2529 } |
| 2530 if (locale != null) { |
| 2531 _queryParams["locale"] = [locale]; |
| 2532 } |
| 2533 if (maxResults != null) { |
| 2534 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2535 } |
| 2536 if (processingState != null) { |
| 2537 _queryParams["processingState"] = processingState; |
| 2538 } |
| 2539 if (source != null) { |
| 2540 _queryParams["source"] = [source]; |
| 2541 } |
| 2542 if (startIndex != null) { |
| 2543 _queryParams["startIndex"] = ["${startIndex}"]; |
| 2544 } |
| 2545 |
| 2546 |
| 2547 _url = 'volumes/mybooks'; |
| 2548 |
| 2549 var _response = _requester.request(_url, |
| 2550 "GET", |
| 2551 body: _body, |
| 2552 queryParams: _queryParams, |
| 2553 uploadOptions: _uploadOptions, |
| 2554 uploadMedia: _uploadMedia, |
| 2555 downloadOptions: _downloadOptions); |
| 2556 return _response.then((data) => new Volumes.fromJson(data)); |
| 2557 } |
| 2558 |
| 2559 } |
| 2560 |
| 2561 |
| 2562 /** Not documented yet. */ |
| 2563 class VolumesRecommendedResourceApi { |
| 2564 final common_internal.ApiRequester _requester; |
| 2565 |
| 2566 VolumesRecommendedResourceApi(common_internal.ApiRequester client) : |
| 2567 _requester = client; |
| 2568 |
| 2569 /** |
| 2570 * Return a list of recommended books for the current user. |
| 2571 * |
| 2572 * Request parameters: |
| 2573 * |
| 2574 * [locale] - ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. |
| 2575 * Used for generating recommendations. |
| 2576 * |
| 2577 * [source] - String to identify the originator of this request. |
| 2578 * |
| 2579 * Completes with a [Volumes]. |
| 2580 * |
| 2581 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2582 * error. |
| 2583 * |
| 2584 * If the used [http.Client] completes with an error when making a REST call, |
| 2585 * this method will complete with the same error. |
| 2586 */ |
| 2587 async.Future<Volumes> list({core.String locale, core.String source}) { |
| 2588 var _url = null; |
| 2589 var _queryParams = new core.Map(); |
| 2590 var _uploadMedia = null; |
| 2591 var _uploadOptions = null; |
| 2592 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2593 var _body = null; |
| 2594 |
| 2595 if (locale != null) { |
| 2596 _queryParams["locale"] = [locale]; |
| 2597 } |
| 2598 if (source != null) { |
| 2599 _queryParams["source"] = [source]; |
| 2600 } |
| 2601 |
| 2602 |
| 2603 _url = 'volumes/recommended'; |
| 2604 |
| 2605 var _response = _requester.request(_url, |
| 2606 "GET", |
| 2607 body: _body, |
| 2608 queryParams: _queryParams, |
| 2609 uploadOptions: _uploadOptions, |
| 2610 uploadMedia: _uploadMedia, |
| 2611 downloadOptions: _downloadOptions); |
| 2612 return _response.then((data) => new Volumes.fromJson(data)); |
| 2613 } |
| 2614 |
| 2615 /** |
| 2616 * Rate a recommended book for the current user. |
| 2617 * |
| 2618 * Request parameters: |
| 2619 * |
| 2620 * [rating] - Rating to be given to the volume. |
| 2621 * Possible string values are: |
| 2622 * - "HAVE_IT" : Rating indicating a dismissal due to ownership. |
| 2623 * - "NOT_INTERESTED" : Rating indicating a negative dismissal of a volume. |
| 2624 * |
| 2625 * [volumeId] - ID of the source volume. |
| 2626 * |
| 2627 * [locale] - ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. |
| 2628 * Used for generating recommendations. |
| 2629 * |
| 2630 * [source] - String to identify the originator of this request. |
| 2631 * |
| 2632 * Completes with a [BooksVolumesRecommendedRateResponse]. |
| 2633 * |
| 2634 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2635 * error. |
| 2636 * |
| 2637 * If the used [http.Client] completes with an error when making a REST call, |
| 2638 * this method will complete with the same error. |
| 2639 */ |
| 2640 async.Future<BooksVolumesRecommendedRateResponse> rate(core.String rating, cor
e.String volumeId, {core.String locale, core.String source}) { |
| 2641 var _url = null; |
| 2642 var _queryParams = new core.Map(); |
| 2643 var _uploadMedia = null; |
| 2644 var _uploadOptions = null; |
| 2645 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2646 var _body = null; |
| 2647 |
| 2648 if (rating == null) { |
| 2649 throw new core.ArgumentError("Parameter rating is required."); |
| 2650 } |
| 2651 _queryParams["rating"] = [rating]; |
| 2652 if (volumeId == null) { |
| 2653 throw new core.ArgumentError("Parameter volumeId is required."); |
| 2654 } |
| 2655 _queryParams["volumeId"] = [volumeId]; |
| 2656 if (locale != null) { |
| 2657 _queryParams["locale"] = [locale]; |
| 2658 } |
| 2659 if (source != null) { |
| 2660 _queryParams["source"] = [source]; |
| 2661 } |
| 2662 |
| 2663 |
| 2664 _url = 'volumes/recommended/rate'; |
| 2665 |
| 2666 var _response = _requester.request(_url, |
| 2667 "POST", |
| 2668 body: _body, |
| 2669 queryParams: _queryParams, |
| 2670 uploadOptions: _uploadOptions, |
| 2671 uploadMedia: _uploadMedia, |
| 2672 downloadOptions: _downloadOptions); |
| 2673 return _response.then((data) => new BooksVolumesRecommendedRateResponse.from
Json(data)); |
| 2674 } |
| 2675 |
| 2676 } |
| 2677 |
| 2678 |
| 2679 /** Not documented yet. */ |
| 2680 class VolumesUseruploadedResourceApi { |
| 2681 final common_internal.ApiRequester _requester; |
| 2682 |
| 2683 VolumesUseruploadedResourceApi(common_internal.ApiRequester client) : |
| 2684 _requester = client; |
| 2685 |
| 2686 /** |
| 2687 * Return a list of books uploaded by the current user. |
| 2688 * |
| 2689 * Request parameters: |
| 2690 * |
| 2691 * [locale] - ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. |
| 2692 * Used for generating recommendations. |
| 2693 * |
| 2694 * [maxResults] - Maximum number of results to return. |
| 2695 * Value must be between "0" and "40". |
| 2696 * |
| 2697 * [processingState] - The processing state of the user uploaded volumes to be |
| 2698 * returned. |
| 2699 * |
| 2700 * [source] - String to identify the originator of this request. |
| 2701 * |
| 2702 * [startIndex] - Index of the first result to return (starts at 0) |
| 2703 * |
| 2704 * [volumeId] - The ids of the volumes to be returned. If not specified all |
| 2705 * that match the processingState are returned. |
| 2706 * |
| 2707 * Completes with a [Volumes]. |
| 2708 * |
| 2709 * Completes with a [common_1.ApiRequestError] if the API endpoint returned an |
| 2710 * error. |
| 2711 * |
| 2712 * If the used [http.Client] completes with an error when making a REST call, |
| 2713 * this method will complete with the same error. |
| 2714 */ |
| 2715 async.Future<Volumes> list({core.String locale, core.int maxResults, core.List
<core.String> processingState, core.String source, core.int startIndex, core.Lis
t<core.String> volumeId}) { |
| 2716 var _url = null; |
| 2717 var _queryParams = new core.Map(); |
| 2718 var _uploadMedia = null; |
| 2719 var _uploadOptions = null; |
| 2720 var _downloadOptions = common_1.DownloadOptions.Metadata; |
| 2721 var _body = null; |
| 2722 |
| 2723 if (locale != null) { |
| 2724 _queryParams["locale"] = [locale]; |
| 2725 } |
| 2726 if (maxResults != null) { |
| 2727 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2728 } |
| 2729 if (processingState != null) { |
| 2730 _queryParams["processingState"] = processingState; |
| 2731 } |
| 2732 if (source != null) { |
| 2733 _queryParams["source"] = [source]; |
| 2734 } |
| 2735 if (startIndex != null) { |
| 2736 _queryParams["startIndex"] = ["${startIndex}"]; |
| 2737 } |
| 2738 if (volumeId != null) { |
| 2739 _queryParams["volumeId"] = volumeId; |
| 2740 } |
| 2741 |
| 2742 |
| 2743 _url = 'volumes/useruploaded'; |
| 2744 |
| 2745 var _response = _requester.request(_url, |
| 2746 "GET", |
| 2747 body: _body, |
| 2748 queryParams: _queryParams, |
| 2749 uploadOptions: _uploadOptions, |
| 2750 uploadMedia: _uploadMedia, |
| 2751 downloadOptions: _downloadOptions); |
| 2752 return _response.then((data) => new Volumes.fromJson(data)); |
| 2753 } |
| 2754 |
| 2755 } |
| 2756 |
| 2757 |
| 2758 |
| 2759 /** Selection ranges sent from the client. */ |
| 2760 class AnnotationClientVersionRanges { |
| 2761 /** Range in CFI format for this annotation sent by client. */ |
| 2762 BooksAnnotationsRange cfiRange; |
| 2763 |
| 2764 /** Content version the client sent in. */ |
| 2765 core.String contentVersion; |
| 2766 |
| 2767 /** Range in GB image format for this annotation sent by client. */ |
| 2768 BooksAnnotationsRange gbImageRange; |
| 2769 |
| 2770 /** Range in GB text format for this annotation sent by client. */ |
| 2771 BooksAnnotationsRange gbTextRange; |
| 2772 |
| 2773 /** Range in image CFI format for this annotation sent by client. */ |
| 2774 BooksAnnotationsRange imageCfiRange; |
| 2775 |
| 2776 |
| 2777 AnnotationClientVersionRanges(); |
| 2778 |
| 2779 AnnotationClientVersionRanges.fromJson(core.Map _json) { |
| 2780 if (_json.containsKey("cfiRange")) { |
| 2781 cfiRange = new BooksAnnotationsRange.fromJson(_json["cfiRange"]); |
| 2782 } |
| 2783 if (_json.containsKey("contentVersion")) { |
| 2784 contentVersion = _json["contentVersion"]; |
| 2785 } |
| 2786 if (_json.containsKey("gbImageRange")) { |
| 2787 gbImageRange = new BooksAnnotationsRange.fromJson(_json["gbImageRange"]); |
| 2788 } |
| 2789 if (_json.containsKey("gbTextRange")) { |
| 2790 gbTextRange = new BooksAnnotationsRange.fromJson(_json["gbTextRange"]); |
| 2791 } |
| 2792 if (_json.containsKey("imageCfiRange")) { |
| 2793 imageCfiRange = new BooksAnnotationsRange.fromJson(_json["imageCfiRange"])
; |
| 2794 } |
| 2795 } |
| 2796 |
| 2797 core.Map toJson() { |
| 2798 var _json = new core.Map(); |
| 2799 if (cfiRange != null) { |
| 2800 _json["cfiRange"] = (cfiRange).toJson(); |
| 2801 } |
| 2802 if (contentVersion != null) { |
| 2803 _json["contentVersion"] = contentVersion; |
| 2804 } |
| 2805 if (gbImageRange != null) { |
| 2806 _json["gbImageRange"] = (gbImageRange).toJson(); |
| 2807 } |
| 2808 if (gbTextRange != null) { |
| 2809 _json["gbTextRange"] = (gbTextRange).toJson(); |
| 2810 } |
| 2811 if (imageCfiRange != null) { |
| 2812 _json["imageCfiRange"] = (imageCfiRange).toJson(); |
| 2813 } |
| 2814 return _json; |
| 2815 } |
| 2816 } |
| 2817 |
| 2818 |
| 2819 /** Selection ranges for the most recent content version. */ |
| 2820 class AnnotationCurrentVersionRanges { |
| 2821 /** Range in CFI format for this annotation for version above. */ |
| 2822 BooksAnnotationsRange cfiRange; |
| 2823 |
| 2824 /** Content version applicable to ranges below. */ |
| 2825 core.String contentVersion; |
| 2826 |
| 2827 /** Range in GB image format for this annotation for version above. */ |
| 2828 BooksAnnotationsRange gbImageRange; |
| 2829 |
| 2830 /** Range in GB text format for this annotation for version above. */ |
| 2831 BooksAnnotationsRange gbTextRange; |
| 2832 |
| 2833 /** Range in image CFI format for this annotation for version above. */ |
| 2834 BooksAnnotationsRange imageCfiRange; |
| 2835 |
| 2836 |
| 2837 AnnotationCurrentVersionRanges(); |
| 2838 |
| 2839 AnnotationCurrentVersionRanges.fromJson(core.Map _json) { |
| 2840 if (_json.containsKey("cfiRange")) { |
| 2841 cfiRange = new BooksAnnotationsRange.fromJson(_json["cfiRange"]); |
| 2842 } |
| 2843 if (_json.containsKey("contentVersion")) { |
| 2844 contentVersion = _json["contentVersion"]; |
| 2845 } |
| 2846 if (_json.containsKey("gbImageRange")) { |
| 2847 gbImageRange = new BooksAnnotationsRange.fromJson(_json["gbImageRange"]); |
| 2848 } |
| 2849 if (_json.containsKey("gbTextRange")) { |
| 2850 gbTextRange = new BooksAnnotationsRange.fromJson(_json["gbTextRange"]); |
| 2851 } |
| 2852 if (_json.containsKey("imageCfiRange")) { |
| 2853 imageCfiRange = new BooksAnnotationsRange.fromJson(_json["imageCfiRange"])
; |
| 2854 } |
| 2855 } |
| 2856 |
| 2857 core.Map toJson() { |
| 2858 var _json = new core.Map(); |
| 2859 if (cfiRange != null) { |
| 2860 _json["cfiRange"] = (cfiRange).toJson(); |
| 2861 } |
| 2862 if (contentVersion != null) { |
| 2863 _json["contentVersion"] = contentVersion; |
| 2864 } |
| 2865 if (gbImageRange != null) { |
| 2866 _json["gbImageRange"] = (gbImageRange).toJson(); |
| 2867 } |
| 2868 if (gbTextRange != null) { |
| 2869 _json["gbTextRange"] = (gbTextRange).toJson(); |
| 2870 } |
| 2871 if (imageCfiRange != null) { |
| 2872 _json["imageCfiRange"] = (imageCfiRange).toJson(); |
| 2873 } |
| 2874 return _json; |
| 2875 } |
| 2876 } |
| 2877 |
| 2878 |
| 2879 /** Not documented yet. */ |
| 2880 class AnnotationLayerSummary { |
| 2881 /** |
| 2882 * Maximum allowed characters on this layer, especially for the "copy" layer. |
| 2883 */ |
| 2884 core.int allowedCharacterCount; |
| 2885 |
| 2886 /** |
| 2887 * Type of limitation on this layer. "limited" or "unlimited" for the "copy" |
| 2888 * layer. |
| 2889 */ |
| 2890 core.String limitType; |
| 2891 |
| 2892 /** |
| 2893 * Remaining allowed characters on this layer, especially for the "copy" |
| 2894 * layer. |
| 2895 */ |
| 2896 core.int remainingCharacterCount; |
| 2897 |
| 2898 |
| 2899 AnnotationLayerSummary(); |
| 2900 |
| 2901 AnnotationLayerSummary.fromJson(core.Map _json) { |
| 2902 if (_json.containsKey("allowedCharacterCount")) { |
| 2903 allowedCharacterCount = _json["allowedCharacterCount"]; |
| 2904 } |
| 2905 if (_json.containsKey("limitType")) { |
| 2906 limitType = _json["limitType"]; |
| 2907 } |
| 2908 if (_json.containsKey("remainingCharacterCount")) { |
| 2909 remainingCharacterCount = _json["remainingCharacterCount"]; |
| 2910 } |
| 2911 } |
| 2912 |
| 2913 core.Map toJson() { |
| 2914 var _json = new core.Map(); |
| 2915 if (allowedCharacterCount != null) { |
| 2916 _json["allowedCharacterCount"] = allowedCharacterCount; |
| 2917 } |
| 2918 if (limitType != null) { |
| 2919 _json["limitType"] = limitType; |
| 2920 } |
| 2921 if (remainingCharacterCount != null) { |
| 2922 _json["remainingCharacterCount"] = remainingCharacterCount; |
| 2923 } |
| 2924 return _json; |
| 2925 } |
| 2926 } |
| 2927 |
| 2928 |
| 2929 /** Not documented yet. */ |
| 2930 class Annotation { |
| 2931 /** |
| 2932 * Anchor text after excerpt. For requests, if the user bookmarked a screen |
| 2933 * that has no flowing text on it, then this field should be empty. |
| 2934 */ |
| 2935 core.String afterSelectedText; |
| 2936 |
| 2937 /** |
| 2938 * Anchor text before excerpt. For requests, if the user bookmarked a screen |
| 2939 * that has no flowing text on it, then this field should be empty. |
| 2940 */ |
| 2941 core.String beforeSelectedText; |
| 2942 |
| 2943 /** Selection ranges sent from the client. */ |
| 2944 AnnotationClientVersionRanges clientVersionRanges; |
| 2945 |
| 2946 /** Timestamp for the created time of this annotation. */ |
| 2947 core.DateTime created; |
| 2948 |
| 2949 /** Selection ranges for the most recent content version. */ |
| 2950 AnnotationCurrentVersionRanges currentVersionRanges; |
| 2951 |
| 2952 /** User-created data for this annotation. */ |
| 2953 core.String data; |
| 2954 |
| 2955 /** Indicates that this annotation is deleted. */ |
| 2956 core.bool deleted; |
| 2957 |
| 2958 /** The highlight style for this annotation. */ |
| 2959 core.String highlightStyle; |
| 2960 |
| 2961 /** Id of this annotation, in the form of a GUID. */ |
| 2962 core.String id; |
| 2963 |
| 2964 /** Resource type. */ |
| 2965 core.String kind; |
| 2966 |
| 2967 /** The layer this annotation is for. */ |
| 2968 core.String layerId; |
| 2969 |
| 2970 /** Not documented yet. */ |
| 2971 AnnotationLayerSummary layerSummary; |
| 2972 |
| 2973 /** Pages that this annotation spans. */ |
| 2974 core.List<core.String> pageIds; |
| 2975 |
| 2976 /** Excerpt from the volume. */ |
| 2977 core.String selectedText; |
| 2978 |
| 2979 /** URL to this resource. */ |
| 2980 core.String selfLink; |
| 2981 |
| 2982 /** Timestamp for the last time this annotation was modified. */ |
| 2983 core.DateTime updated; |
| 2984 |
| 2985 /** The volume that this annotation belongs to. */ |
| 2986 core.String volumeId; |
| 2987 |
| 2988 |
| 2989 Annotation(); |
| 2990 |
| 2991 Annotation.fromJson(core.Map _json) { |
| 2992 if (_json.containsKey("afterSelectedText")) { |
| 2993 afterSelectedText = _json["afterSelectedText"]; |
| 2994 } |
| 2995 if (_json.containsKey("beforeSelectedText")) { |
| 2996 beforeSelectedText = _json["beforeSelectedText"]; |
| 2997 } |
| 2998 if (_json.containsKey("clientVersionRanges")) { |
| 2999 clientVersionRanges = new AnnotationClientVersionRanges.fromJson(_json["cl
ientVersionRanges"]); |
| 3000 } |
| 3001 if (_json.containsKey("created")) { |
| 3002 created = core.DateTime.parse(_json["created"]); |
| 3003 } |
| 3004 if (_json.containsKey("currentVersionRanges")) { |
| 3005 currentVersionRanges = new AnnotationCurrentVersionRanges.fromJson(_json["
currentVersionRanges"]); |
| 3006 } |
| 3007 if (_json.containsKey("data")) { |
| 3008 data = _json["data"]; |
| 3009 } |
| 3010 if (_json.containsKey("deleted")) { |
| 3011 deleted = _json["deleted"]; |
| 3012 } |
| 3013 if (_json.containsKey("highlightStyle")) { |
| 3014 highlightStyle = _json["highlightStyle"]; |
| 3015 } |
| 3016 if (_json.containsKey("id")) { |
| 3017 id = _json["id"]; |
| 3018 } |
| 3019 if (_json.containsKey("kind")) { |
| 3020 kind = _json["kind"]; |
| 3021 } |
| 3022 if (_json.containsKey("layerId")) { |
| 3023 layerId = _json["layerId"]; |
| 3024 } |
| 3025 if (_json.containsKey("layerSummary")) { |
| 3026 layerSummary = new AnnotationLayerSummary.fromJson(_json["layerSummary"]); |
| 3027 } |
| 3028 if (_json.containsKey("pageIds")) { |
| 3029 pageIds = _json["pageIds"]; |
| 3030 } |
| 3031 if (_json.containsKey("selectedText")) { |
| 3032 selectedText = _json["selectedText"]; |
| 3033 } |
| 3034 if (_json.containsKey("selfLink")) { |
| 3035 selfLink = _json["selfLink"]; |
| 3036 } |
| 3037 if (_json.containsKey("updated")) { |
| 3038 updated = core.DateTime.parse(_json["updated"]); |
| 3039 } |
| 3040 if (_json.containsKey("volumeId")) { |
| 3041 volumeId = _json["volumeId"]; |
| 3042 } |
| 3043 } |
| 3044 |
| 3045 core.Map toJson() { |
| 3046 var _json = new core.Map(); |
| 3047 if (afterSelectedText != null) { |
| 3048 _json["afterSelectedText"] = afterSelectedText; |
| 3049 } |
| 3050 if (beforeSelectedText != null) { |
| 3051 _json["beforeSelectedText"] = beforeSelectedText; |
| 3052 } |
| 3053 if (clientVersionRanges != null) { |
| 3054 _json["clientVersionRanges"] = (clientVersionRanges).toJson(); |
| 3055 } |
| 3056 if (created != null) { |
| 3057 _json["created"] = (created).toIso8601String(); |
| 3058 } |
| 3059 if (currentVersionRanges != null) { |
| 3060 _json["currentVersionRanges"] = (currentVersionRanges).toJson(); |
| 3061 } |
| 3062 if (data != null) { |
| 3063 _json["data"] = data; |
| 3064 } |
| 3065 if (deleted != null) { |
| 3066 _json["deleted"] = deleted; |
| 3067 } |
| 3068 if (highlightStyle != null) { |
| 3069 _json["highlightStyle"] = highlightStyle; |
| 3070 } |
| 3071 if (id != null) { |
| 3072 _json["id"] = id; |
| 3073 } |
| 3074 if (kind != null) { |
| 3075 _json["kind"] = kind; |
| 3076 } |
| 3077 if (layerId != null) { |
| 3078 _json["layerId"] = layerId; |
| 3079 } |
| 3080 if (layerSummary != null) { |
| 3081 _json["layerSummary"] = (layerSummary).toJson(); |
| 3082 } |
| 3083 if (pageIds != null) { |
| 3084 _json["pageIds"] = pageIds; |
| 3085 } |
| 3086 if (selectedText != null) { |
| 3087 _json["selectedText"] = selectedText; |
| 3088 } |
| 3089 if (selfLink != null) { |
| 3090 _json["selfLink"] = selfLink; |
| 3091 } |
| 3092 if (updated != null) { |
| 3093 _json["updated"] = (updated).toIso8601String(); |
| 3094 } |
| 3095 if (volumeId != null) { |
| 3096 _json["volumeId"] = volumeId; |
| 3097 } |
| 3098 return _json; |
| 3099 } |
| 3100 } |
| 3101 |
| 3102 |
| 3103 /** Not documented yet. */ |
| 3104 class Annotationdata { |
| 3105 /** The type of annotation this data is for. */ |
| 3106 core.String annotationType; |
| 3107 |
| 3108 /** |
| 3109 * Not documented yet. |
| 3110 * |
| 3111 * The values for Object must be JSON objects. It can consist of `num`, |
| 3112 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 3113 */ |
| 3114 core.Object data; |
| 3115 |
| 3116 /** Base64 encoded data for this annotation data. */ |
| 3117 core.String encodedData; |
| 3118 |
| 3119 core.List<core.int> get encodedDataAsBytes { |
| 3120 return crypto.CryptoUtils.base64StringToBytes(encodedData); |
| 3121 } |
| 3122 |
| 3123 void set encodedDataAsBytes(core.List<core.int> _bytes) { |
| 3124 encodedData = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 3125 } |
| 3126 |
| 3127 /** Unique id for this annotation data. */ |
| 3128 core.String id; |
| 3129 |
| 3130 /** Resource Type */ |
| 3131 core.String kind; |
| 3132 |
| 3133 /** The Layer id for this data. * */ |
| 3134 core.String layerId; |
| 3135 |
| 3136 /** URL for this resource. * */ |
| 3137 core.String selfLink; |
| 3138 |
| 3139 /** |
| 3140 * Timestamp for the last time this data was updated. (RFC 3339 UTC date-time |
| 3141 * format). |
| 3142 */ |
| 3143 core.DateTime updated; |
| 3144 |
| 3145 /** The volume id for this data. * */ |
| 3146 core.String volumeId; |
| 3147 |
| 3148 |
| 3149 Annotationdata(); |
| 3150 |
| 3151 Annotationdata.fromJson(core.Map _json) { |
| 3152 if (_json.containsKey("annotationType")) { |
| 3153 annotationType = _json["annotationType"]; |
| 3154 } |
| 3155 if (_json.containsKey("data")) { |
| 3156 data = _json["data"]; |
| 3157 } |
| 3158 if (_json.containsKey("encoded_data")) { |
| 3159 encodedData = _json["encoded_data"]; |
| 3160 } |
| 3161 if (_json.containsKey("id")) { |
| 3162 id = _json["id"]; |
| 3163 } |
| 3164 if (_json.containsKey("kind")) { |
| 3165 kind = _json["kind"]; |
| 3166 } |
| 3167 if (_json.containsKey("layerId")) { |
| 3168 layerId = _json["layerId"]; |
| 3169 } |
| 3170 if (_json.containsKey("selfLink")) { |
| 3171 selfLink = _json["selfLink"]; |
| 3172 } |
| 3173 if (_json.containsKey("updated")) { |
| 3174 updated = core.DateTime.parse(_json["updated"]); |
| 3175 } |
| 3176 if (_json.containsKey("volumeId")) { |
| 3177 volumeId = _json["volumeId"]; |
| 3178 } |
| 3179 } |
| 3180 |
| 3181 core.Map toJson() { |
| 3182 var _json = new core.Map(); |
| 3183 if (annotationType != null) { |
| 3184 _json["annotationType"] = annotationType; |
| 3185 } |
| 3186 if (data != null) { |
| 3187 _json["data"] = data; |
| 3188 } |
| 3189 if (encodedData != null) { |
| 3190 _json["encoded_data"] = encodedData; |
| 3191 } |
| 3192 if (id != null) { |
| 3193 _json["id"] = id; |
| 3194 } |
| 3195 if (kind != null) { |
| 3196 _json["kind"] = kind; |
| 3197 } |
| 3198 if (layerId != null) { |
| 3199 _json["layerId"] = layerId; |
| 3200 } |
| 3201 if (selfLink != null) { |
| 3202 _json["selfLink"] = selfLink; |
| 3203 } |
| 3204 if (updated != null) { |
| 3205 _json["updated"] = (updated).toIso8601String(); |
| 3206 } |
| 3207 if (volumeId != null) { |
| 3208 _json["volumeId"] = volumeId; |
| 3209 } |
| 3210 return _json; |
| 3211 } |
| 3212 } |
| 3213 |
| 3214 |
| 3215 /** Not documented yet. */ |
| 3216 class Annotations { |
| 3217 /** A list of annotations. */ |
| 3218 core.List<Annotation> items; |
| 3219 |
| 3220 /** Resource type. */ |
| 3221 core.String kind; |
| 3222 |
| 3223 /** |
| 3224 * Token to pass in for pagination for the next page. This will not be present |
| 3225 * if this request does not have more results. |
| 3226 */ |
| 3227 core.String nextPageToken; |
| 3228 |
| 3229 /** |
| 3230 * Total number of annotations found. This may be greater than the number of |
| 3231 * notes returned in this response if results have been paginated. |
| 3232 */ |
| 3233 core.int totalItems; |
| 3234 |
| 3235 |
| 3236 Annotations(); |
| 3237 |
| 3238 Annotations.fromJson(core.Map _json) { |
| 3239 if (_json.containsKey("items")) { |
| 3240 items = _json["items"].map((value) => new Annotation.fromJson(value)).toLi
st(); |
| 3241 } |
| 3242 if (_json.containsKey("kind")) { |
| 3243 kind = _json["kind"]; |
| 3244 } |
| 3245 if (_json.containsKey("nextPageToken")) { |
| 3246 nextPageToken = _json["nextPageToken"]; |
| 3247 } |
| 3248 if (_json.containsKey("totalItems")) { |
| 3249 totalItems = _json["totalItems"]; |
| 3250 } |
| 3251 } |
| 3252 |
| 3253 core.Map toJson() { |
| 3254 var _json = new core.Map(); |
| 3255 if (items != null) { |
| 3256 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 3257 } |
| 3258 if (kind != null) { |
| 3259 _json["kind"] = kind; |
| 3260 } |
| 3261 if (nextPageToken != null) { |
| 3262 _json["nextPageToken"] = nextPageToken; |
| 3263 } |
| 3264 if (totalItems != null) { |
| 3265 _json["totalItems"] = totalItems; |
| 3266 } |
| 3267 return _json; |
| 3268 } |
| 3269 } |
| 3270 |
| 3271 |
| 3272 /** Not documented yet. */ |
| 3273 class AnnotationsSummaryLayers { |
| 3274 /** Not documented yet. */ |
| 3275 core.int allowedCharacterCount; |
| 3276 |
| 3277 /** Not documented yet. */ |
| 3278 core.String layerId; |
| 3279 |
| 3280 /** Not documented yet. */ |
| 3281 core.String limitType; |
| 3282 |
| 3283 /** Not documented yet. */ |
| 3284 core.int remainingCharacterCount; |
| 3285 |
| 3286 /** Not documented yet. */ |
| 3287 core.DateTime updated; |
| 3288 |
| 3289 |
| 3290 AnnotationsSummaryLayers(); |
| 3291 |
| 3292 AnnotationsSummaryLayers.fromJson(core.Map _json) { |
| 3293 if (_json.containsKey("allowedCharacterCount")) { |
| 3294 allowedCharacterCount = _json["allowedCharacterCount"]; |
| 3295 } |
| 3296 if (_json.containsKey("layerId")) { |
| 3297 layerId = _json["layerId"]; |
| 3298 } |
| 3299 if (_json.containsKey("limitType")) { |
| 3300 limitType = _json["limitType"]; |
| 3301 } |
| 3302 if (_json.containsKey("remainingCharacterCount")) { |
| 3303 remainingCharacterCount = _json["remainingCharacterCount"]; |
| 3304 } |
| 3305 if (_json.containsKey("updated")) { |
| 3306 updated = core.DateTime.parse(_json["updated"]); |
| 3307 } |
| 3308 } |
| 3309 |
| 3310 core.Map toJson() { |
| 3311 var _json = new core.Map(); |
| 3312 if (allowedCharacterCount != null) { |
| 3313 _json["allowedCharacterCount"] = allowedCharacterCount; |
| 3314 } |
| 3315 if (layerId != null) { |
| 3316 _json["layerId"] = layerId; |
| 3317 } |
| 3318 if (limitType != null) { |
| 3319 _json["limitType"] = limitType; |
| 3320 } |
| 3321 if (remainingCharacterCount != null) { |
| 3322 _json["remainingCharacterCount"] = remainingCharacterCount; |
| 3323 } |
| 3324 if (updated != null) { |
| 3325 _json["updated"] = (updated).toIso8601String(); |
| 3326 } |
| 3327 return _json; |
| 3328 } |
| 3329 } |
| 3330 |
| 3331 |
| 3332 /** Not documented yet. */ |
| 3333 class AnnotationsSummary { |
| 3334 /** Not documented yet. */ |
| 3335 core.String kind; |
| 3336 |
| 3337 /** Not documented yet. */ |
| 3338 core.List<AnnotationsSummaryLayers> layers; |
| 3339 |
| 3340 |
| 3341 AnnotationsSummary(); |
| 3342 |
| 3343 AnnotationsSummary.fromJson(core.Map _json) { |
| 3344 if (_json.containsKey("kind")) { |
| 3345 kind = _json["kind"]; |
| 3346 } |
| 3347 if (_json.containsKey("layers")) { |
| 3348 layers = _json["layers"].map((value) => new AnnotationsSummaryLayers.fromJ
son(value)).toList(); |
| 3349 } |
| 3350 } |
| 3351 |
| 3352 core.Map toJson() { |
| 3353 var _json = new core.Map(); |
| 3354 if (kind != null) { |
| 3355 _json["kind"] = kind; |
| 3356 } |
| 3357 if (layers != null) { |
| 3358 _json["layers"] = layers.map((value) => (value).toJson()).toList(); |
| 3359 } |
| 3360 return _json; |
| 3361 } |
| 3362 } |
| 3363 |
| 3364 |
| 3365 /** Not documented yet. */ |
| 3366 class Annotationsdata { |
| 3367 /** A list of Annotation Data. */ |
| 3368 core.List<Annotationdata> items; |
| 3369 |
| 3370 /** Resource type */ |
| 3371 core.String kind; |
| 3372 |
| 3373 /** |
| 3374 * Token to pass in for pagination for the next page. This will not be present |
| 3375 * if this request does not have more results. |
| 3376 */ |
| 3377 core.String nextPageToken; |
| 3378 |
| 3379 /** The total number of volume annotations found. */ |
| 3380 core.int totalItems; |
| 3381 |
| 3382 |
| 3383 Annotationsdata(); |
| 3384 |
| 3385 Annotationsdata.fromJson(core.Map _json) { |
| 3386 if (_json.containsKey("items")) { |
| 3387 items = _json["items"].map((value) => new Annotationdata.fromJson(value)).
toList(); |
| 3388 } |
| 3389 if (_json.containsKey("kind")) { |
| 3390 kind = _json["kind"]; |
| 3391 } |
| 3392 if (_json.containsKey("nextPageToken")) { |
| 3393 nextPageToken = _json["nextPageToken"]; |
| 3394 } |
| 3395 if (_json.containsKey("totalItems")) { |
| 3396 totalItems = _json["totalItems"]; |
| 3397 } |
| 3398 } |
| 3399 |
| 3400 core.Map toJson() { |
| 3401 var _json = new core.Map(); |
| 3402 if (items != null) { |
| 3403 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 3404 } |
| 3405 if (kind != null) { |
| 3406 _json["kind"] = kind; |
| 3407 } |
| 3408 if (nextPageToken != null) { |
| 3409 _json["nextPageToken"] = nextPageToken; |
| 3410 } |
| 3411 if (totalItems != null) { |
| 3412 _json["totalItems"] = totalItems; |
| 3413 } |
| 3414 return _json; |
| 3415 } |
| 3416 } |
| 3417 |
| 3418 |
| 3419 /** Not documented yet. */ |
| 3420 class BooksAnnotationsRange { |
| 3421 /** The offset from the ending position. */ |
| 3422 core.String endOffset; |
| 3423 |
| 3424 /** The ending position for the range. */ |
| 3425 core.String endPosition; |
| 3426 |
| 3427 /** The offset from the starting position. */ |
| 3428 core.String startOffset; |
| 3429 |
| 3430 /** The starting position for the range. */ |
| 3431 core.String startPosition; |
| 3432 |
| 3433 |
| 3434 BooksAnnotationsRange(); |
| 3435 |
| 3436 BooksAnnotationsRange.fromJson(core.Map _json) { |
| 3437 if (_json.containsKey("endOffset")) { |
| 3438 endOffset = _json["endOffset"]; |
| 3439 } |
| 3440 if (_json.containsKey("endPosition")) { |
| 3441 endPosition = _json["endPosition"]; |
| 3442 } |
| 3443 if (_json.containsKey("startOffset")) { |
| 3444 startOffset = _json["startOffset"]; |
| 3445 } |
| 3446 if (_json.containsKey("startPosition")) { |
| 3447 startPosition = _json["startPosition"]; |
| 3448 } |
| 3449 } |
| 3450 |
| 3451 core.Map toJson() { |
| 3452 var _json = new core.Map(); |
| 3453 if (endOffset != null) { |
| 3454 _json["endOffset"] = endOffset; |
| 3455 } |
| 3456 if (endPosition != null) { |
| 3457 _json["endPosition"] = endPosition; |
| 3458 } |
| 3459 if (startOffset != null) { |
| 3460 _json["startOffset"] = startOffset; |
| 3461 } |
| 3462 if (startPosition != null) { |
| 3463 _json["startPosition"] = startPosition; |
| 3464 } |
| 3465 return _json; |
| 3466 } |
| 3467 } |
| 3468 |
| 3469 |
| 3470 /** Not documented yet. */ |
| 3471 class BooksCloudloadingResource { |
| 3472 /** Not documented yet. */ |
| 3473 core.String author; |
| 3474 |
| 3475 /** Not documented yet. */ |
| 3476 core.String processingState; |
| 3477 |
| 3478 /** Not documented yet. */ |
| 3479 core.String title; |
| 3480 |
| 3481 /** Not documented yet. */ |
| 3482 core.String volumeId; |
| 3483 |
| 3484 |
| 3485 BooksCloudloadingResource(); |
| 3486 |
| 3487 BooksCloudloadingResource.fromJson(core.Map _json) { |
| 3488 if (_json.containsKey("author")) { |
| 3489 author = _json["author"]; |
| 3490 } |
| 3491 if (_json.containsKey("processingState")) { |
| 3492 processingState = _json["processingState"]; |
| 3493 } |
| 3494 if (_json.containsKey("title")) { |
| 3495 title = _json["title"]; |
| 3496 } |
| 3497 if (_json.containsKey("volumeId")) { |
| 3498 volumeId = _json["volumeId"]; |
| 3499 } |
| 3500 } |
| 3501 |
| 3502 core.Map toJson() { |
| 3503 var _json = new core.Map(); |
| 3504 if (author != null) { |
| 3505 _json["author"] = author; |
| 3506 } |
| 3507 if (processingState != null) { |
| 3508 _json["processingState"] = processingState; |
| 3509 } |
| 3510 if (title != null) { |
| 3511 _json["title"] = title; |
| 3512 } |
| 3513 if (volumeId != null) { |
| 3514 _json["volumeId"] = volumeId; |
| 3515 } |
| 3516 return _json; |
| 3517 } |
| 3518 } |
| 3519 |
| 3520 |
| 3521 /** Not documented yet. */ |
| 3522 class BooksVolumesRecommendedRateResponse { |
| 3523 /** Not documented yet. */ |
| 3524 core.String consistencyToken; |
| 3525 |
| 3526 |
| 3527 BooksVolumesRecommendedRateResponse(); |
| 3528 |
| 3529 BooksVolumesRecommendedRateResponse.fromJson(core.Map _json) { |
| 3530 if (_json.containsKey("consistency_token")) { |
| 3531 consistencyToken = _json["consistency_token"]; |
| 3532 } |
| 3533 } |
| 3534 |
| 3535 core.Map toJson() { |
| 3536 var _json = new core.Map(); |
| 3537 if (consistencyToken != null) { |
| 3538 _json["consistency_token"] = consistencyToken; |
| 3539 } |
| 3540 return _json; |
| 3541 } |
| 3542 } |
| 3543 |
| 3544 |
| 3545 /** Not documented yet. */ |
| 3546 class Bookshelf { |
| 3547 /** Whether this bookshelf is PUBLIC or PRIVATE. */ |
| 3548 core.String access; |
| 3549 |
| 3550 /** |
| 3551 * Created time for this bookshelf (formatted UTC timestamp with millisecond |
| 3552 * resolution). |
| 3553 */ |
| 3554 core.DateTime created; |
| 3555 |
| 3556 /** Description of this bookshelf. */ |
| 3557 core.String description; |
| 3558 |
| 3559 /** Id of this bookshelf, only unique by user. */ |
| 3560 core.int id; |
| 3561 |
| 3562 /** Resource type for bookshelf metadata. */ |
| 3563 core.String kind; |
| 3564 |
| 3565 /** URL to this resource. */ |
| 3566 core.String selfLink; |
| 3567 |
| 3568 /** Title of this bookshelf. */ |
| 3569 core.String title; |
| 3570 |
| 3571 /** |
| 3572 * Last modified time of this bookshelf (formatted UTC timestamp with |
| 3573 * millisecond resolution). |
| 3574 */ |
| 3575 core.DateTime updated; |
| 3576 |
| 3577 /** Number of volumes in this bookshelf. */ |
| 3578 core.int volumeCount; |
| 3579 |
| 3580 /** |
| 3581 * Last time a volume was added or removed from this bookshelf (formatted UTC |
| 3582 * timestamp with millisecond resolution). |
| 3583 */ |
| 3584 core.DateTime volumesLastUpdated; |
| 3585 |
| 3586 |
| 3587 Bookshelf(); |
| 3588 |
| 3589 Bookshelf.fromJson(core.Map _json) { |
| 3590 if (_json.containsKey("access")) { |
| 3591 access = _json["access"]; |
| 3592 } |
| 3593 if (_json.containsKey("created")) { |
| 3594 created = core.DateTime.parse(_json["created"]); |
| 3595 } |
| 3596 if (_json.containsKey("description")) { |
| 3597 description = _json["description"]; |
| 3598 } |
| 3599 if (_json.containsKey("id")) { |
| 3600 id = _json["id"]; |
| 3601 } |
| 3602 if (_json.containsKey("kind")) { |
| 3603 kind = _json["kind"]; |
| 3604 } |
| 3605 if (_json.containsKey("selfLink")) { |
| 3606 selfLink = _json["selfLink"]; |
| 3607 } |
| 3608 if (_json.containsKey("title")) { |
| 3609 title = _json["title"]; |
| 3610 } |
| 3611 if (_json.containsKey("updated")) { |
| 3612 updated = core.DateTime.parse(_json["updated"]); |
| 3613 } |
| 3614 if (_json.containsKey("volumeCount")) { |
| 3615 volumeCount = _json["volumeCount"]; |
| 3616 } |
| 3617 if (_json.containsKey("volumesLastUpdated")) { |
| 3618 volumesLastUpdated = core.DateTime.parse(_json["volumesLastUpdated"]); |
| 3619 } |
| 3620 } |
| 3621 |
| 3622 core.Map toJson() { |
| 3623 var _json = new core.Map(); |
| 3624 if (access != null) { |
| 3625 _json["access"] = access; |
| 3626 } |
| 3627 if (created != null) { |
| 3628 _json["created"] = (created).toIso8601String(); |
| 3629 } |
| 3630 if (description != null) { |
| 3631 _json["description"] = description; |
| 3632 } |
| 3633 if (id != null) { |
| 3634 _json["id"] = id; |
| 3635 } |
| 3636 if (kind != null) { |
| 3637 _json["kind"] = kind; |
| 3638 } |
| 3639 if (selfLink != null) { |
| 3640 _json["selfLink"] = selfLink; |
| 3641 } |
| 3642 if (title != null) { |
| 3643 _json["title"] = title; |
| 3644 } |
| 3645 if (updated != null) { |
| 3646 _json["updated"] = (updated).toIso8601String(); |
| 3647 } |
| 3648 if (volumeCount != null) { |
| 3649 _json["volumeCount"] = volumeCount; |
| 3650 } |
| 3651 if (volumesLastUpdated != null) { |
| 3652 _json["volumesLastUpdated"] = (volumesLastUpdated).toIso8601String(); |
| 3653 } |
| 3654 return _json; |
| 3655 } |
| 3656 } |
| 3657 |
| 3658 |
| 3659 /** Not documented yet. */ |
| 3660 class Bookshelves { |
| 3661 /** A list of bookshelves. */ |
| 3662 core.List<Bookshelf> items; |
| 3663 |
| 3664 /** Resource type. */ |
| 3665 core.String kind; |
| 3666 |
| 3667 |
| 3668 Bookshelves(); |
| 3669 |
| 3670 Bookshelves.fromJson(core.Map _json) { |
| 3671 if (_json.containsKey("items")) { |
| 3672 items = _json["items"].map((value) => new Bookshelf.fromJson(value)).toLis
t(); |
| 3673 } |
| 3674 if (_json.containsKey("kind")) { |
| 3675 kind = _json["kind"]; |
| 3676 } |
| 3677 } |
| 3678 |
| 3679 core.Map toJson() { |
| 3680 var _json = new core.Map(); |
| 3681 if (items != null) { |
| 3682 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 3683 } |
| 3684 if (kind != null) { |
| 3685 _json["kind"] = kind; |
| 3686 } |
| 3687 return _json; |
| 3688 } |
| 3689 } |
| 3690 |
| 3691 |
| 3692 /** Not documented yet. */ |
| 3693 class ConcurrentAccessRestriction { |
| 3694 /** Whether access is granted for this (user, device, volume). */ |
| 3695 core.bool deviceAllowed; |
| 3696 |
| 3697 /** Resource type. */ |
| 3698 core.String kind; |
| 3699 |
| 3700 /** The maximum number of concurrent access licenses for this volume. */ |
| 3701 core.int maxConcurrentDevices; |
| 3702 |
| 3703 /** Error/warning message. */ |
| 3704 core.String message; |
| 3705 |
| 3706 /** |
| 3707 * Client nonce for verification. Download access and client-validation only. |
| 3708 */ |
| 3709 core.String nonce; |
| 3710 |
| 3711 /** Error/warning reason code. */ |
| 3712 core.String reasonCode; |
| 3713 |
| 3714 /** Whether this volume has any concurrent access restrictions. */ |
| 3715 core.bool restricted; |
| 3716 |
| 3717 /** Response signature. */ |
| 3718 core.String signature; |
| 3719 |
| 3720 /** |
| 3721 * Client app identifier for verification. Download access and |
| 3722 * client-validation only. |
| 3723 */ |
| 3724 core.String source; |
| 3725 |
| 3726 /** Time in seconds for license auto-expiration. */ |
| 3727 core.int timeWindowSeconds; |
| 3728 |
| 3729 /** Identifies the volume for which this entry applies. */ |
| 3730 core.String volumeId; |
| 3731 |
| 3732 |
| 3733 ConcurrentAccessRestriction(); |
| 3734 |
| 3735 ConcurrentAccessRestriction.fromJson(core.Map _json) { |
| 3736 if (_json.containsKey("deviceAllowed")) { |
| 3737 deviceAllowed = _json["deviceAllowed"]; |
| 3738 } |
| 3739 if (_json.containsKey("kind")) { |
| 3740 kind = _json["kind"]; |
| 3741 } |
| 3742 if (_json.containsKey("maxConcurrentDevices")) { |
| 3743 maxConcurrentDevices = _json["maxConcurrentDevices"]; |
| 3744 } |
| 3745 if (_json.containsKey("message")) { |
| 3746 message = _json["message"]; |
| 3747 } |
| 3748 if (_json.containsKey("nonce")) { |
| 3749 nonce = _json["nonce"]; |
| 3750 } |
| 3751 if (_json.containsKey("reasonCode")) { |
| 3752 reasonCode = _json["reasonCode"]; |
| 3753 } |
| 3754 if (_json.containsKey("restricted")) { |
| 3755 restricted = _json["restricted"]; |
| 3756 } |
| 3757 if (_json.containsKey("signature")) { |
| 3758 signature = _json["signature"]; |
| 3759 } |
| 3760 if (_json.containsKey("source")) { |
| 3761 source = _json["source"]; |
| 3762 } |
| 3763 if (_json.containsKey("timeWindowSeconds")) { |
| 3764 timeWindowSeconds = _json["timeWindowSeconds"]; |
| 3765 } |
| 3766 if (_json.containsKey("volumeId")) { |
| 3767 volumeId = _json["volumeId"]; |
| 3768 } |
| 3769 } |
| 3770 |
| 3771 core.Map toJson() { |
| 3772 var _json = new core.Map(); |
| 3773 if (deviceAllowed != null) { |
| 3774 _json["deviceAllowed"] = deviceAllowed; |
| 3775 } |
| 3776 if (kind != null) { |
| 3777 _json["kind"] = kind; |
| 3778 } |
| 3779 if (maxConcurrentDevices != null) { |
| 3780 _json["maxConcurrentDevices"] = maxConcurrentDevices; |
| 3781 } |
| 3782 if (message != null) { |
| 3783 _json["message"] = message; |
| 3784 } |
| 3785 if (nonce != null) { |
| 3786 _json["nonce"] = nonce; |
| 3787 } |
| 3788 if (reasonCode != null) { |
| 3789 _json["reasonCode"] = reasonCode; |
| 3790 } |
| 3791 if (restricted != null) { |
| 3792 _json["restricted"] = restricted; |
| 3793 } |
| 3794 if (signature != null) { |
| 3795 _json["signature"] = signature; |
| 3796 } |
| 3797 if (source != null) { |
| 3798 _json["source"] = source; |
| 3799 } |
| 3800 if (timeWindowSeconds != null) { |
| 3801 _json["timeWindowSeconds"] = timeWindowSeconds; |
| 3802 } |
| 3803 if (volumeId != null) { |
| 3804 _json["volumeId"] = volumeId; |
| 3805 } |
| 3806 return _json; |
| 3807 } |
| 3808 } |
| 3809 |
| 3810 |
| 3811 /** Not documented yet. */ |
| 3812 class DictlayerdataCommon { |
| 3813 /** |
| 3814 * The display title and localized canonical name to use when searching for |
| 3815 * this entity on Google search. |
| 3816 */ |
| 3817 core.String title; |
| 3818 |
| 3819 |
| 3820 DictlayerdataCommon(); |
| 3821 |
| 3822 DictlayerdataCommon.fromJson(core.Map _json) { |
| 3823 if (_json.containsKey("title")) { |
| 3824 title = _json["title"]; |
| 3825 } |
| 3826 } |
| 3827 |
| 3828 core.Map toJson() { |
| 3829 var _json = new core.Map(); |
| 3830 if (title != null) { |
| 3831 _json["title"] = title; |
| 3832 } |
| 3833 return _json; |
| 3834 } |
| 3835 } |
| 3836 |
| 3837 |
| 3838 /** The source, url and attribution for this dictionary data. */ |
| 3839 class DictlayerdataDictSource { |
| 3840 /** Not documented yet. */ |
| 3841 core.String attribution; |
| 3842 |
| 3843 /** Not documented yet. */ |
| 3844 core.String url; |
| 3845 |
| 3846 |
| 3847 DictlayerdataDictSource(); |
| 3848 |
| 3849 DictlayerdataDictSource.fromJson(core.Map _json) { |
| 3850 if (_json.containsKey("attribution")) { |
| 3851 attribution = _json["attribution"]; |
| 3852 } |
| 3853 if (_json.containsKey("url")) { |
| 3854 url = _json["url"]; |
| 3855 } |
| 3856 } |
| 3857 |
| 3858 core.Map toJson() { |
| 3859 var _json = new core.Map(); |
| 3860 if (attribution != null) { |
| 3861 _json["attribution"] = attribution; |
| 3862 } |
| 3863 if (url != null) { |
| 3864 _json["url"] = url; |
| 3865 } |
| 3866 return _json; |
| 3867 } |
| 3868 } |
| 3869 |
| 3870 |
| 3871 /** Not documented yet. */ |
| 3872 class DictlayerdataDictWordsDerivativesSource { |
| 3873 /** Not documented yet. */ |
| 3874 core.String attribution; |
| 3875 |
| 3876 /** Not documented yet. */ |
| 3877 core.String url; |
| 3878 |
| 3879 |
| 3880 DictlayerdataDictWordsDerivativesSource(); |
| 3881 |
| 3882 DictlayerdataDictWordsDerivativesSource.fromJson(core.Map _json) { |
| 3883 if (_json.containsKey("attribution")) { |
| 3884 attribution = _json["attribution"]; |
| 3885 } |
| 3886 if (_json.containsKey("url")) { |
| 3887 url = _json["url"]; |
| 3888 } |
| 3889 } |
| 3890 |
| 3891 core.Map toJson() { |
| 3892 var _json = new core.Map(); |
| 3893 if (attribution != null) { |
| 3894 _json["attribution"] = attribution; |
| 3895 } |
| 3896 if (url != null) { |
| 3897 _json["url"] = url; |
| 3898 } |
| 3899 return _json; |
| 3900 } |
| 3901 } |
| 3902 |
| 3903 |
| 3904 /** Not documented yet. */ |
| 3905 class DictlayerdataDictWordsDerivatives { |
| 3906 /** Not documented yet. */ |
| 3907 DictlayerdataDictWordsDerivativesSource source; |
| 3908 |
| 3909 /** Not documented yet. */ |
| 3910 core.String text; |
| 3911 |
| 3912 |
| 3913 DictlayerdataDictWordsDerivatives(); |
| 3914 |
| 3915 DictlayerdataDictWordsDerivatives.fromJson(core.Map _json) { |
| 3916 if (_json.containsKey("source")) { |
| 3917 source = new DictlayerdataDictWordsDerivativesSource.fromJson(_json["sourc
e"]); |
| 3918 } |
| 3919 if (_json.containsKey("text")) { |
| 3920 text = _json["text"]; |
| 3921 } |
| 3922 } |
| 3923 |
| 3924 core.Map toJson() { |
| 3925 var _json = new core.Map(); |
| 3926 if (source != null) { |
| 3927 _json["source"] = (source).toJson(); |
| 3928 } |
| 3929 if (text != null) { |
| 3930 _json["text"] = text; |
| 3931 } |
| 3932 return _json; |
| 3933 } |
| 3934 } |
| 3935 |
| 3936 |
| 3937 /** Not documented yet. */ |
| 3938 class DictlayerdataDictWordsExamplesSource { |
| 3939 /** Not documented yet. */ |
| 3940 core.String attribution; |
| 3941 |
| 3942 /** Not documented yet. */ |
| 3943 core.String url; |
| 3944 |
| 3945 |
| 3946 DictlayerdataDictWordsExamplesSource(); |
| 3947 |
| 3948 DictlayerdataDictWordsExamplesSource.fromJson(core.Map _json) { |
| 3949 if (_json.containsKey("attribution")) { |
| 3950 attribution = _json["attribution"]; |
| 3951 } |
| 3952 if (_json.containsKey("url")) { |
| 3953 url = _json["url"]; |
| 3954 } |
| 3955 } |
| 3956 |
| 3957 core.Map toJson() { |
| 3958 var _json = new core.Map(); |
| 3959 if (attribution != null) { |
| 3960 _json["attribution"] = attribution; |
| 3961 } |
| 3962 if (url != null) { |
| 3963 _json["url"] = url; |
| 3964 } |
| 3965 return _json; |
| 3966 } |
| 3967 } |
| 3968 |
| 3969 |
| 3970 /** Not documented yet. */ |
| 3971 class DictlayerdataDictWordsExamples { |
| 3972 /** Not documented yet. */ |
| 3973 DictlayerdataDictWordsExamplesSource source; |
| 3974 |
| 3975 /** Not documented yet. */ |
| 3976 core.String text; |
| 3977 |
| 3978 |
| 3979 DictlayerdataDictWordsExamples(); |
| 3980 |
| 3981 DictlayerdataDictWordsExamples.fromJson(core.Map _json) { |
| 3982 if (_json.containsKey("source")) { |
| 3983 source = new DictlayerdataDictWordsExamplesSource.fromJson(_json["source"]
); |
| 3984 } |
| 3985 if (_json.containsKey("text")) { |
| 3986 text = _json["text"]; |
| 3987 } |
| 3988 } |
| 3989 |
| 3990 core.Map toJson() { |
| 3991 var _json = new core.Map(); |
| 3992 if (source != null) { |
| 3993 _json["source"] = (source).toJson(); |
| 3994 } |
| 3995 if (text != null) { |
| 3996 _json["text"] = text; |
| 3997 } |
| 3998 return _json; |
| 3999 } |
| 4000 } |
| 4001 |
| 4002 |
| 4003 /** Not documented yet. */ |
| 4004 class DictlayerdataDictWordsSensesConjugations { |
| 4005 /** Not documented yet. */ |
| 4006 core.String type; |
| 4007 |
| 4008 /** Not documented yet. */ |
| 4009 core.String value; |
| 4010 |
| 4011 |
| 4012 DictlayerdataDictWordsSensesConjugations(); |
| 4013 |
| 4014 DictlayerdataDictWordsSensesConjugations.fromJson(core.Map _json) { |
| 4015 if (_json.containsKey("type")) { |
| 4016 type = _json["type"]; |
| 4017 } |
| 4018 if (_json.containsKey("value")) { |
| 4019 value = _json["value"]; |
| 4020 } |
| 4021 } |
| 4022 |
| 4023 core.Map toJson() { |
| 4024 var _json = new core.Map(); |
| 4025 if (type != null) { |
| 4026 _json["type"] = type; |
| 4027 } |
| 4028 if (value != null) { |
| 4029 _json["value"] = value; |
| 4030 } |
| 4031 return _json; |
| 4032 } |
| 4033 } |
| 4034 |
| 4035 |
| 4036 /** Not documented yet. */ |
| 4037 class DictlayerdataDictWordsSensesDefinitionsExamplesSource { |
| 4038 /** Not documented yet. */ |
| 4039 core.String attribution; |
| 4040 |
| 4041 /** Not documented yet. */ |
| 4042 core.String url; |
| 4043 |
| 4044 |
| 4045 DictlayerdataDictWordsSensesDefinitionsExamplesSource(); |
| 4046 |
| 4047 DictlayerdataDictWordsSensesDefinitionsExamplesSource.fromJson(core.Map _json)
{ |
| 4048 if (_json.containsKey("attribution")) { |
| 4049 attribution = _json["attribution"]; |
| 4050 } |
| 4051 if (_json.containsKey("url")) { |
| 4052 url = _json["url"]; |
| 4053 } |
| 4054 } |
| 4055 |
| 4056 core.Map toJson() { |
| 4057 var _json = new core.Map(); |
| 4058 if (attribution != null) { |
| 4059 _json["attribution"] = attribution; |
| 4060 } |
| 4061 if (url != null) { |
| 4062 _json["url"] = url; |
| 4063 } |
| 4064 return _json; |
| 4065 } |
| 4066 } |
| 4067 |
| 4068 |
| 4069 /** Not documented yet. */ |
| 4070 class DictlayerdataDictWordsSensesDefinitionsExamples { |
| 4071 /** Not documented yet. */ |
| 4072 DictlayerdataDictWordsSensesDefinitionsExamplesSource source; |
| 4073 |
| 4074 /** Not documented yet. */ |
| 4075 core.String text; |
| 4076 |
| 4077 |
| 4078 DictlayerdataDictWordsSensesDefinitionsExamples(); |
| 4079 |
| 4080 DictlayerdataDictWordsSensesDefinitionsExamples.fromJson(core.Map _json) { |
| 4081 if (_json.containsKey("source")) { |
| 4082 source = new DictlayerdataDictWordsSensesDefinitionsExamplesSource.fromJso
n(_json["source"]); |
| 4083 } |
| 4084 if (_json.containsKey("text")) { |
| 4085 text = _json["text"]; |
| 4086 } |
| 4087 } |
| 4088 |
| 4089 core.Map toJson() { |
| 4090 var _json = new core.Map(); |
| 4091 if (source != null) { |
| 4092 _json["source"] = (source).toJson(); |
| 4093 } |
| 4094 if (text != null) { |
| 4095 _json["text"] = text; |
| 4096 } |
| 4097 return _json; |
| 4098 } |
| 4099 } |
| 4100 |
| 4101 |
| 4102 /** Not documented yet. */ |
| 4103 class DictlayerdataDictWordsSensesDefinitions { |
| 4104 /** Not documented yet. */ |
| 4105 core.String definition; |
| 4106 |
| 4107 /** Not documented yet. */ |
| 4108 core.List<DictlayerdataDictWordsSensesDefinitionsExamples> examples; |
| 4109 |
| 4110 |
| 4111 DictlayerdataDictWordsSensesDefinitions(); |
| 4112 |
| 4113 DictlayerdataDictWordsSensesDefinitions.fromJson(core.Map _json) { |
| 4114 if (_json.containsKey("definition")) { |
| 4115 definition = _json["definition"]; |
| 4116 } |
| 4117 if (_json.containsKey("examples")) { |
| 4118 examples = _json["examples"].map((value) => new DictlayerdataDictWordsSens
esDefinitionsExamples.fromJson(value)).toList(); |
| 4119 } |
| 4120 } |
| 4121 |
| 4122 core.Map toJson() { |
| 4123 var _json = new core.Map(); |
| 4124 if (definition != null) { |
| 4125 _json["definition"] = definition; |
| 4126 } |
| 4127 if (examples != null) { |
| 4128 _json["examples"] = examples.map((value) => (value).toJson()).toList(); |
| 4129 } |
| 4130 return _json; |
| 4131 } |
| 4132 } |
| 4133 |
| 4134 |
| 4135 /** Not documented yet. */ |
| 4136 class DictlayerdataDictWordsSensesSource { |
| 4137 /** Not documented yet. */ |
| 4138 core.String attribution; |
| 4139 |
| 4140 /** Not documented yet. */ |
| 4141 core.String url; |
| 4142 |
| 4143 |
| 4144 DictlayerdataDictWordsSensesSource(); |
| 4145 |
| 4146 DictlayerdataDictWordsSensesSource.fromJson(core.Map _json) { |
| 4147 if (_json.containsKey("attribution")) { |
| 4148 attribution = _json["attribution"]; |
| 4149 } |
| 4150 if (_json.containsKey("url")) { |
| 4151 url = _json["url"]; |
| 4152 } |
| 4153 } |
| 4154 |
| 4155 core.Map toJson() { |
| 4156 var _json = new core.Map(); |
| 4157 if (attribution != null) { |
| 4158 _json["attribution"] = attribution; |
| 4159 } |
| 4160 if (url != null) { |
| 4161 _json["url"] = url; |
| 4162 } |
| 4163 return _json; |
| 4164 } |
| 4165 } |
| 4166 |
| 4167 |
| 4168 /** Not documented yet. */ |
| 4169 class DictlayerdataDictWordsSensesSynonymsSource { |
| 4170 /** Not documented yet. */ |
| 4171 core.String attribution; |
| 4172 |
| 4173 /** Not documented yet. */ |
| 4174 core.String url; |
| 4175 |
| 4176 |
| 4177 DictlayerdataDictWordsSensesSynonymsSource(); |
| 4178 |
| 4179 DictlayerdataDictWordsSensesSynonymsSource.fromJson(core.Map _json) { |
| 4180 if (_json.containsKey("attribution")) { |
| 4181 attribution = _json["attribution"]; |
| 4182 } |
| 4183 if (_json.containsKey("url")) { |
| 4184 url = _json["url"]; |
| 4185 } |
| 4186 } |
| 4187 |
| 4188 core.Map toJson() { |
| 4189 var _json = new core.Map(); |
| 4190 if (attribution != null) { |
| 4191 _json["attribution"] = attribution; |
| 4192 } |
| 4193 if (url != null) { |
| 4194 _json["url"] = url; |
| 4195 } |
| 4196 return _json; |
| 4197 } |
| 4198 } |
| 4199 |
| 4200 |
| 4201 /** Not documented yet. */ |
| 4202 class DictlayerdataDictWordsSensesSynonyms { |
| 4203 /** Not documented yet. */ |
| 4204 DictlayerdataDictWordsSensesSynonymsSource source; |
| 4205 |
| 4206 /** Not documented yet. */ |
| 4207 core.String text; |
| 4208 |
| 4209 |
| 4210 DictlayerdataDictWordsSensesSynonyms(); |
| 4211 |
| 4212 DictlayerdataDictWordsSensesSynonyms.fromJson(core.Map _json) { |
| 4213 if (_json.containsKey("source")) { |
| 4214 source = new DictlayerdataDictWordsSensesSynonymsSource.fromJson(_json["so
urce"]); |
| 4215 } |
| 4216 if (_json.containsKey("text")) { |
| 4217 text = _json["text"]; |
| 4218 } |
| 4219 } |
| 4220 |
| 4221 core.Map toJson() { |
| 4222 var _json = new core.Map(); |
| 4223 if (source != null) { |
| 4224 _json["source"] = (source).toJson(); |
| 4225 } |
| 4226 if (text != null) { |
| 4227 _json["text"] = text; |
| 4228 } |
| 4229 return _json; |
| 4230 } |
| 4231 } |
| 4232 |
| 4233 |
| 4234 /** Not documented yet. */ |
| 4235 class DictlayerdataDictWordsSenses { |
| 4236 /** Not documented yet. */ |
| 4237 core.List<DictlayerdataDictWordsSensesConjugations> conjugations; |
| 4238 |
| 4239 /** Not documented yet. */ |
| 4240 core.List<DictlayerdataDictWordsSensesDefinitions> definitions; |
| 4241 |
| 4242 /** Not documented yet. */ |
| 4243 core.String partOfSpeech; |
| 4244 |
| 4245 /** Not documented yet. */ |
| 4246 core.String pronunciation; |
| 4247 |
| 4248 /** Not documented yet. */ |
| 4249 core.String pronunciationUrl; |
| 4250 |
| 4251 /** Not documented yet. */ |
| 4252 DictlayerdataDictWordsSensesSource source; |
| 4253 |
| 4254 /** Not documented yet. */ |
| 4255 core.String syllabification; |
| 4256 |
| 4257 /** Not documented yet. */ |
| 4258 core.List<DictlayerdataDictWordsSensesSynonyms> synonyms; |
| 4259 |
| 4260 |
| 4261 DictlayerdataDictWordsSenses(); |
| 4262 |
| 4263 DictlayerdataDictWordsSenses.fromJson(core.Map _json) { |
| 4264 if (_json.containsKey("conjugations")) { |
| 4265 conjugations = _json["conjugations"].map((value) => new DictlayerdataDictW
ordsSensesConjugations.fromJson(value)).toList(); |
| 4266 } |
| 4267 if (_json.containsKey("definitions")) { |
| 4268 definitions = _json["definitions"].map((value) => new DictlayerdataDictWor
dsSensesDefinitions.fromJson(value)).toList(); |
| 4269 } |
| 4270 if (_json.containsKey("partOfSpeech")) { |
| 4271 partOfSpeech = _json["partOfSpeech"]; |
| 4272 } |
| 4273 if (_json.containsKey("pronunciation")) { |
| 4274 pronunciation = _json["pronunciation"]; |
| 4275 } |
| 4276 if (_json.containsKey("pronunciationUrl")) { |
| 4277 pronunciationUrl = _json["pronunciationUrl"]; |
| 4278 } |
| 4279 if (_json.containsKey("source")) { |
| 4280 source = new DictlayerdataDictWordsSensesSource.fromJson(_json["source"]); |
| 4281 } |
| 4282 if (_json.containsKey("syllabification")) { |
| 4283 syllabification = _json["syllabification"]; |
| 4284 } |
| 4285 if (_json.containsKey("synonyms")) { |
| 4286 synonyms = _json["synonyms"].map((value) => new DictlayerdataDictWordsSens
esSynonyms.fromJson(value)).toList(); |
| 4287 } |
| 4288 } |
| 4289 |
| 4290 core.Map toJson() { |
| 4291 var _json = new core.Map(); |
| 4292 if (conjugations != null) { |
| 4293 _json["conjugations"] = conjugations.map((value) => (value).toJson()).toLi
st(); |
| 4294 } |
| 4295 if (definitions != null) { |
| 4296 _json["definitions"] = definitions.map((value) => (value).toJson()).toList
(); |
| 4297 } |
| 4298 if (partOfSpeech != null) { |
| 4299 _json["partOfSpeech"] = partOfSpeech; |
| 4300 } |
| 4301 if (pronunciation != null) { |
| 4302 _json["pronunciation"] = pronunciation; |
| 4303 } |
| 4304 if (pronunciationUrl != null) { |
| 4305 _json["pronunciationUrl"] = pronunciationUrl; |
| 4306 } |
| 4307 if (source != null) { |
| 4308 _json["source"] = (source).toJson(); |
| 4309 } |
| 4310 if (syllabification != null) { |
| 4311 _json["syllabification"] = syllabification; |
| 4312 } |
| 4313 if (synonyms != null) { |
| 4314 _json["synonyms"] = synonyms.map((value) => (value).toJson()).toList(); |
| 4315 } |
| 4316 return _json; |
| 4317 } |
| 4318 } |
| 4319 |
| 4320 |
| 4321 /** |
| 4322 * The words with different meanings but not related words, e.g. "go" (game) and |
| 4323 * "go" (verb). |
| 4324 */ |
| 4325 class DictlayerdataDictWordsSource { |
| 4326 /** Not documented yet. */ |
| 4327 core.String attribution; |
| 4328 |
| 4329 /** Not documented yet. */ |
| 4330 core.String url; |
| 4331 |
| 4332 |
| 4333 DictlayerdataDictWordsSource(); |
| 4334 |
| 4335 DictlayerdataDictWordsSource.fromJson(core.Map _json) { |
| 4336 if (_json.containsKey("attribution")) { |
| 4337 attribution = _json["attribution"]; |
| 4338 } |
| 4339 if (_json.containsKey("url")) { |
| 4340 url = _json["url"]; |
| 4341 } |
| 4342 } |
| 4343 |
| 4344 core.Map toJson() { |
| 4345 var _json = new core.Map(); |
| 4346 if (attribution != null) { |
| 4347 _json["attribution"] = attribution; |
| 4348 } |
| 4349 if (url != null) { |
| 4350 _json["url"] = url; |
| 4351 } |
| 4352 return _json; |
| 4353 } |
| 4354 } |
| 4355 |
| 4356 |
| 4357 /** Not documented yet. */ |
| 4358 class DictlayerdataDictWords { |
| 4359 /** Not documented yet. */ |
| 4360 core.List<DictlayerdataDictWordsDerivatives> derivatives; |
| 4361 |
| 4362 /** Not documented yet. */ |
| 4363 core.List<DictlayerdataDictWordsExamples> examples; |
| 4364 |
| 4365 /** Not documented yet. */ |
| 4366 core.List<DictlayerdataDictWordsSenses> senses; |
| 4367 |
| 4368 /** |
| 4369 * The words with different meanings but not related words, e.g. "go" (game) |
| 4370 * and "go" (verb). |
| 4371 */ |
| 4372 DictlayerdataDictWordsSource source; |
| 4373 |
| 4374 |
| 4375 DictlayerdataDictWords(); |
| 4376 |
| 4377 DictlayerdataDictWords.fromJson(core.Map _json) { |
| 4378 if (_json.containsKey("derivatives")) { |
| 4379 derivatives = _json["derivatives"].map((value) => new DictlayerdataDictWor
dsDerivatives.fromJson(value)).toList(); |
| 4380 } |
| 4381 if (_json.containsKey("examples")) { |
| 4382 examples = _json["examples"].map((value) => new DictlayerdataDictWordsExam
ples.fromJson(value)).toList(); |
| 4383 } |
| 4384 if (_json.containsKey("senses")) { |
| 4385 senses = _json["senses"].map((value) => new DictlayerdataDictWordsSenses.f
romJson(value)).toList(); |
| 4386 } |
| 4387 if (_json.containsKey("source")) { |
| 4388 source = new DictlayerdataDictWordsSource.fromJson(_json["source"]); |
| 4389 } |
| 4390 } |
| 4391 |
| 4392 core.Map toJson() { |
| 4393 var _json = new core.Map(); |
| 4394 if (derivatives != null) { |
| 4395 _json["derivatives"] = derivatives.map((value) => (value).toJson()).toList
(); |
| 4396 } |
| 4397 if (examples != null) { |
| 4398 _json["examples"] = examples.map((value) => (value).toJson()).toList(); |
| 4399 } |
| 4400 if (senses != null) { |
| 4401 _json["senses"] = senses.map((value) => (value).toJson()).toList(); |
| 4402 } |
| 4403 if (source != null) { |
| 4404 _json["source"] = (source).toJson(); |
| 4405 } |
| 4406 return _json; |
| 4407 } |
| 4408 } |
| 4409 |
| 4410 |
| 4411 /** Not documented yet. */ |
| 4412 class DictlayerdataDict { |
| 4413 /** The source, url and attribution for this dictionary data. */ |
| 4414 DictlayerdataDictSource source; |
| 4415 |
| 4416 /** Not documented yet. */ |
| 4417 core.List<DictlayerdataDictWords> words; |
| 4418 |
| 4419 |
| 4420 DictlayerdataDict(); |
| 4421 |
| 4422 DictlayerdataDict.fromJson(core.Map _json) { |
| 4423 if (_json.containsKey("source")) { |
| 4424 source = new DictlayerdataDictSource.fromJson(_json["source"]); |
| 4425 } |
| 4426 if (_json.containsKey("words")) { |
| 4427 words = _json["words"].map((value) => new DictlayerdataDictWords.fromJson(
value)).toList(); |
| 4428 } |
| 4429 } |
| 4430 |
| 4431 core.Map toJson() { |
| 4432 var _json = new core.Map(); |
| 4433 if (source != null) { |
| 4434 _json["source"] = (source).toJson(); |
| 4435 } |
| 4436 if (words != null) { |
| 4437 _json["words"] = words.map((value) => (value).toJson()).toList(); |
| 4438 } |
| 4439 return _json; |
| 4440 } |
| 4441 } |
| 4442 |
| 4443 |
| 4444 /** Not documented yet. */ |
| 4445 class Dictlayerdata { |
| 4446 /** Not documented yet. */ |
| 4447 DictlayerdataCommon common; |
| 4448 |
| 4449 /** Not documented yet. */ |
| 4450 DictlayerdataDict dict; |
| 4451 |
| 4452 /** Not documented yet. */ |
| 4453 core.String kind; |
| 4454 |
| 4455 |
| 4456 Dictlayerdata(); |
| 4457 |
| 4458 Dictlayerdata.fromJson(core.Map _json) { |
| 4459 if (_json.containsKey("common")) { |
| 4460 common = new DictlayerdataCommon.fromJson(_json["common"]); |
| 4461 } |
| 4462 if (_json.containsKey("dict")) { |
| 4463 dict = new DictlayerdataDict.fromJson(_json["dict"]); |
| 4464 } |
| 4465 if (_json.containsKey("kind")) { |
| 4466 kind = _json["kind"]; |
| 4467 } |
| 4468 } |
| 4469 |
| 4470 core.Map toJson() { |
| 4471 var _json = new core.Map(); |
| 4472 if (common != null) { |
| 4473 _json["common"] = (common).toJson(); |
| 4474 } |
| 4475 if (dict != null) { |
| 4476 _json["dict"] = (dict).toJson(); |
| 4477 } |
| 4478 if (kind != null) { |
| 4479 _json["kind"] = kind; |
| 4480 } |
| 4481 return _json; |
| 4482 } |
| 4483 } |
| 4484 |
| 4485 |
| 4486 /** Not documented yet. */ |
| 4487 class DownloadAccessRestriction { |
| 4488 /** |
| 4489 * If restricted, whether access is granted for this (user, device, volume). |
| 4490 */ |
| 4491 core.bool deviceAllowed; |
| 4492 |
| 4493 /** |
| 4494 * If restricted, the number of content download licenses already acquired |
| 4495 * (including the requesting client, if licensed). |
| 4496 */ |
| 4497 core.int downloadsAcquired; |
| 4498 |
| 4499 /** If deviceAllowed, whether access was just acquired with this request. */ |
| 4500 core.bool justAcquired; |
| 4501 |
| 4502 /** Resource type. */ |
| 4503 core.String kind; |
| 4504 |
| 4505 /** |
| 4506 * If restricted, the maximum number of content download licenses for this |
| 4507 * volume. |
| 4508 */ |
| 4509 core.int maxDownloadDevices; |
| 4510 |
| 4511 /** Error/warning message. */ |
| 4512 core.String message; |
| 4513 |
| 4514 /** |
| 4515 * Client nonce for verification. Download access and client-validation only. |
| 4516 */ |
| 4517 core.String nonce; |
| 4518 |
| 4519 /** |
| 4520 * Error/warning reason code. Additional codes may be added in the future. 0 |
| 4521 * OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 |
| 4522 * WARNING_USED_LAST_ACCESS |
| 4523 */ |
| 4524 core.String reasonCode; |
| 4525 |
| 4526 /** Whether this volume has any download access restrictions. */ |
| 4527 core.bool restricted; |
| 4528 |
| 4529 /** Response signature. */ |
| 4530 core.String signature; |
| 4531 |
| 4532 /** |
| 4533 * Client app identifier for verification. Download access and |
| 4534 * client-validation only. |
| 4535 */ |
| 4536 core.String source; |
| 4537 |
| 4538 /** Identifies the volume for which this entry applies. */ |
| 4539 core.String volumeId; |
| 4540 |
| 4541 |
| 4542 DownloadAccessRestriction(); |
| 4543 |
| 4544 DownloadAccessRestriction.fromJson(core.Map _json) { |
| 4545 if (_json.containsKey("deviceAllowed")) { |
| 4546 deviceAllowed = _json["deviceAllowed"]; |
| 4547 } |
| 4548 if (_json.containsKey("downloadsAcquired")) { |
| 4549 downloadsAcquired = _json["downloadsAcquired"]; |
| 4550 } |
| 4551 if (_json.containsKey("justAcquired")) { |
| 4552 justAcquired = _json["justAcquired"]; |
| 4553 } |
| 4554 if (_json.containsKey("kind")) { |
| 4555 kind = _json["kind"]; |
| 4556 } |
| 4557 if (_json.containsKey("maxDownloadDevices")) { |
| 4558 maxDownloadDevices = _json["maxDownloadDevices"]; |
| 4559 } |
| 4560 if (_json.containsKey("message")) { |
| 4561 message = _json["message"]; |
| 4562 } |
| 4563 if (_json.containsKey("nonce")) { |
| 4564 nonce = _json["nonce"]; |
| 4565 } |
| 4566 if (_json.containsKey("reasonCode")) { |
| 4567 reasonCode = _json["reasonCode"]; |
| 4568 } |
| 4569 if (_json.containsKey("restricted")) { |
| 4570 restricted = _json["restricted"]; |
| 4571 } |
| 4572 if (_json.containsKey("signature")) { |
| 4573 signature = _json["signature"]; |
| 4574 } |
| 4575 if (_json.containsKey("source")) { |
| 4576 source = _json["source"]; |
| 4577 } |
| 4578 if (_json.containsKey("volumeId")) { |
| 4579 volumeId = _json["volumeId"]; |
| 4580 } |
| 4581 } |
| 4582 |
| 4583 core.Map toJson() { |
| 4584 var _json = new core.Map(); |
| 4585 if (deviceAllowed != null) { |
| 4586 _json["deviceAllowed"] = deviceAllowed; |
| 4587 } |
| 4588 if (downloadsAcquired != null) { |
| 4589 _json["downloadsAcquired"] = downloadsAcquired; |
| 4590 } |
| 4591 if (justAcquired != null) { |
| 4592 _json["justAcquired"] = justAcquired; |
| 4593 } |
| 4594 if (kind != null) { |
| 4595 _json["kind"] = kind; |
| 4596 } |
| 4597 if (maxDownloadDevices != null) { |
| 4598 _json["maxDownloadDevices"] = maxDownloadDevices; |
| 4599 } |
| 4600 if (message != null) { |
| 4601 _json["message"] = message; |
| 4602 } |
| 4603 if (nonce != null) { |
| 4604 _json["nonce"] = nonce; |
| 4605 } |
| 4606 if (reasonCode != null) { |
| 4607 _json["reasonCode"] = reasonCode; |
| 4608 } |
| 4609 if (restricted != null) { |
| 4610 _json["restricted"] = restricted; |
| 4611 } |
| 4612 if (signature != null) { |
| 4613 _json["signature"] = signature; |
| 4614 } |
| 4615 if (source != null) { |
| 4616 _json["source"] = source; |
| 4617 } |
| 4618 if (volumeId != null) { |
| 4619 _json["volumeId"] = volumeId; |
| 4620 } |
| 4621 return _json; |
| 4622 } |
| 4623 } |
| 4624 |
| 4625 |
| 4626 /** Not documented yet. */ |
| 4627 class DownloadAccesses { |
| 4628 /** A list of download access responses. */ |
| 4629 core.List<DownloadAccessRestriction> downloadAccessList; |
| 4630 |
| 4631 /** Resource type. */ |
| 4632 core.String kind; |
| 4633 |
| 4634 |
| 4635 DownloadAccesses(); |
| 4636 |
| 4637 DownloadAccesses.fromJson(core.Map _json) { |
| 4638 if (_json.containsKey("downloadAccessList")) { |
| 4639 downloadAccessList = _json["downloadAccessList"].map((value) => new Downlo
adAccessRestriction.fromJson(value)).toList(); |
| 4640 } |
| 4641 if (_json.containsKey("kind")) { |
| 4642 kind = _json["kind"]; |
| 4643 } |
| 4644 } |
| 4645 |
| 4646 core.Map toJson() { |
| 4647 var _json = new core.Map(); |
| 4648 if (downloadAccessList != null) { |
| 4649 _json["downloadAccessList"] = downloadAccessList.map((value) => (value).to
Json()).toList(); |
| 4650 } |
| 4651 if (kind != null) { |
| 4652 _json["kind"] = kind; |
| 4653 } |
| 4654 return _json; |
| 4655 } |
| 4656 } |
| 4657 |
| 4658 |
| 4659 /** Not documented yet. */ |
| 4660 class GeolayerdataCommon { |
| 4661 /** The language of the information url and description. */ |
| 4662 core.String lang; |
| 4663 |
| 4664 /** The URL for the preview image information. */ |
| 4665 core.String previewImageUrl; |
| 4666 |
| 4667 /** The description for this location. */ |
| 4668 core.String snippet; |
| 4669 |
| 4670 /** The URL for information for this location. Ex: wikipedia link. */ |
| 4671 core.String snippetUrl; |
| 4672 |
| 4673 /** |
| 4674 * The display title and localized canonical name to use when searching for |
| 4675 * this entity on Google search. |
| 4676 */ |
| 4677 core.String title; |
| 4678 |
| 4679 |
| 4680 GeolayerdataCommon(); |
| 4681 |
| 4682 GeolayerdataCommon.fromJson(core.Map _json) { |
| 4683 if (_json.containsKey("lang")) { |
| 4684 lang = _json["lang"]; |
| 4685 } |
| 4686 if (_json.containsKey("previewImageUrl")) { |
| 4687 previewImageUrl = _json["previewImageUrl"]; |
| 4688 } |
| 4689 if (_json.containsKey("snippet")) { |
| 4690 snippet = _json["snippet"]; |
| 4691 } |
| 4692 if (_json.containsKey("snippetUrl")) { |
| 4693 snippetUrl = _json["snippetUrl"]; |
| 4694 } |
| 4695 if (_json.containsKey("title")) { |
| 4696 title = _json["title"]; |
| 4697 } |
| 4698 } |
| 4699 |
| 4700 core.Map toJson() { |
| 4701 var _json = new core.Map(); |
| 4702 if (lang != null) { |
| 4703 _json["lang"] = lang; |
| 4704 } |
| 4705 if (previewImageUrl != null) { |
| 4706 _json["previewImageUrl"] = previewImageUrl; |
| 4707 } |
| 4708 if (snippet != null) { |
| 4709 _json["snippet"] = snippet; |
| 4710 } |
| 4711 if (snippetUrl != null) { |
| 4712 _json["snippetUrl"] = snippetUrl; |
| 4713 } |
| 4714 if (title != null) { |
| 4715 _json["title"] = title; |
| 4716 } |
| 4717 return _json; |
| 4718 } |
| 4719 } |
| 4720 |
| 4721 |
| 4722 /** Not documented yet. */ |
| 4723 class GeolayerdataGeoBoundary { |
| 4724 /** Not documented yet. */ |
| 4725 core.int latitude; |
| 4726 |
| 4727 /** Not documented yet. */ |
| 4728 core.int longitude; |
| 4729 |
| 4730 |
| 4731 GeolayerdataGeoBoundary(); |
| 4732 |
| 4733 GeolayerdataGeoBoundary.fromJson(core.Map _json) { |
| 4734 if (_json.containsKey("latitude")) { |
| 4735 latitude = _json["latitude"]; |
| 4736 } |
| 4737 if (_json.containsKey("longitude")) { |
| 4738 longitude = _json["longitude"]; |
| 4739 } |
| 4740 } |
| 4741 |
| 4742 core.Map toJson() { |
| 4743 var _json = new core.Map(); |
| 4744 if (latitude != null) { |
| 4745 _json["latitude"] = latitude; |
| 4746 } |
| 4747 if (longitude != null) { |
| 4748 _json["longitude"] = longitude; |
| 4749 } |
| 4750 return _json; |
| 4751 } |
| 4752 } |
| 4753 |
| 4754 |
| 4755 /** Not documented yet. */ |
| 4756 class GeolayerdataGeoViewportHi { |
| 4757 /** Not documented yet. */ |
| 4758 core.double latitude; |
| 4759 |
| 4760 /** Not documented yet. */ |
| 4761 core.double longitude; |
| 4762 |
| 4763 |
| 4764 GeolayerdataGeoViewportHi(); |
| 4765 |
| 4766 GeolayerdataGeoViewportHi.fromJson(core.Map _json) { |
| 4767 if (_json.containsKey("latitude")) { |
| 4768 latitude = _json["latitude"]; |
| 4769 } |
| 4770 if (_json.containsKey("longitude")) { |
| 4771 longitude = _json["longitude"]; |
| 4772 } |
| 4773 } |
| 4774 |
| 4775 core.Map toJson() { |
| 4776 var _json = new core.Map(); |
| 4777 if (latitude != null) { |
| 4778 _json["latitude"] = latitude; |
| 4779 } |
| 4780 if (longitude != null) { |
| 4781 _json["longitude"] = longitude; |
| 4782 } |
| 4783 return _json; |
| 4784 } |
| 4785 } |
| 4786 |
| 4787 |
| 4788 /** Not documented yet. */ |
| 4789 class GeolayerdataGeoViewportLo { |
| 4790 /** Not documented yet. */ |
| 4791 core.double latitude; |
| 4792 |
| 4793 /** Not documented yet. */ |
| 4794 core.double longitude; |
| 4795 |
| 4796 |
| 4797 GeolayerdataGeoViewportLo(); |
| 4798 |
| 4799 GeolayerdataGeoViewportLo.fromJson(core.Map _json) { |
| 4800 if (_json.containsKey("latitude")) { |
| 4801 latitude = _json["latitude"]; |
| 4802 } |
| 4803 if (_json.containsKey("longitude")) { |
| 4804 longitude = _json["longitude"]; |
| 4805 } |
| 4806 } |
| 4807 |
| 4808 core.Map toJson() { |
| 4809 var _json = new core.Map(); |
| 4810 if (latitude != null) { |
| 4811 _json["latitude"] = latitude; |
| 4812 } |
| 4813 if (longitude != null) { |
| 4814 _json["longitude"] = longitude; |
| 4815 } |
| 4816 return _json; |
| 4817 } |
| 4818 } |
| 4819 |
| 4820 |
| 4821 /** |
| 4822 * The viewport for showing this location. This is a latitude, longitude |
| 4823 * rectangle. |
| 4824 */ |
| 4825 class GeolayerdataGeoViewport { |
| 4826 /** Not documented yet. */ |
| 4827 GeolayerdataGeoViewportHi hi; |
| 4828 |
| 4829 /** Not documented yet. */ |
| 4830 GeolayerdataGeoViewportLo lo; |
| 4831 |
| 4832 |
| 4833 GeolayerdataGeoViewport(); |
| 4834 |
| 4835 GeolayerdataGeoViewport.fromJson(core.Map _json) { |
| 4836 if (_json.containsKey("hi")) { |
| 4837 hi = new GeolayerdataGeoViewportHi.fromJson(_json["hi"]); |
| 4838 } |
| 4839 if (_json.containsKey("lo")) { |
| 4840 lo = new GeolayerdataGeoViewportLo.fromJson(_json["lo"]); |
| 4841 } |
| 4842 } |
| 4843 |
| 4844 core.Map toJson() { |
| 4845 var _json = new core.Map(); |
| 4846 if (hi != null) { |
| 4847 _json["hi"] = (hi).toJson(); |
| 4848 } |
| 4849 if (lo != null) { |
| 4850 _json["lo"] = (lo).toJson(); |
| 4851 } |
| 4852 return _json; |
| 4853 } |
| 4854 } |
| 4855 |
| 4856 |
| 4857 /** Not documented yet. */ |
| 4858 class GeolayerdataGeo { |
| 4859 /** |
| 4860 * The boundary of the location as a set of loops containing pairs of |
| 4861 * latitude, longitude coordinates. |
| 4862 */ |
| 4863 core.List<core.List<GeolayerdataGeoBoundary>> boundary; |
| 4864 |
| 4865 /** |
| 4866 * The cache policy active for this data. EX: UNRESTRICTED, RESTRICTED, NEVER |
| 4867 */ |
| 4868 core.String cachePolicy; |
| 4869 |
| 4870 /** The country code of the location. */ |
| 4871 core.String countryCode; |
| 4872 |
| 4873 /** The latitude of the location. */ |
| 4874 core.double latitude; |
| 4875 |
| 4876 /** The longitude of the location. */ |
| 4877 core.double longitude; |
| 4878 |
| 4879 /** |
| 4880 * The type of map that should be used for this location. EX: HYBRID, ROADMAP, |
| 4881 * SATELLITE, TERRAIN |
| 4882 */ |
| 4883 core.String mapType; |
| 4884 |
| 4885 /** |
| 4886 * The viewport for showing this location. This is a latitude, longitude |
| 4887 * rectangle. |
| 4888 */ |
| 4889 GeolayerdataGeoViewport viewport; |
| 4890 |
| 4891 /** |
| 4892 * The Zoom level to use for the map. Zoom levels between 0 (the lowest zoom |
| 4893 * level, in which the entire world can be seen on one map) to 21+ (down to |
| 4894 * individual buildings). See: |
| 4895 * https://developers.google.com/maps/documentation/staticmaps/#Zoomlevels |
| 4896 */ |
| 4897 core.int zoom; |
| 4898 |
| 4899 |
| 4900 GeolayerdataGeo(); |
| 4901 |
| 4902 GeolayerdataGeo.fromJson(core.Map _json) { |
| 4903 if (_json.containsKey("boundary")) { |
| 4904 boundary = _json["boundary"].map((value) => value.map((value) => new Geola
yerdataGeoBoundary.fromJson(value)).toList()).toList(); |
| 4905 } |
| 4906 if (_json.containsKey("cachePolicy")) { |
| 4907 cachePolicy = _json["cachePolicy"]; |
| 4908 } |
| 4909 if (_json.containsKey("countryCode")) { |
| 4910 countryCode = _json["countryCode"]; |
| 4911 } |
| 4912 if (_json.containsKey("latitude")) { |
| 4913 latitude = _json["latitude"]; |
| 4914 } |
| 4915 if (_json.containsKey("longitude")) { |
| 4916 longitude = _json["longitude"]; |
| 4917 } |
| 4918 if (_json.containsKey("mapType")) { |
| 4919 mapType = _json["mapType"]; |
| 4920 } |
| 4921 if (_json.containsKey("viewport")) { |
| 4922 viewport = new GeolayerdataGeoViewport.fromJson(_json["viewport"]); |
| 4923 } |
| 4924 if (_json.containsKey("zoom")) { |
| 4925 zoom = _json["zoom"]; |
| 4926 } |
| 4927 } |
| 4928 |
| 4929 core.Map toJson() { |
| 4930 var _json = new core.Map(); |
| 4931 if (boundary != null) { |
| 4932 _json["boundary"] = boundary.map((value) => value.map((value) => (value).t
oJson()).toList()).toList(); |
| 4933 } |
| 4934 if (cachePolicy != null) { |
| 4935 _json["cachePolicy"] = cachePolicy; |
| 4936 } |
| 4937 if (countryCode != null) { |
| 4938 _json["countryCode"] = countryCode; |
| 4939 } |
| 4940 if (latitude != null) { |
| 4941 _json["latitude"] = latitude; |
| 4942 } |
| 4943 if (longitude != null) { |
| 4944 _json["longitude"] = longitude; |
| 4945 } |
| 4946 if (mapType != null) { |
| 4947 _json["mapType"] = mapType; |
| 4948 } |
| 4949 if (viewport != null) { |
| 4950 _json["viewport"] = (viewport).toJson(); |
| 4951 } |
| 4952 if (zoom != null) { |
| 4953 _json["zoom"] = zoom; |
| 4954 } |
| 4955 return _json; |
| 4956 } |
| 4957 } |
| 4958 |
| 4959 |
| 4960 /** Not documented yet. */ |
| 4961 class Geolayerdata { |
| 4962 /** Not documented yet. */ |
| 4963 GeolayerdataCommon common; |
| 4964 |
| 4965 /** Not documented yet. */ |
| 4966 GeolayerdataGeo geo; |
| 4967 |
| 4968 /** Not documented yet. */ |
| 4969 core.String kind; |
| 4970 |
| 4971 |
| 4972 Geolayerdata(); |
| 4973 |
| 4974 Geolayerdata.fromJson(core.Map _json) { |
| 4975 if (_json.containsKey("common")) { |
| 4976 common = new GeolayerdataCommon.fromJson(_json["common"]); |
| 4977 } |
| 4978 if (_json.containsKey("geo")) { |
| 4979 geo = new GeolayerdataGeo.fromJson(_json["geo"]); |
| 4980 } |
| 4981 if (_json.containsKey("kind")) { |
| 4982 kind = _json["kind"]; |
| 4983 } |
| 4984 } |
| 4985 |
| 4986 core.Map toJson() { |
| 4987 var _json = new core.Map(); |
| 4988 if (common != null) { |
| 4989 _json["common"] = (common).toJson(); |
| 4990 } |
| 4991 if (geo != null) { |
| 4992 _json["geo"] = (geo).toJson(); |
| 4993 } |
| 4994 if (kind != null) { |
| 4995 _json["kind"] = kind; |
| 4996 } |
| 4997 return _json; |
| 4998 } |
| 4999 } |
| 5000 |
| 5001 |
| 5002 /** Not documented yet. */ |
| 5003 class Layersummaries { |
| 5004 /** A list of layer summary items. */ |
| 5005 core.List<Layersummary> items; |
| 5006 |
| 5007 /** Resource type. */ |
| 5008 core.String kind; |
| 5009 |
| 5010 /** The total number of layer summaries found. */ |
| 5011 core.int totalItems; |
| 5012 |
| 5013 |
| 5014 Layersummaries(); |
| 5015 |
| 5016 Layersummaries.fromJson(core.Map _json) { |
| 5017 if (_json.containsKey("items")) { |
| 5018 items = _json["items"].map((value) => new Layersummary.fromJson(value)).to
List(); |
| 5019 } |
| 5020 if (_json.containsKey("kind")) { |
| 5021 kind = _json["kind"]; |
| 5022 } |
| 5023 if (_json.containsKey("totalItems")) { |
| 5024 totalItems = _json["totalItems"]; |
| 5025 } |
| 5026 } |
| 5027 |
| 5028 core.Map toJson() { |
| 5029 var _json = new core.Map(); |
| 5030 if (items != null) { |
| 5031 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5032 } |
| 5033 if (kind != null) { |
| 5034 _json["kind"] = kind; |
| 5035 } |
| 5036 if (totalItems != null) { |
| 5037 _json["totalItems"] = totalItems; |
| 5038 } |
| 5039 return _json; |
| 5040 } |
| 5041 } |
| 5042 |
| 5043 |
| 5044 /** Not documented yet. */ |
| 5045 class Layersummary { |
| 5046 /** The number of annotations for this layer. */ |
| 5047 core.int annotationCount; |
| 5048 |
| 5049 /** The list of annotation types contained for this layer. */ |
| 5050 core.List<core.String> annotationTypes; |
| 5051 |
| 5052 /** Link to get data for this annotation. */ |
| 5053 core.String annotationsDataLink; |
| 5054 |
| 5055 /** The link to get the annotations for this layer. */ |
| 5056 core.String annotationsLink; |
| 5057 |
| 5058 /** The content version this resource is for. */ |
| 5059 core.String contentVersion; |
| 5060 |
| 5061 /** The number of data items for this layer. */ |
| 5062 core.int dataCount; |
| 5063 |
| 5064 /** Unique id of this layer summary. */ |
| 5065 core.String id; |
| 5066 |
| 5067 /** Resource Type */ |
| 5068 core.String kind; |
| 5069 |
| 5070 /** The layer id for this summary. */ |
| 5071 core.String layerId; |
| 5072 |
| 5073 /** URL to this resource. */ |
| 5074 core.String selfLink; |
| 5075 |
| 5076 /** |
| 5077 * Timestamp for the last time an item in this layer was updated. (RFC 3339 |
| 5078 * UTC date-time format). |
| 5079 */ |
| 5080 core.DateTime updated; |
| 5081 |
| 5082 /** |
| 5083 * The current version of this layer's volume annotations. Note that this |
| 5084 * version applies only to the data in the books.layers.volumeAnnotations.* |
| 5085 * responses. The actual annotation data is versioned separately. |
| 5086 */ |
| 5087 core.String volumeAnnotationsVersion; |
| 5088 |
| 5089 /** The volume id this resource is for. */ |
| 5090 core.String volumeId; |
| 5091 |
| 5092 |
| 5093 Layersummary(); |
| 5094 |
| 5095 Layersummary.fromJson(core.Map _json) { |
| 5096 if (_json.containsKey("annotationCount")) { |
| 5097 annotationCount = _json["annotationCount"]; |
| 5098 } |
| 5099 if (_json.containsKey("annotationTypes")) { |
| 5100 annotationTypes = _json["annotationTypes"]; |
| 5101 } |
| 5102 if (_json.containsKey("annotationsDataLink")) { |
| 5103 annotationsDataLink = _json["annotationsDataLink"]; |
| 5104 } |
| 5105 if (_json.containsKey("annotationsLink")) { |
| 5106 annotationsLink = _json["annotationsLink"]; |
| 5107 } |
| 5108 if (_json.containsKey("contentVersion")) { |
| 5109 contentVersion = _json["contentVersion"]; |
| 5110 } |
| 5111 if (_json.containsKey("dataCount")) { |
| 5112 dataCount = _json["dataCount"]; |
| 5113 } |
| 5114 if (_json.containsKey("id")) { |
| 5115 id = _json["id"]; |
| 5116 } |
| 5117 if (_json.containsKey("kind")) { |
| 5118 kind = _json["kind"]; |
| 5119 } |
| 5120 if (_json.containsKey("layerId")) { |
| 5121 layerId = _json["layerId"]; |
| 5122 } |
| 5123 if (_json.containsKey("selfLink")) { |
| 5124 selfLink = _json["selfLink"]; |
| 5125 } |
| 5126 if (_json.containsKey("updated")) { |
| 5127 updated = core.DateTime.parse(_json["updated"]); |
| 5128 } |
| 5129 if (_json.containsKey("volumeAnnotationsVersion")) { |
| 5130 volumeAnnotationsVersion = _json["volumeAnnotationsVersion"]; |
| 5131 } |
| 5132 if (_json.containsKey("volumeId")) { |
| 5133 volumeId = _json["volumeId"]; |
| 5134 } |
| 5135 } |
| 5136 |
| 5137 core.Map toJson() { |
| 5138 var _json = new core.Map(); |
| 5139 if (annotationCount != null) { |
| 5140 _json["annotationCount"] = annotationCount; |
| 5141 } |
| 5142 if (annotationTypes != null) { |
| 5143 _json["annotationTypes"] = annotationTypes; |
| 5144 } |
| 5145 if (annotationsDataLink != null) { |
| 5146 _json["annotationsDataLink"] = annotationsDataLink; |
| 5147 } |
| 5148 if (annotationsLink != null) { |
| 5149 _json["annotationsLink"] = annotationsLink; |
| 5150 } |
| 5151 if (contentVersion != null) { |
| 5152 _json["contentVersion"] = contentVersion; |
| 5153 } |
| 5154 if (dataCount != null) { |
| 5155 _json["dataCount"] = dataCount; |
| 5156 } |
| 5157 if (id != null) { |
| 5158 _json["id"] = id; |
| 5159 } |
| 5160 if (kind != null) { |
| 5161 _json["kind"] = kind; |
| 5162 } |
| 5163 if (layerId != null) { |
| 5164 _json["layerId"] = layerId; |
| 5165 } |
| 5166 if (selfLink != null) { |
| 5167 _json["selfLink"] = selfLink; |
| 5168 } |
| 5169 if (updated != null) { |
| 5170 _json["updated"] = (updated).toIso8601String(); |
| 5171 } |
| 5172 if (volumeAnnotationsVersion != null) { |
| 5173 _json["volumeAnnotationsVersion"] = volumeAnnotationsVersion; |
| 5174 } |
| 5175 if (volumeId != null) { |
| 5176 _json["volumeId"] = volumeId; |
| 5177 } |
| 5178 return _json; |
| 5179 } |
| 5180 } |
| 5181 |
| 5182 |
| 5183 /** Not documented yet. */ |
| 5184 class OffersItemsItems { |
| 5185 /** Not documented yet. */ |
| 5186 core.String author; |
| 5187 |
| 5188 /** Not documented yet. */ |
| 5189 core.String canonicalVolumeLink; |
| 5190 |
| 5191 /** Not documented yet. */ |
| 5192 core.String coverUrl; |
| 5193 |
| 5194 /** Not documented yet. */ |
| 5195 core.String description; |
| 5196 |
| 5197 /** Not documented yet. */ |
| 5198 core.String title; |
| 5199 |
| 5200 /** Not documented yet. */ |
| 5201 core.String volumeId; |
| 5202 |
| 5203 |
| 5204 OffersItemsItems(); |
| 5205 |
| 5206 OffersItemsItems.fromJson(core.Map _json) { |
| 5207 if (_json.containsKey("author")) { |
| 5208 author = _json["author"]; |
| 5209 } |
| 5210 if (_json.containsKey("canonicalVolumeLink")) { |
| 5211 canonicalVolumeLink = _json["canonicalVolumeLink"]; |
| 5212 } |
| 5213 if (_json.containsKey("coverUrl")) { |
| 5214 coverUrl = _json["coverUrl"]; |
| 5215 } |
| 5216 if (_json.containsKey("description")) { |
| 5217 description = _json["description"]; |
| 5218 } |
| 5219 if (_json.containsKey("title")) { |
| 5220 title = _json["title"]; |
| 5221 } |
| 5222 if (_json.containsKey("volumeId")) { |
| 5223 volumeId = _json["volumeId"]; |
| 5224 } |
| 5225 } |
| 5226 |
| 5227 core.Map toJson() { |
| 5228 var _json = new core.Map(); |
| 5229 if (author != null) { |
| 5230 _json["author"] = author; |
| 5231 } |
| 5232 if (canonicalVolumeLink != null) { |
| 5233 _json["canonicalVolumeLink"] = canonicalVolumeLink; |
| 5234 } |
| 5235 if (coverUrl != null) { |
| 5236 _json["coverUrl"] = coverUrl; |
| 5237 } |
| 5238 if (description != null) { |
| 5239 _json["description"] = description; |
| 5240 } |
| 5241 if (title != null) { |
| 5242 _json["title"] = title; |
| 5243 } |
| 5244 if (volumeId != null) { |
| 5245 _json["volumeId"] = volumeId; |
| 5246 } |
| 5247 return _json; |
| 5248 } |
| 5249 } |
| 5250 |
| 5251 |
| 5252 /** Not documented yet. */ |
| 5253 class OffersItems { |
| 5254 /** Not documented yet. */ |
| 5255 core.String artUrl; |
| 5256 |
| 5257 /** Not documented yet. */ |
| 5258 core.String id; |
| 5259 |
| 5260 /** Not documented yet. */ |
| 5261 core.List<OffersItemsItems> items; |
| 5262 |
| 5263 |
| 5264 OffersItems(); |
| 5265 |
| 5266 OffersItems.fromJson(core.Map _json) { |
| 5267 if (_json.containsKey("artUrl")) { |
| 5268 artUrl = _json["artUrl"]; |
| 5269 } |
| 5270 if (_json.containsKey("id")) { |
| 5271 id = _json["id"]; |
| 5272 } |
| 5273 if (_json.containsKey("items")) { |
| 5274 items = _json["items"].map((value) => new OffersItemsItems.fromJson(value)
).toList(); |
| 5275 } |
| 5276 } |
| 5277 |
| 5278 core.Map toJson() { |
| 5279 var _json = new core.Map(); |
| 5280 if (artUrl != null) { |
| 5281 _json["artUrl"] = artUrl; |
| 5282 } |
| 5283 if (id != null) { |
| 5284 _json["id"] = id; |
| 5285 } |
| 5286 if (items != null) { |
| 5287 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5288 } |
| 5289 return _json; |
| 5290 } |
| 5291 } |
| 5292 |
| 5293 |
| 5294 /** Not documented yet. */ |
| 5295 class Offers { |
| 5296 /** A list of offers. */ |
| 5297 core.List<OffersItems> items; |
| 5298 |
| 5299 /** Resource type. */ |
| 5300 core.String kind; |
| 5301 |
| 5302 |
| 5303 Offers(); |
| 5304 |
| 5305 Offers.fromJson(core.Map _json) { |
| 5306 if (_json.containsKey("items")) { |
| 5307 items = _json["items"].map((value) => new OffersItems.fromJson(value)).toL
ist(); |
| 5308 } |
| 5309 if (_json.containsKey("kind")) { |
| 5310 kind = _json["kind"]; |
| 5311 } |
| 5312 } |
| 5313 |
| 5314 core.Map toJson() { |
| 5315 var _json = new core.Map(); |
| 5316 if (items != null) { |
| 5317 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 5318 } |
| 5319 if (kind != null) { |
| 5320 _json["kind"] = kind; |
| 5321 } |
| 5322 return _json; |
| 5323 } |
| 5324 } |
| 5325 |
| 5326 |
| 5327 /** Not documented yet. */ |
| 5328 class ReadingPosition { |
| 5329 /** Position in an EPUB as a CFI. */ |
| 5330 core.String epubCfiPosition; |
| 5331 |
| 5332 /** Position in a volume for image-based content. */ |
| 5333 core.String gbImagePosition; |
| 5334 |
| 5335 /** Position in a volume for text-based content. */ |
| 5336 core.String gbTextPosition; |
| 5337 |
| 5338 /** Resource type for a reading position. */ |
| 5339 core.String kind; |
| 5340 |
| 5341 /** Position in a PDF file. */ |
| 5342 core.String pdfPosition; |
| 5343 |
| 5344 /** |
| 5345 * Timestamp when this reading position was last updated (formatted UTC |
| 5346 * timestamp with millisecond resolution). |
| 5347 */ |
| 5348 core.DateTime updated; |
| 5349 |
| 5350 /** Volume id associated with this reading position. */ |
| 5351 core.String volumeId; |
| 5352 |
| 5353 |
| 5354 ReadingPosition(); |
| 5355 |
| 5356 ReadingPosition.fromJson(core.Map _json) { |
| 5357 if (_json.containsKey("epubCfiPosition")) { |
| 5358 epubCfiPosition = _json["epubCfiPosition"]; |
| 5359 } |
| 5360 if (_json.containsKey("gbImagePosition")) { |
| 5361 gbImagePosition = _json["gbImagePosition"]; |
| 5362 } |
| 5363 if (_json.containsKey("gbTextPosition")) { |
| 5364 gbTextPosition = _json["gbTextPosition"]; |
| 5365 } |
| 5366 if (_json.containsKey("kind")) { |
| 5367 kind = _json["kind"]; |
| 5368 } |
| 5369 if (_json.containsKey("pdfPosition")) { |
| 5370 pdfPosition = _json["pdfPosition"]; |
| 5371 } |
| 5372 if (_json.containsKey("updated")) { |
| 5373 updated = core.DateTime.parse(_json["updated"]); |
| 5374 } |
| 5375 if (_json.containsKey("volumeId")) { |
| 5376 volumeId = _json["volumeId"]; |
| 5377 } |
| 5378 } |
| 5379 |
| 5380 core.Map toJson() { |
| 5381 var _json = new core.Map(); |
| 5382 if (epubCfiPosition != null) { |
| 5383 _json["epubCfiPosition"] = epubCfiPosition; |
| 5384 } |
| 5385 if (gbImagePosition != null) { |
| 5386 _json["gbImagePosition"] = gbImagePosition; |
| 5387 } |
| 5388 if (gbTextPosition != null) { |
| 5389 _json["gbTextPosition"] = gbTextPosition; |
| 5390 } |
| 5391 if (kind != null) { |
| 5392 _json["kind"] = kind; |
| 5393 } |
| 5394 if (pdfPosition != null) { |
| 5395 _json["pdfPosition"] = pdfPosition; |
| 5396 } |
| 5397 if (updated != null) { |
| 5398 _json["updated"] = (updated).toIso8601String(); |
| 5399 } |
| 5400 if (volumeId != null) { |
| 5401 _json["volumeId"] = volumeId; |
| 5402 } |
| 5403 return _json; |
| 5404 } |
| 5405 } |
| 5406 |
| 5407 |
| 5408 /** Not documented yet. */ |
| 5409 class RequestAccess { |
| 5410 /** A concurrent access response. */ |
| 5411 ConcurrentAccessRestriction concurrentAccess; |
| 5412 |
| 5413 /** A download access response. */ |
| 5414 DownloadAccessRestriction downloadAccess; |
| 5415 |
| 5416 /** Resource type. */ |
| 5417 core.String kind; |
| 5418 |
| 5419 |
| 5420 RequestAccess(); |
| 5421 |
| 5422 RequestAccess.fromJson(core.Map _json) { |
| 5423 if (_json.containsKey("concurrentAccess")) { |
| 5424 concurrentAccess = new ConcurrentAccessRestriction.fromJson(_json["concurr
entAccess"]); |
| 5425 } |
| 5426 if (_json.containsKey("downloadAccess")) { |
| 5427 downloadAccess = new DownloadAccessRestriction.fromJson(_json["downloadAcc
ess"]); |
| 5428 } |
| 5429 if (_json.containsKey("kind")) { |
| 5430 kind = _json["kind"]; |
| 5431 } |
| 5432 } |
| 5433 |
| 5434 core.Map toJson() { |
| 5435 var _json = new core.Map(); |
| 5436 if (concurrentAccess != null) { |
| 5437 _json["concurrentAccess"] = (concurrentAccess).toJson(); |
| 5438 } |
| 5439 if (downloadAccess != null) { |
| 5440 _json["downloadAccess"] = (downloadAccess).toJson(); |
| 5441 } |
| 5442 if (kind != null) { |
| 5443 _json["kind"] = kind; |
| 5444 } |
| 5445 return _json; |
| 5446 } |
| 5447 } |
| 5448 |
| 5449 |
| 5450 /** Author of this review. */ |
| 5451 class ReviewAuthor { |
| 5452 /** Name of this person. */ |
| 5453 core.String displayName; |
| 5454 |
| 5455 |
| 5456 ReviewAuthor(); |
| 5457 |
| 5458 ReviewAuthor.fromJson(core.Map _json) { |
| 5459 if (_json.containsKey("displayName")) { |
| 5460 displayName = _json["displayName"]; |
| 5461 } |
| 5462 } |
| 5463 |
| 5464 core.Map toJson() { |
| 5465 var _json = new core.Map(); |
| 5466 if (displayName != null) { |
| 5467 _json["displayName"] = displayName; |
| 5468 } |
| 5469 return _json; |
| 5470 } |
| 5471 } |
| 5472 |
| 5473 |
| 5474 /** |
| 5475 * Information regarding the source of this review, when the review is not from |
| 5476 * a Google Books user. |
| 5477 */ |
| 5478 class ReviewSource { |
| 5479 /** Name of the source. */ |
| 5480 core.String description; |
| 5481 |
| 5482 /** Extra text about the source of the review. */ |
| 5483 core.String extraDescription; |
| 5484 |
| 5485 /** URL of the source of the review. */ |
| 5486 core.String url; |
| 5487 |
| 5488 |
| 5489 ReviewSource(); |
| 5490 |
| 5491 ReviewSource.fromJson(core.Map _json) { |
| 5492 if (_json.containsKey("description")) { |
| 5493 description = _json["description"]; |
| 5494 } |
| 5495 if (_json.containsKey("extraDescription")) { |
| 5496 extraDescription = _json["extraDescription"]; |
| 5497 } |
| 5498 if (_json.containsKey("url")) { |
| 5499 url = _json["url"]; |
| 5500 } |
| 5501 } |
| 5502 |
| 5503 core.Map toJson() { |
| 5504 var _json = new core.Map(); |
| 5505 if (description != null) { |
| 5506 _json["description"] = description; |
| 5507 } |
| 5508 if (extraDescription != null) { |
| 5509 _json["extraDescription"] = extraDescription; |
| 5510 } |
| 5511 if (url != null) { |
| 5512 _json["url"] = url; |
| 5513 } |
| 5514 return _json; |
| 5515 } |
| 5516 } |
| 5517 |
| 5518 |
| 5519 /** Not documented yet. */ |
| 5520 class Review { |
| 5521 /** Author of this review. */ |
| 5522 ReviewAuthor author; |
| 5523 |
| 5524 /** Review text. */ |
| 5525 core.String content; |
| 5526 |
| 5527 /** Date of this review. */ |
| 5528 core.String date; |
| 5529 |
| 5530 /** URL for the full review text, for reviews gathered from the web. */ |
| 5531 core.String fullTextUrl; |
| 5532 |
| 5533 /** Resource type for a review. */ |
| 5534 core.String kind; |
| 5535 |
| 5536 /** |
| 5537 * Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, |
| 5538 * FIVE or NOT_RATED. |
| 5539 */ |
| 5540 core.String rating; |
| 5541 |
| 5542 /** |
| 5543 * Information regarding the source of this review, when the review is not |
| 5544 * from a Google Books user. |
| 5545 */ |
| 5546 ReviewSource source; |
| 5547 |
| 5548 /** Title for this review. */ |
| 5549 core.String title; |
| 5550 |
| 5551 /** |
| 5552 * Source type for this review. Possible values are EDITORIAL, WEB_USER or |
| 5553 * GOOGLE_USER. |
| 5554 */ |
| 5555 core.String type; |
| 5556 |
| 5557 /** Volume that this review is for. */ |
| 5558 core.String volumeId; |
| 5559 |
| 5560 |
| 5561 Review(); |
| 5562 |
| 5563 Review.fromJson(core.Map _json) { |
| 5564 if (_json.containsKey("author")) { |
| 5565 author = new ReviewAuthor.fromJson(_json["author"]); |
| 5566 } |
| 5567 if (_json.containsKey("content")) { |
| 5568 content = _json["content"]; |
| 5569 } |
| 5570 if (_json.containsKey("date")) { |
| 5571 date = _json["date"]; |
| 5572 } |
| 5573 if (_json.containsKey("fullTextUrl")) { |
| 5574 fullTextUrl = _json["fullTextUrl"]; |
| 5575 } |
| 5576 if (_json.containsKey("kind")) { |
| 5577 kind = _json["kind"]; |
| 5578 } |
| 5579 if (_json.containsKey("rating")) { |
| 5580 rating = _json["rating"]; |
| 5581 } |
| 5582 if (_json.containsKey("source")) { |
| 5583 source = new ReviewSource.fromJson(_json["source"]); |
| 5584 } |
| 5585 if (_json.containsKey("title")) { |
| 5586 title = _json["title"]; |
| 5587 } |
| 5588 if (_json.containsKey("type")) { |
| 5589 type = _json["type"]; |
| 5590 } |
| 5591 if (_json.containsKey("volumeId")) { |
| 5592 volumeId = _json["volumeId"]; |
| 5593 } |
| 5594 } |
| 5595 |
| 5596 core.Map toJson() { |
| 5597 var _json = new core.Map(); |
| 5598 if (author != null) { |
| 5599 _json["author"] = (author).toJson(); |
| 5600 } |
| 5601 if (content != null) { |
| 5602 _json["content"] = content; |
| 5603 } |
| 5604 if (date != null) { |
| 5605 _json["date"] = date; |
| 5606 } |
| 5607 if (fullTextUrl != null) { |
| 5608 _json["fullTextUrl"] = fullTextUrl; |
| 5609 } |
| 5610 if (kind != null) { |
| 5611 _json["kind"] = kind; |
| 5612 } |
| 5613 if (rating != null) { |
| 5614 _json["rating"] = rating; |
| 5615 } |
| 5616 if (source != null) { |
| 5617 _json["source"] = (source).toJson(); |
| 5618 } |
| 5619 if (title != null) { |
| 5620 _json["title"] = title; |
| 5621 } |
| 5622 if (type != null) { |
| 5623 _json["type"] = type; |
| 5624 } |
| 5625 if (volumeId != null) { |
| 5626 _json["volumeId"] = volumeId; |
| 5627 } |
| 5628 return _json; |
| 5629 } |
| 5630 } |
| 5631 |
| 5632 |
| 5633 /** Information about epub content. (In LITE projection.) */ |
| 5634 class VolumeAccessInfoEpub { |
| 5635 /** URL to retrieve ACS token for epub download. (In LITE projection.) */ |
| 5636 core.String acsTokenLink; |
| 5637 |
| 5638 /** URL to download epub. (In LITE projection.) */ |
| 5639 core.String downloadLink; |
| 5640 |
| 5641 /** |
| 5642 * Is a flowing text epub available either as public domain or for purchase. |
| 5643 * (In LITE projection.) |
| 5644 */ |
| 5645 core.bool isAvailable; |
| 5646 |
| 5647 |
| 5648 VolumeAccessInfoEpub(); |
| 5649 |
| 5650 VolumeAccessInfoEpub.fromJson(core.Map _json) { |
| 5651 if (_json.containsKey("acsTokenLink")) { |
| 5652 acsTokenLink = _json["acsTokenLink"]; |
| 5653 } |
| 5654 if (_json.containsKey("downloadLink")) { |
| 5655 downloadLink = _json["downloadLink"]; |
| 5656 } |
| 5657 if (_json.containsKey("isAvailable")) { |
| 5658 isAvailable = _json["isAvailable"]; |
| 5659 } |
| 5660 } |
| 5661 |
| 5662 core.Map toJson() { |
| 5663 var _json = new core.Map(); |
| 5664 if (acsTokenLink != null) { |
| 5665 _json["acsTokenLink"] = acsTokenLink; |
| 5666 } |
| 5667 if (downloadLink != null) { |
| 5668 _json["downloadLink"] = downloadLink; |
| 5669 } |
| 5670 if (isAvailable != null) { |
| 5671 _json["isAvailable"] = isAvailable; |
| 5672 } |
| 5673 return _json; |
| 5674 } |
| 5675 } |
| 5676 |
| 5677 |
| 5678 /** Information about pdf content. (In LITE projection.) */ |
| 5679 class VolumeAccessInfoPdf { |
| 5680 /** URL to retrieve ACS token for pdf download. (In LITE projection.) */ |
| 5681 core.String acsTokenLink; |
| 5682 |
| 5683 /** URL to download pdf. (In LITE projection.) */ |
| 5684 core.String downloadLink; |
| 5685 |
| 5686 /** |
| 5687 * Is a scanned image pdf available either as public domain or for purchase. |
| 5688 * (In LITE projection.) |
| 5689 */ |
| 5690 core.bool isAvailable; |
| 5691 |
| 5692 |
| 5693 VolumeAccessInfoPdf(); |
| 5694 |
| 5695 VolumeAccessInfoPdf.fromJson(core.Map _json) { |
| 5696 if (_json.containsKey("acsTokenLink")) { |
| 5697 acsTokenLink = _json["acsTokenLink"]; |
| 5698 } |
| 5699 if (_json.containsKey("downloadLink")) { |
| 5700 downloadLink = _json["downloadLink"]; |
| 5701 } |
| 5702 if (_json.containsKey("isAvailable")) { |
| 5703 isAvailable = _json["isAvailable"]; |
| 5704 } |
| 5705 } |
| 5706 |
| 5707 core.Map toJson() { |
| 5708 var _json = new core.Map(); |
| 5709 if (acsTokenLink != null) { |
| 5710 _json["acsTokenLink"] = acsTokenLink; |
| 5711 } |
| 5712 if (downloadLink != null) { |
| 5713 _json["downloadLink"] = downloadLink; |
| 5714 } |
| 5715 if (isAvailable != null) { |
| 5716 _json["isAvailable"] = isAvailable; |
| 5717 } |
| 5718 return _json; |
| 5719 } |
| 5720 } |
| 5721 |
| 5722 |
| 5723 /** |
| 5724 * Any information about a volume related to reading or obtaining that volume |
| 5725 * text. This information can depend on country (books may be public domain in |
| 5726 * one country but not in another, e.g.). |
| 5727 */ |
| 5728 class VolumeAccessInfo { |
| 5729 /** |
| 5730 * Combines the access and viewability of this volume into a single status |
| 5731 * field for this user. Values can be FULL_PURCHASED, FULL_PUBLIC_DOMAIN, |
| 5732 * SAMPLE or NONE. (In LITE projection.) |
| 5733 */ |
| 5734 core.String accessViewStatus; |
| 5735 |
| 5736 /** |
| 5737 * The two-letter ISO_3166-1 country code for which this access information is |
| 5738 * valid. (In LITE projection.) |
| 5739 */ |
| 5740 core.String country; |
| 5741 |
| 5742 /** Information about a volume's download license access restrictions. */ |
| 5743 DownloadAccessRestriction downloadAccess; |
| 5744 |
| 5745 /** |
| 5746 * URL to the Google Drive viewer if this volume is uploaded by the user by |
| 5747 * selecting the file from Google Drive. |
| 5748 */ |
| 5749 core.String driveImportedContentLink; |
| 5750 |
| 5751 /** |
| 5752 * Whether this volume can be embedded in a viewport using the Embedded Viewer |
| 5753 * API. |
| 5754 */ |
| 5755 core.bool embeddable; |
| 5756 |
| 5757 /** Information about epub content. (In LITE projection.) */ |
| 5758 VolumeAccessInfoEpub epub; |
| 5759 |
| 5760 /** |
| 5761 * Whether this volume requires that the client explicitly request offline |
| 5762 * download license rather than have it done automatically when loading the |
| 5763 * content, if the client supports it. |
| 5764 */ |
| 5765 core.bool explicitOfflineLicenseManagement; |
| 5766 |
| 5767 /** Information about pdf content. (In LITE projection.) */ |
| 5768 VolumeAccessInfoPdf pdf; |
| 5769 |
| 5770 /** Whether or not this book is public domain in the country listed above. */ |
| 5771 core.bool publicDomain; |
| 5772 |
| 5773 /** Whether quote sharing is allowed for this volume. */ |
| 5774 core.bool quoteSharingAllowed; |
| 5775 |
| 5776 /** |
| 5777 * Whether text-to-speech is permitted for this volume. Values can be ALLOWED, |
| 5778 * ALLOWED_FOR_ACCESSIBILITY, or NOT_ALLOWED. |
| 5779 */ |
| 5780 core.String textToSpeechPermission; |
| 5781 |
| 5782 /** |
| 5783 * For ordered but not yet processed orders, we give a URL that can be used to |
| 5784 * go to the appropriate Google Wallet page. |
| 5785 */ |
| 5786 core.String viewOrderUrl; |
| 5787 |
| 5788 /** |
| 5789 * The read access of a volume. Possible values are PARTIAL, ALL_PAGES, |
| 5790 * NO_PAGES or UNKNOWN. This value depends on the country listed above. A |
| 5791 * value of PARTIAL means that the publisher has allowed some portion of the |
| 5792 * volume to be viewed publicly, without purchase. This can apply to eBooks as |
| 5793 * well as non-eBooks. Public domain books will always have a value of |
| 5794 * ALL_PAGES. |
| 5795 */ |
| 5796 core.String viewability; |
| 5797 |
| 5798 /** |
| 5799 * URL to read this volume on the Google Books site. Link will not allow users |
| 5800 * to read non-viewable volumes. |
| 5801 */ |
| 5802 core.String webReaderLink; |
| 5803 |
| 5804 |
| 5805 VolumeAccessInfo(); |
| 5806 |
| 5807 VolumeAccessInfo.fromJson(core.Map _json) { |
| 5808 if (_json.containsKey("accessViewStatus")) { |
| 5809 accessViewStatus = _json["accessViewStatus"]; |
| 5810 } |
| 5811 if (_json.containsKey("country")) { |
| 5812 country = _json["country"]; |
| 5813 } |
| 5814 if (_json.containsKey("downloadAccess")) { |
| 5815 downloadAccess = new DownloadAccessRestriction.fromJson(_json["downloadAcc
ess"]); |
| 5816 } |
| 5817 if (_json.containsKey("driveImportedContentLink")) { |
| 5818 driveImportedContentLink = _json["driveImportedContentLink"]; |
| 5819 } |
| 5820 if (_json.containsKey("embeddable")) { |
| 5821 embeddable = _json["embeddable"]; |
| 5822 } |
| 5823 if (_json.containsKey("epub")) { |
| 5824 epub = new VolumeAccessInfoEpub.fromJson(_json["epub"]); |
| 5825 } |
| 5826 if (_json.containsKey("explicitOfflineLicenseManagement")) { |
| 5827 explicitOfflineLicenseManagement = _json["explicitOfflineLicenseManagement
"]; |
| 5828 } |
| 5829 if (_json.containsKey("pdf")) { |
| 5830 pdf = new VolumeAccessInfoPdf.fromJson(_json["pdf"]); |
| 5831 } |
| 5832 if (_json.containsKey("publicDomain")) { |
| 5833 publicDomain = _json["publicDomain"]; |
| 5834 } |
| 5835 if (_json.containsKey("quoteSharingAllowed")) { |
| 5836 quoteSharingAllowed = _json["quoteSharingAllowed"]; |
| 5837 } |
| 5838 if (_json.containsKey("textToSpeechPermission")) { |
| 5839 textToSpeechPermission = _json["textToSpeechPermission"]; |
| 5840 } |
| 5841 if (_json.containsKey("viewOrderUrl")) { |
| 5842 viewOrderUrl = _json["viewOrderUrl"]; |
| 5843 } |
| 5844 if (_json.containsKey("viewability")) { |
| 5845 viewability = _json["viewability"]; |
| 5846 } |
| 5847 if (_json.containsKey("webReaderLink")) { |
| 5848 webReaderLink = _json["webReaderLink"]; |
| 5849 } |
| 5850 } |
| 5851 |
| 5852 core.Map toJson() { |
| 5853 var _json = new core.Map(); |
| 5854 if (accessViewStatus != null) { |
| 5855 _json["accessViewStatus"] = accessViewStatus; |
| 5856 } |
| 5857 if (country != null) { |
| 5858 _json["country"] = country; |
| 5859 } |
| 5860 if (downloadAccess != null) { |
| 5861 _json["downloadAccess"] = (downloadAccess).toJson(); |
| 5862 } |
| 5863 if (driveImportedContentLink != null) { |
| 5864 _json["driveImportedContentLink"] = driveImportedContentLink; |
| 5865 } |
| 5866 if (embeddable != null) { |
| 5867 _json["embeddable"] = embeddable; |
| 5868 } |
| 5869 if (epub != null) { |
| 5870 _json["epub"] = (epub).toJson(); |
| 5871 } |
| 5872 if (explicitOfflineLicenseManagement != null) { |
| 5873 _json["explicitOfflineLicenseManagement"] = explicitOfflineLicenseManageme
nt; |
| 5874 } |
| 5875 if (pdf != null) { |
| 5876 _json["pdf"] = (pdf).toJson(); |
| 5877 } |
| 5878 if (publicDomain != null) { |
| 5879 _json["publicDomain"] = publicDomain; |
| 5880 } |
| 5881 if (quoteSharingAllowed != null) { |
| 5882 _json["quoteSharingAllowed"] = quoteSharingAllowed; |
| 5883 } |
| 5884 if (textToSpeechPermission != null) { |
| 5885 _json["textToSpeechPermission"] = textToSpeechPermission; |
| 5886 } |
| 5887 if (viewOrderUrl != null) { |
| 5888 _json["viewOrderUrl"] = viewOrderUrl; |
| 5889 } |
| 5890 if (viewability != null) { |
| 5891 _json["viewability"] = viewability; |
| 5892 } |
| 5893 if (webReaderLink != null) { |
| 5894 _json["webReaderLink"] = webReaderLink; |
| 5895 } |
| 5896 return _json; |
| 5897 } |
| 5898 } |
| 5899 |
| 5900 |
| 5901 /** Not documented yet. */ |
| 5902 class VolumeLayerInfoLayers { |
| 5903 /** The layer id of this layer (e.g. "geo"). */ |
| 5904 core.String layerId; |
| 5905 |
| 5906 /** |
| 5907 * The current version of this layer's volume annotations. Note that this |
| 5908 * version applies only to the data in the books.layers.volumeAnnotations.* |
| 5909 * responses. The actual annotation data is versioned separately. |
| 5910 */ |
| 5911 core.String volumeAnnotationsVersion; |
| 5912 |
| 5913 |
| 5914 VolumeLayerInfoLayers(); |
| 5915 |
| 5916 VolumeLayerInfoLayers.fromJson(core.Map _json) { |
| 5917 if (_json.containsKey("layerId")) { |
| 5918 layerId = _json["layerId"]; |
| 5919 } |
| 5920 if (_json.containsKey("volumeAnnotationsVersion")) { |
| 5921 volumeAnnotationsVersion = _json["volumeAnnotationsVersion"]; |
| 5922 } |
| 5923 } |
| 5924 |
| 5925 core.Map toJson() { |
| 5926 var _json = new core.Map(); |
| 5927 if (layerId != null) { |
| 5928 _json["layerId"] = layerId; |
| 5929 } |
| 5930 if (volumeAnnotationsVersion != null) { |
| 5931 _json["volumeAnnotationsVersion"] = volumeAnnotationsVersion; |
| 5932 } |
| 5933 return _json; |
| 5934 } |
| 5935 } |
| 5936 |
| 5937 |
| 5938 /** What layers exist in this volume and high level information about them. */ |
| 5939 class VolumeLayerInfo { |
| 5940 /** |
| 5941 * A layer should appear here if and only if the layer exists for this book. |
| 5942 */ |
| 5943 core.List<VolumeLayerInfoLayers> layers; |
| 5944 |
| 5945 |
| 5946 VolumeLayerInfo(); |
| 5947 |
| 5948 VolumeLayerInfo.fromJson(core.Map _json) { |
| 5949 if (_json.containsKey("layers")) { |
| 5950 layers = _json["layers"].map((value) => new VolumeLayerInfoLayers.fromJson
(value)).toList(); |
| 5951 } |
| 5952 } |
| 5953 |
| 5954 core.Map toJson() { |
| 5955 var _json = new core.Map(); |
| 5956 if (layers != null) { |
| 5957 _json["layers"] = layers.map((value) => (value).toJson()).toList(); |
| 5958 } |
| 5959 return _json; |
| 5960 } |
| 5961 } |
| 5962 |
| 5963 |
| 5964 /** Recommendation related information for this volume. */ |
| 5965 class VolumeRecommendedInfo { |
| 5966 /** A text explaining why this volume is recommended. */ |
| 5967 core.String explanation; |
| 5968 |
| 5969 |
| 5970 VolumeRecommendedInfo(); |
| 5971 |
| 5972 VolumeRecommendedInfo.fromJson(core.Map _json) { |
| 5973 if (_json.containsKey("explanation")) { |
| 5974 explanation = _json["explanation"]; |
| 5975 } |
| 5976 } |
| 5977 |
| 5978 core.Map toJson() { |
| 5979 var _json = new core.Map(); |
| 5980 if (explanation != null) { |
| 5981 _json["explanation"] = explanation; |
| 5982 } |
| 5983 return _json; |
| 5984 } |
| 5985 } |
| 5986 |
| 5987 |
| 5988 /** Suggested retail price. (In LITE projection.) */ |
| 5989 class VolumeSaleInfoListPrice { |
| 5990 /** Amount in the currency listed below. (In LITE projection.) */ |
| 5991 core.double amount; |
| 5992 |
| 5993 /** An ISO 4217, three-letter currency code. (In LITE projection.) */ |
| 5994 core.String currencyCode; |
| 5995 |
| 5996 |
| 5997 VolumeSaleInfoListPrice(); |
| 5998 |
| 5999 VolumeSaleInfoListPrice.fromJson(core.Map _json) { |
| 6000 if (_json.containsKey("amount")) { |
| 6001 amount = _json["amount"]; |
| 6002 } |
| 6003 if (_json.containsKey("currencyCode")) { |
| 6004 currencyCode = _json["currencyCode"]; |
| 6005 } |
| 6006 } |
| 6007 |
| 6008 core.Map toJson() { |
| 6009 var _json = new core.Map(); |
| 6010 if (amount != null) { |
| 6011 _json["amount"] = amount; |
| 6012 } |
| 6013 if (currencyCode != null) { |
| 6014 _json["currencyCode"] = currencyCode; |
| 6015 } |
| 6016 return _json; |
| 6017 } |
| 6018 } |
| 6019 |
| 6020 |
| 6021 /** Offer list (=undiscounted) price in Micros. */ |
| 6022 class VolumeSaleInfoOffersListPrice { |
| 6023 /** Not documented yet. */ |
| 6024 core.double amountInMicros; |
| 6025 |
| 6026 /** Not documented yet. */ |
| 6027 core.String currencyCode; |
| 6028 |
| 6029 |
| 6030 VolumeSaleInfoOffersListPrice(); |
| 6031 |
| 6032 VolumeSaleInfoOffersListPrice.fromJson(core.Map _json) { |
| 6033 if (_json.containsKey("amountInMicros")) { |
| 6034 amountInMicros = _json["amountInMicros"]; |
| 6035 } |
| 6036 if (_json.containsKey("currencyCode")) { |
| 6037 currencyCode = _json["currencyCode"]; |
| 6038 } |
| 6039 } |
| 6040 |
| 6041 core.Map toJson() { |
| 6042 var _json = new core.Map(); |
| 6043 if (amountInMicros != null) { |
| 6044 _json["amountInMicros"] = amountInMicros; |
| 6045 } |
| 6046 if (currencyCode != null) { |
| 6047 _json["currencyCode"] = currencyCode; |
| 6048 } |
| 6049 return _json; |
| 6050 } |
| 6051 } |
| 6052 |
| 6053 |
| 6054 /** The rental duration (for rental offers only). */ |
| 6055 class VolumeSaleInfoOffersRentalDuration { |
| 6056 /** Not documented yet. */ |
| 6057 core.double count; |
| 6058 |
| 6059 /** Not documented yet. */ |
| 6060 core.String unit; |
| 6061 |
| 6062 |
| 6063 VolumeSaleInfoOffersRentalDuration(); |
| 6064 |
| 6065 VolumeSaleInfoOffersRentalDuration.fromJson(core.Map _json) { |
| 6066 if (_json.containsKey("count")) { |
| 6067 count = _json["count"]; |
| 6068 } |
| 6069 if (_json.containsKey("unit")) { |
| 6070 unit = _json["unit"]; |
| 6071 } |
| 6072 } |
| 6073 |
| 6074 core.Map toJson() { |
| 6075 var _json = new core.Map(); |
| 6076 if (count != null) { |
| 6077 _json["count"] = count; |
| 6078 } |
| 6079 if (unit != null) { |
| 6080 _json["unit"] = unit; |
| 6081 } |
| 6082 return _json; |
| 6083 } |
| 6084 } |
| 6085 |
| 6086 |
| 6087 /** Offer retail (=discounted) price in Micros */ |
| 6088 class VolumeSaleInfoOffersRetailPrice { |
| 6089 /** Not documented yet. */ |
| 6090 core.double amountInMicros; |
| 6091 |
| 6092 /** Not documented yet. */ |
| 6093 core.String currencyCode; |
| 6094 |
| 6095 |
| 6096 VolumeSaleInfoOffersRetailPrice(); |
| 6097 |
| 6098 VolumeSaleInfoOffersRetailPrice.fromJson(core.Map _json) { |
| 6099 if (_json.containsKey("amountInMicros")) { |
| 6100 amountInMicros = _json["amountInMicros"]; |
| 6101 } |
| 6102 if (_json.containsKey("currencyCode")) { |
| 6103 currencyCode = _json["currencyCode"]; |
| 6104 } |
| 6105 } |
| 6106 |
| 6107 core.Map toJson() { |
| 6108 var _json = new core.Map(); |
| 6109 if (amountInMicros != null) { |
| 6110 _json["amountInMicros"] = amountInMicros; |
| 6111 } |
| 6112 if (currencyCode != null) { |
| 6113 _json["currencyCode"] = currencyCode; |
| 6114 } |
| 6115 return _json; |
| 6116 } |
| 6117 } |
| 6118 |
| 6119 |
| 6120 /** Not documented yet. */ |
| 6121 class VolumeSaleInfoOffers { |
| 6122 /** The finsky offer type (e.g., PURCHASE=0 RENTAL=3) */ |
| 6123 core.int finskyOfferType; |
| 6124 |
| 6125 /** Offer list (=undiscounted) price in Micros. */ |
| 6126 VolumeSaleInfoOffersListPrice listPrice; |
| 6127 |
| 6128 /** The rental duration (for rental offers only). */ |
| 6129 VolumeSaleInfoOffersRentalDuration rentalDuration; |
| 6130 |
| 6131 /** Offer retail (=discounted) price in Micros */ |
| 6132 VolumeSaleInfoOffersRetailPrice retailPrice; |
| 6133 |
| 6134 |
| 6135 VolumeSaleInfoOffers(); |
| 6136 |
| 6137 VolumeSaleInfoOffers.fromJson(core.Map _json) { |
| 6138 if (_json.containsKey("finskyOfferType")) { |
| 6139 finskyOfferType = _json["finskyOfferType"]; |
| 6140 } |
| 6141 if (_json.containsKey("listPrice")) { |
| 6142 listPrice = new VolumeSaleInfoOffersListPrice.fromJson(_json["listPrice"])
; |
| 6143 } |
| 6144 if (_json.containsKey("rentalDuration")) { |
| 6145 rentalDuration = new VolumeSaleInfoOffersRentalDuration.fromJson(_json["re
ntalDuration"]); |
| 6146 } |
| 6147 if (_json.containsKey("retailPrice")) { |
| 6148 retailPrice = new VolumeSaleInfoOffersRetailPrice.fromJson(_json["retailPr
ice"]); |
| 6149 } |
| 6150 } |
| 6151 |
| 6152 core.Map toJson() { |
| 6153 var _json = new core.Map(); |
| 6154 if (finskyOfferType != null) { |
| 6155 _json["finskyOfferType"] = finskyOfferType; |
| 6156 } |
| 6157 if (listPrice != null) { |
| 6158 _json["listPrice"] = (listPrice).toJson(); |
| 6159 } |
| 6160 if (rentalDuration != null) { |
| 6161 _json["rentalDuration"] = (rentalDuration).toJson(); |
| 6162 } |
| 6163 if (retailPrice != null) { |
| 6164 _json["retailPrice"] = (retailPrice).toJson(); |
| 6165 } |
| 6166 return _json; |
| 6167 } |
| 6168 } |
| 6169 |
| 6170 |
| 6171 /** |
| 6172 * The actual selling price of the book. This is the same as the suggested |
| 6173 * retail or list price unless there are offers or discounts on this volume. (In |
| 6174 * LITE projection.) |
| 6175 */ |
| 6176 class VolumeSaleInfoRetailPrice { |
| 6177 /** Amount in the currency listed below. (In LITE projection.) */ |
| 6178 core.double amount; |
| 6179 |
| 6180 /** An ISO 4217, three-letter currency code. (In LITE projection.) */ |
| 6181 core.String currencyCode; |
| 6182 |
| 6183 |
| 6184 VolumeSaleInfoRetailPrice(); |
| 6185 |
| 6186 VolumeSaleInfoRetailPrice.fromJson(core.Map _json) { |
| 6187 if (_json.containsKey("amount")) { |
| 6188 amount = _json["amount"]; |
| 6189 } |
| 6190 if (_json.containsKey("currencyCode")) { |
| 6191 currencyCode = _json["currencyCode"]; |
| 6192 } |
| 6193 } |
| 6194 |
| 6195 core.Map toJson() { |
| 6196 var _json = new core.Map(); |
| 6197 if (amount != null) { |
| 6198 _json["amount"] = amount; |
| 6199 } |
| 6200 if (currencyCode != null) { |
| 6201 _json["currencyCode"] = currencyCode; |
| 6202 } |
| 6203 return _json; |
| 6204 } |
| 6205 } |
| 6206 |
| 6207 |
| 6208 /** |
| 6209 * Any information about a volume related to the eBookstore and/or |
| 6210 * purchaseability. This information can depend on the country where the request |
| 6211 * originates from (i.e. books may not be for sale in certain countries). |
| 6212 */ |
| 6213 class VolumeSaleInfo { |
| 6214 /** |
| 6215 * URL to purchase this volume on the Google Books site. (In LITE projection) |
| 6216 */ |
| 6217 core.String buyLink; |
| 6218 |
| 6219 /** |
| 6220 * The two-letter ISO_3166-1 country code for which this sale information is |
| 6221 * valid. (In LITE projection.) |
| 6222 */ |
| 6223 core.String country; |
| 6224 |
| 6225 /** |
| 6226 * Whether or not this volume is an eBook (can be added to the My eBooks |
| 6227 * shelf). |
| 6228 */ |
| 6229 core.bool isEbook; |
| 6230 |
| 6231 /** Suggested retail price. (In LITE projection.) */ |
| 6232 VolumeSaleInfoListPrice listPrice; |
| 6233 |
| 6234 /** Offers available for this volume (sales and rentals). */ |
| 6235 core.List<VolumeSaleInfoOffers> offers; |
| 6236 |
| 6237 /** The date on which this book is available for sale. */ |
| 6238 core.DateTime onSaleDate; |
| 6239 |
| 6240 /** |
| 6241 * The actual selling price of the book. This is the same as the suggested |
| 6242 * retail or list price unless there are offers or discounts on this volume. |
| 6243 * (In LITE projection.) |
| 6244 */ |
| 6245 VolumeSaleInfoRetailPrice retailPrice; |
| 6246 |
| 6247 /** |
| 6248 * Whether or not this book is available for sale or offered for free in the |
| 6249 * Google eBookstore for the country listed above. Possible values are |
| 6250 * FOR_SALE, FOR_RENTAL_ONLY, FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or |
| 6251 * FOR_PREORDER. |
| 6252 */ |
| 6253 core.String saleability; |
| 6254 |
| 6255 |
| 6256 VolumeSaleInfo(); |
| 6257 |
| 6258 VolumeSaleInfo.fromJson(core.Map _json) { |
| 6259 if (_json.containsKey("buyLink")) { |
| 6260 buyLink = _json["buyLink"]; |
| 6261 } |
| 6262 if (_json.containsKey("country")) { |
| 6263 country = _json["country"]; |
| 6264 } |
| 6265 if (_json.containsKey("isEbook")) { |
| 6266 isEbook = _json["isEbook"]; |
| 6267 } |
| 6268 if (_json.containsKey("listPrice")) { |
| 6269 listPrice = new VolumeSaleInfoListPrice.fromJson(_json["listPrice"]); |
| 6270 } |
| 6271 if (_json.containsKey("offers")) { |
| 6272 offers = _json["offers"].map((value) => new VolumeSaleInfoOffers.fromJson(
value)).toList(); |
| 6273 } |
| 6274 if (_json.containsKey("onSaleDate")) { |
| 6275 onSaleDate = core.DateTime.parse(_json["onSaleDate"]); |
| 6276 } |
| 6277 if (_json.containsKey("retailPrice")) { |
| 6278 retailPrice = new VolumeSaleInfoRetailPrice.fromJson(_json["retailPrice"])
; |
| 6279 } |
| 6280 if (_json.containsKey("saleability")) { |
| 6281 saleability = _json["saleability"]; |
| 6282 } |
| 6283 } |
| 6284 |
| 6285 core.Map toJson() { |
| 6286 var _json = new core.Map(); |
| 6287 if (buyLink != null) { |
| 6288 _json["buyLink"] = buyLink; |
| 6289 } |
| 6290 if (country != null) { |
| 6291 _json["country"] = country; |
| 6292 } |
| 6293 if (isEbook != null) { |
| 6294 _json["isEbook"] = isEbook; |
| 6295 } |
| 6296 if (listPrice != null) { |
| 6297 _json["listPrice"] = (listPrice).toJson(); |
| 6298 } |
| 6299 if (offers != null) { |
| 6300 _json["offers"] = offers.map((value) => (value).toJson()).toList(); |
| 6301 } |
| 6302 if (onSaleDate != null) { |
| 6303 _json["onSaleDate"] = (onSaleDate).toIso8601String(); |
| 6304 } |
| 6305 if (retailPrice != null) { |
| 6306 _json["retailPrice"] = (retailPrice).toJson(); |
| 6307 } |
| 6308 if (saleability != null) { |
| 6309 _json["saleability"] = saleability; |
| 6310 } |
| 6311 return _json; |
| 6312 } |
| 6313 } |
| 6314 |
| 6315 |
| 6316 /** Search result information related to this volume. */ |
| 6317 class VolumeSearchInfo { |
| 6318 /** A text snippet containing the search query. */ |
| 6319 core.String textSnippet; |
| 6320 |
| 6321 |
| 6322 VolumeSearchInfo(); |
| 6323 |
| 6324 VolumeSearchInfo.fromJson(core.Map _json) { |
| 6325 if (_json.containsKey("textSnippet")) { |
| 6326 textSnippet = _json["textSnippet"]; |
| 6327 } |
| 6328 } |
| 6329 |
| 6330 core.Map toJson() { |
| 6331 var _json = new core.Map(); |
| 6332 if (textSnippet != null) { |
| 6333 _json["textSnippet"] = textSnippet; |
| 6334 } |
| 6335 return _json; |
| 6336 } |
| 6337 } |
| 6338 |
| 6339 |
| 6340 /** Copy/Paste accounting information. */ |
| 6341 class VolumeUserInfoCopy { |
| 6342 /** Not documented yet. */ |
| 6343 core.int allowedCharacterCount; |
| 6344 |
| 6345 /** Not documented yet. */ |
| 6346 core.String limitType; |
| 6347 |
| 6348 /** Not documented yet. */ |
| 6349 core.int remainingCharacterCount; |
| 6350 |
| 6351 /** Not documented yet. */ |
| 6352 core.DateTime updated; |
| 6353 |
| 6354 |
| 6355 VolumeUserInfoCopy(); |
| 6356 |
| 6357 VolumeUserInfoCopy.fromJson(core.Map _json) { |
| 6358 if (_json.containsKey("allowedCharacterCount")) { |
| 6359 allowedCharacterCount = _json["allowedCharacterCount"]; |
| 6360 } |
| 6361 if (_json.containsKey("limitType")) { |
| 6362 limitType = _json["limitType"]; |
| 6363 } |
| 6364 if (_json.containsKey("remainingCharacterCount")) { |
| 6365 remainingCharacterCount = _json["remainingCharacterCount"]; |
| 6366 } |
| 6367 if (_json.containsKey("updated")) { |
| 6368 updated = core.DateTime.parse(_json["updated"]); |
| 6369 } |
| 6370 } |
| 6371 |
| 6372 core.Map toJson() { |
| 6373 var _json = new core.Map(); |
| 6374 if (allowedCharacterCount != null) { |
| 6375 _json["allowedCharacterCount"] = allowedCharacterCount; |
| 6376 } |
| 6377 if (limitType != null) { |
| 6378 _json["limitType"] = limitType; |
| 6379 } |
| 6380 if (remainingCharacterCount != null) { |
| 6381 _json["remainingCharacterCount"] = remainingCharacterCount; |
| 6382 } |
| 6383 if (updated != null) { |
| 6384 _json["updated"] = (updated).toIso8601String(); |
| 6385 } |
| 6386 return _json; |
| 6387 } |
| 6388 } |
| 6389 |
| 6390 |
| 6391 /** Period during this book is/was a valid rental. */ |
| 6392 class VolumeUserInfoRentalPeriod { |
| 6393 /** Not documented yet. */ |
| 6394 core.String endUtcSec; |
| 6395 |
| 6396 /** Not documented yet. */ |
| 6397 core.String startUtcSec; |
| 6398 |
| 6399 |
| 6400 VolumeUserInfoRentalPeriod(); |
| 6401 |
| 6402 VolumeUserInfoRentalPeriod.fromJson(core.Map _json) { |
| 6403 if (_json.containsKey("endUtcSec")) { |
| 6404 endUtcSec = _json["endUtcSec"]; |
| 6405 } |
| 6406 if (_json.containsKey("startUtcSec")) { |
| 6407 startUtcSec = _json["startUtcSec"]; |
| 6408 } |
| 6409 } |
| 6410 |
| 6411 core.Map toJson() { |
| 6412 var _json = new core.Map(); |
| 6413 if (endUtcSec != null) { |
| 6414 _json["endUtcSec"] = endUtcSec; |
| 6415 } |
| 6416 if (startUtcSec != null) { |
| 6417 _json["startUtcSec"] = startUtcSec; |
| 6418 } |
| 6419 return _json; |
| 6420 } |
| 6421 } |
| 6422 |
| 6423 |
| 6424 /** Not documented yet. */ |
| 6425 class VolumeUserInfoUserUploadedVolumeInfo { |
| 6426 /** Not documented yet. */ |
| 6427 core.String processingState; |
| 6428 |
| 6429 |
| 6430 VolumeUserInfoUserUploadedVolumeInfo(); |
| 6431 |
| 6432 VolumeUserInfoUserUploadedVolumeInfo.fromJson(core.Map _json) { |
| 6433 if (_json.containsKey("processingState")) { |
| 6434 processingState = _json["processingState"]; |
| 6435 } |
| 6436 } |
| 6437 |
| 6438 core.Map toJson() { |
| 6439 var _json = new core.Map(); |
| 6440 if (processingState != null) { |
| 6441 _json["processingState"] = processingState; |
| 6442 } |
| 6443 return _json; |
| 6444 } |
| 6445 } |
| 6446 |
| 6447 |
| 6448 /** |
| 6449 * User specific information related to this volume. (e.g. page this user last |
| 6450 * read or whether they purchased this book) |
| 6451 */ |
| 6452 class VolumeUserInfo { |
| 6453 /** Copy/Paste accounting information. */ |
| 6454 VolumeUserInfoCopy copy; |
| 6455 |
| 6456 /** Whether or not this volume is currently in "my books." */ |
| 6457 core.bool isInMyBooks; |
| 6458 |
| 6459 /** |
| 6460 * Whether or not this volume was pre-ordered by the authenticated user making |
| 6461 * the request. (In LITE projection.) |
| 6462 */ |
| 6463 core.bool isPreordered; |
| 6464 |
| 6465 /** |
| 6466 * Whether or not this volume was purchased by the authenticated user making |
| 6467 * the request. (In LITE projection.) |
| 6468 */ |
| 6469 core.bool isPurchased; |
| 6470 |
| 6471 /** Whether or not this volume was user uploaded. */ |
| 6472 core.bool isUploaded; |
| 6473 |
| 6474 /** |
| 6475 * The user's current reading position in the volume, if one is available. (In |
| 6476 * LITE projection.) |
| 6477 */ |
| 6478 ReadingPosition readingPosition; |
| 6479 |
| 6480 /** Period during this book is/was a valid rental. */ |
| 6481 VolumeUserInfoRentalPeriod rentalPeriod; |
| 6482 |
| 6483 /** Whether this book is an active or an expired rental. */ |
| 6484 core.String rentalState; |
| 6485 |
| 6486 /** This user's review of this volume, if one exists. */ |
| 6487 Review review; |
| 6488 |
| 6489 /** |
| 6490 * Timestamp when this volume was last modified by a user action, such as a |
| 6491 * reading position update, volume purchase or writing a review. (RFC 3339 UTC |
| 6492 * date-time format). |
| 6493 */ |
| 6494 core.DateTime updated; |
| 6495 |
| 6496 /** Not documented yet. */ |
| 6497 VolumeUserInfoUserUploadedVolumeInfo userUploadedVolumeInfo; |
| 6498 |
| 6499 |
| 6500 VolumeUserInfo(); |
| 6501 |
| 6502 VolumeUserInfo.fromJson(core.Map _json) { |
| 6503 if (_json.containsKey("copy")) { |
| 6504 copy = new VolumeUserInfoCopy.fromJson(_json["copy"]); |
| 6505 } |
| 6506 if (_json.containsKey("isInMyBooks")) { |
| 6507 isInMyBooks = _json["isInMyBooks"]; |
| 6508 } |
| 6509 if (_json.containsKey("isPreordered")) { |
| 6510 isPreordered = _json["isPreordered"]; |
| 6511 } |
| 6512 if (_json.containsKey("isPurchased")) { |
| 6513 isPurchased = _json["isPurchased"]; |
| 6514 } |
| 6515 if (_json.containsKey("isUploaded")) { |
| 6516 isUploaded = _json["isUploaded"]; |
| 6517 } |
| 6518 if (_json.containsKey("readingPosition")) { |
| 6519 readingPosition = new ReadingPosition.fromJson(_json["readingPosition"]); |
| 6520 } |
| 6521 if (_json.containsKey("rentalPeriod")) { |
| 6522 rentalPeriod = new VolumeUserInfoRentalPeriod.fromJson(_json["rentalPeriod
"]); |
| 6523 } |
| 6524 if (_json.containsKey("rentalState")) { |
| 6525 rentalState = _json["rentalState"]; |
| 6526 } |
| 6527 if (_json.containsKey("review")) { |
| 6528 review = new Review.fromJson(_json["review"]); |
| 6529 } |
| 6530 if (_json.containsKey("updated")) { |
| 6531 updated = core.DateTime.parse(_json["updated"]); |
| 6532 } |
| 6533 if (_json.containsKey("userUploadedVolumeInfo")) { |
| 6534 userUploadedVolumeInfo = new VolumeUserInfoUserUploadedVolumeInfo.fromJson
(_json["userUploadedVolumeInfo"]); |
| 6535 } |
| 6536 } |
| 6537 |
| 6538 core.Map toJson() { |
| 6539 var _json = new core.Map(); |
| 6540 if (copy != null) { |
| 6541 _json["copy"] = (copy).toJson(); |
| 6542 } |
| 6543 if (isInMyBooks != null) { |
| 6544 _json["isInMyBooks"] = isInMyBooks; |
| 6545 } |
| 6546 if (isPreordered != null) { |
| 6547 _json["isPreordered"] = isPreordered; |
| 6548 } |
| 6549 if (isPurchased != null) { |
| 6550 _json["isPurchased"] = isPurchased; |
| 6551 } |
| 6552 if (isUploaded != null) { |
| 6553 _json["isUploaded"] = isUploaded; |
| 6554 } |
| 6555 if (readingPosition != null) { |
| 6556 _json["readingPosition"] = (readingPosition).toJson(); |
| 6557 } |
| 6558 if (rentalPeriod != null) { |
| 6559 _json["rentalPeriod"] = (rentalPeriod).toJson(); |
| 6560 } |
| 6561 if (rentalState != null) { |
| 6562 _json["rentalState"] = rentalState; |
| 6563 } |
| 6564 if (review != null) { |
| 6565 _json["review"] = (review).toJson(); |
| 6566 } |
| 6567 if (updated != null) { |
| 6568 _json["updated"] = (updated).toIso8601String(); |
| 6569 } |
| 6570 if (userUploadedVolumeInfo != null) { |
| 6571 _json["userUploadedVolumeInfo"] = (userUploadedVolumeInfo).toJson(); |
| 6572 } |
| 6573 return _json; |
| 6574 } |
| 6575 } |
| 6576 |
| 6577 |
| 6578 /** Physical dimensions of this volume. */ |
| 6579 class VolumeVolumeInfoDimensions { |
| 6580 /** Height or length of this volume (in cm). */ |
| 6581 core.String height; |
| 6582 |
| 6583 /** Thickness of this volume (in cm). */ |
| 6584 core.String thickness; |
| 6585 |
| 6586 /** Width of this volume (in cm). */ |
| 6587 core.String width; |
| 6588 |
| 6589 |
| 6590 VolumeVolumeInfoDimensions(); |
| 6591 |
| 6592 VolumeVolumeInfoDimensions.fromJson(core.Map _json) { |
| 6593 if (_json.containsKey("height")) { |
| 6594 height = _json["height"]; |
| 6595 } |
| 6596 if (_json.containsKey("thickness")) { |
| 6597 thickness = _json["thickness"]; |
| 6598 } |
| 6599 if (_json.containsKey("width")) { |
| 6600 width = _json["width"]; |
| 6601 } |
| 6602 } |
| 6603 |
| 6604 core.Map toJson() { |
| 6605 var _json = new core.Map(); |
| 6606 if (height != null) { |
| 6607 _json["height"] = height; |
| 6608 } |
| 6609 if (thickness != null) { |
| 6610 _json["thickness"] = thickness; |
| 6611 } |
| 6612 if (width != null) { |
| 6613 _json["width"] = width; |
| 6614 } |
| 6615 return _json; |
| 6616 } |
| 6617 } |
| 6618 |
| 6619 |
| 6620 /** |
| 6621 * A list of image links for all the sizes that are available. (In LITE |
| 6622 * projection.) |
| 6623 */ |
| 6624 class VolumeVolumeInfoImageLinks { |
| 6625 /** |
| 6626 * Image link for extra large size (width of ~1280 pixels). (In LITE |
| 6627 * projection) |
| 6628 */ |
| 6629 core.String extraLarge; |
| 6630 |
| 6631 /** Image link for large size (width of ~800 pixels). (In LITE projection) */ |
| 6632 core.String large; |
| 6633 |
| 6634 /** |
| 6635 * Image link for medium size (width of ~575 pixels). (In LITE projection) |
| 6636 */ |
| 6637 core.String medium; |
| 6638 |
| 6639 /** Image link for small size (width of ~300 pixels). (In LITE projection) */ |
| 6640 core.String small; |
| 6641 |
| 6642 /** |
| 6643 * Image link for small thumbnail size (width of ~80 pixels). (In LITE |
| 6644 * projection) |
| 6645 */ |
| 6646 core.String smallThumbnail; |
| 6647 |
| 6648 /** |
| 6649 * Image link for thumbnail size (width of ~128 pixels). (In LITE projection) |
| 6650 */ |
| 6651 core.String thumbnail; |
| 6652 |
| 6653 |
| 6654 VolumeVolumeInfoImageLinks(); |
| 6655 |
| 6656 VolumeVolumeInfoImageLinks.fromJson(core.Map _json) { |
| 6657 if (_json.containsKey("extraLarge")) { |
| 6658 extraLarge = _json["extraLarge"]; |
| 6659 } |
| 6660 if (_json.containsKey("large")) { |
| 6661 large = _json["large"]; |
| 6662 } |
| 6663 if (_json.containsKey("medium")) { |
| 6664 medium = _json["medium"]; |
| 6665 } |
| 6666 if (_json.containsKey("small")) { |
| 6667 small = _json["small"]; |
| 6668 } |
| 6669 if (_json.containsKey("smallThumbnail")) { |
| 6670 smallThumbnail = _json["smallThumbnail"]; |
| 6671 } |
| 6672 if (_json.containsKey("thumbnail")) { |
| 6673 thumbnail = _json["thumbnail"]; |
| 6674 } |
| 6675 } |
| 6676 |
| 6677 core.Map toJson() { |
| 6678 var _json = new core.Map(); |
| 6679 if (extraLarge != null) { |
| 6680 _json["extraLarge"] = extraLarge; |
| 6681 } |
| 6682 if (large != null) { |
| 6683 _json["large"] = large; |
| 6684 } |
| 6685 if (medium != null) { |
| 6686 _json["medium"] = medium; |
| 6687 } |
| 6688 if (small != null) { |
| 6689 _json["small"] = small; |
| 6690 } |
| 6691 if (smallThumbnail != null) { |
| 6692 _json["smallThumbnail"] = smallThumbnail; |
| 6693 } |
| 6694 if (thumbnail != null) { |
| 6695 _json["thumbnail"] = thumbnail; |
| 6696 } |
| 6697 return _json; |
| 6698 } |
| 6699 } |
| 6700 |
| 6701 |
| 6702 /** Not documented yet. */ |
| 6703 class VolumeVolumeInfoIndustryIdentifiers { |
| 6704 /** Industry specific volume identifier. */ |
| 6705 core.String identifier; |
| 6706 |
| 6707 /** Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and OTHER. */ |
| 6708 core.String type; |
| 6709 |
| 6710 |
| 6711 VolumeVolumeInfoIndustryIdentifiers(); |
| 6712 |
| 6713 VolumeVolumeInfoIndustryIdentifiers.fromJson(core.Map _json) { |
| 6714 if (_json.containsKey("identifier")) { |
| 6715 identifier = _json["identifier"]; |
| 6716 } |
| 6717 if (_json.containsKey("type")) { |
| 6718 type = _json["type"]; |
| 6719 } |
| 6720 } |
| 6721 |
| 6722 core.Map toJson() { |
| 6723 var _json = new core.Map(); |
| 6724 if (identifier != null) { |
| 6725 _json["identifier"] = identifier; |
| 6726 } |
| 6727 if (type != null) { |
| 6728 _json["type"] = type; |
| 6729 } |
| 6730 return _json; |
| 6731 } |
| 6732 } |
| 6733 |
| 6734 |
| 6735 /** General volume information. */ |
| 6736 class VolumeVolumeInfo { |
| 6737 /** |
| 6738 * The names of the authors and/or editors for this volume. (In LITE |
| 6739 * projection) |
| 6740 */ |
| 6741 core.List<core.String> authors; |
| 6742 |
| 6743 /** The mean review rating for this volume. (min = 1.0, max = 5.0) */ |
| 6744 core.double averageRating; |
| 6745 |
| 6746 /** Canonical URL for a volume. (In LITE projection.) */ |
| 6747 core.String canonicalVolumeLink; |
| 6748 |
| 6749 /** A list of subject categories, such as "Fiction", "Suspense", etc. */ |
| 6750 core.List<core.String> categories; |
| 6751 |
| 6752 /** |
| 6753 * An identifier for the version of the volume content (text & images). (In |
| 6754 * LITE projection) |
| 6755 */ |
| 6756 core.String contentVersion; |
| 6757 |
| 6758 /** |
| 6759 * A synopsis of the volume. The text of the description is formatted in HTML |
| 6760 * and includes simple formatting elements, such as b, i, and br tags. (In |
| 6761 * LITE projection.) |
| 6762 */ |
| 6763 core.String description; |
| 6764 |
| 6765 /** Physical dimensions of this volume. */ |
| 6766 VolumeVolumeInfoDimensions dimensions; |
| 6767 |
| 6768 /** |
| 6769 * A list of image links for all the sizes that are available. (In LITE |
| 6770 * projection.) |
| 6771 */ |
| 6772 VolumeVolumeInfoImageLinks imageLinks; |
| 6773 |
| 6774 /** Industry standard identifiers for this volume. */ |
| 6775 core.List<VolumeVolumeInfoIndustryIdentifiers> industryIdentifiers; |
| 6776 |
| 6777 /** |
| 6778 * URL to view information about this volume on the Google Books site. (In |
| 6779 * LITE projection) |
| 6780 */ |
| 6781 core.String infoLink; |
| 6782 |
| 6783 /** |
| 6784 * Best language for this volume (based on content). It is the two-letter ISO |
| 6785 * 639-1 code such as 'fr', 'en', etc. |
| 6786 */ |
| 6787 core.String language; |
| 6788 |
| 6789 /** |
| 6790 * The main category to which this volume belongs. It will be the category |
| 6791 * from the categories list returned below that has the highest weight. |
| 6792 */ |
| 6793 core.String mainCategory; |
| 6794 |
| 6795 /** Total number of pages as per publisher metadata. */ |
| 6796 core.int pageCount; |
| 6797 |
| 6798 /** URL to preview this volume on the Google Books site. */ |
| 6799 core.String previewLink; |
| 6800 |
| 6801 /** |
| 6802 * Type of publication of this volume. Possible values are BOOK or MAGAZINE. |
| 6803 */ |
| 6804 core.String printType; |
| 6805 |
| 6806 /** Total number of printed pages in generated pdf representation. */ |
| 6807 core.int printedPageCount; |
| 6808 |
| 6809 /** Date of publication. (In LITE projection.) */ |
| 6810 core.String publishedDate; |
| 6811 |
| 6812 /** Publisher of this volume. (In LITE projection.) */ |
| 6813 core.String publisher; |
| 6814 |
| 6815 /** The number of review ratings for this volume. */ |
| 6816 core.int ratingsCount; |
| 6817 |
| 6818 /** |
| 6819 * The reading modes available for this volume. |
| 6820 * |
| 6821 * The values for Object must be JSON objects. It can consist of `num`, |
| 6822 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 6823 */ |
| 6824 core.Object readingModes; |
| 6825 |
| 6826 /** Volume subtitle. (In LITE projection.) */ |
| 6827 core.String subtitle; |
| 6828 |
| 6829 /** Volume title. (In LITE projection.) */ |
| 6830 core.String title; |
| 6831 |
| 6832 |
| 6833 VolumeVolumeInfo(); |
| 6834 |
| 6835 VolumeVolumeInfo.fromJson(core.Map _json) { |
| 6836 if (_json.containsKey("authors")) { |
| 6837 authors = _json["authors"]; |
| 6838 } |
| 6839 if (_json.containsKey("averageRating")) { |
| 6840 averageRating = _json["averageRating"]; |
| 6841 } |
| 6842 if (_json.containsKey("canonicalVolumeLink")) { |
| 6843 canonicalVolumeLink = _json["canonicalVolumeLink"]; |
| 6844 } |
| 6845 if (_json.containsKey("categories")) { |
| 6846 categories = _json["categories"]; |
| 6847 } |
| 6848 if (_json.containsKey("contentVersion")) { |
| 6849 contentVersion = _json["contentVersion"]; |
| 6850 } |
| 6851 if (_json.containsKey("description")) { |
| 6852 description = _json["description"]; |
| 6853 } |
| 6854 if (_json.containsKey("dimensions")) { |
| 6855 dimensions = new VolumeVolumeInfoDimensions.fromJson(_json["dimensions"]); |
| 6856 } |
| 6857 if (_json.containsKey("imageLinks")) { |
| 6858 imageLinks = new VolumeVolumeInfoImageLinks.fromJson(_json["imageLinks"]); |
| 6859 } |
| 6860 if (_json.containsKey("industryIdentifiers")) { |
| 6861 industryIdentifiers = _json["industryIdentifiers"].map((value) => new Volu
meVolumeInfoIndustryIdentifiers.fromJson(value)).toList(); |
| 6862 } |
| 6863 if (_json.containsKey("infoLink")) { |
| 6864 infoLink = _json["infoLink"]; |
| 6865 } |
| 6866 if (_json.containsKey("language")) { |
| 6867 language = _json["language"]; |
| 6868 } |
| 6869 if (_json.containsKey("mainCategory")) { |
| 6870 mainCategory = _json["mainCategory"]; |
| 6871 } |
| 6872 if (_json.containsKey("pageCount")) { |
| 6873 pageCount = _json["pageCount"]; |
| 6874 } |
| 6875 if (_json.containsKey("previewLink")) { |
| 6876 previewLink = _json["previewLink"]; |
| 6877 } |
| 6878 if (_json.containsKey("printType")) { |
| 6879 printType = _json["printType"]; |
| 6880 } |
| 6881 if (_json.containsKey("printedPageCount")) { |
| 6882 printedPageCount = _json["printedPageCount"]; |
| 6883 } |
| 6884 if (_json.containsKey("publishedDate")) { |
| 6885 publishedDate = _json["publishedDate"]; |
| 6886 } |
| 6887 if (_json.containsKey("publisher")) { |
| 6888 publisher = _json["publisher"]; |
| 6889 } |
| 6890 if (_json.containsKey("ratingsCount")) { |
| 6891 ratingsCount = _json["ratingsCount"]; |
| 6892 } |
| 6893 if (_json.containsKey("readingModes")) { |
| 6894 readingModes = _json["readingModes"]; |
| 6895 } |
| 6896 if (_json.containsKey("subtitle")) { |
| 6897 subtitle = _json["subtitle"]; |
| 6898 } |
| 6899 if (_json.containsKey("title")) { |
| 6900 title = _json["title"]; |
| 6901 } |
| 6902 } |
| 6903 |
| 6904 core.Map toJson() { |
| 6905 var _json = new core.Map(); |
| 6906 if (authors != null) { |
| 6907 _json["authors"] = authors; |
| 6908 } |
| 6909 if (averageRating != null) { |
| 6910 _json["averageRating"] = averageRating; |
| 6911 } |
| 6912 if (canonicalVolumeLink != null) { |
| 6913 _json["canonicalVolumeLink"] = canonicalVolumeLink; |
| 6914 } |
| 6915 if (categories != null) { |
| 6916 _json["categories"] = categories; |
| 6917 } |
| 6918 if (contentVersion != null) { |
| 6919 _json["contentVersion"] = contentVersion; |
| 6920 } |
| 6921 if (description != null) { |
| 6922 _json["description"] = description; |
| 6923 } |
| 6924 if (dimensions != null) { |
| 6925 _json["dimensions"] = (dimensions).toJson(); |
| 6926 } |
| 6927 if (imageLinks != null) { |
| 6928 _json["imageLinks"] = (imageLinks).toJson(); |
| 6929 } |
| 6930 if (industryIdentifiers != null) { |
| 6931 _json["industryIdentifiers"] = industryIdentifiers.map((value) => (value).
toJson()).toList(); |
| 6932 } |
| 6933 if (infoLink != null) { |
| 6934 _json["infoLink"] = infoLink; |
| 6935 } |
| 6936 if (language != null) { |
| 6937 _json["language"] = language; |
| 6938 } |
| 6939 if (mainCategory != null) { |
| 6940 _json["mainCategory"] = mainCategory; |
| 6941 } |
| 6942 if (pageCount != null) { |
| 6943 _json["pageCount"] = pageCount; |
| 6944 } |
| 6945 if (previewLink != null) { |
| 6946 _json["previewLink"] = previewLink; |
| 6947 } |
| 6948 if (printType != null) { |
| 6949 _json["printType"] = printType; |
| 6950 } |
| 6951 if (printedPageCount != null) { |
| 6952 _json["printedPageCount"] = printedPageCount; |
| 6953 } |
| 6954 if (publishedDate != null) { |
| 6955 _json["publishedDate"] = publishedDate; |
| 6956 } |
| 6957 if (publisher != null) { |
| 6958 _json["publisher"] = publisher; |
| 6959 } |
| 6960 if (ratingsCount != null) { |
| 6961 _json["ratingsCount"] = ratingsCount; |
| 6962 } |
| 6963 if (readingModes != null) { |
| 6964 _json["readingModes"] = readingModes; |
| 6965 } |
| 6966 if (subtitle != null) { |
| 6967 _json["subtitle"] = subtitle; |
| 6968 } |
| 6969 if (title != null) { |
| 6970 _json["title"] = title; |
| 6971 } |
| 6972 return _json; |
| 6973 } |
| 6974 } |
| 6975 |
| 6976 |
| 6977 /** Not documented yet. */ |
| 6978 class Volume { |
| 6979 /** |
| 6980 * Any information about a volume related to reading or obtaining that volume |
| 6981 * text. This information can depend on country (books may be public domain in |
| 6982 * one country but not in another, e.g.). |
| 6983 */ |
| 6984 VolumeAccessInfo accessInfo; |
| 6985 |
| 6986 /** |
| 6987 * Opaque identifier for a specific version of a volume resource. (In LITE |
| 6988 * projection) |
| 6989 */ |
| 6990 core.String etag; |
| 6991 |
| 6992 /** Unique identifier for a volume. (In LITE projection.) */ |
| 6993 core.String id; |
| 6994 |
| 6995 /** Resource type for a volume. (In LITE projection.) */ |
| 6996 core.String kind; |
| 6997 |
| 6998 /** |
| 6999 * What layers exist in this volume and high level information about them. |
| 7000 */ |
| 7001 VolumeLayerInfo layerInfo; |
| 7002 |
| 7003 /** Recommendation related information for this volume. */ |
| 7004 VolumeRecommendedInfo recommendedInfo; |
| 7005 |
| 7006 /** |
| 7007 * Any information about a volume related to the eBookstore and/or |
| 7008 * purchaseability. This information can depend on the country where the |
| 7009 * request originates from (i.e. books may not be for sale in certain |
| 7010 * countries). |
| 7011 */ |
| 7012 VolumeSaleInfo saleInfo; |
| 7013 |
| 7014 /** Search result information related to this volume. */ |
| 7015 VolumeSearchInfo searchInfo; |
| 7016 |
| 7017 /** URL to this resource. (In LITE projection.) */ |
| 7018 core.String selfLink; |
| 7019 |
| 7020 /** |
| 7021 * User specific information related to this volume. (e.g. page this user last |
| 7022 * read or whether they purchased this book) |
| 7023 */ |
| 7024 VolumeUserInfo userInfo; |
| 7025 |
| 7026 /** General volume information. */ |
| 7027 VolumeVolumeInfo volumeInfo; |
| 7028 |
| 7029 |
| 7030 Volume(); |
| 7031 |
| 7032 Volume.fromJson(core.Map _json) { |
| 7033 if (_json.containsKey("accessInfo")) { |
| 7034 accessInfo = new VolumeAccessInfo.fromJson(_json["accessInfo"]); |
| 7035 } |
| 7036 if (_json.containsKey("etag")) { |
| 7037 etag = _json["etag"]; |
| 7038 } |
| 7039 if (_json.containsKey("id")) { |
| 7040 id = _json["id"]; |
| 7041 } |
| 7042 if (_json.containsKey("kind")) { |
| 7043 kind = _json["kind"]; |
| 7044 } |
| 7045 if (_json.containsKey("layerInfo")) { |
| 7046 layerInfo = new VolumeLayerInfo.fromJson(_json["layerInfo"]); |
| 7047 } |
| 7048 if (_json.containsKey("recommendedInfo")) { |
| 7049 recommendedInfo = new VolumeRecommendedInfo.fromJson(_json["recommendedInf
o"]); |
| 7050 } |
| 7051 if (_json.containsKey("saleInfo")) { |
| 7052 saleInfo = new VolumeSaleInfo.fromJson(_json["saleInfo"]); |
| 7053 } |
| 7054 if (_json.containsKey("searchInfo")) { |
| 7055 searchInfo = new VolumeSearchInfo.fromJson(_json["searchInfo"]); |
| 7056 } |
| 7057 if (_json.containsKey("selfLink")) { |
| 7058 selfLink = _json["selfLink"]; |
| 7059 } |
| 7060 if (_json.containsKey("userInfo")) { |
| 7061 userInfo = new VolumeUserInfo.fromJson(_json["userInfo"]); |
| 7062 } |
| 7063 if (_json.containsKey("volumeInfo")) { |
| 7064 volumeInfo = new VolumeVolumeInfo.fromJson(_json["volumeInfo"]); |
| 7065 } |
| 7066 } |
| 7067 |
| 7068 core.Map toJson() { |
| 7069 var _json = new core.Map(); |
| 7070 if (accessInfo != null) { |
| 7071 _json["accessInfo"] = (accessInfo).toJson(); |
| 7072 } |
| 7073 if (etag != null) { |
| 7074 _json["etag"] = etag; |
| 7075 } |
| 7076 if (id != null) { |
| 7077 _json["id"] = id; |
| 7078 } |
| 7079 if (kind != null) { |
| 7080 _json["kind"] = kind; |
| 7081 } |
| 7082 if (layerInfo != null) { |
| 7083 _json["layerInfo"] = (layerInfo).toJson(); |
| 7084 } |
| 7085 if (recommendedInfo != null) { |
| 7086 _json["recommendedInfo"] = (recommendedInfo).toJson(); |
| 7087 } |
| 7088 if (saleInfo != null) { |
| 7089 _json["saleInfo"] = (saleInfo).toJson(); |
| 7090 } |
| 7091 if (searchInfo != null) { |
| 7092 _json["searchInfo"] = (searchInfo).toJson(); |
| 7093 } |
| 7094 if (selfLink != null) { |
| 7095 _json["selfLink"] = selfLink; |
| 7096 } |
| 7097 if (userInfo != null) { |
| 7098 _json["userInfo"] = (userInfo).toJson(); |
| 7099 } |
| 7100 if (volumeInfo != null) { |
| 7101 _json["volumeInfo"] = (volumeInfo).toJson(); |
| 7102 } |
| 7103 return _json; |
| 7104 } |
| 7105 } |
| 7106 |
| 7107 |
| 7108 /** The content ranges to identify the selected text. */ |
| 7109 class VolumeannotationContentRanges { |
| 7110 /** Range in CFI format for this annotation for version above. */ |
| 7111 BooksAnnotationsRange cfiRange; |
| 7112 |
| 7113 /** Content version applicable to ranges below. */ |
| 7114 core.String contentVersion; |
| 7115 |
| 7116 /** Range in GB image format for this annotation for version above. */ |
| 7117 BooksAnnotationsRange gbImageRange; |
| 7118 |
| 7119 /** Range in GB text format for this annotation for version above. */ |
| 7120 BooksAnnotationsRange gbTextRange; |
| 7121 |
| 7122 |
| 7123 VolumeannotationContentRanges(); |
| 7124 |
| 7125 VolumeannotationContentRanges.fromJson(core.Map _json) { |
| 7126 if (_json.containsKey("cfiRange")) { |
| 7127 cfiRange = new BooksAnnotationsRange.fromJson(_json["cfiRange"]); |
| 7128 } |
| 7129 if (_json.containsKey("contentVersion")) { |
| 7130 contentVersion = _json["contentVersion"]; |
| 7131 } |
| 7132 if (_json.containsKey("gbImageRange")) { |
| 7133 gbImageRange = new BooksAnnotationsRange.fromJson(_json["gbImageRange"]); |
| 7134 } |
| 7135 if (_json.containsKey("gbTextRange")) { |
| 7136 gbTextRange = new BooksAnnotationsRange.fromJson(_json["gbTextRange"]); |
| 7137 } |
| 7138 } |
| 7139 |
| 7140 core.Map toJson() { |
| 7141 var _json = new core.Map(); |
| 7142 if (cfiRange != null) { |
| 7143 _json["cfiRange"] = (cfiRange).toJson(); |
| 7144 } |
| 7145 if (contentVersion != null) { |
| 7146 _json["contentVersion"] = contentVersion; |
| 7147 } |
| 7148 if (gbImageRange != null) { |
| 7149 _json["gbImageRange"] = (gbImageRange).toJson(); |
| 7150 } |
| 7151 if (gbTextRange != null) { |
| 7152 _json["gbTextRange"] = (gbTextRange).toJson(); |
| 7153 } |
| 7154 return _json; |
| 7155 } |
| 7156 } |
| 7157 |
| 7158 |
| 7159 /** Not documented yet. */ |
| 7160 class Volumeannotation { |
| 7161 /** The annotation data id for this volume annotation. */ |
| 7162 core.String annotationDataId; |
| 7163 |
| 7164 /** Link to get data for this annotation. */ |
| 7165 core.String annotationDataLink; |
| 7166 |
| 7167 /** The type of annotation this is. */ |
| 7168 core.String annotationType; |
| 7169 |
| 7170 /** The content ranges to identify the selected text. */ |
| 7171 VolumeannotationContentRanges contentRanges; |
| 7172 |
| 7173 /** Data for this annotation. */ |
| 7174 core.String data; |
| 7175 |
| 7176 /** Indicates that this annotation is deleted. */ |
| 7177 core.bool deleted; |
| 7178 |
| 7179 /** Unique id of this volume annotation. */ |
| 7180 core.String id; |
| 7181 |
| 7182 /** Resource Type */ |
| 7183 core.String kind; |
| 7184 |
| 7185 /** The Layer this annotation is for. */ |
| 7186 core.String layerId; |
| 7187 |
| 7188 /** Pages the annotation spans. */ |
| 7189 core.List<core.String> pageIds; |
| 7190 |
| 7191 /** Excerpt from the volume. */ |
| 7192 core.String selectedText; |
| 7193 |
| 7194 /** URL to this resource. */ |
| 7195 core.String selfLink; |
| 7196 |
| 7197 /** |
| 7198 * Timestamp for the last time this anntoation was updated. (RFC 3339 UTC |
| 7199 * date-time format). |
| 7200 */ |
| 7201 core.DateTime updated; |
| 7202 |
| 7203 /** The Volume this annotation is for. */ |
| 7204 core.String volumeId; |
| 7205 |
| 7206 |
| 7207 Volumeannotation(); |
| 7208 |
| 7209 Volumeannotation.fromJson(core.Map _json) { |
| 7210 if (_json.containsKey("annotationDataId")) { |
| 7211 annotationDataId = _json["annotationDataId"]; |
| 7212 } |
| 7213 if (_json.containsKey("annotationDataLink")) { |
| 7214 annotationDataLink = _json["annotationDataLink"]; |
| 7215 } |
| 7216 if (_json.containsKey("annotationType")) { |
| 7217 annotationType = _json["annotationType"]; |
| 7218 } |
| 7219 if (_json.containsKey("contentRanges")) { |
| 7220 contentRanges = new VolumeannotationContentRanges.fromJson(_json["contentR
anges"]); |
| 7221 } |
| 7222 if (_json.containsKey("data")) { |
| 7223 data = _json["data"]; |
| 7224 } |
| 7225 if (_json.containsKey("deleted")) { |
| 7226 deleted = _json["deleted"]; |
| 7227 } |
| 7228 if (_json.containsKey("id")) { |
| 7229 id = _json["id"]; |
| 7230 } |
| 7231 if (_json.containsKey("kind")) { |
| 7232 kind = _json["kind"]; |
| 7233 } |
| 7234 if (_json.containsKey("layerId")) { |
| 7235 layerId = _json["layerId"]; |
| 7236 } |
| 7237 if (_json.containsKey("pageIds")) { |
| 7238 pageIds = _json["pageIds"]; |
| 7239 } |
| 7240 if (_json.containsKey("selectedText")) { |
| 7241 selectedText = _json["selectedText"]; |
| 7242 } |
| 7243 if (_json.containsKey("selfLink")) { |
| 7244 selfLink = _json["selfLink"]; |
| 7245 } |
| 7246 if (_json.containsKey("updated")) { |
| 7247 updated = core.DateTime.parse(_json["updated"]); |
| 7248 } |
| 7249 if (_json.containsKey("volumeId")) { |
| 7250 volumeId = _json["volumeId"]; |
| 7251 } |
| 7252 } |
| 7253 |
| 7254 core.Map toJson() { |
| 7255 var _json = new core.Map(); |
| 7256 if (annotationDataId != null) { |
| 7257 _json["annotationDataId"] = annotationDataId; |
| 7258 } |
| 7259 if (annotationDataLink != null) { |
| 7260 _json["annotationDataLink"] = annotationDataLink; |
| 7261 } |
| 7262 if (annotationType != null) { |
| 7263 _json["annotationType"] = annotationType; |
| 7264 } |
| 7265 if (contentRanges != null) { |
| 7266 _json["contentRanges"] = (contentRanges).toJson(); |
| 7267 } |
| 7268 if (data != null) { |
| 7269 _json["data"] = data; |
| 7270 } |
| 7271 if (deleted != null) { |
| 7272 _json["deleted"] = deleted; |
| 7273 } |
| 7274 if (id != null) { |
| 7275 _json["id"] = id; |
| 7276 } |
| 7277 if (kind != null) { |
| 7278 _json["kind"] = kind; |
| 7279 } |
| 7280 if (layerId != null) { |
| 7281 _json["layerId"] = layerId; |
| 7282 } |
| 7283 if (pageIds != null) { |
| 7284 _json["pageIds"] = pageIds; |
| 7285 } |
| 7286 if (selectedText != null) { |
| 7287 _json["selectedText"] = selectedText; |
| 7288 } |
| 7289 if (selfLink != null) { |
| 7290 _json["selfLink"] = selfLink; |
| 7291 } |
| 7292 if (updated != null) { |
| 7293 _json["updated"] = (updated).toIso8601String(); |
| 7294 } |
| 7295 if (volumeId != null) { |
| 7296 _json["volumeId"] = volumeId; |
| 7297 } |
| 7298 return _json; |
| 7299 } |
| 7300 } |
| 7301 |
| 7302 |
| 7303 /** Not documented yet. */ |
| 7304 class Volumeannotations { |
| 7305 /** A list of volume annotations. */ |
| 7306 core.List<Volumeannotation> items; |
| 7307 |
| 7308 /** Resource type */ |
| 7309 core.String kind; |
| 7310 |
| 7311 /** |
| 7312 * Token to pass in for pagination for the next page. This will not be present |
| 7313 * if this request does not have more results. |
| 7314 */ |
| 7315 core.String nextPageToken; |
| 7316 |
| 7317 /** The total number of volume annotations found. */ |
| 7318 core.int totalItems; |
| 7319 |
| 7320 /** |
| 7321 * The version string for all of the volume annotations in this layer (not |
| 7322 * just the ones in this response). Note: the version string doesn't apply to |
| 7323 * the annotation data, just the information in this response (e.g. the |
| 7324 * location of annotations in the book). |
| 7325 */ |
| 7326 core.String version; |
| 7327 |
| 7328 |
| 7329 Volumeannotations(); |
| 7330 |
| 7331 Volumeannotations.fromJson(core.Map _json) { |
| 7332 if (_json.containsKey("items")) { |
| 7333 items = _json["items"].map((value) => new Volumeannotation.fromJson(value)
).toList(); |
| 7334 } |
| 7335 if (_json.containsKey("kind")) { |
| 7336 kind = _json["kind"]; |
| 7337 } |
| 7338 if (_json.containsKey("nextPageToken")) { |
| 7339 nextPageToken = _json["nextPageToken"]; |
| 7340 } |
| 7341 if (_json.containsKey("totalItems")) { |
| 7342 totalItems = _json["totalItems"]; |
| 7343 } |
| 7344 if (_json.containsKey("version")) { |
| 7345 version = _json["version"]; |
| 7346 } |
| 7347 } |
| 7348 |
| 7349 core.Map toJson() { |
| 7350 var _json = new core.Map(); |
| 7351 if (items != null) { |
| 7352 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 7353 } |
| 7354 if (kind != null) { |
| 7355 _json["kind"] = kind; |
| 7356 } |
| 7357 if (nextPageToken != null) { |
| 7358 _json["nextPageToken"] = nextPageToken; |
| 7359 } |
| 7360 if (totalItems != null) { |
| 7361 _json["totalItems"] = totalItems; |
| 7362 } |
| 7363 if (version != null) { |
| 7364 _json["version"] = version; |
| 7365 } |
| 7366 return _json; |
| 7367 } |
| 7368 } |
| 7369 |
| 7370 |
| 7371 /** Not documented yet. */ |
| 7372 class Volumes { |
| 7373 /** A list of volumes. */ |
| 7374 core.List<Volume> items; |
| 7375 |
| 7376 /** Resource type. */ |
| 7377 core.String kind; |
| 7378 |
| 7379 /** |
| 7380 * Total number of volumes found. This might be greater than the number of |
| 7381 * volumes returned in this response if results have been paginated. |
| 7382 */ |
| 7383 core.int totalItems; |
| 7384 |
| 7385 |
| 7386 Volumes(); |
| 7387 |
| 7388 Volumes.fromJson(core.Map _json) { |
| 7389 if (_json.containsKey("items")) { |
| 7390 items = _json["items"].map((value) => new Volume.fromJson(value)).toList()
; |
| 7391 } |
| 7392 if (_json.containsKey("kind")) { |
| 7393 kind = _json["kind"]; |
| 7394 } |
| 7395 if (_json.containsKey("totalItems")) { |
| 7396 totalItems = _json["totalItems"]; |
| 7397 } |
| 7398 } |
| 7399 |
| 7400 core.Map toJson() { |
| 7401 var _json = new core.Map(); |
| 7402 if (items != null) { |
| 7403 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 7404 } |
| 7405 if (kind != null) { |
| 7406 _json["kind"] = kind; |
| 7407 } |
| 7408 if (totalItems != null) { |
| 7409 _json["totalItems"] = totalItems; |
| 7410 } |
| 7411 return _json; |
| 7412 } |
| 7413 } |
| 7414 |
| 7415 |
OLD | NEW |