OLD | NEW |
(Empty) | |
| 1 library googleapis.adexchangebuyer.v1_3; |
| 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 * Accesses your bidding-account information, submits creatives for validation, |
| 18 * finds available direct deals, and retrieves performance reports. |
| 19 */ |
| 20 class AdexchangebuyerApi { |
| 21 /** Manage your Ad Exchange buyer account configuration */ |
| 22 static const AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchang
e.buyer"; |
| 23 |
| 24 |
| 25 final common_internal.ApiRequester _requester; |
| 26 |
| 27 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); |
| 28 BillingInfoResourceApi get billingInfo => new BillingInfoResourceApi(_requeste
r); |
| 29 CreativesResourceApi get creatives => new CreativesResourceApi(_requester); |
| 30 DirectDealsResourceApi get directDeals => new DirectDealsResourceApi(_requeste
r); |
| 31 PerformanceReportResourceApi get performanceReport => new PerformanceReportRes
ourceApi(_requester); |
| 32 PretargetingConfigResourceApi get pretargetingConfig => new PretargetingConfig
ResourceApi(_requester); |
| 33 |
| 34 AdexchangebuyerApi(http.Client client) : |
| 35 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/adexchangebuyer/v1.3/"); |
| 36 } |
| 37 |
| 38 |
| 39 /** Not documented yet. */ |
| 40 class AccountsResourceApi { |
| 41 final common_internal.ApiRequester _requester; |
| 42 |
| 43 AccountsResourceApi(common_internal.ApiRequester client) : |
| 44 _requester = client; |
| 45 |
| 46 /** |
| 47 * Gets one account by ID. |
| 48 * |
| 49 * Request parameters: |
| 50 * |
| 51 * [id] - The account id |
| 52 * |
| 53 * Completes with a [Account]. |
| 54 * |
| 55 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 56 * error. |
| 57 * |
| 58 * If the used [http.Client] completes with an error when making a REST call, |
| 59 * this method will complete with the same error. |
| 60 */ |
| 61 async.Future<Account> get(core.int id) { |
| 62 var _url = null; |
| 63 var _queryParams = new core.Map(); |
| 64 var _uploadMedia = null; |
| 65 var _uploadOptions = null; |
| 66 var _downloadOptions = common.DownloadOptions.Metadata; |
| 67 var _body = null; |
| 68 |
| 69 if (id == null) { |
| 70 throw new core.ArgumentError("Parameter id is required."); |
| 71 } |
| 72 |
| 73 |
| 74 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$id'); |
| 75 |
| 76 var _response = _requester.request(_url, |
| 77 "GET", |
| 78 body: _body, |
| 79 queryParams: _queryParams, |
| 80 uploadOptions: _uploadOptions, |
| 81 uploadMedia: _uploadMedia, |
| 82 downloadOptions: _downloadOptions); |
| 83 return _response.then((data) => new Account.fromJson(data)); |
| 84 } |
| 85 |
| 86 /** |
| 87 * Retrieves the authenticated user's list of accounts. |
| 88 * |
| 89 * Request parameters: |
| 90 * |
| 91 * Completes with a [AccountsList]. |
| 92 * |
| 93 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 94 * error. |
| 95 * |
| 96 * If the used [http.Client] completes with an error when making a REST call, |
| 97 * this method will complete with the same error. |
| 98 */ |
| 99 async.Future<AccountsList> list() { |
| 100 var _url = null; |
| 101 var _queryParams = new core.Map(); |
| 102 var _uploadMedia = null; |
| 103 var _uploadOptions = null; |
| 104 var _downloadOptions = common.DownloadOptions.Metadata; |
| 105 var _body = null; |
| 106 |
| 107 |
| 108 |
| 109 _url = 'accounts'; |
| 110 |
| 111 var _response = _requester.request(_url, |
| 112 "GET", |
| 113 body: _body, |
| 114 queryParams: _queryParams, |
| 115 uploadOptions: _uploadOptions, |
| 116 uploadMedia: _uploadMedia, |
| 117 downloadOptions: _downloadOptions); |
| 118 return _response.then((data) => new AccountsList.fromJson(data)); |
| 119 } |
| 120 |
| 121 /** |
| 122 * Updates an existing account. This method supports patch semantics. |
| 123 * |
| 124 * [request] - The metadata request object. |
| 125 * |
| 126 * Request parameters: |
| 127 * |
| 128 * [id] - The account id |
| 129 * |
| 130 * Completes with a [Account]. |
| 131 * |
| 132 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 133 * error. |
| 134 * |
| 135 * If the used [http.Client] completes with an error when making a REST call, |
| 136 * this method will complete with the same error. |
| 137 */ |
| 138 async.Future<Account> patch(Account request, core.int id) { |
| 139 var _url = null; |
| 140 var _queryParams = new core.Map(); |
| 141 var _uploadMedia = null; |
| 142 var _uploadOptions = null; |
| 143 var _downloadOptions = common.DownloadOptions.Metadata; |
| 144 var _body = null; |
| 145 |
| 146 if (request != null) { |
| 147 _body = convert.JSON.encode((request).toJson()); |
| 148 } |
| 149 if (id == null) { |
| 150 throw new core.ArgumentError("Parameter id is required."); |
| 151 } |
| 152 |
| 153 |
| 154 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$id'); |
| 155 |
| 156 var _response = _requester.request(_url, |
| 157 "PATCH", |
| 158 body: _body, |
| 159 queryParams: _queryParams, |
| 160 uploadOptions: _uploadOptions, |
| 161 uploadMedia: _uploadMedia, |
| 162 downloadOptions: _downloadOptions); |
| 163 return _response.then((data) => new Account.fromJson(data)); |
| 164 } |
| 165 |
| 166 /** |
| 167 * Updates an existing account. |
| 168 * |
| 169 * [request] - The metadata request object. |
| 170 * |
| 171 * Request parameters: |
| 172 * |
| 173 * [id] - The account id |
| 174 * |
| 175 * Completes with a [Account]. |
| 176 * |
| 177 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 178 * error. |
| 179 * |
| 180 * If the used [http.Client] completes with an error when making a REST call, |
| 181 * this method will complete with the same error. |
| 182 */ |
| 183 async.Future<Account> update(Account request, core.int id) { |
| 184 var _url = null; |
| 185 var _queryParams = new core.Map(); |
| 186 var _uploadMedia = null; |
| 187 var _uploadOptions = null; |
| 188 var _downloadOptions = common.DownloadOptions.Metadata; |
| 189 var _body = null; |
| 190 |
| 191 if (request != null) { |
| 192 _body = convert.JSON.encode((request).toJson()); |
| 193 } |
| 194 if (id == null) { |
| 195 throw new core.ArgumentError("Parameter id is required."); |
| 196 } |
| 197 |
| 198 |
| 199 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$id'); |
| 200 |
| 201 var _response = _requester.request(_url, |
| 202 "PUT", |
| 203 body: _body, |
| 204 queryParams: _queryParams, |
| 205 uploadOptions: _uploadOptions, |
| 206 uploadMedia: _uploadMedia, |
| 207 downloadOptions: _downloadOptions); |
| 208 return _response.then((data) => new Account.fromJson(data)); |
| 209 } |
| 210 |
| 211 } |
| 212 |
| 213 |
| 214 /** Not documented yet. */ |
| 215 class BillingInfoResourceApi { |
| 216 final common_internal.ApiRequester _requester; |
| 217 |
| 218 BillingInfoResourceApi(common_internal.ApiRequester client) : |
| 219 _requester = client; |
| 220 |
| 221 /** |
| 222 * Returns the billing information for one account specified by account ID. |
| 223 * |
| 224 * Request parameters: |
| 225 * |
| 226 * [accountId] - The account id. |
| 227 * |
| 228 * Completes with a [BillingInfo]. |
| 229 * |
| 230 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 231 * error. |
| 232 * |
| 233 * If the used [http.Client] completes with an error when making a REST call, |
| 234 * this method will complete with the same error. |
| 235 */ |
| 236 async.Future<BillingInfo> get(core.int accountId) { |
| 237 var _url = null; |
| 238 var _queryParams = new core.Map(); |
| 239 var _uploadMedia = null; |
| 240 var _uploadOptions = null; |
| 241 var _downloadOptions = common.DownloadOptions.Metadata; |
| 242 var _body = null; |
| 243 |
| 244 if (accountId == null) { |
| 245 throw new core.ArgumentError("Parameter accountId is required."); |
| 246 } |
| 247 |
| 248 |
| 249 _url = 'billinginfo/' + common_internal.Escaper.ecapeVariable('$accountId'); |
| 250 |
| 251 var _response = _requester.request(_url, |
| 252 "GET", |
| 253 body: _body, |
| 254 queryParams: _queryParams, |
| 255 uploadOptions: _uploadOptions, |
| 256 uploadMedia: _uploadMedia, |
| 257 downloadOptions: _downloadOptions); |
| 258 return _response.then((data) => new BillingInfo.fromJson(data)); |
| 259 } |
| 260 |
| 261 /** |
| 262 * Retrieves a list of billing information for all accounts of the |
| 263 * authenticated user. |
| 264 * |
| 265 * Request parameters: |
| 266 * |
| 267 * Completes with a [BillingInfoList]. |
| 268 * |
| 269 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 270 * error. |
| 271 * |
| 272 * If the used [http.Client] completes with an error when making a REST call, |
| 273 * this method will complete with the same error. |
| 274 */ |
| 275 async.Future<BillingInfoList> list() { |
| 276 var _url = null; |
| 277 var _queryParams = new core.Map(); |
| 278 var _uploadMedia = null; |
| 279 var _uploadOptions = null; |
| 280 var _downloadOptions = common.DownloadOptions.Metadata; |
| 281 var _body = null; |
| 282 |
| 283 |
| 284 |
| 285 _url = 'billinginfo'; |
| 286 |
| 287 var _response = _requester.request(_url, |
| 288 "GET", |
| 289 body: _body, |
| 290 queryParams: _queryParams, |
| 291 uploadOptions: _uploadOptions, |
| 292 uploadMedia: _uploadMedia, |
| 293 downloadOptions: _downloadOptions); |
| 294 return _response.then((data) => new BillingInfoList.fromJson(data)); |
| 295 } |
| 296 |
| 297 } |
| 298 |
| 299 |
| 300 /** Not documented yet. */ |
| 301 class CreativesResourceApi { |
| 302 final common_internal.ApiRequester _requester; |
| 303 |
| 304 CreativesResourceApi(common_internal.ApiRequester client) : |
| 305 _requester = client; |
| 306 |
| 307 /** |
| 308 * Gets the status for a single creative. A creative will be available 30-40 |
| 309 * minutes after submission. |
| 310 * |
| 311 * Request parameters: |
| 312 * |
| 313 * [accountId] - The id for the account that will serve this creative. |
| 314 * |
| 315 * [buyerCreativeId] - The buyer-specific id for this creative. |
| 316 * |
| 317 * Completes with a [Creative]. |
| 318 * |
| 319 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 320 * error. |
| 321 * |
| 322 * If the used [http.Client] completes with an error when making a REST call, |
| 323 * this method will complete with the same error. |
| 324 */ |
| 325 async.Future<Creative> get(core.int accountId, core.String buyerCreativeId) { |
| 326 var _url = null; |
| 327 var _queryParams = new core.Map(); |
| 328 var _uploadMedia = null; |
| 329 var _uploadOptions = null; |
| 330 var _downloadOptions = common.DownloadOptions.Metadata; |
| 331 var _body = null; |
| 332 |
| 333 if (accountId == null) { |
| 334 throw new core.ArgumentError("Parameter accountId is required."); |
| 335 } |
| 336 if (buyerCreativeId == null) { |
| 337 throw new core.ArgumentError("Parameter buyerCreativeId is required."); |
| 338 } |
| 339 |
| 340 |
| 341 _url = 'creatives/' + common_internal.Escaper.ecapeVariable('$accountId') +
'/' + common_internal.Escaper.ecapeVariable('$buyerCreativeId'); |
| 342 |
| 343 var _response = _requester.request(_url, |
| 344 "GET", |
| 345 body: _body, |
| 346 queryParams: _queryParams, |
| 347 uploadOptions: _uploadOptions, |
| 348 uploadMedia: _uploadMedia, |
| 349 downloadOptions: _downloadOptions); |
| 350 return _response.then((data) => new Creative.fromJson(data)); |
| 351 } |
| 352 |
| 353 /** |
| 354 * Submit a new creative. |
| 355 * |
| 356 * [request] - The metadata request object. |
| 357 * |
| 358 * Request parameters: |
| 359 * |
| 360 * Completes with a [Creative]. |
| 361 * |
| 362 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 363 * error. |
| 364 * |
| 365 * If the used [http.Client] completes with an error when making a REST call, |
| 366 * this method will complete with the same error. |
| 367 */ |
| 368 async.Future<Creative> insert(Creative request) { |
| 369 var _url = null; |
| 370 var _queryParams = new core.Map(); |
| 371 var _uploadMedia = null; |
| 372 var _uploadOptions = null; |
| 373 var _downloadOptions = common.DownloadOptions.Metadata; |
| 374 var _body = null; |
| 375 |
| 376 if (request != null) { |
| 377 _body = convert.JSON.encode((request).toJson()); |
| 378 } |
| 379 |
| 380 |
| 381 _url = 'creatives'; |
| 382 |
| 383 var _response = _requester.request(_url, |
| 384 "POST", |
| 385 body: _body, |
| 386 queryParams: _queryParams, |
| 387 uploadOptions: _uploadOptions, |
| 388 uploadMedia: _uploadMedia, |
| 389 downloadOptions: _downloadOptions); |
| 390 return _response.then((data) => new Creative.fromJson(data)); |
| 391 } |
| 392 |
| 393 /** |
| 394 * Retrieves a list of the authenticated user's active creatives. A creative |
| 395 * will be available 30-40 minutes after submission. |
| 396 * |
| 397 * Request parameters: |
| 398 * |
| 399 * [accountId] - When specified, only creatives for the given account ids are |
| 400 * returned. |
| 401 * |
| 402 * [buyerCreativeId] - When specified, only creatives for the given buyer |
| 403 * creative ids are returned. |
| 404 * |
| 405 * [maxResults] - Maximum number of entries returned on one result page. If |
| 406 * not set, the default is 100. Optional. |
| 407 * Value must be between "1" and "1000". |
| 408 * |
| 409 * [pageToken] - A continuation token, used to page through ad clients. To |
| 410 * retrieve the next page, set this parameter to the value of "nextPageToken" |
| 411 * from the previous response. Optional. |
| 412 * |
| 413 * [statusFilter] - When specified, only creatives having the given status are |
| 414 * returned. |
| 415 * Possible string values are: |
| 416 * - "approved" : Creatives which have been approved. |
| 417 * - "disapproved" : Creatives which have been disapproved. |
| 418 * - "not_checked" : Creatives whose status is not yet checked. |
| 419 * |
| 420 * Completes with a [CreativesList]. |
| 421 * |
| 422 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 423 * error. |
| 424 * |
| 425 * If the used [http.Client] completes with an error when making a REST call, |
| 426 * this method will complete with the same error. |
| 427 */ |
| 428 async.Future<CreativesList> list({core.List<core.int> accountId, core.List<cor
e.String> buyerCreativeId, core.int maxResults, core.String pageToken, core.Stri
ng statusFilter}) { |
| 429 var _url = null; |
| 430 var _queryParams = new core.Map(); |
| 431 var _uploadMedia = null; |
| 432 var _uploadOptions = null; |
| 433 var _downloadOptions = common.DownloadOptions.Metadata; |
| 434 var _body = null; |
| 435 |
| 436 if (accountId != null) { |
| 437 _queryParams["accountId"] = accountId.map((item) => "${item}").toList(); |
| 438 } |
| 439 if (buyerCreativeId != null) { |
| 440 _queryParams["buyerCreativeId"] = buyerCreativeId; |
| 441 } |
| 442 if (maxResults != null) { |
| 443 _queryParams["maxResults"] = ["${maxResults}"]; |
| 444 } |
| 445 if (pageToken != null) { |
| 446 _queryParams["pageToken"] = [pageToken]; |
| 447 } |
| 448 if (statusFilter != null) { |
| 449 _queryParams["statusFilter"] = [statusFilter]; |
| 450 } |
| 451 |
| 452 |
| 453 _url = 'creatives'; |
| 454 |
| 455 var _response = _requester.request(_url, |
| 456 "GET", |
| 457 body: _body, |
| 458 queryParams: _queryParams, |
| 459 uploadOptions: _uploadOptions, |
| 460 uploadMedia: _uploadMedia, |
| 461 downloadOptions: _downloadOptions); |
| 462 return _response.then((data) => new CreativesList.fromJson(data)); |
| 463 } |
| 464 |
| 465 } |
| 466 |
| 467 |
| 468 /** Not documented yet. */ |
| 469 class DirectDealsResourceApi { |
| 470 final common_internal.ApiRequester _requester; |
| 471 |
| 472 DirectDealsResourceApi(common_internal.ApiRequester client) : |
| 473 _requester = client; |
| 474 |
| 475 /** |
| 476 * Gets one direct deal by ID. |
| 477 * |
| 478 * Request parameters: |
| 479 * |
| 480 * [id] - The direct deal id |
| 481 * |
| 482 * Completes with a [DirectDeal]. |
| 483 * |
| 484 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 485 * error. |
| 486 * |
| 487 * If the used [http.Client] completes with an error when making a REST call, |
| 488 * this method will complete with the same error. |
| 489 */ |
| 490 async.Future<DirectDeal> get(core.String id) { |
| 491 var _url = null; |
| 492 var _queryParams = new core.Map(); |
| 493 var _uploadMedia = null; |
| 494 var _uploadOptions = null; |
| 495 var _downloadOptions = common.DownloadOptions.Metadata; |
| 496 var _body = null; |
| 497 |
| 498 if (id == null) { |
| 499 throw new core.ArgumentError("Parameter id is required."); |
| 500 } |
| 501 |
| 502 |
| 503 _url = 'directdeals/' + common_internal.Escaper.ecapeVariable('$id'); |
| 504 |
| 505 var _response = _requester.request(_url, |
| 506 "GET", |
| 507 body: _body, |
| 508 queryParams: _queryParams, |
| 509 uploadOptions: _uploadOptions, |
| 510 uploadMedia: _uploadMedia, |
| 511 downloadOptions: _downloadOptions); |
| 512 return _response.then((data) => new DirectDeal.fromJson(data)); |
| 513 } |
| 514 |
| 515 /** |
| 516 * Retrieves the authenticated user's list of direct deals. |
| 517 * |
| 518 * Request parameters: |
| 519 * |
| 520 * Completes with a [DirectDealsList]. |
| 521 * |
| 522 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 523 * error. |
| 524 * |
| 525 * If the used [http.Client] completes with an error when making a REST call, |
| 526 * this method will complete with the same error. |
| 527 */ |
| 528 async.Future<DirectDealsList> list() { |
| 529 var _url = null; |
| 530 var _queryParams = new core.Map(); |
| 531 var _uploadMedia = null; |
| 532 var _uploadOptions = null; |
| 533 var _downloadOptions = common.DownloadOptions.Metadata; |
| 534 var _body = null; |
| 535 |
| 536 |
| 537 |
| 538 _url = 'directdeals'; |
| 539 |
| 540 var _response = _requester.request(_url, |
| 541 "GET", |
| 542 body: _body, |
| 543 queryParams: _queryParams, |
| 544 uploadOptions: _uploadOptions, |
| 545 uploadMedia: _uploadMedia, |
| 546 downloadOptions: _downloadOptions); |
| 547 return _response.then((data) => new DirectDealsList.fromJson(data)); |
| 548 } |
| 549 |
| 550 } |
| 551 |
| 552 |
| 553 /** Not documented yet. */ |
| 554 class PerformanceReportResourceApi { |
| 555 final common_internal.ApiRequester _requester; |
| 556 |
| 557 PerformanceReportResourceApi(common_internal.ApiRequester client) : |
| 558 _requester = client; |
| 559 |
| 560 /** |
| 561 * Retrieves the authenticated user's list of performance metrics. |
| 562 * |
| 563 * Request parameters: |
| 564 * |
| 565 * [accountId] - The account id to get the reports. |
| 566 * |
| 567 * [endDateTime] - The end time of the report in ISO 8601 timestamp format |
| 568 * using UTC. |
| 569 * |
| 570 * [startDateTime] - The start time of the report in ISO 8601 timestamp format |
| 571 * using UTC. |
| 572 * |
| 573 * [maxResults] - Maximum number of entries returned on one result page. If |
| 574 * not set, the default is 100. Optional. |
| 575 * Value must be between "1" and "1000". |
| 576 * |
| 577 * [pageToken] - A continuation token, used to page through performance |
| 578 * reports. To retrieve the next page, set this parameter to the value of |
| 579 * "nextPageToken" from the previous response. Optional. |
| 580 * |
| 581 * Completes with a [PerformanceReportList]. |
| 582 * |
| 583 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 584 * error. |
| 585 * |
| 586 * If the used [http.Client] completes with an error when making a REST call, |
| 587 * this method will complete with the same error. |
| 588 */ |
| 589 async.Future<PerformanceReportList> list(core.String accountId, core.String en
dDateTime, core.String startDateTime, {core.int maxResults, core.String pageToke
n}) { |
| 590 var _url = null; |
| 591 var _queryParams = new core.Map(); |
| 592 var _uploadMedia = null; |
| 593 var _uploadOptions = null; |
| 594 var _downloadOptions = common.DownloadOptions.Metadata; |
| 595 var _body = null; |
| 596 |
| 597 if (accountId == null) { |
| 598 throw new core.ArgumentError("Parameter accountId is required."); |
| 599 } |
| 600 _queryParams["accountId"] = [accountId]; |
| 601 if (endDateTime == null) { |
| 602 throw new core.ArgumentError("Parameter endDateTime is required."); |
| 603 } |
| 604 _queryParams["endDateTime"] = [endDateTime]; |
| 605 if (startDateTime == null) { |
| 606 throw new core.ArgumentError("Parameter startDateTime is required."); |
| 607 } |
| 608 _queryParams["startDateTime"] = [startDateTime]; |
| 609 if (maxResults != null) { |
| 610 _queryParams["maxResults"] = ["${maxResults}"]; |
| 611 } |
| 612 if (pageToken != null) { |
| 613 _queryParams["pageToken"] = [pageToken]; |
| 614 } |
| 615 |
| 616 |
| 617 _url = 'performancereport'; |
| 618 |
| 619 var _response = _requester.request(_url, |
| 620 "GET", |
| 621 body: _body, |
| 622 queryParams: _queryParams, |
| 623 uploadOptions: _uploadOptions, |
| 624 uploadMedia: _uploadMedia, |
| 625 downloadOptions: _downloadOptions); |
| 626 return _response.then((data) => new PerformanceReportList.fromJson(data)); |
| 627 } |
| 628 |
| 629 } |
| 630 |
| 631 |
| 632 /** Not documented yet. */ |
| 633 class PretargetingConfigResourceApi { |
| 634 final common_internal.ApiRequester _requester; |
| 635 |
| 636 PretargetingConfigResourceApi(common_internal.ApiRequester client) : |
| 637 _requester = client; |
| 638 |
| 639 /** |
| 640 * Deletes an existing pretargeting config. |
| 641 * |
| 642 * Request parameters: |
| 643 * |
| 644 * [accountId] - The account id to delete the pretargeting config for. |
| 645 * |
| 646 * [configId] - The specific id of the configuration to delete. |
| 647 * |
| 648 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 649 * error. |
| 650 * |
| 651 * If the used [http.Client] completes with an error when making a REST call, |
| 652 * this method will complete with the same error. |
| 653 */ |
| 654 async.Future delete(core.String accountId, core.String configId) { |
| 655 var _url = null; |
| 656 var _queryParams = new core.Map(); |
| 657 var _uploadMedia = null; |
| 658 var _uploadOptions = null; |
| 659 var _downloadOptions = common.DownloadOptions.Metadata; |
| 660 var _body = null; |
| 661 |
| 662 if (accountId == null) { |
| 663 throw new core.ArgumentError("Parameter accountId is required."); |
| 664 } |
| 665 if (configId == null) { |
| 666 throw new core.ArgumentError("Parameter configId is required."); |
| 667 } |
| 668 |
| 669 _downloadOptions = null; |
| 670 |
| 671 _url = 'pretargetingconfigs/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/' + common_internal.Escaper.ecapeVariable('$configId'); |
| 672 |
| 673 var _response = _requester.request(_url, |
| 674 "DELETE", |
| 675 body: _body, |
| 676 queryParams: _queryParams, |
| 677 uploadOptions: _uploadOptions, |
| 678 uploadMedia: _uploadMedia, |
| 679 downloadOptions: _downloadOptions); |
| 680 return _response.then((data) => null); |
| 681 } |
| 682 |
| 683 /** |
| 684 * Gets a specific pretargeting configuration |
| 685 * |
| 686 * Request parameters: |
| 687 * |
| 688 * [accountId] - The account id to get the pretargeting config for. |
| 689 * |
| 690 * [configId] - The specific id of the configuration to retrieve. |
| 691 * |
| 692 * Completes with a [PretargetingConfig]. |
| 693 * |
| 694 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 695 * error. |
| 696 * |
| 697 * If the used [http.Client] completes with an error when making a REST call, |
| 698 * this method will complete with the same error. |
| 699 */ |
| 700 async.Future<PretargetingConfig> get(core.String accountId, core.String config
Id) { |
| 701 var _url = null; |
| 702 var _queryParams = new core.Map(); |
| 703 var _uploadMedia = null; |
| 704 var _uploadOptions = null; |
| 705 var _downloadOptions = common.DownloadOptions.Metadata; |
| 706 var _body = null; |
| 707 |
| 708 if (accountId == null) { |
| 709 throw new core.ArgumentError("Parameter accountId is required."); |
| 710 } |
| 711 if (configId == null) { |
| 712 throw new core.ArgumentError("Parameter configId is required."); |
| 713 } |
| 714 |
| 715 |
| 716 _url = 'pretargetingconfigs/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/' + common_internal.Escaper.ecapeVariable('$configId'); |
| 717 |
| 718 var _response = _requester.request(_url, |
| 719 "GET", |
| 720 body: _body, |
| 721 queryParams: _queryParams, |
| 722 uploadOptions: _uploadOptions, |
| 723 uploadMedia: _uploadMedia, |
| 724 downloadOptions: _downloadOptions); |
| 725 return _response.then((data) => new PretargetingConfig.fromJson(data)); |
| 726 } |
| 727 |
| 728 /** |
| 729 * Inserts a new pretargeting configuration. |
| 730 * |
| 731 * [request] - The metadata request object. |
| 732 * |
| 733 * Request parameters: |
| 734 * |
| 735 * [accountId] - The account id to insert the pretargeting config for. |
| 736 * |
| 737 * Completes with a [PretargetingConfig]. |
| 738 * |
| 739 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 740 * error. |
| 741 * |
| 742 * If the used [http.Client] completes with an error when making a REST call, |
| 743 * this method will complete with the same error. |
| 744 */ |
| 745 async.Future<PretargetingConfig> insert(PretargetingConfig request, core.Strin
g accountId) { |
| 746 var _url = null; |
| 747 var _queryParams = new core.Map(); |
| 748 var _uploadMedia = null; |
| 749 var _uploadOptions = null; |
| 750 var _downloadOptions = common.DownloadOptions.Metadata; |
| 751 var _body = null; |
| 752 |
| 753 if (request != null) { |
| 754 _body = convert.JSON.encode((request).toJson()); |
| 755 } |
| 756 if (accountId == null) { |
| 757 throw new core.ArgumentError("Parameter accountId is required."); |
| 758 } |
| 759 |
| 760 |
| 761 _url = 'pretargetingconfigs/' + common_internal.Escaper.ecapeVariable('$acco
untId'); |
| 762 |
| 763 var _response = _requester.request(_url, |
| 764 "POST", |
| 765 body: _body, |
| 766 queryParams: _queryParams, |
| 767 uploadOptions: _uploadOptions, |
| 768 uploadMedia: _uploadMedia, |
| 769 downloadOptions: _downloadOptions); |
| 770 return _response.then((data) => new PretargetingConfig.fromJson(data)); |
| 771 } |
| 772 |
| 773 /** |
| 774 * Retrieves a list of the authenticated user's pretargeting configurations. |
| 775 * |
| 776 * Request parameters: |
| 777 * |
| 778 * [accountId] - The account id to get the pretargeting configs for. |
| 779 * |
| 780 * Completes with a [PretargetingConfigList]. |
| 781 * |
| 782 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 783 * error. |
| 784 * |
| 785 * If the used [http.Client] completes with an error when making a REST call, |
| 786 * this method will complete with the same error. |
| 787 */ |
| 788 async.Future<PretargetingConfigList> list(core.String accountId) { |
| 789 var _url = null; |
| 790 var _queryParams = new core.Map(); |
| 791 var _uploadMedia = null; |
| 792 var _uploadOptions = null; |
| 793 var _downloadOptions = common.DownloadOptions.Metadata; |
| 794 var _body = null; |
| 795 |
| 796 if (accountId == null) { |
| 797 throw new core.ArgumentError("Parameter accountId is required."); |
| 798 } |
| 799 |
| 800 |
| 801 _url = 'pretargetingconfigs/' + common_internal.Escaper.ecapeVariable('$acco
untId'); |
| 802 |
| 803 var _response = _requester.request(_url, |
| 804 "GET", |
| 805 body: _body, |
| 806 queryParams: _queryParams, |
| 807 uploadOptions: _uploadOptions, |
| 808 uploadMedia: _uploadMedia, |
| 809 downloadOptions: _downloadOptions); |
| 810 return _response.then((data) => new PretargetingConfigList.fromJson(data)); |
| 811 } |
| 812 |
| 813 /** |
| 814 * Updates an existing pretargeting config. This method supports patch |
| 815 * semantics. |
| 816 * |
| 817 * [request] - The metadata request object. |
| 818 * |
| 819 * Request parameters: |
| 820 * |
| 821 * [accountId] - The account id to update the pretargeting config for. |
| 822 * |
| 823 * [configId] - The specific id of the configuration to update. |
| 824 * |
| 825 * Completes with a [PretargetingConfig]. |
| 826 * |
| 827 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 828 * error. |
| 829 * |
| 830 * If the used [http.Client] completes with an error when making a REST call, |
| 831 * this method will complete with the same error. |
| 832 */ |
| 833 async.Future<PretargetingConfig> patch(PretargetingConfig request, core.String
accountId, core.String configId) { |
| 834 var _url = null; |
| 835 var _queryParams = new core.Map(); |
| 836 var _uploadMedia = null; |
| 837 var _uploadOptions = null; |
| 838 var _downloadOptions = common.DownloadOptions.Metadata; |
| 839 var _body = null; |
| 840 |
| 841 if (request != null) { |
| 842 _body = convert.JSON.encode((request).toJson()); |
| 843 } |
| 844 if (accountId == null) { |
| 845 throw new core.ArgumentError("Parameter accountId is required."); |
| 846 } |
| 847 if (configId == null) { |
| 848 throw new core.ArgumentError("Parameter configId is required."); |
| 849 } |
| 850 |
| 851 |
| 852 _url = 'pretargetingconfigs/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/' + common_internal.Escaper.ecapeVariable('$configId'); |
| 853 |
| 854 var _response = _requester.request(_url, |
| 855 "PATCH", |
| 856 body: _body, |
| 857 queryParams: _queryParams, |
| 858 uploadOptions: _uploadOptions, |
| 859 uploadMedia: _uploadMedia, |
| 860 downloadOptions: _downloadOptions); |
| 861 return _response.then((data) => new PretargetingConfig.fromJson(data)); |
| 862 } |
| 863 |
| 864 /** |
| 865 * Updates an existing pretargeting config. |
| 866 * |
| 867 * [request] - The metadata request object. |
| 868 * |
| 869 * Request parameters: |
| 870 * |
| 871 * [accountId] - The account id to update the pretargeting config for. |
| 872 * |
| 873 * [configId] - The specific id of the configuration to update. |
| 874 * |
| 875 * Completes with a [PretargetingConfig]. |
| 876 * |
| 877 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 878 * error. |
| 879 * |
| 880 * If the used [http.Client] completes with an error when making a REST call, |
| 881 * this method will complete with the same error. |
| 882 */ |
| 883 async.Future<PretargetingConfig> update(PretargetingConfig request, core.Strin
g accountId, core.String configId) { |
| 884 var _url = null; |
| 885 var _queryParams = new core.Map(); |
| 886 var _uploadMedia = null; |
| 887 var _uploadOptions = null; |
| 888 var _downloadOptions = common.DownloadOptions.Metadata; |
| 889 var _body = null; |
| 890 |
| 891 if (request != null) { |
| 892 _body = convert.JSON.encode((request).toJson()); |
| 893 } |
| 894 if (accountId == null) { |
| 895 throw new core.ArgumentError("Parameter accountId is required."); |
| 896 } |
| 897 if (configId == null) { |
| 898 throw new core.ArgumentError("Parameter configId is required."); |
| 899 } |
| 900 |
| 901 |
| 902 _url = 'pretargetingconfigs/' + common_internal.Escaper.ecapeVariable('$acco
untId') + '/' + common_internal.Escaper.ecapeVariable('$configId'); |
| 903 |
| 904 var _response = _requester.request(_url, |
| 905 "PUT", |
| 906 body: _body, |
| 907 queryParams: _queryParams, |
| 908 uploadOptions: _uploadOptions, |
| 909 uploadMedia: _uploadMedia, |
| 910 downloadOptions: _downloadOptions); |
| 911 return _response.then((data) => new PretargetingConfig.fromJson(data)); |
| 912 } |
| 913 |
| 914 } |
| 915 |
| 916 |
| 917 |
| 918 /** Not documented yet. */ |
| 919 class AccountBidderLocation { |
| 920 /** The maximum queries per second the Ad Exchange will send. */ |
| 921 core.int maximumQps; |
| 922 |
| 923 /** |
| 924 * The geographical region the Ad Exchange should send requests from. Only |
| 925 * used by some quota systems, but always setting the value is recommended. |
| 926 * Allowed values: |
| 927 * - ASIA |
| 928 * - EUROPE |
| 929 * - US_EAST |
| 930 * - US_WEST |
| 931 */ |
| 932 core.String region; |
| 933 |
| 934 /** The URL to which the Ad Exchange will send bid requests. */ |
| 935 core.String url; |
| 936 |
| 937 |
| 938 AccountBidderLocation(); |
| 939 |
| 940 AccountBidderLocation.fromJson(core.Map _json) { |
| 941 if (_json.containsKey("maximumQps")) { |
| 942 maximumQps = _json["maximumQps"]; |
| 943 } |
| 944 if (_json.containsKey("region")) { |
| 945 region = _json["region"]; |
| 946 } |
| 947 if (_json.containsKey("url")) { |
| 948 url = _json["url"]; |
| 949 } |
| 950 } |
| 951 |
| 952 core.Map toJson() { |
| 953 var _json = new core.Map(); |
| 954 if (maximumQps != null) { |
| 955 _json["maximumQps"] = maximumQps; |
| 956 } |
| 957 if (region != null) { |
| 958 _json["region"] = region; |
| 959 } |
| 960 if (url != null) { |
| 961 _json["url"] = url; |
| 962 } |
| 963 return _json; |
| 964 } |
| 965 } |
| 966 |
| 967 |
| 968 /** Configuration data for an Ad Exchange buyer account. */ |
| 969 class Account { |
| 970 /** Your bidder locations that have distinct URLs. */ |
| 971 core.List<AccountBidderLocation> bidderLocation; |
| 972 |
| 973 /** |
| 974 * The nid parameter value used in cookie match requests. Please contact your |
| 975 * technical account manager if you need to change this. |
| 976 */ |
| 977 core.String cookieMatchingNid; |
| 978 |
| 979 /** The base URL used in cookie match requests. */ |
| 980 core.String cookieMatchingUrl; |
| 981 |
| 982 /** Account id. */ |
| 983 core.int id; |
| 984 |
| 985 /** Resource type. */ |
| 986 core.String kind; |
| 987 |
| 988 /** |
| 989 * The sum of all bidderLocation.maximumQps values cannot exceed this. Please |
| 990 * contact your technical account manager if you need to change this. |
| 991 */ |
| 992 core.int maximumTotalQps; |
| 993 |
| 994 |
| 995 Account(); |
| 996 |
| 997 Account.fromJson(core.Map _json) { |
| 998 if (_json.containsKey("bidderLocation")) { |
| 999 bidderLocation = _json["bidderLocation"].map((value) => new AccountBidderL
ocation.fromJson(value)).toList(); |
| 1000 } |
| 1001 if (_json.containsKey("cookieMatchingNid")) { |
| 1002 cookieMatchingNid = _json["cookieMatchingNid"]; |
| 1003 } |
| 1004 if (_json.containsKey("cookieMatchingUrl")) { |
| 1005 cookieMatchingUrl = _json["cookieMatchingUrl"]; |
| 1006 } |
| 1007 if (_json.containsKey("id")) { |
| 1008 id = _json["id"]; |
| 1009 } |
| 1010 if (_json.containsKey("kind")) { |
| 1011 kind = _json["kind"]; |
| 1012 } |
| 1013 if (_json.containsKey("maximumTotalQps")) { |
| 1014 maximumTotalQps = _json["maximumTotalQps"]; |
| 1015 } |
| 1016 } |
| 1017 |
| 1018 core.Map toJson() { |
| 1019 var _json = new core.Map(); |
| 1020 if (bidderLocation != null) { |
| 1021 _json["bidderLocation"] = bidderLocation.map((value) => (value).toJson()).
toList(); |
| 1022 } |
| 1023 if (cookieMatchingNid != null) { |
| 1024 _json["cookieMatchingNid"] = cookieMatchingNid; |
| 1025 } |
| 1026 if (cookieMatchingUrl != null) { |
| 1027 _json["cookieMatchingUrl"] = cookieMatchingUrl; |
| 1028 } |
| 1029 if (id != null) { |
| 1030 _json["id"] = id; |
| 1031 } |
| 1032 if (kind != null) { |
| 1033 _json["kind"] = kind; |
| 1034 } |
| 1035 if (maximumTotalQps != null) { |
| 1036 _json["maximumTotalQps"] = maximumTotalQps; |
| 1037 } |
| 1038 return _json; |
| 1039 } |
| 1040 } |
| 1041 |
| 1042 |
| 1043 /** |
| 1044 * An account feed lists Ad Exchange buyer accounts that the user has access to. |
| 1045 * Each entry in the feed corresponds to a single buyer account. |
| 1046 */ |
| 1047 class AccountsList { |
| 1048 /** A list of accounts. */ |
| 1049 core.List<Account> items; |
| 1050 |
| 1051 /** Resource type. */ |
| 1052 core.String kind; |
| 1053 |
| 1054 |
| 1055 AccountsList(); |
| 1056 |
| 1057 AccountsList.fromJson(core.Map _json) { |
| 1058 if (_json.containsKey("items")) { |
| 1059 items = _json["items"].map((value) => new Account.fromJson(value)).toList(
); |
| 1060 } |
| 1061 if (_json.containsKey("kind")) { |
| 1062 kind = _json["kind"]; |
| 1063 } |
| 1064 } |
| 1065 |
| 1066 core.Map toJson() { |
| 1067 var _json = new core.Map(); |
| 1068 if (items != null) { |
| 1069 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1070 } |
| 1071 if (kind != null) { |
| 1072 _json["kind"] = kind; |
| 1073 } |
| 1074 return _json; |
| 1075 } |
| 1076 } |
| 1077 |
| 1078 |
| 1079 /** The configuration data for an Ad Exchange billing info. */ |
| 1080 class BillingInfo { |
| 1081 /** Account id. */ |
| 1082 core.int accountId; |
| 1083 |
| 1084 /** Account name. */ |
| 1085 core.String accountName; |
| 1086 |
| 1087 /** |
| 1088 * A list of adgroup IDs associated with this particular account. These IDs |
| 1089 * may show up as part of a realtime bidding BidRequest, which indicates a bid |
| 1090 * request for this account. |
| 1091 */ |
| 1092 core.List<core.String> billingId; |
| 1093 |
| 1094 /** Resource type. */ |
| 1095 core.String kind; |
| 1096 |
| 1097 |
| 1098 BillingInfo(); |
| 1099 |
| 1100 BillingInfo.fromJson(core.Map _json) { |
| 1101 if (_json.containsKey("accountId")) { |
| 1102 accountId = _json["accountId"]; |
| 1103 } |
| 1104 if (_json.containsKey("accountName")) { |
| 1105 accountName = _json["accountName"]; |
| 1106 } |
| 1107 if (_json.containsKey("billingId")) { |
| 1108 billingId = _json["billingId"]; |
| 1109 } |
| 1110 if (_json.containsKey("kind")) { |
| 1111 kind = _json["kind"]; |
| 1112 } |
| 1113 } |
| 1114 |
| 1115 core.Map toJson() { |
| 1116 var _json = new core.Map(); |
| 1117 if (accountId != null) { |
| 1118 _json["accountId"] = accountId; |
| 1119 } |
| 1120 if (accountName != null) { |
| 1121 _json["accountName"] = accountName; |
| 1122 } |
| 1123 if (billingId != null) { |
| 1124 _json["billingId"] = billingId; |
| 1125 } |
| 1126 if (kind != null) { |
| 1127 _json["kind"] = kind; |
| 1128 } |
| 1129 return _json; |
| 1130 } |
| 1131 } |
| 1132 |
| 1133 |
| 1134 /** |
| 1135 * A billing info feed lists Billing Info the Ad Exchange buyer account has |
| 1136 * access to. Each entry in the feed corresponds to a single billing info. |
| 1137 */ |
| 1138 class BillingInfoList { |
| 1139 /** A list of billing info relevant for your account. */ |
| 1140 core.List<BillingInfo> items; |
| 1141 |
| 1142 /** Resource type. */ |
| 1143 core.String kind; |
| 1144 |
| 1145 |
| 1146 BillingInfoList(); |
| 1147 |
| 1148 BillingInfoList.fromJson(core.Map _json) { |
| 1149 if (_json.containsKey("items")) { |
| 1150 items = _json["items"].map((value) => new BillingInfo.fromJson(value)).toL
ist(); |
| 1151 } |
| 1152 if (_json.containsKey("kind")) { |
| 1153 kind = _json["kind"]; |
| 1154 } |
| 1155 } |
| 1156 |
| 1157 core.Map toJson() { |
| 1158 var _json = new core.Map(); |
| 1159 if (items != null) { |
| 1160 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1161 } |
| 1162 if (kind != null) { |
| 1163 _json["kind"] = kind; |
| 1164 } |
| 1165 return _json; |
| 1166 } |
| 1167 } |
| 1168 |
| 1169 |
| 1170 /** Not documented yet. */ |
| 1171 class CreativeCorrections { |
| 1172 /** Additional details about the correction. */ |
| 1173 core.List<core.String> details; |
| 1174 |
| 1175 /** The type of correction that was applied to the creative. */ |
| 1176 core.String reason; |
| 1177 |
| 1178 |
| 1179 CreativeCorrections(); |
| 1180 |
| 1181 CreativeCorrections.fromJson(core.Map _json) { |
| 1182 if (_json.containsKey("details")) { |
| 1183 details = _json["details"]; |
| 1184 } |
| 1185 if (_json.containsKey("reason")) { |
| 1186 reason = _json["reason"]; |
| 1187 } |
| 1188 } |
| 1189 |
| 1190 core.Map toJson() { |
| 1191 var _json = new core.Map(); |
| 1192 if (details != null) { |
| 1193 _json["details"] = details; |
| 1194 } |
| 1195 if (reason != null) { |
| 1196 _json["reason"] = reason; |
| 1197 } |
| 1198 return _json; |
| 1199 } |
| 1200 } |
| 1201 |
| 1202 |
| 1203 /** Not documented yet. */ |
| 1204 class CreativeDisapprovalReasons { |
| 1205 /** Additional details about the reason for disapproval. */ |
| 1206 core.List<core.String> details; |
| 1207 |
| 1208 /** The categorized reason for disapproval. */ |
| 1209 core.String reason; |
| 1210 |
| 1211 |
| 1212 CreativeDisapprovalReasons(); |
| 1213 |
| 1214 CreativeDisapprovalReasons.fromJson(core.Map _json) { |
| 1215 if (_json.containsKey("details")) { |
| 1216 details = _json["details"]; |
| 1217 } |
| 1218 if (_json.containsKey("reason")) { |
| 1219 reason = _json["reason"]; |
| 1220 } |
| 1221 } |
| 1222 |
| 1223 core.Map toJson() { |
| 1224 var _json = new core.Map(); |
| 1225 if (details != null) { |
| 1226 _json["details"] = details; |
| 1227 } |
| 1228 if (reason != null) { |
| 1229 _json["reason"] = reason; |
| 1230 } |
| 1231 return _json; |
| 1232 } |
| 1233 } |
| 1234 |
| 1235 |
| 1236 /** Not documented yet. */ |
| 1237 class CreativeFilteringReasonsReasons { |
| 1238 /** |
| 1239 * The number of times the creative was filtered for the status. The count is |
| 1240 * aggregated across all publishers on the exchange. |
| 1241 */ |
| 1242 core.String filteringCount; |
| 1243 |
| 1244 /** |
| 1245 * The filtering status code. Please refer to the creative-status-codes.txt |
| 1246 * file for different statuses. |
| 1247 */ |
| 1248 core.int filteringStatus; |
| 1249 |
| 1250 |
| 1251 CreativeFilteringReasonsReasons(); |
| 1252 |
| 1253 CreativeFilteringReasonsReasons.fromJson(core.Map _json) { |
| 1254 if (_json.containsKey("filteringCount")) { |
| 1255 filteringCount = _json["filteringCount"]; |
| 1256 } |
| 1257 if (_json.containsKey("filteringStatus")) { |
| 1258 filteringStatus = _json["filteringStatus"]; |
| 1259 } |
| 1260 } |
| 1261 |
| 1262 core.Map toJson() { |
| 1263 var _json = new core.Map(); |
| 1264 if (filteringCount != null) { |
| 1265 _json["filteringCount"] = filteringCount; |
| 1266 } |
| 1267 if (filteringStatus != null) { |
| 1268 _json["filteringStatus"] = filteringStatus; |
| 1269 } |
| 1270 return _json; |
| 1271 } |
| 1272 } |
| 1273 |
| 1274 |
| 1275 /** |
| 1276 * The filtering reasons for the creative. If this feature is not enabled, |
| 1277 * please ask your technical account manager. Read-only. This field should not |
| 1278 * be set in requests. |
| 1279 */ |
| 1280 class CreativeFilteringReasons { |
| 1281 /** |
| 1282 * The date in ISO 8601 format for the data. The data is collected from |
| 1283 * 00:00:00 to 23:59:59 in PST. |
| 1284 */ |
| 1285 core.String date; |
| 1286 |
| 1287 /** The filtering reasons. */ |
| 1288 core.List<CreativeFilteringReasonsReasons> reasons; |
| 1289 |
| 1290 |
| 1291 CreativeFilteringReasons(); |
| 1292 |
| 1293 CreativeFilteringReasons.fromJson(core.Map _json) { |
| 1294 if (_json.containsKey("date")) { |
| 1295 date = _json["date"]; |
| 1296 } |
| 1297 if (_json.containsKey("reasons")) { |
| 1298 reasons = _json["reasons"].map((value) => new CreativeFilteringReasonsReas
ons.fromJson(value)).toList(); |
| 1299 } |
| 1300 } |
| 1301 |
| 1302 core.Map toJson() { |
| 1303 var _json = new core.Map(); |
| 1304 if (date != null) { |
| 1305 _json["date"] = date; |
| 1306 } |
| 1307 if (reasons != null) { |
| 1308 _json["reasons"] = reasons.map((value) => (value).toJson()).toList(); |
| 1309 } |
| 1310 return _json; |
| 1311 } |
| 1312 } |
| 1313 |
| 1314 |
| 1315 /** A creative and its classification data. */ |
| 1316 class Creative { |
| 1317 /** |
| 1318 * The HTML snippet that displays the ad when inserted in the web page. If |
| 1319 * set, videoURL should not be set. |
| 1320 */ |
| 1321 core.String HTMLSnippet; |
| 1322 |
| 1323 /** Account id. */ |
| 1324 core.int accountId; |
| 1325 |
| 1326 /** |
| 1327 * Detected advertiser id, if any. Read-only. This field should not be set in |
| 1328 * requests. |
| 1329 */ |
| 1330 core.List<core.String> advertiserId; |
| 1331 |
| 1332 /** The name of the company being advertised in the creative. */ |
| 1333 core.String advertiserName; |
| 1334 |
| 1335 /** The agency id for this creative. */ |
| 1336 core.String agencyId; |
| 1337 |
| 1338 /** All attributes for the ads that may be shown from this snippet. */ |
| 1339 core.List<core.int> attribute; |
| 1340 |
| 1341 /** A buyer-specific id identifying the creative in this ad. */ |
| 1342 core.String buyerCreativeId; |
| 1343 |
| 1344 /** The set of destination urls for the snippet. */ |
| 1345 core.List<core.String> clickThroughUrl; |
| 1346 |
| 1347 /** |
| 1348 * Shows any corrections that were applied to this creative. Read-only. This |
| 1349 * field should not be set in requests. |
| 1350 */ |
| 1351 core.List<CreativeCorrections> corrections; |
| 1352 |
| 1353 /** |
| 1354 * The reasons for disapproval, if any. Note that not all disapproval reasons |
| 1355 * may be categorized, so it is possible for the creative to have a status of |
| 1356 * DISAPPROVED with an empty list for disapproval_reasons. In this case, |
| 1357 * please reach out to your TAM to help debug the issue. Read-only. This field |
| 1358 * should not be set in requests. |
| 1359 */ |
| 1360 core.List<CreativeDisapprovalReasons> disapprovalReasons; |
| 1361 |
| 1362 /** |
| 1363 * The filtering reasons for the creative. If this feature is not enabled, |
| 1364 * please ask your technical account manager. Read-only. This field should not |
| 1365 * be set in requests. |
| 1366 */ |
| 1367 CreativeFilteringReasons filteringReasons; |
| 1368 |
| 1369 /** Ad height. */ |
| 1370 core.int height; |
| 1371 |
| 1372 /** Resource type. */ |
| 1373 core.String kind; |
| 1374 |
| 1375 /** |
| 1376 * Detected product categories, if any. Read-only. This field should not be |
| 1377 * set in requests. |
| 1378 */ |
| 1379 core.List<core.int> productCategories; |
| 1380 |
| 1381 /** |
| 1382 * All restricted categories for the ads that may be shown from this snippet. |
| 1383 */ |
| 1384 core.List<core.int> restrictedCategories; |
| 1385 |
| 1386 /** |
| 1387 * Detected sensitive categories, if any. Read-only. This field should not be |
| 1388 * set in requests. |
| 1389 */ |
| 1390 core.List<core.int> sensitiveCategories; |
| 1391 |
| 1392 /** |
| 1393 * Creative serving status. Read-only. This field should not be set in |
| 1394 * requests. |
| 1395 */ |
| 1396 core.String status; |
| 1397 |
| 1398 /** All vendor types for the ads that may be shown from this snippet. */ |
| 1399 core.List<core.int> vendorType; |
| 1400 |
| 1401 /** The url to fetch a video ad. If set, HTMLSnippet should not be set. */ |
| 1402 core.String videoURL; |
| 1403 |
| 1404 /** Ad width. */ |
| 1405 core.int width; |
| 1406 |
| 1407 |
| 1408 Creative(); |
| 1409 |
| 1410 Creative.fromJson(core.Map _json) { |
| 1411 if (_json.containsKey("HTMLSnippet")) { |
| 1412 HTMLSnippet = _json["HTMLSnippet"]; |
| 1413 } |
| 1414 if (_json.containsKey("accountId")) { |
| 1415 accountId = _json["accountId"]; |
| 1416 } |
| 1417 if (_json.containsKey("advertiserId")) { |
| 1418 advertiserId = _json["advertiserId"]; |
| 1419 } |
| 1420 if (_json.containsKey("advertiserName")) { |
| 1421 advertiserName = _json["advertiserName"]; |
| 1422 } |
| 1423 if (_json.containsKey("agencyId")) { |
| 1424 agencyId = _json["agencyId"]; |
| 1425 } |
| 1426 if (_json.containsKey("attribute")) { |
| 1427 attribute = _json["attribute"]; |
| 1428 } |
| 1429 if (_json.containsKey("buyerCreativeId")) { |
| 1430 buyerCreativeId = _json["buyerCreativeId"]; |
| 1431 } |
| 1432 if (_json.containsKey("clickThroughUrl")) { |
| 1433 clickThroughUrl = _json["clickThroughUrl"]; |
| 1434 } |
| 1435 if (_json.containsKey("corrections")) { |
| 1436 corrections = _json["corrections"].map((value) => new CreativeCorrections.
fromJson(value)).toList(); |
| 1437 } |
| 1438 if (_json.containsKey("disapprovalReasons")) { |
| 1439 disapprovalReasons = _json["disapprovalReasons"].map((value) => new Creati
veDisapprovalReasons.fromJson(value)).toList(); |
| 1440 } |
| 1441 if (_json.containsKey("filteringReasons")) { |
| 1442 filteringReasons = new CreativeFilteringReasons.fromJson(_json["filteringR
easons"]); |
| 1443 } |
| 1444 if (_json.containsKey("height")) { |
| 1445 height = _json["height"]; |
| 1446 } |
| 1447 if (_json.containsKey("kind")) { |
| 1448 kind = _json["kind"]; |
| 1449 } |
| 1450 if (_json.containsKey("productCategories")) { |
| 1451 productCategories = _json["productCategories"]; |
| 1452 } |
| 1453 if (_json.containsKey("restrictedCategories")) { |
| 1454 restrictedCategories = _json["restrictedCategories"]; |
| 1455 } |
| 1456 if (_json.containsKey("sensitiveCategories")) { |
| 1457 sensitiveCategories = _json["sensitiveCategories"]; |
| 1458 } |
| 1459 if (_json.containsKey("status")) { |
| 1460 status = _json["status"]; |
| 1461 } |
| 1462 if (_json.containsKey("vendorType")) { |
| 1463 vendorType = _json["vendorType"]; |
| 1464 } |
| 1465 if (_json.containsKey("videoURL")) { |
| 1466 videoURL = _json["videoURL"]; |
| 1467 } |
| 1468 if (_json.containsKey("width")) { |
| 1469 width = _json["width"]; |
| 1470 } |
| 1471 } |
| 1472 |
| 1473 core.Map toJson() { |
| 1474 var _json = new core.Map(); |
| 1475 if (HTMLSnippet != null) { |
| 1476 _json["HTMLSnippet"] = HTMLSnippet; |
| 1477 } |
| 1478 if (accountId != null) { |
| 1479 _json["accountId"] = accountId; |
| 1480 } |
| 1481 if (advertiserId != null) { |
| 1482 _json["advertiserId"] = advertiserId; |
| 1483 } |
| 1484 if (advertiserName != null) { |
| 1485 _json["advertiserName"] = advertiserName; |
| 1486 } |
| 1487 if (agencyId != null) { |
| 1488 _json["agencyId"] = agencyId; |
| 1489 } |
| 1490 if (attribute != null) { |
| 1491 _json["attribute"] = attribute; |
| 1492 } |
| 1493 if (buyerCreativeId != null) { |
| 1494 _json["buyerCreativeId"] = buyerCreativeId; |
| 1495 } |
| 1496 if (clickThroughUrl != null) { |
| 1497 _json["clickThroughUrl"] = clickThroughUrl; |
| 1498 } |
| 1499 if (corrections != null) { |
| 1500 _json["corrections"] = corrections.map((value) => (value).toJson()).toList
(); |
| 1501 } |
| 1502 if (disapprovalReasons != null) { |
| 1503 _json["disapprovalReasons"] = disapprovalReasons.map((value) => (value).to
Json()).toList(); |
| 1504 } |
| 1505 if (filteringReasons != null) { |
| 1506 _json["filteringReasons"] = (filteringReasons).toJson(); |
| 1507 } |
| 1508 if (height != null) { |
| 1509 _json["height"] = height; |
| 1510 } |
| 1511 if (kind != null) { |
| 1512 _json["kind"] = kind; |
| 1513 } |
| 1514 if (productCategories != null) { |
| 1515 _json["productCategories"] = productCategories; |
| 1516 } |
| 1517 if (restrictedCategories != null) { |
| 1518 _json["restrictedCategories"] = restrictedCategories; |
| 1519 } |
| 1520 if (sensitiveCategories != null) { |
| 1521 _json["sensitiveCategories"] = sensitiveCategories; |
| 1522 } |
| 1523 if (status != null) { |
| 1524 _json["status"] = status; |
| 1525 } |
| 1526 if (vendorType != null) { |
| 1527 _json["vendorType"] = vendorType; |
| 1528 } |
| 1529 if (videoURL != null) { |
| 1530 _json["videoURL"] = videoURL; |
| 1531 } |
| 1532 if (width != null) { |
| 1533 _json["width"] = width; |
| 1534 } |
| 1535 return _json; |
| 1536 } |
| 1537 } |
| 1538 |
| 1539 |
| 1540 /** |
| 1541 * The creatives feed lists the active creatives for the Ad Exchange buyer |
| 1542 * accounts that the user has access to. Each entry in the feed corresponds to a |
| 1543 * single creative. |
| 1544 */ |
| 1545 class CreativesList { |
| 1546 /** A list of creatives. */ |
| 1547 core.List<Creative> items; |
| 1548 |
| 1549 /** Resource type. */ |
| 1550 core.String kind; |
| 1551 |
| 1552 /** |
| 1553 * Continuation token used to page through creatives. To retrieve the next |
| 1554 * page of results, set the next request's "pageToken" value to this. |
| 1555 */ |
| 1556 core.String nextPageToken; |
| 1557 |
| 1558 |
| 1559 CreativesList(); |
| 1560 |
| 1561 CreativesList.fromJson(core.Map _json) { |
| 1562 if (_json.containsKey("items")) { |
| 1563 items = _json["items"].map((value) => new Creative.fromJson(value)).toList
(); |
| 1564 } |
| 1565 if (_json.containsKey("kind")) { |
| 1566 kind = _json["kind"]; |
| 1567 } |
| 1568 if (_json.containsKey("nextPageToken")) { |
| 1569 nextPageToken = _json["nextPageToken"]; |
| 1570 } |
| 1571 } |
| 1572 |
| 1573 core.Map toJson() { |
| 1574 var _json = new core.Map(); |
| 1575 if (items != null) { |
| 1576 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1577 } |
| 1578 if (kind != null) { |
| 1579 _json["kind"] = kind; |
| 1580 } |
| 1581 if (nextPageToken != null) { |
| 1582 _json["nextPageToken"] = nextPageToken; |
| 1583 } |
| 1584 return _json; |
| 1585 } |
| 1586 } |
| 1587 |
| 1588 |
| 1589 /** The configuration data for an Ad Exchange direct deal. */ |
| 1590 class DirectDeal { |
| 1591 /** The account id of the buyer this deal is for. */ |
| 1592 core.int accountId; |
| 1593 |
| 1594 /** The name of the advertiser this deal is for. */ |
| 1595 core.String advertiser; |
| 1596 |
| 1597 /** |
| 1598 * The currency code that applies to the fixed_cpm value. If not set then |
| 1599 * assumed to be USD. |
| 1600 */ |
| 1601 core.String currencyCode; |
| 1602 |
| 1603 /** |
| 1604 * End time for when this deal stops being active. If not set then this deal |
| 1605 * is valid until manually disabled by the publisher. In seconds since the |
| 1606 * epoch. |
| 1607 */ |
| 1608 core.String endTime; |
| 1609 |
| 1610 /** |
| 1611 * The fixed price for this direct deal. In cpm micros of currency according |
| 1612 * to currency_code. If set, then this deal is eligible for the fixed price |
| 1613 * tier of buying (highest priority, pay exactly the configured fixed price). |
| 1614 */ |
| 1615 core.String fixedCpm; |
| 1616 |
| 1617 /** Deal id. */ |
| 1618 core.String id; |
| 1619 |
| 1620 /** Resource type. */ |
| 1621 core.String kind; |
| 1622 |
| 1623 /** Deal name. */ |
| 1624 core.String name; |
| 1625 |
| 1626 /** |
| 1627 * The minimum price for this direct deal. In cpm micros of currency according |
| 1628 * to currency_code. If set, then this deal is eligible for the private |
| 1629 * exchange tier of buying (below fixed price priority, run as a second price |
| 1630 * auction). |
| 1631 */ |
| 1632 core.String privateExchangeMinCpm; |
| 1633 |
| 1634 /** |
| 1635 * If true, the publisher has opted to have their blocks ignored when a |
| 1636 * creative is bid with for this deal. |
| 1637 */ |
| 1638 core.bool publisherBlocksOverriden; |
| 1639 |
| 1640 /** The name of the publisher offering this direct deal. */ |
| 1641 core.String sellerNetwork; |
| 1642 |
| 1643 /** |
| 1644 * Start time for when this deal becomes active. If not set then this deal is |
| 1645 * active immediately upon creation. In seconds since the epoch. |
| 1646 */ |
| 1647 core.String startTime; |
| 1648 |
| 1649 |
| 1650 DirectDeal(); |
| 1651 |
| 1652 DirectDeal.fromJson(core.Map _json) { |
| 1653 if (_json.containsKey("accountId")) { |
| 1654 accountId = _json["accountId"]; |
| 1655 } |
| 1656 if (_json.containsKey("advertiser")) { |
| 1657 advertiser = _json["advertiser"]; |
| 1658 } |
| 1659 if (_json.containsKey("currencyCode")) { |
| 1660 currencyCode = _json["currencyCode"]; |
| 1661 } |
| 1662 if (_json.containsKey("endTime")) { |
| 1663 endTime = _json["endTime"]; |
| 1664 } |
| 1665 if (_json.containsKey("fixedCpm")) { |
| 1666 fixedCpm = _json["fixedCpm"]; |
| 1667 } |
| 1668 if (_json.containsKey("id")) { |
| 1669 id = _json["id"]; |
| 1670 } |
| 1671 if (_json.containsKey("kind")) { |
| 1672 kind = _json["kind"]; |
| 1673 } |
| 1674 if (_json.containsKey("name")) { |
| 1675 name = _json["name"]; |
| 1676 } |
| 1677 if (_json.containsKey("privateExchangeMinCpm")) { |
| 1678 privateExchangeMinCpm = _json["privateExchangeMinCpm"]; |
| 1679 } |
| 1680 if (_json.containsKey("publisherBlocksOverriden")) { |
| 1681 publisherBlocksOverriden = _json["publisherBlocksOverriden"]; |
| 1682 } |
| 1683 if (_json.containsKey("sellerNetwork")) { |
| 1684 sellerNetwork = _json["sellerNetwork"]; |
| 1685 } |
| 1686 if (_json.containsKey("startTime")) { |
| 1687 startTime = _json["startTime"]; |
| 1688 } |
| 1689 } |
| 1690 |
| 1691 core.Map toJson() { |
| 1692 var _json = new core.Map(); |
| 1693 if (accountId != null) { |
| 1694 _json["accountId"] = accountId; |
| 1695 } |
| 1696 if (advertiser != null) { |
| 1697 _json["advertiser"] = advertiser; |
| 1698 } |
| 1699 if (currencyCode != null) { |
| 1700 _json["currencyCode"] = currencyCode; |
| 1701 } |
| 1702 if (endTime != null) { |
| 1703 _json["endTime"] = endTime; |
| 1704 } |
| 1705 if (fixedCpm != null) { |
| 1706 _json["fixedCpm"] = fixedCpm; |
| 1707 } |
| 1708 if (id != null) { |
| 1709 _json["id"] = id; |
| 1710 } |
| 1711 if (kind != null) { |
| 1712 _json["kind"] = kind; |
| 1713 } |
| 1714 if (name != null) { |
| 1715 _json["name"] = name; |
| 1716 } |
| 1717 if (privateExchangeMinCpm != null) { |
| 1718 _json["privateExchangeMinCpm"] = privateExchangeMinCpm; |
| 1719 } |
| 1720 if (publisherBlocksOverriden != null) { |
| 1721 _json["publisherBlocksOverriden"] = publisherBlocksOverriden; |
| 1722 } |
| 1723 if (sellerNetwork != null) { |
| 1724 _json["sellerNetwork"] = sellerNetwork; |
| 1725 } |
| 1726 if (startTime != null) { |
| 1727 _json["startTime"] = startTime; |
| 1728 } |
| 1729 return _json; |
| 1730 } |
| 1731 } |
| 1732 |
| 1733 |
| 1734 /** |
| 1735 * A direct deals feed lists Direct Deals the Ad Exchange buyer account has |
| 1736 * access to. This includes direct deals set up for the buyer account as well as |
| 1737 * its merged stream seats. |
| 1738 */ |
| 1739 class DirectDealsList { |
| 1740 /** A list of direct deals relevant for your account. */ |
| 1741 core.List<DirectDeal> directDeals; |
| 1742 |
| 1743 /** Resource type. */ |
| 1744 core.String kind; |
| 1745 |
| 1746 |
| 1747 DirectDealsList(); |
| 1748 |
| 1749 DirectDealsList.fromJson(core.Map _json) { |
| 1750 if (_json.containsKey("directDeals")) { |
| 1751 directDeals = _json["directDeals"].map((value) => new DirectDeal.fromJson(
value)).toList(); |
| 1752 } |
| 1753 if (_json.containsKey("kind")) { |
| 1754 kind = _json["kind"]; |
| 1755 } |
| 1756 } |
| 1757 |
| 1758 core.Map toJson() { |
| 1759 var _json = new core.Map(); |
| 1760 if (directDeals != null) { |
| 1761 _json["directDeals"] = directDeals.map((value) => (value).toJson()).toList
(); |
| 1762 } |
| 1763 if (kind != null) { |
| 1764 _json["kind"] = kind; |
| 1765 } |
| 1766 return _json; |
| 1767 } |
| 1768 } |
| 1769 |
| 1770 |
| 1771 /** The configuration data for an Ad Exchange performance report list. */ |
| 1772 class PerformanceReport { |
| 1773 /** |
| 1774 * Rate of various prefiltering statuses per match. Please refer to the |
| 1775 * callout-status-codes.txt file for different statuses. |
| 1776 * |
| 1777 * The values for Object must be JSON objects. It can consist of `num`, |
| 1778 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1779 */ |
| 1780 core.List<core.Object> calloutStatusRate; |
| 1781 |
| 1782 /** |
| 1783 * Average QPS for cookie matcher operations. |
| 1784 * |
| 1785 * The values for Object must be JSON objects. It can consist of `num`, |
| 1786 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1787 */ |
| 1788 core.List<core.Object> cookieMatcherStatusRate; |
| 1789 |
| 1790 /** |
| 1791 * Rate of ads with a given status. Please refer to the |
| 1792 * creative-status-codes.txt file for different statuses. |
| 1793 * |
| 1794 * The values for Object must be JSON objects. It can consist of `num`, |
| 1795 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1796 */ |
| 1797 core.List<core.Object> creativeStatusRate; |
| 1798 |
| 1799 /** |
| 1800 * Average QPS for hosted match operations. |
| 1801 * |
| 1802 * The values for Object must be JSON objects. It can consist of `num`, |
| 1803 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1804 */ |
| 1805 core.List<core.Object> hostedMatchStatusRate; |
| 1806 |
| 1807 /** Resource type. */ |
| 1808 core.String kind; |
| 1809 |
| 1810 /** |
| 1811 * The 50th percentile round trip latency(ms) as perceived from Google servers |
| 1812 * for the duration period covered by the report. |
| 1813 */ |
| 1814 core.double latency50thPercentile; |
| 1815 |
| 1816 /** |
| 1817 * The 85th percentile round trip latency(ms) as perceived from Google servers |
| 1818 * for the duration period covered by the report. |
| 1819 */ |
| 1820 core.double latency85thPercentile; |
| 1821 |
| 1822 /** |
| 1823 * The 95th percentile round trip latency(ms) as perceived from Google servers |
| 1824 * for the duration period covered by the report. |
| 1825 */ |
| 1826 core.double latency95thPercentile; |
| 1827 |
| 1828 /** Rate of various quota account statuses per quota check. */ |
| 1829 core.double noQuotaInRegion; |
| 1830 |
| 1831 /** Rate of various quota account statuses per quota check. */ |
| 1832 core.double outOfQuota; |
| 1833 |
| 1834 /** Average QPS for pixel match requests from clients. */ |
| 1835 core.double pixelMatchRequests; |
| 1836 |
| 1837 /** Average QPS for pixel match responses from clients. */ |
| 1838 core.double pixelMatchResponses; |
| 1839 |
| 1840 /** The configured quota limits for this account. */ |
| 1841 core.double quotaConfiguredLimit; |
| 1842 |
| 1843 /** The throttled quota limits for this account. */ |
| 1844 core.double quotaThrottledLimit; |
| 1845 |
| 1846 /** The trading location of this data. */ |
| 1847 core.String region; |
| 1848 |
| 1849 /** The unix timestamp of the starting time of this performance data. */ |
| 1850 core.String timestamp; |
| 1851 |
| 1852 |
| 1853 PerformanceReport(); |
| 1854 |
| 1855 PerformanceReport.fromJson(core.Map _json) { |
| 1856 if (_json.containsKey("calloutStatusRate")) { |
| 1857 calloutStatusRate = _json["calloutStatusRate"]; |
| 1858 } |
| 1859 if (_json.containsKey("cookieMatcherStatusRate")) { |
| 1860 cookieMatcherStatusRate = _json["cookieMatcherStatusRate"]; |
| 1861 } |
| 1862 if (_json.containsKey("creativeStatusRate")) { |
| 1863 creativeStatusRate = _json["creativeStatusRate"]; |
| 1864 } |
| 1865 if (_json.containsKey("hostedMatchStatusRate")) { |
| 1866 hostedMatchStatusRate = _json["hostedMatchStatusRate"]; |
| 1867 } |
| 1868 if (_json.containsKey("kind")) { |
| 1869 kind = _json["kind"]; |
| 1870 } |
| 1871 if (_json.containsKey("latency50thPercentile")) { |
| 1872 latency50thPercentile = _json["latency50thPercentile"]; |
| 1873 } |
| 1874 if (_json.containsKey("latency85thPercentile")) { |
| 1875 latency85thPercentile = _json["latency85thPercentile"]; |
| 1876 } |
| 1877 if (_json.containsKey("latency95thPercentile")) { |
| 1878 latency95thPercentile = _json["latency95thPercentile"]; |
| 1879 } |
| 1880 if (_json.containsKey("noQuotaInRegion")) { |
| 1881 noQuotaInRegion = _json["noQuotaInRegion"]; |
| 1882 } |
| 1883 if (_json.containsKey("outOfQuota")) { |
| 1884 outOfQuota = _json["outOfQuota"]; |
| 1885 } |
| 1886 if (_json.containsKey("pixelMatchRequests")) { |
| 1887 pixelMatchRequests = _json["pixelMatchRequests"]; |
| 1888 } |
| 1889 if (_json.containsKey("pixelMatchResponses")) { |
| 1890 pixelMatchResponses = _json["pixelMatchResponses"]; |
| 1891 } |
| 1892 if (_json.containsKey("quotaConfiguredLimit")) { |
| 1893 quotaConfiguredLimit = _json["quotaConfiguredLimit"]; |
| 1894 } |
| 1895 if (_json.containsKey("quotaThrottledLimit")) { |
| 1896 quotaThrottledLimit = _json["quotaThrottledLimit"]; |
| 1897 } |
| 1898 if (_json.containsKey("region")) { |
| 1899 region = _json["region"]; |
| 1900 } |
| 1901 if (_json.containsKey("timestamp")) { |
| 1902 timestamp = _json["timestamp"]; |
| 1903 } |
| 1904 } |
| 1905 |
| 1906 core.Map toJson() { |
| 1907 var _json = new core.Map(); |
| 1908 if (calloutStatusRate != null) { |
| 1909 _json["calloutStatusRate"] = calloutStatusRate; |
| 1910 } |
| 1911 if (cookieMatcherStatusRate != null) { |
| 1912 _json["cookieMatcherStatusRate"] = cookieMatcherStatusRate; |
| 1913 } |
| 1914 if (creativeStatusRate != null) { |
| 1915 _json["creativeStatusRate"] = creativeStatusRate; |
| 1916 } |
| 1917 if (hostedMatchStatusRate != null) { |
| 1918 _json["hostedMatchStatusRate"] = hostedMatchStatusRate; |
| 1919 } |
| 1920 if (kind != null) { |
| 1921 _json["kind"] = kind; |
| 1922 } |
| 1923 if (latency50thPercentile != null) { |
| 1924 _json["latency50thPercentile"] = latency50thPercentile; |
| 1925 } |
| 1926 if (latency85thPercentile != null) { |
| 1927 _json["latency85thPercentile"] = latency85thPercentile; |
| 1928 } |
| 1929 if (latency95thPercentile != null) { |
| 1930 _json["latency95thPercentile"] = latency95thPercentile; |
| 1931 } |
| 1932 if (noQuotaInRegion != null) { |
| 1933 _json["noQuotaInRegion"] = noQuotaInRegion; |
| 1934 } |
| 1935 if (outOfQuota != null) { |
| 1936 _json["outOfQuota"] = outOfQuota; |
| 1937 } |
| 1938 if (pixelMatchRequests != null) { |
| 1939 _json["pixelMatchRequests"] = pixelMatchRequests; |
| 1940 } |
| 1941 if (pixelMatchResponses != null) { |
| 1942 _json["pixelMatchResponses"] = pixelMatchResponses; |
| 1943 } |
| 1944 if (quotaConfiguredLimit != null) { |
| 1945 _json["quotaConfiguredLimit"] = quotaConfiguredLimit; |
| 1946 } |
| 1947 if (quotaThrottledLimit != null) { |
| 1948 _json["quotaThrottledLimit"] = quotaThrottledLimit; |
| 1949 } |
| 1950 if (region != null) { |
| 1951 _json["region"] = region; |
| 1952 } |
| 1953 if (timestamp != null) { |
| 1954 _json["timestamp"] = timestamp; |
| 1955 } |
| 1956 return _json; |
| 1957 } |
| 1958 } |
| 1959 |
| 1960 |
| 1961 /** |
| 1962 * The configuration data for an Ad Exchange performance report list. |
| 1963 * https://sites.google.com/a/google.com/adx-integration/Home/engineering/binary
-releases/rtb-api-release |
| 1964 * https://cs.corp.google.com/#piper///depot/google3/contentads/adx/tools/rtb_ap
i/adxrtb.py |
| 1965 */ |
| 1966 class PerformanceReportList { |
| 1967 /** Resource type. */ |
| 1968 core.String kind; |
| 1969 |
| 1970 /** A list of performance reports relevant for the account. */ |
| 1971 core.List<PerformanceReport> performanceReport; |
| 1972 |
| 1973 |
| 1974 PerformanceReportList(); |
| 1975 |
| 1976 PerformanceReportList.fromJson(core.Map _json) { |
| 1977 if (_json.containsKey("kind")) { |
| 1978 kind = _json["kind"]; |
| 1979 } |
| 1980 if (_json.containsKey("performanceReport")) { |
| 1981 performanceReport = _json["performanceReport"].map((value) => new Performa
nceReport.fromJson(value)).toList(); |
| 1982 } |
| 1983 } |
| 1984 |
| 1985 core.Map toJson() { |
| 1986 var _json = new core.Map(); |
| 1987 if (kind != null) { |
| 1988 _json["kind"] = kind; |
| 1989 } |
| 1990 if (performanceReport != null) { |
| 1991 _json["performanceReport"] = performanceReport.map((value) => (value).toJs
on()).toList(); |
| 1992 } |
| 1993 return _json; |
| 1994 } |
| 1995 } |
| 1996 |
| 1997 |
| 1998 /** Not documented yet. */ |
| 1999 class PretargetingConfigDimensions { |
| 2000 /** Height in pixels. */ |
| 2001 core.String height; |
| 2002 |
| 2003 /** Width in pixels. */ |
| 2004 core.String width; |
| 2005 |
| 2006 |
| 2007 PretargetingConfigDimensions(); |
| 2008 |
| 2009 PretargetingConfigDimensions.fromJson(core.Map _json) { |
| 2010 if (_json.containsKey("height")) { |
| 2011 height = _json["height"]; |
| 2012 } |
| 2013 if (_json.containsKey("width")) { |
| 2014 width = _json["width"]; |
| 2015 } |
| 2016 } |
| 2017 |
| 2018 core.Map toJson() { |
| 2019 var _json = new core.Map(); |
| 2020 if (height != null) { |
| 2021 _json["height"] = height; |
| 2022 } |
| 2023 if (width != null) { |
| 2024 _json["width"] = width; |
| 2025 } |
| 2026 return _json; |
| 2027 } |
| 2028 } |
| 2029 |
| 2030 |
| 2031 /** Not documented yet. */ |
| 2032 class PretargetingConfigExcludedPlacements { |
| 2033 /** |
| 2034 * The value of the placement. Interpretation depends on the placement type, |
| 2035 * e.g. URL for a site placement, channel name for a channel placement, app id |
| 2036 * for a mobile app placement. |
| 2037 */ |
| 2038 core.String token; |
| 2039 |
| 2040 /** The type of the placement. */ |
| 2041 core.String type; |
| 2042 |
| 2043 |
| 2044 PretargetingConfigExcludedPlacements(); |
| 2045 |
| 2046 PretargetingConfigExcludedPlacements.fromJson(core.Map _json) { |
| 2047 if (_json.containsKey("token")) { |
| 2048 token = _json["token"]; |
| 2049 } |
| 2050 if (_json.containsKey("type")) { |
| 2051 type = _json["type"]; |
| 2052 } |
| 2053 } |
| 2054 |
| 2055 core.Map toJson() { |
| 2056 var _json = new core.Map(); |
| 2057 if (token != null) { |
| 2058 _json["token"] = token; |
| 2059 } |
| 2060 if (type != null) { |
| 2061 _json["type"] = type; |
| 2062 } |
| 2063 return _json; |
| 2064 } |
| 2065 } |
| 2066 |
| 2067 |
| 2068 /** Not documented yet. */ |
| 2069 class PretargetingConfigPlacements { |
| 2070 /** |
| 2071 * The value of the placement. Interpretation depends on the placement type, |
| 2072 * e.g. URL for a site placement, channel name for a channel placement, app id |
| 2073 * for a mobile app placement. |
| 2074 */ |
| 2075 core.String token; |
| 2076 |
| 2077 /** The type of the placement. */ |
| 2078 core.String type; |
| 2079 |
| 2080 |
| 2081 PretargetingConfigPlacements(); |
| 2082 |
| 2083 PretargetingConfigPlacements.fromJson(core.Map _json) { |
| 2084 if (_json.containsKey("token")) { |
| 2085 token = _json["token"]; |
| 2086 } |
| 2087 if (_json.containsKey("type")) { |
| 2088 type = _json["type"]; |
| 2089 } |
| 2090 } |
| 2091 |
| 2092 core.Map toJson() { |
| 2093 var _json = new core.Map(); |
| 2094 if (token != null) { |
| 2095 _json["token"] = token; |
| 2096 } |
| 2097 if (type != null) { |
| 2098 _json["type"] = type; |
| 2099 } |
| 2100 return _json; |
| 2101 } |
| 2102 } |
| 2103 |
| 2104 |
| 2105 /** Not documented yet. */ |
| 2106 class PretargetingConfig { |
| 2107 /** |
| 2108 * The id for billing purposes, provided for reference. Leave this field blank |
| 2109 * for insert requests; the id will be generated automatically. |
| 2110 */ |
| 2111 core.String billingId; |
| 2112 |
| 2113 /** |
| 2114 * The config id; generated automatically. Leave this field blank for insert |
| 2115 * requests. |
| 2116 */ |
| 2117 core.String configId; |
| 2118 |
| 2119 /** The name of the config. Must be unique. Required for all requests. */ |
| 2120 core.String configName; |
| 2121 |
| 2122 /** |
| 2123 * List must contain exactly one of PRETARGETING_CREATIVE_TYPE_HTML or |
| 2124 * PRETARGETING_CREATIVE_TYPE_VIDEO. |
| 2125 */ |
| 2126 core.List<core.String> creativeType; |
| 2127 |
| 2128 /** |
| 2129 * Requests which allow one of these (width, height) pairs will match. All |
| 2130 * pairs must be supported ad dimensions. |
| 2131 */ |
| 2132 core.List<PretargetingConfigDimensions> dimensions; |
| 2133 |
| 2134 /** |
| 2135 * Requests with any of these content labels will not match. Values are from |
| 2136 * content-labels.txt in the downloadable files section. |
| 2137 */ |
| 2138 core.List<core.String> excludedContentLabels; |
| 2139 |
| 2140 /** Requests containing any of these geo criteria ids will not match. */ |
| 2141 core.List<core.String> excludedGeoCriteriaIds; |
| 2142 |
| 2143 /** Requests containing any of these placements will not match. */ |
| 2144 core.List<PretargetingConfigExcludedPlacements> excludedPlacements; |
| 2145 |
| 2146 /** Requests containing any of these users list ids will not match. */ |
| 2147 core.List<core.String> excludedUserLists; |
| 2148 |
| 2149 /** |
| 2150 * Requests containing any of these vertical ids will not match. Values are |
| 2151 * from the publisher-verticals.txt file in the downloadable files section. |
| 2152 */ |
| 2153 core.List<core.String> excludedVerticals; |
| 2154 |
| 2155 /** Requests containing any of these geo criteria ids will match. */ |
| 2156 core.List<core.String> geoCriteriaIds; |
| 2157 |
| 2158 /** Whether this config is active. Required for all requests. */ |
| 2159 core.bool isActive; |
| 2160 |
| 2161 /** The kind of the resource, i.e. "adexchangebuyer#pretargetingConfig". */ |
| 2162 core.String kind; |
| 2163 |
| 2164 /** Request containing any of these language codes will match. */ |
| 2165 core.List<core.String> languages; |
| 2166 |
| 2167 /** |
| 2168 * Requests containing any of these mobile carrier ids will match. Values are |
| 2169 * from mobile-carriers.csv in the downloadable files section. |
| 2170 */ |
| 2171 core.List<core.String> mobileCarriers; |
| 2172 |
| 2173 /** |
| 2174 * Requests containing any of these mobile device ids will match. Values are |
| 2175 * from mobile-devices.csv in the downloadable files section. |
| 2176 */ |
| 2177 core.List<core.String> mobileDevices; |
| 2178 |
| 2179 /** |
| 2180 * Requests containing any of these mobile operating system version ids will |
| 2181 * match. Values are from mobile-os.csv in the downloadable files section. |
| 2182 */ |
| 2183 core.List<core.String> mobileOperatingSystemVersions; |
| 2184 |
| 2185 /** Requests containing any of these placements will match. */ |
| 2186 core.List<PretargetingConfigPlacements> placements; |
| 2187 |
| 2188 /** |
| 2189 * Requests matching any of these platforms will match. Possible values are |
| 2190 * PRETARGETING_PLATFORM_MOBILE, PRETARGETING_PLATFORM_DESKTOP, and |
| 2191 * PRETARGETING_PLATFORM_TABLET. |
| 2192 */ |
| 2193 core.List<core.String> platforms; |
| 2194 |
| 2195 /** |
| 2196 * Creative attributes should be declared here if all creatives corresponding |
| 2197 * to this pretargeting configuration have that creative attribute. Values are |
| 2198 * from pretargetable-creative-attributes.txt in the downloadable files |
| 2199 * section. |
| 2200 */ |
| 2201 core.List<core.String> supportedCreativeAttributes; |
| 2202 |
| 2203 /** Requests containing any of these user list ids will match. */ |
| 2204 core.List<core.String> userLists; |
| 2205 |
| 2206 /** |
| 2207 * Requests that allow any of these vendor ids will match. Values are from |
| 2208 * vendors.txt in the downloadable files section. |
| 2209 */ |
| 2210 core.List<core.String> vendorTypes; |
| 2211 |
| 2212 /** Requests containing any of these vertical ids will match. */ |
| 2213 core.List<core.String> verticals; |
| 2214 |
| 2215 |
| 2216 PretargetingConfig(); |
| 2217 |
| 2218 PretargetingConfig.fromJson(core.Map _json) { |
| 2219 if (_json.containsKey("billingId")) { |
| 2220 billingId = _json["billingId"]; |
| 2221 } |
| 2222 if (_json.containsKey("configId")) { |
| 2223 configId = _json["configId"]; |
| 2224 } |
| 2225 if (_json.containsKey("configName")) { |
| 2226 configName = _json["configName"]; |
| 2227 } |
| 2228 if (_json.containsKey("creativeType")) { |
| 2229 creativeType = _json["creativeType"]; |
| 2230 } |
| 2231 if (_json.containsKey("dimensions")) { |
| 2232 dimensions = _json["dimensions"].map((value) => new PretargetingConfigDime
nsions.fromJson(value)).toList(); |
| 2233 } |
| 2234 if (_json.containsKey("excludedContentLabels")) { |
| 2235 excludedContentLabels = _json["excludedContentLabels"]; |
| 2236 } |
| 2237 if (_json.containsKey("excludedGeoCriteriaIds")) { |
| 2238 excludedGeoCriteriaIds = _json["excludedGeoCriteriaIds"]; |
| 2239 } |
| 2240 if (_json.containsKey("excludedPlacements")) { |
| 2241 excludedPlacements = _json["excludedPlacements"].map((value) => new Pretar
getingConfigExcludedPlacements.fromJson(value)).toList(); |
| 2242 } |
| 2243 if (_json.containsKey("excludedUserLists")) { |
| 2244 excludedUserLists = _json["excludedUserLists"]; |
| 2245 } |
| 2246 if (_json.containsKey("excludedVerticals")) { |
| 2247 excludedVerticals = _json["excludedVerticals"]; |
| 2248 } |
| 2249 if (_json.containsKey("geoCriteriaIds")) { |
| 2250 geoCriteriaIds = _json["geoCriteriaIds"]; |
| 2251 } |
| 2252 if (_json.containsKey("isActive")) { |
| 2253 isActive = _json["isActive"]; |
| 2254 } |
| 2255 if (_json.containsKey("kind")) { |
| 2256 kind = _json["kind"]; |
| 2257 } |
| 2258 if (_json.containsKey("languages")) { |
| 2259 languages = _json["languages"]; |
| 2260 } |
| 2261 if (_json.containsKey("mobileCarriers")) { |
| 2262 mobileCarriers = _json["mobileCarriers"]; |
| 2263 } |
| 2264 if (_json.containsKey("mobileDevices")) { |
| 2265 mobileDevices = _json["mobileDevices"]; |
| 2266 } |
| 2267 if (_json.containsKey("mobileOperatingSystemVersions")) { |
| 2268 mobileOperatingSystemVersions = _json["mobileOperatingSystemVersions"]; |
| 2269 } |
| 2270 if (_json.containsKey("placements")) { |
| 2271 placements = _json["placements"].map((value) => new PretargetingConfigPlac
ements.fromJson(value)).toList(); |
| 2272 } |
| 2273 if (_json.containsKey("platforms")) { |
| 2274 platforms = _json["platforms"]; |
| 2275 } |
| 2276 if (_json.containsKey("supportedCreativeAttributes")) { |
| 2277 supportedCreativeAttributes = _json["supportedCreativeAttributes"]; |
| 2278 } |
| 2279 if (_json.containsKey("userLists")) { |
| 2280 userLists = _json["userLists"]; |
| 2281 } |
| 2282 if (_json.containsKey("vendorTypes")) { |
| 2283 vendorTypes = _json["vendorTypes"]; |
| 2284 } |
| 2285 if (_json.containsKey("verticals")) { |
| 2286 verticals = _json["verticals"]; |
| 2287 } |
| 2288 } |
| 2289 |
| 2290 core.Map toJson() { |
| 2291 var _json = new core.Map(); |
| 2292 if (billingId != null) { |
| 2293 _json["billingId"] = billingId; |
| 2294 } |
| 2295 if (configId != null) { |
| 2296 _json["configId"] = configId; |
| 2297 } |
| 2298 if (configName != null) { |
| 2299 _json["configName"] = configName; |
| 2300 } |
| 2301 if (creativeType != null) { |
| 2302 _json["creativeType"] = creativeType; |
| 2303 } |
| 2304 if (dimensions != null) { |
| 2305 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; |
| 2306 } |
| 2307 if (excludedContentLabels != null) { |
| 2308 _json["excludedContentLabels"] = excludedContentLabels; |
| 2309 } |
| 2310 if (excludedGeoCriteriaIds != null) { |
| 2311 _json["excludedGeoCriteriaIds"] = excludedGeoCriteriaIds; |
| 2312 } |
| 2313 if (excludedPlacements != null) { |
| 2314 _json["excludedPlacements"] = excludedPlacements.map((value) => (value).to
Json()).toList(); |
| 2315 } |
| 2316 if (excludedUserLists != null) { |
| 2317 _json["excludedUserLists"] = excludedUserLists; |
| 2318 } |
| 2319 if (excludedVerticals != null) { |
| 2320 _json["excludedVerticals"] = excludedVerticals; |
| 2321 } |
| 2322 if (geoCriteriaIds != null) { |
| 2323 _json["geoCriteriaIds"] = geoCriteriaIds; |
| 2324 } |
| 2325 if (isActive != null) { |
| 2326 _json["isActive"] = isActive; |
| 2327 } |
| 2328 if (kind != null) { |
| 2329 _json["kind"] = kind; |
| 2330 } |
| 2331 if (languages != null) { |
| 2332 _json["languages"] = languages; |
| 2333 } |
| 2334 if (mobileCarriers != null) { |
| 2335 _json["mobileCarriers"] = mobileCarriers; |
| 2336 } |
| 2337 if (mobileDevices != null) { |
| 2338 _json["mobileDevices"] = mobileDevices; |
| 2339 } |
| 2340 if (mobileOperatingSystemVersions != null) { |
| 2341 _json["mobileOperatingSystemVersions"] = mobileOperatingSystemVersions; |
| 2342 } |
| 2343 if (placements != null) { |
| 2344 _json["placements"] = placements.map((value) => (value).toJson()).toList()
; |
| 2345 } |
| 2346 if (platforms != null) { |
| 2347 _json["platforms"] = platforms; |
| 2348 } |
| 2349 if (supportedCreativeAttributes != null) { |
| 2350 _json["supportedCreativeAttributes"] = supportedCreativeAttributes; |
| 2351 } |
| 2352 if (userLists != null) { |
| 2353 _json["userLists"] = userLists; |
| 2354 } |
| 2355 if (vendorTypes != null) { |
| 2356 _json["vendorTypes"] = vendorTypes; |
| 2357 } |
| 2358 if (verticals != null) { |
| 2359 _json["verticals"] = verticals; |
| 2360 } |
| 2361 return _json; |
| 2362 } |
| 2363 } |
| 2364 |
| 2365 |
| 2366 /** Not documented yet. */ |
| 2367 class PretargetingConfigList { |
| 2368 /** A list of pretargeting configs */ |
| 2369 core.List<PretargetingConfig> items; |
| 2370 |
| 2371 /** Resource type. */ |
| 2372 core.String kind; |
| 2373 |
| 2374 |
| 2375 PretargetingConfigList(); |
| 2376 |
| 2377 PretargetingConfigList.fromJson(core.Map _json) { |
| 2378 if (_json.containsKey("items")) { |
| 2379 items = _json["items"].map((value) => new PretargetingConfig.fromJson(valu
e)).toList(); |
| 2380 } |
| 2381 if (_json.containsKey("kind")) { |
| 2382 kind = _json["kind"]; |
| 2383 } |
| 2384 } |
| 2385 |
| 2386 core.Map toJson() { |
| 2387 var _json = new core.Map(); |
| 2388 if (items != null) { |
| 2389 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 2390 } |
| 2391 if (kind != null) { |
| 2392 _json["kind"] = kind; |
| 2393 } |
| 2394 return _json; |
| 2395 } |
| 2396 } |
| 2397 |
| 2398 |
OLD | NEW |