OLD | NEW |
(Empty) | |
| 1 library googleapis.content.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 /** |
| 17 * Manage product items, inventory, and Merchant Center accounts for Google |
| 18 * Shopping. |
| 19 */ |
| 20 class ContentApi { |
| 21 /** Manage your product listings and accounts for Google Shopping */ |
| 22 static const ContentScope = "https://www.googleapis.com/auth/content"; |
| 23 |
| 24 |
| 25 final common_internal.ApiRequester _requester; |
| 26 |
| 27 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); |
| 28 AccountstatusesResourceApi get accountstatuses => new AccountstatusesResourceA
pi(_requester); |
| 29 DatafeedsResourceApi get datafeeds => new DatafeedsResourceApi(_requester); |
| 30 DatafeedstatusesResourceApi get datafeedstatuses => new DatafeedstatusesResour
ceApi(_requester); |
| 31 InventoryResourceApi get inventory => new InventoryResourceApi(_requester); |
| 32 ProductsResourceApi get products => new ProductsResourceApi(_requester); |
| 33 ProductstatusesResourceApi get productstatuses => new ProductstatusesResourceA
pi(_requester); |
| 34 |
| 35 ContentApi(http.Client client) : |
| 36 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/content/v2/"); |
| 37 } |
| 38 |
| 39 |
| 40 /** Not documented yet. */ |
| 41 class AccountsResourceApi { |
| 42 final common_internal.ApiRequester _requester; |
| 43 |
| 44 AccountsResourceApi(common_internal.ApiRequester client) : |
| 45 _requester = client; |
| 46 |
| 47 /** |
| 48 * Retrieves, inserts, updates, and deletes multiple Merchant Center |
| 49 * (sub-)accounts in a single request. |
| 50 * |
| 51 * [request] - The metadata request object. |
| 52 * |
| 53 * Request parameters: |
| 54 * |
| 55 * Completes with a [AccountsCustomBatchResponse]. |
| 56 * |
| 57 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 58 * error. |
| 59 * |
| 60 * If the used [http.Client] completes with an error when making a REST call, |
| 61 * this method will complete with the same error. |
| 62 */ |
| 63 async.Future<AccountsCustomBatchResponse> custombatch(AccountsCustomBatchReque
st request) { |
| 64 var _url = null; |
| 65 var _queryParams = new core.Map(); |
| 66 var _uploadMedia = null; |
| 67 var _uploadOptions = null; |
| 68 var _downloadOptions = common.DownloadOptions.Metadata; |
| 69 var _body = null; |
| 70 |
| 71 if (request != null) { |
| 72 _body = convert.JSON.encode((request).toJson()); |
| 73 } |
| 74 |
| 75 |
| 76 _url = 'accounts/batch'; |
| 77 |
| 78 var _response = _requester.request(_url, |
| 79 "POST", |
| 80 body: _body, |
| 81 queryParams: _queryParams, |
| 82 uploadOptions: _uploadOptions, |
| 83 uploadMedia: _uploadMedia, |
| 84 downloadOptions: _downloadOptions); |
| 85 return _response.then((data) => new AccountsCustomBatchResponse.fromJson(dat
a)); |
| 86 } |
| 87 |
| 88 /** |
| 89 * Deletes a Merchant Center sub-account. |
| 90 * |
| 91 * Request parameters: |
| 92 * |
| 93 * [merchantId] - The ID of the managing account. |
| 94 * |
| 95 * [accountId] - The ID of the account. |
| 96 * |
| 97 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 98 * error. |
| 99 * |
| 100 * If the used [http.Client] completes with an error when making a REST call, |
| 101 * this method will complete with the same error. |
| 102 */ |
| 103 async.Future delete(core.String merchantId, core.String accountId) { |
| 104 var _url = null; |
| 105 var _queryParams = new core.Map(); |
| 106 var _uploadMedia = null; |
| 107 var _uploadOptions = null; |
| 108 var _downloadOptions = common.DownloadOptions.Metadata; |
| 109 var _body = null; |
| 110 |
| 111 if (merchantId == null) { |
| 112 throw new core.ArgumentError("Parameter merchantId is required."); |
| 113 } |
| 114 if (accountId == null) { |
| 115 throw new core.ArgumentError("Parameter accountId is required."); |
| 116 } |
| 117 |
| 118 _downloadOptions = null; |
| 119 |
| 120 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/accounts/' +
common_internal.Escaper.ecapeVariable('$accountId'); |
| 121 |
| 122 var _response = _requester.request(_url, |
| 123 "DELETE", |
| 124 body: _body, |
| 125 queryParams: _queryParams, |
| 126 uploadOptions: _uploadOptions, |
| 127 uploadMedia: _uploadMedia, |
| 128 downloadOptions: _downloadOptions); |
| 129 return _response.then((data) => null); |
| 130 } |
| 131 |
| 132 /** |
| 133 * Retrieves a Merchant Center account. |
| 134 * |
| 135 * Request parameters: |
| 136 * |
| 137 * [merchantId] - The ID of the managing account. |
| 138 * |
| 139 * [accountId] - The ID of the account. |
| 140 * |
| 141 * Completes with a [Account]. |
| 142 * |
| 143 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 144 * error. |
| 145 * |
| 146 * If the used [http.Client] completes with an error when making a REST call, |
| 147 * this method will complete with the same error. |
| 148 */ |
| 149 async.Future<Account> get(core.String merchantId, core.String accountId) { |
| 150 var _url = null; |
| 151 var _queryParams = new core.Map(); |
| 152 var _uploadMedia = null; |
| 153 var _uploadOptions = null; |
| 154 var _downloadOptions = common.DownloadOptions.Metadata; |
| 155 var _body = null; |
| 156 |
| 157 if (merchantId == null) { |
| 158 throw new core.ArgumentError("Parameter merchantId is required."); |
| 159 } |
| 160 if (accountId == null) { |
| 161 throw new core.ArgumentError("Parameter accountId is required."); |
| 162 } |
| 163 |
| 164 |
| 165 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/accounts/' +
common_internal.Escaper.ecapeVariable('$accountId'); |
| 166 |
| 167 var _response = _requester.request(_url, |
| 168 "GET", |
| 169 body: _body, |
| 170 queryParams: _queryParams, |
| 171 uploadOptions: _uploadOptions, |
| 172 uploadMedia: _uploadMedia, |
| 173 downloadOptions: _downloadOptions); |
| 174 return _response.then((data) => new Account.fromJson(data)); |
| 175 } |
| 176 |
| 177 /** |
| 178 * Creates a Merchant Center sub-account. |
| 179 * |
| 180 * [request] - The metadata request object. |
| 181 * |
| 182 * Request parameters: |
| 183 * |
| 184 * [merchantId] - The ID of the managing account. |
| 185 * |
| 186 * Completes with a [Account]. |
| 187 * |
| 188 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 189 * error. |
| 190 * |
| 191 * If the used [http.Client] completes with an error when making a REST call, |
| 192 * this method will complete with the same error. |
| 193 */ |
| 194 async.Future<Account> insert(Account request, core.String merchantId) { |
| 195 var _url = null; |
| 196 var _queryParams = new core.Map(); |
| 197 var _uploadMedia = null; |
| 198 var _uploadOptions = null; |
| 199 var _downloadOptions = common.DownloadOptions.Metadata; |
| 200 var _body = null; |
| 201 |
| 202 if (request != null) { |
| 203 _body = convert.JSON.encode((request).toJson()); |
| 204 } |
| 205 if (merchantId == null) { |
| 206 throw new core.ArgumentError("Parameter merchantId is required."); |
| 207 } |
| 208 |
| 209 |
| 210 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/accounts'; |
| 211 |
| 212 var _response = _requester.request(_url, |
| 213 "POST", |
| 214 body: _body, |
| 215 queryParams: _queryParams, |
| 216 uploadOptions: _uploadOptions, |
| 217 uploadMedia: _uploadMedia, |
| 218 downloadOptions: _downloadOptions); |
| 219 return _response.then((data) => new Account.fromJson(data)); |
| 220 } |
| 221 |
| 222 /** |
| 223 * Lists the sub-accounts in your Merchant Center account. |
| 224 * |
| 225 * Request parameters: |
| 226 * |
| 227 * [merchantId] - The ID of the managing account. |
| 228 * |
| 229 * [maxResults] - The maximum number of accounts to return in the response, |
| 230 * used for paging. |
| 231 * |
| 232 * [pageToken] - The token returned by the previous request. |
| 233 * |
| 234 * Completes with a [AccountsListResponse]. |
| 235 * |
| 236 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 237 * error. |
| 238 * |
| 239 * If the used [http.Client] completes with an error when making a REST call, |
| 240 * this method will complete with the same error. |
| 241 */ |
| 242 async.Future<AccountsListResponse> list(core.String merchantId, {core.int maxR
esults, core.String pageToken}) { |
| 243 var _url = null; |
| 244 var _queryParams = new core.Map(); |
| 245 var _uploadMedia = null; |
| 246 var _uploadOptions = null; |
| 247 var _downloadOptions = common.DownloadOptions.Metadata; |
| 248 var _body = null; |
| 249 |
| 250 if (merchantId == null) { |
| 251 throw new core.ArgumentError("Parameter merchantId is required."); |
| 252 } |
| 253 if (maxResults != null) { |
| 254 _queryParams["maxResults"] = ["${maxResults}"]; |
| 255 } |
| 256 if (pageToken != null) { |
| 257 _queryParams["pageToken"] = [pageToken]; |
| 258 } |
| 259 |
| 260 |
| 261 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/accounts'; |
| 262 |
| 263 var _response = _requester.request(_url, |
| 264 "GET", |
| 265 body: _body, |
| 266 queryParams: _queryParams, |
| 267 uploadOptions: _uploadOptions, |
| 268 uploadMedia: _uploadMedia, |
| 269 downloadOptions: _downloadOptions); |
| 270 return _response.then((data) => new AccountsListResponse.fromJson(data)); |
| 271 } |
| 272 |
| 273 /** |
| 274 * Updates a Merchant Center account. This method supports patch semantics. |
| 275 * |
| 276 * [request] - The metadata request object. |
| 277 * |
| 278 * Request parameters: |
| 279 * |
| 280 * [merchantId] - The ID of the managing account. |
| 281 * |
| 282 * [accountId] - The ID of the account. |
| 283 * |
| 284 * Completes with a [Account]. |
| 285 * |
| 286 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 287 * error. |
| 288 * |
| 289 * If the used [http.Client] completes with an error when making a REST call, |
| 290 * this method will complete with the same error. |
| 291 */ |
| 292 async.Future<Account> patch(Account request, core.String merchantId, core.Stri
ng accountId) { |
| 293 var _url = null; |
| 294 var _queryParams = new core.Map(); |
| 295 var _uploadMedia = null; |
| 296 var _uploadOptions = null; |
| 297 var _downloadOptions = common.DownloadOptions.Metadata; |
| 298 var _body = null; |
| 299 |
| 300 if (request != null) { |
| 301 _body = convert.JSON.encode((request).toJson()); |
| 302 } |
| 303 if (merchantId == null) { |
| 304 throw new core.ArgumentError("Parameter merchantId is required."); |
| 305 } |
| 306 if (accountId == null) { |
| 307 throw new core.ArgumentError("Parameter accountId is required."); |
| 308 } |
| 309 |
| 310 |
| 311 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/accounts/' +
common_internal.Escaper.ecapeVariable('$accountId'); |
| 312 |
| 313 var _response = _requester.request(_url, |
| 314 "PATCH", |
| 315 body: _body, |
| 316 queryParams: _queryParams, |
| 317 uploadOptions: _uploadOptions, |
| 318 uploadMedia: _uploadMedia, |
| 319 downloadOptions: _downloadOptions); |
| 320 return _response.then((data) => new Account.fromJson(data)); |
| 321 } |
| 322 |
| 323 /** |
| 324 * Updates a Merchant Center account. |
| 325 * |
| 326 * [request] - The metadata request object. |
| 327 * |
| 328 * Request parameters: |
| 329 * |
| 330 * [merchantId] - The ID of the managing account. |
| 331 * |
| 332 * [accountId] - The ID of the account. |
| 333 * |
| 334 * Completes with a [Account]. |
| 335 * |
| 336 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 337 * error. |
| 338 * |
| 339 * If the used [http.Client] completes with an error when making a REST call, |
| 340 * this method will complete with the same error. |
| 341 */ |
| 342 async.Future<Account> update(Account request, core.String merchantId, core.Str
ing accountId) { |
| 343 var _url = null; |
| 344 var _queryParams = new core.Map(); |
| 345 var _uploadMedia = null; |
| 346 var _uploadOptions = null; |
| 347 var _downloadOptions = common.DownloadOptions.Metadata; |
| 348 var _body = null; |
| 349 |
| 350 if (request != null) { |
| 351 _body = convert.JSON.encode((request).toJson()); |
| 352 } |
| 353 if (merchantId == null) { |
| 354 throw new core.ArgumentError("Parameter merchantId is required."); |
| 355 } |
| 356 if (accountId == null) { |
| 357 throw new core.ArgumentError("Parameter accountId is required."); |
| 358 } |
| 359 |
| 360 |
| 361 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/accounts/' +
common_internal.Escaper.ecapeVariable('$accountId'); |
| 362 |
| 363 var _response = _requester.request(_url, |
| 364 "PUT", |
| 365 body: _body, |
| 366 queryParams: _queryParams, |
| 367 uploadOptions: _uploadOptions, |
| 368 uploadMedia: _uploadMedia, |
| 369 downloadOptions: _downloadOptions); |
| 370 return _response.then((data) => new Account.fromJson(data)); |
| 371 } |
| 372 |
| 373 } |
| 374 |
| 375 |
| 376 /** Not documented yet. */ |
| 377 class AccountstatusesResourceApi { |
| 378 final common_internal.ApiRequester _requester; |
| 379 |
| 380 AccountstatusesResourceApi(common_internal.ApiRequester client) : |
| 381 _requester = client; |
| 382 |
| 383 /** |
| 384 * Not documented yet. |
| 385 * |
| 386 * [request] - The metadata request object. |
| 387 * |
| 388 * Request parameters: |
| 389 * |
| 390 * Completes with a [AccountstatusesCustomBatchResponse]. |
| 391 * |
| 392 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 393 * error. |
| 394 * |
| 395 * If the used [http.Client] completes with an error when making a REST call, |
| 396 * this method will complete with the same error. |
| 397 */ |
| 398 async.Future<AccountstatusesCustomBatchResponse> custombatch(AccountstatusesCu
stomBatchRequest request) { |
| 399 var _url = null; |
| 400 var _queryParams = new core.Map(); |
| 401 var _uploadMedia = null; |
| 402 var _uploadOptions = null; |
| 403 var _downloadOptions = common.DownloadOptions.Metadata; |
| 404 var _body = null; |
| 405 |
| 406 if (request != null) { |
| 407 _body = convert.JSON.encode((request).toJson()); |
| 408 } |
| 409 |
| 410 |
| 411 _url = 'accountstatuses/batch'; |
| 412 |
| 413 var _response = _requester.request(_url, |
| 414 "POST", |
| 415 body: _body, |
| 416 queryParams: _queryParams, |
| 417 uploadOptions: _uploadOptions, |
| 418 uploadMedia: _uploadMedia, |
| 419 downloadOptions: _downloadOptions); |
| 420 return _response.then((data) => new AccountstatusesCustomBatchResponse.fromJ
son(data)); |
| 421 } |
| 422 |
| 423 /** |
| 424 * Retrieves the status of a Merchant Center account. |
| 425 * |
| 426 * Request parameters: |
| 427 * |
| 428 * [merchantId] - The ID of the managing account. |
| 429 * |
| 430 * [accountId] - The ID of the account. |
| 431 * |
| 432 * Completes with a [AccountStatus]. |
| 433 * |
| 434 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 435 * error. |
| 436 * |
| 437 * If the used [http.Client] completes with an error when making a REST call, |
| 438 * this method will complete with the same error. |
| 439 */ |
| 440 async.Future<AccountStatus> get(core.String merchantId, core.String accountId)
{ |
| 441 var _url = null; |
| 442 var _queryParams = new core.Map(); |
| 443 var _uploadMedia = null; |
| 444 var _uploadOptions = null; |
| 445 var _downloadOptions = common.DownloadOptions.Metadata; |
| 446 var _body = null; |
| 447 |
| 448 if (merchantId == null) { |
| 449 throw new core.ArgumentError("Parameter merchantId is required."); |
| 450 } |
| 451 if (accountId == null) { |
| 452 throw new core.ArgumentError("Parameter accountId is required."); |
| 453 } |
| 454 |
| 455 |
| 456 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/accountstatu
ses/' + common_internal.Escaper.ecapeVariable('$accountId'); |
| 457 |
| 458 var _response = _requester.request(_url, |
| 459 "GET", |
| 460 body: _body, |
| 461 queryParams: _queryParams, |
| 462 uploadOptions: _uploadOptions, |
| 463 uploadMedia: _uploadMedia, |
| 464 downloadOptions: _downloadOptions); |
| 465 return _response.then((data) => new AccountStatus.fromJson(data)); |
| 466 } |
| 467 |
| 468 /** |
| 469 * Lists the statuses of the sub-accounts in your Merchant Center account. |
| 470 * |
| 471 * Request parameters: |
| 472 * |
| 473 * [merchantId] - The ID of the managing account. |
| 474 * |
| 475 * [maxResults] - The maximum number of account statuses to return in the |
| 476 * response, used for paging. |
| 477 * |
| 478 * [pageToken] - The token returned by the previous request. |
| 479 * |
| 480 * Completes with a [AccountstatusesListResponse]. |
| 481 * |
| 482 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 483 * error. |
| 484 * |
| 485 * If the used [http.Client] completes with an error when making a REST call, |
| 486 * this method will complete with the same error. |
| 487 */ |
| 488 async.Future<AccountstatusesListResponse> list(core.String merchantId, {core.i
nt maxResults, core.String pageToken}) { |
| 489 var _url = null; |
| 490 var _queryParams = new core.Map(); |
| 491 var _uploadMedia = null; |
| 492 var _uploadOptions = null; |
| 493 var _downloadOptions = common.DownloadOptions.Metadata; |
| 494 var _body = null; |
| 495 |
| 496 if (merchantId == null) { |
| 497 throw new core.ArgumentError("Parameter merchantId is required."); |
| 498 } |
| 499 if (maxResults != null) { |
| 500 _queryParams["maxResults"] = ["${maxResults}"]; |
| 501 } |
| 502 if (pageToken != null) { |
| 503 _queryParams["pageToken"] = [pageToken]; |
| 504 } |
| 505 |
| 506 |
| 507 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/accountstatu
ses'; |
| 508 |
| 509 var _response = _requester.request(_url, |
| 510 "GET", |
| 511 body: _body, |
| 512 queryParams: _queryParams, |
| 513 uploadOptions: _uploadOptions, |
| 514 uploadMedia: _uploadMedia, |
| 515 downloadOptions: _downloadOptions); |
| 516 return _response.then((data) => new AccountstatusesListResponse.fromJson(dat
a)); |
| 517 } |
| 518 |
| 519 } |
| 520 |
| 521 |
| 522 /** Not documented yet. */ |
| 523 class DatafeedsResourceApi { |
| 524 final common_internal.ApiRequester _requester; |
| 525 |
| 526 DatafeedsResourceApi(common_internal.ApiRequester client) : |
| 527 _requester = client; |
| 528 |
| 529 /** |
| 530 * Not documented yet. |
| 531 * |
| 532 * [request] - The metadata request object. |
| 533 * |
| 534 * Request parameters: |
| 535 * |
| 536 * Completes with a [DatafeedsCustomBatchResponse]. |
| 537 * |
| 538 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 539 * error. |
| 540 * |
| 541 * If the used [http.Client] completes with an error when making a REST call, |
| 542 * this method will complete with the same error. |
| 543 */ |
| 544 async.Future<DatafeedsCustomBatchResponse> custombatch(DatafeedsCustomBatchReq
uest request) { |
| 545 var _url = null; |
| 546 var _queryParams = new core.Map(); |
| 547 var _uploadMedia = null; |
| 548 var _uploadOptions = null; |
| 549 var _downloadOptions = common.DownloadOptions.Metadata; |
| 550 var _body = null; |
| 551 |
| 552 if (request != null) { |
| 553 _body = convert.JSON.encode((request).toJson()); |
| 554 } |
| 555 |
| 556 |
| 557 _url = 'datafeeds/batch'; |
| 558 |
| 559 var _response = _requester.request(_url, |
| 560 "POST", |
| 561 body: _body, |
| 562 queryParams: _queryParams, |
| 563 uploadOptions: _uploadOptions, |
| 564 uploadMedia: _uploadMedia, |
| 565 downloadOptions: _downloadOptions); |
| 566 return _response.then((data) => new DatafeedsCustomBatchResponse.fromJson(da
ta)); |
| 567 } |
| 568 |
| 569 /** |
| 570 * Deletes a datafeed from your Merchant Center account. |
| 571 * |
| 572 * Request parameters: |
| 573 * |
| 574 * [merchantId] - null |
| 575 * |
| 576 * [datafeedId] - null |
| 577 * |
| 578 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 579 * error. |
| 580 * |
| 581 * If the used [http.Client] completes with an error when making a REST call, |
| 582 * this method will complete with the same error. |
| 583 */ |
| 584 async.Future delete(core.String merchantId, core.String datafeedId) { |
| 585 var _url = null; |
| 586 var _queryParams = new core.Map(); |
| 587 var _uploadMedia = null; |
| 588 var _uploadOptions = null; |
| 589 var _downloadOptions = common.DownloadOptions.Metadata; |
| 590 var _body = null; |
| 591 |
| 592 if (merchantId == null) { |
| 593 throw new core.ArgumentError("Parameter merchantId is required."); |
| 594 } |
| 595 if (datafeedId == null) { |
| 596 throw new core.ArgumentError("Parameter datafeedId is required."); |
| 597 } |
| 598 |
| 599 _downloadOptions = null; |
| 600 |
| 601 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/datafeeds/'
+ common_internal.Escaper.ecapeVariable('$datafeedId'); |
| 602 |
| 603 var _response = _requester.request(_url, |
| 604 "DELETE", |
| 605 body: _body, |
| 606 queryParams: _queryParams, |
| 607 uploadOptions: _uploadOptions, |
| 608 uploadMedia: _uploadMedia, |
| 609 downloadOptions: _downloadOptions); |
| 610 return _response.then((data) => null); |
| 611 } |
| 612 |
| 613 /** |
| 614 * Retrieves a datafeed from your Merchant Center account. |
| 615 * |
| 616 * Request parameters: |
| 617 * |
| 618 * [merchantId] - null |
| 619 * |
| 620 * [datafeedId] - null |
| 621 * |
| 622 * Completes with a [Datafeed]. |
| 623 * |
| 624 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 625 * error. |
| 626 * |
| 627 * If the used [http.Client] completes with an error when making a REST call, |
| 628 * this method will complete with the same error. |
| 629 */ |
| 630 async.Future<Datafeed> get(core.String merchantId, core.String datafeedId) { |
| 631 var _url = null; |
| 632 var _queryParams = new core.Map(); |
| 633 var _uploadMedia = null; |
| 634 var _uploadOptions = null; |
| 635 var _downloadOptions = common.DownloadOptions.Metadata; |
| 636 var _body = null; |
| 637 |
| 638 if (merchantId == null) { |
| 639 throw new core.ArgumentError("Parameter merchantId is required."); |
| 640 } |
| 641 if (datafeedId == null) { |
| 642 throw new core.ArgumentError("Parameter datafeedId is required."); |
| 643 } |
| 644 |
| 645 |
| 646 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/datafeeds/'
+ common_internal.Escaper.ecapeVariable('$datafeedId'); |
| 647 |
| 648 var _response = _requester.request(_url, |
| 649 "GET", |
| 650 body: _body, |
| 651 queryParams: _queryParams, |
| 652 uploadOptions: _uploadOptions, |
| 653 uploadMedia: _uploadMedia, |
| 654 downloadOptions: _downloadOptions); |
| 655 return _response.then((data) => new Datafeed.fromJson(data)); |
| 656 } |
| 657 |
| 658 /** |
| 659 * Registers a datafeed with your Merchant Center account. |
| 660 * |
| 661 * [request] - The metadata request object. |
| 662 * |
| 663 * Request parameters: |
| 664 * |
| 665 * [merchantId] - null |
| 666 * |
| 667 * Completes with a [Datafeed]. |
| 668 * |
| 669 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 670 * error. |
| 671 * |
| 672 * If the used [http.Client] completes with an error when making a REST call, |
| 673 * this method will complete with the same error. |
| 674 */ |
| 675 async.Future<Datafeed> insert(Datafeed request, core.String merchantId) { |
| 676 var _url = null; |
| 677 var _queryParams = new core.Map(); |
| 678 var _uploadMedia = null; |
| 679 var _uploadOptions = null; |
| 680 var _downloadOptions = common.DownloadOptions.Metadata; |
| 681 var _body = null; |
| 682 |
| 683 if (request != null) { |
| 684 _body = convert.JSON.encode((request).toJson()); |
| 685 } |
| 686 if (merchantId == null) { |
| 687 throw new core.ArgumentError("Parameter merchantId is required."); |
| 688 } |
| 689 |
| 690 |
| 691 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/datafeeds'; |
| 692 |
| 693 var _response = _requester.request(_url, |
| 694 "POST", |
| 695 body: _body, |
| 696 queryParams: _queryParams, |
| 697 uploadOptions: _uploadOptions, |
| 698 uploadMedia: _uploadMedia, |
| 699 downloadOptions: _downloadOptions); |
| 700 return _response.then((data) => new Datafeed.fromJson(data)); |
| 701 } |
| 702 |
| 703 /** |
| 704 * Lists the datafeeds in your Merchant Center account. |
| 705 * |
| 706 * Request parameters: |
| 707 * |
| 708 * [merchantId] - null |
| 709 * |
| 710 * Completes with a [DatafeedsListResponse]. |
| 711 * |
| 712 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 713 * error. |
| 714 * |
| 715 * If the used [http.Client] completes with an error when making a REST call, |
| 716 * this method will complete with the same error. |
| 717 */ |
| 718 async.Future<DatafeedsListResponse> list(core.String merchantId) { |
| 719 var _url = null; |
| 720 var _queryParams = new core.Map(); |
| 721 var _uploadMedia = null; |
| 722 var _uploadOptions = null; |
| 723 var _downloadOptions = common.DownloadOptions.Metadata; |
| 724 var _body = null; |
| 725 |
| 726 if (merchantId == null) { |
| 727 throw new core.ArgumentError("Parameter merchantId is required."); |
| 728 } |
| 729 |
| 730 |
| 731 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/datafeeds'; |
| 732 |
| 733 var _response = _requester.request(_url, |
| 734 "GET", |
| 735 body: _body, |
| 736 queryParams: _queryParams, |
| 737 uploadOptions: _uploadOptions, |
| 738 uploadMedia: _uploadMedia, |
| 739 downloadOptions: _downloadOptions); |
| 740 return _response.then((data) => new DatafeedsListResponse.fromJson(data)); |
| 741 } |
| 742 |
| 743 /** |
| 744 * Updates a datafeed of your Merchant Center account. This method supports |
| 745 * patch semantics. |
| 746 * |
| 747 * [request] - The metadata request object. |
| 748 * |
| 749 * Request parameters: |
| 750 * |
| 751 * [merchantId] - null |
| 752 * |
| 753 * [datafeedId] - null |
| 754 * |
| 755 * Completes with a [Datafeed]. |
| 756 * |
| 757 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 758 * error. |
| 759 * |
| 760 * If the used [http.Client] completes with an error when making a REST call, |
| 761 * this method will complete with the same error. |
| 762 */ |
| 763 async.Future<Datafeed> patch(Datafeed request, core.String merchantId, core.St
ring datafeedId) { |
| 764 var _url = null; |
| 765 var _queryParams = new core.Map(); |
| 766 var _uploadMedia = null; |
| 767 var _uploadOptions = null; |
| 768 var _downloadOptions = common.DownloadOptions.Metadata; |
| 769 var _body = null; |
| 770 |
| 771 if (request != null) { |
| 772 _body = convert.JSON.encode((request).toJson()); |
| 773 } |
| 774 if (merchantId == null) { |
| 775 throw new core.ArgumentError("Parameter merchantId is required."); |
| 776 } |
| 777 if (datafeedId == null) { |
| 778 throw new core.ArgumentError("Parameter datafeedId is required."); |
| 779 } |
| 780 |
| 781 |
| 782 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/datafeeds/'
+ common_internal.Escaper.ecapeVariable('$datafeedId'); |
| 783 |
| 784 var _response = _requester.request(_url, |
| 785 "PATCH", |
| 786 body: _body, |
| 787 queryParams: _queryParams, |
| 788 uploadOptions: _uploadOptions, |
| 789 uploadMedia: _uploadMedia, |
| 790 downloadOptions: _downloadOptions); |
| 791 return _response.then((data) => new Datafeed.fromJson(data)); |
| 792 } |
| 793 |
| 794 /** |
| 795 * Updates a datafeed of your Merchant Center account. |
| 796 * |
| 797 * [request] - The metadata request object. |
| 798 * |
| 799 * Request parameters: |
| 800 * |
| 801 * [merchantId] - null |
| 802 * |
| 803 * [datafeedId] - null |
| 804 * |
| 805 * Completes with a [Datafeed]. |
| 806 * |
| 807 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 808 * error. |
| 809 * |
| 810 * If the used [http.Client] completes with an error when making a REST call, |
| 811 * this method will complete with the same error. |
| 812 */ |
| 813 async.Future<Datafeed> update(Datafeed request, core.String merchantId, core.S
tring datafeedId) { |
| 814 var _url = null; |
| 815 var _queryParams = new core.Map(); |
| 816 var _uploadMedia = null; |
| 817 var _uploadOptions = null; |
| 818 var _downloadOptions = common.DownloadOptions.Metadata; |
| 819 var _body = null; |
| 820 |
| 821 if (request != null) { |
| 822 _body = convert.JSON.encode((request).toJson()); |
| 823 } |
| 824 if (merchantId == null) { |
| 825 throw new core.ArgumentError("Parameter merchantId is required."); |
| 826 } |
| 827 if (datafeedId == null) { |
| 828 throw new core.ArgumentError("Parameter datafeedId is required."); |
| 829 } |
| 830 |
| 831 |
| 832 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/datafeeds/'
+ common_internal.Escaper.ecapeVariable('$datafeedId'); |
| 833 |
| 834 var _response = _requester.request(_url, |
| 835 "PUT", |
| 836 body: _body, |
| 837 queryParams: _queryParams, |
| 838 uploadOptions: _uploadOptions, |
| 839 uploadMedia: _uploadMedia, |
| 840 downloadOptions: _downloadOptions); |
| 841 return _response.then((data) => new Datafeed.fromJson(data)); |
| 842 } |
| 843 |
| 844 } |
| 845 |
| 846 |
| 847 /** Not documented yet. */ |
| 848 class DatafeedstatusesResourceApi { |
| 849 final common_internal.ApiRequester _requester; |
| 850 |
| 851 DatafeedstatusesResourceApi(common_internal.ApiRequester client) : |
| 852 _requester = client; |
| 853 |
| 854 /** |
| 855 * Not documented yet. |
| 856 * |
| 857 * [request] - The metadata request object. |
| 858 * |
| 859 * Request parameters: |
| 860 * |
| 861 * Completes with a [DatafeedstatusesCustomBatchResponse]. |
| 862 * |
| 863 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 864 * error. |
| 865 * |
| 866 * If the used [http.Client] completes with an error when making a REST call, |
| 867 * this method will complete with the same error. |
| 868 */ |
| 869 async.Future<DatafeedstatusesCustomBatchResponse> custombatch(Datafeedstatuses
CustomBatchRequest request) { |
| 870 var _url = null; |
| 871 var _queryParams = new core.Map(); |
| 872 var _uploadMedia = null; |
| 873 var _uploadOptions = null; |
| 874 var _downloadOptions = common.DownloadOptions.Metadata; |
| 875 var _body = null; |
| 876 |
| 877 if (request != null) { |
| 878 _body = convert.JSON.encode((request).toJson()); |
| 879 } |
| 880 |
| 881 |
| 882 _url = 'datafeedstatuses/batch'; |
| 883 |
| 884 var _response = _requester.request(_url, |
| 885 "POST", |
| 886 body: _body, |
| 887 queryParams: _queryParams, |
| 888 uploadOptions: _uploadOptions, |
| 889 uploadMedia: _uploadMedia, |
| 890 downloadOptions: _downloadOptions); |
| 891 return _response.then((data) => new DatafeedstatusesCustomBatchResponse.from
Json(data)); |
| 892 } |
| 893 |
| 894 /** |
| 895 * Retrieves the status of a datafeed from your Merchant Center account. |
| 896 * |
| 897 * Request parameters: |
| 898 * |
| 899 * [merchantId] - null |
| 900 * |
| 901 * [datafeedId] - null |
| 902 * |
| 903 * Completes with a [DatafeedStatus]. |
| 904 * |
| 905 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 906 * error. |
| 907 * |
| 908 * If the used [http.Client] completes with an error when making a REST call, |
| 909 * this method will complete with the same error. |
| 910 */ |
| 911 async.Future<DatafeedStatus> get(core.String merchantId, core.String datafeedI
d) { |
| 912 var _url = null; |
| 913 var _queryParams = new core.Map(); |
| 914 var _uploadMedia = null; |
| 915 var _uploadOptions = null; |
| 916 var _downloadOptions = common.DownloadOptions.Metadata; |
| 917 var _body = null; |
| 918 |
| 919 if (merchantId == null) { |
| 920 throw new core.ArgumentError("Parameter merchantId is required."); |
| 921 } |
| 922 if (datafeedId == null) { |
| 923 throw new core.ArgumentError("Parameter datafeedId is required."); |
| 924 } |
| 925 |
| 926 |
| 927 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/datafeedstat
uses/' + common_internal.Escaper.ecapeVariable('$datafeedId'); |
| 928 |
| 929 var _response = _requester.request(_url, |
| 930 "GET", |
| 931 body: _body, |
| 932 queryParams: _queryParams, |
| 933 uploadOptions: _uploadOptions, |
| 934 uploadMedia: _uploadMedia, |
| 935 downloadOptions: _downloadOptions); |
| 936 return _response.then((data) => new DatafeedStatus.fromJson(data)); |
| 937 } |
| 938 |
| 939 /** |
| 940 * Lists the statuses of the datafeeds in your Merchant Center account. |
| 941 * |
| 942 * Request parameters: |
| 943 * |
| 944 * [merchantId] - null |
| 945 * |
| 946 * Completes with a [DatafeedstatusesListResponse]. |
| 947 * |
| 948 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 949 * error. |
| 950 * |
| 951 * If the used [http.Client] completes with an error when making a REST call, |
| 952 * this method will complete with the same error. |
| 953 */ |
| 954 async.Future<DatafeedstatusesListResponse> list(core.String merchantId) { |
| 955 var _url = null; |
| 956 var _queryParams = new core.Map(); |
| 957 var _uploadMedia = null; |
| 958 var _uploadOptions = null; |
| 959 var _downloadOptions = common.DownloadOptions.Metadata; |
| 960 var _body = null; |
| 961 |
| 962 if (merchantId == null) { |
| 963 throw new core.ArgumentError("Parameter merchantId is required."); |
| 964 } |
| 965 |
| 966 |
| 967 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/datafeedstat
uses'; |
| 968 |
| 969 var _response = _requester.request(_url, |
| 970 "GET", |
| 971 body: _body, |
| 972 queryParams: _queryParams, |
| 973 uploadOptions: _uploadOptions, |
| 974 uploadMedia: _uploadMedia, |
| 975 downloadOptions: _downloadOptions); |
| 976 return _response.then((data) => new DatafeedstatusesListResponse.fromJson(da
ta)); |
| 977 } |
| 978 |
| 979 } |
| 980 |
| 981 |
| 982 /** Not documented yet. */ |
| 983 class InventoryResourceApi { |
| 984 final common_internal.ApiRequester _requester; |
| 985 |
| 986 InventoryResourceApi(common_internal.ApiRequester client) : |
| 987 _requester = client; |
| 988 |
| 989 /** |
| 990 * Updates price and availability for multiple products or stores in a single |
| 991 * request. |
| 992 * |
| 993 * [request] - The metadata request object. |
| 994 * |
| 995 * Request parameters: |
| 996 * |
| 997 * Completes with a [InventoryCustomBatchResponse]. |
| 998 * |
| 999 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1000 * error. |
| 1001 * |
| 1002 * If the used [http.Client] completes with an error when making a REST call, |
| 1003 * this method will complete with the same error. |
| 1004 */ |
| 1005 async.Future<InventoryCustomBatchResponse> custombatch(InventoryCustomBatchReq
uest request) { |
| 1006 var _url = null; |
| 1007 var _queryParams = new core.Map(); |
| 1008 var _uploadMedia = null; |
| 1009 var _uploadOptions = null; |
| 1010 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1011 var _body = null; |
| 1012 |
| 1013 if (request != null) { |
| 1014 _body = convert.JSON.encode((request).toJson()); |
| 1015 } |
| 1016 |
| 1017 |
| 1018 _url = 'inventory/batch'; |
| 1019 |
| 1020 var _response = _requester.request(_url, |
| 1021 "POST", |
| 1022 body: _body, |
| 1023 queryParams: _queryParams, |
| 1024 uploadOptions: _uploadOptions, |
| 1025 uploadMedia: _uploadMedia, |
| 1026 downloadOptions: _downloadOptions); |
| 1027 return _response.then((data) => new InventoryCustomBatchResponse.fromJson(da
ta)); |
| 1028 } |
| 1029 |
| 1030 /** |
| 1031 * Updates price and availability of a product in your Merchant Center |
| 1032 * account. |
| 1033 * |
| 1034 * [request] - The metadata request object. |
| 1035 * |
| 1036 * Request parameters: |
| 1037 * |
| 1038 * [merchantId] - The ID of the managing account. |
| 1039 * |
| 1040 * [storeCode] - The code of the store for which to update price and |
| 1041 * availability. Use online to update price and availability of an online |
| 1042 * product. |
| 1043 * |
| 1044 * [productId] - The ID of the product for which to update price and |
| 1045 * availability. |
| 1046 * |
| 1047 * Completes with a [InventorySetResponse]. |
| 1048 * |
| 1049 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1050 * error. |
| 1051 * |
| 1052 * If the used [http.Client] completes with an error when making a REST call, |
| 1053 * this method will complete with the same error. |
| 1054 */ |
| 1055 async.Future<InventorySetResponse> set(InventorySetRequest request, core.Strin
g merchantId, core.String storeCode, core.String productId) { |
| 1056 var _url = null; |
| 1057 var _queryParams = new core.Map(); |
| 1058 var _uploadMedia = null; |
| 1059 var _uploadOptions = null; |
| 1060 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1061 var _body = null; |
| 1062 |
| 1063 if (request != null) { |
| 1064 _body = convert.JSON.encode((request).toJson()); |
| 1065 } |
| 1066 if (merchantId == null) { |
| 1067 throw new core.ArgumentError("Parameter merchantId is required."); |
| 1068 } |
| 1069 if (storeCode == null) { |
| 1070 throw new core.ArgumentError("Parameter storeCode is required."); |
| 1071 } |
| 1072 if (productId == null) { |
| 1073 throw new core.ArgumentError("Parameter productId is required."); |
| 1074 } |
| 1075 |
| 1076 |
| 1077 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/inventory/'
+ common_internal.Escaper.ecapeVariable('$storeCode') + '/products/' + common_in
ternal.Escaper.ecapeVariable('$productId'); |
| 1078 |
| 1079 var _response = _requester.request(_url, |
| 1080 "POST", |
| 1081 body: _body, |
| 1082 queryParams: _queryParams, |
| 1083 uploadOptions: _uploadOptions, |
| 1084 uploadMedia: _uploadMedia, |
| 1085 downloadOptions: _downloadOptions); |
| 1086 return _response.then((data) => new InventorySetResponse.fromJson(data)); |
| 1087 } |
| 1088 |
| 1089 } |
| 1090 |
| 1091 |
| 1092 /** Not documented yet. */ |
| 1093 class ProductsResourceApi { |
| 1094 final common_internal.ApiRequester _requester; |
| 1095 |
| 1096 ProductsResourceApi(common_internal.ApiRequester client) : |
| 1097 _requester = client; |
| 1098 |
| 1099 /** |
| 1100 * Retrieves, inserts, and deletes multiple products in a single request. |
| 1101 * |
| 1102 * [request] - The metadata request object. |
| 1103 * |
| 1104 * Request parameters: |
| 1105 * |
| 1106 * [dryRun] - Flag to run the request in dry-run mode. |
| 1107 * |
| 1108 * Completes with a [ProductsCustomBatchResponse]. |
| 1109 * |
| 1110 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1111 * error. |
| 1112 * |
| 1113 * If the used [http.Client] completes with an error when making a REST call, |
| 1114 * this method will complete with the same error. |
| 1115 */ |
| 1116 async.Future<ProductsCustomBatchResponse> custombatch(ProductsCustomBatchReque
st request, {core.bool dryRun}) { |
| 1117 var _url = null; |
| 1118 var _queryParams = new core.Map(); |
| 1119 var _uploadMedia = null; |
| 1120 var _uploadOptions = null; |
| 1121 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1122 var _body = null; |
| 1123 |
| 1124 if (request != null) { |
| 1125 _body = convert.JSON.encode((request).toJson()); |
| 1126 } |
| 1127 if (dryRun != null) { |
| 1128 _queryParams["dryRun"] = ["${dryRun}"]; |
| 1129 } |
| 1130 |
| 1131 |
| 1132 _url = 'products/batch'; |
| 1133 |
| 1134 var _response = _requester.request(_url, |
| 1135 "POST", |
| 1136 body: _body, |
| 1137 queryParams: _queryParams, |
| 1138 uploadOptions: _uploadOptions, |
| 1139 uploadMedia: _uploadMedia, |
| 1140 downloadOptions: _downloadOptions); |
| 1141 return _response.then((data) => new ProductsCustomBatchResponse.fromJson(dat
a)); |
| 1142 } |
| 1143 |
| 1144 /** |
| 1145 * Deletes a product from your Merchant Center account. |
| 1146 * |
| 1147 * Request parameters: |
| 1148 * |
| 1149 * [merchantId] - The ID of the managing account. |
| 1150 * |
| 1151 * [productId] - The ID of the product. |
| 1152 * |
| 1153 * [dryRun] - Flag to run the request in dry-run mode. |
| 1154 * |
| 1155 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1156 * error. |
| 1157 * |
| 1158 * If the used [http.Client] completes with an error when making a REST call, |
| 1159 * this method will complete with the same error. |
| 1160 */ |
| 1161 async.Future delete(core.String merchantId, core.String productId, {core.bool
dryRun}) { |
| 1162 var _url = null; |
| 1163 var _queryParams = new core.Map(); |
| 1164 var _uploadMedia = null; |
| 1165 var _uploadOptions = null; |
| 1166 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1167 var _body = null; |
| 1168 |
| 1169 if (merchantId == null) { |
| 1170 throw new core.ArgumentError("Parameter merchantId is required."); |
| 1171 } |
| 1172 if (productId == null) { |
| 1173 throw new core.ArgumentError("Parameter productId is required."); |
| 1174 } |
| 1175 if (dryRun != null) { |
| 1176 _queryParams["dryRun"] = ["${dryRun}"]; |
| 1177 } |
| 1178 |
| 1179 _downloadOptions = null; |
| 1180 |
| 1181 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/products/' +
common_internal.Escaper.ecapeVariable('$productId'); |
| 1182 |
| 1183 var _response = _requester.request(_url, |
| 1184 "DELETE", |
| 1185 body: _body, |
| 1186 queryParams: _queryParams, |
| 1187 uploadOptions: _uploadOptions, |
| 1188 uploadMedia: _uploadMedia, |
| 1189 downloadOptions: _downloadOptions); |
| 1190 return _response.then((data) => null); |
| 1191 } |
| 1192 |
| 1193 /** |
| 1194 * Retrieves a product from your Merchant Center account. |
| 1195 * |
| 1196 * Request parameters: |
| 1197 * |
| 1198 * [merchantId] - The ID of the managing account. |
| 1199 * |
| 1200 * [productId] - The ID of the product. |
| 1201 * |
| 1202 * Completes with a [Product]. |
| 1203 * |
| 1204 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1205 * error. |
| 1206 * |
| 1207 * If the used [http.Client] completes with an error when making a REST call, |
| 1208 * this method will complete with the same error. |
| 1209 */ |
| 1210 async.Future<Product> get(core.String merchantId, core.String productId) { |
| 1211 var _url = null; |
| 1212 var _queryParams = new core.Map(); |
| 1213 var _uploadMedia = null; |
| 1214 var _uploadOptions = null; |
| 1215 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1216 var _body = null; |
| 1217 |
| 1218 if (merchantId == null) { |
| 1219 throw new core.ArgumentError("Parameter merchantId is required."); |
| 1220 } |
| 1221 if (productId == null) { |
| 1222 throw new core.ArgumentError("Parameter productId is required."); |
| 1223 } |
| 1224 |
| 1225 |
| 1226 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/products/' +
common_internal.Escaper.ecapeVariable('$productId'); |
| 1227 |
| 1228 var _response = _requester.request(_url, |
| 1229 "GET", |
| 1230 body: _body, |
| 1231 queryParams: _queryParams, |
| 1232 uploadOptions: _uploadOptions, |
| 1233 uploadMedia: _uploadMedia, |
| 1234 downloadOptions: _downloadOptions); |
| 1235 return _response.then((data) => new Product.fromJson(data)); |
| 1236 } |
| 1237 |
| 1238 /** |
| 1239 * Uploads a product to your Merchant Center account. |
| 1240 * |
| 1241 * [request] - The metadata request object. |
| 1242 * |
| 1243 * Request parameters: |
| 1244 * |
| 1245 * [merchantId] - The ID of the managing account. |
| 1246 * |
| 1247 * [dryRun] - Flag to run the request in dry-run mode. |
| 1248 * |
| 1249 * Completes with a [Product]. |
| 1250 * |
| 1251 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1252 * error. |
| 1253 * |
| 1254 * If the used [http.Client] completes with an error when making a REST call, |
| 1255 * this method will complete with the same error. |
| 1256 */ |
| 1257 async.Future<Product> insert(Product request, core.String merchantId, {core.bo
ol dryRun}) { |
| 1258 var _url = null; |
| 1259 var _queryParams = new core.Map(); |
| 1260 var _uploadMedia = null; |
| 1261 var _uploadOptions = null; |
| 1262 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1263 var _body = null; |
| 1264 |
| 1265 if (request != null) { |
| 1266 _body = convert.JSON.encode((request).toJson()); |
| 1267 } |
| 1268 if (merchantId == null) { |
| 1269 throw new core.ArgumentError("Parameter merchantId is required."); |
| 1270 } |
| 1271 if (dryRun != null) { |
| 1272 _queryParams["dryRun"] = ["${dryRun}"]; |
| 1273 } |
| 1274 |
| 1275 |
| 1276 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/products'; |
| 1277 |
| 1278 var _response = _requester.request(_url, |
| 1279 "POST", |
| 1280 body: _body, |
| 1281 queryParams: _queryParams, |
| 1282 uploadOptions: _uploadOptions, |
| 1283 uploadMedia: _uploadMedia, |
| 1284 downloadOptions: _downloadOptions); |
| 1285 return _response.then((data) => new Product.fromJson(data)); |
| 1286 } |
| 1287 |
| 1288 /** |
| 1289 * Lists the products in your Merchant Center account. |
| 1290 * |
| 1291 * Request parameters: |
| 1292 * |
| 1293 * [merchantId] - The ID of the managing account. |
| 1294 * |
| 1295 * [maxResults] - The maximum number of products to return in the response, |
| 1296 * used for paging. |
| 1297 * |
| 1298 * [pageToken] - The token returned by the previous request. |
| 1299 * |
| 1300 * Completes with a [ProductsListResponse]. |
| 1301 * |
| 1302 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1303 * error. |
| 1304 * |
| 1305 * If the used [http.Client] completes with an error when making a REST call, |
| 1306 * this method will complete with the same error. |
| 1307 */ |
| 1308 async.Future<ProductsListResponse> list(core.String merchantId, {core.int maxR
esults, core.String pageToken}) { |
| 1309 var _url = null; |
| 1310 var _queryParams = new core.Map(); |
| 1311 var _uploadMedia = null; |
| 1312 var _uploadOptions = null; |
| 1313 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1314 var _body = null; |
| 1315 |
| 1316 if (merchantId == null) { |
| 1317 throw new core.ArgumentError("Parameter merchantId is required."); |
| 1318 } |
| 1319 if (maxResults != null) { |
| 1320 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1321 } |
| 1322 if (pageToken != null) { |
| 1323 _queryParams["pageToken"] = [pageToken]; |
| 1324 } |
| 1325 |
| 1326 |
| 1327 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/products'; |
| 1328 |
| 1329 var _response = _requester.request(_url, |
| 1330 "GET", |
| 1331 body: _body, |
| 1332 queryParams: _queryParams, |
| 1333 uploadOptions: _uploadOptions, |
| 1334 uploadMedia: _uploadMedia, |
| 1335 downloadOptions: _downloadOptions); |
| 1336 return _response.then((data) => new ProductsListResponse.fromJson(data)); |
| 1337 } |
| 1338 |
| 1339 } |
| 1340 |
| 1341 |
| 1342 /** Not documented yet. */ |
| 1343 class ProductstatusesResourceApi { |
| 1344 final common_internal.ApiRequester _requester; |
| 1345 |
| 1346 ProductstatusesResourceApi(common_internal.ApiRequester client) : |
| 1347 _requester = client; |
| 1348 |
| 1349 /** |
| 1350 * Gets the statuses of multiple products in a single request. |
| 1351 * |
| 1352 * [request] - The metadata request object. |
| 1353 * |
| 1354 * Request parameters: |
| 1355 * |
| 1356 * Completes with a [ProductstatusesCustomBatchResponse]. |
| 1357 * |
| 1358 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1359 * error. |
| 1360 * |
| 1361 * If the used [http.Client] completes with an error when making a REST call, |
| 1362 * this method will complete with the same error. |
| 1363 */ |
| 1364 async.Future<ProductstatusesCustomBatchResponse> custombatch(ProductstatusesCu
stomBatchRequest request) { |
| 1365 var _url = null; |
| 1366 var _queryParams = new core.Map(); |
| 1367 var _uploadMedia = null; |
| 1368 var _uploadOptions = null; |
| 1369 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1370 var _body = null; |
| 1371 |
| 1372 if (request != null) { |
| 1373 _body = convert.JSON.encode((request).toJson()); |
| 1374 } |
| 1375 |
| 1376 |
| 1377 _url = 'productstatuses/batch'; |
| 1378 |
| 1379 var _response = _requester.request(_url, |
| 1380 "POST", |
| 1381 body: _body, |
| 1382 queryParams: _queryParams, |
| 1383 uploadOptions: _uploadOptions, |
| 1384 uploadMedia: _uploadMedia, |
| 1385 downloadOptions: _downloadOptions); |
| 1386 return _response.then((data) => new ProductstatusesCustomBatchResponse.fromJ
son(data)); |
| 1387 } |
| 1388 |
| 1389 /** |
| 1390 * Gets the status of a product from your Merchant Center account. |
| 1391 * |
| 1392 * Request parameters: |
| 1393 * |
| 1394 * [merchantId] - The ID of the managing account. |
| 1395 * |
| 1396 * [productId] - The ID of the product. |
| 1397 * |
| 1398 * Completes with a [ProductStatus]. |
| 1399 * |
| 1400 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1401 * error. |
| 1402 * |
| 1403 * If the used [http.Client] completes with an error when making a REST call, |
| 1404 * this method will complete with the same error. |
| 1405 */ |
| 1406 async.Future<ProductStatus> get(core.String merchantId, core.String productId)
{ |
| 1407 var _url = null; |
| 1408 var _queryParams = new core.Map(); |
| 1409 var _uploadMedia = null; |
| 1410 var _uploadOptions = null; |
| 1411 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1412 var _body = null; |
| 1413 |
| 1414 if (merchantId == null) { |
| 1415 throw new core.ArgumentError("Parameter merchantId is required."); |
| 1416 } |
| 1417 if (productId == null) { |
| 1418 throw new core.ArgumentError("Parameter productId is required."); |
| 1419 } |
| 1420 |
| 1421 |
| 1422 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/productstatu
ses/' + common_internal.Escaper.ecapeVariable('$productId'); |
| 1423 |
| 1424 var _response = _requester.request(_url, |
| 1425 "GET", |
| 1426 body: _body, |
| 1427 queryParams: _queryParams, |
| 1428 uploadOptions: _uploadOptions, |
| 1429 uploadMedia: _uploadMedia, |
| 1430 downloadOptions: _downloadOptions); |
| 1431 return _response.then((data) => new ProductStatus.fromJson(data)); |
| 1432 } |
| 1433 |
| 1434 /** |
| 1435 * Lists the statuses of the products in your Merchant Center account. |
| 1436 * |
| 1437 * Request parameters: |
| 1438 * |
| 1439 * [merchantId] - The ID of the managing account. |
| 1440 * |
| 1441 * [maxResults] - The maximum number of product statuses to return in the |
| 1442 * response, used for paging. |
| 1443 * |
| 1444 * [pageToken] - The token returned by the previous request. |
| 1445 * |
| 1446 * Completes with a [ProductstatusesListResponse]. |
| 1447 * |
| 1448 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1449 * error. |
| 1450 * |
| 1451 * If the used [http.Client] completes with an error when making a REST call, |
| 1452 * this method will complete with the same error. |
| 1453 */ |
| 1454 async.Future<ProductstatusesListResponse> list(core.String merchantId, {core.i
nt maxResults, core.String pageToken}) { |
| 1455 var _url = null; |
| 1456 var _queryParams = new core.Map(); |
| 1457 var _uploadMedia = null; |
| 1458 var _uploadOptions = null; |
| 1459 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1460 var _body = null; |
| 1461 |
| 1462 if (merchantId == null) { |
| 1463 throw new core.ArgumentError("Parameter merchantId is required."); |
| 1464 } |
| 1465 if (maxResults != null) { |
| 1466 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1467 } |
| 1468 if (pageToken != null) { |
| 1469 _queryParams["pageToken"] = [pageToken]; |
| 1470 } |
| 1471 |
| 1472 |
| 1473 _url = common_internal.Escaper.ecapeVariable('$merchantId') + '/productstatu
ses'; |
| 1474 |
| 1475 var _response = _requester.request(_url, |
| 1476 "GET", |
| 1477 body: _body, |
| 1478 queryParams: _queryParams, |
| 1479 uploadOptions: _uploadOptions, |
| 1480 uploadMedia: _uploadMedia, |
| 1481 downloadOptions: _downloadOptions); |
| 1482 return _response.then((data) => new ProductstatusesListResponse.fromJson(dat
a)); |
| 1483 } |
| 1484 |
| 1485 } |
| 1486 |
| 1487 |
| 1488 |
| 1489 /** Not documented yet. */ |
| 1490 class Account { |
| 1491 /** Indicates whether the merchant sells adult content. */ |
| 1492 core.bool adultContent; |
| 1493 |
| 1494 /** List of linked AdWords accounts. */ |
| 1495 core.List<AccountAdwordsLink> adwordsLinks; |
| 1496 |
| 1497 /** Merchant Center account ID. */ |
| 1498 core.String id; |
| 1499 |
| 1500 /** |
| 1501 * Identifies what kind of resource this is. Value: the fixed string |
| 1502 * "content#account". |
| 1503 */ |
| 1504 core.String kind; |
| 1505 |
| 1506 /** Display name for the account. */ |
| 1507 core.String name; |
| 1508 |
| 1509 /** |
| 1510 * URL for individual seller reviews, i.e., reviews for each child account. |
| 1511 */ |
| 1512 core.String reviewsUrl; |
| 1513 |
| 1514 /** Client-specific, locally-unique, internal ID for the child account. */ |
| 1515 core.String sellerId; |
| 1516 |
| 1517 /** |
| 1518 * Users with access to the account. Every account (except for subaccounts) |
| 1519 * must have at least one admin user. |
| 1520 */ |
| 1521 core.List<AccountUser> users; |
| 1522 |
| 1523 /** The merchant's website. */ |
| 1524 core.String websiteUrl; |
| 1525 |
| 1526 |
| 1527 Account(); |
| 1528 |
| 1529 Account.fromJson(core.Map _json) { |
| 1530 if (_json.containsKey("adultContent")) { |
| 1531 adultContent = _json["adultContent"]; |
| 1532 } |
| 1533 if (_json.containsKey("adwordsLinks")) { |
| 1534 adwordsLinks = _json["adwordsLinks"].map((value) => new AccountAdwordsLink
.fromJson(value)).toList(); |
| 1535 } |
| 1536 if (_json.containsKey("id")) { |
| 1537 id = _json["id"]; |
| 1538 } |
| 1539 if (_json.containsKey("kind")) { |
| 1540 kind = _json["kind"]; |
| 1541 } |
| 1542 if (_json.containsKey("name")) { |
| 1543 name = _json["name"]; |
| 1544 } |
| 1545 if (_json.containsKey("reviewsUrl")) { |
| 1546 reviewsUrl = _json["reviewsUrl"]; |
| 1547 } |
| 1548 if (_json.containsKey("sellerId")) { |
| 1549 sellerId = _json["sellerId"]; |
| 1550 } |
| 1551 if (_json.containsKey("users")) { |
| 1552 users = _json["users"].map((value) => new AccountUser.fromJson(value)).toL
ist(); |
| 1553 } |
| 1554 if (_json.containsKey("websiteUrl")) { |
| 1555 websiteUrl = _json["websiteUrl"]; |
| 1556 } |
| 1557 } |
| 1558 |
| 1559 core.Map toJson() { |
| 1560 var _json = new core.Map(); |
| 1561 if (adultContent != null) { |
| 1562 _json["adultContent"] = adultContent; |
| 1563 } |
| 1564 if (adwordsLinks != null) { |
| 1565 _json["adwordsLinks"] = adwordsLinks.map((value) => (value).toJson()).toLi
st(); |
| 1566 } |
| 1567 if (id != null) { |
| 1568 _json["id"] = id; |
| 1569 } |
| 1570 if (kind != null) { |
| 1571 _json["kind"] = kind; |
| 1572 } |
| 1573 if (name != null) { |
| 1574 _json["name"] = name; |
| 1575 } |
| 1576 if (reviewsUrl != null) { |
| 1577 _json["reviewsUrl"] = reviewsUrl; |
| 1578 } |
| 1579 if (sellerId != null) { |
| 1580 _json["sellerId"] = sellerId; |
| 1581 } |
| 1582 if (users != null) { |
| 1583 _json["users"] = users.map((value) => (value).toJson()).toList(); |
| 1584 } |
| 1585 if (websiteUrl != null) { |
| 1586 _json["websiteUrl"] = websiteUrl; |
| 1587 } |
| 1588 return _json; |
| 1589 } |
| 1590 } |
| 1591 |
| 1592 |
| 1593 /** Not documented yet. */ |
| 1594 class AccountAdwordsLink { |
| 1595 /** Customer ID of the AdWords account. */ |
| 1596 core.String adwordsId; |
| 1597 |
| 1598 /** |
| 1599 * Status of the link between this Merchant Center account and the AdWords |
| 1600 * account. |
| 1601 */ |
| 1602 core.String status; |
| 1603 |
| 1604 |
| 1605 AccountAdwordsLink(); |
| 1606 |
| 1607 AccountAdwordsLink.fromJson(core.Map _json) { |
| 1608 if (_json.containsKey("adwordsId")) { |
| 1609 adwordsId = _json["adwordsId"]; |
| 1610 } |
| 1611 if (_json.containsKey("status")) { |
| 1612 status = _json["status"]; |
| 1613 } |
| 1614 } |
| 1615 |
| 1616 core.Map toJson() { |
| 1617 var _json = new core.Map(); |
| 1618 if (adwordsId != null) { |
| 1619 _json["adwordsId"] = adwordsId; |
| 1620 } |
| 1621 if (status != null) { |
| 1622 _json["status"] = status; |
| 1623 } |
| 1624 return _json; |
| 1625 } |
| 1626 } |
| 1627 |
| 1628 |
| 1629 /** |
| 1630 * The status of an account, i.e., information about its products, which is |
| 1631 * computed offline and not returned immediately at insertion time. |
| 1632 */ |
| 1633 class AccountStatus { |
| 1634 /** The ID of the account for which the status is reported. */ |
| 1635 core.String accountId; |
| 1636 |
| 1637 /** A list of data quality issues. */ |
| 1638 core.List<AccountStatusDataQualityIssue> dataQualityIssues; |
| 1639 |
| 1640 /** |
| 1641 * Identifies what kind of resource this is. Value: the fixed string |
| 1642 * "content#accountStatus". |
| 1643 */ |
| 1644 core.String kind; |
| 1645 |
| 1646 |
| 1647 AccountStatus(); |
| 1648 |
| 1649 AccountStatus.fromJson(core.Map _json) { |
| 1650 if (_json.containsKey("accountId")) { |
| 1651 accountId = _json["accountId"]; |
| 1652 } |
| 1653 if (_json.containsKey("dataQualityIssues")) { |
| 1654 dataQualityIssues = _json["dataQualityIssues"].map((value) => new AccountS
tatusDataQualityIssue.fromJson(value)).toList(); |
| 1655 } |
| 1656 if (_json.containsKey("kind")) { |
| 1657 kind = _json["kind"]; |
| 1658 } |
| 1659 } |
| 1660 |
| 1661 core.Map toJson() { |
| 1662 var _json = new core.Map(); |
| 1663 if (accountId != null) { |
| 1664 _json["accountId"] = accountId; |
| 1665 } |
| 1666 if (dataQualityIssues != null) { |
| 1667 _json["dataQualityIssues"] = dataQualityIssues.map((value) => (value).toJs
on()).toList(); |
| 1668 } |
| 1669 if (kind != null) { |
| 1670 _json["kind"] = kind; |
| 1671 } |
| 1672 return _json; |
| 1673 } |
| 1674 } |
| 1675 |
| 1676 |
| 1677 /** Not documented yet. */ |
| 1678 class AccountStatusDataQualityIssue { |
| 1679 /** Country for which this issue is reported. */ |
| 1680 core.String country; |
| 1681 |
| 1682 /** Actual value displayed on the landing page. */ |
| 1683 core.String displayedValue; |
| 1684 |
| 1685 /** Example items featuring the issue. */ |
| 1686 core.List<AccountStatusExampleItem> exampleItems; |
| 1687 |
| 1688 /** Issue identifier. */ |
| 1689 core.String id; |
| 1690 |
| 1691 /** Last time the account was checked for this issue. */ |
| 1692 core.String lastChecked; |
| 1693 |
| 1694 /** Number of items in the account found to have the said issue. */ |
| 1695 core.int numItems; |
| 1696 |
| 1697 /** Severity of the problem. */ |
| 1698 core.String severity; |
| 1699 |
| 1700 /** Submitted value that causes the issue. */ |
| 1701 core.String submittedValue; |
| 1702 |
| 1703 |
| 1704 AccountStatusDataQualityIssue(); |
| 1705 |
| 1706 AccountStatusDataQualityIssue.fromJson(core.Map _json) { |
| 1707 if (_json.containsKey("country")) { |
| 1708 country = _json["country"]; |
| 1709 } |
| 1710 if (_json.containsKey("displayedValue")) { |
| 1711 displayedValue = _json["displayedValue"]; |
| 1712 } |
| 1713 if (_json.containsKey("exampleItems")) { |
| 1714 exampleItems = _json["exampleItems"].map((value) => new AccountStatusExamp
leItem.fromJson(value)).toList(); |
| 1715 } |
| 1716 if (_json.containsKey("id")) { |
| 1717 id = _json["id"]; |
| 1718 } |
| 1719 if (_json.containsKey("lastChecked")) { |
| 1720 lastChecked = _json["lastChecked"]; |
| 1721 } |
| 1722 if (_json.containsKey("numItems")) { |
| 1723 numItems = _json["numItems"]; |
| 1724 } |
| 1725 if (_json.containsKey("severity")) { |
| 1726 severity = _json["severity"]; |
| 1727 } |
| 1728 if (_json.containsKey("submittedValue")) { |
| 1729 submittedValue = _json["submittedValue"]; |
| 1730 } |
| 1731 } |
| 1732 |
| 1733 core.Map toJson() { |
| 1734 var _json = new core.Map(); |
| 1735 if (country != null) { |
| 1736 _json["country"] = country; |
| 1737 } |
| 1738 if (displayedValue != null) { |
| 1739 _json["displayedValue"] = displayedValue; |
| 1740 } |
| 1741 if (exampleItems != null) { |
| 1742 _json["exampleItems"] = exampleItems.map((value) => (value).toJson()).toLi
st(); |
| 1743 } |
| 1744 if (id != null) { |
| 1745 _json["id"] = id; |
| 1746 } |
| 1747 if (lastChecked != null) { |
| 1748 _json["lastChecked"] = lastChecked; |
| 1749 } |
| 1750 if (numItems != null) { |
| 1751 _json["numItems"] = numItems; |
| 1752 } |
| 1753 if (severity != null) { |
| 1754 _json["severity"] = severity; |
| 1755 } |
| 1756 if (submittedValue != null) { |
| 1757 _json["submittedValue"] = submittedValue; |
| 1758 } |
| 1759 return _json; |
| 1760 } |
| 1761 } |
| 1762 |
| 1763 |
| 1764 /** |
| 1765 * An example of an item that has poor data quality. An item value on the |
| 1766 * landing page differs from what is submitted, or conflicts with a policy. |
| 1767 */ |
| 1768 class AccountStatusExampleItem { |
| 1769 /** Unique item ID as specified in the uploaded product data. */ |
| 1770 core.String itemId; |
| 1771 |
| 1772 /** Landing page of the item. */ |
| 1773 core.String link; |
| 1774 |
| 1775 /** The item value that was submitted. */ |
| 1776 core.String submittedValue; |
| 1777 |
| 1778 /** Title of the item. */ |
| 1779 core.String title; |
| 1780 |
| 1781 /** The actual value on the landing page. */ |
| 1782 core.String valueOnLandingPage; |
| 1783 |
| 1784 |
| 1785 AccountStatusExampleItem(); |
| 1786 |
| 1787 AccountStatusExampleItem.fromJson(core.Map _json) { |
| 1788 if (_json.containsKey("itemId")) { |
| 1789 itemId = _json["itemId"]; |
| 1790 } |
| 1791 if (_json.containsKey("link")) { |
| 1792 link = _json["link"]; |
| 1793 } |
| 1794 if (_json.containsKey("submittedValue")) { |
| 1795 submittedValue = _json["submittedValue"]; |
| 1796 } |
| 1797 if (_json.containsKey("title")) { |
| 1798 title = _json["title"]; |
| 1799 } |
| 1800 if (_json.containsKey("valueOnLandingPage")) { |
| 1801 valueOnLandingPage = _json["valueOnLandingPage"]; |
| 1802 } |
| 1803 } |
| 1804 |
| 1805 core.Map toJson() { |
| 1806 var _json = new core.Map(); |
| 1807 if (itemId != null) { |
| 1808 _json["itemId"] = itemId; |
| 1809 } |
| 1810 if (link != null) { |
| 1811 _json["link"] = link; |
| 1812 } |
| 1813 if (submittedValue != null) { |
| 1814 _json["submittedValue"] = submittedValue; |
| 1815 } |
| 1816 if (title != null) { |
| 1817 _json["title"] = title; |
| 1818 } |
| 1819 if (valueOnLandingPage != null) { |
| 1820 _json["valueOnLandingPage"] = valueOnLandingPage; |
| 1821 } |
| 1822 return _json; |
| 1823 } |
| 1824 } |
| 1825 |
| 1826 |
| 1827 /** Not documented yet. */ |
| 1828 class AccountUser { |
| 1829 /** Whether user is an admin. */ |
| 1830 core.bool admin; |
| 1831 |
| 1832 /** User's email address. */ |
| 1833 core.String emailAddress; |
| 1834 |
| 1835 |
| 1836 AccountUser(); |
| 1837 |
| 1838 AccountUser.fromJson(core.Map _json) { |
| 1839 if (_json.containsKey("admin")) { |
| 1840 admin = _json["admin"]; |
| 1841 } |
| 1842 if (_json.containsKey("emailAddress")) { |
| 1843 emailAddress = _json["emailAddress"]; |
| 1844 } |
| 1845 } |
| 1846 |
| 1847 core.Map toJson() { |
| 1848 var _json = new core.Map(); |
| 1849 if (admin != null) { |
| 1850 _json["admin"] = admin; |
| 1851 } |
| 1852 if (emailAddress != null) { |
| 1853 _json["emailAddress"] = emailAddress; |
| 1854 } |
| 1855 return _json; |
| 1856 } |
| 1857 } |
| 1858 |
| 1859 |
| 1860 /** Not documented yet. */ |
| 1861 class AccountsCustomBatchRequest { |
| 1862 /** Not documented yet. */ |
| 1863 core.List<AccountsCustomBatchRequestEntry> entries; |
| 1864 |
| 1865 |
| 1866 AccountsCustomBatchRequest(); |
| 1867 |
| 1868 AccountsCustomBatchRequest.fromJson(core.Map _json) { |
| 1869 if (_json.containsKey("entries")) { |
| 1870 entries = _json["entries"].map((value) => new AccountsCustomBatchRequestEn
try.fromJson(value)).toList(); |
| 1871 } |
| 1872 } |
| 1873 |
| 1874 core.Map toJson() { |
| 1875 var _json = new core.Map(); |
| 1876 if (entries != null) { |
| 1877 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 1878 } |
| 1879 return _json; |
| 1880 } |
| 1881 } |
| 1882 |
| 1883 |
| 1884 /** |
| 1885 * A batch entry encoding a single non-batch request to the accounts service of |
| 1886 * the Content API for Shopping. |
| 1887 */ |
| 1888 class AccountsCustomBatchRequestEntry { |
| 1889 /** |
| 1890 * The account to create or update. Only defined if the method is insert or |
| 1891 * update. |
| 1892 */ |
| 1893 Account account; |
| 1894 |
| 1895 /** |
| 1896 * The ID of the account to get or delete. Only defined if the method is get |
| 1897 * or delete. |
| 1898 */ |
| 1899 core.String accountId; |
| 1900 |
| 1901 /** An entry ID, unique within the batch request. */ |
| 1902 core.int batchId; |
| 1903 |
| 1904 /** The ID of the managing account. */ |
| 1905 core.String merchantId; |
| 1906 |
| 1907 /** The method (get, insert, update, or delete). */ |
| 1908 core.String method; |
| 1909 |
| 1910 |
| 1911 AccountsCustomBatchRequestEntry(); |
| 1912 |
| 1913 AccountsCustomBatchRequestEntry.fromJson(core.Map _json) { |
| 1914 if (_json.containsKey("account")) { |
| 1915 account = new Account.fromJson(_json["account"]); |
| 1916 } |
| 1917 if (_json.containsKey("accountId")) { |
| 1918 accountId = _json["accountId"]; |
| 1919 } |
| 1920 if (_json.containsKey("batchId")) { |
| 1921 batchId = _json["batchId"]; |
| 1922 } |
| 1923 if (_json.containsKey("merchantId")) { |
| 1924 merchantId = _json["merchantId"]; |
| 1925 } |
| 1926 if (_json.containsKey("method")) { |
| 1927 method = _json["method"]; |
| 1928 } |
| 1929 } |
| 1930 |
| 1931 core.Map toJson() { |
| 1932 var _json = new core.Map(); |
| 1933 if (account != null) { |
| 1934 _json["account"] = (account).toJson(); |
| 1935 } |
| 1936 if (accountId != null) { |
| 1937 _json["accountId"] = accountId; |
| 1938 } |
| 1939 if (batchId != null) { |
| 1940 _json["batchId"] = batchId; |
| 1941 } |
| 1942 if (merchantId != null) { |
| 1943 _json["merchantId"] = merchantId; |
| 1944 } |
| 1945 if (method != null) { |
| 1946 _json["method"] = method; |
| 1947 } |
| 1948 return _json; |
| 1949 } |
| 1950 } |
| 1951 |
| 1952 |
| 1953 /** Not documented yet. */ |
| 1954 class AccountsCustomBatchResponse { |
| 1955 /** Not documented yet. */ |
| 1956 core.List<AccountsCustomBatchResponseEntry> entries; |
| 1957 |
| 1958 /** |
| 1959 * Identifies what kind of resource this is. Value: the fixed string |
| 1960 * "content#accountsCustomBatchResponse". |
| 1961 */ |
| 1962 core.String kind; |
| 1963 |
| 1964 |
| 1965 AccountsCustomBatchResponse(); |
| 1966 |
| 1967 AccountsCustomBatchResponse.fromJson(core.Map _json) { |
| 1968 if (_json.containsKey("entries")) { |
| 1969 entries = _json["entries"].map((value) => new AccountsCustomBatchResponseE
ntry.fromJson(value)).toList(); |
| 1970 } |
| 1971 if (_json.containsKey("kind")) { |
| 1972 kind = _json["kind"]; |
| 1973 } |
| 1974 } |
| 1975 |
| 1976 core.Map toJson() { |
| 1977 var _json = new core.Map(); |
| 1978 if (entries != null) { |
| 1979 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 1980 } |
| 1981 if (kind != null) { |
| 1982 _json["kind"] = kind; |
| 1983 } |
| 1984 return _json; |
| 1985 } |
| 1986 } |
| 1987 |
| 1988 |
| 1989 /** |
| 1990 * A batch entry encoding a single non-batch response from the accounts service |
| 1991 * of the Content API for Shopping. |
| 1992 */ |
| 1993 class AccountsCustomBatchResponseEntry { |
| 1994 /** |
| 1995 * The retrieved, created, or updated account. Not defined if the method was |
| 1996 * delete. |
| 1997 */ |
| 1998 Account account; |
| 1999 |
| 2000 /** The ID of the request entry this entry responds to. */ |
| 2001 core.int batchId; |
| 2002 |
| 2003 /** A list of errors defined if and only if the request failed. */ |
| 2004 Errors errors; |
| 2005 |
| 2006 /** |
| 2007 * Identifies what kind of resource this is. Value: the fixed string |
| 2008 * "content#accountsCustomBatchResponseEntry". |
| 2009 */ |
| 2010 core.String kind; |
| 2011 |
| 2012 |
| 2013 AccountsCustomBatchResponseEntry(); |
| 2014 |
| 2015 AccountsCustomBatchResponseEntry.fromJson(core.Map _json) { |
| 2016 if (_json.containsKey("account")) { |
| 2017 account = new Account.fromJson(_json["account"]); |
| 2018 } |
| 2019 if (_json.containsKey("batchId")) { |
| 2020 batchId = _json["batchId"]; |
| 2021 } |
| 2022 if (_json.containsKey("errors")) { |
| 2023 errors = new Errors.fromJson(_json["errors"]); |
| 2024 } |
| 2025 if (_json.containsKey("kind")) { |
| 2026 kind = _json["kind"]; |
| 2027 } |
| 2028 } |
| 2029 |
| 2030 core.Map toJson() { |
| 2031 var _json = new core.Map(); |
| 2032 if (account != null) { |
| 2033 _json["account"] = (account).toJson(); |
| 2034 } |
| 2035 if (batchId != null) { |
| 2036 _json["batchId"] = batchId; |
| 2037 } |
| 2038 if (errors != null) { |
| 2039 _json["errors"] = (errors).toJson(); |
| 2040 } |
| 2041 if (kind != null) { |
| 2042 _json["kind"] = kind; |
| 2043 } |
| 2044 return _json; |
| 2045 } |
| 2046 } |
| 2047 |
| 2048 |
| 2049 /** Not documented yet. */ |
| 2050 class AccountsListResponse { |
| 2051 /** |
| 2052 * Identifies what kind of resource this is. Value: the fixed string |
| 2053 * "content#accountsListResponse". |
| 2054 */ |
| 2055 core.String kind; |
| 2056 |
| 2057 /** Not documented yet. */ |
| 2058 core.String nextPageToken; |
| 2059 |
| 2060 /** Not documented yet. */ |
| 2061 core.List<Account> resources; |
| 2062 |
| 2063 |
| 2064 AccountsListResponse(); |
| 2065 |
| 2066 AccountsListResponse.fromJson(core.Map _json) { |
| 2067 if (_json.containsKey("kind")) { |
| 2068 kind = _json["kind"]; |
| 2069 } |
| 2070 if (_json.containsKey("nextPageToken")) { |
| 2071 nextPageToken = _json["nextPageToken"]; |
| 2072 } |
| 2073 if (_json.containsKey("resources")) { |
| 2074 resources = _json["resources"].map((value) => new Account.fromJson(value))
.toList(); |
| 2075 } |
| 2076 } |
| 2077 |
| 2078 core.Map toJson() { |
| 2079 var _json = new core.Map(); |
| 2080 if (kind != null) { |
| 2081 _json["kind"] = kind; |
| 2082 } |
| 2083 if (nextPageToken != null) { |
| 2084 _json["nextPageToken"] = nextPageToken; |
| 2085 } |
| 2086 if (resources != null) { |
| 2087 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 2088 } |
| 2089 return _json; |
| 2090 } |
| 2091 } |
| 2092 |
| 2093 |
| 2094 /** Not documented yet. */ |
| 2095 class AccountstatusesCustomBatchRequest { |
| 2096 /** Not documented yet. */ |
| 2097 core.List<AccountstatusesCustomBatchRequestEntry> entries; |
| 2098 |
| 2099 |
| 2100 AccountstatusesCustomBatchRequest(); |
| 2101 |
| 2102 AccountstatusesCustomBatchRequest.fromJson(core.Map _json) { |
| 2103 if (_json.containsKey("entries")) { |
| 2104 entries = _json["entries"].map((value) => new AccountstatusesCustomBatchRe
questEntry.fromJson(value)).toList(); |
| 2105 } |
| 2106 } |
| 2107 |
| 2108 core.Map toJson() { |
| 2109 var _json = new core.Map(); |
| 2110 if (entries != null) { |
| 2111 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 2112 } |
| 2113 return _json; |
| 2114 } |
| 2115 } |
| 2116 |
| 2117 |
| 2118 /** |
| 2119 * A batch entry encoding a single non-batch request to the accountstatuses |
| 2120 * service of the Content API for Shopping. |
| 2121 */ |
| 2122 class AccountstatusesCustomBatchRequestEntry { |
| 2123 /** The ID of the (sub-)account whose status to get. */ |
| 2124 core.String accountId; |
| 2125 |
| 2126 /** An entry ID, unique within the batch request. */ |
| 2127 core.int batchId; |
| 2128 |
| 2129 /** The ID of the managing account. */ |
| 2130 core.String merchantId; |
| 2131 |
| 2132 /** The method (get). */ |
| 2133 core.String method; |
| 2134 |
| 2135 |
| 2136 AccountstatusesCustomBatchRequestEntry(); |
| 2137 |
| 2138 AccountstatusesCustomBatchRequestEntry.fromJson(core.Map _json) { |
| 2139 if (_json.containsKey("accountId")) { |
| 2140 accountId = _json["accountId"]; |
| 2141 } |
| 2142 if (_json.containsKey("batchId")) { |
| 2143 batchId = _json["batchId"]; |
| 2144 } |
| 2145 if (_json.containsKey("merchantId")) { |
| 2146 merchantId = _json["merchantId"]; |
| 2147 } |
| 2148 if (_json.containsKey("method")) { |
| 2149 method = _json["method"]; |
| 2150 } |
| 2151 } |
| 2152 |
| 2153 core.Map toJson() { |
| 2154 var _json = new core.Map(); |
| 2155 if (accountId != null) { |
| 2156 _json["accountId"] = accountId; |
| 2157 } |
| 2158 if (batchId != null) { |
| 2159 _json["batchId"] = batchId; |
| 2160 } |
| 2161 if (merchantId != null) { |
| 2162 _json["merchantId"] = merchantId; |
| 2163 } |
| 2164 if (method != null) { |
| 2165 _json["method"] = method; |
| 2166 } |
| 2167 return _json; |
| 2168 } |
| 2169 } |
| 2170 |
| 2171 |
| 2172 /** Not documented yet. */ |
| 2173 class AccountstatusesCustomBatchResponse { |
| 2174 /** Not documented yet. */ |
| 2175 core.List<AccountstatusesCustomBatchResponseEntry> entries; |
| 2176 |
| 2177 /** |
| 2178 * Identifies what kind of resource this is. Value: the fixed string |
| 2179 * "content#accountstatusesCustomBatchResponse". |
| 2180 */ |
| 2181 core.String kind; |
| 2182 |
| 2183 |
| 2184 AccountstatusesCustomBatchResponse(); |
| 2185 |
| 2186 AccountstatusesCustomBatchResponse.fromJson(core.Map _json) { |
| 2187 if (_json.containsKey("entries")) { |
| 2188 entries = _json["entries"].map((value) => new AccountstatusesCustomBatchRe
sponseEntry.fromJson(value)).toList(); |
| 2189 } |
| 2190 if (_json.containsKey("kind")) { |
| 2191 kind = _json["kind"]; |
| 2192 } |
| 2193 } |
| 2194 |
| 2195 core.Map toJson() { |
| 2196 var _json = new core.Map(); |
| 2197 if (entries != null) { |
| 2198 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 2199 } |
| 2200 if (kind != null) { |
| 2201 _json["kind"] = kind; |
| 2202 } |
| 2203 return _json; |
| 2204 } |
| 2205 } |
| 2206 |
| 2207 |
| 2208 /** |
| 2209 * A batch entry encoding a single non-batch response from the accountstatuses |
| 2210 * service of the Content API for Shopping. |
| 2211 */ |
| 2212 class AccountstatusesCustomBatchResponseEntry { |
| 2213 /** |
| 2214 * The requested account status. Defined if and only if the request was |
| 2215 * successful. |
| 2216 */ |
| 2217 AccountStatus accountStatus; |
| 2218 |
| 2219 /** The ID of the request entry this entry responds to. */ |
| 2220 core.int batchId; |
| 2221 |
| 2222 /** A list of errors defined if and only if the request failed. */ |
| 2223 Errors errors; |
| 2224 |
| 2225 |
| 2226 AccountstatusesCustomBatchResponseEntry(); |
| 2227 |
| 2228 AccountstatusesCustomBatchResponseEntry.fromJson(core.Map _json) { |
| 2229 if (_json.containsKey("accountStatus")) { |
| 2230 accountStatus = new AccountStatus.fromJson(_json["accountStatus"]); |
| 2231 } |
| 2232 if (_json.containsKey("batchId")) { |
| 2233 batchId = _json["batchId"]; |
| 2234 } |
| 2235 if (_json.containsKey("errors")) { |
| 2236 errors = new Errors.fromJson(_json["errors"]); |
| 2237 } |
| 2238 } |
| 2239 |
| 2240 core.Map toJson() { |
| 2241 var _json = new core.Map(); |
| 2242 if (accountStatus != null) { |
| 2243 _json["accountStatus"] = (accountStatus).toJson(); |
| 2244 } |
| 2245 if (batchId != null) { |
| 2246 _json["batchId"] = batchId; |
| 2247 } |
| 2248 if (errors != null) { |
| 2249 _json["errors"] = (errors).toJson(); |
| 2250 } |
| 2251 return _json; |
| 2252 } |
| 2253 } |
| 2254 |
| 2255 |
| 2256 /** Not documented yet. */ |
| 2257 class AccountstatusesListResponse { |
| 2258 /** |
| 2259 * Identifies what kind of resource this is. Value: the fixed string |
| 2260 * "content#accountstatusesListResponse". |
| 2261 */ |
| 2262 core.String kind; |
| 2263 |
| 2264 /** Not documented yet. */ |
| 2265 core.String nextPageToken; |
| 2266 |
| 2267 /** Not documented yet. */ |
| 2268 core.List<AccountStatus> resources; |
| 2269 |
| 2270 |
| 2271 AccountstatusesListResponse(); |
| 2272 |
| 2273 AccountstatusesListResponse.fromJson(core.Map _json) { |
| 2274 if (_json.containsKey("kind")) { |
| 2275 kind = _json["kind"]; |
| 2276 } |
| 2277 if (_json.containsKey("nextPageToken")) { |
| 2278 nextPageToken = _json["nextPageToken"]; |
| 2279 } |
| 2280 if (_json.containsKey("resources")) { |
| 2281 resources = _json["resources"].map((value) => new AccountStatus.fromJson(v
alue)).toList(); |
| 2282 } |
| 2283 } |
| 2284 |
| 2285 core.Map toJson() { |
| 2286 var _json = new core.Map(); |
| 2287 if (kind != null) { |
| 2288 _json["kind"] = kind; |
| 2289 } |
| 2290 if (nextPageToken != null) { |
| 2291 _json["nextPageToken"] = nextPageToken; |
| 2292 } |
| 2293 if (resources != null) { |
| 2294 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 2295 } |
| 2296 return _json; |
| 2297 } |
| 2298 } |
| 2299 |
| 2300 |
| 2301 /** Not documented yet. */ |
| 2302 class Datafeed { |
| 2303 /** |
| 2304 * The two-letter ISO 639-1 language in which the attributes are defined in |
| 2305 * the data feed. |
| 2306 */ |
| 2307 core.String attributeLanguage; |
| 2308 |
| 2309 /** The two-letter ISO 639-1 language of the items in the feed. */ |
| 2310 core.String contentLanguage; |
| 2311 |
| 2312 /** The type of data feed. */ |
| 2313 core.String contentType; |
| 2314 |
| 2315 /** Fetch schedule for the feed file. */ |
| 2316 DatafeedFetchSchedule fetchSchedule; |
| 2317 |
| 2318 /** The filename of the feed. All feeds must have a unique file name. */ |
| 2319 core.String fileName; |
| 2320 |
| 2321 /** Format of the feed file. */ |
| 2322 DatafeedFormat format; |
| 2323 |
| 2324 /** The ID of the data feed. */ |
| 2325 core.String id; |
| 2326 |
| 2327 /** |
| 2328 * The list of intended destinations (corresponds to checked check boxes in |
| 2329 * Merchant Center). |
| 2330 */ |
| 2331 core.List<core.String> intendedDestinations; |
| 2332 |
| 2333 /** |
| 2334 * Identifies what kind of resource this is. Value: the fixed string |
| 2335 * "content#datafeed". |
| 2336 */ |
| 2337 core.String kind; |
| 2338 |
| 2339 /** A descriptive name of the data feed. */ |
| 2340 core.String name; |
| 2341 |
| 2342 /** |
| 2343 * The two-letter ISO 3166 country where the items in the feed will be |
| 2344 * included in the search index. |
| 2345 */ |
| 2346 core.String targetCountry; |
| 2347 |
| 2348 |
| 2349 Datafeed(); |
| 2350 |
| 2351 Datafeed.fromJson(core.Map _json) { |
| 2352 if (_json.containsKey("attributeLanguage")) { |
| 2353 attributeLanguage = _json["attributeLanguage"]; |
| 2354 } |
| 2355 if (_json.containsKey("contentLanguage")) { |
| 2356 contentLanguage = _json["contentLanguage"]; |
| 2357 } |
| 2358 if (_json.containsKey("contentType")) { |
| 2359 contentType = _json["contentType"]; |
| 2360 } |
| 2361 if (_json.containsKey("fetchSchedule")) { |
| 2362 fetchSchedule = new DatafeedFetchSchedule.fromJson(_json["fetchSchedule"])
; |
| 2363 } |
| 2364 if (_json.containsKey("fileName")) { |
| 2365 fileName = _json["fileName"]; |
| 2366 } |
| 2367 if (_json.containsKey("format")) { |
| 2368 format = new DatafeedFormat.fromJson(_json["format"]); |
| 2369 } |
| 2370 if (_json.containsKey("id")) { |
| 2371 id = _json["id"]; |
| 2372 } |
| 2373 if (_json.containsKey("intendedDestinations")) { |
| 2374 intendedDestinations = _json["intendedDestinations"]; |
| 2375 } |
| 2376 if (_json.containsKey("kind")) { |
| 2377 kind = _json["kind"]; |
| 2378 } |
| 2379 if (_json.containsKey("name")) { |
| 2380 name = _json["name"]; |
| 2381 } |
| 2382 if (_json.containsKey("targetCountry")) { |
| 2383 targetCountry = _json["targetCountry"]; |
| 2384 } |
| 2385 } |
| 2386 |
| 2387 core.Map toJson() { |
| 2388 var _json = new core.Map(); |
| 2389 if (attributeLanguage != null) { |
| 2390 _json["attributeLanguage"] = attributeLanguage; |
| 2391 } |
| 2392 if (contentLanguage != null) { |
| 2393 _json["contentLanguage"] = contentLanguage; |
| 2394 } |
| 2395 if (contentType != null) { |
| 2396 _json["contentType"] = contentType; |
| 2397 } |
| 2398 if (fetchSchedule != null) { |
| 2399 _json["fetchSchedule"] = (fetchSchedule).toJson(); |
| 2400 } |
| 2401 if (fileName != null) { |
| 2402 _json["fileName"] = fileName; |
| 2403 } |
| 2404 if (format != null) { |
| 2405 _json["format"] = (format).toJson(); |
| 2406 } |
| 2407 if (id != null) { |
| 2408 _json["id"] = id; |
| 2409 } |
| 2410 if (intendedDestinations != null) { |
| 2411 _json["intendedDestinations"] = intendedDestinations; |
| 2412 } |
| 2413 if (kind != null) { |
| 2414 _json["kind"] = kind; |
| 2415 } |
| 2416 if (name != null) { |
| 2417 _json["name"] = name; |
| 2418 } |
| 2419 if (targetCountry != null) { |
| 2420 _json["targetCountry"] = targetCountry; |
| 2421 } |
| 2422 return _json; |
| 2423 } |
| 2424 } |
| 2425 |
| 2426 |
| 2427 /** |
| 2428 * The required fields vary based on the frequency of fetching. For a monthly |
| 2429 * fetch schedule, day_of_month and hour are required. For a weekly fetch |
| 2430 * schedule, weekday and hour are required. For a daily fetch schedule, only |
| 2431 * hour is required. |
| 2432 */ |
| 2433 class DatafeedFetchSchedule { |
| 2434 /** The day of the month the feed file should be fetched (1-31). */ |
| 2435 core.int dayOfMonth; |
| 2436 |
| 2437 /** |
| 2438 * The URL where the feed file can be fetched. Google Merchant Center will |
| 2439 * support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP |
| 2440 * protocols, so the value will need to be a valid link using one of those |
| 2441 * four protocols. |
| 2442 */ |
| 2443 core.String fetchUrl; |
| 2444 |
| 2445 /** The hour of the day the feed file should be fetched (0-24). */ |
| 2446 core.int hour; |
| 2447 |
| 2448 /** An optional password for fetch_url. */ |
| 2449 core.String password; |
| 2450 |
| 2451 /** |
| 2452 * Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". |
| 2453 */ |
| 2454 core.String timeZone; |
| 2455 |
| 2456 /** An optional user name for fetch_url. */ |
| 2457 core.String username; |
| 2458 |
| 2459 /** The day of the week the feed file should be fetched. */ |
| 2460 core.String weekday; |
| 2461 |
| 2462 |
| 2463 DatafeedFetchSchedule(); |
| 2464 |
| 2465 DatafeedFetchSchedule.fromJson(core.Map _json) { |
| 2466 if (_json.containsKey("dayOfMonth")) { |
| 2467 dayOfMonth = _json["dayOfMonth"]; |
| 2468 } |
| 2469 if (_json.containsKey("fetchUrl")) { |
| 2470 fetchUrl = _json["fetchUrl"]; |
| 2471 } |
| 2472 if (_json.containsKey("hour")) { |
| 2473 hour = _json["hour"]; |
| 2474 } |
| 2475 if (_json.containsKey("password")) { |
| 2476 password = _json["password"]; |
| 2477 } |
| 2478 if (_json.containsKey("timeZone")) { |
| 2479 timeZone = _json["timeZone"]; |
| 2480 } |
| 2481 if (_json.containsKey("username")) { |
| 2482 username = _json["username"]; |
| 2483 } |
| 2484 if (_json.containsKey("weekday")) { |
| 2485 weekday = _json["weekday"]; |
| 2486 } |
| 2487 } |
| 2488 |
| 2489 core.Map toJson() { |
| 2490 var _json = new core.Map(); |
| 2491 if (dayOfMonth != null) { |
| 2492 _json["dayOfMonth"] = dayOfMonth; |
| 2493 } |
| 2494 if (fetchUrl != null) { |
| 2495 _json["fetchUrl"] = fetchUrl; |
| 2496 } |
| 2497 if (hour != null) { |
| 2498 _json["hour"] = hour; |
| 2499 } |
| 2500 if (password != null) { |
| 2501 _json["password"] = password; |
| 2502 } |
| 2503 if (timeZone != null) { |
| 2504 _json["timeZone"] = timeZone; |
| 2505 } |
| 2506 if (username != null) { |
| 2507 _json["username"] = username; |
| 2508 } |
| 2509 if (weekday != null) { |
| 2510 _json["weekday"] = weekday; |
| 2511 } |
| 2512 return _json; |
| 2513 } |
| 2514 } |
| 2515 |
| 2516 |
| 2517 /** Not documented yet. */ |
| 2518 class DatafeedFormat { |
| 2519 /** |
| 2520 * Delimiter for the separation of values in a delimiter-separated values |
| 2521 * feed. If not specified, the delimiter will be auto-detected. Ignored for |
| 2522 * non-DSV data feeds. |
| 2523 */ |
| 2524 core.String columnDelimiter; |
| 2525 |
| 2526 /** |
| 2527 * Character encoding scheme of the data feed. If not specified, the encoding |
| 2528 * will be auto-detected. |
| 2529 */ |
| 2530 core.String fileEncoding; |
| 2531 |
| 2532 /** |
| 2533 * Specifies how double quotes are interpreted. If not specified, the mode |
| 2534 * will be auto-detected. Ignored for non-DSV data feeds. |
| 2535 */ |
| 2536 core.String quotingMode; |
| 2537 |
| 2538 |
| 2539 DatafeedFormat(); |
| 2540 |
| 2541 DatafeedFormat.fromJson(core.Map _json) { |
| 2542 if (_json.containsKey("columnDelimiter")) { |
| 2543 columnDelimiter = _json["columnDelimiter"]; |
| 2544 } |
| 2545 if (_json.containsKey("fileEncoding")) { |
| 2546 fileEncoding = _json["fileEncoding"]; |
| 2547 } |
| 2548 if (_json.containsKey("quotingMode")) { |
| 2549 quotingMode = _json["quotingMode"]; |
| 2550 } |
| 2551 } |
| 2552 |
| 2553 core.Map toJson() { |
| 2554 var _json = new core.Map(); |
| 2555 if (columnDelimiter != null) { |
| 2556 _json["columnDelimiter"] = columnDelimiter; |
| 2557 } |
| 2558 if (fileEncoding != null) { |
| 2559 _json["fileEncoding"] = fileEncoding; |
| 2560 } |
| 2561 if (quotingMode != null) { |
| 2562 _json["quotingMode"] = quotingMode; |
| 2563 } |
| 2564 return _json; |
| 2565 } |
| 2566 } |
| 2567 |
| 2568 |
| 2569 /** Not documented yet. */ |
| 2570 class DatafeedStatus { |
| 2571 /** The ID of the feed for which the status is reported. */ |
| 2572 core.String datafeedId; |
| 2573 |
| 2574 /** The list of errors occurring in the feed. */ |
| 2575 core.List<DatafeedStatusError> errors; |
| 2576 |
| 2577 /** The number of items in the feed that were processed. */ |
| 2578 core.String itemsTotal; |
| 2579 |
| 2580 /** The number of items in the feed that were valid. */ |
| 2581 core.String itemsValid; |
| 2582 |
| 2583 /** |
| 2584 * Identifies what kind of resource this is. Value: the fixed string |
| 2585 * "content#datafeedStatus". |
| 2586 */ |
| 2587 core.String kind; |
| 2588 |
| 2589 /** The processing status of the feed. */ |
| 2590 core.String processingStatus; |
| 2591 |
| 2592 /** The list of errors occurring in the feed. */ |
| 2593 core.List<DatafeedStatusError> warnings; |
| 2594 |
| 2595 |
| 2596 DatafeedStatus(); |
| 2597 |
| 2598 DatafeedStatus.fromJson(core.Map _json) { |
| 2599 if (_json.containsKey("datafeedId")) { |
| 2600 datafeedId = _json["datafeedId"]; |
| 2601 } |
| 2602 if (_json.containsKey("errors")) { |
| 2603 errors = _json["errors"].map((value) => new DatafeedStatusError.fromJson(v
alue)).toList(); |
| 2604 } |
| 2605 if (_json.containsKey("itemsTotal")) { |
| 2606 itemsTotal = _json["itemsTotal"]; |
| 2607 } |
| 2608 if (_json.containsKey("itemsValid")) { |
| 2609 itemsValid = _json["itemsValid"]; |
| 2610 } |
| 2611 if (_json.containsKey("kind")) { |
| 2612 kind = _json["kind"]; |
| 2613 } |
| 2614 if (_json.containsKey("processingStatus")) { |
| 2615 processingStatus = _json["processingStatus"]; |
| 2616 } |
| 2617 if (_json.containsKey("warnings")) { |
| 2618 warnings = _json["warnings"].map((value) => new DatafeedStatusError.fromJs
on(value)).toList(); |
| 2619 } |
| 2620 } |
| 2621 |
| 2622 core.Map toJson() { |
| 2623 var _json = new core.Map(); |
| 2624 if (datafeedId != null) { |
| 2625 _json["datafeedId"] = datafeedId; |
| 2626 } |
| 2627 if (errors != null) { |
| 2628 _json["errors"] = errors.map((value) => (value).toJson()).toList(); |
| 2629 } |
| 2630 if (itemsTotal != null) { |
| 2631 _json["itemsTotal"] = itemsTotal; |
| 2632 } |
| 2633 if (itemsValid != null) { |
| 2634 _json["itemsValid"] = itemsValid; |
| 2635 } |
| 2636 if (kind != null) { |
| 2637 _json["kind"] = kind; |
| 2638 } |
| 2639 if (processingStatus != null) { |
| 2640 _json["processingStatus"] = processingStatus; |
| 2641 } |
| 2642 if (warnings != null) { |
| 2643 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); |
| 2644 } |
| 2645 return _json; |
| 2646 } |
| 2647 } |
| 2648 |
| 2649 |
| 2650 /** An error occurring in the feed, like "invalid price". */ |
| 2651 class DatafeedStatusError { |
| 2652 /** The code of the error, e.g., "validation/invalid_value". */ |
| 2653 core.String code; |
| 2654 |
| 2655 /** The number of occurrences of the error in the feed. */ |
| 2656 core.String count; |
| 2657 |
| 2658 /** A list of example occurrences of the error, grouped by product. */ |
| 2659 core.List<DatafeedStatusExample> examples; |
| 2660 |
| 2661 /** The error message, e.g., "Invalid price". */ |
| 2662 core.String message; |
| 2663 |
| 2664 |
| 2665 DatafeedStatusError(); |
| 2666 |
| 2667 DatafeedStatusError.fromJson(core.Map _json) { |
| 2668 if (_json.containsKey("code")) { |
| 2669 code = _json["code"]; |
| 2670 } |
| 2671 if (_json.containsKey("count")) { |
| 2672 count = _json["count"]; |
| 2673 } |
| 2674 if (_json.containsKey("examples")) { |
| 2675 examples = _json["examples"].map((value) => new DatafeedStatusExample.from
Json(value)).toList(); |
| 2676 } |
| 2677 if (_json.containsKey("message")) { |
| 2678 message = _json["message"]; |
| 2679 } |
| 2680 } |
| 2681 |
| 2682 core.Map toJson() { |
| 2683 var _json = new core.Map(); |
| 2684 if (code != null) { |
| 2685 _json["code"] = code; |
| 2686 } |
| 2687 if (count != null) { |
| 2688 _json["count"] = count; |
| 2689 } |
| 2690 if (examples != null) { |
| 2691 _json["examples"] = examples.map((value) => (value).toJson()).toList(); |
| 2692 } |
| 2693 if (message != null) { |
| 2694 _json["message"] = message; |
| 2695 } |
| 2696 return _json; |
| 2697 } |
| 2698 } |
| 2699 |
| 2700 |
| 2701 /** An example occurrence for a particular error. */ |
| 2702 class DatafeedStatusExample { |
| 2703 /** The ID of the example item. */ |
| 2704 core.String itemId; |
| 2705 |
| 2706 /** Line number in the data feed where the example is found. */ |
| 2707 core.String lineNumber; |
| 2708 |
| 2709 /** The problematic value. */ |
| 2710 core.String value; |
| 2711 |
| 2712 |
| 2713 DatafeedStatusExample(); |
| 2714 |
| 2715 DatafeedStatusExample.fromJson(core.Map _json) { |
| 2716 if (_json.containsKey("itemId")) { |
| 2717 itemId = _json["itemId"]; |
| 2718 } |
| 2719 if (_json.containsKey("lineNumber")) { |
| 2720 lineNumber = _json["lineNumber"]; |
| 2721 } |
| 2722 if (_json.containsKey("value")) { |
| 2723 value = _json["value"]; |
| 2724 } |
| 2725 } |
| 2726 |
| 2727 core.Map toJson() { |
| 2728 var _json = new core.Map(); |
| 2729 if (itemId != null) { |
| 2730 _json["itemId"] = itemId; |
| 2731 } |
| 2732 if (lineNumber != null) { |
| 2733 _json["lineNumber"] = lineNumber; |
| 2734 } |
| 2735 if (value != null) { |
| 2736 _json["value"] = value; |
| 2737 } |
| 2738 return _json; |
| 2739 } |
| 2740 } |
| 2741 |
| 2742 |
| 2743 /** Not documented yet. */ |
| 2744 class DatafeedsCustomBatchRequest { |
| 2745 /** Not documented yet. */ |
| 2746 core.List<DatafeedsCustomBatchRequestEntry> entries; |
| 2747 |
| 2748 |
| 2749 DatafeedsCustomBatchRequest(); |
| 2750 |
| 2751 DatafeedsCustomBatchRequest.fromJson(core.Map _json) { |
| 2752 if (_json.containsKey("entries")) { |
| 2753 entries = _json["entries"].map((value) => new DatafeedsCustomBatchRequestE
ntry.fromJson(value)).toList(); |
| 2754 } |
| 2755 } |
| 2756 |
| 2757 core.Map toJson() { |
| 2758 var _json = new core.Map(); |
| 2759 if (entries != null) { |
| 2760 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 2761 } |
| 2762 return _json; |
| 2763 } |
| 2764 } |
| 2765 |
| 2766 |
| 2767 /** |
| 2768 * A batch entry encoding a single non-batch request to the datafeeds service of |
| 2769 * the Content API for Shopping. |
| 2770 */ |
| 2771 class DatafeedsCustomBatchRequestEntry { |
| 2772 /** An entry ID, unique within the batch request. */ |
| 2773 core.int batchId; |
| 2774 |
| 2775 /** The data feed to insert. */ |
| 2776 Datafeed datafeed; |
| 2777 |
| 2778 /** The ID of the data feed to get or delete. */ |
| 2779 core.String datafeedId; |
| 2780 |
| 2781 /** The ID of the managing account. */ |
| 2782 core.String merchantId; |
| 2783 |
| 2784 /** The method (get, insert, update, or delete). */ |
| 2785 core.String method; |
| 2786 |
| 2787 |
| 2788 DatafeedsCustomBatchRequestEntry(); |
| 2789 |
| 2790 DatafeedsCustomBatchRequestEntry.fromJson(core.Map _json) { |
| 2791 if (_json.containsKey("batchId")) { |
| 2792 batchId = _json["batchId"]; |
| 2793 } |
| 2794 if (_json.containsKey("datafeed")) { |
| 2795 datafeed = new Datafeed.fromJson(_json["datafeed"]); |
| 2796 } |
| 2797 if (_json.containsKey("datafeedId")) { |
| 2798 datafeedId = _json["datafeedId"]; |
| 2799 } |
| 2800 if (_json.containsKey("merchantId")) { |
| 2801 merchantId = _json["merchantId"]; |
| 2802 } |
| 2803 if (_json.containsKey("method")) { |
| 2804 method = _json["method"]; |
| 2805 } |
| 2806 } |
| 2807 |
| 2808 core.Map toJson() { |
| 2809 var _json = new core.Map(); |
| 2810 if (batchId != null) { |
| 2811 _json["batchId"] = batchId; |
| 2812 } |
| 2813 if (datafeed != null) { |
| 2814 _json["datafeed"] = (datafeed).toJson(); |
| 2815 } |
| 2816 if (datafeedId != null) { |
| 2817 _json["datafeedId"] = datafeedId; |
| 2818 } |
| 2819 if (merchantId != null) { |
| 2820 _json["merchantId"] = merchantId; |
| 2821 } |
| 2822 if (method != null) { |
| 2823 _json["method"] = method; |
| 2824 } |
| 2825 return _json; |
| 2826 } |
| 2827 } |
| 2828 |
| 2829 |
| 2830 /** Not documented yet. */ |
| 2831 class DatafeedsCustomBatchResponse { |
| 2832 /** Not documented yet. */ |
| 2833 core.List<DatafeedsCustomBatchResponseEntry> entries; |
| 2834 |
| 2835 /** |
| 2836 * Identifies what kind of resource this is. Value: the fixed string |
| 2837 * "content#datafeedsCustomBatchResponse". |
| 2838 */ |
| 2839 core.String kind; |
| 2840 |
| 2841 |
| 2842 DatafeedsCustomBatchResponse(); |
| 2843 |
| 2844 DatafeedsCustomBatchResponse.fromJson(core.Map _json) { |
| 2845 if (_json.containsKey("entries")) { |
| 2846 entries = _json["entries"].map((value) => new DatafeedsCustomBatchResponse
Entry.fromJson(value)).toList(); |
| 2847 } |
| 2848 if (_json.containsKey("kind")) { |
| 2849 kind = _json["kind"]; |
| 2850 } |
| 2851 } |
| 2852 |
| 2853 core.Map toJson() { |
| 2854 var _json = new core.Map(); |
| 2855 if (entries != null) { |
| 2856 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 2857 } |
| 2858 if (kind != null) { |
| 2859 _json["kind"] = kind; |
| 2860 } |
| 2861 return _json; |
| 2862 } |
| 2863 } |
| 2864 |
| 2865 |
| 2866 /** |
| 2867 * A batch entry encoding a single non-batch response from the datafeeds service |
| 2868 * of the Content API for Shopping. |
| 2869 */ |
| 2870 class DatafeedsCustomBatchResponseEntry { |
| 2871 /** The ID of the request entry this entry responds to. */ |
| 2872 core.int batchId; |
| 2873 |
| 2874 /** |
| 2875 * The requested data feed. Defined if and only if the request was successful. |
| 2876 */ |
| 2877 Datafeed datafeed; |
| 2878 |
| 2879 /** A list of errors defined if and only if the request failed. */ |
| 2880 Errors errors; |
| 2881 |
| 2882 |
| 2883 DatafeedsCustomBatchResponseEntry(); |
| 2884 |
| 2885 DatafeedsCustomBatchResponseEntry.fromJson(core.Map _json) { |
| 2886 if (_json.containsKey("batchId")) { |
| 2887 batchId = _json["batchId"]; |
| 2888 } |
| 2889 if (_json.containsKey("datafeed")) { |
| 2890 datafeed = new Datafeed.fromJson(_json["datafeed"]); |
| 2891 } |
| 2892 if (_json.containsKey("errors")) { |
| 2893 errors = new Errors.fromJson(_json["errors"]); |
| 2894 } |
| 2895 } |
| 2896 |
| 2897 core.Map toJson() { |
| 2898 var _json = new core.Map(); |
| 2899 if (batchId != null) { |
| 2900 _json["batchId"] = batchId; |
| 2901 } |
| 2902 if (datafeed != null) { |
| 2903 _json["datafeed"] = (datafeed).toJson(); |
| 2904 } |
| 2905 if (errors != null) { |
| 2906 _json["errors"] = (errors).toJson(); |
| 2907 } |
| 2908 return _json; |
| 2909 } |
| 2910 } |
| 2911 |
| 2912 |
| 2913 /** Not documented yet. */ |
| 2914 class DatafeedsListResponse { |
| 2915 /** |
| 2916 * Identifies what kind of resource this is. Value: the fixed string |
| 2917 * "content#datafeedsListResponse". |
| 2918 */ |
| 2919 core.String kind; |
| 2920 |
| 2921 /** Not documented yet. */ |
| 2922 core.List<Datafeed> resources; |
| 2923 |
| 2924 |
| 2925 DatafeedsListResponse(); |
| 2926 |
| 2927 DatafeedsListResponse.fromJson(core.Map _json) { |
| 2928 if (_json.containsKey("kind")) { |
| 2929 kind = _json["kind"]; |
| 2930 } |
| 2931 if (_json.containsKey("resources")) { |
| 2932 resources = _json["resources"].map((value) => new Datafeed.fromJson(value)
).toList(); |
| 2933 } |
| 2934 } |
| 2935 |
| 2936 core.Map toJson() { |
| 2937 var _json = new core.Map(); |
| 2938 if (kind != null) { |
| 2939 _json["kind"] = kind; |
| 2940 } |
| 2941 if (resources != null) { |
| 2942 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 2943 } |
| 2944 return _json; |
| 2945 } |
| 2946 } |
| 2947 |
| 2948 |
| 2949 /** Not documented yet. */ |
| 2950 class DatafeedstatusesCustomBatchRequest { |
| 2951 /** Not documented yet. */ |
| 2952 core.List<DatafeedstatusesCustomBatchRequestEntry> entries; |
| 2953 |
| 2954 |
| 2955 DatafeedstatusesCustomBatchRequest(); |
| 2956 |
| 2957 DatafeedstatusesCustomBatchRequest.fromJson(core.Map _json) { |
| 2958 if (_json.containsKey("entries")) { |
| 2959 entries = _json["entries"].map((value) => new DatafeedstatusesCustomBatchR
equestEntry.fromJson(value)).toList(); |
| 2960 } |
| 2961 } |
| 2962 |
| 2963 core.Map toJson() { |
| 2964 var _json = new core.Map(); |
| 2965 if (entries != null) { |
| 2966 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 2967 } |
| 2968 return _json; |
| 2969 } |
| 2970 } |
| 2971 |
| 2972 |
| 2973 /** |
| 2974 * A batch entry encoding a single non-batch request to the datafeedstatuses |
| 2975 * service of the Content API for Shopping. |
| 2976 */ |
| 2977 class DatafeedstatusesCustomBatchRequestEntry { |
| 2978 /** An entry ID, unique within the batch request. */ |
| 2979 core.int batchId; |
| 2980 |
| 2981 /** The ID of the data feed to get or delete. */ |
| 2982 core.String datafeedId; |
| 2983 |
| 2984 /** The ID of the managing account. */ |
| 2985 core.String merchantId; |
| 2986 |
| 2987 /** The method (get). */ |
| 2988 core.String method; |
| 2989 |
| 2990 |
| 2991 DatafeedstatusesCustomBatchRequestEntry(); |
| 2992 |
| 2993 DatafeedstatusesCustomBatchRequestEntry.fromJson(core.Map _json) { |
| 2994 if (_json.containsKey("batchId")) { |
| 2995 batchId = _json["batchId"]; |
| 2996 } |
| 2997 if (_json.containsKey("datafeedId")) { |
| 2998 datafeedId = _json["datafeedId"]; |
| 2999 } |
| 3000 if (_json.containsKey("merchantId")) { |
| 3001 merchantId = _json["merchantId"]; |
| 3002 } |
| 3003 if (_json.containsKey("method")) { |
| 3004 method = _json["method"]; |
| 3005 } |
| 3006 } |
| 3007 |
| 3008 core.Map toJson() { |
| 3009 var _json = new core.Map(); |
| 3010 if (batchId != null) { |
| 3011 _json["batchId"] = batchId; |
| 3012 } |
| 3013 if (datafeedId != null) { |
| 3014 _json["datafeedId"] = datafeedId; |
| 3015 } |
| 3016 if (merchantId != null) { |
| 3017 _json["merchantId"] = merchantId; |
| 3018 } |
| 3019 if (method != null) { |
| 3020 _json["method"] = method; |
| 3021 } |
| 3022 return _json; |
| 3023 } |
| 3024 } |
| 3025 |
| 3026 |
| 3027 /** Not documented yet. */ |
| 3028 class DatafeedstatusesCustomBatchResponse { |
| 3029 /** Not documented yet. */ |
| 3030 core.List<DatafeedstatusesCustomBatchResponseEntry> entries; |
| 3031 |
| 3032 /** |
| 3033 * Identifies what kind of resource this is. Value: the fixed string |
| 3034 * "content#datafeedstatusesCustomBatchResponse". |
| 3035 */ |
| 3036 core.String kind; |
| 3037 |
| 3038 |
| 3039 DatafeedstatusesCustomBatchResponse(); |
| 3040 |
| 3041 DatafeedstatusesCustomBatchResponse.fromJson(core.Map _json) { |
| 3042 if (_json.containsKey("entries")) { |
| 3043 entries = _json["entries"].map((value) => new DatafeedstatusesCustomBatchR
esponseEntry.fromJson(value)).toList(); |
| 3044 } |
| 3045 if (_json.containsKey("kind")) { |
| 3046 kind = _json["kind"]; |
| 3047 } |
| 3048 } |
| 3049 |
| 3050 core.Map toJson() { |
| 3051 var _json = new core.Map(); |
| 3052 if (entries != null) { |
| 3053 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 3054 } |
| 3055 if (kind != null) { |
| 3056 _json["kind"] = kind; |
| 3057 } |
| 3058 return _json; |
| 3059 } |
| 3060 } |
| 3061 |
| 3062 |
| 3063 /** |
| 3064 * A batch entry encoding a single non-batch response from the datafeedstatuses |
| 3065 * service of the Content API for Shopping. |
| 3066 */ |
| 3067 class DatafeedstatusesCustomBatchResponseEntry { |
| 3068 /** The ID of the request entry this entry responds to. */ |
| 3069 core.int batchId; |
| 3070 |
| 3071 /** |
| 3072 * The requested data feed status. Defined if and only if the request was |
| 3073 * successful. |
| 3074 */ |
| 3075 DatafeedStatus datafeedStatus; |
| 3076 |
| 3077 /** A list of errors defined if and only if the request failed. */ |
| 3078 Errors errors; |
| 3079 |
| 3080 |
| 3081 DatafeedstatusesCustomBatchResponseEntry(); |
| 3082 |
| 3083 DatafeedstatusesCustomBatchResponseEntry.fromJson(core.Map _json) { |
| 3084 if (_json.containsKey("batchId")) { |
| 3085 batchId = _json["batchId"]; |
| 3086 } |
| 3087 if (_json.containsKey("datafeedStatus")) { |
| 3088 datafeedStatus = new DatafeedStatus.fromJson(_json["datafeedStatus"]); |
| 3089 } |
| 3090 if (_json.containsKey("errors")) { |
| 3091 errors = new Errors.fromJson(_json["errors"]); |
| 3092 } |
| 3093 } |
| 3094 |
| 3095 core.Map toJson() { |
| 3096 var _json = new core.Map(); |
| 3097 if (batchId != null) { |
| 3098 _json["batchId"] = batchId; |
| 3099 } |
| 3100 if (datafeedStatus != null) { |
| 3101 _json["datafeedStatus"] = (datafeedStatus).toJson(); |
| 3102 } |
| 3103 if (errors != null) { |
| 3104 _json["errors"] = (errors).toJson(); |
| 3105 } |
| 3106 return _json; |
| 3107 } |
| 3108 } |
| 3109 |
| 3110 |
| 3111 /** Not documented yet. */ |
| 3112 class DatafeedstatusesListResponse { |
| 3113 /** |
| 3114 * Identifies what kind of resource this is. Value: the fixed string |
| 3115 * "content#datafeedstatusesListResponse". |
| 3116 */ |
| 3117 core.String kind; |
| 3118 |
| 3119 /** Not documented yet. */ |
| 3120 core.List<DatafeedStatus> resources; |
| 3121 |
| 3122 |
| 3123 DatafeedstatusesListResponse(); |
| 3124 |
| 3125 DatafeedstatusesListResponse.fromJson(core.Map _json) { |
| 3126 if (_json.containsKey("kind")) { |
| 3127 kind = _json["kind"]; |
| 3128 } |
| 3129 if (_json.containsKey("resources")) { |
| 3130 resources = _json["resources"].map((value) => new DatafeedStatus.fromJson(
value)).toList(); |
| 3131 } |
| 3132 } |
| 3133 |
| 3134 core.Map toJson() { |
| 3135 var _json = new core.Map(); |
| 3136 if (kind != null) { |
| 3137 _json["kind"] = kind; |
| 3138 } |
| 3139 if (resources != null) { |
| 3140 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 3141 } |
| 3142 return _json; |
| 3143 } |
| 3144 } |
| 3145 |
| 3146 |
| 3147 /** An error returned by the API. */ |
| 3148 class Error { |
| 3149 /** The domain of the error. */ |
| 3150 core.String domain; |
| 3151 |
| 3152 /** A description of the error. */ |
| 3153 core.String message; |
| 3154 |
| 3155 /** The error code. */ |
| 3156 core.String reason; |
| 3157 |
| 3158 |
| 3159 Error(); |
| 3160 |
| 3161 Error.fromJson(core.Map _json) { |
| 3162 if (_json.containsKey("domain")) { |
| 3163 domain = _json["domain"]; |
| 3164 } |
| 3165 if (_json.containsKey("message")) { |
| 3166 message = _json["message"]; |
| 3167 } |
| 3168 if (_json.containsKey("reason")) { |
| 3169 reason = _json["reason"]; |
| 3170 } |
| 3171 } |
| 3172 |
| 3173 core.Map toJson() { |
| 3174 var _json = new core.Map(); |
| 3175 if (domain != null) { |
| 3176 _json["domain"] = domain; |
| 3177 } |
| 3178 if (message != null) { |
| 3179 _json["message"] = message; |
| 3180 } |
| 3181 if (reason != null) { |
| 3182 _json["reason"] = reason; |
| 3183 } |
| 3184 return _json; |
| 3185 } |
| 3186 } |
| 3187 |
| 3188 |
| 3189 /** A list of errors returned by a failed batch entry. */ |
| 3190 class Errors { |
| 3191 /** The HTTP status of the first error in errors. */ |
| 3192 core.int code; |
| 3193 |
| 3194 /** A list of errors. */ |
| 3195 core.List<Error> errors; |
| 3196 |
| 3197 /** The message of the first error in errors. */ |
| 3198 core.String message; |
| 3199 |
| 3200 |
| 3201 Errors(); |
| 3202 |
| 3203 Errors.fromJson(core.Map _json) { |
| 3204 if (_json.containsKey("code")) { |
| 3205 code = _json["code"]; |
| 3206 } |
| 3207 if (_json.containsKey("errors")) { |
| 3208 errors = _json["errors"].map((value) => new Error.fromJson(value)).toList(
); |
| 3209 } |
| 3210 if (_json.containsKey("message")) { |
| 3211 message = _json["message"]; |
| 3212 } |
| 3213 } |
| 3214 |
| 3215 core.Map toJson() { |
| 3216 var _json = new core.Map(); |
| 3217 if (code != null) { |
| 3218 _json["code"] = code; |
| 3219 } |
| 3220 if (errors != null) { |
| 3221 _json["errors"] = errors.map((value) => (value).toJson()).toList(); |
| 3222 } |
| 3223 if (message != null) { |
| 3224 _json["message"] = message; |
| 3225 } |
| 3226 return _json; |
| 3227 } |
| 3228 } |
| 3229 |
| 3230 |
| 3231 /** Not documented yet. */ |
| 3232 class Inventory { |
| 3233 /** The availability of the product. */ |
| 3234 core.String availability; |
| 3235 |
| 3236 /** |
| 3237 * Identifies what kind of resource this is. Value: the fixed string |
| 3238 * "content#inventory". |
| 3239 */ |
| 3240 core.String kind; |
| 3241 |
| 3242 /** The price of the product. */ |
| 3243 Price price; |
| 3244 |
| 3245 /** |
| 3246 * The quantity of the product. Must be equal to or greater than zero. |
| 3247 * Supported only for local products. |
| 3248 */ |
| 3249 core.int quantity; |
| 3250 |
| 3251 /** |
| 3252 * The sale price of the product. Mandatory if sale_price_effective_date is |
| 3253 * defined. |
| 3254 */ |
| 3255 Price salePrice; |
| 3256 |
| 3257 /** |
| 3258 * A date range represented by a pair of ISO 8601 dates separated by a space, |
| 3259 * comma, or slash. Both dates might be specified as 'null' if undecided. |
| 3260 */ |
| 3261 core.String salePriceEffectiveDate; |
| 3262 |
| 3263 |
| 3264 Inventory(); |
| 3265 |
| 3266 Inventory.fromJson(core.Map _json) { |
| 3267 if (_json.containsKey("availability")) { |
| 3268 availability = _json["availability"]; |
| 3269 } |
| 3270 if (_json.containsKey("kind")) { |
| 3271 kind = _json["kind"]; |
| 3272 } |
| 3273 if (_json.containsKey("price")) { |
| 3274 price = new Price.fromJson(_json["price"]); |
| 3275 } |
| 3276 if (_json.containsKey("quantity")) { |
| 3277 quantity = _json["quantity"]; |
| 3278 } |
| 3279 if (_json.containsKey("salePrice")) { |
| 3280 salePrice = new Price.fromJson(_json["salePrice"]); |
| 3281 } |
| 3282 if (_json.containsKey("salePriceEffectiveDate")) { |
| 3283 salePriceEffectiveDate = _json["salePriceEffectiveDate"]; |
| 3284 } |
| 3285 } |
| 3286 |
| 3287 core.Map toJson() { |
| 3288 var _json = new core.Map(); |
| 3289 if (availability != null) { |
| 3290 _json["availability"] = availability; |
| 3291 } |
| 3292 if (kind != null) { |
| 3293 _json["kind"] = kind; |
| 3294 } |
| 3295 if (price != null) { |
| 3296 _json["price"] = (price).toJson(); |
| 3297 } |
| 3298 if (quantity != null) { |
| 3299 _json["quantity"] = quantity; |
| 3300 } |
| 3301 if (salePrice != null) { |
| 3302 _json["salePrice"] = (salePrice).toJson(); |
| 3303 } |
| 3304 if (salePriceEffectiveDate != null) { |
| 3305 _json["salePriceEffectiveDate"] = salePriceEffectiveDate; |
| 3306 } |
| 3307 return _json; |
| 3308 } |
| 3309 } |
| 3310 |
| 3311 |
| 3312 /** Not documented yet. */ |
| 3313 class InventoryCustomBatchRequest { |
| 3314 /** Not documented yet. */ |
| 3315 core.List<InventoryCustomBatchRequestEntry> entries; |
| 3316 |
| 3317 |
| 3318 InventoryCustomBatchRequest(); |
| 3319 |
| 3320 InventoryCustomBatchRequest.fromJson(core.Map _json) { |
| 3321 if (_json.containsKey("entries")) { |
| 3322 entries = _json["entries"].map((value) => new InventoryCustomBatchRequestE
ntry.fromJson(value)).toList(); |
| 3323 } |
| 3324 } |
| 3325 |
| 3326 core.Map toJson() { |
| 3327 var _json = new core.Map(); |
| 3328 if (entries != null) { |
| 3329 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 3330 } |
| 3331 return _json; |
| 3332 } |
| 3333 } |
| 3334 |
| 3335 |
| 3336 /** |
| 3337 * A batch entry encoding a single non-batch request to the inventory service of |
| 3338 * the Content API for Shopping. |
| 3339 */ |
| 3340 class InventoryCustomBatchRequestEntry { |
| 3341 /** An entry ID, unique within the batch request. */ |
| 3342 core.int batchId; |
| 3343 |
| 3344 /** Price and availability of the product. */ |
| 3345 Inventory inventory; |
| 3346 |
| 3347 /** The ID of the managing account. */ |
| 3348 core.String merchantId; |
| 3349 |
| 3350 /** The ID of the product for which to update price and availability. */ |
| 3351 core.String productId; |
| 3352 |
| 3353 /** |
| 3354 * The code of the store for which to update price and availability. Use |
| 3355 * online to update price and availability of an online product. |
| 3356 */ |
| 3357 core.String storeCode; |
| 3358 |
| 3359 |
| 3360 InventoryCustomBatchRequestEntry(); |
| 3361 |
| 3362 InventoryCustomBatchRequestEntry.fromJson(core.Map _json) { |
| 3363 if (_json.containsKey("batchId")) { |
| 3364 batchId = _json["batchId"]; |
| 3365 } |
| 3366 if (_json.containsKey("inventory")) { |
| 3367 inventory = new Inventory.fromJson(_json["inventory"]); |
| 3368 } |
| 3369 if (_json.containsKey("merchantId")) { |
| 3370 merchantId = _json["merchantId"]; |
| 3371 } |
| 3372 if (_json.containsKey("productId")) { |
| 3373 productId = _json["productId"]; |
| 3374 } |
| 3375 if (_json.containsKey("storeCode")) { |
| 3376 storeCode = _json["storeCode"]; |
| 3377 } |
| 3378 } |
| 3379 |
| 3380 core.Map toJson() { |
| 3381 var _json = new core.Map(); |
| 3382 if (batchId != null) { |
| 3383 _json["batchId"] = batchId; |
| 3384 } |
| 3385 if (inventory != null) { |
| 3386 _json["inventory"] = (inventory).toJson(); |
| 3387 } |
| 3388 if (merchantId != null) { |
| 3389 _json["merchantId"] = merchantId; |
| 3390 } |
| 3391 if (productId != null) { |
| 3392 _json["productId"] = productId; |
| 3393 } |
| 3394 if (storeCode != null) { |
| 3395 _json["storeCode"] = storeCode; |
| 3396 } |
| 3397 return _json; |
| 3398 } |
| 3399 } |
| 3400 |
| 3401 |
| 3402 /** Not documented yet. */ |
| 3403 class InventoryCustomBatchResponse { |
| 3404 /** Not documented yet. */ |
| 3405 core.List<InventoryCustomBatchResponseEntry> entries; |
| 3406 |
| 3407 /** |
| 3408 * Identifies what kind of resource this is. Value: the fixed string |
| 3409 * "content#inventoryCustomBatchResponse". |
| 3410 */ |
| 3411 core.String kind; |
| 3412 |
| 3413 |
| 3414 InventoryCustomBatchResponse(); |
| 3415 |
| 3416 InventoryCustomBatchResponse.fromJson(core.Map _json) { |
| 3417 if (_json.containsKey("entries")) { |
| 3418 entries = _json["entries"].map((value) => new InventoryCustomBatchResponse
Entry.fromJson(value)).toList(); |
| 3419 } |
| 3420 if (_json.containsKey("kind")) { |
| 3421 kind = _json["kind"]; |
| 3422 } |
| 3423 } |
| 3424 |
| 3425 core.Map toJson() { |
| 3426 var _json = new core.Map(); |
| 3427 if (entries != null) { |
| 3428 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 3429 } |
| 3430 if (kind != null) { |
| 3431 _json["kind"] = kind; |
| 3432 } |
| 3433 return _json; |
| 3434 } |
| 3435 } |
| 3436 |
| 3437 |
| 3438 /** |
| 3439 * A batch entry encoding a single non-batch response from the inventory service |
| 3440 * of the Content API for Shopping. |
| 3441 */ |
| 3442 class InventoryCustomBatchResponseEntry { |
| 3443 /** The ID of the request entry this entry responds to. */ |
| 3444 core.int batchId; |
| 3445 |
| 3446 /** A list of errors defined if and only if the request failed. */ |
| 3447 Errors errors; |
| 3448 |
| 3449 /** |
| 3450 * Identifies what kind of resource this is. Value: the fixed string |
| 3451 * "content#inventoryCustomBatchResponseEntry". |
| 3452 */ |
| 3453 core.String kind; |
| 3454 |
| 3455 |
| 3456 InventoryCustomBatchResponseEntry(); |
| 3457 |
| 3458 InventoryCustomBatchResponseEntry.fromJson(core.Map _json) { |
| 3459 if (_json.containsKey("batchId")) { |
| 3460 batchId = _json["batchId"]; |
| 3461 } |
| 3462 if (_json.containsKey("errors")) { |
| 3463 errors = new Errors.fromJson(_json["errors"]); |
| 3464 } |
| 3465 if (_json.containsKey("kind")) { |
| 3466 kind = _json["kind"]; |
| 3467 } |
| 3468 } |
| 3469 |
| 3470 core.Map toJson() { |
| 3471 var _json = new core.Map(); |
| 3472 if (batchId != null) { |
| 3473 _json["batchId"] = batchId; |
| 3474 } |
| 3475 if (errors != null) { |
| 3476 _json["errors"] = (errors).toJson(); |
| 3477 } |
| 3478 if (kind != null) { |
| 3479 _json["kind"] = kind; |
| 3480 } |
| 3481 return _json; |
| 3482 } |
| 3483 } |
| 3484 |
| 3485 |
| 3486 /** Not documented yet. */ |
| 3487 class InventorySetRequest { |
| 3488 /** The availability of the product. */ |
| 3489 core.String availability; |
| 3490 |
| 3491 /** The price of the product. */ |
| 3492 Price price; |
| 3493 |
| 3494 /** |
| 3495 * The quantity of the product. Must be equal to or greater than zero. |
| 3496 * Supported only for local products. |
| 3497 */ |
| 3498 core.int quantity; |
| 3499 |
| 3500 /** |
| 3501 * The sale price of the product. Mandatory if sale_price_effective_date is |
| 3502 * defined. |
| 3503 */ |
| 3504 Price salePrice; |
| 3505 |
| 3506 /** |
| 3507 * A date range represented by a pair of ISO 8601 dates separated by a space, |
| 3508 * comma, or slash. Both dates might be specified as 'null' if undecided. |
| 3509 */ |
| 3510 core.String salePriceEffectiveDate; |
| 3511 |
| 3512 |
| 3513 InventorySetRequest(); |
| 3514 |
| 3515 InventorySetRequest.fromJson(core.Map _json) { |
| 3516 if (_json.containsKey("availability")) { |
| 3517 availability = _json["availability"]; |
| 3518 } |
| 3519 if (_json.containsKey("price")) { |
| 3520 price = new Price.fromJson(_json["price"]); |
| 3521 } |
| 3522 if (_json.containsKey("quantity")) { |
| 3523 quantity = _json["quantity"]; |
| 3524 } |
| 3525 if (_json.containsKey("salePrice")) { |
| 3526 salePrice = new Price.fromJson(_json["salePrice"]); |
| 3527 } |
| 3528 if (_json.containsKey("salePriceEffectiveDate")) { |
| 3529 salePriceEffectiveDate = _json["salePriceEffectiveDate"]; |
| 3530 } |
| 3531 } |
| 3532 |
| 3533 core.Map toJson() { |
| 3534 var _json = new core.Map(); |
| 3535 if (availability != null) { |
| 3536 _json["availability"] = availability; |
| 3537 } |
| 3538 if (price != null) { |
| 3539 _json["price"] = (price).toJson(); |
| 3540 } |
| 3541 if (quantity != null) { |
| 3542 _json["quantity"] = quantity; |
| 3543 } |
| 3544 if (salePrice != null) { |
| 3545 _json["salePrice"] = (salePrice).toJson(); |
| 3546 } |
| 3547 if (salePriceEffectiveDate != null) { |
| 3548 _json["salePriceEffectiveDate"] = salePriceEffectiveDate; |
| 3549 } |
| 3550 return _json; |
| 3551 } |
| 3552 } |
| 3553 |
| 3554 |
| 3555 /** Not documented yet. */ |
| 3556 class InventorySetResponse { |
| 3557 /** |
| 3558 * Identifies what kind of resource this is. Value: the fixed string |
| 3559 * "content#inventorySetResponse". |
| 3560 */ |
| 3561 core.String kind; |
| 3562 |
| 3563 |
| 3564 InventorySetResponse(); |
| 3565 |
| 3566 InventorySetResponse.fromJson(core.Map _json) { |
| 3567 if (_json.containsKey("kind")) { |
| 3568 kind = _json["kind"]; |
| 3569 } |
| 3570 } |
| 3571 |
| 3572 core.Map toJson() { |
| 3573 var _json = new core.Map(); |
| 3574 if (kind != null) { |
| 3575 _json["kind"] = kind; |
| 3576 } |
| 3577 return _json; |
| 3578 } |
| 3579 } |
| 3580 |
| 3581 |
| 3582 /** Not documented yet. */ |
| 3583 class LoyaltyPoints { |
| 3584 /** |
| 3585 * Name of loyalty points program. It is recommended to limit the name to 12 |
| 3586 * full-width characters or 24 Roman characters. |
| 3587 */ |
| 3588 core.String name; |
| 3589 |
| 3590 /** The retailer's loyalty points in absolute value. */ |
| 3591 core.String pointsValue; |
| 3592 |
| 3593 /** |
| 3594 * The ratio of a point when converted to currency. Google assumes currency |
| 3595 * based on Merchant Center settings. If ratio is left out, it defaults to |
| 3596 * 1.0. |
| 3597 */ |
| 3598 core.double ratio; |
| 3599 |
| 3600 |
| 3601 LoyaltyPoints(); |
| 3602 |
| 3603 LoyaltyPoints.fromJson(core.Map _json) { |
| 3604 if (_json.containsKey("name")) { |
| 3605 name = _json["name"]; |
| 3606 } |
| 3607 if (_json.containsKey("pointsValue")) { |
| 3608 pointsValue = _json["pointsValue"]; |
| 3609 } |
| 3610 if (_json.containsKey("ratio")) { |
| 3611 ratio = _json["ratio"]; |
| 3612 } |
| 3613 } |
| 3614 |
| 3615 core.Map toJson() { |
| 3616 var _json = new core.Map(); |
| 3617 if (name != null) { |
| 3618 _json["name"] = name; |
| 3619 } |
| 3620 if (pointsValue != null) { |
| 3621 _json["pointsValue"] = pointsValue; |
| 3622 } |
| 3623 if (ratio != null) { |
| 3624 _json["ratio"] = ratio; |
| 3625 } |
| 3626 return _json; |
| 3627 } |
| 3628 } |
| 3629 |
| 3630 |
| 3631 /** Not documented yet. */ |
| 3632 class Price { |
| 3633 /** The currency of the price. */ |
| 3634 core.String currency; |
| 3635 |
| 3636 /** The price represented as a number. */ |
| 3637 core.String value; |
| 3638 |
| 3639 |
| 3640 Price(); |
| 3641 |
| 3642 Price.fromJson(core.Map _json) { |
| 3643 if (_json.containsKey("currency")) { |
| 3644 currency = _json["currency"]; |
| 3645 } |
| 3646 if (_json.containsKey("value")) { |
| 3647 value = _json["value"]; |
| 3648 } |
| 3649 } |
| 3650 |
| 3651 core.Map toJson() { |
| 3652 var _json = new core.Map(); |
| 3653 if (currency != null) { |
| 3654 _json["currency"] = currency; |
| 3655 } |
| 3656 if (value != null) { |
| 3657 _json["value"] = value; |
| 3658 } |
| 3659 return _json; |
| 3660 } |
| 3661 } |
| 3662 |
| 3663 |
| 3664 /** Product data. */ |
| 3665 class Product { |
| 3666 /** Additional URLs of images of the item. */ |
| 3667 core.List<core.String> additionalImageLinks; |
| 3668 |
| 3669 /** Set to true if the item is targeted towards adults. */ |
| 3670 core.bool adult; |
| 3671 |
| 3672 /** |
| 3673 * Used to group items in an arbitrary way. Only for CPA%, discouraged |
| 3674 * otherwise. |
| 3675 */ |
| 3676 core.String adwordsGrouping; |
| 3677 |
| 3678 /** Similar to adwords_grouping, but only works on CPC. */ |
| 3679 core.List<core.String> adwordsLabels; |
| 3680 |
| 3681 /** |
| 3682 * Allows advertisers to override the item URL when the product is shown |
| 3683 * within the context of Product Ads. |
| 3684 */ |
| 3685 core.String adwordsRedirect; |
| 3686 |
| 3687 /** Target age group of the item. */ |
| 3688 core.String ageGroup; |
| 3689 |
| 3690 /** Availability status of the item. */ |
| 3691 core.String availability; |
| 3692 |
| 3693 /** The day a pre-ordered product becomes available for delivery. */ |
| 3694 core.String availabilityDate; |
| 3695 |
| 3696 /** Brand of the item. */ |
| 3697 core.String brand; |
| 3698 |
| 3699 /** The item's channel (online or local). */ |
| 3700 core.String channel; |
| 3701 |
| 3702 /** Color of the item. */ |
| 3703 core.String color; |
| 3704 |
| 3705 /** Condition or state of the item. */ |
| 3706 core.String condition; |
| 3707 |
| 3708 /** The two-letter ISO 639-1 language code for the item. */ |
| 3709 core.String contentLanguage; |
| 3710 |
| 3711 /** A list of custom (merchant-provided) attributes. */ |
| 3712 core.List<ProductCustomAttribute> customAttributes; |
| 3713 |
| 3714 /** A list of custom (merchant-provided) custom attribute groups. */ |
| 3715 core.List<ProductCustomGroup> customGroups; |
| 3716 |
| 3717 /** Custom label 0 for custom grouping of items in a Shopping campaign. */ |
| 3718 core.String customLabel0; |
| 3719 |
| 3720 /** Custom label 1 for custom grouping of items in a Shopping campaign. */ |
| 3721 core.String customLabel1; |
| 3722 |
| 3723 /** Custom label 2 for custom grouping of items in a Shopping campaign. */ |
| 3724 core.String customLabel2; |
| 3725 |
| 3726 /** Custom label 3 for custom grouping of items in a Shopping campaign. */ |
| 3727 core.String customLabel3; |
| 3728 |
| 3729 /** Custom label 4 for custom grouping of items in a Shopping campaign. */ |
| 3730 core.String customLabel4; |
| 3731 |
| 3732 /** Description of the item. */ |
| 3733 core.String description; |
| 3734 |
| 3735 /** Specifies the intended destinations for the product. */ |
| 3736 core.List<ProductDestination> destinations; |
| 3737 |
| 3738 /** The energy efficiency class as defined in EU directive 2010/30/EU. */ |
| 3739 core.String energyEfficiencyClass; |
| 3740 |
| 3741 /** Date that an item will expire. */ |
| 3742 core.String expirationDate; |
| 3743 |
| 3744 /** Target gender of the item. */ |
| 3745 core.String gender; |
| 3746 |
| 3747 /** Google's category of the item. */ |
| 3748 core.String googleProductCategory; |
| 3749 |
| 3750 /** Global Trade Item Number (GTIN) of the item. */ |
| 3751 core.String gtin; |
| 3752 |
| 3753 /** The REST id of the product. */ |
| 3754 core.String id; |
| 3755 |
| 3756 /** |
| 3757 * False when the item does not have unique product identifiers appropriate to |
| 3758 * its category, such as GTIN, MPN, and brand. Required according to the |
| 3759 * Unique Product Identifier Rules for all target countries except for Canada. |
| 3760 */ |
| 3761 core.bool identifierExists; |
| 3762 |
| 3763 /** URL of an image of the item. */ |
| 3764 core.String imageLink; |
| 3765 |
| 3766 /** Number and amount of installments to pay for an item. Brazil only. */ |
| 3767 ProductInstallment installment; |
| 3768 |
| 3769 /** |
| 3770 * Whether the item is a merchant-defined bundle. A bundle is a custom |
| 3771 * grouping of different products sold by a merchant for a single price. |
| 3772 */ |
| 3773 core.bool isBundle; |
| 3774 |
| 3775 /** Shared identifier for all variants of the same product. */ |
| 3776 core.String itemGroupId; |
| 3777 |
| 3778 /** |
| 3779 * Identifies what kind of resource this is. Value: the fixed string |
| 3780 * "content#product". |
| 3781 */ |
| 3782 core.String kind; |
| 3783 |
| 3784 /** URL directly linking to your item's page on your website. */ |
| 3785 core.String link; |
| 3786 |
| 3787 /** |
| 3788 * Loyalty points that users receive after purchasing the item. Japan only. |
| 3789 */ |
| 3790 LoyaltyPoints loyaltyPoints; |
| 3791 |
| 3792 /** The material of which the item is made. */ |
| 3793 core.String material; |
| 3794 |
| 3795 /** Link to a mobile-optimized version of the landing page. */ |
| 3796 core.String mobileLink; |
| 3797 |
| 3798 /** Manufacturer Part Number (MPN) of the item. */ |
| 3799 core.String mpn; |
| 3800 |
| 3801 /** The number of identical products in a merchant-defined multipack. */ |
| 3802 core.String multipack; |
| 3803 |
| 3804 /** An identifier of the item. */ |
| 3805 core.String offerId; |
| 3806 |
| 3807 /** Whether an item is available for purchase only online. */ |
| 3808 core.bool onlineOnly; |
| 3809 |
| 3810 /** The item's pattern (e.g. polka dots). */ |
| 3811 core.String pattern; |
| 3812 |
| 3813 /** Price of the item. */ |
| 3814 Price price; |
| 3815 |
| 3816 /** Your category of the item. */ |
| 3817 core.String productType; |
| 3818 |
| 3819 /** Advertised sale price of the item. */ |
| 3820 Price salePrice; |
| 3821 |
| 3822 /** Date range during which the item is on sale. */ |
| 3823 core.String salePriceEffectiveDate; |
| 3824 |
| 3825 /** Shipping rules. */ |
| 3826 core.List<ProductShipping> shipping; |
| 3827 |
| 3828 /** |
| 3829 * The shipping label of the product, used to group product in account-level |
| 3830 * shipping rules. |
| 3831 */ |
| 3832 core.String shippingLabel; |
| 3833 |
| 3834 /** Weight of the item for shipping. */ |
| 3835 ProductShippingWeight shippingWeight; |
| 3836 |
| 3837 /** System in which the size is specified. Recommended for apparel items. */ |
| 3838 core.String sizeSystem; |
| 3839 |
| 3840 /** The cut of the item. Recommended for apparel items. */ |
| 3841 core.String sizeType; |
| 3842 |
| 3843 /** Size of the item. */ |
| 3844 core.List<core.String> sizes; |
| 3845 |
| 3846 /** The two-letter ISO 3166 country code for the item. */ |
| 3847 core.String targetCountry; |
| 3848 |
| 3849 /** Tax information. */ |
| 3850 core.List<ProductTax> taxes; |
| 3851 |
| 3852 /** Title of the item. */ |
| 3853 core.String title; |
| 3854 |
| 3855 /** The preference of the denominator of the unit price. */ |
| 3856 ProductUnitPricingBaseMeasure unitPricingBaseMeasure; |
| 3857 |
| 3858 /** The measure and dimension of an item. */ |
| 3859 ProductUnitPricingMeasure unitPricingMeasure; |
| 3860 |
| 3861 /** The read-only list of intended destinations which passed validation. */ |
| 3862 core.List<core.String> validatedDestinations; |
| 3863 |
| 3864 /** Read-only warnings. */ |
| 3865 core.List<Error> warnings; |
| 3866 |
| 3867 |
| 3868 Product(); |
| 3869 |
| 3870 Product.fromJson(core.Map _json) { |
| 3871 if (_json.containsKey("additionalImageLinks")) { |
| 3872 additionalImageLinks = _json["additionalImageLinks"]; |
| 3873 } |
| 3874 if (_json.containsKey("adult")) { |
| 3875 adult = _json["adult"]; |
| 3876 } |
| 3877 if (_json.containsKey("adwordsGrouping")) { |
| 3878 adwordsGrouping = _json["adwordsGrouping"]; |
| 3879 } |
| 3880 if (_json.containsKey("adwordsLabels")) { |
| 3881 adwordsLabels = _json["adwordsLabels"]; |
| 3882 } |
| 3883 if (_json.containsKey("adwordsRedirect")) { |
| 3884 adwordsRedirect = _json["adwordsRedirect"]; |
| 3885 } |
| 3886 if (_json.containsKey("ageGroup")) { |
| 3887 ageGroup = _json["ageGroup"]; |
| 3888 } |
| 3889 if (_json.containsKey("availability")) { |
| 3890 availability = _json["availability"]; |
| 3891 } |
| 3892 if (_json.containsKey("availabilityDate")) { |
| 3893 availabilityDate = _json["availabilityDate"]; |
| 3894 } |
| 3895 if (_json.containsKey("brand")) { |
| 3896 brand = _json["brand"]; |
| 3897 } |
| 3898 if (_json.containsKey("channel")) { |
| 3899 channel = _json["channel"]; |
| 3900 } |
| 3901 if (_json.containsKey("color")) { |
| 3902 color = _json["color"]; |
| 3903 } |
| 3904 if (_json.containsKey("condition")) { |
| 3905 condition = _json["condition"]; |
| 3906 } |
| 3907 if (_json.containsKey("contentLanguage")) { |
| 3908 contentLanguage = _json["contentLanguage"]; |
| 3909 } |
| 3910 if (_json.containsKey("customAttributes")) { |
| 3911 customAttributes = _json["customAttributes"].map((value) => new ProductCus
tomAttribute.fromJson(value)).toList(); |
| 3912 } |
| 3913 if (_json.containsKey("customGroups")) { |
| 3914 customGroups = _json["customGroups"].map((value) => new ProductCustomGroup
.fromJson(value)).toList(); |
| 3915 } |
| 3916 if (_json.containsKey("customLabel0")) { |
| 3917 customLabel0 = _json["customLabel0"]; |
| 3918 } |
| 3919 if (_json.containsKey("customLabel1")) { |
| 3920 customLabel1 = _json["customLabel1"]; |
| 3921 } |
| 3922 if (_json.containsKey("customLabel2")) { |
| 3923 customLabel2 = _json["customLabel2"]; |
| 3924 } |
| 3925 if (_json.containsKey("customLabel3")) { |
| 3926 customLabel3 = _json["customLabel3"]; |
| 3927 } |
| 3928 if (_json.containsKey("customLabel4")) { |
| 3929 customLabel4 = _json["customLabel4"]; |
| 3930 } |
| 3931 if (_json.containsKey("description")) { |
| 3932 description = _json["description"]; |
| 3933 } |
| 3934 if (_json.containsKey("destinations")) { |
| 3935 destinations = _json["destinations"].map((value) => new ProductDestination
.fromJson(value)).toList(); |
| 3936 } |
| 3937 if (_json.containsKey("energyEfficiencyClass")) { |
| 3938 energyEfficiencyClass = _json["energyEfficiencyClass"]; |
| 3939 } |
| 3940 if (_json.containsKey("expirationDate")) { |
| 3941 expirationDate = _json["expirationDate"]; |
| 3942 } |
| 3943 if (_json.containsKey("gender")) { |
| 3944 gender = _json["gender"]; |
| 3945 } |
| 3946 if (_json.containsKey("googleProductCategory")) { |
| 3947 googleProductCategory = _json["googleProductCategory"]; |
| 3948 } |
| 3949 if (_json.containsKey("gtin")) { |
| 3950 gtin = _json["gtin"]; |
| 3951 } |
| 3952 if (_json.containsKey("id")) { |
| 3953 id = _json["id"]; |
| 3954 } |
| 3955 if (_json.containsKey("identifierExists")) { |
| 3956 identifierExists = _json["identifierExists"]; |
| 3957 } |
| 3958 if (_json.containsKey("imageLink")) { |
| 3959 imageLink = _json["imageLink"]; |
| 3960 } |
| 3961 if (_json.containsKey("installment")) { |
| 3962 installment = new ProductInstallment.fromJson(_json["installment"]); |
| 3963 } |
| 3964 if (_json.containsKey("isBundle")) { |
| 3965 isBundle = _json["isBundle"]; |
| 3966 } |
| 3967 if (_json.containsKey("itemGroupId")) { |
| 3968 itemGroupId = _json["itemGroupId"]; |
| 3969 } |
| 3970 if (_json.containsKey("kind")) { |
| 3971 kind = _json["kind"]; |
| 3972 } |
| 3973 if (_json.containsKey("link")) { |
| 3974 link = _json["link"]; |
| 3975 } |
| 3976 if (_json.containsKey("loyaltyPoints")) { |
| 3977 loyaltyPoints = new LoyaltyPoints.fromJson(_json["loyaltyPoints"]); |
| 3978 } |
| 3979 if (_json.containsKey("material")) { |
| 3980 material = _json["material"]; |
| 3981 } |
| 3982 if (_json.containsKey("mobileLink")) { |
| 3983 mobileLink = _json["mobileLink"]; |
| 3984 } |
| 3985 if (_json.containsKey("mpn")) { |
| 3986 mpn = _json["mpn"]; |
| 3987 } |
| 3988 if (_json.containsKey("multipack")) { |
| 3989 multipack = _json["multipack"]; |
| 3990 } |
| 3991 if (_json.containsKey("offerId")) { |
| 3992 offerId = _json["offerId"]; |
| 3993 } |
| 3994 if (_json.containsKey("onlineOnly")) { |
| 3995 onlineOnly = _json["onlineOnly"]; |
| 3996 } |
| 3997 if (_json.containsKey("pattern")) { |
| 3998 pattern = _json["pattern"]; |
| 3999 } |
| 4000 if (_json.containsKey("price")) { |
| 4001 price = new Price.fromJson(_json["price"]); |
| 4002 } |
| 4003 if (_json.containsKey("productType")) { |
| 4004 productType = _json["productType"]; |
| 4005 } |
| 4006 if (_json.containsKey("salePrice")) { |
| 4007 salePrice = new Price.fromJson(_json["salePrice"]); |
| 4008 } |
| 4009 if (_json.containsKey("salePriceEffectiveDate")) { |
| 4010 salePriceEffectiveDate = _json["salePriceEffectiveDate"]; |
| 4011 } |
| 4012 if (_json.containsKey("shipping")) { |
| 4013 shipping = _json["shipping"].map((value) => new ProductShipping.fromJson(v
alue)).toList(); |
| 4014 } |
| 4015 if (_json.containsKey("shippingLabel")) { |
| 4016 shippingLabel = _json["shippingLabel"]; |
| 4017 } |
| 4018 if (_json.containsKey("shippingWeight")) { |
| 4019 shippingWeight = new ProductShippingWeight.fromJson(_json["shippingWeight"
]); |
| 4020 } |
| 4021 if (_json.containsKey("sizeSystem")) { |
| 4022 sizeSystem = _json["sizeSystem"]; |
| 4023 } |
| 4024 if (_json.containsKey("sizeType")) { |
| 4025 sizeType = _json["sizeType"]; |
| 4026 } |
| 4027 if (_json.containsKey("sizes")) { |
| 4028 sizes = _json["sizes"]; |
| 4029 } |
| 4030 if (_json.containsKey("targetCountry")) { |
| 4031 targetCountry = _json["targetCountry"]; |
| 4032 } |
| 4033 if (_json.containsKey("taxes")) { |
| 4034 taxes = _json["taxes"].map((value) => new ProductTax.fromJson(value)).toLi
st(); |
| 4035 } |
| 4036 if (_json.containsKey("title")) { |
| 4037 title = _json["title"]; |
| 4038 } |
| 4039 if (_json.containsKey("unitPricingBaseMeasure")) { |
| 4040 unitPricingBaseMeasure = new ProductUnitPricingBaseMeasure.fromJson(_json[
"unitPricingBaseMeasure"]); |
| 4041 } |
| 4042 if (_json.containsKey("unitPricingMeasure")) { |
| 4043 unitPricingMeasure = new ProductUnitPricingMeasure.fromJson(_json["unitPri
cingMeasure"]); |
| 4044 } |
| 4045 if (_json.containsKey("validatedDestinations")) { |
| 4046 validatedDestinations = _json["validatedDestinations"]; |
| 4047 } |
| 4048 if (_json.containsKey("warnings")) { |
| 4049 warnings = _json["warnings"].map((value) => new Error.fromJson(value)).toL
ist(); |
| 4050 } |
| 4051 } |
| 4052 |
| 4053 core.Map toJson() { |
| 4054 var _json = new core.Map(); |
| 4055 if (additionalImageLinks != null) { |
| 4056 _json["additionalImageLinks"] = additionalImageLinks; |
| 4057 } |
| 4058 if (adult != null) { |
| 4059 _json["adult"] = adult; |
| 4060 } |
| 4061 if (adwordsGrouping != null) { |
| 4062 _json["adwordsGrouping"] = adwordsGrouping; |
| 4063 } |
| 4064 if (adwordsLabels != null) { |
| 4065 _json["adwordsLabels"] = adwordsLabels; |
| 4066 } |
| 4067 if (adwordsRedirect != null) { |
| 4068 _json["adwordsRedirect"] = adwordsRedirect; |
| 4069 } |
| 4070 if (ageGroup != null) { |
| 4071 _json["ageGroup"] = ageGroup; |
| 4072 } |
| 4073 if (availability != null) { |
| 4074 _json["availability"] = availability; |
| 4075 } |
| 4076 if (availabilityDate != null) { |
| 4077 _json["availabilityDate"] = availabilityDate; |
| 4078 } |
| 4079 if (brand != null) { |
| 4080 _json["brand"] = brand; |
| 4081 } |
| 4082 if (channel != null) { |
| 4083 _json["channel"] = channel; |
| 4084 } |
| 4085 if (color != null) { |
| 4086 _json["color"] = color; |
| 4087 } |
| 4088 if (condition != null) { |
| 4089 _json["condition"] = condition; |
| 4090 } |
| 4091 if (contentLanguage != null) { |
| 4092 _json["contentLanguage"] = contentLanguage; |
| 4093 } |
| 4094 if (customAttributes != null) { |
| 4095 _json["customAttributes"] = customAttributes.map((value) => (value).toJson
()).toList(); |
| 4096 } |
| 4097 if (customGroups != null) { |
| 4098 _json["customGroups"] = customGroups.map((value) => (value).toJson()).toLi
st(); |
| 4099 } |
| 4100 if (customLabel0 != null) { |
| 4101 _json["customLabel0"] = customLabel0; |
| 4102 } |
| 4103 if (customLabel1 != null) { |
| 4104 _json["customLabel1"] = customLabel1; |
| 4105 } |
| 4106 if (customLabel2 != null) { |
| 4107 _json["customLabel2"] = customLabel2; |
| 4108 } |
| 4109 if (customLabel3 != null) { |
| 4110 _json["customLabel3"] = customLabel3; |
| 4111 } |
| 4112 if (customLabel4 != null) { |
| 4113 _json["customLabel4"] = customLabel4; |
| 4114 } |
| 4115 if (description != null) { |
| 4116 _json["description"] = description; |
| 4117 } |
| 4118 if (destinations != null) { |
| 4119 _json["destinations"] = destinations.map((value) => (value).toJson()).toLi
st(); |
| 4120 } |
| 4121 if (energyEfficiencyClass != null) { |
| 4122 _json["energyEfficiencyClass"] = energyEfficiencyClass; |
| 4123 } |
| 4124 if (expirationDate != null) { |
| 4125 _json["expirationDate"] = expirationDate; |
| 4126 } |
| 4127 if (gender != null) { |
| 4128 _json["gender"] = gender; |
| 4129 } |
| 4130 if (googleProductCategory != null) { |
| 4131 _json["googleProductCategory"] = googleProductCategory; |
| 4132 } |
| 4133 if (gtin != null) { |
| 4134 _json["gtin"] = gtin; |
| 4135 } |
| 4136 if (id != null) { |
| 4137 _json["id"] = id; |
| 4138 } |
| 4139 if (identifierExists != null) { |
| 4140 _json["identifierExists"] = identifierExists; |
| 4141 } |
| 4142 if (imageLink != null) { |
| 4143 _json["imageLink"] = imageLink; |
| 4144 } |
| 4145 if (installment != null) { |
| 4146 _json["installment"] = (installment).toJson(); |
| 4147 } |
| 4148 if (isBundle != null) { |
| 4149 _json["isBundle"] = isBundle; |
| 4150 } |
| 4151 if (itemGroupId != null) { |
| 4152 _json["itemGroupId"] = itemGroupId; |
| 4153 } |
| 4154 if (kind != null) { |
| 4155 _json["kind"] = kind; |
| 4156 } |
| 4157 if (link != null) { |
| 4158 _json["link"] = link; |
| 4159 } |
| 4160 if (loyaltyPoints != null) { |
| 4161 _json["loyaltyPoints"] = (loyaltyPoints).toJson(); |
| 4162 } |
| 4163 if (material != null) { |
| 4164 _json["material"] = material; |
| 4165 } |
| 4166 if (mobileLink != null) { |
| 4167 _json["mobileLink"] = mobileLink; |
| 4168 } |
| 4169 if (mpn != null) { |
| 4170 _json["mpn"] = mpn; |
| 4171 } |
| 4172 if (multipack != null) { |
| 4173 _json["multipack"] = multipack; |
| 4174 } |
| 4175 if (offerId != null) { |
| 4176 _json["offerId"] = offerId; |
| 4177 } |
| 4178 if (onlineOnly != null) { |
| 4179 _json["onlineOnly"] = onlineOnly; |
| 4180 } |
| 4181 if (pattern != null) { |
| 4182 _json["pattern"] = pattern; |
| 4183 } |
| 4184 if (price != null) { |
| 4185 _json["price"] = (price).toJson(); |
| 4186 } |
| 4187 if (productType != null) { |
| 4188 _json["productType"] = productType; |
| 4189 } |
| 4190 if (salePrice != null) { |
| 4191 _json["salePrice"] = (salePrice).toJson(); |
| 4192 } |
| 4193 if (salePriceEffectiveDate != null) { |
| 4194 _json["salePriceEffectiveDate"] = salePriceEffectiveDate; |
| 4195 } |
| 4196 if (shipping != null) { |
| 4197 _json["shipping"] = shipping.map((value) => (value).toJson()).toList(); |
| 4198 } |
| 4199 if (shippingLabel != null) { |
| 4200 _json["shippingLabel"] = shippingLabel; |
| 4201 } |
| 4202 if (shippingWeight != null) { |
| 4203 _json["shippingWeight"] = (shippingWeight).toJson(); |
| 4204 } |
| 4205 if (sizeSystem != null) { |
| 4206 _json["sizeSystem"] = sizeSystem; |
| 4207 } |
| 4208 if (sizeType != null) { |
| 4209 _json["sizeType"] = sizeType; |
| 4210 } |
| 4211 if (sizes != null) { |
| 4212 _json["sizes"] = sizes; |
| 4213 } |
| 4214 if (targetCountry != null) { |
| 4215 _json["targetCountry"] = targetCountry; |
| 4216 } |
| 4217 if (taxes != null) { |
| 4218 _json["taxes"] = taxes.map((value) => (value).toJson()).toList(); |
| 4219 } |
| 4220 if (title != null) { |
| 4221 _json["title"] = title; |
| 4222 } |
| 4223 if (unitPricingBaseMeasure != null) { |
| 4224 _json["unitPricingBaseMeasure"] = (unitPricingBaseMeasure).toJson(); |
| 4225 } |
| 4226 if (unitPricingMeasure != null) { |
| 4227 _json["unitPricingMeasure"] = (unitPricingMeasure).toJson(); |
| 4228 } |
| 4229 if (validatedDestinations != null) { |
| 4230 _json["validatedDestinations"] = validatedDestinations; |
| 4231 } |
| 4232 if (warnings != null) { |
| 4233 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); |
| 4234 } |
| 4235 return _json; |
| 4236 } |
| 4237 } |
| 4238 |
| 4239 |
| 4240 /** Not documented yet. */ |
| 4241 class ProductCustomAttribute { |
| 4242 /** The name of the attribute. */ |
| 4243 core.String name; |
| 4244 |
| 4245 /** The type of the attribute. */ |
| 4246 core.String type; |
| 4247 |
| 4248 /** |
| 4249 * Free-form unit of the attribute. Unit can only be used for values of type |
| 4250 * INT or FLOAT. |
| 4251 */ |
| 4252 core.String unit; |
| 4253 |
| 4254 /** The value of the attribute. */ |
| 4255 core.String value; |
| 4256 |
| 4257 |
| 4258 ProductCustomAttribute(); |
| 4259 |
| 4260 ProductCustomAttribute.fromJson(core.Map _json) { |
| 4261 if (_json.containsKey("name")) { |
| 4262 name = _json["name"]; |
| 4263 } |
| 4264 if (_json.containsKey("type")) { |
| 4265 type = _json["type"]; |
| 4266 } |
| 4267 if (_json.containsKey("unit")) { |
| 4268 unit = _json["unit"]; |
| 4269 } |
| 4270 if (_json.containsKey("value")) { |
| 4271 value = _json["value"]; |
| 4272 } |
| 4273 } |
| 4274 |
| 4275 core.Map toJson() { |
| 4276 var _json = new core.Map(); |
| 4277 if (name != null) { |
| 4278 _json["name"] = name; |
| 4279 } |
| 4280 if (type != null) { |
| 4281 _json["type"] = type; |
| 4282 } |
| 4283 if (unit != null) { |
| 4284 _json["unit"] = unit; |
| 4285 } |
| 4286 if (value != null) { |
| 4287 _json["value"] = value; |
| 4288 } |
| 4289 return _json; |
| 4290 } |
| 4291 } |
| 4292 |
| 4293 |
| 4294 /** Not documented yet. */ |
| 4295 class ProductCustomGroup { |
| 4296 /** The sub-attributes. */ |
| 4297 core.List<ProductCustomAttribute> attributes; |
| 4298 |
| 4299 /** The name of the group. */ |
| 4300 core.String name; |
| 4301 |
| 4302 |
| 4303 ProductCustomGroup(); |
| 4304 |
| 4305 ProductCustomGroup.fromJson(core.Map _json) { |
| 4306 if (_json.containsKey("attributes")) { |
| 4307 attributes = _json["attributes"].map((value) => new ProductCustomAttribute
.fromJson(value)).toList(); |
| 4308 } |
| 4309 if (_json.containsKey("name")) { |
| 4310 name = _json["name"]; |
| 4311 } |
| 4312 } |
| 4313 |
| 4314 core.Map toJson() { |
| 4315 var _json = new core.Map(); |
| 4316 if (attributes != null) { |
| 4317 _json["attributes"] = attributes.map((value) => (value).toJson()).toList()
; |
| 4318 } |
| 4319 if (name != null) { |
| 4320 _json["name"] = name; |
| 4321 } |
| 4322 return _json; |
| 4323 } |
| 4324 } |
| 4325 |
| 4326 |
| 4327 /** Not documented yet. */ |
| 4328 class ProductDestination { |
| 4329 /** The name of the destination. */ |
| 4330 core.String destinationName; |
| 4331 |
| 4332 /** Whether the destination is required, excluded or should be validated. */ |
| 4333 core.String intention; |
| 4334 |
| 4335 |
| 4336 ProductDestination(); |
| 4337 |
| 4338 ProductDestination.fromJson(core.Map _json) { |
| 4339 if (_json.containsKey("destinationName")) { |
| 4340 destinationName = _json["destinationName"]; |
| 4341 } |
| 4342 if (_json.containsKey("intention")) { |
| 4343 intention = _json["intention"]; |
| 4344 } |
| 4345 } |
| 4346 |
| 4347 core.Map toJson() { |
| 4348 var _json = new core.Map(); |
| 4349 if (destinationName != null) { |
| 4350 _json["destinationName"] = destinationName; |
| 4351 } |
| 4352 if (intention != null) { |
| 4353 _json["intention"] = intention; |
| 4354 } |
| 4355 return _json; |
| 4356 } |
| 4357 } |
| 4358 |
| 4359 |
| 4360 /** Not documented yet. */ |
| 4361 class ProductInstallment { |
| 4362 /** The amount the buyer has to pay per month. */ |
| 4363 Price amount; |
| 4364 |
| 4365 /** The number of installments the buyer has to pay. */ |
| 4366 core.String months; |
| 4367 |
| 4368 |
| 4369 ProductInstallment(); |
| 4370 |
| 4371 ProductInstallment.fromJson(core.Map _json) { |
| 4372 if (_json.containsKey("amount")) { |
| 4373 amount = new Price.fromJson(_json["amount"]); |
| 4374 } |
| 4375 if (_json.containsKey("months")) { |
| 4376 months = _json["months"]; |
| 4377 } |
| 4378 } |
| 4379 |
| 4380 core.Map toJson() { |
| 4381 var _json = new core.Map(); |
| 4382 if (amount != null) { |
| 4383 _json["amount"] = (amount).toJson(); |
| 4384 } |
| 4385 if (months != null) { |
| 4386 _json["months"] = months; |
| 4387 } |
| 4388 return _json; |
| 4389 } |
| 4390 } |
| 4391 |
| 4392 |
| 4393 /** Not documented yet. */ |
| 4394 class ProductShipping { |
| 4395 /** |
| 4396 * The two-letter ISO 3166 country code for the country to which an item will |
| 4397 * ship. |
| 4398 */ |
| 4399 core.String country; |
| 4400 |
| 4401 /** |
| 4402 * The location where the shipping is applicable, represented by a location |
| 4403 * group name. |
| 4404 */ |
| 4405 core.String locationGroupName; |
| 4406 |
| 4407 /** |
| 4408 * The numeric id of a location that the shipping rate applies to as defined |
| 4409 * in the AdWords API. |
| 4410 */ |
| 4411 core.String locationId; |
| 4412 |
| 4413 /** |
| 4414 * The postal code range that the shipping rate applies to, represented by a |
| 4415 * postal code, a postal code prefix using * wildcard, a range between two |
| 4416 * postal codes or two postal code prefixes of equal length. |
| 4417 */ |
| 4418 core.String postalCode; |
| 4419 |
| 4420 /** Fixed shipping price, represented as a number. */ |
| 4421 Price price; |
| 4422 |
| 4423 /** |
| 4424 * The geographic region to which a shipping rate applies (e.g. zip code). |
| 4425 */ |
| 4426 core.String region; |
| 4427 |
| 4428 /** A free-form description of the service class or delivery speed. */ |
| 4429 core.String service; |
| 4430 |
| 4431 |
| 4432 ProductShipping(); |
| 4433 |
| 4434 ProductShipping.fromJson(core.Map _json) { |
| 4435 if (_json.containsKey("country")) { |
| 4436 country = _json["country"]; |
| 4437 } |
| 4438 if (_json.containsKey("locationGroupName")) { |
| 4439 locationGroupName = _json["locationGroupName"]; |
| 4440 } |
| 4441 if (_json.containsKey("locationId")) { |
| 4442 locationId = _json["locationId"]; |
| 4443 } |
| 4444 if (_json.containsKey("postalCode")) { |
| 4445 postalCode = _json["postalCode"]; |
| 4446 } |
| 4447 if (_json.containsKey("price")) { |
| 4448 price = new Price.fromJson(_json["price"]); |
| 4449 } |
| 4450 if (_json.containsKey("region")) { |
| 4451 region = _json["region"]; |
| 4452 } |
| 4453 if (_json.containsKey("service")) { |
| 4454 service = _json["service"]; |
| 4455 } |
| 4456 } |
| 4457 |
| 4458 core.Map toJson() { |
| 4459 var _json = new core.Map(); |
| 4460 if (country != null) { |
| 4461 _json["country"] = country; |
| 4462 } |
| 4463 if (locationGroupName != null) { |
| 4464 _json["locationGroupName"] = locationGroupName; |
| 4465 } |
| 4466 if (locationId != null) { |
| 4467 _json["locationId"] = locationId; |
| 4468 } |
| 4469 if (postalCode != null) { |
| 4470 _json["postalCode"] = postalCode; |
| 4471 } |
| 4472 if (price != null) { |
| 4473 _json["price"] = (price).toJson(); |
| 4474 } |
| 4475 if (region != null) { |
| 4476 _json["region"] = region; |
| 4477 } |
| 4478 if (service != null) { |
| 4479 _json["service"] = service; |
| 4480 } |
| 4481 return _json; |
| 4482 } |
| 4483 } |
| 4484 |
| 4485 |
| 4486 /** Not documented yet. */ |
| 4487 class ProductShippingWeight { |
| 4488 /** The unit of value. */ |
| 4489 core.String unit; |
| 4490 |
| 4491 /** |
| 4492 * The weight of the product used to calculate the shipping cost of the item. |
| 4493 */ |
| 4494 core.double value; |
| 4495 |
| 4496 |
| 4497 ProductShippingWeight(); |
| 4498 |
| 4499 ProductShippingWeight.fromJson(core.Map _json) { |
| 4500 if (_json.containsKey("unit")) { |
| 4501 unit = _json["unit"]; |
| 4502 } |
| 4503 if (_json.containsKey("value")) { |
| 4504 value = _json["value"]; |
| 4505 } |
| 4506 } |
| 4507 |
| 4508 core.Map toJson() { |
| 4509 var _json = new core.Map(); |
| 4510 if (unit != null) { |
| 4511 _json["unit"] = unit; |
| 4512 } |
| 4513 if (value != null) { |
| 4514 _json["value"] = value; |
| 4515 } |
| 4516 return _json; |
| 4517 } |
| 4518 } |
| 4519 |
| 4520 |
| 4521 /** |
| 4522 * The status of a product, i.e., information about a product computed |
| 4523 * asynchronously by the data quality analysis. |
| 4524 */ |
| 4525 class ProductStatus { |
| 4526 /** A list of data quality issues associated with the product. */ |
| 4527 core.List<ProductStatusDataQualityIssue> dataQualityIssues; |
| 4528 |
| 4529 /** The intended destinations for the product. */ |
| 4530 core.List<ProductStatusDestinationStatus> destinationStatuses; |
| 4531 |
| 4532 /** |
| 4533 * Identifies what kind of resource this is. Value: the fixed string |
| 4534 * "content#productStatus". |
| 4535 */ |
| 4536 core.String kind; |
| 4537 |
| 4538 /** The link to the product. */ |
| 4539 core.String link; |
| 4540 |
| 4541 /** The id of the product for which status is reported. */ |
| 4542 core.String productId; |
| 4543 |
| 4544 /** The title of the product. */ |
| 4545 core.String title; |
| 4546 |
| 4547 |
| 4548 ProductStatus(); |
| 4549 |
| 4550 ProductStatus.fromJson(core.Map _json) { |
| 4551 if (_json.containsKey("dataQualityIssues")) { |
| 4552 dataQualityIssues = _json["dataQualityIssues"].map((value) => new ProductS
tatusDataQualityIssue.fromJson(value)).toList(); |
| 4553 } |
| 4554 if (_json.containsKey("destinationStatuses")) { |
| 4555 destinationStatuses = _json["destinationStatuses"].map((value) => new Prod
uctStatusDestinationStatus.fromJson(value)).toList(); |
| 4556 } |
| 4557 if (_json.containsKey("kind")) { |
| 4558 kind = _json["kind"]; |
| 4559 } |
| 4560 if (_json.containsKey("link")) { |
| 4561 link = _json["link"]; |
| 4562 } |
| 4563 if (_json.containsKey("productId")) { |
| 4564 productId = _json["productId"]; |
| 4565 } |
| 4566 if (_json.containsKey("title")) { |
| 4567 title = _json["title"]; |
| 4568 } |
| 4569 } |
| 4570 |
| 4571 core.Map toJson() { |
| 4572 var _json = new core.Map(); |
| 4573 if (dataQualityIssues != null) { |
| 4574 _json["dataQualityIssues"] = dataQualityIssues.map((value) => (value).toJs
on()).toList(); |
| 4575 } |
| 4576 if (destinationStatuses != null) { |
| 4577 _json["destinationStatuses"] = destinationStatuses.map((value) => (value).
toJson()).toList(); |
| 4578 } |
| 4579 if (kind != null) { |
| 4580 _json["kind"] = kind; |
| 4581 } |
| 4582 if (link != null) { |
| 4583 _json["link"] = link; |
| 4584 } |
| 4585 if (productId != null) { |
| 4586 _json["productId"] = productId; |
| 4587 } |
| 4588 if (title != null) { |
| 4589 _json["title"] = title; |
| 4590 } |
| 4591 return _json; |
| 4592 } |
| 4593 } |
| 4594 |
| 4595 |
| 4596 /** Not documented yet. */ |
| 4597 class ProductStatusDataQualityIssue { |
| 4598 /** A more detailed error string. */ |
| 4599 core.String detail; |
| 4600 |
| 4601 /** The fetch status for landing_page_errors. */ |
| 4602 core.String fetchStatus; |
| 4603 |
| 4604 /** The id of the data quality issue. */ |
| 4605 core.String id; |
| 4606 |
| 4607 /** The attribute name that is relevant for the issue. */ |
| 4608 core.String location; |
| 4609 |
| 4610 /** The time stamp of the data quality issue. */ |
| 4611 core.String timestamp; |
| 4612 |
| 4613 /** The value of that attribute that was found on the landing page */ |
| 4614 core.String valueOnLandingPage; |
| 4615 |
| 4616 /** The value the attribute had at time of evaluation. */ |
| 4617 core.String valueProvided; |
| 4618 |
| 4619 |
| 4620 ProductStatusDataQualityIssue(); |
| 4621 |
| 4622 ProductStatusDataQualityIssue.fromJson(core.Map _json) { |
| 4623 if (_json.containsKey("detail")) { |
| 4624 detail = _json["detail"]; |
| 4625 } |
| 4626 if (_json.containsKey("fetchStatus")) { |
| 4627 fetchStatus = _json["fetchStatus"]; |
| 4628 } |
| 4629 if (_json.containsKey("id")) { |
| 4630 id = _json["id"]; |
| 4631 } |
| 4632 if (_json.containsKey("location")) { |
| 4633 location = _json["location"]; |
| 4634 } |
| 4635 if (_json.containsKey("timestamp")) { |
| 4636 timestamp = _json["timestamp"]; |
| 4637 } |
| 4638 if (_json.containsKey("valueOnLandingPage")) { |
| 4639 valueOnLandingPage = _json["valueOnLandingPage"]; |
| 4640 } |
| 4641 if (_json.containsKey("valueProvided")) { |
| 4642 valueProvided = _json["valueProvided"]; |
| 4643 } |
| 4644 } |
| 4645 |
| 4646 core.Map toJson() { |
| 4647 var _json = new core.Map(); |
| 4648 if (detail != null) { |
| 4649 _json["detail"] = detail; |
| 4650 } |
| 4651 if (fetchStatus != null) { |
| 4652 _json["fetchStatus"] = fetchStatus; |
| 4653 } |
| 4654 if (id != null) { |
| 4655 _json["id"] = id; |
| 4656 } |
| 4657 if (location != null) { |
| 4658 _json["location"] = location; |
| 4659 } |
| 4660 if (timestamp != null) { |
| 4661 _json["timestamp"] = timestamp; |
| 4662 } |
| 4663 if (valueOnLandingPage != null) { |
| 4664 _json["valueOnLandingPage"] = valueOnLandingPage; |
| 4665 } |
| 4666 if (valueProvided != null) { |
| 4667 _json["valueProvided"] = valueProvided; |
| 4668 } |
| 4669 return _json; |
| 4670 } |
| 4671 } |
| 4672 |
| 4673 |
| 4674 /** Not documented yet. */ |
| 4675 class ProductStatusDestinationStatus { |
| 4676 /** The destination's approval status. */ |
| 4677 core.String approvalStatus; |
| 4678 |
| 4679 /** The name of the destination */ |
| 4680 core.String destination; |
| 4681 |
| 4682 /** |
| 4683 * Whether the destination is required, excluded, selected by default or |
| 4684 * should be validated. |
| 4685 */ |
| 4686 core.String intention; |
| 4687 |
| 4688 |
| 4689 ProductStatusDestinationStatus(); |
| 4690 |
| 4691 ProductStatusDestinationStatus.fromJson(core.Map _json) { |
| 4692 if (_json.containsKey("approvalStatus")) { |
| 4693 approvalStatus = _json["approvalStatus"]; |
| 4694 } |
| 4695 if (_json.containsKey("destination")) { |
| 4696 destination = _json["destination"]; |
| 4697 } |
| 4698 if (_json.containsKey("intention")) { |
| 4699 intention = _json["intention"]; |
| 4700 } |
| 4701 } |
| 4702 |
| 4703 core.Map toJson() { |
| 4704 var _json = new core.Map(); |
| 4705 if (approvalStatus != null) { |
| 4706 _json["approvalStatus"] = approvalStatus; |
| 4707 } |
| 4708 if (destination != null) { |
| 4709 _json["destination"] = destination; |
| 4710 } |
| 4711 if (intention != null) { |
| 4712 _json["intention"] = intention; |
| 4713 } |
| 4714 return _json; |
| 4715 } |
| 4716 } |
| 4717 |
| 4718 |
| 4719 /** Not documented yet. */ |
| 4720 class ProductTax { |
| 4721 /** |
| 4722 * The country within which the item is taxed, specified with a two-letter ISO |
| 4723 * 3166 country code. |
| 4724 */ |
| 4725 core.String country; |
| 4726 |
| 4727 /** |
| 4728 * The numeric id of a location that the tax rate applies to as defined in the |
| 4729 * Adwords API |
| 4730 * (https://developers.google.com/adwords/api/docs/appendix/geotargeting). |
| 4731 */ |
| 4732 core.String locationId; |
| 4733 |
| 4734 /** |
| 4735 * The postal code range that the tax rate applies to, represented by a ZIP |
| 4736 * code, a ZIP code prefix using * wildcard, a range between two ZIP codes or |
| 4737 * two ZIP code prefixes of equal length. Examples: 94114, 94*, 94002-95460, |
| 4738 * 94*-95*. |
| 4739 */ |
| 4740 core.String postalCode; |
| 4741 |
| 4742 /** The percentage of tax rate that applies to the item price. */ |
| 4743 core.double rate; |
| 4744 |
| 4745 /** The geographic region to which the tax rate applies. */ |
| 4746 core.String region; |
| 4747 |
| 4748 /** Set to true if tax is charged on shipping. */ |
| 4749 core.bool taxShip; |
| 4750 |
| 4751 |
| 4752 ProductTax(); |
| 4753 |
| 4754 ProductTax.fromJson(core.Map _json) { |
| 4755 if (_json.containsKey("country")) { |
| 4756 country = _json["country"]; |
| 4757 } |
| 4758 if (_json.containsKey("locationId")) { |
| 4759 locationId = _json["locationId"]; |
| 4760 } |
| 4761 if (_json.containsKey("postalCode")) { |
| 4762 postalCode = _json["postalCode"]; |
| 4763 } |
| 4764 if (_json.containsKey("rate")) { |
| 4765 rate = _json["rate"]; |
| 4766 } |
| 4767 if (_json.containsKey("region")) { |
| 4768 region = _json["region"]; |
| 4769 } |
| 4770 if (_json.containsKey("taxShip")) { |
| 4771 taxShip = _json["taxShip"]; |
| 4772 } |
| 4773 } |
| 4774 |
| 4775 core.Map toJson() { |
| 4776 var _json = new core.Map(); |
| 4777 if (country != null) { |
| 4778 _json["country"] = country; |
| 4779 } |
| 4780 if (locationId != null) { |
| 4781 _json["locationId"] = locationId; |
| 4782 } |
| 4783 if (postalCode != null) { |
| 4784 _json["postalCode"] = postalCode; |
| 4785 } |
| 4786 if (rate != null) { |
| 4787 _json["rate"] = rate; |
| 4788 } |
| 4789 if (region != null) { |
| 4790 _json["region"] = region; |
| 4791 } |
| 4792 if (taxShip != null) { |
| 4793 _json["taxShip"] = taxShip; |
| 4794 } |
| 4795 return _json; |
| 4796 } |
| 4797 } |
| 4798 |
| 4799 |
| 4800 /** Not documented yet. */ |
| 4801 class ProductUnitPricingBaseMeasure { |
| 4802 /** The unit of the denominator. */ |
| 4803 core.String unit; |
| 4804 |
| 4805 /** The denominator of the unit price. */ |
| 4806 core.String value; |
| 4807 |
| 4808 |
| 4809 ProductUnitPricingBaseMeasure(); |
| 4810 |
| 4811 ProductUnitPricingBaseMeasure.fromJson(core.Map _json) { |
| 4812 if (_json.containsKey("unit")) { |
| 4813 unit = _json["unit"]; |
| 4814 } |
| 4815 if (_json.containsKey("value")) { |
| 4816 value = _json["value"]; |
| 4817 } |
| 4818 } |
| 4819 |
| 4820 core.Map toJson() { |
| 4821 var _json = new core.Map(); |
| 4822 if (unit != null) { |
| 4823 _json["unit"] = unit; |
| 4824 } |
| 4825 if (value != null) { |
| 4826 _json["value"] = value; |
| 4827 } |
| 4828 return _json; |
| 4829 } |
| 4830 } |
| 4831 |
| 4832 |
| 4833 /** Not documented yet. */ |
| 4834 class ProductUnitPricingMeasure { |
| 4835 /** The unit of the measure. */ |
| 4836 core.String unit; |
| 4837 |
| 4838 /** The measure of an item. */ |
| 4839 core.double value; |
| 4840 |
| 4841 |
| 4842 ProductUnitPricingMeasure(); |
| 4843 |
| 4844 ProductUnitPricingMeasure.fromJson(core.Map _json) { |
| 4845 if (_json.containsKey("unit")) { |
| 4846 unit = _json["unit"]; |
| 4847 } |
| 4848 if (_json.containsKey("value")) { |
| 4849 value = _json["value"]; |
| 4850 } |
| 4851 } |
| 4852 |
| 4853 core.Map toJson() { |
| 4854 var _json = new core.Map(); |
| 4855 if (unit != null) { |
| 4856 _json["unit"] = unit; |
| 4857 } |
| 4858 if (value != null) { |
| 4859 _json["value"] = value; |
| 4860 } |
| 4861 return _json; |
| 4862 } |
| 4863 } |
| 4864 |
| 4865 |
| 4866 /** Not documented yet. */ |
| 4867 class ProductsCustomBatchRequest { |
| 4868 /** Not documented yet. */ |
| 4869 core.List<ProductsCustomBatchRequestEntry> entries; |
| 4870 |
| 4871 |
| 4872 ProductsCustomBatchRequest(); |
| 4873 |
| 4874 ProductsCustomBatchRequest.fromJson(core.Map _json) { |
| 4875 if (_json.containsKey("entries")) { |
| 4876 entries = _json["entries"].map((value) => new ProductsCustomBatchRequestEn
try.fromJson(value)).toList(); |
| 4877 } |
| 4878 } |
| 4879 |
| 4880 core.Map toJson() { |
| 4881 var _json = new core.Map(); |
| 4882 if (entries != null) { |
| 4883 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 4884 } |
| 4885 return _json; |
| 4886 } |
| 4887 } |
| 4888 |
| 4889 |
| 4890 /** |
| 4891 * A batch entry encoding a single non-batch request to the products service of |
| 4892 * the Content API for Shopping. |
| 4893 */ |
| 4894 class ProductsCustomBatchRequestEntry { |
| 4895 /** An entry ID, unique within the batch request. */ |
| 4896 core.int batchId; |
| 4897 |
| 4898 /** The ID of the managing account. */ |
| 4899 core.String merchantId; |
| 4900 |
| 4901 /** The method (get, insert or delete). */ |
| 4902 core.String method; |
| 4903 |
| 4904 /** The product to insert. Only required if the method is insert. */ |
| 4905 Product product; |
| 4906 |
| 4907 /** |
| 4908 * The ID of the product to get or delete. Only defined if the method is get |
| 4909 * or delete. |
| 4910 */ |
| 4911 core.String productId; |
| 4912 |
| 4913 |
| 4914 ProductsCustomBatchRequestEntry(); |
| 4915 |
| 4916 ProductsCustomBatchRequestEntry.fromJson(core.Map _json) { |
| 4917 if (_json.containsKey("batchId")) { |
| 4918 batchId = _json["batchId"]; |
| 4919 } |
| 4920 if (_json.containsKey("merchantId")) { |
| 4921 merchantId = _json["merchantId"]; |
| 4922 } |
| 4923 if (_json.containsKey("method")) { |
| 4924 method = _json["method"]; |
| 4925 } |
| 4926 if (_json.containsKey("product")) { |
| 4927 product = new Product.fromJson(_json["product"]); |
| 4928 } |
| 4929 if (_json.containsKey("productId")) { |
| 4930 productId = _json["productId"]; |
| 4931 } |
| 4932 } |
| 4933 |
| 4934 core.Map toJson() { |
| 4935 var _json = new core.Map(); |
| 4936 if (batchId != null) { |
| 4937 _json["batchId"] = batchId; |
| 4938 } |
| 4939 if (merchantId != null) { |
| 4940 _json["merchantId"] = merchantId; |
| 4941 } |
| 4942 if (method != null) { |
| 4943 _json["method"] = method; |
| 4944 } |
| 4945 if (product != null) { |
| 4946 _json["product"] = (product).toJson(); |
| 4947 } |
| 4948 if (productId != null) { |
| 4949 _json["productId"] = productId; |
| 4950 } |
| 4951 return _json; |
| 4952 } |
| 4953 } |
| 4954 |
| 4955 |
| 4956 /** Not documented yet. */ |
| 4957 class ProductsCustomBatchResponse { |
| 4958 /** Not documented yet. */ |
| 4959 core.List<ProductsCustomBatchResponseEntry> entries; |
| 4960 |
| 4961 /** |
| 4962 * Identifies what kind of resource this is. Value: the fixed string |
| 4963 * "content#productsCustomBatchResponse". |
| 4964 */ |
| 4965 core.String kind; |
| 4966 |
| 4967 |
| 4968 ProductsCustomBatchResponse(); |
| 4969 |
| 4970 ProductsCustomBatchResponse.fromJson(core.Map _json) { |
| 4971 if (_json.containsKey("entries")) { |
| 4972 entries = _json["entries"].map((value) => new ProductsCustomBatchResponseE
ntry.fromJson(value)).toList(); |
| 4973 } |
| 4974 if (_json.containsKey("kind")) { |
| 4975 kind = _json["kind"]; |
| 4976 } |
| 4977 } |
| 4978 |
| 4979 core.Map toJson() { |
| 4980 var _json = new core.Map(); |
| 4981 if (entries != null) { |
| 4982 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 4983 } |
| 4984 if (kind != null) { |
| 4985 _json["kind"] = kind; |
| 4986 } |
| 4987 return _json; |
| 4988 } |
| 4989 } |
| 4990 |
| 4991 |
| 4992 /** |
| 4993 * A batch entry encoding a single non-batch response from the products service |
| 4994 * of the Content API for Shopping. |
| 4995 */ |
| 4996 class ProductsCustomBatchResponseEntry { |
| 4997 /** The ID of the request entry this entry responds to. */ |
| 4998 core.int batchId; |
| 4999 |
| 5000 /** A list of errors defined if and only if the request failed. */ |
| 5001 Errors errors; |
| 5002 |
| 5003 /** |
| 5004 * Identifies what kind of resource this is. Value: the fixed string |
| 5005 * "content#productsCustomBatchResponseEntry". |
| 5006 */ |
| 5007 core.String kind; |
| 5008 |
| 5009 /** |
| 5010 * The inserted product. Only defined if the method is insert and if the |
| 5011 * request was successful. |
| 5012 */ |
| 5013 Product product; |
| 5014 |
| 5015 |
| 5016 ProductsCustomBatchResponseEntry(); |
| 5017 |
| 5018 ProductsCustomBatchResponseEntry.fromJson(core.Map _json) { |
| 5019 if (_json.containsKey("batchId")) { |
| 5020 batchId = _json["batchId"]; |
| 5021 } |
| 5022 if (_json.containsKey("errors")) { |
| 5023 errors = new Errors.fromJson(_json["errors"]); |
| 5024 } |
| 5025 if (_json.containsKey("kind")) { |
| 5026 kind = _json["kind"]; |
| 5027 } |
| 5028 if (_json.containsKey("product")) { |
| 5029 product = new Product.fromJson(_json["product"]); |
| 5030 } |
| 5031 } |
| 5032 |
| 5033 core.Map toJson() { |
| 5034 var _json = new core.Map(); |
| 5035 if (batchId != null) { |
| 5036 _json["batchId"] = batchId; |
| 5037 } |
| 5038 if (errors != null) { |
| 5039 _json["errors"] = (errors).toJson(); |
| 5040 } |
| 5041 if (kind != null) { |
| 5042 _json["kind"] = kind; |
| 5043 } |
| 5044 if (product != null) { |
| 5045 _json["product"] = (product).toJson(); |
| 5046 } |
| 5047 return _json; |
| 5048 } |
| 5049 } |
| 5050 |
| 5051 |
| 5052 /** Not documented yet. */ |
| 5053 class ProductsListResponse { |
| 5054 /** |
| 5055 * Identifies what kind of resource this is. Value: the fixed string |
| 5056 * "content#productsListResponse". |
| 5057 */ |
| 5058 core.String kind; |
| 5059 |
| 5060 /** Not documented yet. */ |
| 5061 core.String nextPageToken; |
| 5062 |
| 5063 /** Not documented yet. */ |
| 5064 core.List<Product> resources; |
| 5065 |
| 5066 |
| 5067 ProductsListResponse(); |
| 5068 |
| 5069 ProductsListResponse.fromJson(core.Map _json) { |
| 5070 if (_json.containsKey("kind")) { |
| 5071 kind = _json["kind"]; |
| 5072 } |
| 5073 if (_json.containsKey("nextPageToken")) { |
| 5074 nextPageToken = _json["nextPageToken"]; |
| 5075 } |
| 5076 if (_json.containsKey("resources")) { |
| 5077 resources = _json["resources"].map((value) => new Product.fromJson(value))
.toList(); |
| 5078 } |
| 5079 } |
| 5080 |
| 5081 core.Map toJson() { |
| 5082 var _json = new core.Map(); |
| 5083 if (kind != null) { |
| 5084 _json["kind"] = kind; |
| 5085 } |
| 5086 if (nextPageToken != null) { |
| 5087 _json["nextPageToken"] = nextPageToken; |
| 5088 } |
| 5089 if (resources != null) { |
| 5090 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 5091 } |
| 5092 return _json; |
| 5093 } |
| 5094 } |
| 5095 |
| 5096 |
| 5097 /** Not documented yet. */ |
| 5098 class ProductstatusesCustomBatchRequest { |
| 5099 /** Not documented yet. */ |
| 5100 core.List<ProductstatusesCustomBatchRequestEntry> entries; |
| 5101 |
| 5102 |
| 5103 ProductstatusesCustomBatchRequest(); |
| 5104 |
| 5105 ProductstatusesCustomBatchRequest.fromJson(core.Map _json) { |
| 5106 if (_json.containsKey("entries")) { |
| 5107 entries = _json["entries"].map((value) => new ProductstatusesCustomBatchRe
questEntry.fromJson(value)).toList(); |
| 5108 } |
| 5109 } |
| 5110 |
| 5111 core.Map toJson() { |
| 5112 var _json = new core.Map(); |
| 5113 if (entries != null) { |
| 5114 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 5115 } |
| 5116 return _json; |
| 5117 } |
| 5118 } |
| 5119 |
| 5120 |
| 5121 /** |
| 5122 * A batch entry encoding a single non-batch request to the productstatuses |
| 5123 * service of the Content API for Shopping. |
| 5124 */ |
| 5125 class ProductstatusesCustomBatchRequestEntry { |
| 5126 /** An entry ID, unique within the batch request. */ |
| 5127 core.int batchId; |
| 5128 |
| 5129 /** The ID of the managing account. */ |
| 5130 core.String merchantId; |
| 5131 |
| 5132 /** The method (get). */ |
| 5133 core.String method; |
| 5134 |
| 5135 /** The ID of the product whose status to get. */ |
| 5136 core.String productId; |
| 5137 |
| 5138 |
| 5139 ProductstatusesCustomBatchRequestEntry(); |
| 5140 |
| 5141 ProductstatusesCustomBatchRequestEntry.fromJson(core.Map _json) { |
| 5142 if (_json.containsKey("batchId")) { |
| 5143 batchId = _json["batchId"]; |
| 5144 } |
| 5145 if (_json.containsKey("merchantId")) { |
| 5146 merchantId = _json["merchantId"]; |
| 5147 } |
| 5148 if (_json.containsKey("method")) { |
| 5149 method = _json["method"]; |
| 5150 } |
| 5151 if (_json.containsKey("productId")) { |
| 5152 productId = _json["productId"]; |
| 5153 } |
| 5154 } |
| 5155 |
| 5156 core.Map toJson() { |
| 5157 var _json = new core.Map(); |
| 5158 if (batchId != null) { |
| 5159 _json["batchId"] = batchId; |
| 5160 } |
| 5161 if (merchantId != null) { |
| 5162 _json["merchantId"] = merchantId; |
| 5163 } |
| 5164 if (method != null) { |
| 5165 _json["method"] = method; |
| 5166 } |
| 5167 if (productId != null) { |
| 5168 _json["productId"] = productId; |
| 5169 } |
| 5170 return _json; |
| 5171 } |
| 5172 } |
| 5173 |
| 5174 |
| 5175 /** Not documented yet. */ |
| 5176 class ProductstatusesCustomBatchResponse { |
| 5177 /** Not documented yet. */ |
| 5178 core.List<ProductstatusesCustomBatchResponseEntry> entries; |
| 5179 |
| 5180 /** |
| 5181 * Identifies what kind of resource this is. Value: the fixed string |
| 5182 * "content#productstatusesCustomBatchResponse". |
| 5183 */ |
| 5184 core.String kind; |
| 5185 |
| 5186 |
| 5187 ProductstatusesCustomBatchResponse(); |
| 5188 |
| 5189 ProductstatusesCustomBatchResponse.fromJson(core.Map _json) { |
| 5190 if (_json.containsKey("entries")) { |
| 5191 entries = _json["entries"].map((value) => new ProductstatusesCustomBatchRe
sponseEntry.fromJson(value)).toList(); |
| 5192 } |
| 5193 if (_json.containsKey("kind")) { |
| 5194 kind = _json["kind"]; |
| 5195 } |
| 5196 } |
| 5197 |
| 5198 core.Map toJson() { |
| 5199 var _json = new core.Map(); |
| 5200 if (entries != null) { |
| 5201 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 5202 } |
| 5203 if (kind != null) { |
| 5204 _json["kind"] = kind; |
| 5205 } |
| 5206 return _json; |
| 5207 } |
| 5208 } |
| 5209 |
| 5210 |
| 5211 /** |
| 5212 * A batch entry encoding a single non-batch response from the productstatuses |
| 5213 * service of the Content API for Shopping. |
| 5214 */ |
| 5215 class ProductstatusesCustomBatchResponseEntry { |
| 5216 /** The ID of the request entry this entry responds to. */ |
| 5217 core.int batchId; |
| 5218 |
| 5219 /** A list of errors, if the request failed. */ |
| 5220 Errors errors; |
| 5221 |
| 5222 /** |
| 5223 * Identifies what kind of resource this is. Value: the fixed string |
| 5224 * "content#productstatusesCustomBatchResponseEntry". |
| 5225 */ |
| 5226 core.String kind; |
| 5227 |
| 5228 /** |
| 5229 * The requested product status. Only defined if the request was successful. |
| 5230 */ |
| 5231 ProductStatus productStatus; |
| 5232 |
| 5233 |
| 5234 ProductstatusesCustomBatchResponseEntry(); |
| 5235 |
| 5236 ProductstatusesCustomBatchResponseEntry.fromJson(core.Map _json) { |
| 5237 if (_json.containsKey("batchId")) { |
| 5238 batchId = _json["batchId"]; |
| 5239 } |
| 5240 if (_json.containsKey("errors")) { |
| 5241 errors = new Errors.fromJson(_json["errors"]); |
| 5242 } |
| 5243 if (_json.containsKey("kind")) { |
| 5244 kind = _json["kind"]; |
| 5245 } |
| 5246 if (_json.containsKey("productStatus")) { |
| 5247 productStatus = new ProductStatus.fromJson(_json["productStatus"]); |
| 5248 } |
| 5249 } |
| 5250 |
| 5251 core.Map toJson() { |
| 5252 var _json = new core.Map(); |
| 5253 if (batchId != null) { |
| 5254 _json["batchId"] = batchId; |
| 5255 } |
| 5256 if (errors != null) { |
| 5257 _json["errors"] = (errors).toJson(); |
| 5258 } |
| 5259 if (kind != null) { |
| 5260 _json["kind"] = kind; |
| 5261 } |
| 5262 if (productStatus != null) { |
| 5263 _json["productStatus"] = (productStatus).toJson(); |
| 5264 } |
| 5265 return _json; |
| 5266 } |
| 5267 } |
| 5268 |
| 5269 |
| 5270 /** Not documented yet. */ |
| 5271 class ProductstatusesListResponse { |
| 5272 /** |
| 5273 * Identifies what kind of resource this is. Value: the fixed string |
| 5274 * "content#productstatusesListResponse". |
| 5275 */ |
| 5276 core.String kind; |
| 5277 |
| 5278 /** Not documented yet. */ |
| 5279 core.String nextPageToken; |
| 5280 |
| 5281 /** Not documented yet. */ |
| 5282 core.List<ProductStatus> resources; |
| 5283 |
| 5284 |
| 5285 ProductstatusesListResponse(); |
| 5286 |
| 5287 ProductstatusesListResponse.fromJson(core.Map _json) { |
| 5288 if (_json.containsKey("kind")) { |
| 5289 kind = _json["kind"]; |
| 5290 } |
| 5291 if (_json.containsKey("nextPageToken")) { |
| 5292 nextPageToken = _json["nextPageToken"]; |
| 5293 } |
| 5294 if (_json.containsKey("resources")) { |
| 5295 resources = _json["resources"].map((value) => new ProductStatus.fromJson(v
alue)).toList(); |
| 5296 } |
| 5297 } |
| 5298 |
| 5299 core.Map toJson() { |
| 5300 var _json = new core.Map(); |
| 5301 if (kind != null) { |
| 5302 _json["kind"] = kind; |
| 5303 } |
| 5304 if (nextPageToken != null) { |
| 5305 _json["nextPageToken"] = nextPageToken; |
| 5306 } |
| 5307 if (resources != null) { |
| 5308 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 5309 } |
| 5310 return _json; |
| 5311 } |
| 5312 } |
| 5313 |
| 5314 |
OLD | NEW |