OLD | NEW |
(Empty) | |
| 1 library googleapis.dfareporting.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 /** Lets you create, run and download reports. */ |
| 17 class DfareportingApi { |
| 18 /** View and manage DoubleClick for Advertisers reports */ |
| 19 static const DfareportingScope = "https://www.googleapis.com/auth/dfareporting
"; |
| 20 |
| 21 |
| 22 final common_internal.ApiRequester _requester; |
| 23 |
| 24 DimensionValuesResourceApi get dimensionValues => new DimensionValuesResourceA
pi(_requester); |
| 25 FilesResourceApi get files => new FilesResourceApi(_requester); |
| 26 ReportsResourceApi get reports => new ReportsResourceApi(_requester); |
| 27 UserProfilesResourceApi get userProfiles => new UserProfilesResourceApi(_reque
ster); |
| 28 |
| 29 DfareportingApi(http.Client client) : |
| 30 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/dfareporting/v1.3/"); |
| 31 } |
| 32 |
| 33 |
| 34 /** Not documented yet. */ |
| 35 class DimensionValuesResourceApi { |
| 36 final common_internal.ApiRequester _requester; |
| 37 |
| 38 DimensionValuesResourceApi(common_internal.ApiRequester client) : |
| 39 _requester = client; |
| 40 |
| 41 /** |
| 42 * Retrieves list of report dimension values for a list of filters. |
| 43 * |
| 44 * [request] - The metadata request object. |
| 45 * |
| 46 * Request parameters: |
| 47 * |
| 48 * [profileId] - The DFA user profile ID. |
| 49 * |
| 50 * [maxResults] - Maximum number of results to return. |
| 51 * Value must be between "0" and "100". |
| 52 * |
| 53 * [pageToken] - The value of the nextToken from the previous result page. |
| 54 * |
| 55 * Completes with a [DimensionValueList]. |
| 56 * |
| 57 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 58 * error. |
| 59 * |
| 60 * If the used [http.Client] completes with an error when making a REST call, |
| 61 * this method will complete with the same error. |
| 62 */ |
| 63 async.Future<DimensionValueList> query(DimensionValueRequest request, core.Str
ing profileId, {core.int maxResults, core.String pageToken}) { |
| 64 var _url = null; |
| 65 var _queryParams = new core.Map(); |
| 66 var _uploadMedia = null; |
| 67 var _uploadOptions = null; |
| 68 var _downloadOptions = common.DownloadOptions.Metadata; |
| 69 var _body = null; |
| 70 |
| 71 if (request != null) { |
| 72 _body = convert.JSON.encode((request).toJson()); |
| 73 } |
| 74 if (profileId == null) { |
| 75 throw new core.ArgumentError("Parameter profileId is required."); |
| 76 } |
| 77 if (maxResults != null) { |
| 78 _queryParams["maxResults"] = ["${maxResults}"]; |
| 79 } |
| 80 if (pageToken != null) { |
| 81 _queryParams["pageToken"] = [pageToken]; |
| 82 } |
| 83 |
| 84 |
| 85 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/dimensionvalues/query'; |
| 86 |
| 87 var _response = _requester.request(_url, |
| 88 "POST", |
| 89 body: _body, |
| 90 queryParams: _queryParams, |
| 91 uploadOptions: _uploadOptions, |
| 92 uploadMedia: _uploadMedia, |
| 93 downloadOptions: _downloadOptions); |
| 94 return _response.then((data) => new DimensionValueList.fromJson(data)); |
| 95 } |
| 96 |
| 97 } |
| 98 |
| 99 |
| 100 /** Not documented yet. */ |
| 101 class FilesResourceApi { |
| 102 final common_internal.ApiRequester _requester; |
| 103 |
| 104 FilesResourceApi(common_internal.ApiRequester client) : |
| 105 _requester = client; |
| 106 |
| 107 /** |
| 108 * Retrieves a report file by its report ID and file ID. |
| 109 * |
| 110 * Request parameters: |
| 111 * |
| 112 * [reportId] - The ID of the report. |
| 113 * |
| 114 * [fileId] - The ID of the report file. |
| 115 * |
| 116 * [downloadOptions] - Options for downloading. A download can be either a |
| 117 * Metadata (default) or Media download. Partial Media downloads are possible |
| 118 * as well. |
| 119 * |
| 120 * Completes with a |
| 121 * |
| 122 * - [File] for Metadata downloads (see [downloadOptions]). |
| 123 * |
| 124 * - [common.Media] for Media downloads (see [downloadOptions]). |
| 125 * |
| 126 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 127 * error. |
| 128 * |
| 129 * If the used [http.Client] completes with an error when making a REST call, |
| 130 * this method will complete with the same error. |
| 131 */ |
| 132 async.Future get(core.String reportId, core.String fileId, {common.DownloadOpt
ions downloadOptions: common.DownloadOptions.Metadata}) { |
| 133 var _url = null; |
| 134 var _queryParams = new core.Map(); |
| 135 var _uploadMedia = null; |
| 136 var _uploadOptions = null; |
| 137 var _downloadOptions = common.DownloadOptions.Metadata; |
| 138 var _body = null; |
| 139 |
| 140 if (reportId == null) { |
| 141 throw new core.ArgumentError("Parameter reportId is required."); |
| 142 } |
| 143 if (fileId == null) { |
| 144 throw new core.ArgumentError("Parameter fileId is required."); |
| 145 } |
| 146 |
| 147 _downloadOptions = downloadOptions; |
| 148 |
| 149 _url = 'reports/' + common_internal.Escaper.ecapeVariable('$reportId') + '/f
iles/' + common_internal.Escaper.ecapeVariable('$fileId'); |
| 150 |
| 151 var _response = _requester.request(_url, |
| 152 "GET", |
| 153 body: _body, |
| 154 queryParams: _queryParams, |
| 155 uploadOptions: _uploadOptions, |
| 156 uploadMedia: _uploadMedia, |
| 157 downloadOptions: _downloadOptions); |
| 158 if (_downloadOptions == null || |
| 159 _downloadOptions == common.DownloadOptions.Metadata) { |
| 160 return _response.then((data) => new File.fromJson(data)); |
| 161 } else { |
| 162 return _response; |
| 163 } |
| 164 } |
| 165 |
| 166 /** |
| 167 * Lists files for a user profile. |
| 168 * |
| 169 * Request parameters: |
| 170 * |
| 171 * [profileId] - The DFA profile ID. |
| 172 * |
| 173 * [maxResults] - Maximum number of results to return. |
| 174 * Value must be between "0" and "10". |
| 175 * |
| 176 * [pageToken] - The value of the nextToken from the previous result page. |
| 177 * |
| 178 * [scope] - The scope that defines which results are returned, default is |
| 179 * 'MINE'. |
| 180 * Possible string values are: |
| 181 * - "ALL" : All files in account. |
| 182 * - "MINE" : My files. |
| 183 * - "SHARED_WITH_ME" : Files shared with me. |
| 184 * |
| 185 * [sortField] - The field by which to sort the list. |
| 186 * Possible string values are: |
| 187 * - "ID" : Sort by file ID. |
| 188 * - "LAST_MODIFIED_TIME" : Sort by 'lastmodifiedAt' field. |
| 189 * |
| 190 * [sortOrder] - Order of sorted results, default is 'DESCENDING'. |
| 191 * Possible string values are: |
| 192 * - "ASCENDING" : Ascending order. |
| 193 * - "DESCENDING" : Descending order. |
| 194 * |
| 195 * Completes with a [FileList]. |
| 196 * |
| 197 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 198 * error. |
| 199 * |
| 200 * If the used [http.Client] completes with an error when making a REST call, |
| 201 * this method will complete with the same error. |
| 202 */ |
| 203 async.Future<FileList> list(core.String profileId, {core.int maxResults, core.
String pageToken, core.String scope, core.String sortField, core.String sortOrde
r}) { |
| 204 var _url = null; |
| 205 var _queryParams = new core.Map(); |
| 206 var _uploadMedia = null; |
| 207 var _uploadOptions = null; |
| 208 var _downloadOptions = common.DownloadOptions.Metadata; |
| 209 var _body = null; |
| 210 |
| 211 if (profileId == null) { |
| 212 throw new core.ArgumentError("Parameter profileId is required."); |
| 213 } |
| 214 if (maxResults != null) { |
| 215 _queryParams["maxResults"] = ["${maxResults}"]; |
| 216 } |
| 217 if (pageToken != null) { |
| 218 _queryParams["pageToken"] = [pageToken]; |
| 219 } |
| 220 if (scope != null) { |
| 221 _queryParams["scope"] = [scope]; |
| 222 } |
| 223 if (sortField != null) { |
| 224 _queryParams["sortField"] = [sortField]; |
| 225 } |
| 226 if (sortOrder != null) { |
| 227 _queryParams["sortOrder"] = [sortOrder]; |
| 228 } |
| 229 |
| 230 |
| 231 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/files'; |
| 232 |
| 233 var _response = _requester.request(_url, |
| 234 "GET", |
| 235 body: _body, |
| 236 queryParams: _queryParams, |
| 237 uploadOptions: _uploadOptions, |
| 238 uploadMedia: _uploadMedia, |
| 239 downloadOptions: _downloadOptions); |
| 240 return _response.then((data) => new FileList.fromJson(data)); |
| 241 } |
| 242 |
| 243 } |
| 244 |
| 245 |
| 246 /** Not documented yet. */ |
| 247 class ReportsResourceApi { |
| 248 final common_internal.ApiRequester _requester; |
| 249 |
| 250 ReportsCompatibleFieldsResourceApi get compatibleFields => new ReportsCompatib
leFieldsResourceApi(_requester); |
| 251 ReportsFilesResourceApi get files => new ReportsFilesResourceApi(_requester); |
| 252 |
| 253 ReportsResourceApi(common_internal.ApiRequester client) : |
| 254 _requester = client; |
| 255 |
| 256 /** |
| 257 * Deletes a report by its ID. |
| 258 * |
| 259 * Request parameters: |
| 260 * |
| 261 * [profileId] - The DFA user profile ID. |
| 262 * |
| 263 * [reportId] - The ID of the report. |
| 264 * |
| 265 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 266 * error. |
| 267 * |
| 268 * If the used [http.Client] completes with an error when making a REST call, |
| 269 * this method will complete with the same error. |
| 270 */ |
| 271 async.Future delete(core.String profileId, core.String reportId) { |
| 272 var _url = null; |
| 273 var _queryParams = new core.Map(); |
| 274 var _uploadMedia = null; |
| 275 var _uploadOptions = null; |
| 276 var _downloadOptions = common.DownloadOptions.Metadata; |
| 277 var _body = null; |
| 278 |
| 279 if (profileId == null) { |
| 280 throw new core.ArgumentError("Parameter profileId is required."); |
| 281 } |
| 282 if (reportId == null) { |
| 283 throw new core.ArgumentError("Parameter reportId is required."); |
| 284 } |
| 285 |
| 286 _downloadOptions = null; |
| 287 |
| 288 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports/' + common_internal.Escaper.ecapeVariable('$reportId'); |
| 289 |
| 290 var _response = _requester.request(_url, |
| 291 "DELETE", |
| 292 body: _body, |
| 293 queryParams: _queryParams, |
| 294 uploadOptions: _uploadOptions, |
| 295 uploadMedia: _uploadMedia, |
| 296 downloadOptions: _downloadOptions); |
| 297 return _response.then((data) => null); |
| 298 } |
| 299 |
| 300 /** |
| 301 * Retrieves a report by its ID. |
| 302 * |
| 303 * Request parameters: |
| 304 * |
| 305 * [profileId] - The DFA user profile ID. |
| 306 * |
| 307 * [reportId] - The ID of the report. |
| 308 * |
| 309 * Completes with a [Report]. |
| 310 * |
| 311 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 312 * error. |
| 313 * |
| 314 * If the used [http.Client] completes with an error when making a REST call, |
| 315 * this method will complete with the same error. |
| 316 */ |
| 317 async.Future<Report> get(core.String profileId, core.String reportId) { |
| 318 var _url = null; |
| 319 var _queryParams = new core.Map(); |
| 320 var _uploadMedia = null; |
| 321 var _uploadOptions = null; |
| 322 var _downloadOptions = common.DownloadOptions.Metadata; |
| 323 var _body = null; |
| 324 |
| 325 if (profileId == null) { |
| 326 throw new core.ArgumentError("Parameter profileId is required."); |
| 327 } |
| 328 if (reportId == null) { |
| 329 throw new core.ArgumentError("Parameter reportId is required."); |
| 330 } |
| 331 |
| 332 |
| 333 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports/' + common_internal.Escaper.ecapeVariable('$reportId'); |
| 334 |
| 335 var _response = _requester.request(_url, |
| 336 "GET", |
| 337 body: _body, |
| 338 queryParams: _queryParams, |
| 339 uploadOptions: _uploadOptions, |
| 340 uploadMedia: _uploadMedia, |
| 341 downloadOptions: _downloadOptions); |
| 342 return _response.then((data) => new Report.fromJson(data)); |
| 343 } |
| 344 |
| 345 /** |
| 346 * Creates a report. |
| 347 * |
| 348 * [request] - The metadata request object. |
| 349 * |
| 350 * Request parameters: |
| 351 * |
| 352 * [profileId] - The DFA user profile ID. |
| 353 * |
| 354 * Completes with a [Report]. |
| 355 * |
| 356 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 357 * error. |
| 358 * |
| 359 * If the used [http.Client] completes with an error when making a REST call, |
| 360 * this method will complete with the same error. |
| 361 */ |
| 362 async.Future<Report> insert(Report request, core.String profileId) { |
| 363 var _url = null; |
| 364 var _queryParams = new core.Map(); |
| 365 var _uploadMedia = null; |
| 366 var _uploadOptions = null; |
| 367 var _downloadOptions = common.DownloadOptions.Metadata; |
| 368 var _body = null; |
| 369 |
| 370 if (request != null) { |
| 371 _body = convert.JSON.encode((request).toJson()); |
| 372 } |
| 373 if (profileId == null) { |
| 374 throw new core.ArgumentError("Parameter profileId is required."); |
| 375 } |
| 376 |
| 377 |
| 378 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports'; |
| 379 |
| 380 var _response = _requester.request(_url, |
| 381 "POST", |
| 382 body: _body, |
| 383 queryParams: _queryParams, |
| 384 uploadOptions: _uploadOptions, |
| 385 uploadMedia: _uploadMedia, |
| 386 downloadOptions: _downloadOptions); |
| 387 return _response.then((data) => new Report.fromJson(data)); |
| 388 } |
| 389 |
| 390 /** |
| 391 * Retrieves list of reports. |
| 392 * |
| 393 * Request parameters: |
| 394 * |
| 395 * [profileId] - The DFA user profile ID. |
| 396 * |
| 397 * [maxResults] - Maximum number of results to return. |
| 398 * Value must be between "0" and "10". |
| 399 * |
| 400 * [pageToken] - The value of the nextToken from the previous result page. |
| 401 * |
| 402 * [scope] - The scope that defines which results are returned, default is |
| 403 * 'MINE'. |
| 404 * Possible string values are: |
| 405 * - "ALL" : All reports in account. |
| 406 * - "MINE" : My reports. |
| 407 * |
| 408 * [sortField] - The field by which to sort the list. |
| 409 * Possible string values are: |
| 410 * - "ID" : Sort by report ID. |
| 411 * - "LAST_MODIFIED_TIME" : Sort by 'lastModifiedTime' field. |
| 412 * - "NAME" : Sort by name of reports. |
| 413 * |
| 414 * [sortOrder] - Order of sorted results, default is 'DESCENDING'. |
| 415 * Possible string values are: |
| 416 * - "ASCENDING" : Ascending order. |
| 417 * - "DESCENDING" : Descending order. |
| 418 * |
| 419 * Completes with a [ReportList]. |
| 420 * |
| 421 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 422 * error. |
| 423 * |
| 424 * If the used [http.Client] completes with an error when making a REST call, |
| 425 * this method will complete with the same error. |
| 426 */ |
| 427 async.Future<ReportList> list(core.String profileId, {core.int maxResults, cor
e.String pageToken, core.String scope, core.String sortField, core.String sortOr
der}) { |
| 428 var _url = null; |
| 429 var _queryParams = new core.Map(); |
| 430 var _uploadMedia = null; |
| 431 var _uploadOptions = null; |
| 432 var _downloadOptions = common.DownloadOptions.Metadata; |
| 433 var _body = null; |
| 434 |
| 435 if (profileId == null) { |
| 436 throw new core.ArgumentError("Parameter profileId is required."); |
| 437 } |
| 438 if (maxResults != null) { |
| 439 _queryParams["maxResults"] = ["${maxResults}"]; |
| 440 } |
| 441 if (pageToken != null) { |
| 442 _queryParams["pageToken"] = [pageToken]; |
| 443 } |
| 444 if (scope != null) { |
| 445 _queryParams["scope"] = [scope]; |
| 446 } |
| 447 if (sortField != null) { |
| 448 _queryParams["sortField"] = [sortField]; |
| 449 } |
| 450 if (sortOrder != null) { |
| 451 _queryParams["sortOrder"] = [sortOrder]; |
| 452 } |
| 453 |
| 454 |
| 455 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports'; |
| 456 |
| 457 var _response = _requester.request(_url, |
| 458 "GET", |
| 459 body: _body, |
| 460 queryParams: _queryParams, |
| 461 uploadOptions: _uploadOptions, |
| 462 uploadMedia: _uploadMedia, |
| 463 downloadOptions: _downloadOptions); |
| 464 return _response.then((data) => new ReportList.fromJson(data)); |
| 465 } |
| 466 |
| 467 /** |
| 468 * Updates a report. This method supports patch semantics. |
| 469 * |
| 470 * [request] - The metadata request object. |
| 471 * |
| 472 * Request parameters: |
| 473 * |
| 474 * [profileId] - The DFA user profile ID. |
| 475 * |
| 476 * [reportId] - The ID of the report. |
| 477 * |
| 478 * Completes with a [Report]. |
| 479 * |
| 480 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 481 * error. |
| 482 * |
| 483 * If the used [http.Client] completes with an error when making a REST call, |
| 484 * this method will complete with the same error. |
| 485 */ |
| 486 async.Future<Report> patch(Report request, core.String profileId, core.String
reportId) { |
| 487 var _url = null; |
| 488 var _queryParams = new core.Map(); |
| 489 var _uploadMedia = null; |
| 490 var _uploadOptions = null; |
| 491 var _downloadOptions = common.DownloadOptions.Metadata; |
| 492 var _body = null; |
| 493 |
| 494 if (request != null) { |
| 495 _body = convert.JSON.encode((request).toJson()); |
| 496 } |
| 497 if (profileId == null) { |
| 498 throw new core.ArgumentError("Parameter profileId is required."); |
| 499 } |
| 500 if (reportId == null) { |
| 501 throw new core.ArgumentError("Parameter reportId is required."); |
| 502 } |
| 503 |
| 504 |
| 505 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports/' + common_internal.Escaper.ecapeVariable('$reportId'); |
| 506 |
| 507 var _response = _requester.request(_url, |
| 508 "PATCH", |
| 509 body: _body, |
| 510 queryParams: _queryParams, |
| 511 uploadOptions: _uploadOptions, |
| 512 uploadMedia: _uploadMedia, |
| 513 downloadOptions: _downloadOptions); |
| 514 return _response.then((data) => new Report.fromJson(data)); |
| 515 } |
| 516 |
| 517 /** |
| 518 * Runs a report. |
| 519 * |
| 520 * Request parameters: |
| 521 * |
| 522 * [profileId] - The DFA profile ID. |
| 523 * |
| 524 * [reportId] - The ID of the report. |
| 525 * |
| 526 * [synchronous] - If set and true, tries to run the report synchronously. |
| 527 * |
| 528 * Completes with a [File]. |
| 529 * |
| 530 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 531 * error. |
| 532 * |
| 533 * If the used [http.Client] completes with an error when making a REST call, |
| 534 * this method will complete with the same error. |
| 535 */ |
| 536 async.Future<File> run(core.String profileId, core.String reportId, {core.bool
synchronous}) { |
| 537 var _url = null; |
| 538 var _queryParams = new core.Map(); |
| 539 var _uploadMedia = null; |
| 540 var _uploadOptions = null; |
| 541 var _downloadOptions = common.DownloadOptions.Metadata; |
| 542 var _body = null; |
| 543 |
| 544 if (profileId == null) { |
| 545 throw new core.ArgumentError("Parameter profileId is required."); |
| 546 } |
| 547 if (reportId == null) { |
| 548 throw new core.ArgumentError("Parameter reportId is required."); |
| 549 } |
| 550 if (synchronous != null) { |
| 551 _queryParams["synchronous"] = ["${synchronous}"]; |
| 552 } |
| 553 |
| 554 |
| 555 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports/' + common_internal.Escaper.ecapeVariable('$reportId') + '/run'; |
| 556 |
| 557 var _response = _requester.request(_url, |
| 558 "POST", |
| 559 body: _body, |
| 560 queryParams: _queryParams, |
| 561 uploadOptions: _uploadOptions, |
| 562 uploadMedia: _uploadMedia, |
| 563 downloadOptions: _downloadOptions); |
| 564 return _response.then((data) => new File.fromJson(data)); |
| 565 } |
| 566 |
| 567 /** |
| 568 * Updates a report. |
| 569 * |
| 570 * [request] - The metadata request object. |
| 571 * |
| 572 * Request parameters: |
| 573 * |
| 574 * [profileId] - The DFA user profile ID. |
| 575 * |
| 576 * [reportId] - The ID of the report. |
| 577 * |
| 578 * Completes with a [Report]. |
| 579 * |
| 580 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 581 * error. |
| 582 * |
| 583 * If the used [http.Client] completes with an error when making a REST call, |
| 584 * this method will complete with the same error. |
| 585 */ |
| 586 async.Future<Report> update(Report request, core.String profileId, core.String
reportId) { |
| 587 var _url = null; |
| 588 var _queryParams = new core.Map(); |
| 589 var _uploadMedia = null; |
| 590 var _uploadOptions = null; |
| 591 var _downloadOptions = common.DownloadOptions.Metadata; |
| 592 var _body = null; |
| 593 |
| 594 if (request != null) { |
| 595 _body = convert.JSON.encode((request).toJson()); |
| 596 } |
| 597 if (profileId == null) { |
| 598 throw new core.ArgumentError("Parameter profileId is required."); |
| 599 } |
| 600 if (reportId == null) { |
| 601 throw new core.ArgumentError("Parameter reportId is required."); |
| 602 } |
| 603 |
| 604 |
| 605 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports/' + common_internal.Escaper.ecapeVariable('$reportId'); |
| 606 |
| 607 var _response = _requester.request(_url, |
| 608 "PUT", |
| 609 body: _body, |
| 610 queryParams: _queryParams, |
| 611 uploadOptions: _uploadOptions, |
| 612 uploadMedia: _uploadMedia, |
| 613 downloadOptions: _downloadOptions); |
| 614 return _response.then((data) => new Report.fromJson(data)); |
| 615 } |
| 616 |
| 617 } |
| 618 |
| 619 |
| 620 /** Not documented yet. */ |
| 621 class ReportsCompatibleFieldsResourceApi { |
| 622 final common_internal.ApiRequester _requester; |
| 623 |
| 624 ReportsCompatibleFieldsResourceApi(common_internal.ApiRequester client) : |
| 625 _requester = client; |
| 626 |
| 627 /** |
| 628 * Returns the fields that are compatible to be selected in the respective |
| 629 * sections of a report criteria, given the fields already selected in the |
| 630 * input report and user permissions. |
| 631 * |
| 632 * [request] - The metadata request object. |
| 633 * |
| 634 * Request parameters: |
| 635 * |
| 636 * [profileId] - The DFA user profile ID. |
| 637 * |
| 638 * Completes with a [CompatibleFields]. |
| 639 * |
| 640 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 641 * error. |
| 642 * |
| 643 * If the used [http.Client] completes with an error when making a REST call, |
| 644 * this method will complete with the same error. |
| 645 */ |
| 646 async.Future<CompatibleFields> query(Report request, core.String profileId) { |
| 647 var _url = null; |
| 648 var _queryParams = new core.Map(); |
| 649 var _uploadMedia = null; |
| 650 var _uploadOptions = null; |
| 651 var _downloadOptions = common.DownloadOptions.Metadata; |
| 652 var _body = null; |
| 653 |
| 654 if (request != null) { |
| 655 _body = convert.JSON.encode((request).toJson()); |
| 656 } |
| 657 if (profileId == null) { |
| 658 throw new core.ArgumentError("Parameter profileId is required."); |
| 659 } |
| 660 |
| 661 |
| 662 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports/compatiblefields/query'; |
| 663 |
| 664 var _response = _requester.request(_url, |
| 665 "POST", |
| 666 body: _body, |
| 667 queryParams: _queryParams, |
| 668 uploadOptions: _uploadOptions, |
| 669 uploadMedia: _uploadMedia, |
| 670 downloadOptions: _downloadOptions); |
| 671 return _response.then((data) => new CompatibleFields.fromJson(data)); |
| 672 } |
| 673 |
| 674 } |
| 675 |
| 676 |
| 677 /** Not documented yet. */ |
| 678 class ReportsFilesResourceApi { |
| 679 final common_internal.ApiRequester _requester; |
| 680 |
| 681 ReportsFilesResourceApi(common_internal.ApiRequester client) : |
| 682 _requester = client; |
| 683 |
| 684 /** |
| 685 * Retrieves a report file. |
| 686 * |
| 687 * Request parameters: |
| 688 * |
| 689 * [profileId] - The DFA profile ID. |
| 690 * |
| 691 * [reportId] - The ID of the report. |
| 692 * |
| 693 * [fileId] - The ID of the report file. |
| 694 * |
| 695 * [downloadOptions] - Options for downloading. A download can be either a |
| 696 * Metadata (default) or Media download. Partial Media downloads are possible |
| 697 * as well. |
| 698 * |
| 699 * Completes with a |
| 700 * |
| 701 * - [File] for Metadata downloads (see [downloadOptions]). |
| 702 * |
| 703 * - [common.Media] for Media downloads (see [downloadOptions]). |
| 704 * |
| 705 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 706 * error. |
| 707 * |
| 708 * If the used [http.Client] completes with an error when making a REST call, |
| 709 * this method will complete with the same error. |
| 710 */ |
| 711 async.Future get(core.String profileId, core.String reportId, core.String file
Id, {common.DownloadOptions downloadOptions: common.DownloadOptions.Metadata}) { |
| 712 var _url = null; |
| 713 var _queryParams = new core.Map(); |
| 714 var _uploadMedia = null; |
| 715 var _uploadOptions = null; |
| 716 var _downloadOptions = common.DownloadOptions.Metadata; |
| 717 var _body = null; |
| 718 |
| 719 if (profileId == null) { |
| 720 throw new core.ArgumentError("Parameter profileId is required."); |
| 721 } |
| 722 if (reportId == null) { |
| 723 throw new core.ArgumentError("Parameter reportId is required."); |
| 724 } |
| 725 if (fileId == null) { |
| 726 throw new core.ArgumentError("Parameter fileId is required."); |
| 727 } |
| 728 |
| 729 _downloadOptions = downloadOptions; |
| 730 |
| 731 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports/' + common_internal.Escaper.ecapeVariable('$reportId') + '/files/'
+ common_internal.Escaper.ecapeVariable('$fileId'); |
| 732 |
| 733 var _response = _requester.request(_url, |
| 734 "GET", |
| 735 body: _body, |
| 736 queryParams: _queryParams, |
| 737 uploadOptions: _uploadOptions, |
| 738 uploadMedia: _uploadMedia, |
| 739 downloadOptions: _downloadOptions); |
| 740 if (_downloadOptions == null || |
| 741 _downloadOptions == common.DownloadOptions.Metadata) { |
| 742 return _response.then((data) => new File.fromJson(data)); |
| 743 } else { |
| 744 return _response; |
| 745 } |
| 746 } |
| 747 |
| 748 /** |
| 749 * Lists files for a report. |
| 750 * |
| 751 * Request parameters: |
| 752 * |
| 753 * [profileId] - The DFA profile ID. |
| 754 * |
| 755 * [reportId] - The ID of the parent report. |
| 756 * |
| 757 * [maxResults] - Maximum number of results to return. |
| 758 * Value must be between "0" and "10". |
| 759 * |
| 760 * [pageToken] - The value of the nextToken from the previous result page. |
| 761 * |
| 762 * [sortField] - The field by which to sort the list. |
| 763 * Possible string values are: |
| 764 * - "ID" : Sort by file ID. |
| 765 * - "LAST_MODIFIED_TIME" : Sort by 'lastmodifiedAt' field. |
| 766 * |
| 767 * [sortOrder] - Order of sorted results, default is 'DESCENDING'. |
| 768 * Possible string values are: |
| 769 * - "ASCENDING" : Ascending order. |
| 770 * - "DESCENDING" : Descending order. |
| 771 * |
| 772 * Completes with a [FileList]. |
| 773 * |
| 774 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 775 * error. |
| 776 * |
| 777 * If the used [http.Client] completes with an error when making a REST call, |
| 778 * this method will complete with the same error. |
| 779 */ |
| 780 async.Future<FileList> list(core.String profileId, core.String reportId, {core
.int maxResults, core.String pageToken, core.String sortField, core.String sortO
rder}) { |
| 781 var _url = null; |
| 782 var _queryParams = new core.Map(); |
| 783 var _uploadMedia = null; |
| 784 var _uploadOptions = null; |
| 785 var _downloadOptions = common.DownloadOptions.Metadata; |
| 786 var _body = null; |
| 787 |
| 788 if (profileId == null) { |
| 789 throw new core.ArgumentError("Parameter profileId is required."); |
| 790 } |
| 791 if (reportId == null) { |
| 792 throw new core.ArgumentError("Parameter reportId is required."); |
| 793 } |
| 794 if (maxResults != null) { |
| 795 _queryParams["maxResults"] = ["${maxResults}"]; |
| 796 } |
| 797 if (pageToken != null) { |
| 798 _queryParams["pageToken"] = [pageToken]; |
| 799 } |
| 800 if (sortField != null) { |
| 801 _queryParams["sortField"] = [sortField]; |
| 802 } |
| 803 if (sortOrder != null) { |
| 804 _queryParams["sortOrder"] = [sortOrder]; |
| 805 } |
| 806 |
| 807 |
| 808 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
+ '/reports/' + common_internal.Escaper.ecapeVariable('$reportId') + '/files'; |
| 809 |
| 810 var _response = _requester.request(_url, |
| 811 "GET", |
| 812 body: _body, |
| 813 queryParams: _queryParams, |
| 814 uploadOptions: _uploadOptions, |
| 815 uploadMedia: _uploadMedia, |
| 816 downloadOptions: _downloadOptions); |
| 817 return _response.then((data) => new FileList.fromJson(data)); |
| 818 } |
| 819 |
| 820 } |
| 821 |
| 822 |
| 823 /** Not documented yet. */ |
| 824 class UserProfilesResourceApi { |
| 825 final common_internal.ApiRequester _requester; |
| 826 |
| 827 UserProfilesResourceApi(common_internal.ApiRequester client) : |
| 828 _requester = client; |
| 829 |
| 830 /** |
| 831 * Gets one user profile by ID. |
| 832 * |
| 833 * Request parameters: |
| 834 * |
| 835 * [profileId] - The user profile ID. |
| 836 * |
| 837 * Completes with a [UserProfile]. |
| 838 * |
| 839 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 840 * error. |
| 841 * |
| 842 * If the used [http.Client] completes with an error when making a REST call, |
| 843 * this method will complete with the same error. |
| 844 */ |
| 845 async.Future<UserProfile> get(core.String profileId) { |
| 846 var _url = null; |
| 847 var _queryParams = new core.Map(); |
| 848 var _uploadMedia = null; |
| 849 var _uploadOptions = null; |
| 850 var _downloadOptions = common.DownloadOptions.Metadata; |
| 851 var _body = null; |
| 852 |
| 853 if (profileId == null) { |
| 854 throw new core.ArgumentError("Parameter profileId is required."); |
| 855 } |
| 856 |
| 857 |
| 858 _url = 'userprofiles/' + common_internal.Escaper.ecapeVariable('$profileId')
; |
| 859 |
| 860 var _response = _requester.request(_url, |
| 861 "GET", |
| 862 body: _body, |
| 863 queryParams: _queryParams, |
| 864 uploadOptions: _uploadOptions, |
| 865 uploadMedia: _uploadMedia, |
| 866 downloadOptions: _downloadOptions); |
| 867 return _response.then((data) => new UserProfile.fromJson(data)); |
| 868 } |
| 869 |
| 870 /** |
| 871 * Retrieves list of user profiles for a user. |
| 872 * |
| 873 * Request parameters: |
| 874 * |
| 875 * Completes with a [UserProfileList]. |
| 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<UserProfileList> list() { |
| 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 |
| 892 |
| 893 _url = 'userprofiles'; |
| 894 |
| 895 var _response = _requester.request(_url, |
| 896 "GET", |
| 897 body: _body, |
| 898 queryParams: _queryParams, |
| 899 uploadOptions: _uploadOptions, |
| 900 uploadMedia: _uploadMedia, |
| 901 downloadOptions: _downloadOptions); |
| 902 return _response.then((data) => new UserProfileList.fromJson(data)); |
| 903 } |
| 904 |
| 905 } |
| 906 |
| 907 |
| 908 |
| 909 /** Represents an activity group. */ |
| 910 class Activities { |
| 911 /** |
| 912 * List of activity filters. The dimension values need to be all either of |
| 913 * type "dfa:activity" or "dfa:activityGroup". |
| 914 */ |
| 915 core.List<DimensionValue> filters; |
| 916 |
| 917 /** The kind of resource this is, in this case dfareporting#activities. */ |
| 918 core.String kind; |
| 919 |
| 920 /** List of names of floodlight activity metrics. */ |
| 921 core.List<core.String> metricNames; |
| 922 |
| 923 |
| 924 Activities(); |
| 925 |
| 926 Activities.fromJson(core.Map _json) { |
| 927 if (_json.containsKey("filters")) { |
| 928 filters = _json["filters"].map((value) => new DimensionValue.fromJson(valu
e)).toList(); |
| 929 } |
| 930 if (_json.containsKey("kind")) { |
| 931 kind = _json["kind"]; |
| 932 } |
| 933 if (_json.containsKey("metricNames")) { |
| 934 metricNames = _json["metricNames"]; |
| 935 } |
| 936 } |
| 937 |
| 938 core.Map toJson() { |
| 939 var _json = new core.Map(); |
| 940 if (filters != null) { |
| 941 _json["filters"] = filters.map((value) => (value).toJson()).toList(); |
| 942 } |
| 943 if (kind != null) { |
| 944 _json["kind"] = kind; |
| 945 } |
| 946 if (metricNames != null) { |
| 947 _json["metricNames"] = metricNames; |
| 948 } |
| 949 return _json; |
| 950 } |
| 951 } |
| 952 |
| 953 |
| 954 /** Represents a response to the queryCompatibleFields method. */ |
| 955 class CompatibleFields { |
| 956 /** |
| 957 * Contains items that are compatible to be selected for a report of type |
| 958 * "CROSS_DIMENSION_REACH". |
| 959 */ |
| 960 CrossDimensionReachReportCompatibleFields crossDimensionReachReportCompatibleF
ields; |
| 961 |
| 962 /** |
| 963 * Contains items that are compatible to be selected for a report of type |
| 964 * "FLOODLIGHT". |
| 965 */ |
| 966 FloodlightReportCompatibleFields floodlightReportCompatibleFields; |
| 967 |
| 968 /** |
| 969 * The kind of resource this is, in this case dfareporting#compatibleFields. |
| 970 */ |
| 971 core.String kind; |
| 972 |
| 973 /** |
| 974 * Contains items that are compatible to be selected for a report of type |
| 975 * "PATH_TO_CONVERSION". |
| 976 */ |
| 977 PathToConversionReportCompatibleFields pathToConversionReportCompatibleFields; |
| 978 |
| 979 /** |
| 980 * Contains items that are compatible to be selected for a report of type |
| 981 * "REACH". |
| 982 */ |
| 983 ReachReportCompatibleFields reachReportCompatibleFields; |
| 984 |
| 985 /** |
| 986 * Contains items that are compatible to be selected for a report of type |
| 987 * "STANDARD". |
| 988 */ |
| 989 ReportCompatibleFields reportCompatibleFields; |
| 990 |
| 991 |
| 992 CompatibleFields(); |
| 993 |
| 994 CompatibleFields.fromJson(core.Map _json) { |
| 995 if (_json.containsKey("crossDimensionReachReportCompatibleFields")) { |
| 996 crossDimensionReachReportCompatibleFields = new CrossDimensionReachReportC
ompatibleFields.fromJson(_json["crossDimensionReachReportCompatibleFields"]); |
| 997 } |
| 998 if (_json.containsKey("floodlightReportCompatibleFields")) { |
| 999 floodlightReportCompatibleFields = new FloodlightReportCompatibleFields.fr
omJson(_json["floodlightReportCompatibleFields"]); |
| 1000 } |
| 1001 if (_json.containsKey("kind")) { |
| 1002 kind = _json["kind"]; |
| 1003 } |
| 1004 if (_json.containsKey("pathToConversionReportCompatibleFields")) { |
| 1005 pathToConversionReportCompatibleFields = new PathToConversionReportCompati
bleFields.fromJson(_json["pathToConversionReportCompatibleFields"]); |
| 1006 } |
| 1007 if (_json.containsKey("reachReportCompatibleFields")) { |
| 1008 reachReportCompatibleFields = new ReachReportCompatibleFields.fromJson(_js
on["reachReportCompatibleFields"]); |
| 1009 } |
| 1010 if (_json.containsKey("reportCompatibleFields")) { |
| 1011 reportCompatibleFields = new ReportCompatibleFields.fromJson(_json["report
CompatibleFields"]); |
| 1012 } |
| 1013 } |
| 1014 |
| 1015 core.Map toJson() { |
| 1016 var _json = new core.Map(); |
| 1017 if (crossDimensionReachReportCompatibleFields != null) { |
| 1018 _json["crossDimensionReachReportCompatibleFields"] = (crossDimensionReachR
eportCompatibleFields).toJson(); |
| 1019 } |
| 1020 if (floodlightReportCompatibleFields != null) { |
| 1021 _json["floodlightReportCompatibleFields"] = (floodlightReportCompatibleFie
lds).toJson(); |
| 1022 } |
| 1023 if (kind != null) { |
| 1024 _json["kind"] = kind; |
| 1025 } |
| 1026 if (pathToConversionReportCompatibleFields != null) { |
| 1027 _json["pathToConversionReportCompatibleFields"] = (pathToConversionReportC
ompatibleFields).toJson(); |
| 1028 } |
| 1029 if (reachReportCompatibleFields != null) { |
| 1030 _json["reachReportCompatibleFields"] = (reachReportCompatibleFields).toJso
n(); |
| 1031 } |
| 1032 if (reportCompatibleFields != null) { |
| 1033 _json["reportCompatibleFields"] = (reportCompatibleFields).toJson(); |
| 1034 } |
| 1035 return _json; |
| 1036 } |
| 1037 } |
| 1038 |
| 1039 |
| 1040 /** |
| 1041 * Represents fields that are compatible to be selected for a report of type |
| 1042 * "CROSS_DIMENSION_REACH". |
| 1043 */ |
| 1044 class CrossDimensionReachReportCompatibleFields { |
| 1045 /** |
| 1046 * Dimensions which are compatible to be selected in the "breakdown" section |
| 1047 * of the report. |
| 1048 */ |
| 1049 core.List<Dimension> breakdown; |
| 1050 |
| 1051 /** |
| 1052 * Dimensions which are compatible to be selected in the "dimensionFilters" |
| 1053 * section of the report. |
| 1054 */ |
| 1055 core.List<Dimension> dimensionFilters; |
| 1056 |
| 1057 /** |
| 1058 * The kind of resource this is, in this case |
| 1059 * dfareporting#crossDimensionReachReportCompatibleFields. |
| 1060 */ |
| 1061 core.String kind; |
| 1062 |
| 1063 /** |
| 1064 * Metrics which are compatible to be selected in the "metricNames" section of |
| 1065 * the report. |
| 1066 */ |
| 1067 core.List<Metric> metrics; |
| 1068 |
| 1069 /** |
| 1070 * Metrics which are compatible to be selected in the "overlapMetricNames" |
| 1071 * section of the report. |
| 1072 */ |
| 1073 core.List<Metric> overlapMetrics; |
| 1074 |
| 1075 |
| 1076 CrossDimensionReachReportCompatibleFields(); |
| 1077 |
| 1078 CrossDimensionReachReportCompatibleFields.fromJson(core.Map _json) { |
| 1079 if (_json.containsKey("breakdown")) { |
| 1080 breakdown = _json["breakdown"].map((value) => new Dimension.fromJson(value
)).toList(); |
| 1081 } |
| 1082 if (_json.containsKey("dimensionFilters")) { |
| 1083 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension.
fromJson(value)).toList(); |
| 1084 } |
| 1085 if (_json.containsKey("kind")) { |
| 1086 kind = _json["kind"]; |
| 1087 } |
| 1088 if (_json.containsKey("metrics")) { |
| 1089 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); |
| 1090 } |
| 1091 if (_json.containsKey("overlapMetrics")) { |
| 1092 overlapMetrics = _json["overlapMetrics"].map((value) => new Metric.fromJso
n(value)).toList(); |
| 1093 } |
| 1094 } |
| 1095 |
| 1096 core.Map toJson() { |
| 1097 var _json = new core.Map(); |
| 1098 if (breakdown != null) { |
| 1099 _json["breakdown"] = breakdown.map((value) => (value).toJson()).toList(); |
| 1100 } |
| 1101 if (dimensionFilters != null) { |
| 1102 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); |
| 1103 } |
| 1104 if (kind != null) { |
| 1105 _json["kind"] = kind; |
| 1106 } |
| 1107 if (metrics != null) { |
| 1108 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); |
| 1109 } |
| 1110 if (overlapMetrics != null) { |
| 1111 _json["overlapMetrics"] = overlapMetrics.map((value) => (value).toJson()).
toList(); |
| 1112 } |
| 1113 return _json; |
| 1114 } |
| 1115 } |
| 1116 |
| 1117 |
| 1118 /** Represents a Custom Rich Media Events group. */ |
| 1119 class CustomRichMediaEvents { |
| 1120 /** |
| 1121 * List of custom rich media event IDs. Dimension values must be all of type |
| 1122 * dfa:richMediaEventTypeIdAndName. |
| 1123 */ |
| 1124 core.List<DimensionValue> filteredEventIds; |
| 1125 |
| 1126 /** |
| 1127 * The kind of resource this is, in this case |
| 1128 * dfareporting#customRichMediaEvents. |
| 1129 */ |
| 1130 core.String kind; |
| 1131 |
| 1132 |
| 1133 CustomRichMediaEvents(); |
| 1134 |
| 1135 CustomRichMediaEvents.fromJson(core.Map _json) { |
| 1136 if (_json.containsKey("filteredEventIds")) { |
| 1137 filteredEventIds = _json["filteredEventIds"].map((value) => new DimensionV
alue.fromJson(value)).toList(); |
| 1138 } |
| 1139 if (_json.containsKey("kind")) { |
| 1140 kind = _json["kind"]; |
| 1141 } |
| 1142 } |
| 1143 |
| 1144 core.Map toJson() { |
| 1145 var _json = new core.Map(); |
| 1146 if (filteredEventIds != null) { |
| 1147 _json["filteredEventIds"] = filteredEventIds.map((value) => (value).toJson
()).toList(); |
| 1148 } |
| 1149 if (kind != null) { |
| 1150 _json["kind"] = kind; |
| 1151 } |
| 1152 return _json; |
| 1153 } |
| 1154 } |
| 1155 |
| 1156 |
| 1157 /** Represents a date range. */ |
| 1158 class DateRange { |
| 1159 /** |
| 1160 * The end date of the date range, inclusive. A string of the format: |
| 1161 * "yyyy-MM-dd". |
| 1162 */ |
| 1163 core.DateTime endDate; |
| 1164 |
| 1165 /** The kind of resource this is, in this case dfareporting#dateRange. */ |
| 1166 core.String kind; |
| 1167 |
| 1168 /** |
| 1169 * The date range relative to the date of when the report is run, one of: |
| 1170 * - "TODAY" |
| 1171 * - "YESTERDAY" |
| 1172 * - "WEEK_TO_DATE" |
| 1173 * - "MONTH_TO_DATE" |
| 1174 * - "QUARTER_TO_DATE" |
| 1175 * - "YEAR_TO_DATE" |
| 1176 * - "PREVIOUS_WEEK" |
| 1177 * - "PREVIOUS_MONTH" |
| 1178 * - "PREVIOUS_QUARTER" |
| 1179 * - "PREVIOUS_YEAR" |
| 1180 * - "LAST_7_DAYS" |
| 1181 * - "LAST_30_DAYS" |
| 1182 * - "LAST_90_DAYS" |
| 1183 * - "LAST_365_DAYS" |
| 1184 * - "LAST_24_MONTHS" |
| 1185 */ |
| 1186 core.String relativeDateRange; |
| 1187 |
| 1188 /** |
| 1189 * The start date of the date range, inclusive. A string of the format: |
| 1190 * "yyyy-MM-dd". |
| 1191 */ |
| 1192 core.DateTime startDate; |
| 1193 |
| 1194 |
| 1195 DateRange(); |
| 1196 |
| 1197 DateRange.fromJson(core.Map _json) { |
| 1198 if (_json.containsKey("endDate")) { |
| 1199 endDate = core.DateTime.parse(_json["endDate"]); |
| 1200 } |
| 1201 if (_json.containsKey("kind")) { |
| 1202 kind = _json["kind"]; |
| 1203 } |
| 1204 if (_json.containsKey("relativeDateRange")) { |
| 1205 relativeDateRange = _json["relativeDateRange"]; |
| 1206 } |
| 1207 if (_json.containsKey("startDate")) { |
| 1208 startDate = core.DateTime.parse(_json["startDate"]); |
| 1209 } |
| 1210 } |
| 1211 |
| 1212 core.Map toJson() { |
| 1213 var _json = new core.Map(); |
| 1214 if (endDate != null) { |
| 1215 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; |
| 1216 } |
| 1217 if (kind != null) { |
| 1218 _json["kind"] = kind; |
| 1219 } |
| 1220 if (relativeDateRange != null) { |
| 1221 _json["relativeDateRange"] = relativeDateRange; |
| 1222 } |
| 1223 if (startDate != null) { |
| 1224 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; |
| 1225 } |
| 1226 return _json; |
| 1227 } |
| 1228 } |
| 1229 |
| 1230 |
| 1231 /** Represents a dimension. */ |
| 1232 class Dimension { |
| 1233 /** The kind of resource this is, in this case dfareporting#dimension. */ |
| 1234 core.String kind; |
| 1235 |
| 1236 /** The dimension name, e.g. dfa:advertiser */ |
| 1237 core.String name; |
| 1238 |
| 1239 |
| 1240 Dimension(); |
| 1241 |
| 1242 Dimension.fromJson(core.Map _json) { |
| 1243 if (_json.containsKey("kind")) { |
| 1244 kind = _json["kind"]; |
| 1245 } |
| 1246 if (_json.containsKey("name")) { |
| 1247 name = _json["name"]; |
| 1248 } |
| 1249 } |
| 1250 |
| 1251 core.Map toJson() { |
| 1252 var _json = new core.Map(); |
| 1253 if (kind != null) { |
| 1254 _json["kind"] = kind; |
| 1255 } |
| 1256 if (name != null) { |
| 1257 _json["name"] = name; |
| 1258 } |
| 1259 return _json; |
| 1260 } |
| 1261 } |
| 1262 |
| 1263 |
| 1264 /** Represents a dimension filter. */ |
| 1265 class DimensionFilter { |
| 1266 /** The name of the dimension to filter. */ |
| 1267 core.String dimensionName; |
| 1268 |
| 1269 /** |
| 1270 * The kind of resource this is, in this case dfareporting#dimensionFilter. |
| 1271 */ |
| 1272 core.String kind; |
| 1273 |
| 1274 /** The value of the dimension to filter. */ |
| 1275 core.String value; |
| 1276 |
| 1277 |
| 1278 DimensionFilter(); |
| 1279 |
| 1280 DimensionFilter.fromJson(core.Map _json) { |
| 1281 if (_json.containsKey("dimensionName")) { |
| 1282 dimensionName = _json["dimensionName"]; |
| 1283 } |
| 1284 if (_json.containsKey("kind")) { |
| 1285 kind = _json["kind"]; |
| 1286 } |
| 1287 if (_json.containsKey("value")) { |
| 1288 value = _json["value"]; |
| 1289 } |
| 1290 } |
| 1291 |
| 1292 core.Map toJson() { |
| 1293 var _json = new core.Map(); |
| 1294 if (dimensionName != null) { |
| 1295 _json["dimensionName"] = dimensionName; |
| 1296 } |
| 1297 if (kind != null) { |
| 1298 _json["kind"] = kind; |
| 1299 } |
| 1300 if (value != null) { |
| 1301 _json["value"] = value; |
| 1302 } |
| 1303 return _json; |
| 1304 } |
| 1305 } |
| 1306 |
| 1307 |
| 1308 /** Represents a DimensionValue resource. */ |
| 1309 class DimensionValue { |
| 1310 /** The name of the dimension. */ |
| 1311 core.String dimensionName; |
| 1312 |
| 1313 /** The eTag of this response for caching purposes. */ |
| 1314 core.String etag; |
| 1315 |
| 1316 /** The ID associated with the value if available. */ |
| 1317 core.String id; |
| 1318 |
| 1319 /** |
| 1320 * The kind of resource this is, in this case dfareporting#dimensionValue. |
| 1321 */ |
| 1322 core.String kind; |
| 1323 |
| 1324 /** |
| 1325 * Determines how the 'value' field is matched when filtering. One of: |
| 1326 * - EXACT (default if not specified) |
| 1327 * - CONTAINS |
| 1328 * - BEGINS_WITH |
| 1329 * - WILDCARD_EXPRESSION (allowing '*' as a placeholder for variable length |
| 1330 * character sequences, it can be escaped with a backslash.) Note, only paid |
| 1331 * search dimensions ('dfa:paidSearch*') allow a matchType other than EXACT. |
| 1332 */ |
| 1333 core.String matchType; |
| 1334 |
| 1335 /** The value of the dimension. */ |
| 1336 core.String value; |
| 1337 |
| 1338 |
| 1339 DimensionValue(); |
| 1340 |
| 1341 DimensionValue.fromJson(core.Map _json) { |
| 1342 if (_json.containsKey("dimensionName")) { |
| 1343 dimensionName = _json["dimensionName"]; |
| 1344 } |
| 1345 if (_json.containsKey("etag")) { |
| 1346 etag = _json["etag"]; |
| 1347 } |
| 1348 if (_json.containsKey("id")) { |
| 1349 id = _json["id"]; |
| 1350 } |
| 1351 if (_json.containsKey("kind")) { |
| 1352 kind = _json["kind"]; |
| 1353 } |
| 1354 if (_json.containsKey("matchType")) { |
| 1355 matchType = _json["matchType"]; |
| 1356 } |
| 1357 if (_json.containsKey("value")) { |
| 1358 value = _json["value"]; |
| 1359 } |
| 1360 } |
| 1361 |
| 1362 core.Map toJson() { |
| 1363 var _json = new core.Map(); |
| 1364 if (dimensionName != null) { |
| 1365 _json["dimensionName"] = dimensionName; |
| 1366 } |
| 1367 if (etag != null) { |
| 1368 _json["etag"] = etag; |
| 1369 } |
| 1370 if (id != null) { |
| 1371 _json["id"] = id; |
| 1372 } |
| 1373 if (kind != null) { |
| 1374 _json["kind"] = kind; |
| 1375 } |
| 1376 if (matchType != null) { |
| 1377 _json["matchType"] = matchType; |
| 1378 } |
| 1379 if (value != null) { |
| 1380 _json["value"] = value; |
| 1381 } |
| 1382 return _json; |
| 1383 } |
| 1384 } |
| 1385 |
| 1386 |
| 1387 /** Represents the list of DimensionValue resources. */ |
| 1388 class DimensionValueList { |
| 1389 /** The eTag of this response for caching purposes. */ |
| 1390 core.String etag; |
| 1391 |
| 1392 /** The dimension values returned in this response. */ |
| 1393 core.List<DimensionValue> items; |
| 1394 |
| 1395 /** |
| 1396 * The kind of list this is, in this case dfareporting#dimensionValueList. |
| 1397 */ |
| 1398 core.String kind; |
| 1399 |
| 1400 /** |
| 1401 * Continuation token used to page through dimension values. To retrieve the |
| 1402 * next page of results, set the next request's "pageToken" to the value of |
| 1403 * this field. The page token is only valid for a limited amount of time and |
| 1404 * should not be persisted. |
| 1405 */ |
| 1406 core.String nextPageToken; |
| 1407 |
| 1408 |
| 1409 DimensionValueList(); |
| 1410 |
| 1411 DimensionValueList.fromJson(core.Map _json) { |
| 1412 if (_json.containsKey("etag")) { |
| 1413 etag = _json["etag"]; |
| 1414 } |
| 1415 if (_json.containsKey("items")) { |
| 1416 items = _json["items"].map((value) => new DimensionValue.fromJson(value)).
toList(); |
| 1417 } |
| 1418 if (_json.containsKey("kind")) { |
| 1419 kind = _json["kind"]; |
| 1420 } |
| 1421 if (_json.containsKey("nextPageToken")) { |
| 1422 nextPageToken = _json["nextPageToken"]; |
| 1423 } |
| 1424 } |
| 1425 |
| 1426 core.Map toJson() { |
| 1427 var _json = new core.Map(); |
| 1428 if (etag != null) { |
| 1429 _json["etag"] = etag; |
| 1430 } |
| 1431 if (items != null) { |
| 1432 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1433 } |
| 1434 if (kind != null) { |
| 1435 _json["kind"] = kind; |
| 1436 } |
| 1437 if (nextPageToken != null) { |
| 1438 _json["nextPageToken"] = nextPageToken; |
| 1439 } |
| 1440 return _json; |
| 1441 } |
| 1442 } |
| 1443 |
| 1444 |
| 1445 /** Represents a DimensionValuesRequest. */ |
| 1446 class DimensionValueRequest { |
| 1447 /** The name of the dimension for which values should be requested. */ |
| 1448 core.String dimensionName; |
| 1449 |
| 1450 /** |
| 1451 * The end date of the date range for which to retrieve dimension values. A |
| 1452 * string of the format: "yyyy-MM-dd". |
| 1453 */ |
| 1454 core.DateTime endDate; |
| 1455 |
| 1456 /** The list of filters by which to filter values. The filters are ANDed. */ |
| 1457 core.List<DimensionFilter> filters; |
| 1458 |
| 1459 /** |
| 1460 * The kind of request this is, in this case |
| 1461 * dfareporting#dimensionValueRequest. |
| 1462 */ |
| 1463 core.String kind; |
| 1464 |
| 1465 /** |
| 1466 * The start date of the date range for which to retrieve dimension values. A |
| 1467 * string of the format: "yyyy-MM-dd". |
| 1468 */ |
| 1469 core.DateTime startDate; |
| 1470 |
| 1471 |
| 1472 DimensionValueRequest(); |
| 1473 |
| 1474 DimensionValueRequest.fromJson(core.Map _json) { |
| 1475 if (_json.containsKey("dimensionName")) { |
| 1476 dimensionName = _json["dimensionName"]; |
| 1477 } |
| 1478 if (_json.containsKey("endDate")) { |
| 1479 endDate = core.DateTime.parse(_json["endDate"]); |
| 1480 } |
| 1481 if (_json.containsKey("filters")) { |
| 1482 filters = _json["filters"].map((value) => new DimensionFilter.fromJson(val
ue)).toList(); |
| 1483 } |
| 1484 if (_json.containsKey("kind")) { |
| 1485 kind = _json["kind"]; |
| 1486 } |
| 1487 if (_json.containsKey("startDate")) { |
| 1488 startDate = core.DateTime.parse(_json["startDate"]); |
| 1489 } |
| 1490 } |
| 1491 |
| 1492 core.Map toJson() { |
| 1493 var _json = new core.Map(); |
| 1494 if (dimensionName != null) { |
| 1495 _json["dimensionName"] = dimensionName; |
| 1496 } |
| 1497 if (endDate != null) { |
| 1498 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat
e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')}
"; |
| 1499 } |
| 1500 if (filters != null) { |
| 1501 _json["filters"] = filters.map((value) => (value).toJson()).toList(); |
| 1502 } |
| 1503 if (kind != null) { |
| 1504 _json["kind"] = kind; |
| 1505 } |
| 1506 if (startDate != null) { |
| 1507 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; |
| 1508 } |
| 1509 return _json; |
| 1510 } |
| 1511 } |
| 1512 |
| 1513 |
| 1514 /** The urls where the completed report file can be downloaded. */ |
| 1515 class FileUrls { |
| 1516 /** The url for downloading the report data through the API. */ |
| 1517 core.String apiUrl; |
| 1518 |
| 1519 /** The url for downloading the report data through a browser. */ |
| 1520 core.String browserUrl; |
| 1521 |
| 1522 |
| 1523 FileUrls(); |
| 1524 |
| 1525 FileUrls.fromJson(core.Map _json) { |
| 1526 if (_json.containsKey("apiUrl")) { |
| 1527 apiUrl = _json["apiUrl"]; |
| 1528 } |
| 1529 if (_json.containsKey("browserUrl")) { |
| 1530 browserUrl = _json["browserUrl"]; |
| 1531 } |
| 1532 } |
| 1533 |
| 1534 core.Map toJson() { |
| 1535 var _json = new core.Map(); |
| 1536 if (apiUrl != null) { |
| 1537 _json["apiUrl"] = apiUrl; |
| 1538 } |
| 1539 if (browserUrl != null) { |
| 1540 _json["browserUrl"] = browserUrl; |
| 1541 } |
| 1542 return _json; |
| 1543 } |
| 1544 } |
| 1545 |
| 1546 |
| 1547 /** |
| 1548 * Represents a File resource. A File contains the meta-data for a report run. |
| 1549 * It shows the status of the run and holds the urls to the generated report |
| 1550 * data if the run is finished and the status is "REPORT_AVAILABLE". |
| 1551 */ |
| 1552 class File { |
| 1553 /** |
| 1554 * The date range for which the file has report data. The date range will |
| 1555 * always be the absolute date range for which the report is run. |
| 1556 */ |
| 1557 DateRange dateRange; |
| 1558 |
| 1559 /** The eTag of this response for caching purposes. */ |
| 1560 core.String etag; |
| 1561 |
| 1562 /** The file name of the file. */ |
| 1563 core.String fileName; |
| 1564 |
| 1565 /** |
| 1566 * The output format of the report. Only available once the file is available. |
| 1567 */ |
| 1568 core.String format; |
| 1569 |
| 1570 /** The unique ID of this report file. */ |
| 1571 core.String id; |
| 1572 |
| 1573 /** The kind of resource this is, in this case dfareporting#file. */ |
| 1574 core.String kind; |
| 1575 |
| 1576 /** |
| 1577 * The timestamp in milliseconds since epoch when this file was last modified. |
| 1578 */ |
| 1579 core.String lastModifiedTime; |
| 1580 |
| 1581 /** The ID of the report this file was generated from. */ |
| 1582 core.String reportId; |
| 1583 |
| 1584 /** |
| 1585 * The status of the report file, one of: |
| 1586 * - "PROCESSING" |
| 1587 * - "REPORT_AVAILABLE" |
| 1588 * - "FAILED" |
| 1589 * - "CANCELLED" |
| 1590 */ |
| 1591 core.String status; |
| 1592 |
| 1593 /** The urls where the completed report file can be downloaded. */ |
| 1594 FileUrls urls; |
| 1595 |
| 1596 |
| 1597 File(); |
| 1598 |
| 1599 File.fromJson(core.Map _json) { |
| 1600 if (_json.containsKey("dateRange")) { |
| 1601 dateRange = new DateRange.fromJson(_json["dateRange"]); |
| 1602 } |
| 1603 if (_json.containsKey("etag")) { |
| 1604 etag = _json["etag"]; |
| 1605 } |
| 1606 if (_json.containsKey("fileName")) { |
| 1607 fileName = _json["fileName"]; |
| 1608 } |
| 1609 if (_json.containsKey("format")) { |
| 1610 format = _json["format"]; |
| 1611 } |
| 1612 if (_json.containsKey("id")) { |
| 1613 id = _json["id"]; |
| 1614 } |
| 1615 if (_json.containsKey("kind")) { |
| 1616 kind = _json["kind"]; |
| 1617 } |
| 1618 if (_json.containsKey("lastModifiedTime")) { |
| 1619 lastModifiedTime = _json["lastModifiedTime"]; |
| 1620 } |
| 1621 if (_json.containsKey("reportId")) { |
| 1622 reportId = _json["reportId"]; |
| 1623 } |
| 1624 if (_json.containsKey("status")) { |
| 1625 status = _json["status"]; |
| 1626 } |
| 1627 if (_json.containsKey("urls")) { |
| 1628 urls = new FileUrls.fromJson(_json["urls"]); |
| 1629 } |
| 1630 } |
| 1631 |
| 1632 core.Map toJson() { |
| 1633 var _json = new core.Map(); |
| 1634 if (dateRange != null) { |
| 1635 _json["dateRange"] = (dateRange).toJson(); |
| 1636 } |
| 1637 if (etag != null) { |
| 1638 _json["etag"] = etag; |
| 1639 } |
| 1640 if (fileName != null) { |
| 1641 _json["fileName"] = fileName; |
| 1642 } |
| 1643 if (format != null) { |
| 1644 _json["format"] = format; |
| 1645 } |
| 1646 if (id != null) { |
| 1647 _json["id"] = id; |
| 1648 } |
| 1649 if (kind != null) { |
| 1650 _json["kind"] = kind; |
| 1651 } |
| 1652 if (lastModifiedTime != null) { |
| 1653 _json["lastModifiedTime"] = lastModifiedTime; |
| 1654 } |
| 1655 if (reportId != null) { |
| 1656 _json["reportId"] = reportId; |
| 1657 } |
| 1658 if (status != null) { |
| 1659 _json["status"] = status; |
| 1660 } |
| 1661 if (urls != null) { |
| 1662 _json["urls"] = (urls).toJson(); |
| 1663 } |
| 1664 return _json; |
| 1665 } |
| 1666 } |
| 1667 |
| 1668 |
| 1669 /** Represents the list of File resources. */ |
| 1670 class FileList { |
| 1671 /** The eTag of this response for caching purposes. */ |
| 1672 core.String etag; |
| 1673 |
| 1674 /** The files returned in this response. */ |
| 1675 core.List<File> items; |
| 1676 |
| 1677 /** The kind of list this is, in this case dfareporting#fileList. */ |
| 1678 core.String kind; |
| 1679 |
| 1680 /** |
| 1681 * Continuation token used to page through files. To retrieve the next page of |
| 1682 * results, set the next request's "pageToken" to the value of this field. The |
| 1683 * page token is only valid for a limited amount of time and should not be |
| 1684 * persisted. |
| 1685 */ |
| 1686 core.String nextPageToken; |
| 1687 |
| 1688 |
| 1689 FileList(); |
| 1690 |
| 1691 FileList.fromJson(core.Map _json) { |
| 1692 if (_json.containsKey("etag")) { |
| 1693 etag = _json["etag"]; |
| 1694 } |
| 1695 if (_json.containsKey("items")) { |
| 1696 items = _json["items"].map((value) => new File.fromJson(value)).toList(); |
| 1697 } |
| 1698 if (_json.containsKey("kind")) { |
| 1699 kind = _json["kind"]; |
| 1700 } |
| 1701 if (_json.containsKey("nextPageToken")) { |
| 1702 nextPageToken = _json["nextPageToken"]; |
| 1703 } |
| 1704 } |
| 1705 |
| 1706 core.Map toJson() { |
| 1707 var _json = new core.Map(); |
| 1708 if (etag != null) { |
| 1709 _json["etag"] = etag; |
| 1710 } |
| 1711 if (items != null) { |
| 1712 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1713 } |
| 1714 if (kind != null) { |
| 1715 _json["kind"] = kind; |
| 1716 } |
| 1717 if (nextPageToken != null) { |
| 1718 _json["nextPageToken"] = nextPageToken; |
| 1719 } |
| 1720 return _json; |
| 1721 } |
| 1722 } |
| 1723 |
| 1724 |
| 1725 /** |
| 1726 * Represents fields that are compatible to be selected for a report of type |
| 1727 * "FlOODLIGHT". |
| 1728 */ |
| 1729 class FloodlightReportCompatibleFields { |
| 1730 /** |
| 1731 * Dimensions which are compatible to be selected in the "dimensionFilters" |
| 1732 * section of the report. |
| 1733 */ |
| 1734 core.List<Dimension> dimensionFilters; |
| 1735 |
| 1736 /** |
| 1737 * Dimensions which are compatible to be selected in the "dimensions" section |
| 1738 * of the report. |
| 1739 */ |
| 1740 core.List<Dimension> dimensions; |
| 1741 |
| 1742 /** |
| 1743 * The kind of resource this is, in this case |
| 1744 * dfareporting#floodlightReportCompatibleFields. |
| 1745 */ |
| 1746 core.String kind; |
| 1747 |
| 1748 /** |
| 1749 * Metrics which are compatible to be selected in the "metricNames" section of |
| 1750 * the report. |
| 1751 */ |
| 1752 core.List<Metric> metrics; |
| 1753 |
| 1754 |
| 1755 FloodlightReportCompatibleFields(); |
| 1756 |
| 1757 FloodlightReportCompatibleFields.fromJson(core.Map _json) { |
| 1758 if (_json.containsKey("dimensionFilters")) { |
| 1759 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension.
fromJson(value)).toList(); |
| 1760 } |
| 1761 if (_json.containsKey("dimensions")) { |
| 1762 dimensions = _json["dimensions"].map((value) => new Dimension.fromJson(val
ue)).toList(); |
| 1763 } |
| 1764 if (_json.containsKey("kind")) { |
| 1765 kind = _json["kind"]; |
| 1766 } |
| 1767 if (_json.containsKey("metrics")) { |
| 1768 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); |
| 1769 } |
| 1770 } |
| 1771 |
| 1772 core.Map toJson() { |
| 1773 var _json = new core.Map(); |
| 1774 if (dimensionFilters != null) { |
| 1775 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); |
| 1776 } |
| 1777 if (dimensions != null) { |
| 1778 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; |
| 1779 } |
| 1780 if (kind != null) { |
| 1781 _json["kind"] = kind; |
| 1782 } |
| 1783 if (metrics != null) { |
| 1784 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); |
| 1785 } |
| 1786 return _json; |
| 1787 } |
| 1788 } |
| 1789 |
| 1790 |
| 1791 /** Represents a metric. */ |
| 1792 class Metric { |
| 1793 /** The kind of resource this is, in this case dfareporting#metric. */ |
| 1794 core.String kind; |
| 1795 |
| 1796 /** The metric name, e.g. dfa:impressions */ |
| 1797 core.String name; |
| 1798 |
| 1799 |
| 1800 Metric(); |
| 1801 |
| 1802 Metric.fromJson(core.Map _json) { |
| 1803 if (_json.containsKey("kind")) { |
| 1804 kind = _json["kind"]; |
| 1805 } |
| 1806 if (_json.containsKey("name")) { |
| 1807 name = _json["name"]; |
| 1808 } |
| 1809 } |
| 1810 |
| 1811 core.Map toJson() { |
| 1812 var _json = new core.Map(); |
| 1813 if (kind != null) { |
| 1814 _json["kind"] = kind; |
| 1815 } |
| 1816 if (name != null) { |
| 1817 _json["name"] = name; |
| 1818 } |
| 1819 return _json; |
| 1820 } |
| 1821 } |
| 1822 |
| 1823 |
| 1824 /** |
| 1825 * Represents fields that are compatible to be selected for a report of type |
| 1826 * "PATH_TO_CONVERSION". |
| 1827 */ |
| 1828 class PathToConversionReportCompatibleFields { |
| 1829 /** |
| 1830 * Conversion dimensions which are compatible to be selected in the |
| 1831 * "conversionDimensions" section of the report. |
| 1832 */ |
| 1833 core.List<Dimension> conversionDimensions; |
| 1834 |
| 1835 /** |
| 1836 * Custom floodlight variables which are compatible to be selected in the |
| 1837 * "customFloodlightVariables" section of the report. |
| 1838 */ |
| 1839 core.List<Dimension> customFloodlightVariables; |
| 1840 |
| 1841 /** |
| 1842 * The kind of resource this is, in this case |
| 1843 * dfareporting#pathToConversionReportCompatibleFields. |
| 1844 */ |
| 1845 core.String kind; |
| 1846 |
| 1847 /** |
| 1848 * Metrics which are compatible to be selected in the "metricNames" section of |
| 1849 * the report. |
| 1850 */ |
| 1851 core.List<Metric> metrics; |
| 1852 |
| 1853 /** |
| 1854 * Per-interaction dimensions which are compatible to be selected in the |
| 1855 * "perInteractionDimensions" section of the report. |
| 1856 */ |
| 1857 core.List<Dimension> perInteractionDimensions; |
| 1858 |
| 1859 |
| 1860 PathToConversionReportCompatibleFields(); |
| 1861 |
| 1862 PathToConversionReportCompatibleFields.fromJson(core.Map _json) { |
| 1863 if (_json.containsKey("conversionDimensions")) { |
| 1864 conversionDimensions = _json["conversionDimensions"].map((value) => new Di
mension.fromJson(value)).toList(); |
| 1865 } |
| 1866 if (_json.containsKey("customFloodlightVariables")) { |
| 1867 customFloodlightVariables = _json["customFloodlightVariables"].map((value)
=> new Dimension.fromJson(value)).toList(); |
| 1868 } |
| 1869 if (_json.containsKey("kind")) { |
| 1870 kind = _json["kind"]; |
| 1871 } |
| 1872 if (_json.containsKey("metrics")) { |
| 1873 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); |
| 1874 } |
| 1875 if (_json.containsKey("perInteractionDimensions")) { |
| 1876 perInteractionDimensions = _json["perInteractionDimensions"].map((value) =
> new Dimension.fromJson(value)).toList(); |
| 1877 } |
| 1878 } |
| 1879 |
| 1880 core.Map toJson() { |
| 1881 var _json = new core.Map(); |
| 1882 if (conversionDimensions != null) { |
| 1883 _json["conversionDimensions"] = conversionDimensions.map((value) => (value
).toJson()).toList(); |
| 1884 } |
| 1885 if (customFloodlightVariables != null) { |
| 1886 _json["customFloodlightVariables"] = customFloodlightVariables.map((value)
=> (value).toJson()).toList(); |
| 1887 } |
| 1888 if (kind != null) { |
| 1889 _json["kind"] = kind; |
| 1890 } |
| 1891 if (metrics != null) { |
| 1892 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); |
| 1893 } |
| 1894 if (perInteractionDimensions != null) { |
| 1895 _json["perInteractionDimensions"] = perInteractionDimensions.map((value) =
> (value).toJson()).toList(); |
| 1896 } |
| 1897 return _json; |
| 1898 } |
| 1899 } |
| 1900 |
| 1901 |
| 1902 /** |
| 1903 * Represents fields that are compatible to be selected for a report of type |
| 1904 * "REACH". |
| 1905 */ |
| 1906 class ReachReportCompatibleFields { |
| 1907 /** |
| 1908 * Dimensions which are compatible to be selected in the "dimensionFilters" |
| 1909 * section of the report. |
| 1910 */ |
| 1911 core.List<Dimension> dimensionFilters; |
| 1912 |
| 1913 /** |
| 1914 * Dimensions which are compatible to be selected in the "dimensions" section |
| 1915 * of the report. |
| 1916 */ |
| 1917 core.List<Dimension> dimensions; |
| 1918 |
| 1919 /** |
| 1920 * The kind of resource this is, in this case |
| 1921 * dfareporting#reachReportCompatibleFields. |
| 1922 */ |
| 1923 core.String kind; |
| 1924 |
| 1925 /** |
| 1926 * Metrics which are compatible to be selected in the "metricNames" section of |
| 1927 * the report. |
| 1928 */ |
| 1929 core.List<Metric> metrics; |
| 1930 |
| 1931 /** |
| 1932 * Metrics which are compatible to be selected as activity metrics to pivot on |
| 1933 * in the "activities" section of the report. |
| 1934 */ |
| 1935 core.List<Metric> pivotedActivityMetrics; |
| 1936 |
| 1937 /** |
| 1938 * Metrics which are compatible to be selected in the |
| 1939 * "reachByFrequencyMetricNames" section of the report. |
| 1940 */ |
| 1941 core.List<Metric> reachByFrequencyMetrics; |
| 1942 |
| 1943 |
| 1944 ReachReportCompatibleFields(); |
| 1945 |
| 1946 ReachReportCompatibleFields.fromJson(core.Map _json) { |
| 1947 if (_json.containsKey("dimensionFilters")) { |
| 1948 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension.
fromJson(value)).toList(); |
| 1949 } |
| 1950 if (_json.containsKey("dimensions")) { |
| 1951 dimensions = _json["dimensions"].map((value) => new Dimension.fromJson(val
ue)).toList(); |
| 1952 } |
| 1953 if (_json.containsKey("kind")) { |
| 1954 kind = _json["kind"]; |
| 1955 } |
| 1956 if (_json.containsKey("metrics")) { |
| 1957 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); |
| 1958 } |
| 1959 if (_json.containsKey("pivotedActivityMetrics")) { |
| 1960 pivotedActivityMetrics = _json["pivotedActivityMetrics"].map((value) => ne
w Metric.fromJson(value)).toList(); |
| 1961 } |
| 1962 if (_json.containsKey("reachByFrequencyMetrics")) { |
| 1963 reachByFrequencyMetrics = _json["reachByFrequencyMetrics"].map((value) =>
new Metric.fromJson(value)).toList(); |
| 1964 } |
| 1965 } |
| 1966 |
| 1967 core.Map toJson() { |
| 1968 var _json = new core.Map(); |
| 1969 if (dimensionFilters != null) { |
| 1970 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); |
| 1971 } |
| 1972 if (dimensions != null) { |
| 1973 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; |
| 1974 } |
| 1975 if (kind != null) { |
| 1976 _json["kind"] = kind; |
| 1977 } |
| 1978 if (metrics != null) { |
| 1979 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); |
| 1980 } |
| 1981 if (pivotedActivityMetrics != null) { |
| 1982 _json["pivotedActivityMetrics"] = pivotedActivityMetrics.map((value) => (v
alue).toJson()).toList(); |
| 1983 } |
| 1984 if (reachByFrequencyMetrics != null) { |
| 1985 _json["reachByFrequencyMetrics"] = reachByFrequencyMetrics.map((value) =>
(value).toJson()).toList(); |
| 1986 } |
| 1987 return _json; |
| 1988 } |
| 1989 } |
| 1990 |
| 1991 |
| 1992 /** Represents a recipient. */ |
| 1993 class Recipient { |
| 1994 /** |
| 1995 * The delivery type for the recipient, one of: |
| 1996 * - "ATTACHMENT" |
| 1997 * - "LINK" |
| 1998 */ |
| 1999 core.String deliveryType; |
| 2000 |
| 2001 /** The email address of the recipient. */ |
| 2002 core.String email; |
| 2003 |
| 2004 /** The kind of resource this is, in this case dfareporting#recipient. */ |
| 2005 core.String kind; |
| 2006 |
| 2007 |
| 2008 Recipient(); |
| 2009 |
| 2010 Recipient.fromJson(core.Map _json) { |
| 2011 if (_json.containsKey("deliveryType")) { |
| 2012 deliveryType = _json["deliveryType"]; |
| 2013 } |
| 2014 if (_json.containsKey("email")) { |
| 2015 email = _json["email"]; |
| 2016 } |
| 2017 if (_json.containsKey("kind")) { |
| 2018 kind = _json["kind"]; |
| 2019 } |
| 2020 } |
| 2021 |
| 2022 core.Map toJson() { |
| 2023 var _json = new core.Map(); |
| 2024 if (deliveryType != null) { |
| 2025 _json["deliveryType"] = deliveryType; |
| 2026 } |
| 2027 if (email != null) { |
| 2028 _json["email"] = email; |
| 2029 } |
| 2030 if (kind != null) { |
| 2031 _json["kind"] = kind; |
| 2032 } |
| 2033 return _json; |
| 2034 } |
| 2035 } |
| 2036 |
| 2037 |
| 2038 /** The report criteria for a report of type "ACTIVE_GRP". */ |
| 2039 class ReportActiveGrpCriteria { |
| 2040 /** The date range this report should be run for. */ |
| 2041 DateRange dateRange; |
| 2042 |
| 2043 /** |
| 2044 * The list of filters on which dimensions are filtered. |
| 2045 * Filters for different dimensions are ANDed, filters for the same dimension |
| 2046 * are grouped together and ORed. |
| 2047 * A valid active GRP report needs to have exactly one DimensionValue for the |
| 2048 * United States in addition to any advertiser or campaign dimension values. |
| 2049 */ |
| 2050 core.List<DimensionValue> dimensionFilters; |
| 2051 |
| 2052 /** The list of dimensions the report should include. */ |
| 2053 core.List<SortedDimension> dimensions; |
| 2054 |
| 2055 /** The list of names of metrics the report should include. */ |
| 2056 core.List<core.String> metricNames; |
| 2057 |
| 2058 |
| 2059 ReportActiveGrpCriteria(); |
| 2060 |
| 2061 ReportActiveGrpCriteria.fromJson(core.Map _json) { |
| 2062 if (_json.containsKey("dateRange")) { |
| 2063 dateRange = new DateRange.fromJson(_json["dateRange"]); |
| 2064 } |
| 2065 if (_json.containsKey("dimensionFilters")) { |
| 2066 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV
alue.fromJson(value)).toList(); |
| 2067 } |
| 2068 if (_json.containsKey("dimensions")) { |
| 2069 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs
on(value)).toList(); |
| 2070 } |
| 2071 if (_json.containsKey("metricNames")) { |
| 2072 metricNames = _json["metricNames"]; |
| 2073 } |
| 2074 } |
| 2075 |
| 2076 core.Map toJson() { |
| 2077 var _json = new core.Map(); |
| 2078 if (dateRange != null) { |
| 2079 _json["dateRange"] = (dateRange).toJson(); |
| 2080 } |
| 2081 if (dimensionFilters != null) { |
| 2082 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); |
| 2083 } |
| 2084 if (dimensions != null) { |
| 2085 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; |
| 2086 } |
| 2087 if (metricNames != null) { |
| 2088 _json["metricNames"] = metricNames; |
| 2089 } |
| 2090 return _json; |
| 2091 } |
| 2092 } |
| 2093 |
| 2094 |
| 2095 /** The report criteria for a report of type "STANDARD". */ |
| 2096 class ReportCriteria { |
| 2097 /** Activity group. */ |
| 2098 Activities activities; |
| 2099 |
| 2100 /** Custom Rich Media Events group. */ |
| 2101 CustomRichMediaEvents customRichMediaEvents; |
| 2102 |
| 2103 /** The date range for which this report should be run. */ |
| 2104 DateRange dateRange; |
| 2105 |
| 2106 /** |
| 2107 * The list of filters on which dimensions are filtered. |
| 2108 * Filters for different dimensions are ANDed, filters for the same dimension |
| 2109 * are grouped together and ORed. |
| 2110 */ |
| 2111 core.List<DimensionValue> dimensionFilters; |
| 2112 |
| 2113 /** The list of standard dimensions the report should include. */ |
| 2114 core.List<SortedDimension> dimensions; |
| 2115 |
| 2116 /** The list of names of metrics the report should include. */ |
| 2117 core.List<core.String> metricNames; |
| 2118 |
| 2119 |
| 2120 ReportCriteria(); |
| 2121 |
| 2122 ReportCriteria.fromJson(core.Map _json) { |
| 2123 if (_json.containsKey("activities")) { |
| 2124 activities = new Activities.fromJson(_json["activities"]); |
| 2125 } |
| 2126 if (_json.containsKey("customRichMediaEvents")) { |
| 2127 customRichMediaEvents = new CustomRichMediaEvents.fromJson(_json["customRi
chMediaEvents"]); |
| 2128 } |
| 2129 if (_json.containsKey("dateRange")) { |
| 2130 dateRange = new DateRange.fromJson(_json["dateRange"]); |
| 2131 } |
| 2132 if (_json.containsKey("dimensionFilters")) { |
| 2133 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV
alue.fromJson(value)).toList(); |
| 2134 } |
| 2135 if (_json.containsKey("dimensions")) { |
| 2136 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs
on(value)).toList(); |
| 2137 } |
| 2138 if (_json.containsKey("metricNames")) { |
| 2139 metricNames = _json["metricNames"]; |
| 2140 } |
| 2141 } |
| 2142 |
| 2143 core.Map toJson() { |
| 2144 var _json = new core.Map(); |
| 2145 if (activities != null) { |
| 2146 _json["activities"] = (activities).toJson(); |
| 2147 } |
| 2148 if (customRichMediaEvents != null) { |
| 2149 _json["customRichMediaEvents"] = (customRichMediaEvents).toJson(); |
| 2150 } |
| 2151 if (dateRange != null) { |
| 2152 _json["dateRange"] = (dateRange).toJson(); |
| 2153 } |
| 2154 if (dimensionFilters != null) { |
| 2155 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); |
| 2156 } |
| 2157 if (dimensions != null) { |
| 2158 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; |
| 2159 } |
| 2160 if (metricNames != null) { |
| 2161 _json["metricNames"] = metricNames; |
| 2162 } |
| 2163 return _json; |
| 2164 } |
| 2165 } |
| 2166 |
| 2167 |
| 2168 /** The report criteria for a report of type "CROSS_DIMENSION_REACH". */ |
| 2169 class ReportCrossDimensionReachCriteria { |
| 2170 /** The list of dimensions the report should include. */ |
| 2171 core.List<SortedDimension> breakdown; |
| 2172 |
| 2173 /** The date range this report should be run for. */ |
| 2174 DateRange dateRange; |
| 2175 |
| 2176 /** |
| 2177 * The dimension option, one of: |
| 2178 * - "ADVERTISER" |
| 2179 * - "CAMPAIGN" |
| 2180 * - "SITE_BY_ADVERTISER" |
| 2181 * - "SITE_BY_CAMPAIGN" |
| 2182 */ |
| 2183 core.String dimension; |
| 2184 |
| 2185 /** The list of filters on which dimensions are filtered. */ |
| 2186 core.List<DimensionValue> dimensionFilters; |
| 2187 |
| 2188 /** The list of names of metrics the report should include. */ |
| 2189 core.List<core.String> metricNames; |
| 2190 |
| 2191 /** The list of names of overlap metrics the report should include. */ |
| 2192 core.List<core.String> overlapMetricNames; |
| 2193 |
| 2194 /** Whether the report is pivoted or not. Defaults to true. */ |
| 2195 core.bool pivoted; |
| 2196 |
| 2197 |
| 2198 ReportCrossDimensionReachCriteria(); |
| 2199 |
| 2200 ReportCrossDimensionReachCriteria.fromJson(core.Map _json) { |
| 2201 if (_json.containsKey("breakdown")) { |
| 2202 breakdown = _json["breakdown"].map((value) => new SortedDimension.fromJson
(value)).toList(); |
| 2203 } |
| 2204 if (_json.containsKey("dateRange")) { |
| 2205 dateRange = new DateRange.fromJson(_json["dateRange"]); |
| 2206 } |
| 2207 if (_json.containsKey("dimension")) { |
| 2208 dimension = _json["dimension"]; |
| 2209 } |
| 2210 if (_json.containsKey("dimensionFilters")) { |
| 2211 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV
alue.fromJson(value)).toList(); |
| 2212 } |
| 2213 if (_json.containsKey("metricNames")) { |
| 2214 metricNames = _json["metricNames"]; |
| 2215 } |
| 2216 if (_json.containsKey("overlapMetricNames")) { |
| 2217 overlapMetricNames = _json["overlapMetricNames"]; |
| 2218 } |
| 2219 if (_json.containsKey("pivoted")) { |
| 2220 pivoted = _json["pivoted"]; |
| 2221 } |
| 2222 } |
| 2223 |
| 2224 core.Map toJson() { |
| 2225 var _json = new core.Map(); |
| 2226 if (breakdown != null) { |
| 2227 _json["breakdown"] = breakdown.map((value) => (value).toJson()).toList(); |
| 2228 } |
| 2229 if (dateRange != null) { |
| 2230 _json["dateRange"] = (dateRange).toJson(); |
| 2231 } |
| 2232 if (dimension != null) { |
| 2233 _json["dimension"] = dimension; |
| 2234 } |
| 2235 if (dimensionFilters != null) { |
| 2236 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); |
| 2237 } |
| 2238 if (metricNames != null) { |
| 2239 _json["metricNames"] = metricNames; |
| 2240 } |
| 2241 if (overlapMetricNames != null) { |
| 2242 _json["overlapMetricNames"] = overlapMetricNames; |
| 2243 } |
| 2244 if (pivoted != null) { |
| 2245 _json["pivoted"] = pivoted; |
| 2246 } |
| 2247 return _json; |
| 2248 } |
| 2249 } |
| 2250 |
| 2251 |
| 2252 /** The report's email delivery settings. */ |
| 2253 class ReportDelivery { |
| 2254 /** Whether the report should be emailed to the report owner. */ |
| 2255 core.bool emailOwner; |
| 2256 |
| 2257 /** |
| 2258 * The type of delivery for the owner to receive, if enabled. One of: |
| 2259 * - "ATTACHMENT" |
| 2260 * - "LINK" |
| 2261 */ |
| 2262 core.String emailOwnerDeliveryType; |
| 2263 |
| 2264 /** The message to be sent with each email. */ |
| 2265 core.String message; |
| 2266 |
| 2267 /** The list of recipients to which to email the report. */ |
| 2268 core.List<Recipient> recipients; |
| 2269 |
| 2270 |
| 2271 ReportDelivery(); |
| 2272 |
| 2273 ReportDelivery.fromJson(core.Map _json) { |
| 2274 if (_json.containsKey("emailOwner")) { |
| 2275 emailOwner = _json["emailOwner"]; |
| 2276 } |
| 2277 if (_json.containsKey("emailOwnerDeliveryType")) { |
| 2278 emailOwnerDeliveryType = _json["emailOwnerDeliveryType"]; |
| 2279 } |
| 2280 if (_json.containsKey("message")) { |
| 2281 message = _json["message"]; |
| 2282 } |
| 2283 if (_json.containsKey("recipients")) { |
| 2284 recipients = _json["recipients"].map((value) => new Recipient.fromJson(val
ue)).toList(); |
| 2285 } |
| 2286 } |
| 2287 |
| 2288 core.Map toJson() { |
| 2289 var _json = new core.Map(); |
| 2290 if (emailOwner != null) { |
| 2291 _json["emailOwner"] = emailOwner; |
| 2292 } |
| 2293 if (emailOwnerDeliveryType != null) { |
| 2294 _json["emailOwnerDeliveryType"] = emailOwnerDeliveryType; |
| 2295 } |
| 2296 if (message != null) { |
| 2297 _json["message"] = message; |
| 2298 } |
| 2299 if (recipients != null) { |
| 2300 _json["recipients"] = recipients.map((value) => (value).toJson()).toList()
; |
| 2301 } |
| 2302 return _json; |
| 2303 } |
| 2304 } |
| 2305 |
| 2306 |
| 2307 /** The properties of the report. */ |
| 2308 class ReportFloodlightCriteriaReportProperties { |
| 2309 /** Include conversions that have no cookie, but do have an exposure path. */ |
| 2310 core.bool includeAttributedIPConversions; |
| 2311 |
| 2312 /** |
| 2313 * Include conversions of users with a DoubleClick cookie but without an |
| 2314 * exposure. That means the user did not click or see an ad from the |
| 2315 * advertiser within the Floodlight group, or that the interaction happened |
| 2316 * outside the lookback window. |
| 2317 */ |
| 2318 core.bool includeUnattributedCookieConversions; |
| 2319 |
| 2320 /** |
| 2321 * Include conversions that have no associated cookies and no exposures. It’s |
| 2322 * therefore impossible to know how the user was exposed to your ads during |
| 2323 * the lookback window prior to a conversion. |
| 2324 */ |
| 2325 core.bool includeUnattributedIPConversions; |
| 2326 |
| 2327 |
| 2328 ReportFloodlightCriteriaReportProperties(); |
| 2329 |
| 2330 ReportFloodlightCriteriaReportProperties.fromJson(core.Map _json) { |
| 2331 if (_json.containsKey("includeAttributedIPConversions")) { |
| 2332 includeAttributedIPConversions = _json["includeAttributedIPConversions"]; |
| 2333 } |
| 2334 if (_json.containsKey("includeUnattributedCookieConversions")) { |
| 2335 includeUnattributedCookieConversions = _json["includeUnattributedCookieCon
versions"]; |
| 2336 } |
| 2337 if (_json.containsKey("includeUnattributedIPConversions")) { |
| 2338 includeUnattributedIPConversions = _json["includeUnattributedIPConversions
"]; |
| 2339 } |
| 2340 } |
| 2341 |
| 2342 core.Map toJson() { |
| 2343 var _json = new core.Map(); |
| 2344 if (includeAttributedIPConversions != null) { |
| 2345 _json["includeAttributedIPConversions"] = includeAttributedIPConversions; |
| 2346 } |
| 2347 if (includeUnattributedCookieConversions != null) { |
| 2348 _json["includeUnattributedCookieConversions"] = includeUnattributedCookieC
onversions; |
| 2349 } |
| 2350 if (includeUnattributedIPConversions != null) { |
| 2351 _json["includeUnattributedIPConversions"] = includeUnattributedIPConversio
ns; |
| 2352 } |
| 2353 return _json; |
| 2354 } |
| 2355 } |
| 2356 |
| 2357 |
| 2358 /** The report criteria for a report of type "FLOODLIGHT". */ |
| 2359 class ReportFloodlightCriteria { |
| 2360 /** The list of custom rich media events to include. */ |
| 2361 core.List<DimensionValue> customRichMediaEvents; |
| 2362 |
| 2363 /** The date range this report should be run for. */ |
| 2364 DateRange dateRange; |
| 2365 |
| 2366 /** |
| 2367 * The list of filters on which dimensions are filtered. |
| 2368 * Filters for different dimensions are ANDed, filters for the same dimension |
| 2369 * are grouped together and ORed. |
| 2370 */ |
| 2371 core.List<DimensionValue> dimensionFilters; |
| 2372 |
| 2373 /** The list of dimensions the report should include. */ |
| 2374 core.List<SortedDimension> dimensions; |
| 2375 |
| 2376 /** |
| 2377 * The floodlight ID for which to show data in this report. All advertisers |
| 2378 * associated with that ID will automatically be added. The dimension of the |
| 2379 * value needs to be 'dfa:floodlightConfigId'. |
| 2380 */ |
| 2381 DimensionValue floodlightConfigId; |
| 2382 |
| 2383 /** The list of names of metrics the report should include. */ |
| 2384 core.List<core.String> metricNames; |
| 2385 |
| 2386 /** The properties of the report. */ |
| 2387 ReportFloodlightCriteriaReportProperties reportProperties; |
| 2388 |
| 2389 |
| 2390 ReportFloodlightCriteria(); |
| 2391 |
| 2392 ReportFloodlightCriteria.fromJson(core.Map _json) { |
| 2393 if (_json.containsKey("customRichMediaEvents")) { |
| 2394 customRichMediaEvents = _json["customRichMediaEvents"].map((value) => new
DimensionValue.fromJson(value)).toList(); |
| 2395 } |
| 2396 if (_json.containsKey("dateRange")) { |
| 2397 dateRange = new DateRange.fromJson(_json["dateRange"]); |
| 2398 } |
| 2399 if (_json.containsKey("dimensionFilters")) { |
| 2400 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV
alue.fromJson(value)).toList(); |
| 2401 } |
| 2402 if (_json.containsKey("dimensions")) { |
| 2403 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs
on(value)).toList(); |
| 2404 } |
| 2405 if (_json.containsKey("floodlightConfigId")) { |
| 2406 floodlightConfigId = new DimensionValue.fromJson(_json["floodlightConfigId
"]); |
| 2407 } |
| 2408 if (_json.containsKey("metricNames")) { |
| 2409 metricNames = _json["metricNames"]; |
| 2410 } |
| 2411 if (_json.containsKey("reportProperties")) { |
| 2412 reportProperties = new ReportFloodlightCriteriaReportProperties.fromJson(_
json["reportProperties"]); |
| 2413 } |
| 2414 } |
| 2415 |
| 2416 core.Map toJson() { |
| 2417 var _json = new core.Map(); |
| 2418 if (customRichMediaEvents != null) { |
| 2419 _json["customRichMediaEvents"] = customRichMediaEvents.map((value) => (val
ue).toJson()).toList(); |
| 2420 } |
| 2421 if (dateRange != null) { |
| 2422 _json["dateRange"] = (dateRange).toJson(); |
| 2423 } |
| 2424 if (dimensionFilters != null) { |
| 2425 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); |
| 2426 } |
| 2427 if (dimensions != null) { |
| 2428 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; |
| 2429 } |
| 2430 if (floodlightConfigId != null) { |
| 2431 _json["floodlightConfigId"] = (floodlightConfigId).toJson(); |
| 2432 } |
| 2433 if (metricNames != null) { |
| 2434 _json["metricNames"] = metricNames; |
| 2435 } |
| 2436 if (reportProperties != null) { |
| 2437 _json["reportProperties"] = (reportProperties).toJson(); |
| 2438 } |
| 2439 return _json; |
| 2440 } |
| 2441 } |
| 2442 |
| 2443 |
| 2444 /** The properties of the report. */ |
| 2445 class ReportPathToConversionCriteriaReportProperties { |
| 2446 /** |
| 2447 * DFA checks to see if a click interaction occurred within the specified |
| 2448 * period of time before a conversion. By default the value is pulled from |
| 2449 * Floodlight or you can manually enter a custom value. Valid values: 1-90. |
| 2450 */ |
| 2451 core.int clicksLookbackWindow; |
| 2452 |
| 2453 /** |
| 2454 * DFA checks to see if an impression interaction occurred within the |
| 2455 * specified period of time before a conversion. By default the value is |
| 2456 * pulled from Floodlight or you can manually enter a custom value. Valid |
| 2457 * values: 1-90. |
| 2458 */ |
| 2459 core.int impressionsLookbackWindow; |
| 2460 |
| 2461 /** Deprecated: has no effect. */ |
| 2462 core.bool includeAttributedIPConversions; |
| 2463 |
| 2464 /** |
| 2465 * Include conversions of users with a DoubleClick cookie but without an |
| 2466 * exposure. That means the user did not click or see an ad from the |
| 2467 * advertiser within the Floodlight group, or that the interaction happened |
| 2468 * outside the lookback window. |
| 2469 */ |
| 2470 core.bool includeUnattributedCookieConversions; |
| 2471 |
| 2472 /** |
| 2473 * Include conversions that have no associated cookies and no exposures. It’s |
| 2474 * therefore impossible to know how the user was exposed to your ads during |
| 2475 * the lookback window prior to a conversion. |
| 2476 */ |
| 2477 core.bool includeUnattributedIPConversions; |
| 2478 |
| 2479 /** |
| 2480 * The maximum number of click interactions to include in the report. |
| 2481 * Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 |
| 2482 * impressions). If another advertiser in your network is paying for E2C, you |
| 2483 * can have up to 5 total exposures per report. |
| 2484 */ |
| 2485 core.int maximumClickInteractions; |
| 2486 |
| 2487 /** |
| 2488 * The maximum number of click interactions to include in the report. |
| 2489 * Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100 |
| 2490 * impressions). If another advertiser in your network is paying for E2C, you |
| 2491 * can have up to 5 total exposures per report. |
| 2492 */ |
| 2493 core.int maximumImpressionInteractions; |
| 2494 |
| 2495 /** |
| 2496 * The maximum amount of time that can take place between interactions (clicks |
| 2497 * or impressions) by the same user. Valid values: 1-90. |
| 2498 */ |
| 2499 core.int maximumInteractionGap; |
| 2500 |
| 2501 /** Enable pivoting on interaction path. */ |
| 2502 core.bool pivotOnInteractionPath; |
| 2503 |
| 2504 |
| 2505 ReportPathToConversionCriteriaReportProperties(); |
| 2506 |
| 2507 ReportPathToConversionCriteriaReportProperties.fromJson(core.Map _json) { |
| 2508 if (_json.containsKey("clicksLookbackWindow")) { |
| 2509 clicksLookbackWindow = _json["clicksLookbackWindow"]; |
| 2510 } |
| 2511 if (_json.containsKey("impressionsLookbackWindow")) { |
| 2512 impressionsLookbackWindow = _json["impressionsLookbackWindow"]; |
| 2513 } |
| 2514 if (_json.containsKey("includeAttributedIPConversions")) { |
| 2515 includeAttributedIPConversions = _json["includeAttributedIPConversions"]; |
| 2516 } |
| 2517 if (_json.containsKey("includeUnattributedCookieConversions")) { |
| 2518 includeUnattributedCookieConversions = _json["includeUnattributedCookieCon
versions"]; |
| 2519 } |
| 2520 if (_json.containsKey("includeUnattributedIPConversions")) { |
| 2521 includeUnattributedIPConversions = _json["includeUnattributedIPConversions
"]; |
| 2522 } |
| 2523 if (_json.containsKey("maximumClickInteractions")) { |
| 2524 maximumClickInteractions = _json["maximumClickInteractions"]; |
| 2525 } |
| 2526 if (_json.containsKey("maximumImpressionInteractions")) { |
| 2527 maximumImpressionInteractions = _json["maximumImpressionInteractions"]; |
| 2528 } |
| 2529 if (_json.containsKey("maximumInteractionGap")) { |
| 2530 maximumInteractionGap = _json["maximumInteractionGap"]; |
| 2531 } |
| 2532 if (_json.containsKey("pivotOnInteractionPath")) { |
| 2533 pivotOnInteractionPath = _json["pivotOnInteractionPath"]; |
| 2534 } |
| 2535 } |
| 2536 |
| 2537 core.Map toJson() { |
| 2538 var _json = new core.Map(); |
| 2539 if (clicksLookbackWindow != null) { |
| 2540 _json["clicksLookbackWindow"] = clicksLookbackWindow; |
| 2541 } |
| 2542 if (impressionsLookbackWindow != null) { |
| 2543 _json["impressionsLookbackWindow"] = impressionsLookbackWindow; |
| 2544 } |
| 2545 if (includeAttributedIPConversions != null) { |
| 2546 _json["includeAttributedIPConversions"] = includeAttributedIPConversions; |
| 2547 } |
| 2548 if (includeUnattributedCookieConversions != null) { |
| 2549 _json["includeUnattributedCookieConversions"] = includeUnattributedCookieC
onversions; |
| 2550 } |
| 2551 if (includeUnattributedIPConversions != null) { |
| 2552 _json["includeUnattributedIPConversions"] = includeUnattributedIPConversio
ns; |
| 2553 } |
| 2554 if (maximumClickInteractions != null) { |
| 2555 _json["maximumClickInteractions"] = maximumClickInteractions; |
| 2556 } |
| 2557 if (maximumImpressionInteractions != null) { |
| 2558 _json["maximumImpressionInteractions"] = maximumImpressionInteractions; |
| 2559 } |
| 2560 if (maximumInteractionGap != null) { |
| 2561 _json["maximumInteractionGap"] = maximumInteractionGap; |
| 2562 } |
| 2563 if (pivotOnInteractionPath != null) { |
| 2564 _json["pivotOnInteractionPath"] = pivotOnInteractionPath; |
| 2565 } |
| 2566 return _json; |
| 2567 } |
| 2568 } |
| 2569 |
| 2570 |
| 2571 /** The report criteria for a report of type "PATH_TO_CONVERSION". */ |
| 2572 class ReportPathToConversionCriteria { |
| 2573 /** The list of 'dfa:activity' values to filter on. */ |
| 2574 core.List<DimensionValue> activityFilters; |
| 2575 |
| 2576 /** The list of conversion dimensions the report should include. */ |
| 2577 core.List<SortedDimension> conversionDimensions; |
| 2578 |
| 2579 /** The list of custom floodlight variables the report should include. */ |
| 2580 core.List<SortedDimension> customFloodlightVariables; |
| 2581 |
| 2582 /** The list of custom rich media events to include. */ |
| 2583 core.List<DimensionValue> customRichMediaEvents; |
| 2584 |
| 2585 /** The date range this report should be run for. */ |
| 2586 DateRange dateRange; |
| 2587 |
| 2588 /** |
| 2589 * The floodlight ID for which to show data in this report. All advertisers |
| 2590 * associated with that ID will automatically be added. The dimension of the |
| 2591 * value needs to be 'dfa:floodlightConfigId'. |
| 2592 */ |
| 2593 DimensionValue floodlightConfigId; |
| 2594 |
| 2595 /** The list of names of metrics the report should include. */ |
| 2596 core.List<core.String> metricNames; |
| 2597 |
| 2598 /** The list of per interaction dimensions the report should include. */ |
| 2599 core.List<SortedDimension> perInteractionDimensions; |
| 2600 |
| 2601 /** The properties of the report. */ |
| 2602 ReportPathToConversionCriteriaReportProperties reportProperties; |
| 2603 |
| 2604 |
| 2605 ReportPathToConversionCriteria(); |
| 2606 |
| 2607 ReportPathToConversionCriteria.fromJson(core.Map _json) { |
| 2608 if (_json.containsKey("activityFilters")) { |
| 2609 activityFilters = _json["activityFilters"].map((value) => new DimensionVal
ue.fromJson(value)).toList(); |
| 2610 } |
| 2611 if (_json.containsKey("conversionDimensions")) { |
| 2612 conversionDimensions = _json["conversionDimensions"].map((value) => new So
rtedDimension.fromJson(value)).toList(); |
| 2613 } |
| 2614 if (_json.containsKey("customFloodlightVariables")) { |
| 2615 customFloodlightVariables = _json["customFloodlightVariables"].map((value)
=> new SortedDimension.fromJson(value)).toList(); |
| 2616 } |
| 2617 if (_json.containsKey("customRichMediaEvents")) { |
| 2618 customRichMediaEvents = _json["customRichMediaEvents"].map((value) => new
DimensionValue.fromJson(value)).toList(); |
| 2619 } |
| 2620 if (_json.containsKey("dateRange")) { |
| 2621 dateRange = new DateRange.fromJson(_json["dateRange"]); |
| 2622 } |
| 2623 if (_json.containsKey("floodlightConfigId")) { |
| 2624 floodlightConfigId = new DimensionValue.fromJson(_json["floodlightConfigId
"]); |
| 2625 } |
| 2626 if (_json.containsKey("metricNames")) { |
| 2627 metricNames = _json["metricNames"]; |
| 2628 } |
| 2629 if (_json.containsKey("perInteractionDimensions")) { |
| 2630 perInteractionDimensions = _json["perInteractionDimensions"].map((value) =
> new SortedDimension.fromJson(value)).toList(); |
| 2631 } |
| 2632 if (_json.containsKey("reportProperties")) { |
| 2633 reportProperties = new ReportPathToConversionCriteriaReportProperties.from
Json(_json["reportProperties"]); |
| 2634 } |
| 2635 } |
| 2636 |
| 2637 core.Map toJson() { |
| 2638 var _json = new core.Map(); |
| 2639 if (activityFilters != null) { |
| 2640 _json["activityFilters"] = activityFilters.map((value) => (value).toJson()
).toList(); |
| 2641 } |
| 2642 if (conversionDimensions != null) { |
| 2643 _json["conversionDimensions"] = conversionDimensions.map((value) => (value
).toJson()).toList(); |
| 2644 } |
| 2645 if (customFloodlightVariables != null) { |
| 2646 _json["customFloodlightVariables"] = customFloodlightVariables.map((value)
=> (value).toJson()).toList(); |
| 2647 } |
| 2648 if (customRichMediaEvents != null) { |
| 2649 _json["customRichMediaEvents"] = customRichMediaEvents.map((value) => (val
ue).toJson()).toList(); |
| 2650 } |
| 2651 if (dateRange != null) { |
| 2652 _json["dateRange"] = (dateRange).toJson(); |
| 2653 } |
| 2654 if (floodlightConfigId != null) { |
| 2655 _json["floodlightConfigId"] = (floodlightConfigId).toJson(); |
| 2656 } |
| 2657 if (metricNames != null) { |
| 2658 _json["metricNames"] = metricNames; |
| 2659 } |
| 2660 if (perInteractionDimensions != null) { |
| 2661 _json["perInteractionDimensions"] = perInteractionDimensions.map((value) =
> (value).toJson()).toList(); |
| 2662 } |
| 2663 if (reportProperties != null) { |
| 2664 _json["reportProperties"] = (reportProperties).toJson(); |
| 2665 } |
| 2666 return _json; |
| 2667 } |
| 2668 } |
| 2669 |
| 2670 |
| 2671 /** The report criteria for a report of type "REACH". */ |
| 2672 class ReportReachCriteria { |
| 2673 /** Activity group. */ |
| 2674 Activities activities; |
| 2675 |
| 2676 /** Custom Rich Media Events group. */ |
| 2677 CustomRichMediaEvents customRichMediaEvents; |
| 2678 |
| 2679 /** The date range this report should be run for. */ |
| 2680 DateRange dateRange; |
| 2681 |
| 2682 /** |
| 2683 * The list of filters on which dimensions are filtered. |
| 2684 * Filters for different dimensions are ANDed, filters for the same dimension |
| 2685 * are grouped together and ORed. |
| 2686 */ |
| 2687 core.List<DimensionValue> dimensionFilters; |
| 2688 |
| 2689 /** The list of dimensions the report should include. */ |
| 2690 core.List<SortedDimension> dimensions; |
| 2691 |
| 2692 /** The list of names of metrics the report should include. */ |
| 2693 core.List<core.String> metricNames; |
| 2694 |
| 2695 /** |
| 2696 * The list of names of Reach By Frequency metrics the report should include. |
| 2697 */ |
| 2698 core.List<core.String> reachByFrequencyMetricNames; |
| 2699 |
| 2700 |
| 2701 ReportReachCriteria(); |
| 2702 |
| 2703 ReportReachCriteria.fromJson(core.Map _json) { |
| 2704 if (_json.containsKey("activities")) { |
| 2705 activities = new Activities.fromJson(_json["activities"]); |
| 2706 } |
| 2707 if (_json.containsKey("customRichMediaEvents")) { |
| 2708 customRichMediaEvents = new CustomRichMediaEvents.fromJson(_json["customRi
chMediaEvents"]); |
| 2709 } |
| 2710 if (_json.containsKey("dateRange")) { |
| 2711 dateRange = new DateRange.fromJson(_json["dateRange"]); |
| 2712 } |
| 2713 if (_json.containsKey("dimensionFilters")) { |
| 2714 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV
alue.fromJson(value)).toList(); |
| 2715 } |
| 2716 if (_json.containsKey("dimensions")) { |
| 2717 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs
on(value)).toList(); |
| 2718 } |
| 2719 if (_json.containsKey("metricNames")) { |
| 2720 metricNames = _json["metricNames"]; |
| 2721 } |
| 2722 if (_json.containsKey("reachByFrequencyMetricNames")) { |
| 2723 reachByFrequencyMetricNames = _json["reachByFrequencyMetricNames"]; |
| 2724 } |
| 2725 } |
| 2726 |
| 2727 core.Map toJson() { |
| 2728 var _json = new core.Map(); |
| 2729 if (activities != null) { |
| 2730 _json["activities"] = (activities).toJson(); |
| 2731 } |
| 2732 if (customRichMediaEvents != null) { |
| 2733 _json["customRichMediaEvents"] = (customRichMediaEvents).toJson(); |
| 2734 } |
| 2735 if (dateRange != null) { |
| 2736 _json["dateRange"] = (dateRange).toJson(); |
| 2737 } |
| 2738 if (dimensionFilters != null) { |
| 2739 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); |
| 2740 } |
| 2741 if (dimensions != null) { |
| 2742 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; |
| 2743 } |
| 2744 if (metricNames != null) { |
| 2745 _json["metricNames"] = metricNames; |
| 2746 } |
| 2747 if (reachByFrequencyMetricNames != null) { |
| 2748 _json["reachByFrequencyMetricNames"] = reachByFrequencyMetricNames; |
| 2749 } |
| 2750 return _json; |
| 2751 } |
| 2752 } |
| 2753 |
| 2754 |
| 2755 /** |
| 2756 * The report's schedule. Can only be set if the report's 'dateRange' is a |
| 2757 * relative date range and the relative date range is not "TODAY". |
| 2758 */ |
| 2759 class ReportSchedule { |
| 2760 /** |
| 2761 * Whether the schedule is active or not. Must be set to either true or false. |
| 2762 */ |
| 2763 core.bool active; |
| 2764 |
| 2765 /** |
| 2766 * Defines every how many days, weeks or months the report should be run. |
| 2767 * Needs to be set when "repeats" is either "DAILY", "WEEKLY" or "MONTHLY". |
| 2768 */ |
| 2769 core.int every; |
| 2770 |
| 2771 /** The expiration date when the scheduled report stops running. */ |
| 2772 core.DateTime expirationDate; |
| 2773 |
| 2774 /** |
| 2775 * The interval for which the report is repeated, one of: |
| 2776 * - "DAILY", also requires field "every" to be set. |
| 2777 * - "WEEKLY", also requires fields "every" and "repeatsOnWeekDays" to be set. |
| 2778 * - "TWICE_A_MONTH" |
| 2779 * - "MONTHLY", also requires fields "every" and "runsOnDayOfMonth" to be set. |
| 2780 * - "QUARTERLY" |
| 2781 * - "YEARLY" |
| 2782 */ |
| 2783 core.String repeats; |
| 2784 |
| 2785 /** List of week days "WEEKLY" on which scheduled reports should run. */ |
| 2786 core.List<core.String> repeatsOnWeekDays; |
| 2787 |
| 2788 /** |
| 2789 * Enum to define for "MONTHLY" scheduled reports whether reports should be |
| 2790 * repeated on the same day of the month as "startDate" or the same day of the |
| 2791 * week of the month. Possible values are: |
| 2792 * - DAY_OF_MONTH |
| 2793 * - WEEK_OF_MONTH |
| 2794 * Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02), |
| 2795 * "DAY_OF_MONTH" would run subsequent reports on the 2nd of every Month, and |
| 2796 * "WEEK_OF_MONTH" would run subsequent reports on the first Monday of the |
| 2797 * month. |
| 2798 */ |
| 2799 core.String runsOnDayOfMonth; |
| 2800 |
| 2801 /** Start date of date range for which scheduled reports should be run. */ |
| 2802 core.DateTime startDate; |
| 2803 |
| 2804 |
| 2805 ReportSchedule(); |
| 2806 |
| 2807 ReportSchedule.fromJson(core.Map _json) { |
| 2808 if (_json.containsKey("active")) { |
| 2809 active = _json["active"]; |
| 2810 } |
| 2811 if (_json.containsKey("every")) { |
| 2812 every = _json["every"]; |
| 2813 } |
| 2814 if (_json.containsKey("expirationDate")) { |
| 2815 expirationDate = core.DateTime.parse(_json["expirationDate"]); |
| 2816 } |
| 2817 if (_json.containsKey("repeats")) { |
| 2818 repeats = _json["repeats"]; |
| 2819 } |
| 2820 if (_json.containsKey("repeatsOnWeekDays")) { |
| 2821 repeatsOnWeekDays = _json["repeatsOnWeekDays"]; |
| 2822 } |
| 2823 if (_json.containsKey("runsOnDayOfMonth")) { |
| 2824 runsOnDayOfMonth = _json["runsOnDayOfMonth"]; |
| 2825 } |
| 2826 if (_json.containsKey("startDate")) { |
| 2827 startDate = core.DateTime.parse(_json["startDate"]); |
| 2828 } |
| 2829 } |
| 2830 |
| 2831 core.Map toJson() { |
| 2832 var _json = new core.Map(); |
| 2833 if (active != null) { |
| 2834 _json["active"] = active; |
| 2835 } |
| 2836 if (every != null) { |
| 2837 _json["every"] = every; |
| 2838 } |
| 2839 if (expirationDate != null) { |
| 2840 _json["expirationDate"] = "${(expirationDate).year.toString().padLeft(4, '
0')}-${(expirationDate).month.toString().padLeft(2, '0')}-${(expirationDate).day
.toString().padLeft(2, '0')}"; |
| 2841 } |
| 2842 if (repeats != null) { |
| 2843 _json["repeats"] = repeats; |
| 2844 } |
| 2845 if (repeatsOnWeekDays != null) { |
| 2846 _json["repeatsOnWeekDays"] = repeatsOnWeekDays; |
| 2847 } |
| 2848 if (runsOnDayOfMonth != null) { |
| 2849 _json["runsOnDayOfMonth"] = runsOnDayOfMonth; |
| 2850 } |
| 2851 if (startDate != null) { |
| 2852 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st
artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft(
2, '0')}"; |
| 2853 } |
| 2854 return _json; |
| 2855 } |
| 2856 } |
| 2857 |
| 2858 |
| 2859 /** Represents a Report resource. */ |
| 2860 class Report { |
| 2861 /** The account ID to which this report belongs. */ |
| 2862 core.String accountId; |
| 2863 |
| 2864 /** The report criteria for a report of type "ACTIVE_GRP". */ |
| 2865 ReportActiveGrpCriteria activeGrpCriteria; |
| 2866 |
| 2867 /** The report criteria for a report of type "STANDARD". */ |
| 2868 ReportCriteria criteria; |
| 2869 |
| 2870 /** The report criteria for a report of type "CROSS_DIMENSION_REACH". */ |
| 2871 ReportCrossDimensionReachCriteria crossDimensionReachCriteria; |
| 2872 |
| 2873 /** The report's email delivery settings. */ |
| 2874 ReportDelivery delivery; |
| 2875 |
| 2876 /** The eTag of this response for caching purposes. */ |
| 2877 core.String etag; |
| 2878 |
| 2879 /** The file name used when generating report files for this report. */ |
| 2880 core.String fileName; |
| 2881 |
| 2882 /** The report criteria for a report of type "FLOODLIGHT". */ |
| 2883 ReportFloodlightCriteria floodlightCriteria; |
| 2884 |
| 2885 /** |
| 2886 * The output format of the report, one of: |
| 2887 * - "CSV" |
| 2888 * - "EXCEL" If not specified, default format is "CSV". Note that the actual |
| 2889 * format in the completed report file might differ if for instance the |
| 2890 * report's size exceeds the format's capabilities. "CSV" will then be the |
| 2891 * fallback format. |
| 2892 */ |
| 2893 core.String format; |
| 2894 |
| 2895 /** The unique ID identifying this report resource. */ |
| 2896 core.String id; |
| 2897 |
| 2898 /** The kind of resource this is, in this case dfareporting#report. */ |
| 2899 core.String kind; |
| 2900 |
| 2901 /** |
| 2902 * The timestamp (in milliseconds since epoch) of when this report was last |
| 2903 * modified. |
| 2904 */ |
| 2905 core.String lastModifiedTime; |
| 2906 |
| 2907 /** The name of the report. */ |
| 2908 core.String name; |
| 2909 |
| 2910 /** The user profile id of the owner of this report. */ |
| 2911 core.String ownerProfileId; |
| 2912 |
| 2913 /** The report criteria for a report of type "PATH_TO_CONVERSION". */ |
| 2914 ReportPathToConversionCriteria pathToConversionCriteria; |
| 2915 |
| 2916 /** The report criteria for a report of type "REACH". */ |
| 2917 ReportReachCriteria reachCriteria; |
| 2918 |
| 2919 /** |
| 2920 * The report's schedule. Can only be set if the report's 'dateRange' is a |
| 2921 * relative date range and the relative date range is not "TODAY". |
| 2922 */ |
| 2923 ReportSchedule schedule; |
| 2924 |
| 2925 /** The subbaccount ID to which this report belongs if applicable. */ |
| 2926 core.String subAccountId; |
| 2927 |
| 2928 /** |
| 2929 * The type of the report, one of: |
| 2930 * - STANDARD |
| 2931 * - REACH |
| 2932 * - ACTIVE_GRP |
| 2933 * - PATH_TO_CONVERSION |
| 2934 * - FLOODLIGHT |
| 2935 * - CROSS_DIMENSION_REACH |
| 2936 */ |
| 2937 core.String type; |
| 2938 |
| 2939 |
| 2940 Report(); |
| 2941 |
| 2942 Report.fromJson(core.Map _json) { |
| 2943 if (_json.containsKey("accountId")) { |
| 2944 accountId = _json["accountId"]; |
| 2945 } |
| 2946 if (_json.containsKey("activeGrpCriteria")) { |
| 2947 activeGrpCriteria = new ReportActiveGrpCriteria.fromJson(_json["activeGrpC
riteria"]); |
| 2948 } |
| 2949 if (_json.containsKey("criteria")) { |
| 2950 criteria = new ReportCriteria.fromJson(_json["criteria"]); |
| 2951 } |
| 2952 if (_json.containsKey("crossDimensionReachCriteria")) { |
| 2953 crossDimensionReachCriteria = new ReportCrossDimensionReachCriteria.fromJs
on(_json["crossDimensionReachCriteria"]); |
| 2954 } |
| 2955 if (_json.containsKey("delivery")) { |
| 2956 delivery = new ReportDelivery.fromJson(_json["delivery"]); |
| 2957 } |
| 2958 if (_json.containsKey("etag")) { |
| 2959 etag = _json["etag"]; |
| 2960 } |
| 2961 if (_json.containsKey("fileName")) { |
| 2962 fileName = _json["fileName"]; |
| 2963 } |
| 2964 if (_json.containsKey("floodlightCriteria")) { |
| 2965 floodlightCriteria = new ReportFloodlightCriteria.fromJson(_json["floodlig
htCriteria"]); |
| 2966 } |
| 2967 if (_json.containsKey("format")) { |
| 2968 format = _json["format"]; |
| 2969 } |
| 2970 if (_json.containsKey("id")) { |
| 2971 id = _json["id"]; |
| 2972 } |
| 2973 if (_json.containsKey("kind")) { |
| 2974 kind = _json["kind"]; |
| 2975 } |
| 2976 if (_json.containsKey("lastModifiedTime")) { |
| 2977 lastModifiedTime = _json["lastModifiedTime"]; |
| 2978 } |
| 2979 if (_json.containsKey("name")) { |
| 2980 name = _json["name"]; |
| 2981 } |
| 2982 if (_json.containsKey("ownerProfileId")) { |
| 2983 ownerProfileId = _json["ownerProfileId"]; |
| 2984 } |
| 2985 if (_json.containsKey("pathToConversionCriteria")) { |
| 2986 pathToConversionCriteria = new ReportPathToConversionCriteria.fromJson(_js
on["pathToConversionCriteria"]); |
| 2987 } |
| 2988 if (_json.containsKey("reachCriteria")) { |
| 2989 reachCriteria = new ReportReachCriteria.fromJson(_json["reachCriteria"]); |
| 2990 } |
| 2991 if (_json.containsKey("schedule")) { |
| 2992 schedule = new ReportSchedule.fromJson(_json["schedule"]); |
| 2993 } |
| 2994 if (_json.containsKey("subAccountId")) { |
| 2995 subAccountId = _json["subAccountId"]; |
| 2996 } |
| 2997 if (_json.containsKey("type")) { |
| 2998 type = _json["type"]; |
| 2999 } |
| 3000 } |
| 3001 |
| 3002 core.Map toJson() { |
| 3003 var _json = new core.Map(); |
| 3004 if (accountId != null) { |
| 3005 _json["accountId"] = accountId; |
| 3006 } |
| 3007 if (activeGrpCriteria != null) { |
| 3008 _json["activeGrpCriteria"] = (activeGrpCriteria).toJson(); |
| 3009 } |
| 3010 if (criteria != null) { |
| 3011 _json["criteria"] = (criteria).toJson(); |
| 3012 } |
| 3013 if (crossDimensionReachCriteria != null) { |
| 3014 _json["crossDimensionReachCriteria"] = (crossDimensionReachCriteria).toJso
n(); |
| 3015 } |
| 3016 if (delivery != null) { |
| 3017 _json["delivery"] = (delivery).toJson(); |
| 3018 } |
| 3019 if (etag != null) { |
| 3020 _json["etag"] = etag; |
| 3021 } |
| 3022 if (fileName != null) { |
| 3023 _json["fileName"] = fileName; |
| 3024 } |
| 3025 if (floodlightCriteria != null) { |
| 3026 _json["floodlightCriteria"] = (floodlightCriteria).toJson(); |
| 3027 } |
| 3028 if (format != null) { |
| 3029 _json["format"] = format; |
| 3030 } |
| 3031 if (id != null) { |
| 3032 _json["id"] = id; |
| 3033 } |
| 3034 if (kind != null) { |
| 3035 _json["kind"] = kind; |
| 3036 } |
| 3037 if (lastModifiedTime != null) { |
| 3038 _json["lastModifiedTime"] = lastModifiedTime; |
| 3039 } |
| 3040 if (name != null) { |
| 3041 _json["name"] = name; |
| 3042 } |
| 3043 if (ownerProfileId != null) { |
| 3044 _json["ownerProfileId"] = ownerProfileId; |
| 3045 } |
| 3046 if (pathToConversionCriteria != null) { |
| 3047 _json["pathToConversionCriteria"] = (pathToConversionCriteria).toJson(); |
| 3048 } |
| 3049 if (reachCriteria != null) { |
| 3050 _json["reachCriteria"] = (reachCriteria).toJson(); |
| 3051 } |
| 3052 if (schedule != null) { |
| 3053 _json["schedule"] = (schedule).toJson(); |
| 3054 } |
| 3055 if (subAccountId != null) { |
| 3056 _json["subAccountId"] = subAccountId; |
| 3057 } |
| 3058 if (type != null) { |
| 3059 _json["type"] = type; |
| 3060 } |
| 3061 return _json; |
| 3062 } |
| 3063 } |
| 3064 |
| 3065 |
| 3066 /** |
| 3067 * Represents fields that are compatible to be selected for a report of type |
| 3068 * "STANDARD". |
| 3069 */ |
| 3070 class ReportCompatibleFields { |
| 3071 /** |
| 3072 * Dimensions which are compatible to be selected in the "dimensionFilters" |
| 3073 * section of the report. |
| 3074 */ |
| 3075 core.List<Dimension> dimensionFilters; |
| 3076 |
| 3077 /** |
| 3078 * Dimensions which are compatible to be selected in the "dimensions" section |
| 3079 * of the report. |
| 3080 */ |
| 3081 core.List<Dimension> dimensions; |
| 3082 |
| 3083 /** |
| 3084 * The kind of resource this is, in this case |
| 3085 * dfareporting#reportCompatibleFields. |
| 3086 */ |
| 3087 core.String kind; |
| 3088 |
| 3089 /** |
| 3090 * Metrics which are compatible to be selected in the "metricNames" section of |
| 3091 * the report. |
| 3092 */ |
| 3093 core.List<Metric> metrics; |
| 3094 |
| 3095 /** |
| 3096 * Metrics which are compatible to be selected as activity metrics to pivot on |
| 3097 * in the "activities" section of the report. |
| 3098 */ |
| 3099 core.List<Metric> pivotedActivityMetrics; |
| 3100 |
| 3101 |
| 3102 ReportCompatibleFields(); |
| 3103 |
| 3104 ReportCompatibleFields.fromJson(core.Map _json) { |
| 3105 if (_json.containsKey("dimensionFilters")) { |
| 3106 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension.
fromJson(value)).toList(); |
| 3107 } |
| 3108 if (_json.containsKey("dimensions")) { |
| 3109 dimensions = _json["dimensions"].map((value) => new Dimension.fromJson(val
ue)).toList(); |
| 3110 } |
| 3111 if (_json.containsKey("kind")) { |
| 3112 kind = _json["kind"]; |
| 3113 } |
| 3114 if (_json.containsKey("metrics")) { |
| 3115 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi
st(); |
| 3116 } |
| 3117 if (_json.containsKey("pivotedActivityMetrics")) { |
| 3118 pivotedActivityMetrics = _json["pivotedActivityMetrics"].map((value) => ne
w Metric.fromJson(value)).toList(); |
| 3119 } |
| 3120 } |
| 3121 |
| 3122 core.Map toJson() { |
| 3123 var _json = new core.Map(); |
| 3124 if (dimensionFilters != null) { |
| 3125 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson
()).toList(); |
| 3126 } |
| 3127 if (dimensions != null) { |
| 3128 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList()
; |
| 3129 } |
| 3130 if (kind != null) { |
| 3131 _json["kind"] = kind; |
| 3132 } |
| 3133 if (metrics != null) { |
| 3134 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); |
| 3135 } |
| 3136 if (pivotedActivityMetrics != null) { |
| 3137 _json["pivotedActivityMetrics"] = pivotedActivityMetrics.map((value) => (v
alue).toJson()).toList(); |
| 3138 } |
| 3139 return _json; |
| 3140 } |
| 3141 } |
| 3142 |
| 3143 |
| 3144 /** Represents the list of reports. */ |
| 3145 class ReportList { |
| 3146 /** The eTag of this response for caching purposes. */ |
| 3147 core.String etag; |
| 3148 |
| 3149 /** The reports returned in this response. */ |
| 3150 core.List<Report> items; |
| 3151 |
| 3152 /** The kind of list this is, in this case dfareporting#reportList. */ |
| 3153 core.String kind; |
| 3154 |
| 3155 /** |
| 3156 * Continuation token used to page through reports. To retrieve the next page |
| 3157 * of results, set the next request's "pageToken" to the value of this field. |
| 3158 * The page token is only valid for a limited amount of time and should not be |
| 3159 * persisted. |
| 3160 */ |
| 3161 core.String nextPageToken; |
| 3162 |
| 3163 |
| 3164 ReportList(); |
| 3165 |
| 3166 ReportList.fromJson(core.Map _json) { |
| 3167 if (_json.containsKey("etag")) { |
| 3168 etag = _json["etag"]; |
| 3169 } |
| 3170 if (_json.containsKey("items")) { |
| 3171 items = _json["items"].map((value) => new Report.fromJson(value)).toList()
; |
| 3172 } |
| 3173 if (_json.containsKey("kind")) { |
| 3174 kind = _json["kind"]; |
| 3175 } |
| 3176 if (_json.containsKey("nextPageToken")) { |
| 3177 nextPageToken = _json["nextPageToken"]; |
| 3178 } |
| 3179 } |
| 3180 |
| 3181 core.Map toJson() { |
| 3182 var _json = new core.Map(); |
| 3183 if (etag != null) { |
| 3184 _json["etag"] = etag; |
| 3185 } |
| 3186 if (items != null) { |
| 3187 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 3188 } |
| 3189 if (kind != null) { |
| 3190 _json["kind"] = kind; |
| 3191 } |
| 3192 if (nextPageToken != null) { |
| 3193 _json["nextPageToken"] = nextPageToken; |
| 3194 } |
| 3195 return _json; |
| 3196 } |
| 3197 } |
| 3198 |
| 3199 |
| 3200 /** Represents a sorted dimension. */ |
| 3201 class SortedDimension { |
| 3202 /** |
| 3203 * The kind of resource this is, in this case dfareporting#sortedDimension. |
| 3204 */ |
| 3205 core.String kind; |
| 3206 |
| 3207 /** The name of the dimension. */ |
| 3208 core.String name; |
| 3209 |
| 3210 /** |
| 3211 * An optional sort order for the dimension column, one of: |
| 3212 * - "ASCENDING" |
| 3213 * - "DESCENDING" |
| 3214 */ |
| 3215 core.String sortOrder; |
| 3216 |
| 3217 |
| 3218 SortedDimension(); |
| 3219 |
| 3220 SortedDimension.fromJson(core.Map _json) { |
| 3221 if (_json.containsKey("kind")) { |
| 3222 kind = _json["kind"]; |
| 3223 } |
| 3224 if (_json.containsKey("name")) { |
| 3225 name = _json["name"]; |
| 3226 } |
| 3227 if (_json.containsKey("sortOrder")) { |
| 3228 sortOrder = _json["sortOrder"]; |
| 3229 } |
| 3230 } |
| 3231 |
| 3232 core.Map toJson() { |
| 3233 var _json = new core.Map(); |
| 3234 if (kind != null) { |
| 3235 _json["kind"] = kind; |
| 3236 } |
| 3237 if (name != null) { |
| 3238 _json["name"] = name; |
| 3239 } |
| 3240 if (sortOrder != null) { |
| 3241 _json["sortOrder"] = sortOrder; |
| 3242 } |
| 3243 return _json; |
| 3244 } |
| 3245 } |
| 3246 |
| 3247 |
| 3248 /** Represents a UserProfile resource. */ |
| 3249 class UserProfile { |
| 3250 /** The account ID to which this profile belongs. */ |
| 3251 core.String accountId; |
| 3252 |
| 3253 /** The account name this profile belongs to. */ |
| 3254 core.String accountName; |
| 3255 |
| 3256 /** The eTag of this response for caching purposes. */ |
| 3257 core.String etag; |
| 3258 |
| 3259 /** The kind of resource this is, in this case dfareporting#userProfile. */ |
| 3260 core.String kind; |
| 3261 |
| 3262 /** The unique ID of the user profile. */ |
| 3263 core.String profileId; |
| 3264 |
| 3265 /** The sub account ID this profile belongs to if applicable. */ |
| 3266 core.String subAccountId; |
| 3267 |
| 3268 /** The sub account name this profile belongs to if applicable. */ |
| 3269 core.String subAccountName; |
| 3270 |
| 3271 /** The user name. */ |
| 3272 core.String userName; |
| 3273 |
| 3274 |
| 3275 UserProfile(); |
| 3276 |
| 3277 UserProfile.fromJson(core.Map _json) { |
| 3278 if (_json.containsKey("accountId")) { |
| 3279 accountId = _json["accountId"]; |
| 3280 } |
| 3281 if (_json.containsKey("accountName")) { |
| 3282 accountName = _json["accountName"]; |
| 3283 } |
| 3284 if (_json.containsKey("etag")) { |
| 3285 etag = _json["etag"]; |
| 3286 } |
| 3287 if (_json.containsKey("kind")) { |
| 3288 kind = _json["kind"]; |
| 3289 } |
| 3290 if (_json.containsKey("profileId")) { |
| 3291 profileId = _json["profileId"]; |
| 3292 } |
| 3293 if (_json.containsKey("subAccountId")) { |
| 3294 subAccountId = _json["subAccountId"]; |
| 3295 } |
| 3296 if (_json.containsKey("subAccountName")) { |
| 3297 subAccountName = _json["subAccountName"]; |
| 3298 } |
| 3299 if (_json.containsKey("userName")) { |
| 3300 userName = _json["userName"]; |
| 3301 } |
| 3302 } |
| 3303 |
| 3304 core.Map toJson() { |
| 3305 var _json = new core.Map(); |
| 3306 if (accountId != null) { |
| 3307 _json["accountId"] = accountId; |
| 3308 } |
| 3309 if (accountName != null) { |
| 3310 _json["accountName"] = accountName; |
| 3311 } |
| 3312 if (etag != null) { |
| 3313 _json["etag"] = etag; |
| 3314 } |
| 3315 if (kind != null) { |
| 3316 _json["kind"] = kind; |
| 3317 } |
| 3318 if (profileId != null) { |
| 3319 _json["profileId"] = profileId; |
| 3320 } |
| 3321 if (subAccountId != null) { |
| 3322 _json["subAccountId"] = subAccountId; |
| 3323 } |
| 3324 if (subAccountName != null) { |
| 3325 _json["subAccountName"] = subAccountName; |
| 3326 } |
| 3327 if (userName != null) { |
| 3328 _json["userName"] = userName; |
| 3329 } |
| 3330 return _json; |
| 3331 } |
| 3332 } |
| 3333 |
| 3334 |
| 3335 /** Represents the list of user profiles. */ |
| 3336 class UserProfileList { |
| 3337 /** The eTag of this response for caching purposes. */ |
| 3338 core.String etag; |
| 3339 |
| 3340 /** The user profiles returned in this response. */ |
| 3341 core.List<UserProfile> items; |
| 3342 |
| 3343 /** The kind of list this is, in this case dfareporting#userProfileList. */ |
| 3344 core.String kind; |
| 3345 |
| 3346 |
| 3347 UserProfileList(); |
| 3348 |
| 3349 UserProfileList.fromJson(core.Map _json) { |
| 3350 if (_json.containsKey("etag")) { |
| 3351 etag = _json["etag"]; |
| 3352 } |
| 3353 if (_json.containsKey("items")) { |
| 3354 items = _json["items"].map((value) => new UserProfile.fromJson(value)).toL
ist(); |
| 3355 } |
| 3356 if (_json.containsKey("kind")) { |
| 3357 kind = _json["kind"]; |
| 3358 } |
| 3359 } |
| 3360 |
| 3361 core.Map toJson() { |
| 3362 var _json = new core.Map(); |
| 3363 if (etag != null) { |
| 3364 _json["etag"] = etag; |
| 3365 } |
| 3366 if (items != null) { |
| 3367 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 3368 } |
| 3369 if (kind != null) { |
| 3370 _json["kind"] = kind; |
| 3371 } |
| 3372 return _json; |
| 3373 } |
| 3374 } |
| 3375 |
| 3376 |
OLD | NEW |