OLD | NEW |
(Empty) | |
| 1 library googleapis.doubleclickbidmanager.v1; |
| 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 /** API for viewing and managing your reports in DoubleClick Bid Manager. */ |
| 17 class DoubleclickbidmanagerApi { |
| 18 |
| 19 final common_internal.ApiRequester _requester; |
| 20 |
| 21 LineitemsResourceApi get lineitems => new LineitemsResourceApi(_requester); |
| 22 QueriesResourceApi get queries => new QueriesResourceApi(_requester); |
| 23 ReportsResourceApi get reports => new ReportsResourceApi(_requester); |
| 24 |
| 25 DoubleclickbidmanagerApi(http.Client client) : |
| 26 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/doubleclickbidmanager/v1/"); |
| 27 } |
| 28 |
| 29 |
| 30 /** Not documented yet. */ |
| 31 class LineitemsResourceApi { |
| 32 final common_internal.ApiRequester _requester; |
| 33 |
| 34 LineitemsResourceApi(common_internal.ApiRequester client) : |
| 35 _requester = client; |
| 36 |
| 37 /** |
| 38 * Retrieves line items in CSV format. |
| 39 * |
| 40 * [request] - The metadata request object. |
| 41 * |
| 42 * Request parameters: |
| 43 * |
| 44 * Completes with a [DownloadLineItemsResponse]. |
| 45 * |
| 46 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 47 * error. |
| 48 * |
| 49 * If the used [http.Client] completes with an error when making a REST call, |
| 50 * this method will complete with the same error. |
| 51 */ |
| 52 async.Future<DownloadLineItemsResponse> downloadlineitems(DownloadLineItemsReq
uest request) { |
| 53 var _url = null; |
| 54 var _queryParams = new core.Map(); |
| 55 var _uploadMedia = null; |
| 56 var _uploadOptions = null; |
| 57 var _downloadOptions = common.DownloadOptions.Metadata; |
| 58 var _body = null; |
| 59 |
| 60 if (request != null) { |
| 61 _body = convert.JSON.encode((request).toJson()); |
| 62 } |
| 63 |
| 64 |
| 65 _url = 'lineitems/downloadlineitems'; |
| 66 |
| 67 var _response = _requester.request(_url, |
| 68 "POST", |
| 69 body: _body, |
| 70 queryParams: _queryParams, |
| 71 uploadOptions: _uploadOptions, |
| 72 uploadMedia: _uploadMedia, |
| 73 downloadOptions: _downloadOptions); |
| 74 return _response.then((data) => new DownloadLineItemsResponse.fromJson(data)
); |
| 75 } |
| 76 |
| 77 /** |
| 78 * Uploads line items in CSV format. |
| 79 * |
| 80 * [request] - The metadata request object. |
| 81 * |
| 82 * Request parameters: |
| 83 * |
| 84 * Completes with a [UploadLineItemsResponse]. |
| 85 * |
| 86 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 87 * error. |
| 88 * |
| 89 * If the used [http.Client] completes with an error when making a REST call, |
| 90 * this method will complete with the same error. |
| 91 */ |
| 92 async.Future<UploadLineItemsResponse> uploadlineitems(UploadLineItemsRequest r
equest) { |
| 93 var _url = null; |
| 94 var _queryParams = new core.Map(); |
| 95 var _uploadMedia = null; |
| 96 var _uploadOptions = null; |
| 97 var _downloadOptions = common.DownloadOptions.Metadata; |
| 98 var _body = null; |
| 99 |
| 100 if (request != null) { |
| 101 _body = convert.JSON.encode((request).toJson()); |
| 102 } |
| 103 |
| 104 |
| 105 _url = 'lineitems/uploadlineitems'; |
| 106 |
| 107 var _response = _requester.request(_url, |
| 108 "POST", |
| 109 body: _body, |
| 110 queryParams: _queryParams, |
| 111 uploadOptions: _uploadOptions, |
| 112 uploadMedia: _uploadMedia, |
| 113 downloadOptions: _downloadOptions); |
| 114 return _response.then((data) => new UploadLineItemsResponse.fromJson(data)); |
| 115 } |
| 116 |
| 117 } |
| 118 |
| 119 |
| 120 /** Not documented yet. */ |
| 121 class QueriesResourceApi { |
| 122 final common_internal.ApiRequester _requester; |
| 123 |
| 124 QueriesResourceApi(common_internal.ApiRequester client) : |
| 125 _requester = client; |
| 126 |
| 127 /** |
| 128 * Creates a query. |
| 129 * |
| 130 * [request] - The metadata request object. |
| 131 * |
| 132 * Request parameters: |
| 133 * |
| 134 * Completes with a [Query]. |
| 135 * |
| 136 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 137 * error. |
| 138 * |
| 139 * If the used [http.Client] completes with an error when making a REST call, |
| 140 * this method will complete with the same error. |
| 141 */ |
| 142 async.Future<Query> createquery(Query request) { |
| 143 var _url = null; |
| 144 var _queryParams = new core.Map(); |
| 145 var _uploadMedia = null; |
| 146 var _uploadOptions = null; |
| 147 var _downloadOptions = common.DownloadOptions.Metadata; |
| 148 var _body = null; |
| 149 |
| 150 if (request != null) { |
| 151 _body = convert.JSON.encode((request).toJson()); |
| 152 } |
| 153 |
| 154 |
| 155 _url = 'query'; |
| 156 |
| 157 var _response = _requester.request(_url, |
| 158 "POST", |
| 159 body: _body, |
| 160 queryParams: _queryParams, |
| 161 uploadOptions: _uploadOptions, |
| 162 uploadMedia: _uploadMedia, |
| 163 downloadOptions: _downloadOptions); |
| 164 return _response.then((data) => new Query.fromJson(data)); |
| 165 } |
| 166 |
| 167 /** |
| 168 * Deletes a stored query as well as the associated stored reports. |
| 169 * |
| 170 * Request parameters: |
| 171 * |
| 172 * [queryId] - Query ID to delete. |
| 173 * |
| 174 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 175 * error. |
| 176 * |
| 177 * If the used [http.Client] completes with an error when making a REST call, |
| 178 * this method will complete with the same error. |
| 179 */ |
| 180 async.Future deletequery(core.String queryId) { |
| 181 var _url = null; |
| 182 var _queryParams = new core.Map(); |
| 183 var _uploadMedia = null; |
| 184 var _uploadOptions = null; |
| 185 var _downloadOptions = common.DownloadOptions.Metadata; |
| 186 var _body = null; |
| 187 |
| 188 if (queryId == null) { |
| 189 throw new core.ArgumentError("Parameter queryId is required."); |
| 190 } |
| 191 |
| 192 _downloadOptions = null; |
| 193 |
| 194 _url = 'query/' + common_internal.Escaper.ecapeVariable('$queryId'); |
| 195 |
| 196 var _response = _requester.request(_url, |
| 197 "DELETE", |
| 198 body: _body, |
| 199 queryParams: _queryParams, |
| 200 uploadOptions: _uploadOptions, |
| 201 uploadMedia: _uploadMedia, |
| 202 downloadOptions: _downloadOptions); |
| 203 return _response.then((data) => null); |
| 204 } |
| 205 |
| 206 /** |
| 207 * Retrieves a stored query. |
| 208 * |
| 209 * Request parameters: |
| 210 * |
| 211 * [queryId] - Query ID to retrieve. |
| 212 * |
| 213 * Completes with a [Query]. |
| 214 * |
| 215 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 216 * error. |
| 217 * |
| 218 * If the used [http.Client] completes with an error when making a REST call, |
| 219 * this method will complete with the same error. |
| 220 */ |
| 221 async.Future<Query> getquery(core.String queryId) { |
| 222 var _url = null; |
| 223 var _queryParams = new core.Map(); |
| 224 var _uploadMedia = null; |
| 225 var _uploadOptions = null; |
| 226 var _downloadOptions = common.DownloadOptions.Metadata; |
| 227 var _body = null; |
| 228 |
| 229 if (queryId == null) { |
| 230 throw new core.ArgumentError("Parameter queryId is required."); |
| 231 } |
| 232 |
| 233 |
| 234 _url = 'query/' + common_internal.Escaper.ecapeVariable('$queryId'); |
| 235 |
| 236 var _response = _requester.request(_url, |
| 237 "GET", |
| 238 body: _body, |
| 239 queryParams: _queryParams, |
| 240 uploadOptions: _uploadOptions, |
| 241 uploadMedia: _uploadMedia, |
| 242 downloadOptions: _downloadOptions); |
| 243 return _response.then((data) => new Query.fromJson(data)); |
| 244 } |
| 245 |
| 246 /** |
| 247 * Retrieves stored queries. |
| 248 * |
| 249 * Request parameters: |
| 250 * |
| 251 * Completes with a [ListQueriesResponse]. |
| 252 * |
| 253 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 254 * error. |
| 255 * |
| 256 * If the used [http.Client] completes with an error when making a REST call, |
| 257 * this method will complete with the same error. |
| 258 */ |
| 259 async.Future<ListQueriesResponse> listqueries() { |
| 260 var _url = null; |
| 261 var _queryParams = new core.Map(); |
| 262 var _uploadMedia = null; |
| 263 var _uploadOptions = null; |
| 264 var _downloadOptions = common.DownloadOptions.Metadata; |
| 265 var _body = null; |
| 266 |
| 267 |
| 268 |
| 269 _url = 'queries'; |
| 270 |
| 271 var _response = _requester.request(_url, |
| 272 "GET", |
| 273 body: _body, |
| 274 queryParams: _queryParams, |
| 275 uploadOptions: _uploadOptions, |
| 276 uploadMedia: _uploadMedia, |
| 277 downloadOptions: _downloadOptions); |
| 278 return _response.then((data) => new ListQueriesResponse.fromJson(data)); |
| 279 } |
| 280 |
| 281 /** |
| 282 * Runs a stored query to generate a report. |
| 283 * |
| 284 * [request] - The metadata request object. |
| 285 * |
| 286 * Request parameters: |
| 287 * |
| 288 * [queryId] - Query ID to run. |
| 289 * |
| 290 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 291 * error. |
| 292 * |
| 293 * If the used [http.Client] completes with an error when making a REST call, |
| 294 * this method will complete with the same error. |
| 295 */ |
| 296 async.Future runquery(RunQueryRequest request, core.String queryId) { |
| 297 var _url = null; |
| 298 var _queryParams = new core.Map(); |
| 299 var _uploadMedia = null; |
| 300 var _uploadOptions = null; |
| 301 var _downloadOptions = common.DownloadOptions.Metadata; |
| 302 var _body = null; |
| 303 |
| 304 if (request != null) { |
| 305 _body = convert.JSON.encode((request).toJson()); |
| 306 } |
| 307 if (queryId == null) { |
| 308 throw new core.ArgumentError("Parameter queryId is required."); |
| 309 } |
| 310 |
| 311 _downloadOptions = null; |
| 312 |
| 313 _url = 'query/' + common_internal.Escaper.ecapeVariable('$queryId'); |
| 314 |
| 315 var _response = _requester.request(_url, |
| 316 "POST", |
| 317 body: _body, |
| 318 queryParams: _queryParams, |
| 319 uploadOptions: _uploadOptions, |
| 320 uploadMedia: _uploadMedia, |
| 321 downloadOptions: _downloadOptions); |
| 322 return _response.then((data) => null); |
| 323 } |
| 324 |
| 325 } |
| 326 |
| 327 |
| 328 /** Not documented yet. */ |
| 329 class ReportsResourceApi { |
| 330 final common_internal.ApiRequester _requester; |
| 331 |
| 332 ReportsResourceApi(common_internal.ApiRequester client) : |
| 333 _requester = client; |
| 334 |
| 335 /** |
| 336 * Retrieves stored reports. |
| 337 * |
| 338 * Request parameters: |
| 339 * |
| 340 * [queryId] - Query ID with which the reports are associated. |
| 341 * |
| 342 * Completes with a [ListReportsResponse]. |
| 343 * |
| 344 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 345 * error. |
| 346 * |
| 347 * If the used [http.Client] completes with an error when making a REST call, |
| 348 * this method will complete with the same error. |
| 349 */ |
| 350 async.Future<ListReportsResponse> listreports(core.String queryId) { |
| 351 var _url = null; |
| 352 var _queryParams = new core.Map(); |
| 353 var _uploadMedia = null; |
| 354 var _uploadOptions = null; |
| 355 var _downloadOptions = common.DownloadOptions.Metadata; |
| 356 var _body = null; |
| 357 |
| 358 if (queryId == null) { |
| 359 throw new core.ArgumentError("Parameter queryId is required."); |
| 360 } |
| 361 |
| 362 |
| 363 _url = 'queries/' + common_internal.Escaper.ecapeVariable('$queryId') + '/re
ports'; |
| 364 |
| 365 var _response = _requester.request(_url, |
| 366 "GET", |
| 367 body: _body, |
| 368 queryParams: _queryParams, |
| 369 uploadOptions: _uploadOptions, |
| 370 uploadMedia: _uploadMedia, |
| 371 downloadOptions: _downloadOptions); |
| 372 return _response.then((data) => new ListReportsResponse.fromJson(data)); |
| 373 } |
| 374 |
| 375 } |
| 376 |
| 377 |
| 378 |
| 379 /** Request to fetch stored line items. */ |
| 380 class DownloadLineItemsRequest { |
| 381 /** |
| 382 * Ids of the specified filter type used to filter line items to fetch. If |
| 383 * omitted, all the line items will be returned. |
| 384 */ |
| 385 core.List<core.String> filterIds; |
| 386 |
| 387 /** |
| 388 * Filter type used to filter line items to fetch. |
| 389 * Possible string values are: |
| 390 * - "ADVERTISER_ID" |
| 391 * - "INSERTION_ORDER_ID" |
| 392 * - "LINE_ITEM_ID" |
| 393 */ |
| 394 core.String filterType; |
| 395 |
| 396 /** |
| 397 * Format in which the line items will be returned. Default to CSV. |
| 398 * Possible string values are: |
| 399 * - "CSV" |
| 400 */ |
| 401 core.String format; |
| 402 |
| 403 |
| 404 DownloadLineItemsRequest(); |
| 405 |
| 406 DownloadLineItemsRequest.fromJson(core.Map _json) { |
| 407 if (_json.containsKey("filterIds")) { |
| 408 filterIds = _json["filterIds"]; |
| 409 } |
| 410 if (_json.containsKey("filterType")) { |
| 411 filterType = _json["filterType"]; |
| 412 } |
| 413 if (_json.containsKey("format")) { |
| 414 format = _json["format"]; |
| 415 } |
| 416 } |
| 417 |
| 418 core.Map toJson() { |
| 419 var _json = new core.Map(); |
| 420 if (filterIds != null) { |
| 421 _json["filterIds"] = filterIds; |
| 422 } |
| 423 if (filterType != null) { |
| 424 _json["filterType"] = filterType; |
| 425 } |
| 426 if (format != null) { |
| 427 _json["format"] = format; |
| 428 } |
| 429 return _json; |
| 430 } |
| 431 } |
| 432 |
| 433 |
| 434 /** Download line items response. */ |
| 435 class DownloadLineItemsResponse { |
| 436 /** |
| 437 * Retrieved line items in CSV format. Refer to Entity Write File Format for |
| 438 * more information on file format. |
| 439 */ |
| 440 core.String lineItems; |
| 441 |
| 442 |
| 443 DownloadLineItemsResponse(); |
| 444 |
| 445 DownloadLineItemsResponse.fromJson(core.Map _json) { |
| 446 if (_json.containsKey("lineItems")) { |
| 447 lineItems = _json["lineItems"]; |
| 448 } |
| 449 } |
| 450 |
| 451 core.Map toJson() { |
| 452 var _json = new core.Map(); |
| 453 if (lineItems != null) { |
| 454 _json["lineItems"] = lineItems; |
| 455 } |
| 456 return _json; |
| 457 } |
| 458 } |
| 459 |
| 460 |
| 461 /** Filter used to match traffic data in your report. */ |
| 462 class FilterPair { |
| 463 /** |
| 464 * Filter type. |
| 465 * Possible string values are: |
| 466 * - "FILTER_ACTIVITY_ID" |
| 467 * - "FILTER_ADVERTISER" |
| 468 * - "FILTER_ADVERTISER_CURRENCY" |
| 469 * - "FILTER_ADVERTISER_TIMEZONE" |
| 470 * - "FILTER_AD_POSITION" |
| 471 * - "FILTER_BRANDSAFE_CHANNEL_ID" |
| 472 * - "FILTER_BROWSER" |
| 473 * - "FILTER_CAMPAIGN_DAILY_FREQUENCY" |
| 474 * - "FILTER_CARRIER" |
| 475 * - "FILTER_CHANNEL_ID" |
| 476 * - "FILTER_CITY" |
| 477 * - "FILTER_CONVERSION_DELAY" |
| 478 * - "FILTER_COUNTRY" |
| 479 * - "FILTER_CREATIVE_ID" |
| 480 * - "FILTER_CREATIVE_SIZE" |
| 481 * - "FILTER_CREATIVE_TYPE" |
| 482 * - "FILTER_DATA_PROVIDER" |
| 483 * - "FILTER_DATE" |
| 484 * - "FILTER_DAY_OF_WEEK" |
| 485 * - "FILTER_DMA" |
| 486 * - "FILTER_EXCHANGE_ID" |
| 487 * - "FILTER_FLOODLIGHT_PIXEL_ID" |
| 488 * - "FILTER_INSERTION_ORDER" |
| 489 * - "FILTER_INVENTORY_FORMAT" |
| 490 * - "FILTER_INVENTORY_SOURCE" |
| 491 * - "FILTER_KEYWORD" |
| 492 * - "FILTER_LINE_ITEM" |
| 493 * - "FILTER_LINE_ITEM_DAILY_FREQUENCY" |
| 494 * - "FILTER_LINE_ITEM_LIFETIME_FREQUENCY" |
| 495 * - "FILTER_LINE_ITEM_TYPE" |
| 496 * - "FILTER_MOBILE_DEVICE_MAKE" |
| 497 * - "FILTER_MOBILE_DEVICE_MAKE_MODEL" |
| 498 * - "FILTER_MOBILE_DEVICE_TYPE" |
| 499 * - "FILTER_MONTH" |
| 500 * - "FILTER_ORDER_ID" |
| 501 * - "FILTER_OS" |
| 502 * - "FILTER_PAGE_CATEGORY" |
| 503 * - "FILTER_PAGE_LAYOUT" |
| 504 * - "FILTER_PARTNER" |
| 505 * - "FILTER_PARTNER_CURRENCY" |
| 506 * - "FILTER_PUBLIC_INVENTORY" |
| 507 * - "FILTER_REGION" |
| 508 * - "FILTER_REGULAR_CHANNEL_ID" |
| 509 * - "FILTER_SITE_ID" |
| 510 * - "FILTER_SITE_LANGUAGE" |
| 511 * - "FILTER_TARGETED_USER_LIST" |
| 512 * - "FILTER_TIME_OF_DAY" |
| 513 * - "FILTER_UNKNOWN" |
| 514 * - "FILTER_USER_LIST" |
| 515 * - "FILTER_USER_LIST_FIRST_PARTY" |
| 516 * - "FILTER_USER_LIST_THIRD_PARTY" |
| 517 * - "FILTER_VIDEO_AD_POSITION_IN_STREAM" |
| 518 * - "FILTER_VIDEO_CREATIVE_DURATION" |
| 519 * - "FILTER_VIDEO_DURATION_SECONDS" |
| 520 * - "FILTER_VIDEO_FORMAT_SUPPORT" |
| 521 * - "FILTER_VIDEO_INVENTORY_TYPE" |
| 522 * - "FILTER_VIDEO_PLAYER_SIZE" |
| 523 * - "FILTER_VIDEO_RATING_TIER" |
| 524 * - "FILTER_VIDEO_SKIPPABLE_SUPPORT" |
| 525 * - "FILTER_VIDEO_VPAID_SUPPORT" |
| 526 * - "FILTER_WEEK" |
| 527 * - "FILTER_YEAR" |
| 528 * - "FILTER_YOUTUBE_VERTICAL" |
| 529 * - "FILTER_ZIP_CODE" |
| 530 */ |
| 531 core.String type; |
| 532 |
| 533 /** Filter value. */ |
| 534 core.String value; |
| 535 |
| 536 |
| 537 FilterPair(); |
| 538 |
| 539 FilterPair.fromJson(core.Map _json) { |
| 540 if (_json.containsKey("type")) { |
| 541 type = _json["type"]; |
| 542 } |
| 543 if (_json.containsKey("value")) { |
| 544 value = _json["value"]; |
| 545 } |
| 546 } |
| 547 |
| 548 core.Map toJson() { |
| 549 var _json = new core.Map(); |
| 550 if (type != null) { |
| 551 _json["type"] = type; |
| 552 } |
| 553 if (value != null) { |
| 554 _json["value"] = value; |
| 555 } |
| 556 return _json; |
| 557 } |
| 558 } |
| 559 |
| 560 |
| 561 /** List queries response. */ |
| 562 class ListQueriesResponse { |
| 563 /** |
| 564 * Identifies what kind of resource this is. Value: the fixed string |
| 565 * "doubleclickbidmanager#listQueriesResponse". |
| 566 */ |
| 567 core.String kind; |
| 568 |
| 569 /** Retrieved queries. */ |
| 570 core.List<Query> queries; |
| 571 |
| 572 |
| 573 ListQueriesResponse(); |
| 574 |
| 575 ListQueriesResponse.fromJson(core.Map _json) { |
| 576 if (_json.containsKey("kind")) { |
| 577 kind = _json["kind"]; |
| 578 } |
| 579 if (_json.containsKey("queries")) { |
| 580 queries = _json["queries"].map((value) => new Query.fromJson(value)).toLis
t(); |
| 581 } |
| 582 } |
| 583 |
| 584 core.Map toJson() { |
| 585 var _json = new core.Map(); |
| 586 if (kind != null) { |
| 587 _json["kind"] = kind; |
| 588 } |
| 589 if (queries != null) { |
| 590 _json["queries"] = queries.map((value) => (value).toJson()).toList(); |
| 591 } |
| 592 return _json; |
| 593 } |
| 594 } |
| 595 |
| 596 |
| 597 /** List reports response. */ |
| 598 class ListReportsResponse { |
| 599 /** |
| 600 * Identifies what kind of resource this is. Value: the fixed string |
| 601 * "doubleclickbidmanager#listReportsResponse". |
| 602 */ |
| 603 core.String kind; |
| 604 |
| 605 /** Retrieved reports. */ |
| 606 core.List<Report> reports; |
| 607 |
| 608 |
| 609 ListReportsResponse(); |
| 610 |
| 611 ListReportsResponse.fromJson(core.Map _json) { |
| 612 if (_json.containsKey("kind")) { |
| 613 kind = _json["kind"]; |
| 614 } |
| 615 if (_json.containsKey("reports")) { |
| 616 reports = _json["reports"].map((value) => new Report.fromJson(value)).toLi
st(); |
| 617 } |
| 618 } |
| 619 |
| 620 core.Map toJson() { |
| 621 var _json = new core.Map(); |
| 622 if (kind != null) { |
| 623 _json["kind"] = kind; |
| 624 } |
| 625 if (reports != null) { |
| 626 _json["reports"] = reports.map((value) => (value).toJson()).toList(); |
| 627 } |
| 628 return _json; |
| 629 } |
| 630 } |
| 631 |
| 632 |
| 633 /** Parameters of a query or report. */ |
| 634 class Parameters { |
| 635 /** Filters used to match traffic data in your report. */ |
| 636 core.List<FilterPair> filters; |
| 637 |
| 638 /** Data is grouped by the filters listed in this field. */ |
| 639 core.List<core.String> groupBys; |
| 640 |
| 641 /** Whether to include data from Invite Media. */ |
| 642 core.bool includeInviteData; |
| 643 |
| 644 /** Metrics to include as columns in your report. */ |
| 645 core.List<core.String> metrics; |
| 646 |
| 647 /** |
| 648 * Report type. |
| 649 * Possible string values are: |
| 650 * - "TYPE_ACTIVE_GRP" |
| 651 * - "TYPE_AUDIENCE_COMPOSITION" |
| 652 * - "TYPE_AUDIENCE_PERFORMANCE" |
| 653 * - "TYPE_CLIENT_SAFE" |
| 654 * - "TYPE_CROSS_FEE" |
| 655 * - "TYPE_CROSS_PARTNER" |
| 656 * - "TYPE_CROSS_PARTNER_THIRD_PARTY_DATA_PROVIDER" |
| 657 * - "TYPE_FEE" |
| 658 * - "TYPE_GENERAL" |
| 659 * - "TYPE_INVENTORY_AVAILABILITY" |
| 660 * - "TYPE_KEYWORD" |
| 661 * - "TYPE_ORDER_ID" |
| 662 * - "TYPE_PAGE_CATEGORY" |
| 663 * - "TYPE_PIXEL_LOAD" |
| 664 * - "TYPE_THIRD_PARTY_DATA_PROVIDER" |
| 665 * - "TYPE_YOUTUBE_VERTICAL" |
| 666 */ |
| 667 core.String type; |
| 668 |
| 669 |
| 670 Parameters(); |
| 671 |
| 672 Parameters.fromJson(core.Map _json) { |
| 673 if (_json.containsKey("filters")) { |
| 674 filters = _json["filters"].map((value) => new FilterPair.fromJson(value)).
toList(); |
| 675 } |
| 676 if (_json.containsKey("groupBys")) { |
| 677 groupBys = _json["groupBys"]; |
| 678 } |
| 679 if (_json.containsKey("includeInviteData")) { |
| 680 includeInviteData = _json["includeInviteData"]; |
| 681 } |
| 682 if (_json.containsKey("metrics")) { |
| 683 metrics = _json["metrics"]; |
| 684 } |
| 685 if (_json.containsKey("type")) { |
| 686 type = _json["type"]; |
| 687 } |
| 688 } |
| 689 |
| 690 core.Map toJson() { |
| 691 var _json = new core.Map(); |
| 692 if (filters != null) { |
| 693 _json["filters"] = filters.map((value) => (value).toJson()).toList(); |
| 694 } |
| 695 if (groupBys != null) { |
| 696 _json["groupBys"] = groupBys; |
| 697 } |
| 698 if (includeInviteData != null) { |
| 699 _json["includeInviteData"] = includeInviteData; |
| 700 } |
| 701 if (metrics != null) { |
| 702 _json["metrics"] = metrics; |
| 703 } |
| 704 if (type != null) { |
| 705 _json["type"] = type; |
| 706 } |
| 707 return _json; |
| 708 } |
| 709 } |
| 710 |
| 711 |
| 712 /** Represents a query. */ |
| 713 class Query { |
| 714 /** |
| 715 * Identifies what kind of resource this is. Value: the fixed string |
| 716 * "doubleclickbidmanager#query". |
| 717 */ |
| 718 core.String kind; |
| 719 |
| 720 /** Query metadata. */ |
| 721 QueryMetadata metadata; |
| 722 |
| 723 /** Query parameters. */ |
| 724 Parameters params; |
| 725 |
| 726 /** Query ID. */ |
| 727 core.String queryId; |
| 728 |
| 729 /** |
| 730 * The ending time for the data that is shown in the report. Note, |
| 731 * reportDataEndTimeMs is required if metadata.dataRange is CUSTOM_DATES and |
| 732 * ignored otherwise. |
| 733 */ |
| 734 core.String reportDataEndTimeMs; |
| 735 |
| 736 /** |
| 737 * The starting time for the data that is shown in the report. Note, |
| 738 * reportDataStartTimeMs is required if metadata.dataRange is CUSTOM_DATES and |
| 739 * ignored otherwise. |
| 740 */ |
| 741 core.String reportDataStartTimeMs; |
| 742 |
| 743 /** Information on how often and when to run a query. */ |
| 744 QuerySchedule schedule; |
| 745 |
| 746 /** |
| 747 * Canonical timezone code for report data time. Defaults to America/New_York. |
| 748 */ |
| 749 core.String timezoneCode; |
| 750 |
| 751 |
| 752 Query(); |
| 753 |
| 754 Query.fromJson(core.Map _json) { |
| 755 if (_json.containsKey("kind")) { |
| 756 kind = _json["kind"]; |
| 757 } |
| 758 if (_json.containsKey("metadata")) { |
| 759 metadata = new QueryMetadata.fromJson(_json["metadata"]); |
| 760 } |
| 761 if (_json.containsKey("params")) { |
| 762 params = new Parameters.fromJson(_json["params"]); |
| 763 } |
| 764 if (_json.containsKey("queryId")) { |
| 765 queryId = _json["queryId"]; |
| 766 } |
| 767 if (_json.containsKey("reportDataEndTimeMs")) { |
| 768 reportDataEndTimeMs = _json["reportDataEndTimeMs"]; |
| 769 } |
| 770 if (_json.containsKey("reportDataStartTimeMs")) { |
| 771 reportDataStartTimeMs = _json["reportDataStartTimeMs"]; |
| 772 } |
| 773 if (_json.containsKey("schedule")) { |
| 774 schedule = new QuerySchedule.fromJson(_json["schedule"]); |
| 775 } |
| 776 if (_json.containsKey("timezoneCode")) { |
| 777 timezoneCode = _json["timezoneCode"]; |
| 778 } |
| 779 } |
| 780 |
| 781 core.Map toJson() { |
| 782 var _json = new core.Map(); |
| 783 if (kind != null) { |
| 784 _json["kind"] = kind; |
| 785 } |
| 786 if (metadata != null) { |
| 787 _json["metadata"] = (metadata).toJson(); |
| 788 } |
| 789 if (params != null) { |
| 790 _json["params"] = (params).toJson(); |
| 791 } |
| 792 if (queryId != null) { |
| 793 _json["queryId"] = queryId; |
| 794 } |
| 795 if (reportDataEndTimeMs != null) { |
| 796 _json["reportDataEndTimeMs"] = reportDataEndTimeMs; |
| 797 } |
| 798 if (reportDataStartTimeMs != null) { |
| 799 _json["reportDataStartTimeMs"] = reportDataStartTimeMs; |
| 800 } |
| 801 if (schedule != null) { |
| 802 _json["schedule"] = (schedule).toJson(); |
| 803 } |
| 804 if (timezoneCode != null) { |
| 805 _json["timezoneCode"] = timezoneCode; |
| 806 } |
| 807 return _json; |
| 808 } |
| 809 } |
| 810 |
| 811 |
| 812 /** Query metadata. */ |
| 813 class QueryMetadata { |
| 814 /** |
| 815 * Range of report data. |
| 816 * Possible string values are: |
| 817 * - "ALL_TIME" |
| 818 * - "CURRENT_DAY" |
| 819 * - "CUSTOM_DATES" |
| 820 * - "LAST_14_DAYS" |
| 821 * - "LAST_30_DAYS" |
| 822 * - "LAST_365_DAYS" |
| 823 * - "LAST_7_DAYS" |
| 824 * - "LAST_90_DAYS" |
| 825 * - "MONTH_TO_DATE" |
| 826 * - "PREVIOUS_DAY" |
| 827 * - "PREVIOUS_HALF_MONTH" |
| 828 * - "PREVIOUS_MONTH" |
| 829 * - "PREVIOUS_QUARTER" |
| 830 * - "PREVIOUS_WEEK" |
| 831 * - "PREVIOUS_YEAR" |
| 832 * - "QUARTER_TO_DATE" |
| 833 * - "WEEK_TO_DATE" |
| 834 * - "YEAR_TO_DATE" |
| 835 */ |
| 836 core.String dataRange; |
| 837 |
| 838 /** |
| 839 * Format of the generated report. |
| 840 * Possible string values are: |
| 841 * - "CSV" |
| 842 * - "EXCEL_CSV" |
| 843 * - "XLSX" |
| 844 */ |
| 845 core.String format; |
| 846 |
| 847 /** |
| 848 * The path to the location in Google Cloud Storage where the latest report is |
| 849 * stored. |
| 850 */ |
| 851 core.String googleCloudStoragePathForLatestReport; |
| 852 |
| 853 /** The path in Google Drive for the latest report. */ |
| 854 core.String googleDrivePathForLatestReport; |
| 855 |
| 856 /** The time when the latest report started to run. */ |
| 857 core.String latestReportRunTimeMs; |
| 858 |
| 859 /** Number of reports that have been generated for the query. */ |
| 860 core.int reportCount; |
| 861 |
| 862 /** Whether the latest report is currently running. */ |
| 863 core.bool running; |
| 864 |
| 865 /** |
| 866 * Whether to send an email notification when a report is ready. Default to |
| 867 * false. |
| 868 */ |
| 869 core.bool sendNotification; |
| 870 |
| 871 /** |
| 872 * List of email addresses which are sent email notifications when the report |
| 873 * is finished. Separate from sendNotification. |
| 874 */ |
| 875 core.List<core.String> shareEmailAddress; |
| 876 |
| 877 /** Query title. It is used to name the reports generated from this query. */ |
| 878 core.String title; |
| 879 |
| 880 |
| 881 QueryMetadata(); |
| 882 |
| 883 QueryMetadata.fromJson(core.Map _json) { |
| 884 if (_json.containsKey("dataRange")) { |
| 885 dataRange = _json["dataRange"]; |
| 886 } |
| 887 if (_json.containsKey("format")) { |
| 888 format = _json["format"]; |
| 889 } |
| 890 if (_json.containsKey("googleCloudStoragePathForLatestReport")) { |
| 891 googleCloudStoragePathForLatestReport = _json["googleCloudStoragePathForLa
testReport"]; |
| 892 } |
| 893 if (_json.containsKey("googleDrivePathForLatestReport")) { |
| 894 googleDrivePathForLatestReport = _json["googleDrivePathForLatestReport"]; |
| 895 } |
| 896 if (_json.containsKey("latestReportRunTimeMs")) { |
| 897 latestReportRunTimeMs = _json["latestReportRunTimeMs"]; |
| 898 } |
| 899 if (_json.containsKey("reportCount")) { |
| 900 reportCount = _json["reportCount"]; |
| 901 } |
| 902 if (_json.containsKey("running")) { |
| 903 running = _json["running"]; |
| 904 } |
| 905 if (_json.containsKey("sendNotification")) { |
| 906 sendNotification = _json["sendNotification"]; |
| 907 } |
| 908 if (_json.containsKey("shareEmailAddress")) { |
| 909 shareEmailAddress = _json["shareEmailAddress"]; |
| 910 } |
| 911 if (_json.containsKey("title")) { |
| 912 title = _json["title"]; |
| 913 } |
| 914 } |
| 915 |
| 916 core.Map toJson() { |
| 917 var _json = new core.Map(); |
| 918 if (dataRange != null) { |
| 919 _json["dataRange"] = dataRange; |
| 920 } |
| 921 if (format != null) { |
| 922 _json["format"] = format; |
| 923 } |
| 924 if (googleCloudStoragePathForLatestReport != null) { |
| 925 _json["googleCloudStoragePathForLatestReport"] = googleCloudStoragePathFor
LatestReport; |
| 926 } |
| 927 if (googleDrivePathForLatestReport != null) { |
| 928 _json["googleDrivePathForLatestReport"] = googleDrivePathForLatestReport; |
| 929 } |
| 930 if (latestReportRunTimeMs != null) { |
| 931 _json["latestReportRunTimeMs"] = latestReportRunTimeMs; |
| 932 } |
| 933 if (reportCount != null) { |
| 934 _json["reportCount"] = reportCount; |
| 935 } |
| 936 if (running != null) { |
| 937 _json["running"] = running; |
| 938 } |
| 939 if (sendNotification != null) { |
| 940 _json["sendNotification"] = sendNotification; |
| 941 } |
| 942 if (shareEmailAddress != null) { |
| 943 _json["shareEmailAddress"] = shareEmailAddress; |
| 944 } |
| 945 if (title != null) { |
| 946 _json["title"] = title; |
| 947 } |
| 948 return _json; |
| 949 } |
| 950 } |
| 951 |
| 952 |
| 953 /** Information on how frequently and when to run a query. */ |
| 954 class QuerySchedule { |
| 955 /** Datetime to periodically run the query until. */ |
| 956 core.String endTimeMs; |
| 957 |
| 958 /** |
| 959 * How often the query is run. |
| 960 * Possible string values are: |
| 961 * - "DAILY" |
| 962 * - "MONTHLY" |
| 963 * - "ONE_TIME" |
| 964 * - "QUARTERLY" |
| 965 * - "SEMI_MONTHLY" |
| 966 * - "WEEKLY" |
| 967 */ |
| 968 core.String frequency; |
| 969 |
| 970 /** |
| 971 * Time of day at which a new report will be generated, represented as minutes |
| 972 * past midnight Range is 0 to 1439. Only applies to scheduled reports. |
| 973 */ |
| 974 core.int nextRunMinuteOfDay; |
| 975 |
| 976 /** |
| 977 * Canonical timezone code for report generation time. Defaults to |
| 978 * America/New_York. |
| 979 */ |
| 980 core.String nextRunTimezoneCode; |
| 981 |
| 982 |
| 983 QuerySchedule(); |
| 984 |
| 985 QuerySchedule.fromJson(core.Map _json) { |
| 986 if (_json.containsKey("endTimeMs")) { |
| 987 endTimeMs = _json["endTimeMs"]; |
| 988 } |
| 989 if (_json.containsKey("frequency")) { |
| 990 frequency = _json["frequency"]; |
| 991 } |
| 992 if (_json.containsKey("nextRunMinuteOfDay")) { |
| 993 nextRunMinuteOfDay = _json["nextRunMinuteOfDay"]; |
| 994 } |
| 995 if (_json.containsKey("nextRunTimezoneCode")) { |
| 996 nextRunTimezoneCode = _json["nextRunTimezoneCode"]; |
| 997 } |
| 998 } |
| 999 |
| 1000 core.Map toJson() { |
| 1001 var _json = new core.Map(); |
| 1002 if (endTimeMs != null) { |
| 1003 _json["endTimeMs"] = endTimeMs; |
| 1004 } |
| 1005 if (frequency != null) { |
| 1006 _json["frequency"] = frequency; |
| 1007 } |
| 1008 if (nextRunMinuteOfDay != null) { |
| 1009 _json["nextRunMinuteOfDay"] = nextRunMinuteOfDay; |
| 1010 } |
| 1011 if (nextRunTimezoneCode != null) { |
| 1012 _json["nextRunTimezoneCode"] = nextRunTimezoneCode; |
| 1013 } |
| 1014 return _json; |
| 1015 } |
| 1016 } |
| 1017 |
| 1018 |
| 1019 /** Represents a report. */ |
| 1020 class Report { |
| 1021 /** Key used to identify a report. */ |
| 1022 ReportKey key; |
| 1023 |
| 1024 /** Report metadata. */ |
| 1025 ReportMetadata metadata; |
| 1026 |
| 1027 /** Report parameters. */ |
| 1028 Parameters params; |
| 1029 |
| 1030 |
| 1031 Report(); |
| 1032 |
| 1033 Report.fromJson(core.Map _json) { |
| 1034 if (_json.containsKey("key")) { |
| 1035 key = new ReportKey.fromJson(_json["key"]); |
| 1036 } |
| 1037 if (_json.containsKey("metadata")) { |
| 1038 metadata = new ReportMetadata.fromJson(_json["metadata"]); |
| 1039 } |
| 1040 if (_json.containsKey("params")) { |
| 1041 params = new Parameters.fromJson(_json["params"]); |
| 1042 } |
| 1043 } |
| 1044 |
| 1045 core.Map toJson() { |
| 1046 var _json = new core.Map(); |
| 1047 if (key != null) { |
| 1048 _json["key"] = (key).toJson(); |
| 1049 } |
| 1050 if (metadata != null) { |
| 1051 _json["metadata"] = (metadata).toJson(); |
| 1052 } |
| 1053 if (params != null) { |
| 1054 _json["params"] = (params).toJson(); |
| 1055 } |
| 1056 return _json; |
| 1057 } |
| 1058 } |
| 1059 |
| 1060 |
| 1061 /** An explanation of a report failure. */ |
| 1062 class ReportFailure { |
| 1063 /** |
| 1064 * Error code that shows why the report was not created. |
| 1065 * Possible string values are: |
| 1066 * - "AUTHENTICATION_ERROR" |
| 1067 * - "DEPRECATED_REPORTING_INVALID_QUERY" |
| 1068 * - "REPORTING_BUCKET_NOT_FOUND" |
| 1069 * - "REPORTING_CREATE_BUCKET_FAILED" |
| 1070 * - "REPORTING_DELETE_BUCKET_FAILED" |
| 1071 * - "REPORTING_FATAL_ERROR" |
| 1072 * - "REPORTING_ILLEGAL_FILENAME" |
| 1073 * - "REPORTING_IMCOMPATIBLE_METRICS" |
| 1074 * - "REPORTING_INVALID_QUERY_MISSING_PARTNER_AND_ADVERTISER_FILTERS" |
| 1075 * - "REPORTING_INVALID_QUERY_TITLE_MISSING" |
| 1076 * - "REPORTING_INVALID_QUERY_TOO_MANY_UNFILTERED_LARGE_GROUP_BYS" |
| 1077 * - "REPORTING_QUERY_NOT_FOUND" |
| 1078 * - "REPORTING_TRANSIENT_ERROR" |
| 1079 * - "REPORTING_UPDATE_BUCKET_PERMISSION_FAILED" |
| 1080 * - "REPORTING_WRITE_BUCKET_OBJECT_FAILED" |
| 1081 * - "SERVER_ERROR" |
| 1082 * - "UNAUTHORIZED_API_ACCESS" |
| 1083 * - "VALIDATION_ERROR" |
| 1084 */ |
| 1085 core.String errorCode; |
| 1086 |
| 1087 |
| 1088 ReportFailure(); |
| 1089 |
| 1090 ReportFailure.fromJson(core.Map _json) { |
| 1091 if (_json.containsKey("errorCode")) { |
| 1092 errorCode = _json["errorCode"]; |
| 1093 } |
| 1094 } |
| 1095 |
| 1096 core.Map toJson() { |
| 1097 var _json = new core.Map(); |
| 1098 if (errorCode != null) { |
| 1099 _json["errorCode"] = errorCode; |
| 1100 } |
| 1101 return _json; |
| 1102 } |
| 1103 } |
| 1104 |
| 1105 |
| 1106 /** Key used to identify a report. */ |
| 1107 class ReportKey { |
| 1108 /** Query ID. */ |
| 1109 core.String queryId; |
| 1110 |
| 1111 /** Report ID. */ |
| 1112 core.String reportId; |
| 1113 |
| 1114 |
| 1115 ReportKey(); |
| 1116 |
| 1117 ReportKey.fromJson(core.Map _json) { |
| 1118 if (_json.containsKey("queryId")) { |
| 1119 queryId = _json["queryId"]; |
| 1120 } |
| 1121 if (_json.containsKey("reportId")) { |
| 1122 reportId = _json["reportId"]; |
| 1123 } |
| 1124 } |
| 1125 |
| 1126 core.Map toJson() { |
| 1127 var _json = new core.Map(); |
| 1128 if (queryId != null) { |
| 1129 _json["queryId"] = queryId; |
| 1130 } |
| 1131 if (reportId != null) { |
| 1132 _json["reportId"] = reportId; |
| 1133 } |
| 1134 return _json; |
| 1135 } |
| 1136 } |
| 1137 |
| 1138 |
| 1139 /** Report metadata. */ |
| 1140 class ReportMetadata { |
| 1141 /** |
| 1142 * The path to the location in Google Cloud Storage where the report is |
| 1143 * stored. |
| 1144 */ |
| 1145 core.String googleCloudStoragePath; |
| 1146 |
| 1147 /** The ending time for the data that is shown in the report. */ |
| 1148 core.String reportDataEndTimeMs; |
| 1149 |
| 1150 /** The starting time for the data that is shown in the report. */ |
| 1151 core.String reportDataStartTimeMs; |
| 1152 |
| 1153 /** Report status. */ |
| 1154 ReportStatus status; |
| 1155 |
| 1156 |
| 1157 ReportMetadata(); |
| 1158 |
| 1159 ReportMetadata.fromJson(core.Map _json) { |
| 1160 if (_json.containsKey("googleCloudStoragePath")) { |
| 1161 googleCloudStoragePath = _json["googleCloudStoragePath"]; |
| 1162 } |
| 1163 if (_json.containsKey("reportDataEndTimeMs")) { |
| 1164 reportDataEndTimeMs = _json["reportDataEndTimeMs"]; |
| 1165 } |
| 1166 if (_json.containsKey("reportDataStartTimeMs")) { |
| 1167 reportDataStartTimeMs = _json["reportDataStartTimeMs"]; |
| 1168 } |
| 1169 if (_json.containsKey("status")) { |
| 1170 status = new ReportStatus.fromJson(_json["status"]); |
| 1171 } |
| 1172 } |
| 1173 |
| 1174 core.Map toJson() { |
| 1175 var _json = new core.Map(); |
| 1176 if (googleCloudStoragePath != null) { |
| 1177 _json["googleCloudStoragePath"] = googleCloudStoragePath; |
| 1178 } |
| 1179 if (reportDataEndTimeMs != null) { |
| 1180 _json["reportDataEndTimeMs"] = reportDataEndTimeMs; |
| 1181 } |
| 1182 if (reportDataStartTimeMs != null) { |
| 1183 _json["reportDataStartTimeMs"] = reportDataStartTimeMs; |
| 1184 } |
| 1185 if (status != null) { |
| 1186 _json["status"] = (status).toJson(); |
| 1187 } |
| 1188 return _json; |
| 1189 } |
| 1190 } |
| 1191 |
| 1192 |
| 1193 /** Report status. */ |
| 1194 class ReportStatus { |
| 1195 /** If the report failed, this records the cause. */ |
| 1196 ReportFailure failure; |
| 1197 |
| 1198 /** The time when this report either completed successfully or failed. */ |
| 1199 core.String finishTimeMs; |
| 1200 |
| 1201 /** |
| 1202 * The file type of the report. |
| 1203 * Possible string values are: |
| 1204 * - "CSV" |
| 1205 * - "EXCEL_CSV" |
| 1206 * - "XLSX" |
| 1207 */ |
| 1208 core.String format; |
| 1209 |
| 1210 /** |
| 1211 * The state of the report. |
| 1212 * Possible string values are: |
| 1213 * - "DONE" |
| 1214 * - "FAILED" |
| 1215 * - "RUNNING" |
| 1216 */ |
| 1217 core.String state; |
| 1218 |
| 1219 |
| 1220 ReportStatus(); |
| 1221 |
| 1222 ReportStatus.fromJson(core.Map _json) { |
| 1223 if (_json.containsKey("failure")) { |
| 1224 failure = new ReportFailure.fromJson(_json["failure"]); |
| 1225 } |
| 1226 if (_json.containsKey("finishTimeMs")) { |
| 1227 finishTimeMs = _json["finishTimeMs"]; |
| 1228 } |
| 1229 if (_json.containsKey("format")) { |
| 1230 format = _json["format"]; |
| 1231 } |
| 1232 if (_json.containsKey("state")) { |
| 1233 state = _json["state"]; |
| 1234 } |
| 1235 } |
| 1236 |
| 1237 core.Map toJson() { |
| 1238 var _json = new core.Map(); |
| 1239 if (failure != null) { |
| 1240 _json["failure"] = (failure).toJson(); |
| 1241 } |
| 1242 if (finishTimeMs != null) { |
| 1243 _json["finishTimeMs"] = finishTimeMs; |
| 1244 } |
| 1245 if (format != null) { |
| 1246 _json["format"] = format; |
| 1247 } |
| 1248 if (state != null) { |
| 1249 _json["state"] = state; |
| 1250 } |
| 1251 return _json; |
| 1252 } |
| 1253 } |
| 1254 |
| 1255 |
| 1256 /** Represents the upload status of a row in the request. */ |
| 1257 class RowStatus { |
| 1258 /** Whether the stored entity is changed as a result of upload. */ |
| 1259 core.bool changed; |
| 1260 |
| 1261 /** Entity Id. */ |
| 1262 core.String entityId; |
| 1263 |
| 1264 /** Entity name. */ |
| 1265 core.String entityName; |
| 1266 |
| 1267 /** Reasons why the entity can't be uploaded. */ |
| 1268 core.List<core.String> errors; |
| 1269 |
| 1270 /** Whether the entity is persisted. */ |
| 1271 core.bool persisted; |
| 1272 |
| 1273 /** Row number. */ |
| 1274 core.int rowNumber; |
| 1275 |
| 1276 |
| 1277 RowStatus(); |
| 1278 |
| 1279 RowStatus.fromJson(core.Map _json) { |
| 1280 if (_json.containsKey("changed")) { |
| 1281 changed = _json["changed"]; |
| 1282 } |
| 1283 if (_json.containsKey("entityId")) { |
| 1284 entityId = _json["entityId"]; |
| 1285 } |
| 1286 if (_json.containsKey("entityName")) { |
| 1287 entityName = _json["entityName"]; |
| 1288 } |
| 1289 if (_json.containsKey("errors")) { |
| 1290 errors = _json["errors"]; |
| 1291 } |
| 1292 if (_json.containsKey("persisted")) { |
| 1293 persisted = _json["persisted"]; |
| 1294 } |
| 1295 if (_json.containsKey("rowNumber")) { |
| 1296 rowNumber = _json["rowNumber"]; |
| 1297 } |
| 1298 } |
| 1299 |
| 1300 core.Map toJson() { |
| 1301 var _json = new core.Map(); |
| 1302 if (changed != null) { |
| 1303 _json["changed"] = changed; |
| 1304 } |
| 1305 if (entityId != null) { |
| 1306 _json["entityId"] = entityId; |
| 1307 } |
| 1308 if (entityName != null) { |
| 1309 _json["entityName"] = entityName; |
| 1310 } |
| 1311 if (errors != null) { |
| 1312 _json["errors"] = errors; |
| 1313 } |
| 1314 if (persisted != null) { |
| 1315 _json["persisted"] = persisted; |
| 1316 } |
| 1317 if (rowNumber != null) { |
| 1318 _json["rowNumber"] = rowNumber; |
| 1319 } |
| 1320 return _json; |
| 1321 } |
| 1322 } |
| 1323 |
| 1324 |
| 1325 /** Request to run a stored query to generate a report. */ |
| 1326 class RunQueryRequest { |
| 1327 /** |
| 1328 * Report data range used to generate the report. |
| 1329 * Possible string values are: |
| 1330 * - "ALL_TIME" |
| 1331 * - "CURRENT_DAY" |
| 1332 * - "CUSTOM_DATES" |
| 1333 * - "LAST_14_DAYS" |
| 1334 * - "LAST_30_DAYS" |
| 1335 * - "LAST_365_DAYS" |
| 1336 * - "LAST_7_DAYS" |
| 1337 * - "LAST_90_DAYS" |
| 1338 * - "MONTH_TO_DATE" |
| 1339 * - "PREVIOUS_DAY" |
| 1340 * - "PREVIOUS_HALF_MONTH" |
| 1341 * - "PREVIOUS_MONTH" |
| 1342 * - "PREVIOUS_QUARTER" |
| 1343 * - "PREVIOUS_WEEK" |
| 1344 * - "PREVIOUS_YEAR" |
| 1345 * - "QUARTER_TO_DATE" |
| 1346 * - "WEEK_TO_DATE" |
| 1347 * - "YEAR_TO_DATE" |
| 1348 */ |
| 1349 core.String dataRange; |
| 1350 |
| 1351 /** |
| 1352 * The ending time for the data that is shown in the report. Note, |
| 1353 * reportDataEndTimeMs is required if dataRange is CUSTOM_DATES and ignored |
| 1354 * otherwise. |
| 1355 */ |
| 1356 core.String reportDataEndTimeMs; |
| 1357 |
| 1358 /** |
| 1359 * The starting time for the data that is shown in the report. Note, |
| 1360 * reportDataStartTimeMs is required if dataRange is CUSTOM_DATES and ignored |
| 1361 * otherwise. |
| 1362 */ |
| 1363 core.String reportDataStartTimeMs; |
| 1364 |
| 1365 /** |
| 1366 * Canonical timezone code for report data time. Defaults to America/New_York. |
| 1367 */ |
| 1368 core.String timezoneCode; |
| 1369 |
| 1370 |
| 1371 RunQueryRequest(); |
| 1372 |
| 1373 RunQueryRequest.fromJson(core.Map _json) { |
| 1374 if (_json.containsKey("dataRange")) { |
| 1375 dataRange = _json["dataRange"]; |
| 1376 } |
| 1377 if (_json.containsKey("reportDataEndTimeMs")) { |
| 1378 reportDataEndTimeMs = _json["reportDataEndTimeMs"]; |
| 1379 } |
| 1380 if (_json.containsKey("reportDataStartTimeMs")) { |
| 1381 reportDataStartTimeMs = _json["reportDataStartTimeMs"]; |
| 1382 } |
| 1383 if (_json.containsKey("timezoneCode")) { |
| 1384 timezoneCode = _json["timezoneCode"]; |
| 1385 } |
| 1386 } |
| 1387 |
| 1388 core.Map toJson() { |
| 1389 var _json = new core.Map(); |
| 1390 if (dataRange != null) { |
| 1391 _json["dataRange"] = dataRange; |
| 1392 } |
| 1393 if (reportDataEndTimeMs != null) { |
| 1394 _json["reportDataEndTimeMs"] = reportDataEndTimeMs; |
| 1395 } |
| 1396 if (reportDataStartTimeMs != null) { |
| 1397 _json["reportDataStartTimeMs"] = reportDataStartTimeMs; |
| 1398 } |
| 1399 if (timezoneCode != null) { |
| 1400 _json["timezoneCode"] = timezoneCode; |
| 1401 } |
| 1402 return _json; |
| 1403 } |
| 1404 } |
| 1405 |
| 1406 |
| 1407 /** Request to upload line items. */ |
| 1408 class UploadLineItemsRequest { |
| 1409 /** |
| 1410 * Set to true to get upload status without actually persisting the line |
| 1411 * items. |
| 1412 */ |
| 1413 core.bool dryRun; |
| 1414 |
| 1415 /** |
| 1416 * Format the line items are in. Default to CSV. |
| 1417 * Possible string values are: |
| 1418 * - "CSV" |
| 1419 */ |
| 1420 core.String format; |
| 1421 |
| 1422 /** |
| 1423 * Line items in CSV to upload. Refer to Entity Write File Format for more |
| 1424 * information on file format. |
| 1425 */ |
| 1426 core.String lineItems; |
| 1427 |
| 1428 |
| 1429 UploadLineItemsRequest(); |
| 1430 |
| 1431 UploadLineItemsRequest.fromJson(core.Map _json) { |
| 1432 if (_json.containsKey("dryRun")) { |
| 1433 dryRun = _json["dryRun"]; |
| 1434 } |
| 1435 if (_json.containsKey("format")) { |
| 1436 format = _json["format"]; |
| 1437 } |
| 1438 if (_json.containsKey("lineItems")) { |
| 1439 lineItems = _json["lineItems"]; |
| 1440 } |
| 1441 } |
| 1442 |
| 1443 core.Map toJson() { |
| 1444 var _json = new core.Map(); |
| 1445 if (dryRun != null) { |
| 1446 _json["dryRun"] = dryRun; |
| 1447 } |
| 1448 if (format != null) { |
| 1449 _json["format"] = format; |
| 1450 } |
| 1451 if (lineItems != null) { |
| 1452 _json["lineItems"] = lineItems; |
| 1453 } |
| 1454 return _json; |
| 1455 } |
| 1456 } |
| 1457 |
| 1458 |
| 1459 /** Upload line items response. */ |
| 1460 class UploadLineItemsResponse { |
| 1461 /** Status of upload. */ |
| 1462 UploadStatus uploadStatus; |
| 1463 |
| 1464 |
| 1465 UploadLineItemsResponse(); |
| 1466 |
| 1467 UploadLineItemsResponse.fromJson(core.Map _json) { |
| 1468 if (_json.containsKey("uploadStatus")) { |
| 1469 uploadStatus = new UploadStatus.fromJson(_json["uploadStatus"]); |
| 1470 } |
| 1471 } |
| 1472 |
| 1473 core.Map toJson() { |
| 1474 var _json = new core.Map(); |
| 1475 if (uploadStatus != null) { |
| 1476 _json["uploadStatus"] = (uploadStatus).toJson(); |
| 1477 } |
| 1478 return _json; |
| 1479 } |
| 1480 } |
| 1481 |
| 1482 |
| 1483 /** Represents the status of upload. */ |
| 1484 class UploadStatus { |
| 1485 /** Reasons why upload can't be completed. */ |
| 1486 core.List<core.String> errors; |
| 1487 |
| 1488 /** Per-row upload status. */ |
| 1489 core.List<RowStatus> rowStatus; |
| 1490 |
| 1491 |
| 1492 UploadStatus(); |
| 1493 |
| 1494 UploadStatus.fromJson(core.Map _json) { |
| 1495 if (_json.containsKey("errors")) { |
| 1496 errors = _json["errors"]; |
| 1497 } |
| 1498 if (_json.containsKey("rowStatus")) { |
| 1499 rowStatus = _json["rowStatus"].map((value) => new RowStatus.fromJson(value
)).toList(); |
| 1500 } |
| 1501 } |
| 1502 |
| 1503 core.Map toJson() { |
| 1504 var _json = new core.Map(); |
| 1505 if (errors != null) { |
| 1506 _json["errors"] = errors; |
| 1507 } |
| 1508 if (rowStatus != null) { |
| 1509 _json["rowStatus"] = rowStatus.map((value) => (value).toJson()).toList(); |
| 1510 } |
| 1511 return _json; |
| 1512 } |
| 1513 } |
| 1514 |
| 1515 |
OLD | NEW |