Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: generated/googleapis/lib/adexchangeseller/v1_1.dart

Issue 559053002: Generate 0.1.0 version of googleapis/googleapis_beta (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 library googleapis.adexchangeseller.v1_1;
2
3 import "dart:core" as core;
4 import "dart:collection" as collection;
5 import "dart:async" as async;
6 import "dart:convert" as convert;
7
8 import "package:crypto/crypto.dart" as crypto;
9 import 'package:http/http.dart' as http;
10 import '../src/common_internal.dart' as common_internal;
11 import '../common/common.dart' as common;
12
13 export '../common/common.dart' show ApiRequestError;
14 export '../common/common.dart' show DetailedApiRequestError;
15
16 /**
17 * Gives Ad Exchange seller users access to their inventory and the ability to
18 * generate reports
19 */
20 class AdexchangesellerApi {
21 /** View and manage your Ad Exchange data */
22 static const AdexchangeSellerScope = "https://www.googleapis.com/auth/adexchan ge.seller";
23
24 /** View your Ad Exchange data */
25 static const AdexchangeSellerReadonlyScope = "https://www.googleapis.com/auth/ adexchange.seller.readonly";
26
27
28 final common_internal.ApiRequester _requester;
29
30 AccountsResourceApi get accounts => new AccountsResourceApi(_requester);
31 AdclientsResourceApi get adclients => new AdclientsResourceApi(_requester);
32 AdunitsResourceApi get adunits => new AdunitsResourceApi(_requester);
33 AlertsResourceApi get alerts => new AlertsResourceApi(_requester);
34 CustomchannelsResourceApi get customchannels => new CustomchannelsResourceApi( _requester);
35 MetadataResourceApi get metadata => new MetadataResourceApi(_requester);
36 PreferreddealsResourceApi get preferreddeals => new PreferreddealsResourceApi( _requester);
37 ReportsResourceApi get reports => new ReportsResourceApi(_requester);
38 UrlchannelsResourceApi get urlchannels => new UrlchannelsResourceApi(_requeste r);
39
40 AdexchangesellerApi(http.Client client) :
41 _requester = new common_internal.ApiRequester(client, "https://www.googlea pis.com/", "/adexchangeseller/v1.1/");
42 }
43
44
45 /** Not documented yet. */
46 class AccountsResourceApi {
47 final common_internal.ApiRequester _requester;
48
49 AccountsResourceApi(common_internal.ApiRequester client) :
50 _requester = client;
51
52 /**
53 * Get information about the selected Ad Exchange account.
54 *
55 * Request parameters:
56 *
57 * [accountId] - Account to get information about. Tip: 'myaccount' is a valid
58 * ID.
59 *
60 * Completes with a [Account].
61 *
62 * Completes with a [common.ApiRequestError] if the API endpoint returned an
63 * error.
64 *
65 * If the used [http.Client] completes with an error when making a REST call,
66 * this method will complete with the same error.
67 */
68 async.Future<Account> get(core.String accountId) {
69 var _url = null;
70 var _queryParams = new core.Map();
71 var _uploadMedia = null;
72 var _uploadOptions = null;
73 var _downloadOptions = common.DownloadOptions.Metadata;
74 var _body = null;
75
76 if (accountId == null) {
77 throw new core.ArgumentError("Parameter accountId is required.");
78 }
79
80
81 _url = 'accounts/' + common_internal.Escaper.ecapeVariable('$accountId');
82
83 var _response = _requester.request(_url,
84 "GET",
85 body: _body,
86 queryParams: _queryParams,
87 uploadOptions: _uploadOptions,
88 uploadMedia: _uploadMedia,
89 downloadOptions: _downloadOptions);
90 return _response.then((data) => new Account.fromJson(data));
91 }
92
93 }
94
95
96 /** Not documented yet. */
97 class AdclientsResourceApi {
98 final common_internal.ApiRequester _requester;
99
100 AdclientsResourceApi(common_internal.ApiRequester client) :
101 _requester = client;
102
103 /**
104 * List all ad clients in this Ad Exchange account.
105 *
106 * Request parameters:
107 *
108 * [maxResults] - The maximum number of ad clients to include in the response,
109 * used for paging.
110 * Value must be between "0" and "10000".
111 *
112 * [pageToken] - A continuation token, used to page through ad clients. To
113 * retrieve the next page, set this parameter to the value of "nextPageToken"
114 * from the previous response.
115 *
116 * Completes with a [AdClients].
117 *
118 * Completes with a [common.ApiRequestError] if the API endpoint returned an
119 * error.
120 *
121 * If the used [http.Client] completes with an error when making a REST call,
122 * this method will complete with the same error.
123 */
124 async.Future<AdClients> list({core.int maxResults, core.String pageToken}) {
125 var _url = null;
126 var _queryParams = new core.Map();
127 var _uploadMedia = null;
128 var _uploadOptions = null;
129 var _downloadOptions = common.DownloadOptions.Metadata;
130 var _body = null;
131
132 if (maxResults != null) {
133 _queryParams["maxResults"] = ["${maxResults}"];
134 }
135 if (pageToken != null) {
136 _queryParams["pageToken"] = [pageToken];
137 }
138
139
140 _url = 'adclients';
141
142 var _response = _requester.request(_url,
143 "GET",
144 body: _body,
145 queryParams: _queryParams,
146 uploadOptions: _uploadOptions,
147 uploadMedia: _uploadMedia,
148 downloadOptions: _downloadOptions);
149 return _response.then((data) => new AdClients.fromJson(data));
150 }
151
152 }
153
154
155 /** Not documented yet. */
156 class AdunitsResourceApi {
157 final common_internal.ApiRequester _requester;
158
159 AdunitsCustomchannelsResourceApi get customchannels => new AdunitsCustomchanne lsResourceApi(_requester);
160
161 AdunitsResourceApi(common_internal.ApiRequester client) :
162 _requester = client;
163
164 /**
165 * Gets the specified ad unit in the specified ad client.
166 *
167 * Request parameters:
168 *
169 * [adClientId] - Ad client for which to get the ad unit.
170 *
171 * [adUnitId] - Ad unit to retrieve.
172 *
173 * Completes with a [AdUnit].
174 *
175 * Completes with a [common.ApiRequestError] if the API endpoint returned an
176 * error.
177 *
178 * If the used [http.Client] completes with an error when making a REST call,
179 * this method will complete with the same error.
180 */
181 async.Future<AdUnit> get(core.String adClientId, core.String adUnitId) {
182 var _url = null;
183 var _queryParams = new core.Map();
184 var _uploadMedia = null;
185 var _uploadOptions = null;
186 var _downloadOptions = common.DownloadOptions.Metadata;
187 var _body = null;
188
189 if (adClientId == null) {
190 throw new core.ArgumentError("Parameter adClientId is required.");
191 }
192 if (adUnitId == null) {
193 throw new core.ArgumentError("Parameter adUnitId is required.");
194 }
195
196
197 _url = 'adclients/' + common_internal.Escaper.ecapeVariable('$adClientId') + '/adunits/' + common_internal.Escaper.ecapeVariable('$adUnitId');
198
199 var _response = _requester.request(_url,
200 "GET",
201 body: _body,
202 queryParams: _queryParams,
203 uploadOptions: _uploadOptions,
204 uploadMedia: _uploadMedia,
205 downloadOptions: _downloadOptions);
206 return _response.then((data) => new AdUnit.fromJson(data));
207 }
208
209 /**
210 * List all ad units in the specified ad client for this Ad Exchange account.
211 *
212 * Request parameters:
213 *
214 * [adClientId] - Ad client for which to list ad units.
215 *
216 * [includeInactive] - Whether to include inactive ad units. Default: true.
217 *
218 * [maxResults] - The maximum number of ad units to include in the response,
219 * used for paging.
220 * Value must be between "0" and "10000".
221 *
222 * [pageToken] - A continuation token, used to page through ad units. To
223 * retrieve the next page, set this parameter to the value of "nextPageToken"
224 * from the previous response.
225 *
226 * Completes with a [AdUnits].
227 *
228 * Completes with a [common.ApiRequestError] if the API endpoint returned an
229 * error.
230 *
231 * If the used [http.Client] completes with an error when making a REST call,
232 * this method will complete with the same error.
233 */
234 async.Future<AdUnits> list(core.String adClientId, {core.bool includeInactive, core.int maxResults, core.String pageToken}) {
235 var _url = null;
236 var _queryParams = new core.Map();
237 var _uploadMedia = null;
238 var _uploadOptions = null;
239 var _downloadOptions = common.DownloadOptions.Metadata;
240 var _body = null;
241
242 if (adClientId == null) {
243 throw new core.ArgumentError("Parameter adClientId is required.");
244 }
245 if (includeInactive != null) {
246 _queryParams["includeInactive"] = ["${includeInactive}"];
247 }
248 if (maxResults != null) {
249 _queryParams["maxResults"] = ["${maxResults}"];
250 }
251 if (pageToken != null) {
252 _queryParams["pageToken"] = [pageToken];
253 }
254
255
256 _url = 'adclients/' + common_internal.Escaper.ecapeVariable('$adClientId') + '/adunits';
257
258 var _response = _requester.request(_url,
259 "GET",
260 body: _body,
261 queryParams: _queryParams,
262 uploadOptions: _uploadOptions,
263 uploadMedia: _uploadMedia,
264 downloadOptions: _downloadOptions);
265 return _response.then((data) => new AdUnits.fromJson(data));
266 }
267
268 }
269
270
271 /** Not documented yet. */
272 class AdunitsCustomchannelsResourceApi {
273 final common_internal.ApiRequester _requester;
274
275 AdunitsCustomchannelsResourceApi(common_internal.ApiRequester client) :
276 _requester = client;
277
278 /**
279 * List all custom channels which the specified ad unit belongs to.
280 *
281 * Request parameters:
282 *
283 * [adClientId] - Ad client which contains the ad unit.
284 *
285 * [adUnitId] - Ad unit for which to list custom channels.
286 *
287 * [maxResults] - The maximum number of custom channels to include in the
288 * response, used for paging.
289 * Value must be between "0" and "10000".
290 *
291 * [pageToken] - A continuation token, used to page through custom channels.
292 * To retrieve the next page, set this parameter to the value of
293 * "nextPageToken" from the previous response.
294 *
295 * Completes with a [CustomChannels].
296 *
297 * Completes with a [common.ApiRequestError] if the API endpoint returned an
298 * error.
299 *
300 * If the used [http.Client] completes with an error when making a REST call,
301 * this method will complete with the same error.
302 */
303 async.Future<CustomChannels> list(core.String adClientId, core.String adUnitId , {core.int maxResults, core.String pageToken}) {
304 var _url = null;
305 var _queryParams = new core.Map();
306 var _uploadMedia = null;
307 var _uploadOptions = null;
308 var _downloadOptions = common.DownloadOptions.Metadata;
309 var _body = null;
310
311 if (adClientId == null) {
312 throw new core.ArgumentError("Parameter adClientId is required.");
313 }
314 if (adUnitId == null) {
315 throw new core.ArgumentError("Parameter adUnitId is required.");
316 }
317 if (maxResults != null) {
318 _queryParams["maxResults"] = ["${maxResults}"];
319 }
320 if (pageToken != null) {
321 _queryParams["pageToken"] = [pageToken];
322 }
323
324
325 _url = 'adclients/' + common_internal.Escaper.ecapeVariable('$adClientId') + '/adunits/' + common_internal.Escaper.ecapeVariable('$adUnitId') + '/customchan nels';
326
327 var _response = _requester.request(_url,
328 "GET",
329 body: _body,
330 queryParams: _queryParams,
331 uploadOptions: _uploadOptions,
332 uploadMedia: _uploadMedia,
333 downloadOptions: _downloadOptions);
334 return _response.then((data) => new CustomChannels.fromJson(data));
335 }
336
337 }
338
339
340 /** Not documented yet. */
341 class AlertsResourceApi {
342 final common_internal.ApiRequester _requester;
343
344 AlertsResourceApi(common_internal.ApiRequester client) :
345 _requester = client;
346
347 /**
348 * List the alerts for this Ad Exchange account.
349 *
350 * Request parameters:
351 *
352 * [locale] - The locale to use for translating alert messages. The account
353 * locale will be used if this is not supplied. The AdSense default (English)
354 * will be used if the supplied locale is invalid or unsupported.
355 *
356 * Completes with a [Alerts].
357 *
358 * Completes with a [common.ApiRequestError] if the API endpoint returned an
359 * error.
360 *
361 * If the used [http.Client] completes with an error when making a REST call,
362 * this method will complete with the same error.
363 */
364 async.Future<Alerts> list({core.String locale}) {
365 var _url = null;
366 var _queryParams = new core.Map();
367 var _uploadMedia = null;
368 var _uploadOptions = null;
369 var _downloadOptions = common.DownloadOptions.Metadata;
370 var _body = null;
371
372 if (locale != null) {
373 _queryParams["locale"] = [locale];
374 }
375
376
377 _url = 'alerts';
378
379 var _response = _requester.request(_url,
380 "GET",
381 body: _body,
382 queryParams: _queryParams,
383 uploadOptions: _uploadOptions,
384 uploadMedia: _uploadMedia,
385 downloadOptions: _downloadOptions);
386 return _response.then((data) => new Alerts.fromJson(data));
387 }
388
389 }
390
391
392 /** Not documented yet. */
393 class CustomchannelsResourceApi {
394 final common_internal.ApiRequester _requester;
395
396 CustomchannelsAdunitsResourceApi get adunits => new CustomchannelsAdunitsResou rceApi(_requester);
397
398 CustomchannelsResourceApi(common_internal.ApiRequester client) :
399 _requester = client;
400
401 /**
402 * Get the specified custom channel from the specified ad client.
403 *
404 * Request parameters:
405 *
406 * [adClientId] - Ad client which contains the custom channel.
407 *
408 * [customChannelId] - Custom channel to retrieve.
409 *
410 * Completes with a [CustomChannel].
411 *
412 * Completes with a [common.ApiRequestError] if the API endpoint returned an
413 * error.
414 *
415 * If the used [http.Client] completes with an error when making a REST call,
416 * this method will complete with the same error.
417 */
418 async.Future<CustomChannel> get(core.String adClientId, core.String customChan nelId) {
419 var _url = null;
420 var _queryParams = new core.Map();
421 var _uploadMedia = null;
422 var _uploadOptions = null;
423 var _downloadOptions = common.DownloadOptions.Metadata;
424 var _body = null;
425
426 if (adClientId == null) {
427 throw new core.ArgumentError("Parameter adClientId is required.");
428 }
429 if (customChannelId == null) {
430 throw new core.ArgumentError("Parameter customChannelId is required.");
431 }
432
433
434 _url = 'adclients/' + common_internal.Escaper.ecapeVariable('$adClientId') + '/customchannels/' + common_internal.Escaper.ecapeVariable('$customChannelId');
435
436 var _response = _requester.request(_url,
437 "GET",
438 body: _body,
439 queryParams: _queryParams,
440 uploadOptions: _uploadOptions,
441 uploadMedia: _uploadMedia,
442 downloadOptions: _downloadOptions);
443 return _response.then((data) => new CustomChannel.fromJson(data));
444 }
445
446 /**
447 * List all custom channels in the specified ad client for this Ad Exchange
448 * account.
449 *
450 * Request parameters:
451 *
452 * [adClientId] - Ad client for which to list custom channels.
453 *
454 * [maxResults] - The maximum number of custom channels to include in the
455 * response, used for paging.
456 * Value must be between "0" and "10000".
457 *
458 * [pageToken] - A continuation token, used to page through custom channels.
459 * To retrieve the next page, set this parameter to the value of
460 * "nextPageToken" from the previous response.
461 *
462 * Completes with a [CustomChannels].
463 *
464 * Completes with a [common.ApiRequestError] if the API endpoint returned an
465 * error.
466 *
467 * If the used [http.Client] completes with an error when making a REST call,
468 * this method will complete with the same error.
469 */
470 async.Future<CustomChannels> list(core.String adClientId, {core.int maxResults , core.String pageToken}) {
471 var _url = null;
472 var _queryParams = new core.Map();
473 var _uploadMedia = null;
474 var _uploadOptions = null;
475 var _downloadOptions = common.DownloadOptions.Metadata;
476 var _body = null;
477
478 if (adClientId == null) {
479 throw new core.ArgumentError("Parameter adClientId is required.");
480 }
481 if (maxResults != null) {
482 _queryParams["maxResults"] = ["${maxResults}"];
483 }
484 if (pageToken != null) {
485 _queryParams["pageToken"] = [pageToken];
486 }
487
488
489 _url = 'adclients/' + common_internal.Escaper.ecapeVariable('$adClientId') + '/customchannels';
490
491 var _response = _requester.request(_url,
492 "GET",
493 body: _body,
494 queryParams: _queryParams,
495 uploadOptions: _uploadOptions,
496 uploadMedia: _uploadMedia,
497 downloadOptions: _downloadOptions);
498 return _response.then((data) => new CustomChannels.fromJson(data));
499 }
500
501 }
502
503
504 /** Not documented yet. */
505 class CustomchannelsAdunitsResourceApi {
506 final common_internal.ApiRequester _requester;
507
508 CustomchannelsAdunitsResourceApi(common_internal.ApiRequester client) :
509 _requester = client;
510
511 /**
512 * List all ad units in the specified custom channel.
513 *
514 * Request parameters:
515 *
516 * [adClientId] - Ad client which contains the custom channel.
517 *
518 * [customChannelId] - Custom channel for which to list ad units.
519 *
520 * [includeInactive] - Whether to include inactive ad units. Default: true.
521 *
522 * [maxResults] - The maximum number of ad units to include in the response,
523 * used for paging.
524 * Value must be between "0" and "10000".
525 *
526 * [pageToken] - A continuation token, used to page through ad units. To
527 * retrieve the next page, set this parameter to the value of "nextPageToken"
528 * from the previous response.
529 *
530 * Completes with a [AdUnits].
531 *
532 * Completes with a [common.ApiRequestError] if the API endpoint returned an
533 * error.
534 *
535 * If the used [http.Client] completes with an error when making a REST call,
536 * this method will complete with the same error.
537 */
538 async.Future<AdUnits> list(core.String adClientId, core.String customChannelId , {core.bool includeInactive, core.int maxResults, core.String pageToken}) {
539 var _url = null;
540 var _queryParams = new core.Map();
541 var _uploadMedia = null;
542 var _uploadOptions = null;
543 var _downloadOptions = common.DownloadOptions.Metadata;
544 var _body = null;
545
546 if (adClientId == null) {
547 throw new core.ArgumentError("Parameter adClientId is required.");
548 }
549 if (customChannelId == null) {
550 throw new core.ArgumentError("Parameter customChannelId is required.");
551 }
552 if (includeInactive != null) {
553 _queryParams["includeInactive"] = ["${includeInactive}"];
554 }
555 if (maxResults != null) {
556 _queryParams["maxResults"] = ["${maxResults}"];
557 }
558 if (pageToken != null) {
559 _queryParams["pageToken"] = [pageToken];
560 }
561
562
563 _url = 'adclients/' + common_internal.Escaper.ecapeVariable('$adClientId') + '/customchannels/' + common_internal.Escaper.ecapeVariable('$customChannelId') + '/adunits';
564
565 var _response = _requester.request(_url,
566 "GET",
567 body: _body,
568 queryParams: _queryParams,
569 uploadOptions: _uploadOptions,
570 uploadMedia: _uploadMedia,
571 downloadOptions: _downloadOptions);
572 return _response.then((data) => new AdUnits.fromJson(data));
573 }
574
575 }
576
577
578 /** Not documented yet. */
579 class MetadataResourceApi {
580 final common_internal.ApiRequester _requester;
581
582 MetadataDimensionsResourceApi get dimensions => new MetadataDimensionsResource Api(_requester);
583 MetadataMetricsResourceApi get metrics => new MetadataMetricsResourceApi(_requ ester);
584
585 MetadataResourceApi(common_internal.ApiRequester client) :
586 _requester = client;
587 }
588
589
590 /** Not documented yet. */
591 class MetadataDimensionsResourceApi {
592 final common_internal.ApiRequester _requester;
593
594 MetadataDimensionsResourceApi(common_internal.ApiRequester client) :
595 _requester = client;
596
597 /**
598 * List the metadata for the dimensions available to this AdExchange account.
599 *
600 * Request parameters:
601 *
602 * Completes with a [Metadata].
603 *
604 * Completes with a [common.ApiRequestError] if the API endpoint returned an
605 * error.
606 *
607 * If the used [http.Client] completes with an error when making a REST call,
608 * this method will complete with the same error.
609 */
610 async.Future<Metadata> list() {
611 var _url = null;
612 var _queryParams = new core.Map();
613 var _uploadMedia = null;
614 var _uploadOptions = null;
615 var _downloadOptions = common.DownloadOptions.Metadata;
616 var _body = null;
617
618
619
620 _url = 'metadata/dimensions';
621
622 var _response = _requester.request(_url,
623 "GET",
624 body: _body,
625 queryParams: _queryParams,
626 uploadOptions: _uploadOptions,
627 uploadMedia: _uploadMedia,
628 downloadOptions: _downloadOptions);
629 return _response.then((data) => new Metadata.fromJson(data));
630 }
631
632 }
633
634
635 /** Not documented yet. */
636 class MetadataMetricsResourceApi {
637 final common_internal.ApiRequester _requester;
638
639 MetadataMetricsResourceApi(common_internal.ApiRequester client) :
640 _requester = client;
641
642 /**
643 * List the metadata for the metrics available to this AdExchange account.
644 *
645 * Request parameters:
646 *
647 * Completes with a [Metadata].
648 *
649 * Completes with a [common.ApiRequestError] if the API endpoint returned an
650 * error.
651 *
652 * If the used [http.Client] completes with an error when making a REST call,
653 * this method will complete with the same error.
654 */
655 async.Future<Metadata> list() {
656 var _url = null;
657 var _queryParams = new core.Map();
658 var _uploadMedia = null;
659 var _uploadOptions = null;
660 var _downloadOptions = common.DownloadOptions.Metadata;
661 var _body = null;
662
663
664
665 _url = 'metadata/metrics';
666
667 var _response = _requester.request(_url,
668 "GET",
669 body: _body,
670 queryParams: _queryParams,
671 uploadOptions: _uploadOptions,
672 uploadMedia: _uploadMedia,
673 downloadOptions: _downloadOptions);
674 return _response.then((data) => new Metadata.fromJson(data));
675 }
676
677 }
678
679
680 /** Not documented yet. */
681 class PreferreddealsResourceApi {
682 final common_internal.ApiRequester _requester;
683
684 PreferreddealsResourceApi(common_internal.ApiRequester client) :
685 _requester = client;
686
687 /**
688 * Get information about the selected Ad Exchange Preferred Deal.
689 *
690 * Request parameters:
691 *
692 * [dealId] - Preferred deal to get information about.
693 *
694 * Completes with a [PreferredDeal].
695 *
696 * Completes with a [common.ApiRequestError] if the API endpoint returned an
697 * error.
698 *
699 * If the used [http.Client] completes with an error when making a REST call,
700 * this method will complete with the same error.
701 */
702 async.Future<PreferredDeal> get(core.String dealId) {
703 var _url = null;
704 var _queryParams = new core.Map();
705 var _uploadMedia = null;
706 var _uploadOptions = null;
707 var _downloadOptions = common.DownloadOptions.Metadata;
708 var _body = null;
709
710 if (dealId == null) {
711 throw new core.ArgumentError("Parameter dealId is required.");
712 }
713
714
715 _url = 'preferreddeals/' + common_internal.Escaper.ecapeVariable('$dealId');
716
717 var _response = _requester.request(_url,
718 "GET",
719 body: _body,
720 queryParams: _queryParams,
721 uploadOptions: _uploadOptions,
722 uploadMedia: _uploadMedia,
723 downloadOptions: _downloadOptions);
724 return _response.then((data) => new PreferredDeal.fromJson(data));
725 }
726
727 /**
728 * List the preferred deals for this Ad Exchange account.
729 *
730 * Request parameters:
731 *
732 * Completes with a [PreferredDeals].
733 *
734 * Completes with a [common.ApiRequestError] if the API endpoint returned an
735 * error.
736 *
737 * If the used [http.Client] completes with an error when making a REST call,
738 * this method will complete with the same error.
739 */
740 async.Future<PreferredDeals> list() {
741 var _url = null;
742 var _queryParams = new core.Map();
743 var _uploadMedia = null;
744 var _uploadOptions = null;
745 var _downloadOptions = common.DownloadOptions.Metadata;
746 var _body = null;
747
748
749
750 _url = 'preferreddeals';
751
752 var _response = _requester.request(_url,
753 "GET",
754 body: _body,
755 queryParams: _queryParams,
756 uploadOptions: _uploadOptions,
757 uploadMedia: _uploadMedia,
758 downloadOptions: _downloadOptions);
759 return _response.then((data) => new PreferredDeals.fromJson(data));
760 }
761
762 }
763
764
765 /** Not documented yet. */
766 class ReportsResourceApi {
767 final common_internal.ApiRequester _requester;
768
769 ReportsSavedResourceApi get saved => new ReportsSavedResourceApi(_requester);
770
771 ReportsResourceApi(common_internal.ApiRequester client) :
772 _requester = client;
773
774 /**
775 * Generate an Ad Exchange report based on the report request sent in the
776 * query parameters. Returns the result as JSON; to retrieve output in CSV
777 * format specify "alt=csv" as a query parameter.
778 *
779 * Request parameters:
780 *
781 * [startDate] - Start of the date range to report on in "YYYY-MM-DD" format,
782 * inclusive.
783 * Value must have pattern
784 * "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}? )".
785 *
786 * [endDate] - End of the date range to report on in "YYYY-MM-DD" format,
787 * inclusive.
788 * Value must have pattern
789 * "\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}? )".
790 *
791 * [dimension] - Dimensions to base the report on.
792 * Value must have pattern "[a-zA-Z_]+".
793 *
794 * [filter] - Filters to be run on the report.
795 * Value must have pattern "[a-zA-Z_]+(==|=@).+".
796 *
797 * [locale] - Optional locale to use for translating report output to a local
798 * language. Defaults to "en_US" if not specified.
799 * Value must have pattern "[a-zA-Z_]+".
800 *
801 * [maxResults] - The maximum number of rows of report data to return.
802 * Value must be between "0" and "50000".
803 *
804 * [metric] - Numeric columns to include in the report.
805 * Value must have pattern "[a-zA-Z_]+".
806 *
807 * [sort] - The name of a dimension or metric to sort the resulting report on,
808 * optionally prefixed with "+" to sort ascending or "-" to sort descending.
809 * If no prefix is specified, the column is sorted ascending.
810 * Value must have pattern "(\+|-)?[a-zA-Z_]+".
811 *
812 * [startIndex] - Index of the first row of report data to return.
813 * Value must be between "0" and "5000".
814 *
815 * [downloadOptions] - Options for downloading. A download can be either a
816 * Metadata (default) or Media download. Partial Media downloads are possible
817 * as well.
818 *
819 * Completes with a
820 *
821 * - [Report] for Metadata downloads (see [downloadOptions]).
822 *
823 * - [common.Media] for Media downloads (see [downloadOptions]).
824 *
825 * Completes with a [common.ApiRequestError] if the API endpoint returned an
826 * error.
827 *
828 * If the used [http.Client] completes with an error when making a REST call,
829 * this method will complete with the same error.
830 */
831 async.Future generate(core.String startDate, core.String endDate, {core.List<c ore.String> dimension, core.List<core.String> filter, core.String locale, core.i nt maxResults, core.List<core.String> metric, core.List<core.String> sort, core. int startIndex, common.DownloadOptions downloadOptions: common.DownloadOptions.M etadata}) {
832 var _url = null;
833 var _queryParams = new core.Map();
834 var _uploadMedia = null;
835 var _uploadOptions = null;
836 var _downloadOptions = common.DownloadOptions.Metadata;
837 var _body = null;
838
839 if (startDate == null) {
840 throw new core.ArgumentError("Parameter startDate is required.");
841 }
842 _queryParams["startDate"] = [startDate];
843 if (endDate == null) {
844 throw new core.ArgumentError("Parameter endDate is required.");
845 }
846 _queryParams["endDate"] = [endDate];
847 if (dimension != null) {
848 _queryParams["dimension"] = dimension;
849 }
850 if (filter != null) {
851 _queryParams["filter"] = filter;
852 }
853 if (locale != null) {
854 _queryParams["locale"] = [locale];
855 }
856 if (maxResults != null) {
857 _queryParams["maxResults"] = ["${maxResults}"];
858 }
859 if (metric != null) {
860 _queryParams["metric"] = metric;
861 }
862 if (sort != null) {
863 _queryParams["sort"] = sort;
864 }
865 if (startIndex != null) {
866 _queryParams["startIndex"] = ["${startIndex}"];
867 }
868
869 _downloadOptions = downloadOptions;
870
871 _url = 'reports';
872
873 var _response = _requester.request(_url,
874 "GET",
875 body: _body,
876 queryParams: _queryParams,
877 uploadOptions: _uploadOptions,
878 uploadMedia: _uploadMedia,
879 downloadOptions: _downloadOptions);
880 if (_downloadOptions == null ||
881 _downloadOptions == common.DownloadOptions.Metadata) {
882 return _response.then((data) => new Report.fromJson(data));
883 } else {
884 return _response;
885 }
886 }
887
888 }
889
890
891 /** Not documented yet. */
892 class ReportsSavedResourceApi {
893 final common_internal.ApiRequester _requester;
894
895 ReportsSavedResourceApi(common_internal.ApiRequester client) :
896 _requester = client;
897
898 /**
899 * Generate an Ad Exchange report based on the saved report ID sent in the
900 * query parameters.
901 *
902 * Request parameters:
903 *
904 * [savedReportId] - The saved report to retrieve.
905 *
906 * [locale] - Optional locale to use for translating report output to a local
907 * language. Defaults to "en_US" if not specified.
908 * Value must have pattern "[a-zA-Z_]+".
909 *
910 * [maxResults] - The maximum number of rows of report data to return.
911 * Value must be between "0" and "50000".
912 *
913 * [startIndex] - Index of the first row of report data to return.
914 * Value must be between "0" and "5000".
915 *
916 * Completes with a [Report].
917 *
918 * Completes with a [common.ApiRequestError] if the API endpoint returned an
919 * error.
920 *
921 * If the used [http.Client] completes with an error when making a REST call,
922 * this method will complete with the same error.
923 */
924 async.Future<Report> generate(core.String savedReportId, {core.String locale, core.int maxResults, core.int startIndex}) {
925 var _url = null;
926 var _queryParams = new core.Map();
927 var _uploadMedia = null;
928 var _uploadOptions = null;
929 var _downloadOptions = common.DownloadOptions.Metadata;
930 var _body = null;
931
932 if (savedReportId == null) {
933 throw new core.ArgumentError("Parameter savedReportId is required.");
934 }
935 if (locale != null) {
936 _queryParams["locale"] = [locale];
937 }
938 if (maxResults != null) {
939 _queryParams["maxResults"] = ["${maxResults}"];
940 }
941 if (startIndex != null) {
942 _queryParams["startIndex"] = ["${startIndex}"];
943 }
944
945
946 _url = 'reports/' + common_internal.Escaper.ecapeVariable('$savedReportId');
947
948 var _response = _requester.request(_url,
949 "GET",
950 body: _body,
951 queryParams: _queryParams,
952 uploadOptions: _uploadOptions,
953 uploadMedia: _uploadMedia,
954 downloadOptions: _downloadOptions);
955 return _response.then((data) => new Report.fromJson(data));
956 }
957
958 /**
959 * List all saved reports in this Ad Exchange account.
960 *
961 * Request parameters:
962 *
963 * [maxResults] - The maximum number of saved reports to include in the
964 * response, used for paging.
965 * Value must be between "0" and "100".
966 *
967 * [pageToken] - A continuation token, used to page through saved reports. To
968 * retrieve the next page, set this parameter to the value of "nextPageToken"
969 * from the previous response.
970 *
971 * Completes with a [SavedReports].
972 *
973 * Completes with a [common.ApiRequestError] if the API endpoint returned an
974 * error.
975 *
976 * If the used [http.Client] completes with an error when making a REST call,
977 * this method will complete with the same error.
978 */
979 async.Future<SavedReports> list({core.int maxResults, core.String pageToken}) {
980 var _url = null;
981 var _queryParams = new core.Map();
982 var _uploadMedia = null;
983 var _uploadOptions = null;
984 var _downloadOptions = common.DownloadOptions.Metadata;
985 var _body = null;
986
987 if (maxResults != null) {
988 _queryParams["maxResults"] = ["${maxResults}"];
989 }
990 if (pageToken != null) {
991 _queryParams["pageToken"] = [pageToken];
992 }
993
994
995 _url = 'reports/saved';
996
997 var _response = _requester.request(_url,
998 "GET",
999 body: _body,
1000 queryParams: _queryParams,
1001 uploadOptions: _uploadOptions,
1002 uploadMedia: _uploadMedia,
1003 downloadOptions: _downloadOptions);
1004 return _response.then((data) => new SavedReports.fromJson(data));
1005 }
1006
1007 }
1008
1009
1010 /** Not documented yet. */
1011 class UrlchannelsResourceApi {
1012 final common_internal.ApiRequester _requester;
1013
1014 UrlchannelsResourceApi(common_internal.ApiRequester client) :
1015 _requester = client;
1016
1017 /**
1018 * List all URL channels in the specified ad client for this Ad Exchange
1019 * account.
1020 *
1021 * Request parameters:
1022 *
1023 * [adClientId] - Ad client for which to list URL channels.
1024 *
1025 * [maxResults] - The maximum number of URL channels to include in the
1026 * response, used for paging.
1027 * Value must be between "0" and "10000".
1028 *
1029 * [pageToken] - A continuation token, used to page through URL channels. To
1030 * retrieve the next page, set this parameter to the value of "nextPageToken"
1031 * from the previous response.
1032 *
1033 * Completes with a [UrlChannels].
1034 *
1035 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1036 * error.
1037 *
1038 * If the used [http.Client] completes with an error when making a REST call,
1039 * this method will complete with the same error.
1040 */
1041 async.Future<UrlChannels> list(core.String adClientId, {core.int maxResults, c ore.String pageToken}) {
1042 var _url = null;
1043 var _queryParams = new core.Map();
1044 var _uploadMedia = null;
1045 var _uploadOptions = null;
1046 var _downloadOptions = common.DownloadOptions.Metadata;
1047 var _body = null;
1048
1049 if (adClientId == null) {
1050 throw new core.ArgumentError("Parameter adClientId is required.");
1051 }
1052 if (maxResults != null) {
1053 _queryParams["maxResults"] = ["${maxResults}"];
1054 }
1055 if (pageToken != null) {
1056 _queryParams["pageToken"] = [pageToken];
1057 }
1058
1059
1060 _url = 'adclients/' + common_internal.Escaper.ecapeVariable('$adClientId') + '/urlchannels';
1061
1062 var _response = _requester.request(_url,
1063 "GET",
1064 body: _body,
1065 queryParams: _queryParams,
1066 uploadOptions: _uploadOptions,
1067 uploadMedia: _uploadMedia,
1068 downloadOptions: _downloadOptions);
1069 return _response.then((data) => new UrlChannels.fromJson(data));
1070 }
1071
1072 }
1073
1074
1075
1076 /** Not documented yet. */
1077 class Account {
1078 /** Unique identifier of this account. */
1079 core.String id;
1080
1081 /** Kind of resource this is, in this case adexchangeseller#account. */
1082 core.String kind;
1083
1084 /** Name of this account. */
1085 core.String name;
1086
1087
1088 Account();
1089
1090 Account.fromJson(core.Map _json) {
1091 if (_json.containsKey("id")) {
1092 id = _json["id"];
1093 }
1094 if (_json.containsKey("kind")) {
1095 kind = _json["kind"];
1096 }
1097 if (_json.containsKey("name")) {
1098 name = _json["name"];
1099 }
1100 }
1101
1102 core.Map toJson() {
1103 var _json = new core.Map();
1104 if (id != null) {
1105 _json["id"] = id;
1106 }
1107 if (kind != null) {
1108 _json["kind"] = kind;
1109 }
1110 if (name != null) {
1111 _json["name"] = name;
1112 }
1113 return _json;
1114 }
1115 }
1116
1117
1118 /** Not documented yet. */
1119 class AdClient {
1120 /** Whether this ad client is opted in to ARC. */
1121 core.bool arcOptIn;
1122
1123 /** Unique identifier of this ad client. */
1124 core.String id;
1125
1126 /** Kind of resource this is, in this case adexchangeseller#adClient. */
1127 core.String kind;
1128
1129 /**
1130 * This ad client's product code, which corresponds to the PRODUCT_CODE report
1131 * dimension.
1132 */
1133 core.String productCode;
1134
1135 /** Whether this ad client supports being reported on. */
1136 core.bool supportsReporting;
1137
1138
1139 AdClient();
1140
1141 AdClient.fromJson(core.Map _json) {
1142 if (_json.containsKey("arcOptIn")) {
1143 arcOptIn = _json["arcOptIn"];
1144 }
1145 if (_json.containsKey("id")) {
1146 id = _json["id"];
1147 }
1148 if (_json.containsKey("kind")) {
1149 kind = _json["kind"];
1150 }
1151 if (_json.containsKey("productCode")) {
1152 productCode = _json["productCode"];
1153 }
1154 if (_json.containsKey("supportsReporting")) {
1155 supportsReporting = _json["supportsReporting"];
1156 }
1157 }
1158
1159 core.Map toJson() {
1160 var _json = new core.Map();
1161 if (arcOptIn != null) {
1162 _json["arcOptIn"] = arcOptIn;
1163 }
1164 if (id != null) {
1165 _json["id"] = id;
1166 }
1167 if (kind != null) {
1168 _json["kind"] = kind;
1169 }
1170 if (productCode != null) {
1171 _json["productCode"] = productCode;
1172 }
1173 if (supportsReporting != null) {
1174 _json["supportsReporting"] = supportsReporting;
1175 }
1176 return _json;
1177 }
1178 }
1179
1180
1181 /** Not documented yet. */
1182 class AdClients {
1183 /** ETag of this response for caching purposes. */
1184 core.String etag;
1185
1186 /** The ad clients returned in this list response. */
1187 core.List<AdClient> items;
1188
1189 /** Kind of list this is, in this case adexchangeseller#adClients. */
1190 core.String kind;
1191
1192 /**
1193 * Continuation token used to page through ad clients. To retrieve the next
1194 * page of results, set the next request's "pageToken" value to this.
1195 */
1196 core.String nextPageToken;
1197
1198
1199 AdClients();
1200
1201 AdClients.fromJson(core.Map _json) {
1202 if (_json.containsKey("etag")) {
1203 etag = _json["etag"];
1204 }
1205 if (_json.containsKey("items")) {
1206 items = _json["items"].map((value) => new AdClient.fromJson(value)).toList ();
1207 }
1208 if (_json.containsKey("kind")) {
1209 kind = _json["kind"];
1210 }
1211 if (_json.containsKey("nextPageToken")) {
1212 nextPageToken = _json["nextPageToken"];
1213 }
1214 }
1215
1216 core.Map toJson() {
1217 var _json = new core.Map();
1218 if (etag != null) {
1219 _json["etag"] = etag;
1220 }
1221 if (items != null) {
1222 _json["items"] = items.map((value) => (value).toJson()).toList();
1223 }
1224 if (kind != null) {
1225 _json["kind"] = kind;
1226 }
1227 if (nextPageToken != null) {
1228 _json["nextPageToken"] = nextPageToken;
1229 }
1230 return _json;
1231 }
1232 }
1233
1234
1235 /** Not documented yet. */
1236 class AdUnit {
1237 /**
1238 * Identity code of this ad unit, not necessarily unique across ad clients.
1239 */
1240 core.String code;
1241
1242 /**
1243 * Unique identifier of this ad unit. This should be considered an opaque
1244 * identifier; it is not safe to rely on it being in any particular format.
1245 */
1246 core.String id;
1247
1248 /** Kind of resource this is, in this case adexchangeseller#adUnit. */
1249 core.String kind;
1250
1251 /** Name of this ad unit. */
1252 core.String name;
1253
1254 /**
1255 * Status of this ad unit. Possible values are:
1256 * NEW: Indicates that the ad unit was created within the last seven days and
1257 * does not yet have any activity associated with it.
1258 *
1259 * ACTIVE: Indicates that there has been activity on this ad unit in the last
1260 * seven days.
1261 *
1262 * INACTIVE: Indicates that there has been no activity on this ad unit in the
1263 * last seven days.
1264 */
1265 core.String status;
1266
1267
1268 AdUnit();
1269
1270 AdUnit.fromJson(core.Map _json) {
1271 if (_json.containsKey("code")) {
1272 code = _json["code"];
1273 }
1274 if (_json.containsKey("id")) {
1275 id = _json["id"];
1276 }
1277 if (_json.containsKey("kind")) {
1278 kind = _json["kind"];
1279 }
1280 if (_json.containsKey("name")) {
1281 name = _json["name"];
1282 }
1283 if (_json.containsKey("status")) {
1284 status = _json["status"];
1285 }
1286 }
1287
1288 core.Map toJson() {
1289 var _json = new core.Map();
1290 if (code != null) {
1291 _json["code"] = code;
1292 }
1293 if (id != null) {
1294 _json["id"] = id;
1295 }
1296 if (kind != null) {
1297 _json["kind"] = kind;
1298 }
1299 if (name != null) {
1300 _json["name"] = name;
1301 }
1302 if (status != null) {
1303 _json["status"] = status;
1304 }
1305 return _json;
1306 }
1307 }
1308
1309
1310 /** Not documented yet. */
1311 class AdUnits {
1312 /** ETag of this response for caching purposes. */
1313 core.String etag;
1314
1315 /** The ad units returned in this list response. */
1316 core.List<AdUnit> items;
1317
1318 /** Kind of list this is, in this case adexchangeseller#adUnits. */
1319 core.String kind;
1320
1321 /**
1322 * Continuation token used to page through ad units. To retrieve the next page
1323 * of results, set the next request's "pageToken" value to this.
1324 */
1325 core.String nextPageToken;
1326
1327
1328 AdUnits();
1329
1330 AdUnits.fromJson(core.Map _json) {
1331 if (_json.containsKey("etag")) {
1332 etag = _json["etag"];
1333 }
1334 if (_json.containsKey("items")) {
1335 items = _json["items"].map((value) => new AdUnit.fromJson(value)).toList() ;
1336 }
1337 if (_json.containsKey("kind")) {
1338 kind = _json["kind"];
1339 }
1340 if (_json.containsKey("nextPageToken")) {
1341 nextPageToken = _json["nextPageToken"];
1342 }
1343 }
1344
1345 core.Map toJson() {
1346 var _json = new core.Map();
1347 if (etag != null) {
1348 _json["etag"] = etag;
1349 }
1350 if (items != null) {
1351 _json["items"] = items.map((value) => (value).toJson()).toList();
1352 }
1353 if (kind != null) {
1354 _json["kind"] = kind;
1355 }
1356 if (nextPageToken != null) {
1357 _json["nextPageToken"] = nextPageToken;
1358 }
1359 return _json;
1360 }
1361 }
1362
1363
1364 /** Not documented yet. */
1365 class Alert {
1366 /**
1367 * Unique identifier of this alert. This should be considered an opaque
1368 * identifier; it is not safe to rely on it being in any particular format.
1369 */
1370 core.String id;
1371
1372 /** Kind of resource this is, in this case adexchangeseller#alert. */
1373 core.String kind;
1374
1375 /** The localized alert message. */
1376 core.String message;
1377
1378 /** Severity of this alert. Possible values: INFO, WARNING, SEVERE. */
1379 core.String severity;
1380
1381 /**
1382 * Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3,
1383 * ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY,
1384 * GRAYLISTED_PUBLISHER, API_HOLD.
1385 */
1386 core.String type;
1387
1388
1389 Alert();
1390
1391 Alert.fromJson(core.Map _json) {
1392 if (_json.containsKey("id")) {
1393 id = _json["id"];
1394 }
1395 if (_json.containsKey("kind")) {
1396 kind = _json["kind"];
1397 }
1398 if (_json.containsKey("message")) {
1399 message = _json["message"];
1400 }
1401 if (_json.containsKey("severity")) {
1402 severity = _json["severity"];
1403 }
1404 if (_json.containsKey("type")) {
1405 type = _json["type"];
1406 }
1407 }
1408
1409 core.Map toJson() {
1410 var _json = new core.Map();
1411 if (id != null) {
1412 _json["id"] = id;
1413 }
1414 if (kind != null) {
1415 _json["kind"] = kind;
1416 }
1417 if (message != null) {
1418 _json["message"] = message;
1419 }
1420 if (severity != null) {
1421 _json["severity"] = severity;
1422 }
1423 if (type != null) {
1424 _json["type"] = type;
1425 }
1426 return _json;
1427 }
1428 }
1429
1430
1431 /** Not documented yet. */
1432 class Alerts {
1433 /** The alerts returned in this list response. */
1434 core.List<Alert> items;
1435
1436 /** Kind of list this is, in this case adexchangeseller#alerts. */
1437 core.String kind;
1438
1439
1440 Alerts();
1441
1442 Alerts.fromJson(core.Map _json) {
1443 if (_json.containsKey("items")) {
1444 items = _json["items"].map((value) => new Alert.fromJson(value)).toList();
1445 }
1446 if (_json.containsKey("kind")) {
1447 kind = _json["kind"];
1448 }
1449 }
1450
1451 core.Map toJson() {
1452 var _json = new core.Map();
1453 if (items != null) {
1454 _json["items"] = items.map((value) => (value).toJson()).toList();
1455 }
1456 if (kind != null) {
1457 _json["kind"] = kind;
1458 }
1459 return _json;
1460 }
1461 }
1462
1463
1464 /** The targeting information of this custom channel, if activated. */
1465 class CustomChannelTargetingInfo {
1466 /** The name used to describe this channel externally. */
1467 core.String adsAppearOn;
1468
1469 /** The external description of the channel. */
1470 core.String description;
1471
1472 /**
1473 * The locations in which ads appear. (Only valid for content and mobile
1474 * content ads). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER,
1475 * TOP_RIGHT, MIDDLE_LEFT, MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT,
1476 * BOTTOM_CENTER, BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable values for
1477 * mobile content ads are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS.
1478 */
1479 core.String location;
1480
1481 /** The language of the sites ads will be displayed on. */
1482 core.String siteLanguage;
1483
1484
1485 CustomChannelTargetingInfo();
1486
1487 CustomChannelTargetingInfo.fromJson(core.Map _json) {
1488 if (_json.containsKey("adsAppearOn")) {
1489 adsAppearOn = _json["adsAppearOn"];
1490 }
1491 if (_json.containsKey("description")) {
1492 description = _json["description"];
1493 }
1494 if (_json.containsKey("location")) {
1495 location = _json["location"];
1496 }
1497 if (_json.containsKey("siteLanguage")) {
1498 siteLanguage = _json["siteLanguage"];
1499 }
1500 }
1501
1502 core.Map toJson() {
1503 var _json = new core.Map();
1504 if (adsAppearOn != null) {
1505 _json["adsAppearOn"] = adsAppearOn;
1506 }
1507 if (description != null) {
1508 _json["description"] = description;
1509 }
1510 if (location != null) {
1511 _json["location"] = location;
1512 }
1513 if (siteLanguage != null) {
1514 _json["siteLanguage"] = siteLanguage;
1515 }
1516 return _json;
1517 }
1518 }
1519
1520
1521 /** Not documented yet. */
1522 class CustomChannel {
1523 /** Code of this custom channel, not necessarily unique across ad clients. */
1524 core.String code;
1525
1526 /**
1527 * Unique identifier of this custom channel. This should be considered an
1528 * opaque identifier; it is not safe to rely on it being in any particular
1529 * format.
1530 */
1531 core.String id;
1532
1533 /** Kind of resource this is, in this case adexchangeseller#customChannel. */
1534 core.String kind;
1535
1536 /** Name of this custom channel. */
1537 core.String name;
1538
1539 /** The targeting information of this custom channel, if activated. */
1540 CustomChannelTargetingInfo targetingInfo;
1541
1542
1543 CustomChannel();
1544
1545 CustomChannel.fromJson(core.Map _json) {
1546 if (_json.containsKey("code")) {
1547 code = _json["code"];
1548 }
1549 if (_json.containsKey("id")) {
1550 id = _json["id"];
1551 }
1552 if (_json.containsKey("kind")) {
1553 kind = _json["kind"];
1554 }
1555 if (_json.containsKey("name")) {
1556 name = _json["name"];
1557 }
1558 if (_json.containsKey("targetingInfo")) {
1559 targetingInfo = new CustomChannelTargetingInfo.fromJson(_json["targetingIn fo"]);
1560 }
1561 }
1562
1563 core.Map toJson() {
1564 var _json = new core.Map();
1565 if (code != null) {
1566 _json["code"] = code;
1567 }
1568 if (id != null) {
1569 _json["id"] = id;
1570 }
1571 if (kind != null) {
1572 _json["kind"] = kind;
1573 }
1574 if (name != null) {
1575 _json["name"] = name;
1576 }
1577 if (targetingInfo != null) {
1578 _json["targetingInfo"] = (targetingInfo).toJson();
1579 }
1580 return _json;
1581 }
1582 }
1583
1584
1585 /** Not documented yet. */
1586 class CustomChannels {
1587 /** ETag of this response for caching purposes. */
1588 core.String etag;
1589
1590 /** The custom channels returned in this list response. */
1591 core.List<CustomChannel> items;
1592
1593 /** Kind of list this is, in this case adexchangeseller#customChannels. */
1594 core.String kind;
1595
1596 /**
1597 * Continuation token used to page through custom channels. To retrieve the
1598 * next page of results, set the next request's "pageToken" value to this.
1599 */
1600 core.String nextPageToken;
1601
1602
1603 CustomChannels();
1604
1605 CustomChannels.fromJson(core.Map _json) {
1606 if (_json.containsKey("etag")) {
1607 etag = _json["etag"];
1608 }
1609 if (_json.containsKey("items")) {
1610 items = _json["items"].map((value) => new CustomChannel.fromJson(value)).t oList();
1611 }
1612 if (_json.containsKey("kind")) {
1613 kind = _json["kind"];
1614 }
1615 if (_json.containsKey("nextPageToken")) {
1616 nextPageToken = _json["nextPageToken"];
1617 }
1618 }
1619
1620 core.Map toJson() {
1621 var _json = new core.Map();
1622 if (etag != null) {
1623 _json["etag"] = etag;
1624 }
1625 if (items != null) {
1626 _json["items"] = items.map((value) => (value).toJson()).toList();
1627 }
1628 if (kind != null) {
1629 _json["kind"] = kind;
1630 }
1631 if (nextPageToken != null) {
1632 _json["nextPageToken"] = nextPageToken;
1633 }
1634 return _json;
1635 }
1636 }
1637
1638
1639 /** Not documented yet. */
1640 class Metadata {
1641 /** Not documented yet. */
1642 core.List<ReportingMetadataEntry> items;
1643
1644 /** Kind of list this is, in this case adexchangeseller#metadata. */
1645 core.String kind;
1646
1647
1648 Metadata();
1649
1650 Metadata.fromJson(core.Map _json) {
1651 if (_json.containsKey("items")) {
1652 items = _json["items"].map((value) => new ReportingMetadataEntry.fromJson( value)).toList();
1653 }
1654 if (_json.containsKey("kind")) {
1655 kind = _json["kind"];
1656 }
1657 }
1658
1659 core.Map toJson() {
1660 var _json = new core.Map();
1661 if (items != null) {
1662 _json["items"] = items.map((value) => (value).toJson()).toList();
1663 }
1664 if (kind != null) {
1665 _json["kind"] = kind;
1666 }
1667 return _json;
1668 }
1669 }
1670
1671
1672 /** Not documented yet. */
1673 class PreferredDeal {
1674 /** The name of the advertiser this deal is for. */
1675 core.String advertiserName;
1676
1677 /** The name of the buyer network this deal is for. */
1678 core.String buyerNetworkName;
1679
1680 /**
1681 * The currency code that applies to the fixed_cpm value. If not set then
1682 * assumed to be USD.
1683 */
1684 core.String currencyCode;
1685
1686 /**
1687 * Time when this deal stops being active in seconds since the epoch (GMT). If
1688 * not set then this deal is valid until manually disabled by the publisher.
1689 */
1690 core.String endTime;
1691
1692 /**
1693 * The fixed price for this preferred deal. In cpm micros of currency
1694 * according to currencyCode. If set, then this preferred deal is eligible for
1695 * the fixed price tier of buying (highest priority, pay exactly the
1696 * configured fixed price).
1697 */
1698 core.String fixedCpm;
1699
1700 /** Unique identifier of this preferred deal. */
1701 core.String id;
1702
1703 /** Kind of resource this is, in this case adexchangeseller#preferredDeal. */
1704 core.String kind;
1705
1706 /**
1707 * Time when this deal becomes active in seconds since the epoch (GMT). If not
1708 * set then this deal is active immediately upon creation.
1709 */
1710 core.String startTime;
1711
1712
1713 PreferredDeal();
1714
1715 PreferredDeal.fromJson(core.Map _json) {
1716 if (_json.containsKey("advertiserName")) {
1717 advertiserName = _json["advertiserName"];
1718 }
1719 if (_json.containsKey("buyerNetworkName")) {
1720 buyerNetworkName = _json["buyerNetworkName"];
1721 }
1722 if (_json.containsKey("currencyCode")) {
1723 currencyCode = _json["currencyCode"];
1724 }
1725 if (_json.containsKey("endTime")) {
1726 endTime = _json["endTime"];
1727 }
1728 if (_json.containsKey("fixedCpm")) {
1729 fixedCpm = _json["fixedCpm"];
1730 }
1731 if (_json.containsKey("id")) {
1732 id = _json["id"];
1733 }
1734 if (_json.containsKey("kind")) {
1735 kind = _json["kind"];
1736 }
1737 if (_json.containsKey("startTime")) {
1738 startTime = _json["startTime"];
1739 }
1740 }
1741
1742 core.Map toJson() {
1743 var _json = new core.Map();
1744 if (advertiserName != null) {
1745 _json["advertiserName"] = advertiserName;
1746 }
1747 if (buyerNetworkName != null) {
1748 _json["buyerNetworkName"] = buyerNetworkName;
1749 }
1750 if (currencyCode != null) {
1751 _json["currencyCode"] = currencyCode;
1752 }
1753 if (endTime != null) {
1754 _json["endTime"] = endTime;
1755 }
1756 if (fixedCpm != null) {
1757 _json["fixedCpm"] = fixedCpm;
1758 }
1759 if (id != null) {
1760 _json["id"] = id;
1761 }
1762 if (kind != null) {
1763 _json["kind"] = kind;
1764 }
1765 if (startTime != null) {
1766 _json["startTime"] = startTime;
1767 }
1768 return _json;
1769 }
1770 }
1771
1772
1773 /** Not documented yet. */
1774 class PreferredDeals {
1775 /** The preferred deals returned in this list response. */
1776 core.List<PreferredDeal> items;
1777
1778 /** Kind of list this is, in this case adexchangeseller#preferredDeals. */
1779 core.String kind;
1780
1781
1782 PreferredDeals();
1783
1784 PreferredDeals.fromJson(core.Map _json) {
1785 if (_json.containsKey("items")) {
1786 items = _json["items"].map((value) => new PreferredDeal.fromJson(value)).t oList();
1787 }
1788 if (_json.containsKey("kind")) {
1789 kind = _json["kind"];
1790 }
1791 }
1792
1793 core.Map toJson() {
1794 var _json = new core.Map();
1795 if (items != null) {
1796 _json["items"] = items.map((value) => (value).toJson()).toList();
1797 }
1798 if (kind != null) {
1799 _json["kind"] = kind;
1800 }
1801 return _json;
1802 }
1803 }
1804
1805
1806 /** Not documented yet. */
1807 class ReportHeaders {
1808 /**
1809 * The currency of this column. Only present if the header type is
1810 * METRIC_CURRENCY.
1811 */
1812 core.String currency;
1813
1814 /** The name of the header. */
1815 core.String name;
1816
1817 /**
1818 * The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or
1819 * METRIC_CURRENCY.
1820 */
1821 core.String type;
1822
1823
1824 ReportHeaders();
1825
1826 ReportHeaders.fromJson(core.Map _json) {
1827 if (_json.containsKey("currency")) {
1828 currency = _json["currency"];
1829 }
1830 if (_json.containsKey("name")) {
1831 name = _json["name"];
1832 }
1833 if (_json.containsKey("type")) {
1834 type = _json["type"];
1835 }
1836 }
1837
1838 core.Map toJson() {
1839 var _json = new core.Map();
1840 if (currency != null) {
1841 _json["currency"] = currency;
1842 }
1843 if (name != null) {
1844 _json["name"] = name;
1845 }
1846 if (type != null) {
1847 _json["type"] = type;
1848 }
1849 return _json;
1850 }
1851 }
1852
1853
1854 /** Not documented yet. */
1855 class Report {
1856 /**
1857 * The averages of the report. This is the same length as any other row in the
1858 * report; cells corresponding to dimension columns are empty.
1859 */
1860 core.List<core.String> averages;
1861
1862 /**
1863 * The header information of the columns requested in the report. This is a
1864 * list of headers; one for each dimension in the request, followed by one for
1865 * each metric in the request.
1866 */
1867 core.List<ReportHeaders> headers;
1868
1869 /** Kind this is, in this case adexchangeseller#report. */
1870 core.String kind;
1871
1872 /**
1873 * The output rows of the report. Each row is a list of cells; one for each
1874 * dimension in the request, followed by one for each metric in the request.
1875 * The dimension cells contain strings, and the metric cells contain numbers.
1876 */
1877 core.List<core.List<core.String>> rows;
1878
1879 /**
1880 * The total number of rows matched by the report request. Fewer rows may be
1881 * returned in the response due to being limited by the row count requested or
1882 * the report row limit.
1883 */
1884 core.String totalMatchedRows;
1885
1886 /**
1887 * The totals of the report. This is the same length as any other row in the
1888 * report; cells corresponding to dimension columns are empty.
1889 */
1890 core.List<core.String> totals;
1891
1892 /** Any warnings associated with generation of the report. */
1893 core.List<core.String> warnings;
1894
1895
1896 Report();
1897
1898 Report.fromJson(core.Map _json) {
1899 if (_json.containsKey("averages")) {
1900 averages = _json["averages"];
1901 }
1902 if (_json.containsKey("headers")) {
1903 headers = _json["headers"].map((value) => new ReportHeaders.fromJson(value )).toList();
1904 }
1905 if (_json.containsKey("kind")) {
1906 kind = _json["kind"];
1907 }
1908 if (_json.containsKey("rows")) {
1909 rows = _json["rows"];
1910 }
1911 if (_json.containsKey("totalMatchedRows")) {
1912 totalMatchedRows = _json["totalMatchedRows"];
1913 }
1914 if (_json.containsKey("totals")) {
1915 totals = _json["totals"];
1916 }
1917 if (_json.containsKey("warnings")) {
1918 warnings = _json["warnings"];
1919 }
1920 }
1921
1922 core.Map toJson() {
1923 var _json = new core.Map();
1924 if (averages != null) {
1925 _json["averages"] = averages;
1926 }
1927 if (headers != null) {
1928 _json["headers"] = headers.map((value) => (value).toJson()).toList();
1929 }
1930 if (kind != null) {
1931 _json["kind"] = kind;
1932 }
1933 if (rows != null) {
1934 _json["rows"] = rows;
1935 }
1936 if (totalMatchedRows != null) {
1937 _json["totalMatchedRows"] = totalMatchedRows;
1938 }
1939 if (totals != null) {
1940 _json["totals"] = totals;
1941 }
1942 if (warnings != null) {
1943 _json["warnings"] = warnings;
1944 }
1945 return _json;
1946 }
1947 }
1948
1949
1950 /** Not documented yet. */
1951 class ReportingMetadataEntry {
1952 /**
1953 * For metrics this is a list of dimension IDs which the metric is compatible
1954 * with, for dimensions it is a list of compatibility groups the dimension
1955 * belongs to.
1956 */
1957 core.List<core.String> compatibleDimensions;
1958
1959 /**
1960 * The names of the metrics the dimension or metric this reporting metadata
1961 * entry describes is compatible with.
1962 */
1963 core.List<core.String> compatibleMetrics;
1964
1965 /**
1966 * Unique identifier of this reporting metadata entry, corresponding to the
1967 * name of the appropriate dimension or metric.
1968 */
1969 core.String id;
1970
1971 /**
1972 * Kind of resource this is, in this case
1973 * adexchangeseller#reportingMetadataEntry.
1974 */
1975 core.String kind;
1976
1977 /**
1978 * The names of the dimensions which the dimension or metric this reporting
1979 * metadata entry describes requires to also be present in order for the
1980 * report to be valid. Omitting these will not cause an error or warning, but
1981 * may result in data which cannot be correctly interpreted.
1982 */
1983 core.List<core.String> requiredDimensions;
1984
1985 /**
1986 * The names of the metrics which the dimension or metric this reporting
1987 * metadata entry describes requires to also be present in order for the
1988 * report to be valid. Omitting these will not cause an error or warning, but
1989 * may result in data which cannot be correctly interpreted.
1990 */
1991 core.List<core.String> requiredMetrics;
1992
1993 /**
1994 * The codes of the projects supported by the dimension or metric this
1995 * reporting metadata entry describes.
1996 */
1997 core.List<core.String> supportedProducts;
1998
1999
2000 ReportingMetadataEntry();
2001
2002 ReportingMetadataEntry.fromJson(core.Map _json) {
2003 if (_json.containsKey("compatibleDimensions")) {
2004 compatibleDimensions = _json["compatibleDimensions"];
2005 }
2006 if (_json.containsKey("compatibleMetrics")) {
2007 compatibleMetrics = _json["compatibleMetrics"];
2008 }
2009 if (_json.containsKey("id")) {
2010 id = _json["id"];
2011 }
2012 if (_json.containsKey("kind")) {
2013 kind = _json["kind"];
2014 }
2015 if (_json.containsKey("requiredDimensions")) {
2016 requiredDimensions = _json["requiredDimensions"];
2017 }
2018 if (_json.containsKey("requiredMetrics")) {
2019 requiredMetrics = _json["requiredMetrics"];
2020 }
2021 if (_json.containsKey("supportedProducts")) {
2022 supportedProducts = _json["supportedProducts"];
2023 }
2024 }
2025
2026 core.Map toJson() {
2027 var _json = new core.Map();
2028 if (compatibleDimensions != null) {
2029 _json["compatibleDimensions"] = compatibleDimensions;
2030 }
2031 if (compatibleMetrics != null) {
2032 _json["compatibleMetrics"] = compatibleMetrics;
2033 }
2034 if (id != null) {
2035 _json["id"] = id;
2036 }
2037 if (kind != null) {
2038 _json["kind"] = kind;
2039 }
2040 if (requiredDimensions != null) {
2041 _json["requiredDimensions"] = requiredDimensions;
2042 }
2043 if (requiredMetrics != null) {
2044 _json["requiredMetrics"] = requiredMetrics;
2045 }
2046 if (supportedProducts != null) {
2047 _json["supportedProducts"] = supportedProducts;
2048 }
2049 return _json;
2050 }
2051 }
2052
2053
2054 /** Not documented yet. */
2055 class SavedReport {
2056 /** Unique identifier of this saved report. */
2057 core.String id;
2058
2059 /** Kind of resource this is, in this case adexchangeseller#savedReport. */
2060 core.String kind;
2061
2062 /** This saved report's name. */
2063 core.String name;
2064
2065
2066 SavedReport();
2067
2068 SavedReport.fromJson(core.Map _json) {
2069 if (_json.containsKey("id")) {
2070 id = _json["id"];
2071 }
2072 if (_json.containsKey("kind")) {
2073 kind = _json["kind"];
2074 }
2075 if (_json.containsKey("name")) {
2076 name = _json["name"];
2077 }
2078 }
2079
2080 core.Map toJson() {
2081 var _json = new core.Map();
2082 if (id != null) {
2083 _json["id"] = id;
2084 }
2085 if (kind != null) {
2086 _json["kind"] = kind;
2087 }
2088 if (name != null) {
2089 _json["name"] = name;
2090 }
2091 return _json;
2092 }
2093 }
2094
2095
2096 /** Not documented yet. */
2097 class SavedReports {
2098 /** ETag of this response for caching purposes. */
2099 core.String etag;
2100
2101 /** The saved reports returned in this list response. */
2102 core.List<SavedReport> items;
2103
2104 /** Kind of list this is, in this case adexchangeseller#savedReports. */
2105 core.String kind;
2106
2107 /**
2108 * Continuation token used to page through saved reports. To retrieve the next
2109 * page of results, set the next request's "pageToken" value to this.
2110 */
2111 core.String nextPageToken;
2112
2113
2114 SavedReports();
2115
2116 SavedReports.fromJson(core.Map _json) {
2117 if (_json.containsKey("etag")) {
2118 etag = _json["etag"];
2119 }
2120 if (_json.containsKey("items")) {
2121 items = _json["items"].map((value) => new SavedReport.fromJson(value)).toL ist();
2122 }
2123 if (_json.containsKey("kind")) {
2124 kind = _json["kind"];
2125 }
2126 if (_json.containsKey("nextPageToken")) {
2127 nextPageToken = _json["nextPageToken"];
2128 }
2129 }
2130
2131 core.Map toJson() {
2132 var _json = new core.Map();
2133 if (etag != null) {
2134 _json["etag"] = etag;
2135 }
2136 if (items != null) {
2137 _json["items"] = items.map((value) => (value).toJson()).toList();
2138 }
2139 if (kind != null) {
2140 _json["kind"] = kind;
2141 }
2142 if (nextPageToken != null) {
2143 _json["nextPageToken"] = nextPageToken;
2144 }
2145 return _json;
2146 }
2147 }
2148
2149
2150 /** Not documented yet. */
2151 class UrlChannel {
2152 /**
2153 * Unique identifier of this URL channel. This should be considered an opaque
2154 * identifier; it is not safe to rely on it being in any particular format.
2155 */
2156 core.String id;
2157
2158 /** Kind of resource this is, in this case adexchangeseller#urlChannel. */
2159 core.String kind;
2160
2161 /**
2162 * URL Pattern of this URL channel. Does not include "http://" or "https://".
2163 * Example: www.example.com/home
2164 */
2165 core.String urlPattern;
2166
2167
2168 UrlChannel();
2169
2170 UrlChannel.fromJson(core.Map _json) {
2171 if (_json.containsKey("id")) {
2172 id = _json["id"];
2173 }
2174 if (_json.containsKey("kind")) {
2175 kind = _json["kind"];
2176 }
2177 if (_json.containsKey("urlPattern")) {
2178 urlPattern = _json["urlPattern"];
2179 }
2180 }
2181
2182 core.Map toJson() {
2183 var _json = new core.Map();
2184 if (id != null) {
2185 _json["id"] = id;
2186 }
2187 if (kind != null) {
2188 _json["kind"] = kind;
2189 }
2190 if (urlPattern != null) {
2191 _json["urlPattern"] = urlPattern;
2192 }
2193 return _json;
2194 }
2195 }
2196
2197
2198 /** Not documented yet. */
2199 class UrlChannels {
2200 /** ETag of this response for caching purposes. */
2201 core.String etag;
2202
2203 /** The URL channels returned in this list response. */
2204 core.List<UrlChannel> items;
2205
2206 /** Kind of list this is, in this case adexchangeseller#urlChannels. */
2207 core.String kind;
2208
2209 /**
2210 * Continuation token used to page through URL channels. To retrieve the next
2211 * page of results, set the next request's "pageToken" value to this.
2212 */
2213 core.String nextPageToken;
2214
2215
2216 UrlChannels();
2217
2218 UrlChannels.fromJson(core.Map _json) {
2219 if (_json.containsKey("etag")) {
2220 etag = _json["etag"];
2221 }
2222 if (_json.containsKey("items")) {
2223 items = _json["items"].map((value) => new UrlChannel.fromJson(value)).toLi st();
2224 }
2225 if (_json.containsKey("kind")) {
2226 kind = _json["kind"];
2227 }
2228 if (_json.containsKey("nextPageToken")) {
2229 nextPageToken = _json["nextPageToken"];
2230 }
2231 }
2232
2233 core.Map toJson() {
2234 var _json = new core.Map();
2235 if (etag != null) {
2236 _json["etag"] = etag;
2237 }
2238 if (items != null) {
2239 _json["items"] = items.map((value) => (value).toJson()).toList();
2240 }
2241 if (kind != null) {
2242 _json["kind"] = kind;
2243 }
2244 if (nextPageToken != null) {
2245 _json["nextPageToken"] = nextPageToken;
2246 }
2247 return _json;
2248 }
2249 }
2250
2251
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698