| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.adexchangebuyer.v1_3; | 3 library googleapis.adexchangebuyer.v1_4; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client adexchangebuyer/v1.3'; | 15 const core.String USER_AGENT = 'dart-api-client adexchangebuyer/v1.4'; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Accesses your bidding-account information, submits creatives for validation, | 18 * Accesses your bidding-account information, submits creatives for validation, |
| 19 * finds available direct deals, and retrieves performance reports. | 19 * finds available direct deals, and retrieves performance reports. |
| 20 */ | 20 */ |
| 21 class AdexchangebuyerApi { | 21 class AdexchangebuyerApi { |
| 22 /** Manage your Ad Exchange buyer account configuration */ | 22 /** Manage your Ad Exchange buyer account configuration */ |
| 23 static const AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchang
e.buyer"; | 23 static const AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchang
e.buyer"; |
| 24 | 24 |
| 25 | 25 |
| 26 final commons.ApiRequester _requester; | 26 final commons.ApiRequester _requester; |
| 27 | 27 |
| 28 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); | 28 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); |
| 29 BillingInfoResourceApi get billingInfo => new BillingInfoResourceApi(_requeste
r); | 29 BillingInfoResourceApi get billingInfo => new BillingInfoResourceApi(_requeste
r); |
| 30 BudgetResourceApi get budget => new BudgetResourceApi(_requester); | 30 BudgetResourceApi get budget => new BudgetResourceApi(_requester); |
| 31 CreativesResourceApi get creatives => new CreativesResourceApi(_requester); | 31 CreativesResourceApi get creatives => new CreativesResourceApi(_requester); |
| 32 DirectDealsResourceApi get directDeals => new DirectDealsResourceApi(_requeste
r); | |
| 33 PerformanceReportResourceApi get performanceReport => new PerformanceReportRes
ourceApi(_requester); | 32 PerformanceReportResourceApi get performanceReport => new PerformanceReportRes
ourceApi(_requester); |
| 34 PretargetingConfigResourceApi get pretargetingConfig => new PretargetingConfig
ResourceApi(_requester); | 33 PretargetingConfigResourceApi get pretargetingConfig => new PretargetingConfig
ResourceApi(_requester); |
| 35 | 34 |
| 36 AdexchangebuyerApi(http.Client client, {core.String rootUrl: "https://www.goog
leapis.com/", core.String servicePath: "adexchangebuyer/v1.3/"}) : | 35 AdexchangebuyerApi(http.Client client, {core.String rootUrl: "https://www.goog
leapis.com/", core.String servicePath: "adexchangebuyer/v1.4/"}) : |
| 37 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 36 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 38 } | 37 } |
| 39 | 38 |
| 40 | 39 |
| 41 class AccountsResourceApi { | 40 class AccountsResourceApi { |
| 42 final commons.ApiRequester _requester; | 41 final commons.ApiRequester _requester; |
| 43 | 42 |
| 44 AccountsResourceApi(commons.ApiRequester client) : | 43 AccountsResourceApi(commons.ApiRequester client) : |
| 45 _requester = client; | 44 _requester = client; |
| 46 | 45 |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 * will be available 30-40 minutes after submission. | 540 * will be available 30-40 minutes after submission. |
| 542 * | 541 * |
| 543 * Request parameters: | 542 * Request parameters: |
| 544 * | 543 * |
| 545 * [accountId] - When specified, only creatives for the given account ids are | 544 * [accountId] - When specified, only creatives for the given account ids are |
| 546 * returned. | 545 * returned. |
| 547 * | 546 * |
| 548 * [buyerCreativeId] - When specified, only creatives for the given buyer | 547 * [buyerCreativeId] - When specified, only creatives for the given buyer |
| 549 * creative ids are returned. | 548 * creative ids are returned. |
| 550 * | 549 * |
| 550 * [dealsStatusFilter] - When specified, only creatives having the given |
| 551 * direct deals status are returned. |
| 552 * Possible string values are: |
| 553 * - "approved" : Creatives which have been approved for serving on direct |
| 554 * deals. |
| 555 * - "conditionally_approved" : Creatives which have been conditionally |
| 556 * approved for serving on direct deals. |
| 557 * - "disapproved" : Creatives which have been disapproved for serving on |
| 558 * direct deals. |
| 559 * - "not_checked" : Creatives whose direct deals status is not yet checked. |
| 560 * |
| 551 * [maxResults] - Maximum number of entries returned on one result page. If | 561 * [maxResults] - Maximum number of entries returned on one result page. If |
| 552 * not set, the default is 100. Optional. | 562 * not set, the default is 100. Optional. |
| 553 * Value must be between "1" and "1000". | 563 * Value must be between "1" and "1000". |
| 554 * | 564 * |
| 565 * [openAuctionStatusFilter] - When specified, only creatives having the given |
| 566 * open auction status are returned. |
| 567 * Possible string values are: |
| 568 * - "approved" : Creatives which have been approved for serving on the open |
| 569 * auction. |
| 570 * - "conditionally_approved" : Creatives which have been conditionally |
| 571 * approved for serving on the open auction. |
| 572 * - "disapproved" : Creatives which have been disapproved for serving on the |
| 573 * open auction. |
| 574 * - "not_checked" : Creatives whose open auction status is not yet checked. |
| 575 * |
| 555 * [pageToken] - A continuation token, used to page through ad clients. To | 576 * [pageToken] - A continuation token, used to page through ad clients. To |
| 556 * retrieve the next page, set this parameter to the value of "nextPageToken" | 577 * retrieve the next page, set this parameter to the value of "nextPageToken" |
| 557 * from the previous response. Optional. | 578 * from the previous response. Optional. |
| 558 * | 579 * |
| 559 * [statusFilter] - When specified, only creatives having the given status are | |
| 560 * returned. | |
| 561 * Possible string values are: | |
| 562 * - "approved" : Creatives which have been approved. | |
| 563 * - "disapproved" : Creatives which have been disapproved. | |
| 564 * - "not_checked" : Creatives whose status is not yet checked. | |
| 565 * | |
| 566 * Completes with a [CreativesList]. | 580 * Completes with a [CreativesList]. |
| 567 * | 581 * |
| 568 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 582 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 569 * error. | 583 * error. |
| 570 * | 584 * |
| 571 * If the used [http.Client] completes with an error when making a REST call, | 585 * If the used [http.Client] completes with an error when making a REST call, |
| 572 * this method will complete with the same error. | 586 * this method will complete with the same error. |
| 573 */ | 587 */ |
| 574 async.Future<CreativesList> list({core.List<core.int> accountId, core.List<cor
e.String> buyerCreativeId, core.int maxResults, core.String pageToken, core.Stri
ng statusFilter}) { | 588 async.Future<CreativesList> list({core.List<core.int> accountId, core.List<cor
e.String> buyerCreativeId, core.String dealsStatusFilter, core.int maxResults, c
ore.String openAuctionStatusFilter, core.String pageToken}) { |
| 575 var _url = null; | 589 var _url = null; |
| 576 var _queryParams = new core.Map(); | 590 var _queryParams = new core.Map(); |
| 577 var _uploadMedia = null; | 591 var _uploadMedia = null; |
| 578 var _uploadOptions = null; | 592 var _uploadOptions = null; |
| 579 var _downloadOptions = commons.DownloadOptions.Metadata; | 593 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 580 var _body = null; | 594 var _body = null; |
| 581 | 595 |
| 582 if (accountId != null) { | 596 if (accountId != null) { |
| 583 _queryParams["accountId"] = accountId.map((item) => "${item}").toList(); | 597 _queryParams["accountId"] = accountId.map((item) => "${item}").toList(); |
| 584 } | 598 } |
| 585 if (buyerCreativeId != null) { | 599 if (buyerCreativeId != null) { |
| 586 _queryParams["buyerCreativeId"] = buyerCreativeId; | 600 _queryParams["buyerCreativeId"] = buyerCreativeId; |
| 587 } | 601 } |
| 602 if (dealsStatusFilter != null) { |
| 603 _queryParams["dealsStatusFilter"] = [dealsStatusFilter]; |
| 604 } |
| 588 if (maxResults != null) { | 605 if (maxResults != null) { |
| 589 _queryParams["maxResults"] = ["${maxResults}"]; | 606 _queryParams["maxResults"] = ["${maxResults}"]; |
| 590 } | 607 } |
| 608 if (openAuctionStatusFilter != null) { |
| 609 _queryParams["openAuctionStatusFilter"] = [openAuctionStatusFilter]; |
| 610 } |
| 591 if (pageToken != null) { | 611 if (pageToken != null) { |
| 592 _queryParams["pageToken"] = [pageToken]; | 612 _queryParams["pageToken"] = [pageToken]; |
| 593 } | 613 } |
| 594 if (statusFilter != null) { | |
| 595 _queryParams["statusFilter"] = [statusFilter]; | |
| 596 } | |
| 597 | 614 |
| 598 _url = 'creatives'; | 615 _url = 'creatives'; |
| 599 | 616 |
| 600 var _response = _requester.request(_url, | 617 var _response = _requester.request(_url, |
| 601 "GET", | 618 "GET", |
| 602 body: _body, | 619 body: _body, |
| 603 queryParams: _queryParams, | 620 queryParams: _queryParams, |
| 604 uploadOptions: _uploadOptions, | 621 uploadOptions: _uploadOptions, |
| 605 uploadMedia: _uploadMedia, | 622 uploadMedia: _uploadMedia, |
| 606 downloadOptions: _downloadOptions); | 623 downloadOptions: _downloadOptions); |
| 607 return _response.then((data) => new CreativesList.fromJson(data)); | 624 return _response.then((data) => new CreativesList.fromJson(data)); |
| 608 } | 625 } |
| 609 | 626 |
| 610 } | 627 } |
| 611 | 628 |
| 612 | 629 |
| 613 class DirectDealsResourceApi { | |
| 614 final commons.ApiRequester _requester; | |
| 615 | |
| 616 DirectDealsResourceApi(commons.ApiRequester client) : | |
| 617 _requester = client; | |
| 618 | |
| 619 /** | |
| 620 * Gets one direct deal by ID. | |
| 621 * | |
| 622 * Request parameters: | |
| 623 * | |
| 624 * [id] - The direct deal id | |
| 625 * | |
| 626 * Completes with a [DirectDeal]. | |
| 627 * | |
| 628 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 629 * error. | |
| 630 * | |
| 631 * If the used [http.Client] completes with an error when making a REST call, | |
| 632 * this method will complete with the same error. | |
| 633 */ | |
| 634 async.Future<DirectDeal> get(core.String id) { | |
| 635 var _url = null; | |
| 636 var _queryParams = new core.Map(); | |
| 637 var _uploadMedia = null; | |
| 638 var _uploadOptions = null; | |
| 639 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 640 var _body = null; | |
| 641 | |
| 642 if (id == null) { | |
| 643 throw new core.ArgumentError("Parameter id is required."); | |
| 644 } | |
| 645 | |
| 646 _url = 'directdeals/' + commons.Escaper.ecapeVariable('$id'); | |
| 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 DirectDeal.fromJson(data)); | |
| 656 } | |
| 657 | |
| 658 /** | |
| 659 * Retrieves the authenticated user's list of direct deals. | |
| 660 * | |
| 661 * Request parameters: | |
| 662 * | |
| 663 * Completes with a [DirectDealsList]. | |
| 664 * | |
| 665 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 666 * error. | |
| 667 * | |
| 668 * If the used [http.Client] completes with an error when making a REST call, | |
| 669 * this method will complete with the same error. | |
| 670 */ | |
| 671 async.Future<DirectDealsList> list() { | |
| 672 var _url = null; | |
| 673 var _queryParams = new core.Map(); | |
| 674 var _uploadMedia = null; | |
| 675 var _uploadOptions = null; | |
| 676 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 677 var _body = null; | |
| 678 | |
| 679 | |
| 680 _url = 'directdeals'; | |
| 681 | |
| 682 var _response = _requester.request(_url, | |
| 683 "GET", | |
| 684 body: _body, | |
| 685 queryParams: _queryParams, | |
| 686 uploadOptions: _uploadOptions, | |
| 687 uploadMedia: _uploadMedia, | |
| 688 downloadOptions: _downloadOptions); | |
| 689 return _response.then((data) => new DirectDealsList.fromJson(data)); | |
| 690 } | |
| 691 | |
| 692 } | |
| 693 | |
| 694 | |
| 695 class PerformanceReportResourceApi { | 630 class PerformanceReportResourceApi { |
| 696 final commons.ApiRequester _requester; | 631 final commons.ApiRequester _requester; |
| 697 | 632 |
| 698 PerformanceReportResourceApi(commons.ApiRequester client) : | 633 PerformanceReportResourceApi(commons.ApiRequester client) : |
| 699 _requester = client; | 634 _requester = client; |
| 700 | 635 |
| 701 /** | 636 /** |
| 702 * Retrieves the authenticated user's list of performance metrics. | 637 * Retrieves the authenticated user's list of performance metrics. |
| 703 * | 638 * |
| 704 * Request parameters: | 639 * Request parameters: |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 if (details != null) { | 1326 if (details != null) { |
| 1392 _json["details"] = details; | 1327 _json["details"] = details; |
| 1393 } | 1328 } |
| 1394 if (reason != null) { | 1329 if (reason != null) { |
| 1395 _json["reason"] = reason; | 1330 _json["reason"] = reason; |
| 1396 } | 1331 } |
| 1397 return _json; | 1332 return _json; |
| 1398 } | 1333 } |
| 1399 } | 1334 } |
| 1400 | 1335 |
| 1401 class CreativeDisapprovalReasons { | |
| 1402 /** Additional details about the reason for disapproval. */ | |
| 1403 core.List<core.String> details; | |
| 1404 /** The categorized reason for disapproval. */ | |
| 1405 core.String reason; | |
| 1406 | |
| 1407 CreativeDisapprovalReasons(); | |
| 1408 | |
| 1409 CreativeDisapprovalReasons.fromJson(core.Map _json) { | |
| 1410 if (_json.containsKey("details")) { | |
| 1411 details = _json["details"]; | |
| 1412 } | |
| 1413 if (_json.containsKey("reason")) { | |
| 1414 reason = _json["reason"]; | |
| 1415 } | |
| 1416 } | |
| 1417 | |
| 1418 core.Map toJson() { | |
| 1419 var _json = new core.Map(); | |
| 1420 if (details != null) { | |
| 1421 _json["details"] = details; | |
| 1422 } | |
| 1423 if (reason != null) { | |
| 1424 _json["reason"] = reason; | |
| 1425 } | |
| 1426 return _json; | |
| 1427 } | |
| 1428 } | |
| 1429 | |
| 1430 class CreativeFilteringReasonsReasons { | 1336 class CreativeFilteringReasonsReasons { |
| 1431 /** | 1337 /** |
| 1432 * The number of times the creative was filtered for the status. The count is | 1338 * The number of times the creative was filtered for the status. The count is |
| 1433 * aggregated across all publishers on the exchange. | 1339 * aggregated across all publishers on the exchange. |
| 1434 */ | 1340 */ |
| 1435 core.String filteringCount; | 1341 core.String filteringCount; |
| 1436 /** | 1342 /** |
| 1437 * The filtering status code. Please refer to the creative-status-codes.txt | 1343 * The filtering status code. Please refer to the creative-status-codes.txt |
| 1438 * file for different statuses. | 1344 * file for different statuses. |
| 1439 */ | 1345 */ |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 if (date != null) { | 1397 if (date != null) { |
| 1492 _json["date"] = date; | 1398 _json["date"] = date; |
| 1493 } | 1399 } |
| 1494 if (reasons != null) { | 1400 if (reasons != null) { |
| 1495 _json["reasons"] = reasons.map((value) => (value).toJson()).toList(); | 1401 _json["reasons"] = reasons.map((value) => (value).toJson()).toList(); |
| 1496 } | 1402 } |
| 1497 return _json; | 1403 return _json; |
| 1498 } | 1404 } |
| 1499 } | 1405 } |
| 1500 | 1406 |
| 1407 class CreativeServingRestrictionsContexts { |
| 1408 /** |
| 1409 * Only set when contextType=AUCTION_TYPE. Represents the auction types this |
| 1410 * restriction applies to. |
| 1411 */ |
| 1412 core.List<core.String> auctionType; |
| 1413 /** |
| 1414 * The type of context (e.g., location, platform, auction type, SSL-ness). |
| 1415 */ |
| 1416 core.String contextType; |
| 1417 /** |
| 1418 * Only set when contextType=LOCATION. Represents the geo criterias this |
| 1419 * restriction applies to. |
| 1420 */ |
| 1421 core.List<core.int> geoCriteriaId; |
| 1422 /** |
| 1423 * Only set when contextType=PLATFORM. Represents the platforms this |
| 1424 * restriction applies to. |
| 1425 */ |
| 1426 core.List<core.String> platform; |
| 1427 |
| 1428 CreativeServingRestrictionsContexts(); |
| 1429 |
| 1430 CreativeServingRestrictionsContexts.fromJson(core.Map _json) { |
| 1431 if (_json.containsKey("auctionType")) { |
| 1432 auctionType = _json["auctionType"]; |
| 1433 } |
| 1434 if (_json.containsKey("contextType")) { |
| 1435 contextType = _json["contextType"]; |
| 1436 } |
| 1437 if (_json.containsKey("geoCriteriaId")) { |
| 1438 geoCriteriaId = _json["geoCriteriaId"]; |
| 1439 } |
| 1440 if (_json.containsKey("platform")) { |
| 1441 platform = _json["platform"]; |
| 1442 } |
| 1443 } |
| 1444 |
| 1445 core.Map toJson() { |
| 1446 var _json = new core.Map(); |
| 1447 if (auctionType != null) { |
| 1448 _json["auctionType"] = auctionType; |
| 1449 } |
| 1450 if (contextType != null) { |
| 1451 _json["contextType"] = contextType; |
| 1452 } |
| 1453 if (geoCriteriaId != null) { |
| 1454 _json["geoCriteriaId"] = geoCriteriaId; |
| 1455 } |
| 1456 if (platform != null) { |
| 1457 _json["platform"] = platform; |
| 1458 } |
| 1459 return _json; |
| 1460 } |
| 1461 } |
| 1462 |
| 1463 class CreativeServingRestrictionsDisapprovalReasons { |
| 1464 /** Additional details about the reason for disapproval. */ |
| 1465 core.List<core.String> details; |
| 1466 /** The categorized reason for disapproval. */ |
| 1467 core.String reason; |
| 1468 |
| 1469 CreativeServingRestrictionsDisapprovalReasons(); |
| 1470 |
| 1471 CreativeServingRestrictionsDisapprovalReasons.fromJson(core.Map _json) { |
| 1472 if (_json.containsKey("details")) { |
| 1473 details = _json["details"]; |
| 1474 } |
| 1475 if (_json.containsKey("reason")) { |
| 1476 reason = _json["reason"]; |
| 1477 } |
| 1478 } |
| 1479 |
| 1480 core.Map toJson() { |
| 1481 var _json = new core.Map(); |
| 1482 if (details != null) { |
| 1483 _json["details"] = details; |
| 1484 } |
| 1485 if (reason != null) { |
| 1486 _json["reason"] = reason; |
| 1487 } |
| 1488 return _json; |
| 1489 } |
| 1490 } |
| 1491 |
| 1492 class CreativeServingRestrictions { |
| 1493 /** All known contexts/restrictions. */ |
| 1494 core.List<CreativeServingRestrictionsContexts> contexts; |
| 1495 /** |
| 1496 * The reasons for disapproval within this restriction, if any. Note that not |
| 1497 * all disapproval reasons may be categorized, so it is possible for the |
| 1498 * creative to have a status of DISAPPROVED or CONDITIONALLY_APPROVED with an |
| 1499 * empty list for disapproval_reasons. In this case, please reach out to your |
| 1500 * TAM to help debug the issue. |
| 1501 */ |
| 1502 core.List<CreativeServingRestrictionsDisapprovalReasons> disapprovalReasons; |
| 1503 /** |
| 1504 * Why the creative is ineligible to serve in this context (e.g., it has been |
| 1505 * explicitly disapproved or is pending review). |
| 1506 */ |
| 1507 core.String reason; |
| 1508 |
| 1509 CreativeServingRestrictions(); |
| 1510 |
| 1511 CreativeServingRestrictions.fromJson(core.Map _json) { |
| 1512 if (_json.containsKey("contexts")) { |
| 1513 contexts = _json["contexts"].map((value) => new CreativeServingRestriction
sContexts.fromJson(value)).toList(); |
| 1514 } |
| 1515 if (_json.containsKey("disapprovalReasons")) { |
| 1516 disapprovalReasons = _json["disapprovalReasons"].map((value) => new Creati
veServingRestrictionsDisapprovalReasons.fromJson(value)).toList(); |
| 1517 } |
| 1518 if (_json.containsKey("reason")) { |
| 1519 reason = _json["reason"]; |
| 1520 } |
| 1521 } |
| 1522 |
| 1523 core.Map toJson() { |
| 1524 var _json = new core.Map(); |
| 1525 if (contexts != null) { |
| 1526 _json["contexts"] = contexts.map((value) => (value).toJson()).toList(); |
| 1527 } |
| 1528 if (disapprovalReasons != null) { |
| 1529 _json["disapprovalReasons"] = disapprovalReasons.map((value) => (value).to
Json()).toList(); |
| 1530 } |
| 1531 if (reason != null) { |
| 1532 _json["reason"] = reason; |
| 1533 } |
| 1534 return _json; |
| 1535 } |
| 1536 } |
| 1537 |
| 1501 /** A creative and its classification data. */ | 1538 /** A creative and its classification data. */ |
| 1502 class Creative { | 1539 class Creative { |
| 1503 /** | 1540 /** |
| 1504 * The HTML snippet that displays the ad when inserted in the web page. If | 1541 * The HTML snippet that displays the ad when inserted in the web page. If |
| 1505 * set, videoURL should not be set. | 1542 * set, videoURL should not be set. |
| 1506 */ | 1543 */ |
| 1507 core.String HTMLSnippet; | 1544 core.String HTMLSnippet; |
| 1508 /** Account id. */ | 1545 /** Account id. */ |
| 1509 core.int accountId; | 1546 core.int accountId; |
| 1510 /** | 1547 /** |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1521 /** A buyer-specific id identifying the creative in this ad. */ | 1558 /** A buyer-specific id identifying the creative in this ad. */ |
| 1522 core.String buyerCreativeId; | 1559 core.String buyerCreativeId; |
| 1523 /** The set of destination urls for the snippet. */ | 1560 /** The set of destination urls for the snippet. */ |
| 1524 core.List<core.String> clickThroughUrl; | 1561 core.List<core.String> clickThroughUrl; |
| 1525 /** | 1562 /** |
| 1526 * Shows any corrections that were applied to this creative. Read-only. This | 1563 * Shows any corrections that were applied to this creative. Read-only. This |
| 1527 * field should not be set in requests. | 1564 * field should not be set in requests. |
| 1528 */ | 1565 */ |
| 1529 core.List<CreativeCorrections> corrections; | 1566 core.List<CreativeCorrections> corrections; |
| 1530 /** | 1567 /** |
| 1531 * The reasons for disapproval, if any. Note that not all disapproval reasons | 1568 * Top-level deals status. Read-only. This field should not be set in |
| 1532 * may be categorized, so it is possible for the creative to have a status of | 1569 * requests. If disapproved, an entry for auctionType=DIRECT_DEALS (or ALL) in |
| 1533 * DISAPPROVED with an empty list for disapproval_reasons. In this case, | 1570 * servingRestrictions will also exist. Note that this may be nuanced with |
| 1534 * please reach out to your TAM to help debug the issue. Read-only. This field | 1571 * other contextual restrictions, in which case it may be preferable to read |
| 1535 * should not be set in requests. | 1572 * from servingRestrictions directly. |
| 1536 */ | 1573 */ |
| 1537 core.List<CreativeDisapprovalReasons> disapprovalReasons; | 1574 core.String dealsStatus; |
| 1538 /** | 1575 /** |
| 1539 * The filtering reasons for the creative. Read-only. This field should not be | 1576 * The filtering reasons for the creative. Read-only. This field should not be |
| 1540 * set in requests. | 1577 * set in requests. |
| 1541 */ | 1578 */ |
| 1542 CreativeFilteringReasons filteringReasons; | 1579 CreativeFilteringReasons filteringReasons; |
| 1543 /** Ad height. */ | 1580 /** Ad height. */ |
| 1544 core.int height; | 1581 core.int height; |
| 1545 /** Resource type. */ | 1582 /** Resource type. */ |
| 1546 core.String kind; | 1583 core.String kind; |
| 1547 /** | 1584 /** |
| 1585 * Top-level open auction status. Read-only. This field should not be set in |
| 1586 * requests. If disapproved, an entry for auctionType=OPEN_AUCTION (or ALL) in |
| 1587 * servingRestrictions will also exist. Note that this may be nuanced with |
| 1588 * other contextual restrictions, in which case it may be preferable to read |
| 1589 * from ServingRestrictions directly. |
| 1590 */ |
| 1591 core.String openAuctionStatus; |
| 1592 /** |
| 1548 * Detected product categories, if any. Read-only. This field should not be | 1593 * Detected product categories, if any. Read-only. This field should not be |
| 1549 * set in requests. | 1594 * set in requests. |
| 1550 */ | 1595 */ |
| 1551 core.List<core.int> productCategories; | 1596 core.List<core.int> productCategories; |
| 1552 /** | 1597 /** |
| 1553 * All restricted categories for the ads that may be shown from this snippet. | 1598 * All restricted categories for the ads that may be shown from this snippet. |
| 1554 */ | 1599 */ |
| 1555 core.List<core.int> restrictedCategories; | 1600 core.List<core.int> restrictedCategories; |
| 1556 /** | 1601 /** |
| 1557 * Detected sensitive categories, if any. Read-only. This field should not be | 1602 * Detected sensitive categories, if any. Read-only. This field should not be |
| 1558 * set in requests. | 1603 * set in requests. |
| 1559 */ | 1604 */ |
| 1560 core.List<core.int> sensitiveCategories; | 1605 core.List<core.int> sensitiveCategories; |
| 1561 /** | 1606 /** |
| 1562 * Creative serving status. Read-only. This field should not be set in | 1607 * The granular status of this ad in specific contexts. A context here relates |
| 1563 * requests. | 1608 * to where something ultimately serves (for example, a physical location, a |
| 1609 * platform, an HTTPS vs HTTP request, or the type of auction). Read-only. |
| 1610 * This field should not be set in requests. |
| 1564 */ | 1611 */ |
| 1565 core.String status; | 1612 core.List<CreativeServingRestrictions> servingRestrictions; |
| 1566 /** All vendor types for the ads that may be shown from this snippet. */ | 1613 /** All vendor types for the ads that may be shown from this snippet. */ |
| 1567 core.List<core.int> vendorType; | 1614 core.List<core.int> vendorType; |
| 1568 /** The url to fetch a video ad. If set, HTMLSnippet should not be set. */ | 1615 /** The url to fetch a video ad. If set, HTMLSnippet should not be set. */ |
| 1569 core.String videoURL; | 1616 core.String videoURL; |
| 1570 /** Ad width. */ | 1617 /** Ad width. */ |
| 1571 core.int width; | 1618 core.int width; |
| 1572 | 1619 |
| 1573 Creative(); | 1620 Creative(); |
| 1574 | 1621 |
| 1575 Creative.fromJson(core.Map _json) { | 1622 Creative.fromJson(core.Map _json) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1593 } | 1640 } |
| 1594 if (_json.containsKey("buyerCreativeId")) { | 1641 if (_json.containsKey("buyerCreativeId")) { |
| 1595 buyerCreativeId = _json["buyerCreativeId"]; | 1642 buyerCreativeId = _json["buyerCreativeId"]; |
| 1596 } | 1643 } |
| 1597 if (_json.containsKey("clickThroughUrl")) { | 1644 if (_json.containsKey("clickThroughUrl")) { |
| 1598 clickThroughUrl = _json["clickThroughUrl"]; | 1645 clickThroughUrl = _json["clickThroughUrl"]; |
| 1599 } | 1646 } |
| 1600 if (_json.containsKey("corrections")) { | 1647 if (_json.containsKey("corrections")) { |
| 1601 corrections = _json["corrections"].map((value) => new CreativeCorrections.
fromJson(value)).toList(); | 1648 corrections = _json["corrections"].map((value) => new CreativeCorrections.
fromJson(value)).toList(); |
| 1602 } | 1649 } |
| 1603 if (_json.containsKey("disapprovalReasons")) { | 1650 if (_json.containsKey("dealsStatus")) { |
| 1604 disapprovalReasons = _json["disapprovalReasons"].map((value) => new Creati
veDisapprovalReasons.fromJson(value)).toList(); | 1651 dealsStatus = _json["dealsStatus"]; |
| 1605 } | 1652 } |
| 1606 if (_json.containsKey("filteringReasons")) { | 1653 if (_json.containsKey("filteringReasons")) { |
| 1607 filteringReasons = new CreativeFilteringReasons.fromJson(_json["filteringR
easons"]); | 1654 filteringReasons = new CreativeFilteringReasons.fromJson(_json["filteringR
easons"]); |
| 1608 } | 1655 } |
| 1609 if (_json.containsKey("height")) { | 1656 if (_json.containsKey("height")) { |
| 1610 height = _json["height"]; | 1657 height = _json["height"]; |
| 1611 } | 1658 } |
| 1612 if (_json.containsKey("kind")) { | 1659 if (_json.containsKey("kind")) { |
| 1613 kind = _json["kind"]; | 1660 kind = _json["kind"]; |
| 1614 } | 1661 } |
| 1662 if (_json.containsKey("openAuctionStatus")) { |
| 1663 openAuctionStatus = _json["openAuctionStatus"]; |
| 1664 } |
| 1615 if (_json.containsKey("productCategories")) { | 1665 if (_json.containsKey("productCategories")) { |
| 1616 productCategories = _json["productCategories"]; | 1666 productCategories = _json["productCategories"]; |
| 1617 } | 1667 } |
| 1618 if (_json.containsKey("restrictedCategories")) { | 1668 if (_json.containsKey("restrictedCategories")) { |
| 1619 restrictedCategories = _json["restrictedCategories"]; | 1669 restrictedCategories = _json["restrictedCategories"]; |
| 1620 } | 1670 } |
| 1621 if (_json.containsKey("sensitiveCategories")) { | 1671 if (_json.containsKey("sensitiveCategories")) { |
| 1622 sensitiveCategories = _json["sensitiveCategories"]; | 1672 sensitiveCategories = _json["sensitiveCategories"]; |
| 1623 } | 1673 } |
| 1624 if (_json.containsKey("status")) { | 1674 if (_json.containsKey("servingRestrictions")) { |
| 1625 status = _json["status"]; | 1675 servingRestrictions = _json["servingRestrictions"].map((value) => new Crea
tiveServingRestrictions.fromJson(value)).toList(); |
| 1626 } | 1676 } |
| 1627 if (_json.containsKey("vendorType")) { | 1677 if (_json.containsKey("vendorType")) { |
| 1628 vendorType = _json["vendorType"]; | 1678 vendorType = _json["vendorType"]; |
| 1629 } | 1679 } |
| 1630 if (_json.containsKey("videoURL")) { | 1680 if (_json.containsKey("videoURL")) { |
| 1631 videoURL = _json["videoURL"]; | 1681 videoURL = _json["videoURL"]; |
| 1632 } | 1682 } |
| 1633 if (_json.containsKey("width")) { | 1683 if (_json.containsKey("width")) { |
| 1634 width = _json["width"]; | 1684 width = _json["width"]; |
| 1635 } | 1685 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1657 } | 1707 } |
| 1658 if (buyerCreativeId != null) { | 1708 if (buyerCreativeId != null) { |
| 1659 _json["buyerCreativeId"] = buyerCreativeId; | 1709 _json["buyerCreativeId"] = buyerCreativeId; |
| 1660 } | 1710 } |
| 1661 if (clickThroughUrl != null) { | 1711 if (clickThroughUrl != null) { |
| 1662 _json["clickThroughUrl"] = clickThroughUrl; | 1712 _json["clickThroughUrl"] = clickThroughUrl; |
| 1663 } | 1713 } |
| 1664 if (corrections != null) { | 1714 if (corrections != null) { |
| 1665 _json["corrections"] = corrections.map((value) => (value).toJson()).toList
(); | 1715 _json["corrections"] = corrections.map((value) => (value).toJson()).toList
(); |
| 1666 } | 1716 } |
| 1667 if (disapprovalReasons != null) { | 1717 if (dealsStatus != null) { |
| 1668 _json["disapprovalReasons"] = disapprovalReasons.map((value) => (value).to
Json()).toList(); | 1718 _json["dealsStatus"] = dealsStatus; |
| 1669 } | 1719 } |
| 1670 if (filteringReasons != null) { | 1720 if (filteringReasons != null) { |
| 1671 _json["filteringReasons"] = (filteringReasons).toJson(); | 1721 _json["filteringReasons"] = (filteringReasons).toJson(); |
| 1672 } | 1722 } |
| 1673 if (height != null) { | 1723 if (height != null) { |
| 1674 _json["height"] = height; | 1724 _json["height"] = height; |
| 1675 } | 1725 } |
| 1676 if (kind != null) { | 1726 if (kind != null) { |
| 1677 _json["kind"] = kind; | 1727 _json["kind"] = kind; |
| 1678 } | 1728 } |
| 1729 if (openAuctionStatus != null) { |
| 1730 _json["openAuctionStatus"] = openAuctionStatus; |
| 1731 } |
| 1679 if (productCategories != null) { | 1732 if (productCategories != null) { |
| 1680 _json["productCategories"] = productCategories; | 1733 _json["productCategories"] = productCategories; |
| 1681 } | 1734 } |
| 1682 if (restrictedCategories != null) { | 1735 if (restrictedCategories != null) { |
| 1683 _json["restrictedCategories"] = restrictedCategories; | 1736 _json["restrictedCategories"] = restrictedCategories; |
| 1684 } | 1737 } |
| 1685 if (sensitiveCategories != null) { | 1738 if (sensitiveCategories != null) { |
| 1686 _json["sensitiveCategories"] = sensitiveCategories; | 1739 _json["sensitiveCategories"] = sensitiveCategories; |
| 1687 } | 1740 } |
| 1688 if (status != null) { | 1741 if (servingRestrictions != null) { |
| 1689 _json["status"] = status; | 1742 _json["servingRestrictions"] = servingRestrictions.map((value) => (value).
toJson()).toList(); |
| 1690 } | 1743 } |
| 1691 if (vendorType != null) { | 1744 if (vendorType != null) { |
| 1692 _json["vendorType"] = vendorType; | 1745 _json["vendorType"] = vendorType; |
| 1693 } | 1746 } |
| 1694 if (videoURL != null) { | 1747 if (videoURL != null) { |
| 1695 _json["videoURL"] = videoURL; | 1748 _json["videoURL"] = videoURL; |
| 1696 } | 1749 } |
| 1697 if (width != null) { | 1750 if (width != null) { |
| 1698 _json["width"] = width; | 1751 _json["width"] = width; |
| 1699 } | 1752 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1739 if (kind != null) { | 1792 if (kind != null) { |
| 1740 _json["kind"] = kind; | 1793 _json["kind"] = kind; |
| 1741 } | 1794 } |
| 1742 if (nextPageToken != null) { | 1795 if (nextPageToken != null) { |
| 1743 _json["nextPageToken"] = nextPageToken; | 1796 _json["nextPageToken"] = nextPageToken; |
| 1744 } | 1797 } |
| 1745 return _json; | 1798 return _json; |
| 1746 } | 1799 } |
| 1747 } | 1800 } |
| 1748 | 1801 |
| 1749 /** The configuration data for an Ad Exchange direct deal. */ | |
| 1750 class DirectDeal { | |
| 1751 /** The account id of the buyer this deal is for. */ | |
| 1752 core.int accountId; | |
| 1753 /** The name of the advertiser this deal is for. */ | |
| 1754 core.String advertiser; | |
| 1755 /** | |
| 1756 * The currency code that applies to the fixed_cpm value. If not set then | |
| 1757 * assumed to be USD. | |
| 1758 */ | |
| 1759 core.String currencyCode; | |
| 1760 /** | |
| 1761 * End time for when this deal stops being active. If not set then this deal | |
| 1762 * is valid until manually disabled by the publisher. In seconds since the | |
| 1763 * epoch. | |
| 1764 */ | |
| 1765 core.String endTime; | |
| 1766 /** | |
| 1767 * The fixed price for this direct deal. In cpm micros of currency according | |
| 1768 * to currency_code. If set, then this deal is eligible for the fixed price | |
| 1769 * tier of buying (highest priority, pay exactly the configured fixed price). | |
| 1770 */ | |
| 1771 core.String fixedCpm; | |
| 1772 /** Deal id. */ | |
| 1773 core.String id; | |
| 1774 /** Resource type. */ | |
| 1775 core.String kind; | |
| 1776 /** Deal name. */ | |
| 1777 core.String name; | |
| 1778 /** | |
| 1779 * The minimum price for this direct deal. In cpm micros of currency according | |
| 1780 * to currency_code. If set, then this deal is eligible for the private | |
| 1781 * exchange tier of buying (below fixed price priority, run as a second price | |
| 1782 * auction). | |
| 1783 */ | |
| 1784 core.String privateExchangeMinCpm; | |
| 1785 /** | |
| 1786 * If true, the publisher has opted to have their blocks ignored when a | |
| 1787 * creative is bid with for this deal. | |
| 1788 */ | |
| 1789 core.bool publisherBlocksOverriden; | |
| 1790 /** The name of the publisher offering this direct deal. */ | |
| 1791 core.String sellerNetwork; | |
| 1792 /** | |
| 1793 * Start time for when this deal becomes active. If not set then this deal is | |
| 1794 * active immediately upon creation. In seconds since the epoch. | |
| 1795 */ | |
| 1796 core.String startTime; | |
| 1797 | |
| 1798 DirectDeal(); | |
| 1799 | |
| 1800 DirectDeal.fromJson(core.Map _json) { | |
| 1801 if (_json.containsKey("accountId")) { | |
| 1802 accountId = _json["accountId"]; | |
| 1803 } | |
| 1804 if (_json.containsKey("advertiser")) { | |
| 1805 advertiser = _json["advertiser"]; | |
| 1806 } | |
| 1807 if (_json.containsKey("currencyCode")) { | |
| 1808 currencyCode = _json["currencyCode"]; | |
| 1809 } | |
| 1810 if (_json.containsKey("endTime")) { | |
| 1811 endTime = _json["endTime"]; | |
| 1812 } | |
| 1813 if (_json.containsKey("fixedCpm")) { | |
| 1814 fixedCpm = _json["fixedCpm"]; | |
| 1815 } | |
| 1816 if (_json.containsKey("id")) { | |
| 1817 id = _json["id"]; | |
| 1818 } | |
| 1819 if (_json.containsKey("kind")) { | |
| 1820 kind = _json["kind"]; | |
| 1821 } | |
| 1822 if (_json.containsKey("name")) { | |
| 1823 name = _json["name"]; | |
| 1824 } | |
| 1825 if (_json.containsKey("privateExchangeMinCpm")) { | |
| 1826 privateExchangeMinCpm = _json["privateExchangeMinCpm"]; | |
| 1827 } | |
| 1828 if (_json.containsKey("publisherBlocksOverriden")) { | |
| 1829 publisherBlocksOverriden = _json["publisherBlocksOverriden"]; | |
| 1830 } | |
| 1831 if (_json.containsKey("sellerNetwork")) { | |
| 1832 sellerNetwork = _json["sellerNetwork"]; | |
| 1833 } | |
| 1834 if (_json.containsKey("startTime")) { | |
| 1835 startTime = _json["startTime"]; | |
| 1836 } | |
| 1837 } | |
| 1838 | |
| 1839 core.Map toJson() { | |
| 1840 var _json = new core.Map(); | |
| 1841 if (accountId != null) { | |
| 1842 _json["accountId"] = accountId; | |
| 1843 } | |
| 1844 if (advertiser != null) { | |
| 1845 _json["advertiser"] = advertiser; | |
| 1846 } | |
| 1847 if (currencyCode != null) { | |
| 1848 _json["currencyCode"] = currencyCode; | |
| 1849 } | |
| 1850 if (endTime != null) { | |
| 1851 _json["endTime"] = endTime; | |
| 1852 } | |
| 1853 if (fixedCpm != null) { | |
| 1854 _json["fixedCpm"] = fixedCpm; | |
| 1855 } | |
| 1856 if (id != null) { | |
| 1857 _json["id"] = id; | |
| 1858 } | |
| 1859 if (kind != null) { | |
| 1860 _json["kind"] = kind; | |
| 1861 } | |
| 1862 if (name != null) { | |
| 1863 _json["name"] = name; | |
| 1864 } | |
| 1865 if (privateExchangeMinCpm != null) { | |
| 1866 _json["privateExchangeMinCpm"] = privateExchangeMinCpm; | |
| 1867 } | |
| 1868 if (publisherBlocksOverriden != null) { | |
| 1869 _json["publisherBlocksOverriden"] = publisherBlocksOverriden; | |
| 1870 } | |
| 1871 if (sellerNetwork != null) { | |
| 1872 _json["sellerNetwork"] = sellerNetwork; | |
| 1873 } | |
| 1874 if (startTime != null) { | |
| 1875 _json["startTime"] = startTime; | |
| 1876 } | |
| 1877 return _json; | |
| 1878 } | |
| 1879 } | |
| 1880 | |
| 1881 /** | |
| 1882 * A direct deals feed lists Direct Deals the Ad Exchange buyer account has | |
| 1883 * access to. This includes direct deals set up for the buyer account as well as | |
| 1884 * its merged stream seats. | |
| 1885 */ | |
| 1886 class DirectDealsList { | |
| 1887 /** A list of direct deals relevant for your account. */ | |
| 1888 core.List<DirectDeal> directDeals; | |
| 1889 /** Resource type. */ | |
| 1890 core.String kind; | |
| 1891 | |
| 1892 DirectDealsList(); | |
| 1893 | |
| 1894 DirectDealsList.fromJson(core.Map _json) { | |
| 1895 if (_json.containsKey("directDeals")) { | |
| 1896 directDeals = _json["directDeals"].map((value) => new DirectDeal.fromJson(
value)).toList(); | |
| 1897 } | |
| 1898 if (_json.containsKey("kind")) { | |
| 1899 kind = _json["kind"]; | |
| 1900 } | |
| 1901 } | |
| 1902 | |
| 1903 core.Map toJson() { | |
| 1904 var _json = new core.Map(); | |
| 1905 if (directDeals != null) { | |
| 1906 _json["directDeals"] = directDeals.map((value) => (value).toJson()).toList
(); | |
| 1907 } | |
| 1908 if (kind != null) { | |
| 1909 _json["kind"] = kind; | |
| 1910 } | |
| 1911 return _json; | |
| 1912 } | |
| 1913 } | |
| 1914 | |
| 1915 /** The configuration data for an Ad Exchange performance report list. */ | 1802 /** The configuration data for an Ad Exchange performance report list. */ |
| 1916 class PerformanceReport { | 1803 class PerformanceReport { |
| 1917 /** The number of bid responses with an ad. */ | 1804 /** The number of bid responses with an ad. */ |
| 1918 core.double bidRate; | 1805 core.double bidRate; |
| 1919 /** The number of bid requests sent to your bidder. */ | 1806 /** The number of bid requests sent to your bidder. */ |
| 1920 core.double bidRequestRate; | 1807 core.double bidRequestRate; |
| 1921 /** | 1808 /** |
| 1922 * Rate of various prefiltering statuses per match. Please refer to the | 1809 * Rate of various prefiltering statuses per match. Please refer to the |
| 1923 * callout-status-codes.txt file for different statuses. | 1810 * callout-status-codes.txt file for different statuses. |
| 1924 * | 1811 * |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2528 var _json = new core.Map(); | 2415 var _json = new core.Map(); |
| 2529 if (items != null) { | 2416 if (items != null) { |
| 2530 _json["items"] = items.map((value) => (value).toJson()).toList(); | 2417 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 2531 } | 2418 } |
| 2532 if (kind != null) { | 2419 if (kind != null) { |
| 2533 _json["kind"] = kind; | 2420 _json["kind"] = kind; |
| 2534 } | 2421 } |
| 2535 return _json; | 2422 return _json; |
| 2536 } | 2423 } |
| 2537 } | 2424 } |
| OLD | NEW |