OLD | NEW |
(Empty) | |
| 1 library googleapis.androidpublisher.v2; |
| 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; |
| 12 |
| 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 |
| 16 /** Lets Android application developers access their Google Play accounts. */ |
| 17 class AndroidpublisherApi { |
| 18 /** View and manage your Google Play Android Developer account */ |
| 19 static const AndroidpublisherScope = "https://www.googleapis.com/auth/androidp
ublisher"; |
| 20 |
| 21 |
| 22 final common_internal.ApiRequester _requester; |
| 23 |
| 24 EditsResourceApi get edits => new EditsResourceApi(_requester); |
| 25 InappproductsResourceApi get inappproducts => new InappproductsResourceApi(_re
quester); |
| 26 PurchasesResourceApi get purchases => new PurchasesResourceApi(_requester); |
| 27 |
| 28 AndroidpublisherApi(http.Client client) : |
| 29 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/androidpublisher/v2/applications/"); |
| 30 } |
| 31 |
| 32 |
| 33 /** Not documented yet. */ |
| 34 class EditsResourceApi { |
| 35 final common_internal.ApiRequester _requester; |
| 36 |
| 37 EditsApklistingsResourceApi get apklistings => new EditsApklistingsResourceApi
(_requester); |
| 38 EditsApksResourceApi get apks => new EditsApksResourceApi(_requester); |
| 39 EditsDetailsResourceApi get details => new EditsDetailsResourceApi(_requester)
; |
| 40 EditsExpansionfilesResourceApi get expansionfiles => new EditsExpansionfilesRe
sourceApi(_requester); |
| 41 EditsImagesResourceApi get images => new EditsImagesResourceApi(_requester); |
| 42 EditsListingsResourceApi get listings => new EditsListingsResourceApi(_request
er); |
| 43 EditsTestersResourceApi get testers => new EditsTestersResourceApi(_requester)
; |
| 44 EditsTracksResourceApi get tracks => new EditsTracksResourceApi(_requester); |
| 45 |
| 46 EditsResourceApi(common_internal.ApiRequester client) : |
| 47 _requester = client; |
| 48 |
| 49 /** |
| 50 * Commits/applies the changes made in this edit back to the app. |
| 51 * |
| 52 * Request parameters: |
| 53 * |
| 54 * [packageName] - Unique identifier for the Android app that is being |
| 55 * updated; for example, "com.spiffygame". |
| 56 * |
| 57 * [editId] - Unique identifier for this edit. |
| 58 * |
| 59 * Completes with a [AppEdit]. |
| 60 * |
| 61 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 62 * error. |
| 63 * |
| 64 * If the used [http.Client] completes with an error when making a REST call, |
| 65 * this method will complete with the same error. |
| 66 */ |
| 67 async.Future<AppEdit> commit(core.String packageName, core.String editId) { |
| 68 var _url = null; |
| 69 var _queryParams = new core.Map(); |
| 70 var _uploadMedia = null; |
| 71 var _uploadOptions = null; |
| 72 var _downloadOptions = common.DownloadOptions.Metadata; |
| 73 var _body = null; |
| 74 |
| 75 if (packageName == null) { |
| 76 throw new core.ArgumentError("Parameter packageName is required."); |
| 77 } |
| 78 if (editId == null) { |
| 79 throw new core.ArgumentError("Parameter editId is required."); |
| 80 } |
| 81 |
| 82 |
| 83 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + ':commit'; |
| 84 |
| 85 var _response = _requester.request(_url, |
| 86 "POST", |
| 87 body: _body, |
| 88 queryParams: _queryParams, |
| 89 uploadOptions: _uploadOptions, |
| 90 uploadMedia: _uploadMedia, |
| 91 downloadOptions: _downloadOptions); |
| 92 return _response.then((data) => new AppEdit.fromJson(data)); |
| 93 } |
| 94 |
| 95 /** |
| 96 * Deletes an edit for an app. Creating a new edit will automatically delete |
| 97 * any of your previous edits so this method need only be called if you want |
| 98 * to preemptively abandon an edit. |
| 99 * |
| 100 * Request parameters: |
| 101 * |
| 102 * [packageName] - Unique identifier for the Android app that is being |
| 103 * updated; for example, "com.spiffygame". |
| 104 * |
| 105 * [editId] - Unique identifier for this edit. |
| 106 * |
| 107 * Completes with a [common.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 delete(core.String packageName, core.String editId) { |
| 114 var _url = null; |
| 115 var _queryParams = new core.Map(); |
| 116 var _uploadMedia = null; |
| 117 var _uploadOptions = null; |
| 118 var _downloadOptions = common.DownloadOptions.Metadata; |
| 119 var _body = null; |
| 120 |
| 121 if (packageName == null) { |
| 122 throw new core.ArgumentError("Parameter packageName is required."); |
| 123 } |
| 124 if (editId == null) { |
| 125 throw new core.ArgumentError("Parameter editId is required."); |
| 126 } |
| 127 |
| 128 _downloadOptions = null; |
| 129 |
| 130 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId'); |
| 131 |
| 132 var _response = _requester.request(_url, |
| 133 "DELETE", |
| 134 body: _body, |
| 135 queryParams: _queryParams, |
| 136 uploadOptions: _uploadOptions, |
| 137 uploadMedia: _uploadMedia, |
| 138 downloadOptions: _downloadOptions); |
| 139 return _response.then((data) => null); |
| 140 } |
| 141 |
| 142 /** |
| 143 * Returns information about the edit specified. Calls will fail if the edit |
| 144 * is no long active (e.g. has been deleted, superseded or expired). |
| 145 * |
| 146 * Request parameters: |
| 147 * |
| 148 * [packageName] - Unique identifier for the Android app that is being |
| 149 * updated; for example, "com.spiffygame". |
| 150 * |
| 151 * [editId] - Unique identifier for this edit. |
| 152 * |
| 153 * Completes with a [AppEdit]. |
| 154 * |
| 155 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 156 * error. |
| 157 * |
| 158 * If the used [http.Client] completes with an error when making a REST call, |
| 159 * this method will complete with the same error. |
| 160 */ |
| 161 async.Future<AppEdit> get(core.String packageName, core.String editId) { |
| 162 var _url = null; |
| 163 var _queryParams = new core.Map(); |
| 164 var _uploadMedia = null; |
| 165 var _uploadOptions = null; |
| 166 var _downloadOptions = common.DownloadOptions.Metadata; |
| 167 var _body = null; |
| 168 |
| 169 if (packageName == null) { |
| 170 throw new core.ArgumentError("Parameter packageName is required."); |
| 171 } |
| 172 if (editId == null) { |
| 173 throw new core.ArgumentError("Parameter editId is required."); |
| 174 } |
| 175 |
| 176 |
| 177 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId'); |
| 178 |
| 179 var _response = _requester.request(_url, |
| 180 "GET", |
| 181 body: _body, |
| 182 queryParams: _queryParams, |
| 183 uploadOptions: _uploadOptions, |
| 184 uploadMedia: _uploadMedia, |
| 185 downloadOptions: _downloadOptions); |
| 186 return _response.then((data) => new AppEdit.fromJson(data)); |
| 187 } |
| 188 |
| 189 /** |
| 190 * Creates a new edit for an app, populated with the app's current state. |
| 191 * |
| 192 * [request] - The metadata request object. |
| 193 * |
| 194 * Request parameters: |
| 195 * |
| 196 * [packageName] - Unique identifier for the Android app that is being |
| 197 * updated; for example, "com.spiffygame". |
| 198 * |
| 199 * Completes with a [AppEdit]. |
| 200 * |
| 201 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 202 * error. |
| 203 * |
| 204 * If the used [http.Client] completes with an error when making a REST call, |
| 205 * this method will complete with the same error. |
| 206 */ |
| 207 async.Future<AppEdit> insert(AppEdit request, core.String packageName) { |
| 208 var _url = null; |
| 209 var _queryParams = new core.Map(); |
| 210 var _uploadMedia = null; |
| 211 var _uploadOptions = null; |
| 212 var _downloadOptions = common.DownloadOptions.Metadata; |
| 213 var _body = null; |
| 214 |
| 215 if (request != null) { |
| 216 _body = convert.JSON.encode((request).toJson()); |
| 217 } |
| 218 if (packageName == null) { |
| 219 throw new core.ArgumentError("Parameter packageName is required."); |
| 220 } |
| 221 |
| 222 |
| 223 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits'; |
| 224 |
| 225 var _response = _requester.request(_url, |
| 226 "POST", |
| 227 body: _body, |
| 228 queryParams: _queryParams, |
| 229 uploadOptions: _uploadOptions, |
| 230 uploadMedia: _uploadMedia, |
| 231 downloadOptions: _downloadOptions); |
| 232 return _response.then((data) => new AppEdit.fromJson(data)); |
| 233 } |
| 234 |
| 235 /** |
| 236 * Checks that the edit can be successfully committed. The edit's changes are |
| 237 * not applied to the live app. |
| 238 * |
| 239 * Request parameters: |
| 240 * |
| 241 * [packageName] - Unique identifier for the Android app that is being |
| 242 * updated; for example, "com.spiffygame". |
| 243 * |
| 244 * [editId] - Unique identifier for this edit. |
| 245 * |
| 246 * Completes with a [AppEdit]. |
| 247 * |
| 248 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 249 * error. |
| 250 * |
| 251 * If the used [http.Client] completes with an error when making a REST call, |
| 252 * this method will complete with the same error. |
| 253 */ |
| 254 async.Future<AppEdit> validate(core.String packageName, core.String editId) { |
| 255 var _url = null; |
| 256 var _queryParams = new core.Map(); |
| 257 var _uploadMedia = null; |
| 258 var _uploadOptions = null; |
| 259 var _downloadOptions = common.DownloadOptions.Metadata; |
| 260 var _body = null; |
| 261 |
| 262 if (packageName == null) { |
| 263 throw new core.ArgumentError("Parameter packageName is required."); |
| 264 } |
| 265 if (editId == null) { |
| 266 throw new core.ArgumentError("Parameter editId is required."); |
| 267 } |
| 268 |
| 269 |
| 270 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + ':validate'; |
| 271 |
| 272 var _response = _requester.request(_url, |
| 273 "POST", |
| 274 body: _body, |
| 275 queryParams: _queryParams, |
| 276 uploadOptions: _uploadOptions, |
| 277 uploadMedia: _uploadMedia, |
| 278 downloadOptions: _downloadOptions); |
| 279 return _response.then((data) => new AppEdit.fromJson(data)); |
| 280 } |
| 281 |
| 282 } |
| 283 |
| 284 |
| 285 /** Not documented yet. */ |
| 286 class EditsApklistingsResourceApi { |
| 287 final common_internal.ApiRequester _requester; |
| 288 |
| 289 EditsApklistingsResourceApi(common_internal.ApiRequester client) : |
| 290 _requester = client; |
| 291 |
| 292 /** |
| 293 * Deletes the APK-specific localized listing for a specified APK and language |
| 294 * code. |
| 295 * |
| 296 * Request parameters: |
| 297 * |
| 298 * [packageName] - Unique identifier for the Android app that is being |
| 299 * updated; for example, "com.spiffygame". |
| 300 * |
| 301 * [editId] - Unique identifier for this edit. |
| 302 * |
| 303 * [apkVersionCode] - The APK version code whose APK-specific listings should |
| 304 * be read or modified. |
| 305 * |
| 306 * [language] - The language code (a BCP-47 language tag) of the APK-specific |
| 307 * localized listing to read or modify. For example, to select Austrian |
| 308 * German, pass "de-AT". |
| 309 * |
| 310 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 311 * error. |
| 312 * |
| 313 * If the used [http.Client] completes with an error when making a REST call, |
| 314 * this method will complete with the same error. |
| 315 */ |
| 316 async.Future delete(core.String packageName, core.String editId, core.int apkV
ersionCode, core.String language) { |
| 317 var _url = null; |
| 318 var _queryParams = new core.Map(); |
| 319 var _uploadMedia = null; |
| 320 var _uploadOptions = null; |
| 321 var _downloadOptions = common.DownloadOptions.Metadata; |
| 322 var _body = null; |
| 323 |
| 324 if (packageName == null) { |
| 325 throw new core.ArgumentError("Parameter packageName is required."); |
| 326 } |
| 327 if (editId == null) { |
| 328 throw new core.ArgumentError("Parameter editId is required."); |
| 329 } |
| 330 if (apkVersionCode == null) { |
| 331 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 332 } |
| 333 if (language == null) { |
| 334 throw new core.ArgumentError("Parameter language is required."); |
| 335 } |
| 336 |
| 337 _downloadOptions = null; |
| 338 |
| 339 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.Esc
aper.ecapeVariable('$apkVersionCode') + '/listings/' + common_internal.Escaper.e
capeVariable('$language'); |
| 340 |
| 341 var _response = _requester.request(_url, |
| 342 "DELETE", |
| 343 body: _body, |
| 344 queryParams: _queryParams, |
| 345 uploadOptions: _uploadOptions, |
| 346 uploadMedia: _uploadMedia, |
| 347 downloadOptions: _downloadOptions); |
| 348 return _response.then((data) => null); |
| 349 } |
| 350 |
| 351 /** |
| 352 * Deletes all the APK-specific localized listings for a specified APK. |
| 353 * |
| 354 * Request parameters: |
| 355 * |
| 356 * [packageName] - Unique identifier for the Android app that is being |
| 357 * updated; for example, "com.spiffygame". |
| 358 * |
| 359 * [editId] - Unique identifier for this edit. |
| 360 * |
| 361 * [apkVersionCode] - The APK version code whose APK-specific listings should |
| 362 * be read or modified. |
| 363 * |
| 364 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 365 * error. |
| 366 * |
| 367 * If the used [http.Client] completes with an error when making a REST call, |
| 368 * this method will complete with the same error. |
| 369 */ |
| 370 async.Future deleteall(core.String packageName, core.String editId, core.int a
pkVersionCode) { |
| 371 var _url = null; |
| 372 var _queryParams = new core.Map(); |
| 373 var _uploadMedia = null; |
| 374 var _uploadOptions = null; |
| 375 var _downloadOptions = common.DownloadOptions.Metadata; |
| 376 var _body = null; |
| 377 |
| 378 if (packageName == null) { |
| 379 throw new core.ArgumentError("Parameter packageName is required."); |
| 380 } |
| 381 if (editId == null) { |
| 382 throw new core.ArgumentError("Parameter editId is required."); |
| 383 } |
| 384 if (apkVersionCode == null) { |
| 385 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 386 } |
| 387 |
| 388 _downloadOptions = null; |
| 389 |
| 390 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.Esc
aper.ecapeVariable('$apkVersionCode') + '/listings'; |
| 391 |
| 392 var _response = _requester.request(_url, |
| 393 "DELETE", |
| 394 body: _body, |
| 395 queryParams: _queryParams, |
| 396 uploadOptions: _uploadOptions, |
| 397 uploadMedia: _uploadMedia, |
| 398 downloadOptions: _downloadOptions); |
| 399 return _response.then((data) => null); |
| 400 } |
| 401 |
| 402 /** |
| 403 * Fetches the APK-specific localized listing for a specified APK and language |
| 404 * code. |
| 405 * |
| 406 * Request parameters: |
| 407 * |
| 408 * [packageName] - Unique identifier for the Android app that is being |
| 409 * updated; for example, "com.spiffygame". |
| 410 * |
| 411 * [editId] - Unique identifier for this edit. |
| 412 * |
| 413 * [apkVersionCode] - The APK version code whose APK-specific listings should |
| 414 * be read or modified. |
| 415 * |
| 416 * [language] - The language code (a BCP-47 language tag) of the APK-specific |
| 417 * localized listing to read or modify. For example, to select Austrian |
| 418 * German, pass "de-AT". |
| 419 * |
| 420 * Completes with a [ApkListing]. |
| 421 * |
| 422 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 423 * error. |
| 424 * |
| 425 * If the used [http.Client] completes with an error when making a REST call, |
| 426 * this method will complete with the same error. |
| 427 */ |
| 428 async.Future<ApkListing> get(core.String packageName, core.String editId, core
.int apkVersionCode, core.String language) { |
| 429 var _url = null; |
| 430 var _queryParams = new core.Map(); |
| 431 var _uploadMedia = null; |
| 432 var _uploadOptions = null; |
| 433 var _downloadOptions = common.DownloadOptions.Metadata; |
| 434 var _body = null; |
| 435 |
| 436 if (packageName == null) { |
| 437 throw new core.ArgumentError("Parameter packageName is required."); |
| 438 } |
| 439 if (editId == null) { |
| 440 throw new core.ArgumentError("Parameter editId is required."); |
| 441 } |
| 442 if (apkVersionCode == null) { |
| 443 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 444 } |
| 445 if (language == null) { |
| 446 throw new core.ArgumentError("Parameter language is required."); |
| 447 } |
| 448 |
| 449 |
| 450 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.Esc
aper.ecapeVariable('$apkVersionCode') + '/listings/' + common_internal.Escaper.e
capeVariable('$language'); |
| 451 |
| 452 var _response = _requester.request(_url, |
| 453 "GET", |
| 454 body: _body, |
| 455 queryParams: _queryParams, |
| 456 uploadOptions: _uploadOptions, |
| 457 uploadMedia: _uploadMedia, |
| 458 downloadOptions: _downloadOptions); |
| 459 return _response.then((data) => new ApkListing.fromJson(data)); |
| 460 } |
| 461 |
| 462 /** |
| 463 * Lists all the APK-specific localized listings for a specified APK. |
| 464 * |
| 465 * Request parameters: |
| 466 * |
| 467 * [packageName] - Unique identifier for the Android app that is being |
| 468 * updated; for example, "com.spiffygame". |
| 469 * |
| 470 * [editId] - Unique identifier for this edit. |
| 471 * |
| 472 * [apkVersionCode] - The APK version code whose APK-specific listings should |
| 473 * be read or modified. |
| 474 * |
| 475 * Completes with a [ApkListingsListResponse]. |
| 476 * |
| 477 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 478 * error. |
| 479 * |
| 480 * If the used [http.Client] completes with an error when making a REST call, |
| 481 * this method will complete with the same error. |
| 482 */ |
| 483 async.Future<ApkListingsListResponse> list(core.String packageName, core.Strin
g editId, core.int apkVersionCode) { |
| 484 var _url = null; |
| 485 var _queryParams = new core.Map(); |
| 486 var _uploadMedia = null; |
| 487 var _uploadOptions = null; |
| 488 var _downloadOptions = common.DownloadOptions.Metadata; |
| 489 var _body = null; |
| 490 |
| 491 if (packageName == null) { |
| 492 throw new core.ArgumentError("Parameter packageName is required."); |
| 493 } |
| 494 if (editId == null) { |
| 495 throw new core.ArgumentError("Parameter editId is required."); |
| 496 } |
| 497 if (apkVersionCode == null) { |
| 498 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 499 } |
| 500 |
| 501 |
| 502 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.Esc
aper.ecapeVariable('$apkVersionCode') + '/listings'; |
| 503 |
| 504 var _response = _requester.request(_url, |
| 505 "GET", |
| 506 body: _body, |
| 507 queryParams: _queryParams, |
| 508 uploadOptions: _uploadOptions, |
| 509 uploadMedia: _uploadMedia, |
| 510 downloadOptions: _downloadOptions); |
| 511 return _response.then((data) => new ApkListingsListResponse.fromJson(data)); |
| 512 } |
| 513 |
| 514 /** |
| 515 * Updates or creates the APK-specific localized listing for a specified APK |
| 516 * and language code. This method supports patch semantics. |
| 517 * |
| 518 * [request] - The metadata request object. |
| 519 * |
| 520 * Request parameters: |
| 521 * |
| 522 * [packageName] - Unique identifier for the Android app that is being |
| 523 * updated; for example, "com.spiffygame". |
| 524 * |
| 525 * [editId] - Unique identifier for this edit. |
| 526 * |
| 527 * [apkVersionCode] - The APK version code whose APK-specific listings should |
| 528 * be read or modified. |
| 529 * |
| 530 * [language] - The language code (a BCP-47 language tag) of the APK-specific |
| 531 * localized listing to read or modify. For example, to select Austrian |
| 532 * German, pass "de-AT". |
| 533 * |
| 534 * Completes with a [ApkListing]. |
| 535 * |
| 536 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 537 * error. |
| 538 * |
| 539 * If the used [http.Client] completes with an error when making a REST call, |
| 540 * this method will complete with the same error. |
| 541 */ |
| 542 async.Future<ApkListing> patch(ApkListing request, core.String packageName, co
re.String editId, core.int apkVersionCode, core.String language) { |
| 543 var _url = null; |
| 544 var _queryParams = new core.Map(); |
| 545 var _uploadMedia = null; |
| 546 var _uploadOptions = null; |
| 547 var _downloadOptions = common.DownloadOptions.Metadata; |
| 548 var _body = null; |
| 549 |
| 550 if (request != null) { |
| 551 _body = convert.JSON.encode((request).toJson()); |
| 552 } |
| 553 if (packageName == null) { |
| 554 throw new core.ArgumentError("Parameter packageName is required."); |
| 555 } |
| 556 if (editId == null) { |
| 557 throw new core.ArgumentError("Parameter editId is required."); |
| 558 } |
| 559 if (apkVersionCode == null) { |
| 560 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 561 } |
| 562 if (language == null) { |
| 563 throw new core.ArgumentError("Parameter language is required."); |
| 564 } |
| 565 |
| 566 |
| 567 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.Esc
aper.ecapeVariable('$apkVersionCode') + '/listings/' + common_internal.Escaper.e
capeVariable('$language'); |
| 568 |
| 569 var _response = _requester.request(_url, |
| 570 "PATCH", |
| 571 body: _body, |
| 572 queryParams: _queryParams, |
| 573 uploadOptions: _uploadOptions, |
| 574 uploadMedia: _uploadMedia, |
| 575 downloadOptions: _downloadOptions); |
| 576 return _response.then((data) => new ApkListing.fromJson(data)); |
| 577 } |
| 578 |
| 579 /** |
| 580 * Updates or creates the APK-specific localized listing for a specified APK |
| 581 * and language code. |
| 582 * |
| 583 * [request] - The metadata request object. |
| 584 * |
| 585 * Request parameters: |
| 586 * |
| 587 * [packageName] - Unique identifier for the Android app that is being |
| 588 * updated; for example, "com.spiffygame". |
| 589 * |
| 590 * [editId] - Unique identifier for this edit. |
| 591 * |
| 592 * [apkVersionCode] - The APK version code whose APK-specific listings should |
| 593 * be read or modified. |
| 594 * |
| 595 * [language] - The language code (a BCP-47 language tag) of the APK-specific |
| 596 * localized listing to read or modify. For example, to select Austrian |
| 597 * German, pass "de-AT". |
| 598 * |
| 599 * Completes with a [ApkListing]. |
| 600 * |
| 601 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 602 * error. |
| 603 * |
| 604 * If the used [http.Client] completes with an error when making a REST call, |
| 605 * this method will complete with the same error. |
| 606 */ |
| 607 async.Future<ApkListing> update(ApkListing request, core.String packageName, c
ore.String editId, core.int apkVersionCode, core.String language) { |
| 608 var _url = null; |
| 609 var _queryParams = new core.Map(); |
| 610 var _uploadMedia = null; |
| 611 var _uploadOptions = null; |
| 612 var _downloadOptions = common.DownloadOptions.Metadata; |
| 613 var _body = null; |
| 614 |
| 615 if (request != null) { |
| 616 _body = convert.JSON.encode((request).toJson()); |
| 617 } |
| 618 if (packageName == null) { |
| 619 throw new core.ArgumentError("Parameter packageName is required."); |
| 620 } |
| 621 if (editId == null) { |
| 622 throw new core.ArgumentError("Parameter editId is required."); |
| 623 } |
| 624 if (apkVersionCode == null) { |
| 625 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 626 } |
| 627 if (language == null) { |
| 628 throw new core.ArgumentError("Parameter language is required."); |
| 629 } |
| 630 |
| 631 |
| 632 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.Esc
aper.ecapeVariable('$apkVersionCode') + '/listings/' + common_internal.Escaper.e
capeVariable('$language'); |
| 633 |
| 634 var _response = _requester.request(_url, |
| 635 "PUT", |
| 636 body: _body, |
| 637 queryParams: _queryParams, |
| 638 uploadOptions: _uploadOptions, |
| 639 uploadMedia: _uploadMedia, |
| 640 downloadOptions: _downloadOptions); |
| 641 return _response.then((data) => new ApkListing.fromJson(data)); |
| 642 } |
| 643 |
| 644 } |
| 645 |
| 646 |
| 647 /** Not documented yet. */ |
| 648 class EditsApksResourceApi { |
| 649 final common_internal.ApiRequester _requester; |
| 650 |
| 651 EditsApksResourceApi(common_internal.ApiRequester client) : |
| 652 _requester = client; |
| 653 |
| 654 /** |
| 655 * Not documented yet. |
| 656 * |
| 657 * Request parameters: |
| 658 * |
| 659 * [packageName] - Unique identifier for the Android app that is being |
| 660 * updated; for example, "com.spiffygame". |
| 661 * |
| 662 * [editId] - Unique identifier for this edit. |
| 663 * |
| 664 * Completes with a [ApksListResponse]. |
| 665 * |
| 666 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 667 * error. |
| 668 * |
| 669 * If the used [http.Client] completes with an error when making a REST call, |
| 670 * this method will complete with the same error. |
| 671 */ |
| 672 async.Future<ApksListResponse> list(core.String packageName, core.String editI
d) { |
| 673 var _url = null; |
| 674 var _queryParams = new core.Map(); |
| 675 var _uploadMedia = null; |
| 676 var _uploadOptions = null; |
| 677 var _downloadOptions = common.DownloadOptions.Metadata; |
| 678 var _body = null; |
| 679 |
| 680 if (packageName == null) { |
| 681 throw new core.ArgumentError("Parameter packageName is required."); |
| 682 } |
| 683 if (editId == null) { |
| 684 throw new core.ArgumentError("Parameter editId is required."); |
| 685 } |
| 686 |
| 687 |
| 688 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks'; |
| 689 |
| 690 var _response = _requester.request(_url, |
| 691 "GET", |
| 692 body: _body, |
| 693 queryParams: _queryParams, |
| 694 uploadOptions: _uploadOptions, |
| 695 uploadMedia: _uploadMedia, |
| 696 downloadOptions: _downloadOptions); |
| 697 return _response.then((data) => new ApksListResponse.fromJson(data)); |
| 698 } |
| 699 |
| 700 /** |
| 701 * Not documented yet. |
| 702 * |
| 703 * Request parameters: |
| 704 * |
| 705 * [packageName] - Unique identifier for the Android app that is being |
| 706 * updated; for example, "com.spiffygame". |
| 707 * |
| 708 * [editId] - Unique identifier for this edit. |
| 709 * |
| 710 * [uploadMedia] - The media to upload. |
| 711 * |
| 712 * [uploadOptions] - Options for the media upload. Streaming Media without the |
| 713 * length being known ahead of time is only supported via resumable uploads. |
| 714 * |
| 715 * Completes with a [Apk]. |
| 716 * |
| 717 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 718 * error. |
| 719 * |
| 720 * If the used [http.Client] completes with an error when making a REST call, |
| 721 * this method will complete with the same error. |
| 722 */ |
| 723 async.Future<Apk> upload(core.String packageName, core.String editId, {common.
UploadOptions uploadOptions : common.UploadOptions.Default, common.Media uploadM
edia}) { |
| 724 var _url = null; |
| 725 var _queryParams = new core.Map(); |
| 726 var _uploadMedia = null; |
| 727 var _uploadOptions = null; |
| 728 var _downloadOptions = common.DownloadOptions.Metadata; |
| 729 var _body = null; |
| 730 |
| 731 if (packageName == null) { |
| 732 throw new core.ArgumentError("Parameter packageName is required."); |
| 733 } |
| 734 if (editId == null) { |
| 735 throw new core.ArgumentError("Parameter editId is required."); |
| 736 } |
| 737 |
| 738 _uploadMedia = uploadMedia; |
| 739 _uploadOptions = uploadOptions; |
| 740 |
| 741 if (_uploadMedia == null) { |
| 742 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' +
common_internal.Escaper.ecapeVariable('$editId') + '/apks'; |
| 743 } else if (_uploadOptions is common.ResumableUploadOptions) { |
| 744 _url = '/resumable/upload/androidpublisher/v2/applications/' + common_inte
rnal.Escaper.ecapeVariable('$packageName') + '/edits/' + common_internal.Escaper
.ecapeVariable('$editId') + '/apks'; |
| 745 } else { |
| 746 _url = '/upload/androidpublisher/v2/applications/' + common_internal.Escap
er.ecapeVariable('$packageName') + '/edits/' + common_internal.Escaper.ecapeVari
able('$editId') + '/apks'; |
| 747 } |
| 748 |
| 749 |
| 750 var _response = _requester.request(_url, |
| 751 "POST", |
| 752 body: _body, |
| 753 queryParams: _queryParams, |
| 754 uploadOptions: _uploadOptions, |
| 755 uploadMedia: _uploadMedia, |
| 756 downloadOptions: _downloadOptions); |
| 757 return _response.then((data) => new Apk.fromJson(data)); |
| 758 } |
| 759 |
| 760 } |
| 761 |
| 762 |
| 763 /** Not documented yet. */ |
| 764 class EditsDetailsResourceApi { |
| 765 final common_internal.ApiRequester _requester; |
| 766 |
| 767 EditsDetailsResourceApi(common_internal.ApiRequester client) : |
| 768 _requester = client; |
| 769 |
| 770 /** |
| 771 * Fetches app details for this edit. This includes the default language and |
| 772 * developer support contact information. |
| 773 * |
| 774 * Request parameters: |
| 775 * |
| 776 * [packageName] - Unique identifier for the Android app that is being |
| 777 * updated; for example, "com.spiffygame". |
| 778 * |
| 779 * [editId] - Unique identifier for this edit. |
| 780 * |
| 781 * Completes with a [AppDetails]. |
| 782 * |
| 783 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 784 * error. |
| 785 * |
| 786 * If the used [http.Client] completes with an error when making a REST call, |
| 787 * this method will complete with the same error. |
| 788 */ |
| 789 async.Future<AppDetails> get(core.String packageName, core.String editId) { |
| 790 var _url = null; |
| 791 var _queryParams = new core.Map(); |
| 792 var _uploadMedia = null; |
| 793 var _uploadOptions = null; |
| 794 var _downloadOptions = common.DownloadOptions.Metadata; |
| 795 var _body = null; |
| 796 |
| 797 if (packageName == null) { |
| 798 throw new core.ArgumentError("Parameter packageName is required."); |
| 799 } |
| 800 if (editId == null) { |
| 801 throw new core.ArgumentError("Parameter editId is required."); |
| 802 } |
| 803 |
| 804 |
| 805 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/details'; |
| 806 |
| 807 var _response = _requester.request(_url, |
| 808 "GET", |
| 809 body: _body, |
| 810 queryParams: _queryParams, |
| 811 uploadOptions: _uploadOptions, |
| 812 uploadMedia: _uploadMedia, |
| 813 downloadOptions: _downloadOptions); |
| 814 return _response.then((data) => new AppDetails.fromJson(data)); |
| 815 } |
| 816 |
| 817 /** |
| 818 * Updates app details for this edit. This method supports patch semantics. |
| 819 * |
| 820 * [request] - The metadata request object. |
| 821 * |
| 822 * Request parameters: |
| 823 * |
| 824 * [packageName] - Unique identifier for the Android app that is being |
| 825 * updated; for example, "com.spiffygame". |
| 826 * |
| 827 * [editId] - Unique identifier for this edit. |
| 828 * |
| 829 * Completes with a [AppDetails]. |
| 830 * |
| 831 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 832 * error. |
| 833 * |
| 834 * If the used [http.Client] completes with an error when making a REST call, |
| 835 * this method will complete with the same error. |
| 836 */ |
| 837 async.Future<AppDetails> patch(AppDetails request, core.String packageName, co
re.String editId) { |
| 838 var _url = null; |
| 839 var _queryParams = new core.Map(); |
| 840 var _uploadMedia = null; |
| 841 var _uploadOptions = null; |
| 842 var _downloadOptions = common.DownloadOptions.Metadata; |
| 843 var _body = null; |
| 844 |
| 845 if (request != null) { |
| 846 _body = convert.JSON.encode((request).toJson()); |
| 847 } |
| 848 if (packageName == null) { |
| 849 throw new core.ArgumentError("Parameter packageName is required."); |
| 850 } |
| 851 if (editId == null) { |
| 852 throw new core.ArgumentError("Parameter editId is required."); |
| 853 } |
| 854 |
| 855 |
| 856 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/details'; |
| 857 |
| 858 var _response = _requester.request(_url, |
| 859 "PATCH", |
| 860 body: _body, |
| 861 queryParams: _queryParams, |
| 862 uploadOptions: _uploadOptions, |
| 863 uploadMedia: _uploadMedia, |
| 864 downloadOptions: _downloadOptions); |
| 865 return _response.then((data) => new AppDetails.fromJson(data)); |
| 866 } |
| 867 |
| 868 /** |
| 869 * Updates app details for this edit. |
| 870 * |
| 871 * [request] - The metadata request object. |
| 872 * |
| 873 * Request parameters: |
| 874 * |
| 875 * [packageName] - Unique identifier for the Android app that is being |
| 876 * updated; for example, "com.spiffygame". |
| 877 * |
| 878 * [editId] - Unique identifier for this edit. |
| 879 * |
| 880 * Completes with a [AppDetails]. |
| 881 * |
| 882 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 883 * error. |
| 884 * |
| 885 * If the used [http.Client] completes with an error when making a REST call, |
| 886 * this method will complete with the same error. |
| 887 */ |
| 888 async.Future<AppDetails> update(AppDetails request, core.String packageName, c
ore.String editId) { |
| 889 var _url = null; |
| 890 var _queryParams = new core.Map(); |
| 891 var _uploadMedia = null; |
| 892 var _uploadOptions = null; |
| 893 var _downloadOptions = common.DownloadOptions.Metadata; |
| 894 var _body = null; |
| 895 |
| 896 if (request != null) { |
| 897 _body = convert.JSON.encode((request).toJson()); |
| 898 } |
| 899 if (packageName == null) { |
| 900 throw new core.ArgumentError("Parameter packageName is required."); |
| 901 } |
| 902 if (editId == null) { |
| 903 throw new core.ArgumentError("Parameter editId is required."); |
| 904 } |
| 905 |
| 906 |
| 907 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/details'; |
| 908 |
| 909 var _response = _requester.request(_url, |
| 910 "PUT", |
| 911 body: _body, |
| 912 queryParams: _queryParams, |
| 913 uploadOptions: _uploadOptions, |
| 914 uploadMedia: _uploadMedia, |
| 915 downloadOptions: _downloadOptions); |
| 916 return _response.then((data) => new AppDetails.fromJson(data)); |
| 917 } |
| 918 |
| 919 } |
| 920 |
| 921 |
| 922 /** Not documented yet. */ |
| 923 class EditsExpansionfilesResourceApi { |
| 924 final common_internal.ApiRequester _requester; |
| 925 |
| 926 EditsExpansionfilesResourceApi(common_internal.ApiRequester client) : |
| 927 _requester = client; |
| 928 |
| 929 /** |
| 930 * Fetches the Expansion File configuration for the APK specified. |
| 931 * |
| 932 * Request parameters: |
| 933 * |
| 934 * [packageName] - Unique identifier for the Android app that is being |
| 935 * updated; for example, "com.spiffygame". |
| 936 * |
| 937 * [editId] - Unique identifier for this edit. |
| 938 * |
| 939 * [apkVersionCode] - The version code of the APK whose Expansion File |
| 940 * configuration is being read or modified. |
| 941 * |
| 942 * [expansionFileType] - null |
| 943 * Possible string values are: |
| 944 * - "main" |
| 945 * - "patch" |
| 946 * |
| 947 * Completes with a [ExpansionFile]. |
| 948 * |
| 949 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 950 * error. |
| 951 * |
| 952 * If the used [http.Client] completes with an error when making a REST call, |
| 953 * this method will complete with the same error. |
| 954 */ |
| 955 async.Future<ExpansionFile> get(core.String packageName, core.String editId, c
ore.int apkVersionCode, core.String expansionFileType) { |
| 956 var _url = null; |
| 957 var _queryParams = new core.Map(); |
| 958 var _uploadMedia = null; |
| 959 var _uploadOptions = null; |
| 960 var _downloadOptions = common.DownloadOptions.Metadata; |
| 961 var _body = null; |
| 962 |
| 963 if (packageName == null) { |
| 964 throw new core.ArgumentError("Parameter packageName is required."); |
| 965 } |
| 966 if (editId == null) { |
| 967 throw new core.ArgumentError("Parameter editId is required."); |
| 968 } |
| 969 if (apkVersionCode == null) { |
| 970 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 971 } |
| 972 if (expansionFileType == null) { |
| 973 throw new core.ArgumentError("Parameter expansionFileType is required."); |
| 974 } |
| 975 |
| 976 |
| 977 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.Esc
aper.ecapeVariable('$apkVersionCode') + '/expansionFiles/' + common_internal.Esc
aper.ecapeVariable('$expansionFileType'); |
| 978 |
| 979 var _response = _requester.request(_url, |
| 980 "GET", |
| 981 body: _body, |
| 982 queryParams: _queryParams, |
| 983 uploadOptions: _uploadOptions, |
| 984 uploadMedia: _uploadMedia, |
| 985 downloadOptions: _downloadOptions); |
| 986 return _response.then((data) => new ExpansionFile.fromJson(data)); |
| 987 } |
| 988 |
| 989 /** |
| 990 * Updates the APK's Expansion File configuration to reference another APK's |
| 991 * Expansion Files. To add a new Expansion File use the Upload method. This |
| 992 * method supports patch semantics. |
| 993 * |
| 994 * [request] - The metadata request object. |
| 995 * |
| 996 * Request parameters: |
| 997 * |
| 998 * [packageName] - Unique identifier for the Android app that is being |
| 999 * updated; for example, "com.spiffygame". |
| 1000 * |
| 1001 * [editId] - Unique identifier for this edit. |
| 1002 * |
| 1003 * [apkVersionCode] - The version code of the APK whose Expansion File |
| 1004 * configuration is being read or modified. |
| 1005 * |
| 1006 * [expansionFileType] - null |
| 1007 * Possible string values are: |
| 1008 * - "main" |
| 1009 * - "patch" |
| 1010 * |
| 1011 * Completes with a [ExpansionFile]. |
| 1012 * |
| 1013 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1014 * error. |
| 1015 * |
| 1016 * If the used [http.Client] completes with an error when making a REST call, |
| 1017 * this method will complete with the same error. |
| 1018 */ |
| 1019 async.Future<ExpansionFile> patch(ExpansionFile request, core.String packageNa
me, core.String editId, core.int apkVersionCode, core.String expansionFileType)
{ |
| 1020 var _url = null; |
| 1021 var _queryParams = new core.Map(); |
| 1022 var _uploadMedia = null; |
| 1023 var _uploadOptions = null; |
| 1024 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1025 var _body = null; |
| 1026 |
| 1027 if (request != null) { |
| 1028 _body = convert.JSON.encode((request).toJson()); |
| 1029 } |
| 1030 if (packageName == null) { |
| 1031 throw new core.ArgumentError("Parameter packageName is required."); |
| 1032 } |
| 1033 if (editId == null) { |
| 1034 throw new core.ArgumentError("Parameter editId is required."); |
| 1035 } |
| 1036 if (apkVersionCode == null) { |
| 1037 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 1038 } |
| 1039 if (expansionFileType == null) { |
| 1040 throw new core.ArgumentError("Parameter expansionFileType is required."); |
| 1041 } |
| 1042 |
| 1043 |
| 1044 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.Esc
aper.ecapeVariable('$apkVersionCode') + '/expansionFiles/' + common_internal.Esc
aper.ecapeVariable('$expansionFileType'); |
| 1045 |
| 1046 var _response = _requester.request(_url, |
| 1047 "PATCH", |
| 1048 body: _body, |
| 1049 queryParams: _queryParams, |
| 1050 uploadOptions: _uploadOptions, |
| 1051 uploadMedia: _uploadMedia, |
| 1052 downloadOptions: _downloadOptions); |
| 1053 return _response.then((data) => new ExpansionFile.fromJson(data)); |
| 1054 } |
| 1055 |
| 1056 /** |
| 1057 * Updates the APK's Expansion File configuration to reference another APK's |
| 1058 * Expansion Files. To add a new Expansion File use the Upload method. |
| 1059 * |
| 1060 * [request] - The metadata request object. |
| 1061 * |
| 1062 * Request parameters: |
| 1063 * |
| 1064 * [packageName] - Unique identifier for the Android app that is being |
| 1065 * updated; for example, "com.spiffygame". |
| 1066 * |
| 1067 * [editId] - Unique identifier for this edit. |
| 1068 * |
| 1069 * [apkVersionCode] - The version code of the APK whose Expansion File |
| 1070 * configuration is being read or modified. |
| 1071 * |
| 1072 * [expansionFileType] - null |
| 1073 * Possible string values are: |
| 1074 * - "main" |
| 1075 * - "patch" |
| 1076 * |
| 1077 * Completes with a [ExpansionFile]. |
| 1078 * |
| 1079 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1080 * error. |
| 1081 * |
| 1082 * If the used [http.Client] completes with an error when making a REST call, |
| 1083 * this method will complete with the same error. |
| 1084 */ |
| 1085 async.Future<ExpansionFile> update(ExpansionFile request, core.String packageN
ame, core.String editId, core.int apkVersionCode, core.String expansionFileType)
{ |
| 1086 var _url = null; |
| 1087 var _queryParams = new core.Map(); |
| 1088 var _uploadMedia = null; |
| 1089 var _uploadOptions = null; |
| 1090 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1091 var _body = null; |
| 1092 |
| 1093 if (request != null) { |
| 1094 _body = convert.JSON.encode((request).toJson()); |
| 1095 } |
| 1096 if (packageName == null) { |
| 1097 throw new core.ArgumentError("Parameter packageName is required."); |
| 1098 } |
| 1099 if (editId == null) { |
| 1100 throw new core.ArgumentError("Parameter editId is required."); |
| 1101 } |
| 1102 if (apkVersionCode == null) { |
| 1103 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 1104 } |
| 1105 if (expansionFileType == null) { |
| 1106 throw new core.ArgumentError("Parameter expansionFileType is required."); |
| 1107 } |
| 1108 |
| 1109 |
| 1110 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.Esc
aper.ecapeVariable('$apkVersionCode') + '/expansionFiles/' + common_internal.Esc
aper.ecapeVariable('$expansionFileType'); |
| 1111 |
| 1112 var _response = _requester.request(_url, |
| 1113 "PUT", |
| 1114 body: _body, |
| 1115 queryParams: _queryParams, |
| 1116 uploadOptions: _uploadOptions, |
| 1117 uploadMedia: _uploadMedia, |
| 1118 downloadOptions: _downloadOptions); |
| 1119 return _response.then((data) => new ExpansionFile.fromJson(data)); |
| 1120 } |
| 1121 |
| 1122 /** |
| 1123 * Uploads and attaches a new Expansion File to the APK specified. |
| 1124 * |
| 1125 * Request parameters: |
| 1126 * |
| 1127 * [packageName] - Unique identifier for the Android app that is being |
| 1128 * updated; for example, "com.spiffygame". |
| 1129 * |
| 1130 * [editId] - Unique identifier for this edit. |
| 1131 * |
| 1132 * [apkVersionCode] - The version code of the APK whose Expansion File |
| 1133 * configuration is being read or modified. |
| 1134 * |
| 1135 * [expansionFileType] - null |
| 1136 * Possible string values are: |
| 1137 * - "main" |
| 1138 * - "patch" |
| 1139 * |
| 1140 * [uploadMedia] - The media to upload. |
| 1141 * |
| 1142 * [uploadOptions] - Options for the media upload. Streaming Media without the |
| 1143 * length being known ahead of time is only supported via resumable uploads. |
| 1144 * |
| 1145 * Completes with a [ExpansionFilesUploadResponse]. |
| 1146 * |
| 1147 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1148 * error. |
| 1149 * |
| 1150 * If the used [http.Client] completes with an error when making a REST call, |
| 1151 * this method will complete with the same error. |
| 1152 */ |
| 1153 async.Future<ExpansionFilesUploadResponse> upload(core.String packageName, cor
e.String editId, core.int apkVersionCode, core.String expansionFileType, {common
.UploadOptions uploadOptions : common.UploadOptions.Default, common.Media upload
Media}) { |
| 1154 var _url = null; |
| 1155 var _queryParams = new core.Map(); |
| 1156 var _uploadMedia = null; |
| 1157 var _uploadOptions = null; |
| 1158 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1159 var _body = null; |
| 1160 |
| 1161 if (packageName == null) { |
| 1162 throw new core.ArgumentError("Parameter packageName is required."); |
| 1163 } |
| 1164 if (editId == null) { |
| 1165 throw new core.ArgumentError("Parameter editId is required."); |
| 1166 } |
| 1167 if (apkVersionCode == null) { |
| 1168 throw new core.ArgumentError("Parameter apkVersionCode is required."); |
| 1169 } |
| 1170 if (expansionFileType == null) { |
| 1171 throw new core.ArgumentError("Parameter expansionFileType is required."); |
| 1172 } |
| 1173 |
| 1174 _uploadMedia = uploadMedia; |
| 1175 _uploadOptions = uploadOptions; |
| 1176 |
| 1177 if (_uploadMedia == null) { |
| 1178 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' +
common_internal.Escaper.ecapeVariable('$editId') + '/apks/' + common_internal.E
scaper.ecapeVariable('$apkVersionCode') + '/expansionFiles/' + common_internal.E
scaper.ecapeVariable('$expansionFileType'); |
| 1179 } else if (_uploadOptions is common.ResumableUploadOptions) { |
| 1180 _url = '/resumable/upload/androidpublisher/v2/applications/' + common_inte
rnal.Escaper.ecapeVariable('$packageName') + '/edits/' + common_internal.Escaper
.ecapeVariable('$editId') + '/apks/' + common_internal.Escaper.ecapeVariable('$a
pkVersionCode') + '/expansionFiles/' + common_internal.Escaper.ecapeVariable('$e
xpansionFileType'); |
| 1181 } else { |
| 1182 _url = '/upload/androidpublisher/v2/applications/' + common_internal.Escap
er.ecapeVariable('$packageName') + '/edits/' + common_internal.Escaper.ecapeVari
able('$editId') + '/apks/' + common_internal.Escaper.ecapeVariable('$apkVersionC
ode') + '/expansionFiles/' + common_internal.Escaper.ecapeVariable('$expansionFi
leType'); |
| 1183 } |
| 1184 |
| 1185 |
| 1186 var _response = _requester.request(_url, |
| 1187 "POST", |
| 1188 body: _body, |
| 1189 queryParams: _queryParams, |
| 1190 uploadOptions: _uploadOptions, |
| 1191 uploadMedia: _uploadMedia, |
| 1192 downloadOptions: _downloadOptions); |
| 1193 return _response.then((data) => new ExpansionFilesUploadResponse.fromJson(da
ta)); |
| 1194 } |
| 1195 |
| 1196 } |
| 1197 |
| 1198 |
| 1199 /** Not documented yet. */ |
| 1200 class EditsImagesResourceApi { |
| 1201 final common_internal.ApiRequester _requester; |
| 1202 |
| 1203 EditsImagesResourceApi(common_internal.ApiRequester client) : |
| 1204 _requester = client; |
| 1205 |
| 1206 /** |
| 1207 * Deletes the image (specified by id) from the edit. |
| 1208 * |
| 1209 * Request parameters: |
| 1210 * |
| 1211 * [packageName] - Unique identifier for the Android app that is being |
| 1212 * updated; for example, "com.spiffygame". |
| 1213 * |
| 1214 * [editId] - Unique identifier for this edit. |
| 1215 * |
| 1216 * [language] - The language code (a BCP-47 language tag) of the localized |
| 1217 * listing whose images are to read or modified. For example, to select |
| 1218 * Austrian German, pass "de-AT". |
| 1219 * |
| 1220 * [imageType] - null |
| 1221 * Possible string values are: |
| 1222 * - "featureGraphic" |
| 1223 * - "icon" |
| 1224 * - "phoneScreenshots" |
| 1225 * - "promoGraphic" |
| 1226 * - "sevenInchScreenshots" |
| 1227 * - "tenInchScreenshots" |
| 1228 * |
| 1229 * [imageId] - Unique identifier an image within the set of images attached to |
| 1230 * this edit. |
| 1231 * |
| 1232 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1233 * error. |
| 1234 * |
| 1235 * If the used [http.Client] completes with an error when making a REST call, |
| 1236 * this method will complete with the same error. |
| 1237 */ |
| 1238 async.Future delete(core.String packageName, core.String editId, core.String l
anguage, core.String imageType, core.String imageId) { |
| 1239 var _url = null; |
| 1240 var _queryParams = new core.Map(); |
| 1241 var _uploadMedia = null; |
| 1242 var _uploadOptions = null; |
| 1243 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1244 var _body = null; |
| 1245 |
| 1246 if (packageName == null) { |
| 1247 throw new core.ArgumentError("Parameter packageName is required."); |
| 1248 } |
| 1249 if (editId == null) { |
| 1250 throw new core.ArgumentError("Parameter editId is required."); |
| 1251 } |
| 1252 if (language == null) { |
| 1253 throw new core.ArgumentError("Parameter language is required."); |
| 1254 } |
| 1255 if (imageType == null) { |
| 1256 throw new core.ArgumentError("Parameter imageType is required."); |
| 1257 } |
| 1258 if (imageId == null) { |
| 1259 throw new core.ArgumentError("Parameter imageId is required."); |
| 1260 } |
| 1261 |
| 1262 _downloadOptions = null; |
| 1263 |
| 1264 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/listings/' + common_internal
.Escaper.ecapeVariable('$language') + '/' + common_internal.Escaper.ecapeVariabl
e('$imageType') + '/' + common_internal.Escaper.ecapeVariable('$imageId'); |
| 1265 |
| 1266 var _response = _requester.request(_url, |
| 1267 "DELETE", |
| 1268 body: _body, |
| 1269 queryParams: _queryParams, |
| 1270 uploadOptions: _uploadOptions, |
| 1271 uploadMedia: _uploadMedia, |
| 1272 downloadOptions: _downloadOptions); |
| 1273 return _response.then((data) => null); |
| 1274 } |
| 1275 |
| 1276 /** |
| 1277 * Deletes all images for the specified language and image type. |
| 1278 * |
| 1279 * Request parameters: |
| 1280 * |
| 1281 * [packageName] - Unique identifier for the Android app that is being |
| 1282 * updated; for example, "com.spiffygame". |
| 1283 * |
| 1284 * [editId] - Unique identifier for this edit. |
| 1285 * |
| 1286 * [language] - The language code (a BCP-47 language tag) of the localized |
| 1287 * listing whose images are to read or modified. For example, to select |
| 1288 * Austrian German, pass "de-AT". |
| 1289 * |
| 1290 * [imageType] - null |
| 1291 * Possible string values are: |
| 1292 * - "featureGraphic" |
| 1293 * - "icon" |
| 1294 * - "phoneScreenshots" |
| 1295 * - "promoGraphic" |
| 1296 * - "sevenInchScreenshots" |
| 1297 * - "tenInchScreenshots" |
| 1298 * |
| 1299 * Completes with a [ImagesDeleteAllResponse]. |
| 1300 * |
| 1301 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1302 * error. |
| 1303 * |
| 1304 * If the used [http.Client] completes with an error when making a REST call, |
| 1305 * this method will complete with the same error. |
| 1306 */ |
| 1307 async.Future<ImagesDeleteAllResponse> deleteall(core.String packageName, core.
String editId, core.String language, core.String imageType) { |
| 1308 var _url = null; |
| 1309 var _queryParams = new core.Map(); |
| 1310 var _uploadMedia = null; |
| 1311 var _uploadOptions = null; |
| 1312 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1313 var _body = null; |
| 1314 |
| 1315 if (packageName == null) { |
| 1316 throw new core.ArgumentError("Parameter packageName is required."); |
| 1317 } |
| 1318 if (editId == null) { |
| 1319 throw new core.ArgumentError("Parameter editId is required."); |
| 1320 } |
| 1321 if (language == null) { |
| 1322 throw new core.ArgumentError("Parameter language is required."); |
| 1323 } |
| 1324 if (imageType == null) { |
| 1325 throw new core.ArgumentError("Parameter imageType is required."); |
| 1326 } |
| 1327 |
| 1328 |
| 1329 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/listings/' + common_internal
.Escaper.ecapeVariable('$language') + '/' + common_internal.Escaper.ecapeVariabl
e('$imageType'); |
| 1330 |
| 1331 var _response = _requester.request(_url, |
| 1332 "DELETE", |
| 1333 body: _body, |
| 1334 queryParams: _queryParams, |
| 1335 uploadOptions: _uploadOptions, |
| 1336 uploadMedia: _uploadMedia, |
| 1337 downloadOptions: _downloadOptions); |
| 1338 return _response.then((data) => new ImagesDeleteAllResponse.fromJson(data)); |
| 1339 } |
| 1340 |
| 1341 /** |
| 1342 * Lists all images for the specified language and image type. |
| 1343 * |
| 1344 * Request parameters: |
| 1345 * |
| 1346 * [packageName] - Unique identifier for the Android app that is being |
| 1347 * updated; for example, "com.spiffygame". |
| 1348 * |
| 1349 * [editId] - Unique identifier for this edit. |
| 1350 * |
| 1351 * [language] - The language code (a BCP-47 language tag) of the localized |
| 1352 * listing whose images are to read or modified. For example, to select |
| 1353 * Austrian German, pass "de-AT". |
| 1354 * |
| 1355 * [imageType] - null |
| 1356 * Possible string values are: |
| 1357 * - "featureGraphic" |
| 1358 * - "icon" |
| 1359 * - "phoneScreenshots" |
| 1360 * - "promoGraphic" |
| 1361 * - "sevenInchScreenshots" |
| 1362 * - "tenInchScreenshots" |
| 1363 * |
| 1364 * Completes with a [ImagesListResponse]. |
| 1365 * |
| 1366 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1367 * error. |
| 1368 * |
| 1369 * If the used [http.Client] completes with an error when making a REST call, |
| 1370 * this method will complete with the same error. |
| 1371 */ |
| 1372 async.Future<ImagesListResponse> list(core.String packageName, core.String edi
tId, core.String language, core.String imageType) { |
| 1373 var _url = null; |
| 1374 var _queryParams = new core.Map(); |
| 1375 var _uploadMedia = null; |
| 1376 var _uploadOptions = null; |
| 1377 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1378 var _body = null; |
| 1379 |
| 1380 if (packageName == null) { |
| 1381 throw new core.ArgumentError("Parameter packageName is required."); |
| 1382 } |
| 1383 if (editId == null) { |
| 1384 throw new core.ArgumentError("Parameter editId is required."); |
| 1385 } |
| 1386 if (language == null) { |
| 1387 throw new core.ArgumentError("Parameter language is required."); |
| 1388 } |
| 1389 if (imageType == null) { |
| 1390 throw new core.ArgumentError("Parameter imageType is required."); |
| 1391 } |
| 1392 |
| 1393 |
| 1394 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/listings/' + common_internal
.Escaper.ecapeVariable('$language') + '/' + common_internal.Escaper.ecapeVariabl
e('$imageType'); |
| 1395 |
| 1396 var _response = _requester.request(_url, |
| 1397 "GET", |
| 1398 body: _body, |
| 1399 queryParams: _queryParams, |
| 1400 uploadOptions: _uploadOptions, |
| 1401 uploadMedia: _uploadMedia, |
| 1402 downloadOptions: _downloadOptions); |
| 1403 return _response.then((data) => new ImagesListResponse.fromJson(data)); |
| 1404 } |
| 1405 |
| 1406 /** |
| 1407 * Uploads a new image and adds it to the list of images for the specified |
| 1408 * language and image type. |
| 1409 * |
| 1410 * Request parameters: |
| 1411 * |
| 1412 * [packageName] - Unique identifier for the Android app that is being |
| 1413 * updated; for example, "com.spiffygame". |
| 1414 * |
| 1415 * [editId] - Unique identifier for this edit. |
| 1416 * |
| 1417 * [language] - The language code (a BCP-47 language tag) of the localized |
| 1418 * listing whose images are to read or modified. For example, to select |
| 1419 * Austrian German, pass "de-AT". |
| 1420 * |
| 1421 * [imageType] - null |
| 1422 * Possible string values are: |
| 1423 * - "featureGraphic" |
| 1424 * - "icon" |
| 1425 * - "phoneScreenshots" |
| 1426 * - "promoGraphic" |
| 1427 * - "sevenInchScreenshots" |
| 1428 * - "tenInchScreenshots" |
| 1429 * |
| 1430 * [uploadMedia] - The media to upload. |
| 1431 * |
| 1432 * [uploadOptions] - Options for the media upload. Streaming Media without the |
| 1433 * length being known ahead of time is only supported via resumable uploads. |
| 1434 * |
| 1435 * Completes with a [ImagesUploadResponse]. |
| 1436 * |
| 1437 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1438 * error. |
| 1439 * |
| 1440 * If the used [http.Client] completes with an error when making a REST call, |
| 1441 * this method will complete with the same error. |
| 1442 */ |
| 1443 async.Future<ImagesUploadResponse> upload(core.String packageName, core.String
editId, core.String language, core.String imageType, {common.UploadOptions uplo
adOptions : common.UploadOptions.Default, common.Media uploadMedia}) { |
| 1444 var _url = null; |
| 1445 var _queryParams = new core.Map(); |
| 1446 var _uploadMedia = null; |
| 1447 var _uploadOptions = null; |
| 1448 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1449 var _body = null; |
| 1450 |
| 1451 if (packageName == null) { |
| 1452 throw new core.ArgumentError("Parameter packageName is required."); |
| 1453 } |
| 1454 if (editId == null) { |
| 1455 throw new core.ArgumentError("Parameter editId is required."); |
| 1456 } |
| 1457 if (language == null) { |
| 1458 throw new core.ArgumentError("Parameter language is required."); |
| 1459 } |
| 1460 if (imageType == null) { |
| 1461 throw new core.ArgumentError("Parameter imageType is required."); |
| 1462 } |
| 1463 |
| 1464 _uploadMedia = uploadMedia; |
| 1465 _uploadOptions = uploadOptions; |
| 1466 |
| 1467 if (_uploadMedia == null) { |
| 1468 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' +
common_internal.Escaper.ecapeVariable('$editId') + '/listings/' + common_intern
al.Escaper.ecapeVariable('$language') + '/' + common_internal.Escaper.ecapeVaria
ble('$imageType'); |
| 1469 } else if (_uploadOptions is common.ResumableUploadOptions) { |
| 1470 _url = '/resumable/upload/androidpublisher/v2/applications/' + common_inte
rnal.Escaper.ecapeVariable('$packageName') + '/edits/' + common_internal.Escaper
.ecapeVariable('$editId') + '/listings/' + common_internal.Escaper.ecapeVariable
('$language') + '/' + common_internal.Escaper.ecapeVariable('$imageType'); |
| 1471 } else { |
| 1472 _url = '/upload/androidpublisher/v2/applications/' + common_internal.Escap
er.ecapeVariable('$packageName') + '/edits/' + common_internal.Escaper.ecapeVari
able('$editId') + '/listings/' + common_internal.Escaper.ecapeVariable('$languag
e') + '/' + common_internal.Escaper.ecapeVariable('$imageType'); |
| 1473 } |
| 1474 |
| 1475 |
| 1476 var _response = _requester.request(_url, |
| 1477 "POST", |
| 1478 body: _body, |
| 1479 queryParams: _queryParams, |
| 1480 uploadOptions: _uploadOptions, |
| 1481 uploadMedia: _uploadMedia, |
| 1482 downloadOptions: _downloadOptions); |
| 1483 return _response.then((data) => new ImagesUploadResponse.fromJson(data)); |
| 1484 } |
| 1485 |
| 1486 } |
| 1487 |
| 1488 |
| 1489 /** Not documented yet. */ |
| 1490 class EditsListingsResourceApi { |
| 1491 final common_internal.ApiRequester _requester; |
| 1492 |
| 1493 EditsListingsResourceApi(common_internal.ApiRequester client) : |
| 1494 _requester = client; |
| 1495 |
| 1496 /** |
| 1497 * Deletes the specified localized store listing from an edit. |
| 1498 * |
| 1499 * Request parameters: |
| 1500 * |
| 1501 * [packageName] - Unique identifier for the Android app that is being |
| 1502 * updated; for example, "com.spiffygame". |
| 1503 * |
| 1504 * [editId] - Unique identifier for this edit. |
| 1505 * |
| 1506 * [language] - The language code (a BCP-47 language tag) of the localized |
| 1507 * listing to read or modify. For example, to select Austrian German, pass |
| 1508 * "de-AT". |
| 1509 * |
| 1510 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1511 * error. |
| 1512 * |
| 1513 * If the used [http.Client] completes with an error when making a REST call, |
| 1514 * this method will complete with the same error. |
| 1515 */ |
| 1516 async.Future delete(core.String packageName, core.String editId, core.String l
anguage) { |
| 1517 var _url = null; |
| 1518 var _queryParams = new core.Map(); |
| 1519 var _uploadMedia = null; |
| 1520 var _uploadOptions = null; |
| 1521 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1522 var _body = null; |
| 1523 |
| 1524 if (packageName == null) { |
| 1525 throw new core.ArgumentError("Parameter packageName is required."); |
| 1526 } |
| 1527 if (editId == null) { |
| 1528 throw new core.ArgumentError("Parameter editId is required."); |
| 1529 } |
| 1530 if (language == null) { |
| 1531 throw new core.ArgumentError("Parameter language is required."); |
| 1532 } |
| 1533 |
| 1534 _downloadOptions = null; |
| 1535 |
| 1536 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/listings/' + common_internal
.Escaper.ecapeVariable('$language'); |
| 1537 |
| 1538 var _response = _requester.request(_url, |
| 1539 "DELETE", |
| 1540 body: _body, |
| 1541 queryParams: _queryParams, |
| 1542 uploadOptions: _uploadOptions, |
| 1543 uploadMedia: _uploadMedia, |
| 1544 downloadOptions: _downloadOptions); |
| 1545 return _response.then((data) => null); |
| 1546 } |
| 1547 |
| 1548 /** |
| 1549 * Deletes all localized listings from an edit. |
| 1550 * |
| 1551 * Request parameters: |
| 1552 * |
| 1553 * [packageName] - Unique identifier for the Android app that is being |
| 1554 * updated; for example, "com.spiffygame". |
| 1555 * |
| 1556 * [editId] - Unique identifier for this edit. |
| 1557 * |
| 1558 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1559 * error. |
| 1560 * |
| 1561 * If the used [http.Client] completes with an error when making a REST call, |
| 1562 * this method will complete with the same error. |
| 1563 */ |
| 1564 async.Future deleteall(core.String packageName, core.String editId) { |
| 1565 var _url = null; |
| 1566 var _queryParams = new core.Map(); |
| 1567 var _uploadMedia = null; |
| 1568 var _uploadOptions = null; |
| 1569 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1570 var _body = null; |
| 1571 |
| 1572 if (packageName == null) { |
| 1573 throw new core.ArgumentError("Parameter packageName is required."); |
| 1574 } |
| 1575 if (editId == null) { |
| 1576 throw new core.ArgumentError("Parameter editId is required."); |
| 1577 } |
| 1578 |
| 1579 _downloadOptions = null; |
| 1580 |
| 1581 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/listings'; |
| 1582 |
| 1583 var _response = _requester.request(_url, |
| 1584 "DELETE", |
| 1585 body: _body, |
| 1586 queryParams: _queryParams, |
| 1587 uploadOptions: _uploadOptions, |
| 1588 uploadMedia: _uploadMedia, |
| 1589 downloadOptions: _downloadOptions); |
| 1590 return _response.then((data) => null); |
| 1591 } |
| 1592 |
| 1593 /** |
| 1594 * Fetches information about a localized store listing. |
| 1595 * |
| 1596 * Request parameters: |
| 1597 * |
| 1598 * [packageName] - Unique identifier for the Android app that is being |
| 1599 * updated; for example, "com.spiffygame". |
| 1600 * |
| 1601 * [editId] - Unique identifier for this edit. |
| 1602 * |
| 1603 * [language] - The language code (a BCP-47 language tag) of the localized |
| 1604 * listing to read or modify. For example, to select Austrian German, pass |
| 1605 * "de-AT". |
| 1606 * |
| 1607 * Completes with a [Listing]. |
| 1608 * |
| 1609 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1610 * error. |
| 1611 * |
| 1612 * If the used [http.Client] completes with an error when making a REST call, |
| 1613 * this method will complete with the same error. |
| 1614 */ |
| 1615 async.Future<Listing> get(core.String packageName, core.String editId, core.St
ring language) { |
| 1616 var _url = null; |
| 1617 var _queryParams = new core.Map(); |
| 1618 var _uploadMedia = null; |
| 1619 var _uploadOptions = null; |
| 1620 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1621 var _body = null; |
| 1622 |
| 1623 if (packageName == null) { |
| 1624 throw new core.ArgumentError("Parameter packageName is required."); |
| 1625 } |
| 1626 if (editId == null) { |
| 1627 throw new core.ArgumentError("Parameter editId is required."); |
| 1628 } |
| 1629 if (language == null) { |
| 1630 throw new core.ArgumentError("Parameter language is required."); |
| 1631 } |
| 1632 |
| 1633 |
| 1634 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/listings/' + common_internal
.Escaper.ecapeVariable('$language'); |
| 1635 |
| 1636 var _response = _requester.request(_url, |
| 1637 "GET", |
| 1638 body: _body, |
| 1639 queryParams: _queryParams, |
| 1640 uploadOptions: _uploadOptions, |
| 1641 uploadMedia: _uploadMedia, |
| 1642 downloadOptions: _downloadOptions); |
| 1643 return _response.then((data) => new Listing.fromJson(data)); |
| 1644 } |
| 1645 |
| 1646 /** |
| 1647 * Returns all of the localized store listings attached to this edit. |
| 1648 * |
| 1649 * Request parameters: |
| 1650 * |
| 1651 * [packageName] - Unique identifier for the Android app that is being |
| 1652 * updated; for example, "com.spiffygame". |
| 1653 * |
| 1654 * [editId] - Unique identifier for this edit. |
| 1655 * |
| 1656 * Completes with a [ListingsListResponse]. |
| 1657 * |
| 1658 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1659 * error. |
| 1660 * |
| 1661 * If the used [http.Client] completes with an error when making a REST call, |
| 1662 * this method will complete with the same error. |
| 1663 */ |
| 1664 async.Future<ListingsListResponse> list(core.String packageName, core.String e
ditId) { |
| 1665 var _url = null; |
| 1666 var _queryParams = new core.Map(); |
| 1667 var _uploadMedia = null; |
| 1668 var _uploadOptions = null; |
| 1669 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1670 var _body = null; |
| 1671 |
| 1672 if (packageName == null) { |
| 1673 throw new core.ArgumentError("Parameter packageName is required."); |
| 1674 } |
| 1675 if (editId == null) { |
| 1676 throw new core.ArgumentError("Parameter editId is required."); |
| 1677 } |
| 1678 |
| 1679 |
| 1680 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/listings'; |
| 1681 |
| 1682 var _response = _requester.request(_url, |
| 1683 "GET", |
| 1684 body: _body, |
| 1685 queryParams: _queryParams, |
| 1686 uploadOptions: _uploadOptions, |
| 1687 uploadMedia: _uploadMedia, |
| 1688 downloadOptions: _downloadOptions); |
| 1689 return _response.then((data) => new ListingsListResponse.fromJson(data)); |
| 1690 } |
| 1691 |
| 1692 /** |
| 1693 * Creates or updates a localized store listing. This method supports patch |
| 1694 * semantics. |
| 1695 * |
| 1696 * [request] - The metadata request object. |
| 1697 * |
| 1698 * Request parameters: |
| 1699 * |
| 1700 * [packageName] - Unique identifier for the Android app that is being |
| 1701 * updated; for example, "com.spiffygame". |
| 1702 * |
| 1703 * [editId] - Unique identifier for this edit. |
| 1704 * |
| 1705 * [language] - The language code (a BCP-47 language tag) of the localized |
| 1706 * listing to read or modify. For example, to select Austrian German, pass |
| 1707 * "de-AT". |
| 1708 * |
| 1709 * Completes with a [Listing]. |
| 1710 * |
| 1711 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1712 * error. |
| 1713 * |
| 1714 * If the used [http.Client] completes with an error when making a REST call, |
| 1715 * this method will complete with the same error. |
| 1716 */ |
| 1717 async.Future<Listing> patch(Listing request, core.String packageName, core.Str
ing editId, core.String language) { |
| 1718 var _url = null; |
| 1719 var _queryParams = new core.Map(); |
| 1720 var _uploadMedia = null; |
| 1721 var _uploadOptions = null; |
| 1722 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1723 var _body = null; |
| 1724 |
| 1725 if (request != null) { |
| 1726 _body = convert.JSON.encode((request).toJson()); |
| 1727 } |
| 1728 if (packageName == null) { |
| 1729 throw new core.ArgumentError("Parameter packageName is required."); |
| 1730 } |
| 1731 if (editId == null) { |
| 1732 throw new core.ArgumentError("Parameter editId is required."); |
| 1733 } |
| 1734 if (language == null) { |
| 1735 throw new core.ArgumentError("Parameter language is required."); |
| 1736 } |
| 1737 |
| 1738 |
| 1739 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/listings/' + common_internal
.Escaper.ecapeVariable('$language'); |
| 1740 |
| 1741 var _response = _requester.request(_url, |
| 1742 "PATCH", |
| 1743 body: _body, |
| 1744 queryParams: _queryParams, |
| 1745 uploadOptions: _uploadOptions, |
| 1746 uploadMedia: _uploadMedia, |
| 1747 downloadOptions: _downloadOptions); |
| 1748 return _response.then((data) => new Listing.fromJson(data)); |
| 1749 } |
| 1750 |
| 1751 /** |
| 1752 * Creates or updates a localized store listing. |
| 1753 * |
| 1754 * [request] - The metadata request object. |
| 1755 * |
| 1756 * Request parameters: |
| 1757 * |
| 1758 * [packageName] - Unique identifier for the Android app that is being |
| 1759 * updated; for example, "com.spiffygame". |
| 1760 * |
| 1761 * [editId] - Unique identifier for this edit. |
| 1762 * |
| 1763 * [language] - The language code (a BCP-47 language tag) of the localized |
| 1764 * listing to read or modify. For example, to select Austrian German, pass |
| 1765 * "de-AT". |
| 1766 * |
| 1767 * Completes with a [Listing]. |
| 1768 * |
| 1769 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1770 * error. |
| 1771 * |
| 1772 * If the used [http.Client] completes with an error when making a REST call, |
| 1773 * this method will complete with the same error. |
| 1774 */ |
| 1775 async.Future<Listing> update(Listing request, core.String packageName, core.St
ring editId, core.String language) { |
| 1776 var _url = null; |
| 1777 var _queryParams = new core.Map(); |
| 1778 var _uploadMedia = null; |
| 1779 var _uploadOptions = null; |
| 1780 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1781 var _body = null; |
| 1782 |
| 1783 if (request != null) { |
| 1784 _body = convert.JSON.encode((request).toJson()); |
| 1785 } |
| 1786 if (packageName == null) { |
| 1787 throw new core.ArgumentError("Parameter packageName is required."); |
| 1788 } |
| 1789 if (editId == null) { |
| 1790 throw new core.ArgumentError("Parameter editId is required."); |
| 1791 } |
| 1792 if (language == null) { |
| 1793 throw new core.ArgumentError("Parameter language is required."); |
| 1794 } |
| 1795 |
| 1796 |
| 1797 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/listings/' + common_internal
.Escaper.ecapeVariable('$language'); |
| 1798 |
| 1799 var _response = _requester.request(_url, |
| 1800 "PUT", |
| 1801 body: _body, |
| 1802 queryParams: _queryParams, |
| 1803 uploadOptions: _uploadOptions, |
| 1804 uploadMedia: _uploadMedia, |
| 1805 downloadOptions: _downloadOptions); |
| 1806 return _response.then((data) => new Listing.fromJson(data)); |
| 1807 } |
| 1808 |
| 1809 } |
| 1810 |
| 1811 |
| 1812 /** Not documented yet. */ |
| 1813 class EditsTestersResourceApi { |
| 1814 final common_internal.ApiRequester _requester; |
| 1815 |
| 1816 EditsTestersResourceApi(common_internal.ApiRequester client) : |
| 1817 _requester = client; |
| 1818 |
| 1819 /** |
| 1820 * Not documented yet. |
| 1821 * |
| 1822 * Request parameters: |
| 1823 * |
| 1824 * [packageName] - Unique identifier for the Android app that is being |
| 1825 * updated; for example, "com.spiffygame". |
| 1826 * |
| 1827 * [editId] - Unique identifier for this edit. |
| 1828 * |
| 1829 * [track] - null |
| 1830 * Possible string values are: |
| 1831 * - "alpha" |
| 1832 * - "beta" |
| 1833 * - "production" |
| 1834 * - "rollout" |
| 1835 * |
| 1836 * Completes with a [Testers]. |
| 1837 * |
| 1838 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1839 * error. |
| 1840 * |
| 1841 * If the used [http.Client] completes with an error when making a REST call, |
| 1842 * this method will complete with the same error. |
| 1843 */ |
| 1844 async.Future<Testers> get(core.String packageName, core.String editId, core.St
ring track) { |
| 1845 var _url = null; |
| 1846 var _queryParams = new core.Map(); |
| 1847 var _uploadMedia = null; |
| 1848 var _uploadOptions = null; |
| 1849 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1850 var _body = null; |
| 1851 |
| 1852 if (packageName == null) { |
| 1853 throw new core.ArgumentError("Parameter packageName is required."); |
| 1854 } |
| 1855 if (editId == null) { |
| 1856 throw new core.ArgumentError("Parameter editId is required."); |
| 1857 } |
| 1858 if (track == null) { |
| 1859 throw new core.ArgumentError("Parameter track is required."); |
| 1860 } |
| 1861 |
| 1862 |
| 1863 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/testers/' + common_internal.
Escaper.ecapeVariable('$track'); |
| 1864 |
| 1865 var _response = _requester.request(_url, |
| 1866 "GET", |
| 1867 body: _body, |
| 1868 queryParams: _queryParams, |
| 1869 uploadOptions: _uploadOptions, |
| 1870 uploadMedia: _uploadMedia, |
| 1871 downloadOptions: _downloadOptions); |
| 1872 return _response.then((data) => new Testers.fromJson(data)); |
| 1873 } |
| 1874 |
| 1875 /** |
| 1876 * Not documented yet. |
| 1877 * |
| 1878 * [request] - The metadata request object. |
| 1879 * |
| 1880 * Request parameters: |
| 1881 * |
| 1882 * [packageName] - Unique identifier for the Android app that is being |
| 1883 * updated; for example, "com.spiffygame". |
| 1884 * |
| 1885 * [editId] - Unique identifier for this edit. |
| 1886 * |
| 1887 * [track] - null |
| 1888 * Possible string values are: |
| 1889 * - "alpha" |
| 1890 * - "beta" |
| 1891 * - "production" |
| 1892 * - "rollout" |
| 1893 * |
| 1894 * Completes with a [Testers]. |
| 1895 * |
| 1896 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1897 * error. |
| 1898 * |
| 1899 * If the used [http.Client] completes with an error when making a REST call, |
| 1900 * this method will complete with the same error. |
| 1901 */ |
| 1902 async.Future<Testers> patch(Testers request, core.String packageName, core.Str
ing editId, core.String track) { |
| 1903 var _url = null; |
| 1904 var _queryParams = new core.Map(); |
| 1905 var _uploadMedia = null; |
| 1906 var _uploadOptions = null; |
| 1907 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1908 var _body = null; |
| 1909 |
| 1910 if (request != null) { |
| 1911 _body = convert.JSON.encode((request).toJson()); |
| 1912 } |
| 1913 if (packageName == null) { |
| 1914 throw new core.ArgumentError("Parameter packageName is required."); |
| 1915 } |
| 1916 if (editId == null) { |
| 1917 throw new core.ArgumentError("Parameter editId is required."); |
| 1918 } |
| 1919 if (track == null) { |
| 1920 throw new core.ArgumentError("Parameter track is required."); |
| 1921 } |
| 1922 |
| 1923 |
| 1924 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/testers/' + common_internal.
Escaper.ecapeVariable('$track'); |
| 1925 |
| 1926 var _response = _requester.request(_url, |
| 1927 "PATCH", |
| 1928 body: _body, |
| 1929 queryParams: _queryParams, |
| 1930 uploadOptions: _uploadOptions, |
| 1931 uploadMedia: _uploadMedia, |
| 1932 downloadOptions: _downloadOptions); |
| 1933 return _response.then((data) => new Testers.fromJson(data)); |
| 1934 } |
| 1935 |
| 1936 /** |
| 1937 * Not documented yet. |
| 1938 * |
| 1939 * [request] - The metadata request object. |
| 1940 * |
| 1941 * Request parameters: |
| 1942 * |
| 1943 * [packageName] - Unique identifier for the Android app that is being |
| 1944 * updated; for example, "com.spiffygame". |
| 1945 * |
| 1946 * [editId] - Unique identifier for this edit. |
| 1947 * |
| 1948 * [track] - null |
| 1949 * Possible string values are: |
| 1950 * - "alpha" |
| 1951 * - "beta" |
| 1952 * - "production" |
| 1953 * - "rollout" |
| 1954 * |
| 1955 * Completes with a [Testers]. |
| 1956 * |
| 1957 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1958 * error. |
| 1959 * |
| 1960 * If the used [http.Client] completes with an error when making a REST call, |
| 1961 * this method will complete with the same error. |
| 1962 */ |
| 1963 async.Future<Testers> update(Testers request, core.String packageName, core.St
ring editId, core.String track) { |
| 1964 var _url = null; |
| 1965 var _queryParams = new core.Map(); |
| 1966 var _uploadMedia = null; |
| 1967 var _uploadOptions = null; |
| 1968 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1969 var _body = null; |
| 1970 |
| 1971 if (request != null) { |
| 1972 _body = convert.JSON.encode((request).toJson()); |
| 1973 } |
| 1974 if (packageName == null) { |
| 1975 throw new core.ArgumentError("Parameter packageName is required."); |
| 1976 } |
| 1977 if (editId == null) { |
| 1978 throw new core.ArgumentError("Parameter editId is required."); |
| 1979 } |
| 1980 if (track == null) { |
| 1981 throw new core.ArgumentError("Parameter track is required."); |
| 1982 } |
| 1983 |
| 1984 |
| 1985 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/testers/' + common_internal.
Escaper.ecapeVariable('$track'); |
| 1986 |
| 1987 var _response = _requester.request(_url, |
| 1988 "PUT", |
| 1989 body: _body, |
| 1990 queryParams: _queryParams, |
| 1991 uploadOptions: _uploadOptions, |
| 1992 uploadMedia: _uploadMedia, |
| 1993 downloadOptions: _downloadOptions); |
| 1994 return _response.then((data) => new Testers.fromJson(data)); |
| 1995 } |
| 1996 |
| 1997 } |
| 1998 |
| 1999 |
| 2000 /** Not documented yet. */ |
| 2001 class EditsTracksResourceApi { |
| 2002 final common_internal.ApiRequester _requester; |
| 2003 |
| 2004 EditsTracksResourceApi(common_internal.ApiRequester client) : |
| 2005 _requester = client; |
| 2006 |
| 2007 /** |
| 2008 * Fetches the track configuration for the specified track type. Includes the |
| 2009 * APK version codes that are in this track. |
| 2010 * |
| 2011 * Request parameters: |
| 2012 * |
| 2013 * [packageName] - Unique identifier for the Android app that is being |
| 2014 * updated; for example, "com.spiffygame". |
| 2015 * |
| 2016 * [editId] - Unique identifier for this edit. |
| 2017 * |
| 2018 * [track] - The track type to read or modify. |
| 2019 * Possible string values are: |
| 2020 * - "alpha" |
| 2021 * - "beta" |
| 2022 * - "production" |
| 2023 * - "rollout" |
| 2024 * |
| 2025 * Completes with a [Track]. |
| 2026 * |
| 2027 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2028 * error. |
| 2029 * |
| 2030 * If the used [http.Client] completes with an error when making a REST call, |
| 2031 * this method will complete with the same error. |
| 2032 */ |
| 2033 async.Future<Track> get(core.String packageName, core.String editId, core.Stri
ng track) { |
| 2034 var _url = null; |
| 2035 var _queryParams = new core.Map(); |
| 2036 var _uploadMedia = null; |
| 2037 var _uploadOptions = null; |
| 2038 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2039 var _body = null; |
| 2040 |
| 2041 if (packageName == null) { |
| 2042 throw new core.ArgumentError("Parameter packageName is required."); |
| 2043 } |
| 2044 if (editId == null) { |
| 2045 throw new core.ArgumentError("Parameter editId is required."); |
| 2046 } |
| 2047 if (track == null) { |
| 2048 throw new core.ArgumentError("Parameter track is required."); |
| 2049 } |
| 2050 |
| 2051 |
| 2052 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/tracks/' + common_internal.E
scaper.ecapeVariable('$track'); |
| 2053 |
| 2054 var _response = _requester.request(_url, |
| 2055 "GET", |
| 2056 body: _body, |
| 2057 queryParams: _queryParams, |
| 2058 uploadOptions: _uploadOptions, |
| 2059 uploadMedia: _uploadMedia, |
| 2060 downloadOptions: _downloadOptions); |
| 2061 return _response.then((data) => new Track.fromJson(data)); |
| 2062 } |
| 2063 |
| 2064 /** |
| 2065 * Lists all the track configurations for this edit. |
| 2066 * |
| 2067 * Request parameters: |
| 2068 * |
| 2069 * [packageName] - Unique identifier for the Android app that is being |
| 2070 * updated; for example, "com.spiffygame". |
| 2071 * |
| 2072 * [editId] - Unique identifier for this edit. |
| 2073 * |
| 2074 * Completes with a [TracksListResponse]. |
| 2075 * |
| 2076 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2077 * error. |
| 2078 * |
| 2079 * If the used [http.Client] completes with an error when making a REST call, |
| 2080 * this method will complete with the same error. |
| 2081 */ |
| 2082 async.Future<TracksListResponse> list(core.String packageName, core.String edi
tId) { |
| 2083 var _url = null; |
| 2084 var _queryParams = new core.Map(); |
| 2085 var _uploadMedia = null; |
| 2086 var _uploadOptions = null; |
| 2087 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2088 var _body = null; |
| 2089 |
| 2090 if (packageName == null) { |
| 2091 throw new core.ArgumentError("Parameter packageName is required."); |
| 2092 } |
| 2093 if (editId == null) { |
| 2094 throw new core.ArgumentError("Parameter editId is required."); |
| 2095 } |
| 2096 |
| 2097 |
| 2098 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/tracks'; |
| 2099 |
| 2100 var _response = _requester.request(_url, |
| 2101 "GET", |
| 2102 body: _body, |
| 2103 queryParams: _queryParams, |
| 2104 uploadOptions: _uploadOptions, |
| 2105 uploadMedia: _uploadMedia, |
| 2106 downloadOptions: _downloadOptions); |
| 2107 return _response.then((data) => new TracksListResponse.fromJson(data)); |
| 2108 } |
| 2109 |
| 2110 /** |
| 2111 * Updates the track configuration for the specified track type. This method |
| 2112 * supports patch semantics. |
| 2113 * |
| 2114 * [request] - The metadata request object. |
| 2115 * |
| 2116 * Request parameters: |
| 2117 * |
| 2118 * [packageName] - Unique identifier for the Android app that is being |
| 2119 * updated; for example, "com.spiffygame". |
| 2120 * |
| 2121 * [editId] - Unique identifier for this edit. |
| 2122 * |
| 2123 * [track] - The track type to read or modify. |
| 2124 * Possible string values are: |
| 2125 * - "alpha" |
| 2126 * - "beta" |
| 2127 * - "production" |
| 2128 * - "rollout" |
| 2129 * |
| 2130 * Completes with a [Track]. |
| 2131 * |
| 2132 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2133 * error. |
| 2134 * |
| 2135 * If the used [http.Client] completes with an error when making a REST call, |
| 2136 * this method will complete with the same error. |
| 2137 */ |
| 2138 async.Future<Track> patch(Track request, core.String packageName, core.String
editId, core.String track) { |
| 2139 var _url = null; |
| 2140 var _queryParams = new core.Map(); |
| 2141 var _uploadMedia = null; |
| 2142 var _uploadOptions = null; |
| 2143 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2144 var _body = null; |
| 2145 |
| 2146 if (request != null) { |
| 2147 _body = convert.JSON.encode((request).toJson()); |
| 2148 } |
| 2149 if (packageName == null) { |
| 2150 throw new core.ArgumentError("Parameter packageName is required."); |
| 2151 } |
| 2152 if (editId == null) { |
| 2153 throw new core.ArgumentError("Parameter editId is required."); |
| 2154 } |
| 2155 if (track == null) { |
| 2156 throw new core.ArgumentError("Parameter track is required."); |
| 2157 } |
| 2158 |
| 2159 |
| 2160 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/tracks/' + common_internal.E
scaper.ecapeVariable('$track'); |
| 2161 |
| 2162 var _response = _requester.request(_url, |
| 2163 "PATCH", |
| 2164 body: _body, |
| 2165 queryParams: _queryParams, |
| 2166 uploadOptions: _uploadOptions, |
| 2167 uploadMedia: _uploadMedia, |
| 2168 downloadOptions: _downloadOptions); |
| 2169 return _response.then((data) => new Track.fromJson(data)); |
| 2170 } |
| 2171 |
| 2172 /** |
| 2173 * Updates the track configuration for the specified track type. |
| 2174 * |
| 2175 * [request] - The metadata request object. |
| 2176 * |
| 2177 * Request parameters: |
| 2178 * |
| 2179 * [packageName] - Unique identifier for the Android app that is being |
| 2180 * updated; for example, "com.spiffygame". |
| 2181 * |
| 2182 * [editId] - Unique identifier for this edit. |
| 2183 * |
| 2184 * [track] - The track type to read or modify. |
| 2185 * Possible string values are: |
| 2186 * - "alpha" |
| 2187 * - "beta" |
| 2188 * - "production" |
| 2189 * - "rollout" |
| 2190 * |
| 2191 * Completes with a [Track]. |
| 2192 * |
| 2193 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2194 * error. |
| 2195 * |
| 2196 * If the used [http.Client] completes with an error when making a REST call, |
| 2197 * this method will complete with the same error. |
| 2198 */ |
| 2199 async.Future<Track> update(Track request, core.String packageName, core.String
editId, core.String track) { |
| 2200 var _url = null; |
| 2201 var _queryParams = new core.Map(); |
| 2202 var _uploadMedia = null; |
| 2203 var _uploadOptions = null; |
| 2204 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2205 var _body = null; |
| 2206 |
| 2207 if (request != null) { |
| 2208 _body = convert.JSON.encode((request).toJson()); |
| 2209 } |
| 2210 if (packageName == null) { |
| 2211 throw new core.ArgumentError("Parameter packageName is required."); |
| 2212 } |
| 2213 if (editId == null) { |
| 2214 throw new core.ArgumentError("Parameter editId is required."); |
| 2215 } |
| 2216 if (track == null) { |
| 2217 throw new core.ArgumentError("Parameter track is required."); |
| 2218 } |
| 2219 |
| 2220 |
| 2221 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/edits/' + c
ommon_internal.Escaper.ecapeVariable('$editId') + '/tracks/' + common_internal.E
scaper.ecapeVariable('$track'); |
| 2222 |
| 2223 var _response = _requester.request(_url, |
| 2224 "PUT", |
| 2225 body: _body, |
| 2226 queryParams: _queryParams, |
| 2227 uploadOptions: _uploadOptions, |
| 2228 uploadMedia: _uploadMedia, |
| 2229 downloadOptions: _downloadOptions); |
| 2230 return _response.then((data) => new Track.fromJson(data)); |
| 2231 } |
| 2232 |
| 2233 } |
| 2234 |
| 2235 |
| 2236 /** Not documented yet. */ |
| 2237 class InappproductsResourceApi { |
| 2238 final common_internal.ApiRequester _requester; |
| 2239 |
| 2240 InappproductsResourceApi(common_internal.ApiRequester client) : |
| 2241 _requester = client; |
| 2242 |
| 2243 /** |
| 2244 * Not documented yet. |
| 2245 * |
| 2246 * [request] - The metadata request object. |
| 2247 * |
| 2248 * Request parameters: |
| 2249 * |
| 2250 * Completes with a [InappproductsBatchResponse]. |
| 2251 * |
| 2252 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2253 * error. |
| 2254 * |
| 2255 * If the used [http.Client] completes with an error when making a REST call, |
| 2256 * this method will complete with the same error. |
| 2257 */ |
| 2258 async.Future<InappproductsBatchResponse> batch(InappproductsBatchRequest reque
st) { |
| 2259 var _url = null; |
| 2260 var _queryParams = new core.Map(); |
| 2261 var _uploadMedia = null; |
| 2262 var _uploadOptions = null; |
| 2263 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2264 var _body = null; |
| 2265 |
| 2266 if (request != null) { |
| 2267 _body = convert.JSON.encode((request).toJson()); |
| 2268 } |
| 2269 |
| 2270 |
| 2271 _url = 'inappproducts/batch'; |
| 2272 |
| 2273 var _response = _requester.request(_url, |
| 2274 "POST", |
| 2275 body: _body, |
| 2276 queryParams: _queryParams, |
| 2277 uploadOptions: _uploadOptions, |
| 2278 uploadMedia: _uploadMedia, |
| 2279 downloadOptions: _downloadOptions); |
| 2280 return _response.then((data) => new InappproductsBatchResponse.fromJson(data
)); |
| 2281 } |
| 2282 |
| 2283 /** |
| 2284 * Delete an in-app product for an app. |
| 2285 * |
| 2286 * Request parameters: |
| 2287 * |
| 2288 * [packageName] - Unique identifier for the Android app with the in-app |
| 2289 * product; for example, "com.spiffygame". |
| 2290 * |
| 2291 * [sku] - Unique identifier for the in-app product. |
| 2292 * |
| 2293 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2294 * error. |
| 2295 * |
| 2296 * If the used [http.Client] completes with an error when making a REST call, |
| 2297 * this method will complete with the same error. |
| 2298 */ |
| 2299 async.Future delete(core.String packageName, core.String sku) { |
| 2300 var _url = null; |
| 2301 var _queryParams = new core.Map(); |
| 2302 var _uploadMedia = null; |
| 2303 var _uploadOptions = null; |
| 2304 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2305 var _body = null; |
| 2306 |
| 2307 if (packageName == null) { |
| 2308 throw new core.ArgumentError("Parameter packageName is required."); |
| 2309 } |
| 2310 if (sku == null) { |
| 2311 throw new core.ArgumentError("Parameter sku is required."); |
| 2312 } |
| 2313 |
| 2314 _downloadOptions = null; |
| 2315 |
| 2316 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/inappproduc
ts/' + common_internal.Escaper.ecapeVariable('$sku'); |
| 2317 |
| 2318 var _response = _requester.request(_url, |
| 2319 "DELETE", |
| 2320 body: _body, |
| 2321 queryParams: _queryParams, |
| 2322 uploadOptions: _uploadOptions, |
| 2323 uploadMedia: _uploadMedia, |
| 2324 downloadOptions: _downloadOptions); |
| 2325 return _response.then((data) => null); |
| 2326 } |
| 2327 |
| 2328 /** |
| 2329 * Returns information about the in-app product specified. |
| 2330 * |
| 2331 * Request parameters: |
| 2332 * |
| 2333 * [packageName] - null |
| 2334 * |
| 2335 * [sku] - Unique identifier for the in-app product. |
| 2336 * |
| 2337 * Completes with a [InAppProduct]. |
| 2338 * |
| 2339 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2340 * error. |
| 2341 * |
| 2342 * If the used [http.Client] completes with an error when making a REST call, |
| 2343 * this method will complete with the same error. |
| 2344 */ |
| 2345 async.Future<InAppProduct> get(core.String packageName, core.String sku) { |
| 2346 var _url = null; |
| 2347 var _queryParams = new core.Map(); |
| 2348 var _uploadMedia = null; |
| 2349 var _uploadOptions = null; |
| 2350 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2351 var _body = null; |
| 2352 |
| 2353 if (packageName == null) { |
| 2354 throw new core.ArgumentError("Parameter packageName is required."); |
| 2355 } |
| 2356 if (sku == null) { |
| 2357 throw new core.ArgumentError("Parameter sku is required."); |
| 2358 } |
| 2359 |
| 2360 |
| 2361 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/inappproduc
ts/' + common_internal.Escaper.ecapeVariable('$sku'); |
| 2362 |
| 2363 var _response = _requester.request(_url, |
| 2364 "GET", |
| 2365 body: _body, |
| 2366 queryParams: _queryParams, |
| 2367 uploadOptions: _uploadOptions, |
| 2368 uploadMedia: _uploadMedia, |
| 2369 downloadOptions: _downloadOptions); |
| 2370 return _response.then((data) => new InAppProduct.fromJson(data)); |
| 2371 } |
| 2372 |
| 2373 /** |
| 2374 * Creates a new in-app product for an app. |
| 2375 * |
| 2376 * [request] - The metadata request object. |
| 2377 * |
| 2378 * Request parameters: |
| 2379 * |
| 2380 * [packageName] - Unique identifier for the Android app; for example, |
| 2381 * "com.spiffygame". |
| 2382 * |
| 2383 * [autoConvertMissingPrices] - If true the prices for all regions targeted by |
| 2384 * the parent app that don't have a price specified for this in-app product |
| 2385 * will be auto converted to the target currency based on the default price. |
| 2386 * Defaults to false. |
| 2387 * |
| 2388 * Completes with a [InAppProduct]. |
| 2389 * |
| 2390 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2391 * error. |
| 2392 * |
| 2393 * If the used [http.Client] completes with an error when making a REST call, |
| 2394 * this method will complete with the same error. |
| 2395 */ |
| 2396 async.Future<InAppProduct> insert(InAppProduct request, core.String packageNam
e, {core.bool autoConvertMissingPrices}) { |
| 2397 var _url = null; |
| 2398 var _queryParams = new core.Map(); |
| 2399 var _uploadMedia = null; |
| 2400 var _uploadOptions = null; |
| 2401 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2402 var _body = null; |
| 2403 |
| 2404 if (request != null) { |
| 2405 _body = convert.JSON.encode((request).toJson()); |
| 2406 } |
| 2407 if (packageName == null) { |
| 2408 throw new core.ArgumentError("Parameter packageName is required."); |
| 2409 } |
| 2410 if (autoConvertMissingPrices != null) { |
| 2411 _queryParams["autoConvertMissingPrices"] = ["${autoConvertMissingPrices}"]
; |
| 2412 } |
| 2413 |
| 2414 |
| 2415 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/inappproduc
ts'; |
| 2416 |
| 2417 var _response = _requester.request(_url, |
| 2418 "POST", |
| 2419 body: _body, |
| 2420 queryParams: _queryParams, |
| 2421 uploadOptions: _uploadOptions, |
| 2422 uploadMedia: _uploadMedia, |
| 2423 downloadOptions: _downloadOptions); |
| 2424 return _response.then((data) => new InAppProduct.fromJson(data)); |
| 2425 } |
| 2426 |
| 2427 /** |
| 2428 * List all the in-app products for an Android app, both subscriptions and |
| 2429 * managed in-app products.. |
| 2430 * |
| 2431 * Request parameters: |
| 2432 * |
| 2433 * [packageName] - Unique identifier for the Android app with in-app products; |
| 2434 * for example, "com.spiffygame". |
| 2435 * |
| 2436 * [maxResults] - null |
| 2437 * |
| 2438 * [startIndex] - null |
| 2439 * |
| 2440 * [token] - null |
| 2441 * |
| 2442 * Completes with a [InappproductsListResponse]. |
| 2443 * |
| 2444 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2445 * error. |
| 2446 * |
| 2447 * If the used [http.Client] completes with an error when making a REST call, |
| 2448 * this method will complete with the same error. |
| 2449 */ |
| 2450 async.Future<InappproductsListResponse> list(core.String packageName, {core.in
t maxResults, core.int startIndex, core.String token}) { |
| 2451 var _url = null; |
| 2452 var _queryParams = new core.Map(); |
| 2453 var _uploadMedia = null; |
| 2454 var _uploadOptions = null; |
| 2455 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2456 var _body = null; |
| 2457 |
| 2458 if (packageName == null) { |
| 2459 throw new core.ArgumentError("Parameter packageName is required."); |
| 2460 } |
| 2461 if (maxResults != null) { |
| 2462 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2463 } |
| 2464 if (startIndex != null) { |
| 2465 _queryParams["startIndex"] = ["${startIndex}"]; |
| 2466 } |
| 2467 if (token != null) { |
| 2468 _queryParams["token"] = [token]; |
| 2469 } |
| 2470 |
| 2471 |
| 2472 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/inappproduc
ts'; |
| 2473 |
| 2474 var _response = _requester.request(_url, |
| 2475 "GET", |
| 2476 body: _body, |
| 2477 queryParams: _queryParams, |
| 2478 uploadOptions: _uploadOptions, |
| 2479 uploadMedia: _uploadMedia, |
| 2480 downloadOptions: _downloadOptions); |
| 2481 return _response.then((data) => new InappproductsListResponse.fromJson(data)
); |
| 2482 } |
| 2483 |
| 2484 /** |
| 2485 * Updates the details of an in-app product. This method supports patch |
| 2486 * semantics. |
| 2487 * |
| 2488 * [request] - The metadata request object. |
| 2489 * |
| 2490 * Request parameters: |
| 2491 * |
| 2492 * [packageName] - Unique identifier for the Android app with the in-app |
| 2493 * product; for example, "com.spiffygame". |
| 2494 * |
| 2495 * [sku] - Unique identifier for the in-app product. |
| 2496 * |
| 2497 * [autoConvertMissingPrices] - If true the prices for all regions targeted by |
| 2498 * the parent app that don't have a price specified for this in-app product |
| 2499 * will be auto converted to the target currency based on the default price. |
| 2500 * Defaults to false. |
| 2501 * |
| 2502 * Completes with a [InAppProduct]. |
| 2503 * |
| 2504 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2505 * error. |
| 2506 * |
| 2507 * If the used [http.Client] completes with an error when making a REST call, |
| 2508 * this method will complete with the same error. |
| 2509 */ |
| 2510 async.Future<InAppProduct> patch(InAppProduct request, core.String packageName
, core.String sku, {core.bool autoConvertMissingPrices}) { |
| 2511 var _url = null; |
| 2512 var _queryParams = new core.Map(); |
| 2513 var _uploadMedia = null; |
| 2514 var _uploadOptions = null; |
| 2515 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2516 var _body = null; |
| 2517 |
| 2518 if (request != null) { |
| 2519 _body = convert.JSON.encode((request).toJson()); |
| 2520 } |
| 2521 if (packageName == null) { |
| 2522 throw new core.ArgumentError("Parameter packageName is required."); |
| 2523 } |
| 2524 if (sku == null) { |
| 2525 throw new core.ArgumentError("Parameter sku is required."); |
| 2526 } |
| 2527 if (autoConvertMissingPrices != null) { |
| 2528 _queryParams["autoConvertMissingPrices"] = ["${autoConvertMissingPrices}"]
; |
| 2529 } |
| 2530 |
| 2531 |
| 2532 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/inappproduc
ts/' + common_internal.Escaper.ecapeVariable('$sku'); |
| 2533 |
| 2534 var _response = _requester.request(_url, |
| 2535 "PATCH", |
| 2536 body: _body, |
| 2537 queryParams: _queryParams, |
| 2538 uploadOptions: _uploadOptions, |
| 2539 uploadMedia: _uploadMedia, |
| 2540 downloadOptions: _downloadOptions); |
| 2541 return _response.then((data) => new InAppProduct.fromJson(data)); |
| 2542 } |
| 2543 |
| 2544 /** |
| 2545 * Updates the details of an in-app product. |
| 2546 * |
| 2547 * [request] - The metadata request object. |
| 2548 * |
| 2549 * Request parameters: |
| 2550 * |
| 2551 * [packageName] - Unique identifier for the Android app with the in-app |
| 2552 * product; for example, "com.spiffygame". |
| 2553 * |
| 2554 * [sku] - Unique identifier for the in-app product. |
| 2555 * |
| 2556 * [autoConvertMissingPrices] - If true the prices for all regions targeted by |
| 2557 * the parent app that don't have a price specified for this in-app product |
| 2558 * will be auto converted to the target currency based on the default price. |
| 2559 * Defaults to false. |
| 2560 * |
| 2561 * Completes with a [InAppProduct]. |
| 2562 * |
| 2563 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2564 * error. |
| 2565 * |
| 2566 * If the used [http.Client] completes with an error when making a REST call, |
| 2567 * this method will complete with the same error. |
| 2568 */ |
| 2569 async.Future<InAppProduct> update(InAppProduct request, core.String packageNam
e, core.String sku, {core.bool autoConvertMissingPrices}) { |
| 2570 var _url = null; |
| 2571 var _queryParams = new core.Map(); |
| 2572 var _uploadMedia = null; |
| 2573 var _uploadOptions = null; |
| 2574 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2575 var _body = null; |
| 2576 |
| 2577 if (request != null) { |
| 2578 _body = convert.JSON.encode((request).toJson()); |
| 2579 } |
| 2580 if (packageName == null) { |
| 2581 throw new core.ArgumentError("Parameter packageName is required."); |
| 2582 } |
| 2583 if (sku == null) { |
| 2584 throw new core.ArgumentError("Parameter sku is required."); |
| 2585 } |
| 2586 if (autoConvertMissingPrices != null) { |
| 2587 _queryParams["autoConvertMissingPrices"] = ["${autoConvertMissingPrices}"]
; |
| 2588 } |
| 2589 |
| 2590 |
| 2591 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/inappproduc
ts/' + common_internal.Escaper.ecapeVariable('$sku'); |
| 2592 |
| 2593 var _response = _requester.request(_url, |
| 2594 "PUT", |
| 2595 body: _body, |
| 2596 queryParams: _queryParams, |
| 2597 uploadOptions: _uploadOptions, |
| 2598 uploadMedia: _uploadMedia, |
| 2599 downloadOptions: _downloadOptions); |
| 2600 return _response.then((data) => new InAppProduct.fromJson(data)); |
| 2601 } |
| 2602 |
| 2603 } |
| 2604 |
| 2605 |
| 2606 /** Not documented yet. */ |
| 2607 class PurchasesResourceApi { |
| 2608 final common_internal.ApiRequester _requester; |
| 2609 |
| 2610 PurchasesProductsResourceApi get products => new PurchasesProductsResourceApi(
_requester); |
| 2611 PurchasesSubscriptionsResourceApi get subscriptions => new PurchasesSubscripti
onsResourceApi(_requester); |
| 2612 |
| 2613 PurchasesResourceApi(common_internal.ApiRequester client) : |
| 2614 _requester = client; |
| 2615 } |
| 2616 |
| 2617 |
| 2618 /** Not documented yet. */ |
| 2619 class PurchasesProductsResourceApi { |
| 2620 final common_internal.ApiRequester _requester; |
| 2621 |
| 2622 PurchasesProductsResourceApi(common_internal.ApiRequester client) : |
| 2623 _requester = client; |
| 2624 |
| 2625 /** |
| 2626 * Checks the purchase and consumption status of an inapp item. |
| 2627 * |
| 2628 * Request parameters: |
| 2629 * |
| 2630 * [packageName] - The package name of the application the inapp product was |
| 2631 * sold in (for example, 'com.some.thing'). |
| 2632 * |
| 2633 * [productId] - The inapp product SKU (for example, 'com.some.thing.inapp1'). |
| 2634 * |
| 2635 * [token] - The token provided to the user's device when the inapp product |
| 2636 * was purchased. |
| 2637 * |
| 2638 * Completes with a [ProductPurchase]. |
| 2639 * |
| 2640 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2641 * error. |
| 2642 * |
| 2643 * If the used [http.Client] completes with an error when making a REST call, |
| 2644 * this method will complete with the same error. |
| 2645 */ |
| 2646 async.Future<ProductPurchase> get(core.String packageName, core.String product
Id, core.String token) { |
| 2647 var _url = null; |
| 2648 var _queryParams = new core.Map(); |
| 2649 var _uploadMedia = null; |
| 2650 var _uploadOptions = null; |
| 2651 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2652 var _body = null; |
| 2653 |
| 2654 if (packageName == null) { |
| 2655 throw new core.ArgumentError("Parameter packageName is required."); |
| 2656 } |
| 2657 if (productId == null) { |
| 2658 throw new core.ArgumentError("Parameter productId is required."); |
| 2659 } |
| 2660 if (token == null) { |
| 2661 throw new core.ArgumentError("Parameter token is required."); |
| 2662 } |
| 2663 |
| 2664 |
| 2665 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/purchases/p
roducts/' + common_internal.Escaper.ecapeVariable('$productId') + '/tokens/' + c
ommon_internal.Escaper.ecapeVariable('$token'); |
| 2666 |
| 2667 var _response = _requester.request(_url, |
| 2668 "GET", |
| 2669 body: _body, |
| 2670 queryParams: _queryParams, |
| 2671 uploadOptions: _uploadOptions, |
| 2672 uploadMedia: _uploadMedia, |
| 2673 downloadOptions: _downloadOptions); |
| 2674 return _response.then((data) => new ProductPurchase.fromJson(data)); |
| 2675 } |
| 2676 |
| 2677 } |
| 2678 |
| 2679 |
| 2680 /** Not documented yet. */ |
| 2681 class PurchasesSubscriptionsResourceApi { |
| 2682 final common_internal.ApiRequester _requester; |
| 2683 |
| 2684 PurchasesSubscriptionsResourceApi(common_internal.ApiRequester client) : |
| 2685 _requester = client; |
| 2686 |
| 2687 /** |
| 2688 * Cancels a user's subscription purchase. The subscription remains valid |
| 2689 * until its expiration time. |
| 2690 * |
| 2691 * Request parameters: |
| 2692 * |
| 2693 * [packageName] - The package name of the application for which this |
| 2694 * subscription was purchased (for example, 'com.some.thing'). |
| 2695 * |
| 2696 * [subscriptionId] - The purchased subscription ID (for example, |
| 2697 * 'monthly001'). |
| 2698 * |
| 2699 * [token] - The token provided to the user's device when the subscription was |
| 2700 * purchased. |
| 2701 * |
| 2702 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2703 * error. |
| 2704 * |
| 2705 * If the used [http.Client] completes with an error when making a REST call, |
| 2706 * this method will complete with the same error. |
| 2707 */ |
| 2708 async.Future cancel(core.String packageName, core.String subscriptionId, core.
String token) { |
| 2709 var _url = null; |
| 2710 var _queryParams = new core.Map(); |
| 2711 var _uploadMedia = null; |
| 2712 var _uploadOptions = null; |
| 2713 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2714 var _body = null; |
| 2715 |
| 2716 if (packageName == null) { |
| 2717 throw new core.ArgumentError("Parameter packageName is required."); |
| 2718 } |
| 2719 if (subscriptionId == null) { |
| 2720 throw new core.ArgumentError("Parameter subscriptionId is required."); |
| 2721 } |
| 2722 if (token == null) { |
| 2723 throw new core.ArgumentError("Parameter token is required."); |
| 2724 } |
| 2725 |
| 2726 _downloadOptions = null; |
| 2727 |
| 2728 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/purchases/s
ubscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/to
kens/' + common_internal.Escaper.ecapeVariable('$token') + ':cancel'; |
| 2729 |
| 2730 var _response = _requester.request(_url, |
| 2731 "POST", |
| 2732 body: _body, |
| 2733 queryParams: _queryParams, |
| 2734 uploadOptions: _uploadOptions, |
| 2735 uploadMedia: _uploadMedia, |
| 2736 downloadOptions: _downloadOptions); |
| 2737 return _response.then((data) => null); |
| 2738 } |
| 2739 |
| 2740 /** |
| 2741 * Checks whether a user's subscription purchase is valid and returns its |
| 2742 * expiry time. |
| 2743 * |
| 2744 * Request parameters: |
| 2745 * |
| 2746 * [packageName] - The package name of the application for which this |
| 2747 * subscription was purchased (for example, 'com.some.thing'). |
| 2748 * |
| 2749 * [subscriptionId] - The purchased subscription ID (for example, |
| 2750 * 'monthly001'). |
| 2751 * |
| 2752 * [token] - The token provided to the user's device when the subscription was |
| 2753 * purchased. |
| 2754 * |
| 2755 * Completes with a [SubscriptionPurchase]. |
| 2756 * |
| 2757 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2758 * error. |
| 2759 * |
| 2760 * If the used [http.Client] completes with an error when making a REST call, |
| 2761 * this method will complete with the same error. |
| 2762 */ |
| 2763 async.Future<SubscriptionPurchase> get(core.String packageName, core.String su
bscriptionId, core.String token) { |
| 2764 var _url = null; |
| 2765 var _queryParams = new core.Map(); |
| 2766 var _uploadMedia = null; |
| 2767 var _uploadOptions = null; |
| 2768 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2769 var _body = null; |
| 2770 |
| 2771 if (packageName == null) { |
| 2772 throw new core.ArgumentError("Parameter packageName is required."); |
| 2773 } |
| 2774 if (subscriptionId == null) { |
| 2775 throw new core.ArgumentError("Parameter subscriptionId is required."); |
| 2776 } |
| 2777 if (token == null) { |
| 2778 throw new core.ArgumentError("Parameter token is required."); |
| 2779 } |
| 2780 |
| 2781 |
| 2782 _url = common_internal.Escaper.ecapeVariable('$packageName') + '/purchases/s
ubscriptions/' + common_internal.Escaper.ecapeVariable('$subscriptionId') + '/to
kens/' + common_internal.Escaper.ecapeVariable('$token'); |
| 2783 |
| 2784 var _response = _requester.request(_url, |
| 2785 "GET", |
| 2786 body: _body, |
| 2787 queryParams: _queryParams, |
| 2788 uploadOptions: _uploadOptions, |
| 2789 uploadMedia: _uploadMedia, |
| 2790 downloadOptions: _downloadOptions); |
| 2791 return _response.then((data) => new SubscriptionPurchase.fromJson(data)); |
| 2792 } |
| 2793 |
| 2794 } |
| 2795 |
| 2796 |
| 2797 |
| 2798 /** Not documented yet. */ |
| 2799 class Apk { |
| 2800 /** Information about the binary payload of this APK. */ |
| 2801 ApkBinary binary; |
| 2802 |
| 2803 /** The version code of the APK, as specified in the APK's manifest file. */ |
| 2804 core.int versionCode; |
| 2805 |
| 2806 |
| 2807 Apk(); |
| 2808 |
| 2809 Apk.fromJson(core.Map _json) { |
| 2810 if (_json.containsKey("binary")) { |
| 2811 binary = new ApkBinary.fromJson(_json["binary"]); |
| 2812 } |
| 2813 if (_json.containsKey("versionCode")) { |
| 2814 versionCode = _json["versionCode"]; |
| 2815 } |
| 2816 } |
| 2817 |
| 2818 core.Map toJson() { |
| 2819 var _json = new core.Map(); |
| 2820 if (binary != null) { |
| 2821 _json["binary"] = (binary).toJson(); |
| 2822 } |
| 2823 if (versionCode != null) { |
| 2824 _json["versionCode"] = versionCode; |
| 2825 } |
| 2826 return _json; |
| 2827 } |
| 2828 } |
| 2829 |
| 2830 |
| 2831 /** Represents the binary payload of an APK. */ |
| 2832 class ApkBinary { |
| 2833 /** |
| 2834 * A sha1 hash of the APK payload, encoded as a hex string and matching the |
| 2835 * output of the sha1sum command. |
| 2836 */ |
| 2837 core.String sha1; |
| 2838 |
| 2839 |
| 2840 ApkBinary(); |
| 2841 |
| 2842 ApkBinary.fromJson(core.Map _json) { |
| 2843 if (_json.containsKey("sha1")) { |
| 2844 sha1 = _json["sha1"]; |
| 2845 } |
| 2846 } |
| 2847 |
| 2848 core.Map toJson() { |
| 2849 var _json = new core.Map(); |
| 2850 if (sha1 != null) { |
| 2851 _json["sha1"] = sha1; |
| 2852 } |
| 2853 return _json; |
| 2854 } |
| 2855 } |
| 2856 |
| 2857 |
| 2858 /** Not documented yet. */ |
| 2859 class ApkListing { |
| 2860 /** The language code, in BCP 47 format (eg "en-US"). */ |
| 2861 core.String language; |
| 2862 |
| 2863 /** Describe what's new in your APK. */ |
| 2864 core.String recentChanges; |
| 2865 |
| 2866 |
| 2867 ApkListing(); |
| 2868 |
| 2869 ApkListing.fromJson(core.Map _json) { |
| 2870 if (_json.containsKey("language")) { |
| 2871 language = _json["language"]; |
| 2872 } |
| 2873 if (_json.containsKey("recentChanges")) { |
| 2874 recentChanges = _json["recentChanges"]; |
| 2875 } |
| 2876 } |
| 2877 |
| 2878 core.Map toJson() { |
| 2879 var _json = new core.Map(); |
| 2880 if (language != null) { |
| 2881 _json["language"] = language; |
| 2882 } |
| 2883 if (recentChanges != null) { |
| 2884 _json["recentChanges"] = recentChanges; |
| 2885 } |
| 2886 return _json; |
| 2887 } |
| 2888 } |
| 2889 |
| 2890 |
| 2891 /** Not documented yet. */ |
| 2892 class ApkListingsListResponse { |
| 2893 /** |
| 2894 * Identifies what kind of resource this is. Value: the fixed string |
| 2895 * "androidpublisher#apkListingsListResponse". |
| 2896 */ |
| 2897 core.String kind; |
| 2898 |
| 2899 /** Not documented yet. */ |
| 2900 core.List<ApkListing> listings; |
| 2901 |
| 2902 |
| 2903 ApkListingsListResponse(); |
| 2904 |
| 2905 ApkListingsListResponse.fromJson(core.Map _json) { |
| 2906 if (_json.containsKey("kind")) { |
| 2907 kind = _json["kind"]; |
| 2908 } |
| 2909 if (_json.containsKey("listings")) { |
| 2910 listings = _json["listings"].map((value) => new ApkListing.fromJson(value)
).toList(); |
| 2911 } |
| 2912 } |
| 2913 |
| 2914 core.Map toJson() { |
| 2915 var _json = new core.Map(); |
| 2916 if (kind != null) { |
| 2917 _json["kind"] = kind; |
| 2918 } |
| 2919 if (listings != null) { |
| 2920 _json["listings"] = listings.map((value) => (value).toJson()).toList(); |
| 2921 } |
| 2922 return _json; |
| 2923 } |
| 2924 } |
| 2925 |
| 2926 |
| 2927 /** Not documented yet. */ |
| 2928 class ApksListResponse { |
| 2929 /** Not documented yet. */ |
| 2930 core.List<Apk> apks; |
| 2931 |
| 2932 /** |
| 2933 * Identifies what kind of resource this is. Value: the fixed string |
| 2934 * "androidpublisher#apksListResponse". |
| 2935 */ |
| 2936 core.String kind; |
| 2937 |
| 2938 |
| 2939 ApksListResponse(); |
| 2940 |
| 2941 ApksListResponse.fromJson(core.Map _json) { |
| 2942 if (_json.containsKey("apks")) { |
| 2943 apks = _json["apks"].map((value) => new Apk.fromJson(value)).toList(); |
| 2944 } |
| 2945 if (_json.containsKey("kind")) { |
| 2946 kind = _json["kind"]; |
| 2947 } |
| 2948 } |
| 2949 |
| 2950 core.Map toJson() { |
| 2951 var _json = new core.Map(); |
| 2952 if (apks != null) { |
| 2953 _json["apks"] = apks.map((value) => (value).toJson()).toList(); |
| 2954 } |
| 2955 if (kind != null) { |
| 2956 _json["kind"] = kind; |
| 2957 } |
| 2958 return _json; |
| 2959 } |
| 2960 } |
| 2961 |
| 2962 |
| 2963 /** Not documented yet. */ |
| 2964 class AppDetails { |
| 2965 /** The user-visible support email for this app. */ |
| 2966 core.String contactEmail; |
| 2967 |
| 2968 /** The user-visible support telephone number for this app. */ |
| 2969 core.String contactPhone; |
| 2970 |
| 2971 /** The user-visible website for this app. */ |
| 2972 core.String contactWebsite; |
| 2973 |
| 2974 /** Default language code, in BCP 47 format (eg "en-US"). */ |
| 2975 core.String defaultLanguage; |
| 2976 |
| 2977 |
| 2978 AppDetails(); |
| 2979 |
| 2980 AppDetails.fromJson(core.Map _json) { |
| 2981 if (_json.containsKey("contactEmail")) { |
| 2982 contactEmail = _json["contactEmail"]; |
| 2983 } |
| 2984 if (_json.containsKey("contactPhone")) { |
| 2985 contactPhone = _json["contactPhone"]; |
| 2986 } |
| 2987 if (_json.containsKey("contactWebsite")) { |
| 2988 contactWebsite = _json["contactWebsite"]; |
| 2989 } |
| 2990 if (_json.containsKey("defaultLanguage")) { |
| 2991 defaultLanguage = _json["defaultLanguage"]; |
| 2992 } |
| 2993 } |
| 2994 |
| 2995 core.Map toJson() { |
| 2996 var _json = new core.Map(); |
| 2997 if (contactEmail != null) { |
| 2998 _json["contactEmail"] = contactEmail; |
| 2999 } |
| 3000 if (contactPhone != null) { |
| 3001 _json["contactPhone"] = contactPhone; |
| 3002 } |
| 3003 if (contactWebsite != null) { |
| 3004 _json["contactWebsite"] = contactWebsite; |
| 3005 } |
| 3006 if (defaultLanguage != null) { |
| 3007 _json["defaultLanguage"] = defaultLanguage; |
| 3008 } |
| 3009 return _json; |
| 3010 } |
| 3011 } |
| 3012 |
| 3013 |
| 3014 /** |
| 3015 * Represents an edit of an app. An edit allows clients to make multiple changes |
| 3016 * before committing them in one operation. |
| 3017 */ |
| 3018 class AppEdit { |
| 3019 /** |
| 3020 * The time at which the edit will expire and will be no longer valid for use |
| 3021 * in any subsequent API calls (encoded as seconds since the Epoch). |
| 3022 */ |
| 3023 core.String expiryTimeSeconds; |
| 3024 |
| 3025 /** The ID of the edit that can be used in subsequent API calls. */ |
| 3026 core.String id; |
| 3027 |
| 3028 |
| 3029 AppEdit(); |
| 3030 |
| 3031 AppEdit.fromJson(core.Map _json) { |
| 3032 if (_json.containsKey("expiryTimeSeconds")) { |
| 3033 expiryTimeSeconds = _json["expiryTimeSeconds"]; |
| 3034 } |
| 3035 if (_json.containsKey("id")) { |
| 3036 id = _json["id"]; |
| 3037 } |
| 3038 } |
| 3039 |
| 3040 core.Map toJson() { |
| 3041 var _json = new core.Map(); |
| 3042 if (expiryTimeSeconds != null) { |
| 3043 _json["expiryTimeSeconds"] = expiryTimeSeconds; |
| 3044 } |
| 3045 if (id != null) { |
| 3046 _json["id"] = id; |
| 3047 } |
| 3048 return _json; |
| 3049 } |
| 3050 } |
| 3051 |
| 3052 |
| 3053 /** Not documented yet. */ |
| 3054 class ExpansionFile { |
| 3055 /** |
| 3056 * If set this field indicates that this APK has an Expansion File uploaded to |
| 3057 * it: this APK does not reference another APK's Expansion File. The field's |
| 3058 * value is the size of the uploaded Expansion File in bytes. |
| 3059 */ |
| 3060 core.String fileSize; |
| 3061 |
| 3062 /** |
| 3063 * If set this APK's Expansion File references another APK's Expansion File. |
| 3064 * The file_size field will not be set. |
| 3065 */ |
| 3066 core.int referencesVersion; |
| 3067 |
| 3068 |
| 3069 ExpansionFile(); |
| 3070 |
| 3071 ExpansionFile.fromJson(core.Map _json) { |
| 3072 if (_json.containsKey("fileSize")) { |
| 3073 fileSize = _json["fileSize"]; |
| 3074 } |
| 3075 if (_json.containsKey("referencesVersion")) { |
| 3076 referencesVersion = _json["referencesVersion"]; |
| 3077 } |
| 3078 } |
| 3079 |
| 3080 core.Map toJson() { |
| 3081 var _json = new core.Map(); |
| 3082 if (fileSize != null) { |
| 3083 _json["fileSize"] = fileSize; |
| 3084 } |
| 3085 if (referencesVersion != null) { |
| 3086 _json["referencesVersion"] = referencesVersion; |
| 3087 } |
| 3088 return _json; |
| 3089 } |
| 3090 } |
| 3091 |
| 3092 |
| 3093 /** Not documented yet. */ |
| 3094 class ExpansionFilesUploadResponse { |
| 3095 /** Not documented yet. */ |
| 3096 ExpansionFile expansionFile; |
| 3097 |
| 3098 |
| 3099 ExpansionFilesUploadResponse(); |
| 3100 |
| 3101 ExpansionFilesUploadResponse.fromJson(core.Map _json) { |
| 3102 if (_json.containsKey("expansionFile")) { |
| 3103 expansionFile = new ExpansionFile.fromJson(_json["expansionFile"]); |
| 3104 } |
| 3105 } |
| 3106 |
| 3107 core.Map toJson() { |
| 3108 var _json = new core.Map(); |
| 3109 if (expansionFile != null) { |
| 3110 _json["expansionFile"] = (expansionFile).toJson(); |
| 3111 } |
| 3112 return _json; |
| 3113 } |
| 3114 } |
| 3115 |
| 3116 |
| 3117 /** Not documented yet. */ |
| 3118 class Image { |
| 3119 /** A unique id representing this image. */ |
| 3120 core.String id; |
| 3121 |
| 3122 /** A sha1 hash of the image that was uploaded. */ |
| 3123 core.String sha1; |
| 3124 |
| 3125 /** A URL that will serve a preview of the image. */ |
| 3126 core.String url; |
| 3127 |
| 3128 |
| 3129 Image(); |
| 3130 |
| 3131 Image.fromJson(core.Map _json) { |
| 3132 if (_json.containsKey("id")) { |
| 3133 id = _json["id"]; |
| 3134 } |
| 3135 if (_json.containsKey("sha1")) { |
| 3136 sha1 = _json["sha1"]; |
| 3137 } |
| 3138 if (_json.containsKey("url")) { |
| 3139 url = _json["url"]; |
| 3140 } |
| 3141 } |
| 3142 |
| 3143 core.Map toJson() { |
| 3144 var _json = new core.Map(); |
| 3145 if (id != null) { |
| 3146 _json["id"] = id; |
| 3147 } |
| 3148 if (sha1 != null) { |
| 3149 _json["sha1"] = sha1; |
| 3150 } |
| 3151 if (url != null) { |
| 3152 _json["url"] = url; |
| 3153 } |
| 3154 return _json; |
| 3155 } |
| 3156 } |
| 3157 |
| 3158 |
| 3159 /** Not documented yet. */ |
| 3160 class ImagesDeleteAllResponse { |
| 3161 /** Not documented yet. */ |
| 3162 core.List<Image> deleted; |
| 3163 |
| 3164 |
| 3165 ImagesDeleteAllResponse(); |
| 3166 |
| 3167 ImagesDeleteAllResponse.fromJson(core.Map _json) { |
| 3168 if (_json.containsKey("deleted")) { |
| 3169 deleted = _json["deleted"].map((value) => new Image.fromJson(value)).toLis
t(); |
| 3170 } |
| 3171 } |
| 3172 |
| 3173 core.Map toJson() { |
| 3174 var _json = new core.Map(); |
| 3175 if (deleted != null) { |
| 3176 _json["deleted"] = deleted.map((value) => (value).toJson()).toList(); |
| 3177 } |
| 3178 return _json; |
| 3179 } |
| 3180 } |
| 3181 |
| 3182 |
| 3183 /** Not documented yet. */ |
| 3184 class ImagesListResponse { |
| 3185 /** Not documented yet. */ |
| 3186 core.List<Image> images; |
| 3187 |
| 3188 |
| 3189 ImagesListResponse(); |
| 3190 |
| 3191 ImagesListResponse.fromJson(core.Map _json) { |
| 3192 if (_json.containsKey("images")) { |
| 3193 images = _json["images"].map((value) => new Image.fromJson(value)).toList(
); |
| 3194 } |
| 3195 } |
| 3196 |
| 3197 core.Map toJson() { |
| 3198 var _json = new core.Map(); |
| 3199 if (images != null) { |
| 3200 _json["images"] = images.map((value) => (value).toJson()).toList(); |
| 3201 } |
| 3202 return _json; |
| 3203 } |
| 3204 } |
| 3205 |
| 3206 |
| 3207 /** Not documented yet. */ |
| 3208 class ImagesUploadResponse { |
| 3209 /** Not documented yet. */ |
| 3210 Image image; |
| 3211 |
| 3212 |
| 3213 ImagesUploadResponse(); |
| 3214 |
| 3215 ImagesUploadResponse.fromJson(core.Map _json) { |
| 3216 if (_json.containsKey("image")) { |
| 3217 image = new Image.fromJson(_json["image"]); |
| 3218 } |
| 3219 } |
| 3220 |
| 3221 core.Map toJson() { |
| 3222 var _json = new core.Map(); |
| 3223 if (image != null) { |
| 3224 _json["image"] = (image).toJson(); |
| 3225 } |
| 3226 return _json; |
| 3227 } |
| 3228 } |
| 3229 |
| 3230 |
| 3231 /** Not documented yet. */ |
| 3232 class InAppProduct { |
| 3233 /** |
| 3234 * The default language of the localized data, as defined by BCP 47. e.g. |
| 3235 * "en-US", "en-GB". |
| 3236 */ |
| 3237 core.String defaultLanguage; |
| 3238 |
| 3239 /** |
| 3240 * Default price cannot be zero. In-app products can never be free. Default |
| 3241 * price is always in the developer's Checkout merchant currency. |
| 3242 */ |
| 3243 Price defaultPrice; |
| 3244 |
| 3245 /** List of localized title and description data. */ |
| 3246 core.Map<core.String, InAppProductListing> listings; |
| 3247 |
| 3248 /** The package name of the parent app. */ |
| 3249 core.String packageName; |
| 3250 |
| 3251 /** |
| 3252 * Prices per buyer region. None of these prices should be zero. In-app |
| 3253 * products can never be free. |
| 3254 */ |
| 3255 core.Map<core.String, Price> prices; |
| 3256 |
| 3257 /** Purchase type enum value. Unmodifiable after creation. */ |
| 3258 core.String purchaseType; |
| 3259 |
| 3260 /** The stock-keeping-unit (SKU) of the product, unique within an app. */ |
| 3261 core.String sku; |
| 3262 |
| 3263 /** Not documented yet. */ |
| 3264 core.String status; |
| 3265 |
| 3266 /** |
| 3267 * The period of the subscription (if any), i.e. period at which payments must |
| 3268 * happen. Defined as ISO 8601 duration, i.e. "P1M" for 1 month period. |
| 3269 */ |
| 3270 core.String subscriptionPeriod; |
| 3271 |
| 3272 /** |
| 3273 * Trial duration (if any) of the subscription, defined as ISO 8601. i.e. |
| 3274 * "P10D" means an initial period of 10 days during which ownership is granted |
| 3275 * prior to any payment. Acceptable values are between "P7D" and "P999D". |
| 3276 * Seasonal subscriptions cannot have a trial period. |
| 3277 */ |
| 3278 core.String trialPeriod; |
| 3279 |
| 3280 |
| 3281 InAppProduct(); |
| 3282 |
| 3283 InAppProduct.fromJson(core.Map _json) { |
| 3284 if (_json.containsKey("defaultLanguage")) { |
| 3285 defaultLanguage = _json["defaultLanguage"]; |
| 3286 } |
| 3287 if (_json.containsKey("defaultPrice")) { |
| 3288 defaultPrice = new Price.fromJson(_json["defaultPrice"]); |
| 3289 } |
| 3290 if (_json.containsKey("listings")) { |
| 3291 listings = common_internal.mapMap(_json["listings"], (item) => new InAppPr
oductListing.fromJson(item)); |
| 3292 } |
| 3293 if (_json.containsKey("packageName")) { |
| 3294 packageName = _json["packageName"]; |
| 3295 } |
| 3296 if (_json.containsKey("prices")) { |
| 3297 prices = common_internal.mapMap(_json["prices"], (item) => new Price.fromJ
son(item)); |
| 3298 } |
| 3299 if (_json.containsKey("purchaseType")) { |
| 3300 purchaseType = _json["purchaseType"]; |
| 3301 } |
| 3302 if (_json.containsKey("sku")) { |
| 3303 sku = _json["sku"]; |
| 3304 } |
| 3305 if (_json.containsKey("status")) { |
| 3306 status = _json["status"]; |
| 3307 } |
| 3308 if (_json.containsKey("subscriptionPeriod")) { |
| 3309 subscriptionPeriod = _json["subscriptionPeriod"]; |
| 3310 } |
| 3311 if (_json.containsKey("trialPeriod")) { |
| 3312 trialPeriod = _json["trialPeriod"]; |
| 3313 } |
| 3314 } |
| 3315 |
| 3316 core.Map toJson() { |
| 3317 var _json = new core.Map(); |
| 3318 if (defaultLanguage != null) { |
| 3319 _json["defaultLanguage"] = defaultLanguage; |
| 3320 } |
| 3321 if (defaultPrice != null) { |
| 3322 _json["defaultPrice"] = (defaultPrice).toJson(); |
| 3323 } |
| 3324 if (listings != null) { |
| 3325 _json["listings"] = common_internal.mapMap(listings, (item) => (item).toJs
on()); |
| 3326 } |
| 3327 if (packageName != null) { |
| 3328 _json["packageName"] = packageName; |
| 3329 } |
| 3330 if (prices != null) { |
| 3331 _json["prices"] = common_internal.mapMap(prices, (item) => (item).toJson()
); |
| 3332 } |
| 3333 if (purchaseType != null) { |
| 3334 _json["purchaseType"] = purchaseType; |
| 3335 } |
| 3336 if (sku != null) { |
| 3337 _json["sku"] = sku; |
| 3338 } |
| 3339 if (status != null) { |
| 3340 _json["status"] = status; |
| 3341 } |
| 3342 if (subscriptionPeriod != null) { |
| 3343 _json["subscriptionPeriod"] = subscriptionPeriod; |
| 3344 } |
| 3345 if (trialPeriod != null) { |
| 3346 _json["trialPeriod"] = trialPeriod; |
| 3347 } |
| 3348 return _json; |
| 3349 } |
| 3350 } |
| 3351 |
| 3352 |
| 3353 /** Not documented yet. */ |
| 3354 class InAppProductListing { |
| 3355 /** Not documented yet. */ |
| 3356 core.String description; |
| 3357 |
| 3358 /** Not documented yet. */ |
| 3359 core.String title; |
| 3360 |
| 3361 |
| 3362 InAppProductListing(); |
| 3363 |
| 3364 InAppProductListing.fromJson(core.Map _json) { |
| 3365 if (_json.containsKey("description")) { |
| 3366 description = _json["description"]; |
| 3367 } |
| 3368 if (_json.containsKey("title")) { |
| 3369 title = _json["title"]; |
| 3370 } |
| 3371 } |
| 3372 |
| 3373 core.Map toJson() { |
| 3374 var _json = new core.Map(); |
| 3375 if (description != null) { |
| 3376 _json["description"] = description; |
| 3377 } |
| 3378 if (title != null) { |
| 3379 _json["title"] = title; |
| 3380 } |
| 3381 return _json; |
| 3382 } |
| 3383 } |
| 3384 |
| 3385 |
| 3386 /** Not documented yet. */ |
| 3387 class InappproductsBatchRequest { |
| 3388 /** Not documented yet. */ |
| 3389 core.List<InappproductsBatchRequestEntry> entrys; |
| 3390 |
| 3391 |
| 3392 InappproductsBatchRequest(); |
| 3393 |
| 3394 InappproductsBatchRequest.fromJson(core.Map _json) { |
| 3395 if (_json.containsKey("entrys")) { |
| 3396 entrys = _json["entrys"].map((value) => new InappproductsBatchRequestEntry
.fromJson(value)).toList(); |
| 3397 } |
| 3398 } |
| 3399 |
| 3400 core.Map toJson() { |
| 3401 var _json = new core.Map(); |
| 3402 if (entrys != null) { |
| 3403 _json["entrys"] = entrys.map((value) => (value).toJson()).toList(); |
| 3404 } |
| 3405 return _json; |
| 3406 } |
| 3407 } |
| 3408 |
| 3409 |
| 3410 /** Not documented yet. */ |
| 3411 class InappproductsBatchRequestEntry { |
| 3412 /** Not documented yet. */ |
| 3413 core.int batchId; |
| 3414 |
| 3415 /** Not documented yet. */ |
| 3416 InappproductsInsertRequest inappproductsinsertrequest; |
| 3417 |
| 3418 /** Not documented yet. */ |
| 3419 InappproductsUpdateRequest inappproductsupdaterequest; |
| 3420 |
| 3421 /** Not documented yet. */ |
| 3422 core.String methodName; |
| 3423 |
| 3424 |
| 3425 InappproductsBatchRequestEntry(); |
| 3426 |
| 3427 InappproductsBatchRequestEntry.fromJson(core.Map _json) { |
| 3428 if (_json.containsKey("batchId")) { |
| 3429 batchId = _json["batchId"]; |
| 3430 } |
| 3431 if (_json.containsKey("inappproductsinsertrequest")) { |
| 3432 inappproductsinsertrequest = new InappproductsInsertRequest.fromJson(_json
["inappproductsinsertrequest"]); |
| 3433 } |
| 3434 if (_json.containsKey("inappproductsupdaterequest")) { |
| 3435 inappproductsupdaterequest = new InappproductsUpdateRequest.fromJson(_json
["inappproductsupdaterequest"]); |
| 3436 } |
| 3437 if (_json.containsKey("methodName")) { |
| 3438 methodName = _json["methodName"]; |
| 3439 } |
| 3440 } |
| 3441 |
| 3442 core.Map toJson() { |
| 3443 var _json = new core.Map(); |
| 3444 if (batchId != null) { |
| 3445 _json["batchId"] = batchId; |
| 3446 } |
| 3447 if (inappproductsinsertrequest != null) { |
| 3448 _json["inappproductsinsertrequest"] = (inappproductsinsertrequest).toJson(
); |
| 3449 } |
| 3450 if (inappproductsupdaterequest != null) { |
| 3451 _json["inappproductsupdaterequest"] = (inappproductsupdaterequest).toJson(
); |
| 3452 } |
| 3453 if (methodName != null) { |
| 3454 _json["methodName"] = methodName; |
| 3455 } |
| 3456 return _json; |
| 3457 } |
| 3458 } |
| 3459 |
| 3460 |
| 3461 /** Not documented yet. */ |
| 3462 class InappproductsBatchResponse { |
| 3463 /** Not documented yet. */ |
| 3464 core.List<InappproductsBatchResponseEntry> entrys; |
| 3465 |
| 3466 /** |
| 3467 * Identifies what kind of resource this is. Value: the fixed string |
| 3468 * "androidpublisher#inappproductsBatchResponse". |
| 3469 */ |
| 3470 core.String kind; |
| 3471 |
| 3472 |
| 3473 InappproductsBatchResponse(); |
| 3474 |
| 3475 InappproductsBatchResponse.fromJson(core.Map _json) { |
| 3476 if (_json.containsKey("entrys")) { |
| 3477 entrys = _json["entrys"].map((value) => new InappproductsBatchResponseEntr
y.fromJson(value)).toList(); |
| 3478 } |
| 3479 if (_json.containsKey("kind")) { |
| 3480 kind = _json["kind"]; |
| 3481 } |
| 3482 } |
| 3483 |
| 3484 core.Map toJson() { |
| 3485 var _json = new core.Map(); |
| 3486 if (entrys != null) { |
| 3487 _json["entrys"] = entrys.map((value) => (value).toJson()).toList(); |
| 3488 } |
| 3489 if (kind != null) { |
| 3490 _json["kind"] = kind; |
| 3491 } |
| 3492 return _json; |
| 3493 } |
| 3494 } |
| 3495 |
| 3496 |
| 3497 /** Not documented yet. */ |
| 3498 class InappproductsBatchResponseEntry { |
| 3499 /** Not documented yet. */ |
| 3500 core.int batchId; |
| 3501 |
| 3502 /** Not documented yet. */ |
| 3503 InappproductsInsertResponse inappproductsinsertresponse; |
| 3504 |
| 3505 /** Not documented yet. */ |
| 3506 InappproductsUpdateResponse inappproductsupdateresponse; |
| 3507 |
| 3508 |
| 3509 InappproductsBatchResponseEntry(); |
| 3510 |
| 3511 InappproductsBatchResponseEntry.fromJson(core.Map _json) { |
| 3512 if (_json.containsKey("batchId")) { |
| 3513 batchId = _json["batchId"]; |
| 3514 } |
| 3515 if (_json.containsKey("inappproductsinsertresponse")) { |
| 3516 inappproductsinsertresponse = new InappproductsInsertResponse.fromJson(_js
on["inappproductsinsertresponse"]); |
| 3517 } |
| 3518 if (_json.containsKey("inappproductsupdateresponse")) { |
| 3519 inappproductsupdateresponse = new InappproductsUpdateResponse.fromJson(_js
on["inappproductsupdateresponse"]); |
| 3520 } |
| 3521 } |
| 3522 |
| 3523 core.Map toJson() { |
| 3524 var _json = new core.Map(); |
| 3525 if (batchId != null) { |
| 3526 _json["batchId"] = batchId; |
| 3527 } |
| 3528 if (inappproductsinsertresponse != null) { |
| 3529 _json["inappproductsinsertresponse"] = (inappproductsinsertresponse).toJso
n(); |
| 3530 } |
| 3531 if (inappproductsupdateresponse != null) { |
| 3532 _json["inappproductsupdateresponse"] = (inappproductsupdateresponse).toJso
n(); |
| 3533 } |
| 3534 return _json; |
| 3535 } |
| 3536 } |
| 3537 |
| 3538 |
| 3539 /** Not documented yet. */ |
| 3540 class InappproductsInsertRequest { |
| 3541 /** Not documented yet. */ |
| 3542 InAppProduct inappproduct; |
| 3543 |
| 3544 |
| 3545 InappproductsInsertRequest(); |
| 3546 |
| 3547 InappproductsInsertRequest.fromJson(core.Map _json) { |
| 3548 if (_json.containsKey("inappproduct")) { |
| 3549 inappproduct = new InAppProduct.fromJson(_json["inappproduct"]); |
| 3550 } |
| 3551 } |
| 3552 |
| 3553 core.Map toJson() { |
| 3554 var _json = new core.Map(); |
| 3555 if (inappproduct != null) { |
| 3556 _json["inappproduct"] = (inappproduct).toJson(); |
| 3557 } |
| 3558 return _json; |
| 3559 } |
| 3560 } |
| 3561 |
| 3562 |
| 3563 /** Not documented yet. */ |
| 3564 class InappproductsInsertResponse { |
| 3565 /** Not documented yet. */ |
| 3566 InAppProduct inappproduct; |
| 3567 |
| 3568 |
| 3569 InappproductsInsertResponse(); |
| 3570 |
| 3571 InappproductsInsertResponse.fromJson(core.Map _json) { |
| 3572 if (_json.containsKey("inappproduct")) { |
| 3573 inappproduct = new InAppProduct.fromJson(_json["inappproduct"]); |
| 3574 } |
| 3575 } |
| 3576 |
| 3577 core.Map toJson() { |
| 3578 var _json = new core.Map(); |
| 3579 if (inappproduct != null) { |
| 3580 _json["inappproduct"] = (inappproduct).toJson(); |
| 3581 } |
| 3582 return _json; |
| 3583 } |
| 3584 } |
| 3585 |
| 3586 |
| 3587 /** Not documented yet. */ |
| 3588 class InappproductsListResponse { |
| 3589 /** Not documented yet. */ |
| 3590 core.List<InAppProduct> inappproduct; |
| 3591 |
| 3592 /** |
| 3593 * Identifies what kind of resource this is. Value: the fixed string |
| 3594 * "androidpublisher#inappproductsListResponse". |
| 3595 */ |
| 3596 core.String kind; |
| 3597 |
| 3598 /** Not documented yet. */ |
| 3599 PageInfo pageInfo; |
| 3600 |
| 3601 /** Not documented yet. */ |
| 3602 TokenPagination tokenPagination; |
| 3603 |
| 3604 |
| 3605 InappproductsListResponse(); |
| 3606 |
| 3607 InappproductsListResponse.fromJson(core.Map _json) { |
| 3608 if (_json.containsKey("inappproduct")) { |
| 3609 inappproduct = _json["inappproduct"].map((value) => new InAppProduct.fromJ
son(value)).toList(); |
| 3610 } |
| 3611 if (_json.containsKey("kind")) { |
| 3612 kind = _json["kind"]; |
| 3613 } |
| 3614 if (_json.containsKey("pageInfo")) { |
| 3615 pageInfo = new PageInfo.fromJson(_json["pageInfo"]); |
| 3616 } |
| 3617 if (_json.containsKey("tokenPagination")) { |
| 3618 tokenPagination = new TokenPagination.fromJson(_json["tokenPagination"]); |
| 3619 } |
| 3620 } |
| 3621 |
| 3622 core.Map toJson() { |
| 3623 var _json = new core.Map(); |
| 3624 if (inappproduct != null) { |
| 3625 _json["inappproduct"] = inappproduct.map((value) => (value).toJson()).toLi
st(); |
| 3626 } |
| 3627 if (kind != null) { |
| 3628 _json["kind"] = kind; |
| 3629 } |
| 3630 if (pageInfo != null) { |
| 3631 _json["pageInfo"] = (pageInfo).toJson(); |
| 3632 } |
| 3633 if (tokenPagination != null) { |
| 3634 _json["tokenPagination"] = (tokenPagination).toJson(); |
| 3635 } |
| 3636 return _json; |
| 3637 } |
| 3638 } |
| 3639 |
| 3640 |
| 3641 /** Not documented yet. */ |
| 3642 class InappproductsUpdateRequest { |
| 3643 /** Not documented yet. */ |
| 3644 InAppProduct inappproduct; |
| 3645 |
| 3646 |
| 3647 InappproductsUpdateRequest(); |
| 3648 |
| 3649 InappproductsUpdateRequest.fromJson(core.Map _json) { |
| 3650 if (_json.containsKey("inappproduct")) { |
| 3651 inappproduct = new InAppProduct.fromJson(_json["inappproduct"]); |
| 3652 } |
| 3653 } |
| 3654 |
| 3655 core.Map toJson() { |
| 3656 var _json = new core.Map(); |
| 3657 if (inappproduct != null) { |
| 3658 _json["inappproduct"] = (inappproduct).toJson(); |
| 3659 } |
| 3660 return _json; |
| 3661 } |
| 3662 } |
| 3663 |
| 3664 |
| 3665 /** Not documented yet. */ |
| 3666 class InappproductsUpdateResponse { |
| 3667 /** Not documented yet. */ |
| 3668 InAppProduct inappproduct; |
| 3669 |
| 3670 |
| 3671 InappproductsUpdateResponse(); |
| 3672 |
| 3673 InappproductsUpdateResponse.fromJson(core.Map _json) { |
| 3674 if (_json.containsKey("inappproduct")) { |
| 3675 inappproduct = new InAppProduct.fromJson(_json["inappproduct"]); |
| 3676 } |
| 3677 } |
| 3678 |
| 3679 core.Map toJson() { |
| 3680 var _json = new core.Map(); |
| 3681 if (inappproduct != null) { |
| 3682 _json["inappproduct"] = (inappproduct).toJson(); |
| 3683 } |
| 3684 return _json; |
| 3685 } |
| 3686 } |
| 3687 |
| 3688 |
| 3689 /** Not documented yet. */ |
| 3690 class Listing { |
| 3691 /** |
| 3692 * Full description of the app; this may be up to 4000 characters in length. |
| 3693 */ |
| 3694 core.String fullDescription; |
| 3695 |
| 3696 /** Language localization code (for example, "de-AT" for Austrian German). */ |
| 3697 core.String language; |
| 3698 |
| 3699 /** |
| 3700 * Short description of the app (previously known as promo text); this may be |
| 3701 * up to 80 characters in length. |
| 3702 */ |
| 3703 core.String shortDescription; |
| 3704 |
| 3705 /** App's localized title. */ |
| 3706 core.String title; |
| 3707 |
| 3708 /** URL of a promotional YouTube video for the app. */ |
| 3709 core.String video; |
| 3710 |
| 3711 |
| 3712 Listing(); |
| 3713 |
| 3714 Listing.fromJson(core.Map _json) { |
| 3715 if (_json.containsKey("fullDescription")) { |
| 3716 fullDescription = _json["fullDescription"]; |
| 3717 } |
| 3718 if (_json.containsKey("language")) { |
| 3719 language = _json["language"]; |
| 3720 } |
| 3721 if (_json.containsKey("shortDescription")) { |
| 3722 shortDescription = _json["shortDescription"]; |
| 3723 } |
| 3724 if (_json.containsKey("title")) { |
| 3725 title = _json["title"]; |
| 3726 } |
| 3727 if (_json.containsKey("video")) { |
| 3728 video = _json["video"]; |
| 3729 } |
| 3730 } |
| 3731 |
| 3732 core.Map toJson() { |
| 3733 var _json = new core.Map(); |
| 3734 if (fullDescription != null) { |
| 3735 _json["fullDescription"] = fullDescription; |
| 3736 } |
| 3737 if (language != null) { |
| 3738 _json["language"] = language; |
| 3739 } |
| 3740 if (shortDescription != null) { |
| 3741 _json["shortDescription"] = shortDescription; |
| 3742 } |
| 3743 if (title != null) { |
| 3744 _json["title"] = title; |
| 3745 } |
| 3746 if (video != null) { |
| 3747 _json["video"] = video; |
| 3748 } |
| 3749 return _json; |
| 3750 } |
| 3751 } |
| 3752 |
| 3753 |
| 3754 /** Not documented yet. */ |
| 3755 class ListingsListResponse { |
| 3756 /** |
| 3757 * Identifies what kind of resource this is. Value: the fixed string |
| 3758 * "androidpublisher#listingsListResponse". |
| 3759 */ |
| 3760 core.String kind; |
| 3761 |
| 3762 /** Not documented yet. */ |
| 3763 core.List<Listing> listings; |
| 3764 |
| 3765 |
| 3766 ListingsListResponse(); |
| 3767 |
| 3768 ListingsListResponse.fromJson(core.Map _json) { |
| 3769 if (_json.containsKey("kind")) { |
| 3770 kind = _json["kind"]; |
| 3771 } |
| 3772 if (_json.containsKey("listings")) { |
| 3773 listings = _json["listings"].map((value) => new Listing.fromJson(value)).t
oList(); |
| 3774 } |
| 3775 } |
| 3776 |
| 3777 core.Map toJson() { |
| 3778 var _json = new core.Map(); |
| 3779 if (kind != null) { |
| 3780 _json["kind"] = kind; |
| 3781 } |
| 3782 if (listings != null) { |
| 3783 _json["listings"] = listings.map((value) => (value).toJson()).toList(); |
| 3784 } |
| 3785 return _json; |
| 3786 } |
| 3787 } |
| 3788 |
| 3789 |
| 3790 /** Not documented yet. */ |
| 3791 class PageInfo { |
| 3792 /** Not documented yet. */ |
| 3793 core.int resultPerPage; |
| 3794 |
| 3795 /** Not documented yet. */ |
| 3796 core.int startIndex; |
| 3797 |
| 3798 /** Not documented yet. */ |
| 3799 core.int totalResults; |
| 3800 |
| 3801 |
| 3802 PageInfo(); |
| 3803 |
| 3804 PageInfo.fromJson(core.Map _json) { |
| 3805 if (_json.containsKey("resultPerPage")) { |
| 3806 resultPerPage = _json["resultPerPage"]; |
| 3807 } |
| 3808 if (_json.containsKey("startIndex")) { |
| 3809 startIndex = _json["startIndex"]; |
| 3810 } |
| 3811 if (_json.containsKey("totalResults")) { |
| 3812 totalResults = _json["totalResults"]; |
| 3813 } |
| 3814 } |
| 3815 |
| 3816 core.Map toJson() { |
| 3817 var _json = new core.Map(); |
| 3818 if (resultPerPage != null) { |
| 3819 _json["resultPerPage"] = resultPerPage; |
| 3820 } |
| 3821 if (startIndex != null) { |
| 3822 _json["startIndex"] = startIndex; |
| 3823 } |
| 3824 if (totalResults != null) { |
| 3825 _json["totalResults"] = totalResults; |
| 3826 } |
| 3827 return _json; |
| 3828 } |
| 3829 } |
| 3830 |
| 3831 |
| 3832 /** Not documented yet. */ |
| 3833 class Price { |
| 3834 /** 3 letter Currency code, as defined by ISO 4217. */ |
| 3835 core.String currency; |
| 3836 |
| 3837 /** |
| 3838 * The price in millionths of the currency base unit represented as a string. |
| 3839 */ |
| 3840 core.String priceMicros; |
| 3841 |
| 3842 |
| 3843 Price(); |
| 3844 |
| 3845 Price.fromJson(core.Map _json) { |
| 3846 if (_json.containsKey("currency")) { |
| 3847 currency = _json["currency"]; |
| 3848 } |
| 3849 if (_json.containsKey("priceMicros")) { |
| 3850 priceMicros = _json["priceMicros"]; |
| 3851 } |
| 3852 } |
| 3853 |
| 3854 core.Map toJson() { |
| 3855 var _json = new core.Map(); |
| 3856 if (currency != null) { |
| 3857 _json["currency"] = currency; |
| 3858 } |
| 3859 if (priceMicros != null) { |
| 3860 _json["priceMicros"] = priceMicros; |
| 3861 } |
| 3862 return _json; |
| 3863 } |
| 3864 } |
| 3865 |
| 3866 |
| 3867 /** |
| 3868 * A ProductPurchase resource indicates the status of a user's inapp product |
| 3869 * purchase. |
| 3870 */ |
| 3871 class ProductPurchase { |
| 3872 /** |
| 3873 * The consumption state of the inapp product. Possible values are: |
| 3874 * - Yet to be consumed |
| 3875 * - Consumed |
| 3876 */ |
| 3877 core.int consumptionState; |
| 3878 |
| 3879 /** |
| 3880 * A developer-specified string that contains supplemental information about |
| 3881 * an order. |
| 3882 */ |
| 3883 core.String developerPayload; |
| 3884 |
| 3885 /** |
| 3886 * This kind represents an inappPurchase object in the androidpublisher |
| 3887 * service. |
| 3888 */ |
| 3889 core.String kind; |
| 3890 |
| 3891 /** |
| 3892 * The purchase state of the order. Possible values are: |
| 3893 * - Purchased |
| 3894 * - Cancelled |
| 3895 */ |
| 3896 core.int purchaseState; |
| 3897 |
| 3898 /** |
| 3899 * The time the product was purchased, in milliseconds since the epoch (Jan 1, |
| 3900 * 1970). |
| 3901 */ |
| 3902 core.String purchaseTimeMillis; |
| 3903 |
| 3904 |
| 3905 ProductPurchase(); |
| 3906 |
| 3907 ProductPurchase.fromJson(core.Map _json) { |
| 3908 if (_json.containsKey("consumptionState")) { |
| 3909 consumptionState = _json["consumptionState"]; |
| 3910 } |
| 3911 if (_json.containsKey("developerPayload")) { |
| 3912 developerPayload = _json["developerPayload"]; |
| 3913 } |
| 3914 if (_json.containsKey("kind")) { |
| 3915 kind = _json["kind"]; |
| 3916 } |
| 3917 if (_json.containsKey("purchaseState")) { |
| 3918 purchaseState = _json["purchaseState"]; |
| 3919 } |
| 3920 if (_json.containsKey("purchaseTimeMillis")) { |
| 3921 purchaseTimeMillis = _json["purchaseTimeMillis"]; |
| 3922 } |
| 3923 } |
| 3924 |
| 3925 core.Map toJson() { |
| 3926 var _json = new core.Map(); |
| 3927 if (consumptionState != null) { |
| 3928 _json["consumptionState"] = consumptionState; |
| 3929 } |
| 3930 if (developerPayload != null) { |
| 3931 _json["developerPayload"] = developerPayload; |
| 3932 } |
| 3933 if (kind != null) { |
| 3934 _json["kind"] = kind; |
| 3935 } |
| 3936 if (purchaseState != null) { |
| 3937 _json["purchaseState"] = purchaseState; |
| 3938 } |
| 3939 if (purchaseTimeMillis != null) { |
| 3940 _json["purchaseTimeMillis"] = purchaseTimeMillis; |
| 3941 } |
| 3942 return _json; |
| 3943 } |
| 3944 } |
| 3945 |
| 3946 |
| 3947 /** |
| 3948 * A SubscriptionPurchase resource indicates the status of a user's subscription |
| 3949 * purchase. |
| 3950 */ |
| 3951 class SubscriptionPurchase { |
| 3952 /** |
| 3953 * Whether the subscription will automatically be renewed when it reaches its |
| 3954 * current expiry time. |
| 3955 */ |
| 3956 core.bool autoRenewing; |
| 3957 |
| 3958 /** |
| 3959 * Time at which the subscription will expire, in milliseconds since Epoch. |
| 3960 */ |
| 3961 core.String expiryTimeMillis; |
| 3962 |
| 3963 /** |
| 3964 * This kind represents a subscriptionPurchase object in the androidpublisher |
| 3965 * service. |
| 3966 */ |
| 3967 core.String kind; |
| 3968 |
| 3969 /** |
| 3970 * Time at which the subscription was granted, in milliseconds since Epoch. |
| 3971 */ |
| 3972 core.String startTimeMillis; |
| 3973 |
| 3974 |
| 3975 SubscriptionPurchase(); |
| 3976 |
| 3977 SubscriptionPurchase.fromJson(core.Map _json) { |
| 3978 if (_json.containsKey("autoRenewing")) { |
| 3979 autoRenewing = _json["autoRenewing"]; |
| 3980 } |
| 3981 if (_json.containsKey("expiryTimeMillis")) { |
| 3982 expiryTimeMillis = _json["expiryTimeMillis"]; |
| 3983 } |
| 3984 if (_json.containsKey("kind")) { |
| 3985 kind = _json["kind"]; |
| 3986 } |
| 3987 if (_json.containsKey("startTimeMillis")) { |
| 3988 startTimeMillis = _json["startTimeMillis"]; |
| 3989 } |
| 3990 } |
| 3991 |
| 3992 core.Map toJson() { |
| 3993 var _json = new core.Map(); |
| 3994 if (autoRenewing != null) { |
| 3995 _json["autoRenewing"] = autoRenewing; |
| 3996 } |
| 3997 if (expiryTimeMillis != null) { |
| 3998 _json["expiryTimeMillis"] = expiryTimeMillis; |
| 3999 } |
| 4000 if (kind != null) { |
| 4001 _json["kind"] = kind; |
| 4002 } |
| 4003 if (startTimeMillis != null) { |
| 4004 _json["startTimeMillis"] = startTimeMillis; |
| 4005 } |
| 4006 return _json; |
| 4007 } |
| 4008 } |
| 4009 |
| 4010 |
| 4011 /** Not documented yet. */ |
| 4012 class Testers { |
| 4013 /** Not documented yet. */ |
| 4014 core.List<core.String> googleGroups; |
| 4015 |
| 4016 /** Not documented yet. */ |
| 4017 core.List<core.String> googlePlusCommunities; |
| 4018 |
| 4019 |
| 4020 Testers(); |
| 4021 |
| 4022 Testers.fromJson(core.Map _json) { |
| 4023 if (_json.containsKey("googleGroups")) { |
| 4024 googleGroups = _json["googleGroups"]; |
| 4025 } |
| 4026 if (_json.containsKey("googlePlusCommunities")) { |
| 4027 googlePlusCommunities = _json["googlePlusCommunities"]; |
| 4028 } |
| 4029 } |
| 4030 |
| 4031 core.Map toJson() { |
| 4032 var _json = new core.Map(); |
| 4033 if (googleGroups != null) { |
| 4034 _json["googleGroups"] = googleGroups; |
| 4035 } |
| 4036 if (googlePlusCommunities != null) { |
| 4037 _json["googlePlusCommunities"] = googlePlusCommunities; |
| 4038 } |
| 4039 return _json; |
| 4040 } |
| 4041 } |
| 4042 |
| 4043 |
| 4044 /** Not documented yet. */ |
| 4045 class TokenPagination { |
| 4046 /** Not documented yet. */ |
| 4047 core.String nextPageToken; |
| 4048 |
| 4049 /** Not documented yet. */ |
| 4050 core.String previousPageToken; |
| 4051 |
| 4052 |
| 4053 TokenPagination(); |
| 4054 |
| 4055 TokenPagination.fromJson(core.Map _json) { |
| 4056 if (_json.containsKey("nextPageToken")) { |
| 4057 nextPageToken = _json["nextPageToken"]; |
| 4058 } |
| 4059 if (_json.containsKey("previousPageToken")) { |
| 4060 previousPageToken = _json["previousPageToken"]; |
| 4061 } |
| 4062 } |
| 4063 |
| 4064 core.Map toJson() { |
| 4065 var _json = new core.Map(); |
| 4066 if (nextPageToken != null) { |
| 4067 _json["nextPageToken"] = nextPageToken; |
| 4068 } |
| 4069 if (previousPageToken != null) { |
| 4070 _json["previousPageToken"] = previousPageToken; |
| 4071 } |
| 4072 return _json; |
| 4073 } |
| 4074 } |
| 4075 |
| 4076 |
| 4077 /** Not documented yet. */ |
| 4078 class Track { |
| 4079 /** Not documented yet. */ |
| 4080 core.String track; |
| 4081 |
| 4082 /** Not documented yet. */ |
| 4083 core.double userFraction; |
| 4084 |
| 4085 /** Not documented yet. */ |
| 4086 core.List<core.int> versionCodes; |
| 4087 |
| 4088 |
| 4089 Track(); |
| 4090 |
| 4091 Track.fromJson(core.Map _json) { |
| 4092 if (_json.containsKey("track")) { |
| 4093 track = _json["track"]; |
| 4094 } |
| 4095 if (_json.containsKey("userFraction")) { |
| 4096 userFraction = _json["userFraction"]; |
| 4097 } |
| 4098 if (_json.containsKey("versionCodes")) { |
| 4099 versionCodes = _json["versionCodes"]; |
| 4100 } |
| 4101 } |
| 4102 |
| 4103 core.Map toJson() { |
| 4104 var _json = new core.Map(); |
| 4105 if (track != null) { |
| 4106 _json["track"] = track; |
| 4107 } |
| 4108 if (userFraction != null) { |
| 4109 _json["userFraction"] = userFraction; |
| 4110 } |
| 4111 if (versionCodes != null) { |
| 4112 _json["versionCodes"] = versionCodes; |
| 4113 } |
| 4114 return _json; |
| 4115 } |
| 4116 } |
| 4117 |
| 4118 |
| 4119 /** Not documented yet. */ |
| 4120 class TracksListResponse { |
| 4121 /** |
| 4122 * Identifies what kind of resource this is. Value: the fixed string |
| 4123 * "androidpublisher#tracksListResponse". |
| 4124 */ |
| 4125 core.String kind; |
| 4126 |
| 4127 /** Not documented yet. */ |
| 4128 core.List<Track> tracks; |
| 4129 |
| 4130 |
| 4131 TracksListResponse(); |
| 4132 |
| 4133 TracksListResponse.fromJson(core.Map _json) { |
| 4134 if (_json.containsKey("kind")) { |
| 4135 kind = _json["kind"]; |
| 4136 } |
| 4137 if (_json.containsKey("tracks")) { |
| 4138 tracks = _json["tracks"].map((value) => new Track.fromJson(value)).toList(
); |
| 4139 } |
| 4140 } |
| 4141 |
| 4142 core.Map toJson() { |
| 4143 var _json = new core.Map(); |
| 4144 if (kind != null) { |
| 4145 _json["kind"] = kind; |
| 4146 } |
| 4147 if (tracks != null) { |
| 4148 _json["tracks"] = tracks.map((value) => (value).toJson()).toList(); |
| 4149 } |
| 4150 return _json; |
| 4151 } |
| 4152 } |
| 4153 |
| 4154 |
OLD | NEW |