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

Side by Side Diff: generated/googleapis/lib/dfareporting/v2_4.dart

Issue 2571553005: Api-roll 43: 2016-12-13 (Closed)
Patch Set: Created 4 years 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 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis.dfareporting.v2_4;
4
5 import 'dart:core' as core;
6 import 'dart:async' as async;
7 import 'dart:convert' as convert;
8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http;
11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
13 ApiRequestError, DetailedApiRequestError, Media, UploadOptions,
14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions,
15 ByteRange;
16
17 const core.String USER_AGENT = 'dart-api-client dfareporting/v2.4';
18
19 /** Manages your DoubleClick Campaign Manager ad campaigns and reports. */
20 class DfareportingApi {
21 /** View and manage DoubleClick for Advertisers reports */
22 static const DfareportingScope = "https://www.googleapis.com/auth/dfareporting ";
23
24 /**
25 * View and manage your DoubleClick Campaign Manager's (DCM) display ad
26 * campaigns
27 */
28 static const DfatraffickingScope = "https://www.googleapis.com/auth/dfatraffic king";
29
30
31 final commons.ApiRequester _requester;
32
33 AccountActiveAdSummariesResourceApi get accountActiveAdSummaries => new Accoun tActiveAdSummariesResourceApi(_requester);
34 AccountPermissionGroupsResourceApi get accountPermissionGroups => new AccountP ermissionGroupsResourceApi(_requester);
35 AccountPermissionsResourceApi get accountPermissions => new AccountPermissions ResourceApi(_requester);
36 AccountUserProfilesResourceApi get accountUserProfiles => new AccountUserProfi lesResourceApi(_requester);
37 AccountsResourceApi get accounts => new AccountsResourceApi(_requester);
38 AdsResourceApi get ads => new AdsResourceApi(_requester);
39 AdvertiserGroupsResourceApi get advertiserGroups => new AdvertiserGroupsResour ceApi(_requester);
40 AdvertisersResourceApi get advertisers => new AdvertisersResourceApi(_requeste r);
41 BrowsersResourceApi get browsers => new BrowsersResourceApi(_requester);
42 CampaignCreativeAssociationsResourceApi get campaignCreativeAssociations => ne w CampaignCreativeAssociationsResourceApi(_requester);
43 CampaignsResourceApi get campaigns => new CampaignsResourceApi(_requester);
44 ChangeLogsResourceApi get changeLogs => new ChangeLogsResourceApi(_requester);
45 CitiesResourceApi get cities => new CitiesResourceApi(_requester);
46 ConnectionTypesResourceApi get connectionTypes => new ConnectionTypesResourceA pi(_requester);
47 ContentCategoriesResourceApi get contentCategories => new ContentCategoriesRes ourceApi(_requester);
48 CountriesResourceApi get countries => new CountriesResourceApi(_requester);
49 CreativeAssetsResourceApi get creativeAssets => new CreativeAssetsResourceApi( _requester);
50 CreativeFieldValuesResourceApi get creativeFieldValues => new CreativeFieldVal uesResourceApi(_requester);
51 CreativeFieldsResourceApi get creativeFields => new CreativeFieldsResourceApi( _requester);
52 CreativeGroupsResourceApi get creativeGroups => new CreativeGroupsResourceApi( _requester);
53 CreativesResourceApi get creatives => new CreativesResourceApi(_requester);
54 DimensionValuesResourceApi get dimensionValues => new DimensionValuesResourceA pi(_requester);
55 DirectorySiteContactsResourceApi get directorySiteContacts => new DirectorySit eContactsResourceApi(_requester);
56 DirectorySitesResourceApi get directorySites => new DirectorySitesResourceApi( _requester);
57 EventTagsResourceApi get eventTags => new EventTagsResourceApi(_requester);
58 FilesResourceApi get files => new FilesResourceApi(_requester);
59 FloodlightActivitiesResourceApi get floodlightActivities => new FloodlightActi vitiesResourceApi(_requester);
60 FloodlightActivityGroupsResourceApi get floodlightActivityGroups => new Floodl ightActivityGroupsResourceApi(_requester);
61 FloodlightConfigurationsResourceApi get floodlightConfigurations => new Floodl ightConfigurationsResourceApi(_requester);
62 InventoryItemsResourceApi get inventoryItems => new InventoryItemsResourceApi( _requester);
63 LandingPagesResourceApi get landingPages => new LandingPagesResourceApi(_reque ster);
64 MetrosResourceApi get metros => new MetrosResourceApi(_requester);
65 MobileCarriersResourceApi get mobileCarriers => new MobileCarriersResourceApi( _requester);
66 OperatingSystemVersionsResourceApi get operatingSystemVersions => new Operatin gSystemVersionsResourceApi(_requester);
67 OperatingSystemsResourceApi get operatingSystems => new OperatingSystemsResour ceApi(_requester);
68 OrderDocumentsResourceApi get orderDocuments => new OrderDocumentsResourceApi( _requester);
69 OrdersResourceApi get orders => new OrdersResourceApi(_requester);
70 PlacementGroupsResourceApi get placementGroups => new PlacementGroupsResourceA pi(_requester);
71 PlacementStrategiesResourceApi get placementStrategies => new PlacementStrateg iesResourceApi(_requester);
72 PlacementsResourceApi get placements => new PlacementsResourceApi(_requester);
73 PlatformTypesResourceApi get platformTypes => new PlatformTypesResourceApi(_re quester);
74 PostalCodesResourceApi get postalCodes => new PostalCodesResourceApi(_requeste r);
75 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
76 RegionsResourceApi get regions => new RegionsResourceApi(_requester);
77 RemarketingListSharesResourceApi get remarketingListShares => new RemarketingL istSharesResourceApi(_requester);
78 RemarketingListsResourceApi get remarketingLists => new RemarketingListsResour ceApi(_requester);
79 ReportsResourceApi get reports => new ReportsResourceApi(_requester);
80 SitesResourceApi get sites => new SitesResourceApi(_requester);
81 SizesResourceApi get sizes => new SizesResourceApi(_requester);
82 SubaccountsResourceApi get subaccounts => new SubaccountsResourceApi(_requeste r);
83 TargetableRemarketingListsResourceApi get targetableRemarketingLists => new Ta rgetableRemarketingListsResourceApi(_requester);
84 UserProfilesResourceApi get userProfiles => new UserProfilesResourceApi(_reque ster);
85 UserRolePermissionGroupsResourceApi get userRolePermissionGroups => new UserRo lePermissionGroupsResourceApi(_requester);
86 UserRolePermissionsResourceApi get userRolePermissions => new UserRolePermissi onsResourceApi(_requester);
87 UserRolesResourceApi get userRoles => new UserRolesResourceApi(_requester);
88
89 DfareportingApi(http.Client client, {core.String rootUrl: "https://www.googlea pis.com/", core.String servicePath: "dfareporting/v2.4/"}) :
90 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
91 }
92
93
94 class AccountActiveAdSummariesResourceApi {
95 final commons.ApiRequester _requester;
96
97 AccountActiveAdSummariesResourceApi(commons.ApiRequester client) :
98 _requester = client;
99
100 /**
101 * Gets the account's active ad summary by account ID.
102 *
103 * Request parameters:
104 *
105 * [profileId] - User profile ID associated with this request.
106 *
107 * [summaryAccountId] - Account ID.
108 *
109 * Completes with a [AccountActiveAdSummary].
110 *
111 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
112 * error.
113 *
114 * If the used [http.Client] completes with an error when making a REST call,
115 * this method will complete with the same error.
116 */
117 async.Future<AccountActiveAdSummary> get(core.String profileId, core.String su mmaryAccountId) {
118 var _url = null;
119 var _queryParams = new core.Map();
120 var _uploadMedia = null;
121 var _uploadOptions = null;
122 var _downloadOptions = commons.DownloadOptions.Metadata;
123 var _body = null;
124
125 if (profileId == null) {
126 throw new core.ArgumentError("Parameter profileId is required.");
127 }
128 if (summaryAccountId == null) {
129 throw new core.ArgumentError("Parameter summaryAccountId is required.");
130 }
131
132 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountActiveAdSummaries/' + commons.Escaper.ecapeVariable('$summaryAccountId');
133
134 var _response = _requester.request(_url,
135 "GET",
136 body: _body,
137 queryParams: _queryParams,
138 uploadOptions: _uploadOptions,
139 uploadMedia: _uploadMedia,
140 downloadOptions: _downloadOptions);
141 return _response.then((data) => new AccountActiveAdSummary.fromJson(data));
142 }
143
144 }
145
146
147 class AccountPermissionGroupsResourceApi {
148 final commons.ApiRequester _requester;
149
150 AccountPermissionGroupsResourceApi(commons.ApiRequester client) :
151 _requester = client;
152
153 /**
154 * Gets one account permission group by ID.
155 *
156 * Request parameters:
157 *
158 * [profileId] - User profile ID associated with this request.
159 *
160 * [id] - Account permission group ID.
161 *
162 * Completes with a [AccountPermissionGroup].
163 *
164 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
165 * error.
166 *
167 * If the used [http.Client] completes with an error when making a REST call,
168 * this method will complete with the same error.
169 */
170 async.Future<AccountPermissionGroup> get(core.String profileId, core.String id ) {
171 var _url = null;
172 var _queryParams = new core.Map();
173 var _uploadMedia = null;
174 var _uploadOptions = null;
175 var _downloadOptions = commons.DownloadOptions.Metadata;
176 var _body = null;
177
178 if (profileId == null) {
179 throw new core.ArgumentError("Parameter profileId is required.");
180 }
181 if (id == null) {
182 throw new core.ArgumentError("Parameter id is required.");
183 }
184
185 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountPermissionGroups/' + commons.Escaper.ecapeVariable('$id');
186
187 var _response = _requester.request(_url,
188 "GET",
189 body: _body,
190 queryParams: _queryParams,
191 uploadOptions: _uploadOptions,
192 uploadMedia: _uploadMedia,
193 downloadOptions: _downloadOptions);
194 return _response.then((data) => new AccountPermissionGroup.fromJson(data));
195 }
196
197 /**
198 * Retrieves the list of account permission groups.
199 *
200 * Request parameters:
201 *
202 * [profileId] - User profile ID associated with this request.
203 *
204 * Completes with a [AccountPermissionGroupsListResponse].
205 *
206 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
207 * error.
208 *
209 * If the used [http.Client] completes with an error when making a REST call,
210 * this method will complete with the same error.
211 */
212 async.Future<AccountPermissionGroupsListResponse> list(core.String profileId) {
213 var _url = null;
214 var _queryParams = new core.Map();
215 var _uploadMedia = null;
216 var _uploadOptions = null;
217 var _downloadOptions = commons.DownloadOptions.Metadata;
218 var _body = null;
219
220 if (profileId == null) {
221 throw new core.ArgumentError("Parameter profileId is required.");
222 }
223
224 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountPermissionGroups';
225
226 var _response = _requester.request(_url,
227 "GET",
228 body: _body,
229 queryParams: _queryParams,
230 uploadOptions: _uploadOptions,
231 uploadMedia: _uploadMedia,
232 downloadOptions: _downloadOptions);
233 return _response.then((data) => new AccountPermissionGroupsListResponse.from Json(data));
234 }
235
236 }
237
238
239 class AccountPermissionsResourceApi {
240 final commons.ApiRequester _requester;
241
242 AccountPermissionsResourceApi(commons.ApiRequester client) :
243 _requester = client;
244
245 /**
246 * Gets one account permission by ID.
247 *
248 * Request parameters:
249 *
250 * [profileId] - User profile ID associated with this request.
251 *
252 * [id] - Account permission ID.
253 *
254 * Completes with a [AccountPermission].
255 *
256 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
257 * error.
258 *
259 * If the used [http.Client] completes with an error when making a REST call,
260 * this method will complete with the same error.
261 */
262 async.Future<AccountPermission> get(core.String profileId, core.String id) {
263 var _url = null;
264 var _queryParams = new core.Map();
265 var _uploadMedia = null;
266 var _uploadOptions = null;
267 var _downloadOptions = commons.DownloadOptions.Metadata;
268 var _body = null;
269
270 if (profileId == null) {
271 throw new core.ArgumentError("Parameter profileId is required.");
272 }
273 if (id == null) {
274 throw new core.ArgumentError("Parameter id is required.");
275 }
276
277 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountPermissions/' + commons.Escaper.ecapeVariable('$id');
278
279 var _response = _requester.request(_url,
280 "GET",
281 body: _body,
282 queryParams: _queryParams,
283 uploadOptions: _uploadOptions,
284 uploadMedia: _uploadMedia,
285 downloadOptions: _downloadOptions);
286 return _response.then((data) => new AccountPermission.fromJson(data));
287 }
288
289 /**
290 * Retrieves the list of account permissions.
291 *
292 * Request parameters:
293 *
294 * [profileId] - User profile ID associated with this request.
295 *
296 * Completes with a [AccountPermissionsListResponse].
297 *
298 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
299 * error.
300 *
301 * If the used [http.Client] completes with an error when making a REST call,
302 * this method will complete with the same error.
303 */
304 async.Future<AccountPermissionsListResponse> list(core.String profileId) {
305 var _url = null;
306 var _queryParams = new core.Map();
307 var _uploadMedia = null;
308 var _uploadOptions = null;
309 var _downloadOptions = commons.DownloadOptions.Metadata;
310 var _body = null;
311
312 if (profileId == null) {
313 throw new core.ArgumentError("Parameter profileId is required.");
314 }
315
316 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountPermissions';
317
318 var _response = _requester.request(_url,
319 "GET",
320 body: _body,
321 queryParams: _queryParams,
322 uploadOptions: _uploadOptions,
323 uploadMedia: _uploadMedia,
324 downloadOptions: _downloadOptions);
325 return _response.then((data) => new AccountPermissionsListResponse.fromJson( data));
326 }
327
328 }
329
330
331 class AccountUserProfilesResourceApi {
332 final commons.ApiRequester _requester;
333
334 AccountUserProfilesResourceApi(commons.ApiRequester client) :
335 _requester = client;
336
337 /**
338 * Gets one account user profile by ID.
339 *
340 * Request parameters:
341 *
342 * [profileId] - User profile ID associated with this request.
343 *
344 * [id] - User profile ID.
345 *
346 * Completes with a [AccountUserProfile].
347 *
348 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
349 * error.
350 *
351 * If the used [http.Client] completes with an error when making a REST call,
352 * this method will complete with the same error.
353 */
354 async.Future<AccountUserProfile> get(core.String profileId, core.String id) {
355 var _url = null;
356 var _queryParams = new core.Map();
357 var _uploadMedia = null;
358 var _uploadOptions = null;
359 var _downloadOptions = commons.DownloadOptions.Metadata;
360 var _body = null;
361
362 if (profileId == null) {
363 throw new core.ArgumentError("Parameter profileId is required.");
364 }
365 if (id == null) {
366 throw new core.ArgumentError("Parameter id is required.");
367 }
368
369 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountUserProfiles/' + commons.Escaper.ecapeVariable('$id');
370
371 var _response = _requester.request(_url,
372 "GET",
373 body: _body,
374 queryParams: _queryParams,
375 uploadOptions: _uploadOptions,
376 uploadMedia: _uploadMedia,
377 downloadOptions: _downloadOptions);
378 return _response.then((data) => new AccountUserProfile.fromJson(data));
379 }
380
381 /**
382 * Inserts a new account user profile.
383 *
384 * [request] - The metadata request object.
385 *
386 * Request parameters:
387 *
388 * [profileId] - User profile ID associated with this request.
389 *
390 * Completes with a [AccountUserProfile].
391 *
392 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
393 * error.
394 *
395 * If the used [http.Client] completes with an error when making a REST call,
396 * this method will complete with the same error.
397 */
398 async.Future<AccountUserProfile> insert(AccountUserProfile request, core.Strin g profileId) {
399 var _url = null;
400 var _queryParams = new core.Map();
401 var _uploadMedia = null;
402 var _uploadOptions = null;
403 var _downloadOptions = commons.DownloadOptions.Metadata;
404 var _body = null;
405
406 if (request != null) {
407 _body = convert.JSON.encode((request).toJson());
408 }
409 if (profileId == null) {
410 throw new core.ArgumentError("Parameter profileId is required.");
411 }
412
413 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountUserProfiles';
414
415 var _response = _requester.request(_url,
416 "POST",
417 body: _body,
418 queryParams: _queryParams,
419 uploadOptions: _uploadOptions,
420 uploadMedia: _uploadMedia,
421 downloadOptions: _downloadOptions);
422 return _response.then((data) => new AccountUserProfile.fromJson(data));
423 }
424
425 /**
426 * Retrieves a list of account user profiles, possibly filtered. This method
427 * supports paging.
428 *
429 * Request parameters:
430 *
431 * [profileId] - User profile ID associated with this request.
432 *
433 * [active] - Select only active user profiles.
434 *
435 * [ids] - Select only user profiles with these IDs.
436 *
437 * [maxResults] - Maximum number of results to return.
438 *
439 * [pageToken] - Value of the nextPageToken from the previous result page.
440 *
441 * [searchString] - Allows searching for objects by name, ID or email.
442 * Wildcards (*) are allowed. For example, "user profile*2015" will return
443 * objects with names like "user profile June 2015", "user profile April
444 * 2015", or simply "user profile 2015". Most of the searches also add
445 * wildcards implicitly at the start and the end of the search string. For
446 * example, a search string of "user profile" will match objects with name "my
447 * user profile", "user profile 2015", or simply "user profile".
448 *
449 * [sortField] - Field by which to sort the list.
450 * Possible string values are:
451 * - "ID"
452 * - "NAME"
453 *
454 * [sortOrder] - Order of sorted results, default is ASCENDING.
455 * Possible string values are:
456 * - "ASCENDING"
457 * - "DESCENDING"
458 *
459 * [subaccountId] - Select only user profiles with the specified subaccount
460 * ID.
461 *
462 * [userRoleId] - Select only user profiles with the specified user role ID.
463 *
464 * Completes with a [AccountUserProfilesListResponse].
465 *
466 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
467 * error.
468 *
469 * If the used [http.Client] completes with an error when making a REST call,
470 * this method will complete with the same error.
471 */
472 async.Future<AccountUserProfilesListResponse> list(core.String profileId, {cor e.bool active, core.List<core.String> ids, core.int maxResults, core.String page Token, core.String searchString, core.String sortField, core.String sortOrder, c ore.String subaccountId, core.String userRoleId}) {
473 var _url = null;
474 var _queryParams = new core.Map();
475 var _uploadMedia = null;
476 var _uploadOptions = null;
477 var _downloadOptions = commons.DownloadOptions.Metadata;
478 var _body = null;
479
480 if (profileId == null) {
481 throw new core.ArgumentError("Parameter profileId is required.");
482 }
483 if (active != null) {
484 _queryParams["active"] = ["${active}"];
485 }
486 if (ids != null) {
487 _queryParams["ids"] = ids;
488 }
489 if (maxResults != null) {
490 _queryParams["maxResults"] = ["${maxResults}"];
491 }
492 if (pageToken != null) {
493 _queryParams["pageToken"] = [pageToken];
494 }
495 if (searchString != null) {
496 _queryParams["searchString"] = [searchString];
497 }
498 if (sortField != null) {
499 _queryParams["sortField"] = [sortField];
500 }
501 if (sortOrder != null) {
502 _queryParams["sortOrder"] = [sortOrder];
503 }
504 if (subaccountId != null) {
505 _queryParams["subaccountId"] = [subaccountId];
506 }
507 if (userRoleId != null) {
508 _queryParams["userRoleId"] = [userRoleId];
509 }
510
511 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountUserProfiles';
512
513 var _response = _requester.request(_url,
514 "GET",
515 body: _body,
516 queryParams: _queryParams,
517 uploadOptions: _uploadOptions,
518 uploadMedia: _uploadMedia,
519 downloadOptions: _downloadOptions);
520 return _response.then((data) => new AccountUserProfilesListResponse.fromJson (data));
521 }
522
523 /**
524 * Updates an existing account user profile. This method supports patch
525 * semantics.
526 *
527 * [request] - The metadata request object.
528 *
529 * Request parameters:
530 *
531 * [profileId] - User profile ID associated with this request.
532 *
533 * [id] - User profile ID.
534 *
535 * Completes with a [AccountUserProfile].
536 *
537 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
538 * error.
539 *
540 * If the used [http.Client] completes with an error when making a REST call,
541 * this method will complete with the same error.
542 */
543 async.Future<AccountUserProfile> patch(AccountUserProfile request, core.String profileId, core.String id) {
544 var _url = null;
545 var _queryParams = new core.Map();
546 var _uploadMedia = null;
547 var _uploadOptions = null;
548 var _downloadOptions = commons.DownloadOptions.Metadata;
549 var _body = null;
550
551 if (request != null) {
552 _body = convert.JSON.encode((request).toJson());
553 }
554 if (profileId == null) {
555 throw new core.ArgumentError("Parameter profileId is required.");
556 }
557 if (id == null) {
558 throw new core.ArgumentError("Parameter id is required.");
559 }
560 _queryParams["id"] = [id];
561
562 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountUserProfiles';
563
564 var _response = _requester.request(_url,
565 "PATCH",
566 body: _body,
567 queryParams: _queryParams,
568 uploadOptions: _uploadOptions,
569 uploadMedia: _uploadMedia,
570 downloadOptions: _downloadOptions);
571 return _response.then((data) => new AccountUserProfile.fromJson(data));
572 }
573
574 /**
575 * Updates an existing account user profile.
576 *
577 * [request] - The metadata request object.
578 *
579 * Request parameters:
580 *
581 * [profileId] - User profile ID associated with this request.
582 *
583 * Completes with a [AccountUserProfile].
584 *
585 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
586 * error.
587 *
588 * If the used [http.Client] completes with an error when making a REST call,
589 * this method will complete with the same error.
590 */
591 async.Future<AccountUserProfile> update(AccountUserProfile request, core.Strin g profileId) {
592 var _url = null;
593 var _queryParams = new core.Map();
594 var _uploadMedia = null;
595 var _uploadOptions = null;
596 var _downloadOptions = commons.DownloadOptions.Metadata;
597 var _body = null;
598
599 if (request != null) {
600 _body = convert.JSON.encode((request).toJson());
601 }
602 if (profileId == null) {
603 throw new core.ArgumentError("Parameter profileId is required.");
604 }
605
606 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ountUserProfiles';
607
608 var _response = _requester.request(_url,
609 "PUT",
610 body: _body,
611 queryParams: _queryParams,
612 uploadOptions: _uploadOptions,
613 uploadMedia: _uploadMedia,
614 downloadOptions: _downloadOptions);
615 return _response.then((data) => new AccountUserProfile.fromJson(data));
616 }
617
618 }
619
620
621 class AccountsResourceApi {
622 final commons.ApiRequester _requester;
623
624 AccountsResourceApi(commons.ApiRequester client) :
625 _requester = client;
626
627 /**
628 * Gets one account by ID.
629 *
630 * Request parameters:
631 *
632 * [profileId] - User profile ID associated with this request.
633 *
634 * [id] - Account ID.
635 *
636 * Completes with a [Account].
637 *
638 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
639 * error.
640 *
641 * If the used [http.Client] completes with an error when making a REST call,
642 * this method will complete with the same error.
643 */
644 async.Future<Account> get(core.String profileId, core.String id) {
645 var _url = null;
646 var _queryParams = new core.Map();
647 var _uploadMedia = null;
648 var _uploadOptions = null;
649 var _downloadOptions = commons.DownloadOptions.Metadata;
650 var _body = null;
651
652 if (profileId == null) {
653 throw new core.ArgumentError("Parameter profileId is required.");
654 }
655 if (id == null) {
656 throw new core.ArgumentError("Parameter id is required.");
657 }
658
659 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ounts/' + commons.Escaper.ecapeVariable('$id');
660
661 var _response = _requester.request(_url,
662 "GET",
663 body: _body,
664 queryParams: _queryParams,
665 uploadOptions: _uploadOptions,
666 uploadMedia: _uploadMedia,
667 downloadOptions: _downloadOptions);
668 return _response.then((data) => new Account.fromJson(data));
669 }
670
671 /**
672 * Retrieves the list of accounts, possibly filtered. This method supports
673 * paging.
674 *
675 * Request parameters:
676 *
677 * [profileId] - User profile ID associated with this request.
678 *
679 * [active] - Select only active accounts. Don't set this field to select both
680 * active and non-active accounts.
681 *
682 * [ids] - Select only accounts with these IDs.
683 *
684 * [maxResults] - Maximum number of results to return.
685 *
686 * [pageToken] - Value of the nextPageToken from the previous result page.
687 *
688 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
689 * are allowed. For example, "account*2015" will return objects with names
690 * like "account June 2015", "account April 2015", or simply "account 2015".
691 * Most of the searches also add wildcards implicitly at the start and the end
692 * of the search string. For example, a search string of "account" will match
693 * objects with name "my account", "account 2015", or simply "account".
694 *
695 * [sortField] - Field by which to sort the list.
696 * Possible string values are:
697 * - "ID"
698 * - "NAME"
699 *
700 * [sortOrder] - Order of sorted results, default is ASCENDING.
701 * Possible string values are:
702 * - "ASCENDING"
703 * - "DESCENDING"
704 *
705 * Completes with a [AccountsListResponse].
706 *
707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
708 * error.
709 *
710 * If the used [http.Client] completes with an error when making a REST call,
711 * this method will complete with the same error.
712 */
713 async.Future<AccountsListResponse> list(core.String profileId, {core.bool acti ve, core.List<core.String> ids, core.int maxResults, core.String pageToken, core .String searchString, core.String sortField, core.String sortOrder}) {
714 var _url = null;
715 var _queryParams = new core.Map();
716 var _uploadMedia = null;
717 var _uploadOptions = null;
718 var _downloadOptions = commons.DownloadOptions.Metadata;
719 var _body = null;
720
721 if (profileId == null) {
722 throw new core.ArgumentError("Parameter profileId is required.");
723 }
724 if (active != null) {
725 _queryParams["active"] = ["${active}"];
726 }
727 if (ids != null) {
728 _queryParams["ids"] = ids;
729 }
730 if (maxResults != null) {
731 _queryParams["maxResults"] = ["${maxResults}"];
732 }
733 if (pageToken != null) {
734 _queryParams["pageToken"] = [pageToken];
735 }
736 if (searchString != null) {
737 _queryParams["searchString"] = [searchString];
738 }
739 if (sortField != null) {
740 _queryParams["sortField"] = [sortField];
741 }
742 if (sortOrder != null) {
743 _queryParams["sortOrder"] = [sortOrder];
744 }
745
746 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ounts';
747
748 var _response = _requester.request(_url,
749 "GET",
750 body: _body,
751 queryParams: _queryParams,
752 uploadOptions: _uploadOptions,
753 uploadMedia: _uploadMedia,
754 downloadOptions: _downloadOptions);
755 return _response.then((data) => new AccountsListResponse.fromJson(data));
756 }
757
758 /**
759 * Updates an existing account. This method supports patch semantics.
760 *
761 * [request] - The metadata request object.
762 *
763 * Request parameters:
764 *
765 * [profileId] - User profile ID associated with this request.
766 *
767 * [id] - Account ID.
768 *
769 * Completes with a [Account].
770 *
771 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
772 * error.
773 *
774 * If the used [http.Client] completes with an error when making a REST call,
775 * this method will complete with the same error.
776 */
777 async.Future<Account> patch(Account request, core.String profileId, core.Strin g id) {
778 var _url = null;
779 var _queryParams = new core.Map();
780 var _uploadMedia = null;
781 var _uploadOptions = null;
782 var _downloadOptions = commons.DownloadOptions.Metadata;
783 var _body = null;
784
785 if (request != null) {
786 _body = convert.JSON.encode((request).toJson());
787 }
788 if (profileId == null) {
789 throw new core.ArgumentError("Parameter profileId is required.");
790 }
791 if (id == null) {
792 throw new core.ArgumentError("Parameter id is required.");
793 }
794 _queryParams["id"] = [id];
795
796 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ounts';
797
798 var _response = _requester.request(_url,
799 "PATCH",
800 body: _body,
801 queryParams: _queryParams,
802 uploadOptions: _uploadOptions,
803 uploadMedia: _uploadMedia,
804 downloadOptions: _downloadOptions);
805 return _response.then((data) => new Account.fromJson(data));
806 }
807
808 /**
809 * Updates an existing account.
810 *
811 * [request] - The metadata request object.
812 *
813 * Request parameters:
814 *
815 * [profileId] - User profile ID associated with this request.
816 *
817 * Completes with a [Account].
818 *
819 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
820 * error.
821 *
822 * If the used [http.Client] completes with an error when making a REST call,
823 * this method will complete with the same error.
824 */
825 async.Future<Account> update(Account request, core.String profileId) {
826 var _url = null;
827 var _queryParams = new core.Map();
828 var _uploadMedia = null;
829 var _uploadOptions = null;
830 var _downloadOptions = commons.DownloadOptions.Metadata;
831 var _body = null;
832
833 if (request != null) {
834 _body = convert.JSON.encode((request).toJson());
835 }
836 if (profileId == null) {
837 throw new core.ArgumentError("Parameter profileId is required.");
838 }
839
840 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/acc ounts';
841
842 var _response = _requester.request(_url,
843 "PUT",
844 body: _body,
845 queryParams: _queryParams,
846 uploadOptions: _uploadOptions,
847 uploadMedia: _uploadMedia,
848 downloadOptions: _downloadOptions);
849 return _response.then((data) => new Account.fromJson(data));
850 }
851
852 }
853
854
855 class AdsResourceApi {
856 final commons.ApiRequester _requester;
857
858 AdsResourceApi(commons.ApiRequester client) :
859 _requester = client;
860
861 /**
862 * Gets one ad by ID.
863 *
864 * Request parameters:
865 *
866 * [profileId] - User profile ID associated with this request.
867 *
868 * [id] - Ad ID.
869 *
870 * Completes with a [Ad].
871 *
872 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
873 * error.
874 *
875 * If the used [http.Client] completes with an error when making a REST call,
876 * this method will complete with the same error.
877 */
878 async.Future<Ad> get(core.String profileId, core.String id) {
879 var _url = null;
880 var _queryParams = new core.Map();
881 var _uploadMedia = null;
882 var _uploadOptions = null;
883 var _downloadOptions = commons.DownloadOptions.Metadata;
884 var _body = null;
885
886 if (profileId == null) {
887 throw new core.ArgumentError("Parameter profileId is required.");
888 }
889 if (id == null) {
890 throw new core.ArgumentError("Parameter id is required.");
891 }
892
893 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads /' + commons.Escaper.ecapeVariable('$id');
894
895 var _response = _requester.request(_url,
896 "GET",
897 body: _body,
898 queryParams: _queryParams,
899 uploadOptions: _uploadOptions,
900 uploadMedia: _uploadMedia,
901 downloadOptions: _downloadOptions);
902 return _response.then((data) => new Ad.fromJson(data));
903 }
904
905 /**
906 * Inserts a new ad.
907 *
908 * [request] - The metadata request object.
909 *
910 * Request parameters:
911 *
912 * [profileId] - User profile ID associated with this request.
913 *
914 * Completes with a [Ad].
915 *
916 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
917 * error.
918 *
919 * If the used [http.Client] completes with an error when making a REST call,
920 * this method will complete with the same error.
921 */
922 async.Future<Ad> insert(Ad request, core.String profileId) {
923 var _url = null;
924 var _queryParams = new core.Map();
925 var _uploadMedia = null;
926 var _uploadOptions = null;
927 var _downloadOptions = commons.DownloadOptions.Metadata;
928 var _body = null;
929
930 if (request != null) {
931 _body = convert.JSON.encode((request).toJson());
932 }
933 if (profileId == null) {
934 throw new core.ArgumentError("Parameter profileId is required.");
935 }
936
937 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads ';
938
939 var _response = _requester.request(_url,
940 "POST",
941 body: _body,
942 queryParams: _queryParams,
943 uploadOptions: _uploadOptions,
944 uploadMedia: _uploadMedia,
945 downloadOptions: _downloadOptions);
946 return _response.then((data) => new Ad.fromJson(data));
947 }
948
949 /**
950 * Retrieves a list of ads, possibly filtered. This method supports paging.
951 *
952 * Request parameters:
953 *
954 * [profileId] - User profile ID associated with this request.
955 *
956 * [active] - Select only active ads.
957 *
958 * [advertiserId] - Select only ads with this advertiser ID.
959 *
960 * [archived] - Select only archived ads.
961 *
962 * [audienceSegmentIds] - Select only ads with these audience segment IDs.
963 *
964 * [campaignIds] - Select only ads with these campaign IDs.
965 *
966 * [compatibility] - Select default ads with the specified compatibility.
967 * Applicable when type is AD_SERVING_DEFAULT_AD. DISPLAY and
968 * DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile
969 * devices for regular or interstitial ads, respectively. APP and
970 * APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers
971 * to rendering an in-stream video ads developed with the VAST standard.
972 * Possible string values are:
973 * - "APP"
974 * - "APP_INTERSTITIAL"
975 * - "DISPLAY"
976 * - "DISPLAY_INTERSTITIAL"
977 * - "IN_STREAM_VIDEO"
978 *
979 * [creativeIds] - Select only ads with these creative IDs assigned.
980 *
981 * [creativeOptimizationConfigurationIds] - Select only ads with these
982 * creative optimization configuration IDs.
983 *
984 * [creativeType] - Select only ads with the specified creativeType.
985 * Possible string values are:
986 * - "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
987 * - "CUSTOM_INPAGE"
988 * - "CUSTOM_INTERSTITIAL"
989 * - "ENHANCED_BANNER"
990 * - "ENHANCED_IMAGE"
991 * - "FLASH_INPAGE"
992 * - "HTML5_BANNER"
993 * - "IMAGE"
994 * - "INSTREAM_VIDEO"
995 * - "INSTREAM_VIDEO_REDIRECT"
996 * - "INTERNAL_REDIRECT"
997 * - "INTERSTITIAL_INTERNAL_REDIRECT"
998 * - "REDIRECT"
999 * - "RICH_MEDIA_EXPANDING"
1000 * - "RICH_MEDIA_IM_EXPAND"
1001 * - "RICH_MEDIA_INPAGE"
1002 * - "RICH_MEDIA_INPAGE_FLOATING"
1003 * - "RICH_MEDIA_INTERSTITIAL_FLOAT"
1004 * - "RICH_MEDIA_MOBILE_IN_APP"
1005 * - "RICH_MEDIA_MULTI_FLOATING"
1006 * - "RICH_MEDIA_PEEL_DOWN"
1007 * - "TRACKING_TEXT"
1008 * - "VPAID_LINEAR"
1009 * - "VPAID_NON_LINEAR"
1010 *
1011 * [dynamicClickTracker] - Select only dynamic click trackers. Applicable when
1012 * type is AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers.
1013 * If false, select static click trackers. Leave unset to select both.
1014 *
1015 * [ids] - Select only ads with these IDs.
1016 *
1017 * [landingPageIds] - Select only ads with these landing page IDs.
1018 *
1019 * [maxResults] - Maximum number of results to return.
1020 *
1021 * [overriddenEventTagId] - Select only ads with this event tag override ID.
1022 *
1023 * [pageToken] - Value of the nextPageToken from the previous result page.
1024 *
1025 * [placementIds] - Select only ads with these placement IDs assigned.
1026 *
1027 * [remarketingListIds] - Select only ads whose list targeting expression use
1028 * these remarketing list IDs.
1029 *
1030 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
1031 * are allowed. For example, "ad*2015" will return objects with names like "ad
1032 * June 2015", "ad April 2015", or simply "ad 2015". Most of the searches also
1033 * add wildcards implicitly at the start and the end of the search string. For
1034 * example, a search string of "ad" will match objects with name "my ad", "ad
1035 * 2015", or simply "ad".
1036 *
1037 * [sizeIds] - Select only ads with these size IDs.
1038 *
1039 * [sortField] - Field by which to sort the list.
1040 * Possible string values are:
1041 * - "ID"
1042 * - "NAME"
1043 *
1044 * [sortOrder] - Order of sorted results, default is ASCENDING.
1045 * Possible string values are:
1046 * - "ASCENDING"
1047 * - "DESCENDING"
1048 *
1049 * [sslCompliant] - Select only ads that are SSL-compliant.
1050 *
1051 * [sslRequired] - Select only ads that require SSL.
1052 *
1053 * [type] - Select only ads with these types.
1054 *
1055 * Completes with a [AdsListResponse].
1056 *
1057 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1058 * error.
1059 *
1060 * If the used [http.Client] completes with an error when making a REST call,
1061 * this method will complete with the same error.
1062 */
1063 async.Future<AdsListResponse> list(core.String profileId, {core.bool active, c ore.String advertiserId, core.bool archived, core.List<core.String> audienceSegm entIds, core.List<core.String> campaignIds, core.String compatibility, core.List <core.String> creativeIds, core.List<core.String> creativeOptimizationConfigurat ionIds, core.String creativeType, core.bool dynamicClickTracker, core.List<core. String> ids, core.List<core.String> landingPageIds, core.int maxResults, core.St ring overriddenEventTagId, core.String pageToken, core.List<core.String> placeme ntIds, core.List<core.String> remarketingListIds, core.String searchString, core .List<core.String> sizeIds, core.String sortField, core.String sortOrder, core.b ool sslCompliant, core.bool sslRequired, core.List<core.String> type}) {
1064 var _url = null;
1065 var _queryParams = new core.Map();
1066 var _uploadMedia = null;
1067 var _uploadOptions = null;
1068 var _downloadOptions = commons.DownloadOptions.Metadata;
1069 var _body = null;
1070
1071 if (profileId == null) {
1072 throw new core.ArgumentError("Parameter profileId is required.");
1073 }
1074 if (active != null) {
1075 _queryParams["active"] = ["${active}"];
1076 }
1077 if (advertiserId != null) {
1078 _queryParams["advertiserId"] = [advertiserId];
1079 }
1080 if (archived != null) {
1081 _queryParams["archived"] = ["${archived}"];
1082 }
1083 if (audienceSegmentIds != null) {
1084 _queryParams["audienceSegmentIds"] = audienceSegmentIds;
1085 }
1086 if (campaignIds != null) {
1087 _queryParams["campaignIds"] = campaignIds;
1088 }
1089 if (compatibility != null) {
1090 _queryParams["compatibility"] = [compatibility];
1091 }
1092 if (creativeIds != null) {
1093 _queryParams["creativeIds"] = creativeIds;
1094 }
1095 if (creativeOptimizationConfigurationIds != null) {
1096 _queryParams["creativeOptimizationConfigurationIds"] = creativeOptimizatio nConfigurationIds;
1097 }
1098 if (creativeType != null) {
1099 _queryParams["creativeType"] = [creativeType];
1100 }
1101 if (dynamicClickTracker != null) {
1102 _queryParams["dynamicClickTracker"] = ["${dynamicClickTracker}"];
1103 }
1104 if (ids != null) {
1105 _queryParams["ids"] = ids;
1106 }
1107 if (landingPageIds != null) {
1108 _queryParams["landingPageIds"] = landingPageIds;
1109 }
1110 if (maxResults != null) {
1111 _queryParams["maxResults"] = ["${maxResults}"];
1112 }
1113 if (overriddenEventTagId != null) {
1114 _queryParams["overriddenEventTagId"] = [overriddenEventTagId];
1115 }
1116 if (pageToken != null) {
1117 _queryParams["pageToken"] = [pageToken];
1118 }
1119 if (placementIds != null) {
1120 _queryParams["placementIds"] = placementIds;
1121 }
1122 if (remarketingListIds != null) {
1123 _queryParams["remarketingListIds"] = remarketingListIds;
1124 }
1125 if (searchString != null) {
1126 _queryParams["searchString"] = [searchString];
1127 }
1128 if (sizeIds != null) {
1129 _queryParams["sizeIds"] = sizeIds;
1130 }
1131 if (sortField != null) {
1132 _queryParams["sortField"] = [sortField];
1133 }
1134 if (sortOrder != null) {
1135 _queryParams["sortOrder"] = [sortOrder];
1136 }
1137 if (sslCompliant != null) {
1138 _queryParams["sslCompliant"] = ["${sslCompliant}"];
1139 }
1140 if (sslRequired != null) {
1141 _queryParams["sslRequired"] = ["${sslRequired}"];
1142 }
1143 if (type != null) {
1144 _queryParams["type"] = type;
1145 }
1146
1147 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads ';
1148
1149 var _response = _requester.request(_url,
1150 "GET",
1151 body: _body,
1152 queryParams: _queryParams,
1153 uploadOptions: _uploadOptions,
1154 uploadMedia: _uploadMedia,
1155 downloadOptions: _downloadOptions);
1156 return _response.then((data) => new AdsListResponse.fromJson(data));
1157 }
1158
1159 /**
1160 * Updates an existing ad. This method supports patch semantics.
1161 *
1162 * [request] - The metadata request object.
1163 *
1164 * Request parameters:
1165 *
1166 * [profileId] - User profile ID associated with this request.
1167 *
1168 * [id] - Ad ID.
1169 *
1170 * Completes with a [Ad].
1171 *
1172 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1173 * error.
1174 *
1175 * If the used [http.Client] completes with an error when making a REST call,
1176 * this method will complete with the same error.
1177 */
1178 async.Future<Ad> patch(Ad request, core.String profileId, core.String id) {
1179 var _url = null;
1180 var _queryParams = new core.Map();
1181 var _uploadMedia = null;
1182 var _uploadOptions = null;
1183 var _downloadOptions = commons.DownloadOptions.Metadata;
1184 var _body = null;
1185
1186 if (request != null) {
1187 _body = convert.JSON.encode((request).toJson());
1188 }
1189 if (profileId == null) {
1190 throw new core.ArgumentError("Parameter profileId is required.");
1191 }
1192 if (id == null) {
1193 throw new core.ArgumentError("Parameter id is required.");
1194 }
1195 _queryParams["id"] = [id];
1196
1197 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads ';
1198
1199 var _response = _requester.request(_url,
1200 "PATCH",
1201 body: _body,
1202 queryParams: _queryParams,
1203 uploadOptions: _uploadOptions,
1204 uploadMedia: _uploadMedia,
1205 downloadOptions: _downloadOptions);
1206 return _response.then((data) => new Ad.fromJson(data));
1207 }
1208
1209 /**
1210 * Updates an existing ad.
1211 *
1212 * [request] - The metadata request object.
1213 *
1214 * Request parameters:
1215 *
1216 * [profileId] - User profile ID associated with this request.
1217 *
1218 * Completes with a [Ad].
1219 *
1220 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1221 * error.
1222 *
1223 * If the used [http.Client] completes with an error when making a REST call,
1224 * this method will complete with the same error.
1225 */
1226 async.Future<Ad> update(Ad request, core.String profileId) {
1227 var _url = null;
1228 var _queryParams = new core.Map();
1229 var _uploadMedia = null;
1230 var _uploadOptions = null;
1231 var _downloadOptions = commons.DownloadOptions.Metadata;
1232 var _body = null;
1233
1234 if (request != null) {
1235 _body = convert.JSON.encode((request).toJson());
1236 }
1237 if (profileId == null) {
1238 throw new core.ArgumentError("Parameter profileId is required.");
1239 }
1240
1241 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ads ';
1242
1243 var _response = _requester.request(_url,
1244 "PUT",
1245 body: _body,
1246 queryParams: _queryParams,
1247 uploadOptions: _uploadOptions,
1248 uploadMedia: _uploadMedia,
1249 downloadOptions: _downloadOptions);
1250 return _response.then((data) => new Ad.fromJson(data));
1251 }
1252
1253 }
1254
1255
1256 class AdvertiserGroupsResourceApi {
1257 final commons.ApiRequester _requester;
1258
1259 AdvertiserGroupsResourceApi(commons.ApiRequester client) :
1260 _requester = client;
1261
1262 /**
1263 * Deletes an existing advertiser group.
1264 *
1265 * Request parameters:
1266 *
1267 * [profileId] - User profile ID associated with this request.
1268 *
1269 * [id] - Advertiser group ID.
1270 *
1271 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1272 * error.
1273 *
1274 * If the used [http.Client] completes with an error when making a REST call,
1275 * this method will complete with the same error.
1276 */
1277 async.Future delete(core.String profileId, core.String id) {
1278 var _url = null;
1279 var _queryParams = new core.Map();
1280 var _uploadMedia = null;
1281 var _uploadOptions = null;
1282 var _downloadOptions = commons.DownloadOptions.Metadata;
1283 var _body = null;
1284
1285 if (profileId == null) {
1286 throw new core.ArgumentError("Parameter profileId is required.");
1287 }
1288 if (id == null) {
1289 throw new core.ArgumentError("Parameter id is required.");
1290 }
1291
1292 _downloadOptions = null;
1293
1294 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertiserGroups/' + commons.Escaper.ecapeVariable('$id');
1295
1296 var _response = _requester.request(_url,
1297 "DELETE",
1298 body: _body,
1299 queryParams: _queryParams,
1300 uploadOptions: _uploadOptions,
1301 uploadMedia: _uploadMedia,
1302 downloadOptions: _downloadOptions);
1303 return _response.then((data) => null);
1304 }
1305
1306 /**
1307 * Gets one advertiser group by ID.
1308 *
1309 * Request parameters:
1310 *
1311 * [profileId] - User profile ID associated with this request.
1312 *
1313 * [id] - Advertiser group ID.
1314 *
1315 * Completes with a [AdvertiserGroup].
1316 *
1317 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1318 * error.
1319 *
1320 * If the used [http.Client] completes with an error when making a REST call,
1321 * this method will complete with the same error.
1322 */
1323 async.Future<AdvertiserGroup> get(core.String profileId, core.String id) {
1324 var _url = null;
1325 var _queryParams = new core.Map();
1326 var _uploadMedia = null;
1327 var _uploadOptions = null;
1328 var _downloadOptions = commons.DownloadOptions.Metadata;
1329 var _body = null;
1330
1331 if (profileId == null) {
1332 throw new core.ArgumentError("Parameter profileId is required.");
1333 }
1334 if (id == null) {
1335 throw new core.ArgumentError("Parameter id is required.");
1336 }
1337
1338 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertiserGroups/' + commons.Escaper.ecapeVariable('$id');
1339
1340 var _response = _requester.request(_url,
1341 "GET",
1342 body: _body,
1343 queryParams: _queryParams,
1344 uploadOptions: _uploadOptions,
1345 uploadMedia: _uploadMedia,
1346 downloadOptions: _downloadOptions);
1347 return _response.then((data) => new AdvertiserGroup.fromJson(data));
1348 }
1349
1350 /**
1351 * Inserts a new advertiser group.
1352 *
1353 * [request] - The metadata request object.
1354 *
1355 * Request parameters:
1356 *
1357 * [profileId] - User profile ID associated with this request.
1358 *
1359 * Completes with a [AdvertiserGroup].
1360 *
1361 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1362 * error.
1363 *
1364 * If the used [http.Client] completes with an error when making a REST call,
1365 * this method will complete with the same error.
1366 */
1367 async.Future<AdvertiserGroup> insert(AdvertiserGroup request, core.String prof ileId) {
1368 var _url = null;
1369 var _queryParams = new core.Map();
1370 var _uploadMedia = null;
1371 var _uploadOptions = null;
1372 var _downloadOptions = commons.DownloadOptions.Metadata;
1373 var _body = null;
1374
1375 if (request != null) {
1376 _body = convert.JSON.encode((request).toJson());
1377 }
1378 if (profileId == null) {
1379 throw new core.ArgumentError("Parameter profileId is required.");
1380 }
1381
1382 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertiserGroups';
1383
1384 var _response = _requester.request(_url,
1385 "POST",
1386 body: _body,
1387 queryParams: _queryParams,
1388 uploadOptions: _uploadOptions,
1389 uploadMedia: _uploadMedia,
1390 downloadOptions: _downloadOptions);
1391 return _response.then((data) => new AdvertiserGroup.fromJson(data));
1392 }
1393
1394 /**
1395 * Retrieves a list of advertiser groups, possibly filtered. This method
1396 * supports paging.
1397 *
1398 * Request parameters:
1399 *
1400 * [profileId] - User profile ID associated with this request.
1401 *
1402 * [ids] - Select only advertiser groups with these IDs.
1403 *
1404 * [maxResults] - Maximum number of results to return.
1405 *
1406 * [pageToken] - Value of the nextPageToken from the previous result page.
1407 *
1408 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
1409 * are allowed. For example, "advertiser*2015" will return objects with names
1410 * like "advertiser group June 2015", "advertiser group April 2015", or simply
1411 * "advertiser group 2015". Most of the searches also add wildcards implicitly
1412 * at the start and the end of the search string. For example, a search string
1413 * of "advertisergroup" will match objects with name "my advertisergroup",
1414 * "advertisergroup 2015", or simply "advertisergroup".
1415 *
1416 * [sortField] - Field by which to sort the list.
1417 * Possible string values are:
1418 * - "ID"
1419 * - "NAME"
1420 *
1421 * [sortOrder] - Order of sorted results, default is ASCENDING.
1422 * Possible string values are:
1423 * - "ASCENDING"
1424 * - "DESCENDING"
1425 *
1426 * Completes with a [AdvertiserGroupsListResponse].
1427 *
1428 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1429 * error.
1430 *
1431 * If the used [http.Client] completes with an error when making a REST call,
1432 * this method will complete with the same error.
1433 */
1434 async.Future<AdvertiserGroupsListResponse> list(core.String profileId, {core.L ist<core.String> ids, core.int maxResults, core.String pageToken, core.String se archString, core.String sortField, core.String sortOrder}) {
1435 var _url = null;
1436 var _queryParams = new core.Map();
1437 var _uploadMedia = null;
1438 var _uploadOptions = null;
1439 var _downloadOptions = commons.DownloadOptions.Metadata;
1440 var _body = null;
1441
1442 if (profileId == null) {
1443 throw new core.ArgumentError("Parameter profileId is required.");
1444 }
1445 if (ids != null) {
1446 _queryParams["ids"] = ids;
1447 }
1448 if (maxResults != null) {
1449 _queryParams["maxResults"] = ["${maxResults}"];
1450 }
1451 if (pageToken != null) {
1452 _queryParams["pageToken"] = [pageToken];
1453 }
1454 if (searchString != null) {
1455 _queryParams["searchString"] = [searchString];
1456 }
1457 if (sortField != null) {
1458 _queryParams["sortField"] = [sortField];
1459 }
1460 if (sortOrder != null) {
1461 _queryParams["sortOrder"] = [sortOrder];
1462 }
1463
1464 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertiserGroups';
1465
1466 var _response = _requester.request(_url,
1467 "GET",
1468 body: _body,
1469 queryParams: _queryParams,
1470 uploadOptions: _uploadOptions,
1471 uploadMedia: _uploadMedia,
1472 downloadOptions: _downloadOptions);
1473 return _response.then((data) => new AdvertiserGroupsListResponse.fromJson(da ta));
1474 }
1475
1476 /**
1477 * Updates an existing advertiser group. This method supports patch semantics.
1478 *
1479 * [request] - The metadata request object.
1480 *
1481 * Request parameters:
1482 *
1483 * [profileId] - User profile ID associated with this request.
1484 *
1485 * [id] - Advertiser group ID.
1486 *
1487 * Completes with a [AdvertiserGroup].
1488 *
1489 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1490 * error.
1491 *
1492 * If the used [http.Client] completes with an error when making a REST call,
1493 * this method will complete with the same error.
1494 */
1495 async.Future<AdvertiserGroup> patch(AdvertiserGroup request, core.String profi leId, core.String id) {
1496 var _url = null;
1497 var _queryParams = new core.Map();
1498 var _uploadMedia = null;
1499 var _uploadOptions = null;
1500 var _downloadOptions = commons.DownloadOptions.Metadata;
1501 var _body = null;
1502
1503 if (request != null) {
1504 _body = convert.JSON.encode((request).toJson());
1505 }
1506 if (profileId == null) {
1507 throw new core.ArgumentError("Parameter profileId is required.");
1508 }
1509 if (id == null) {
1510 throw new core.ArgumentError("Parameter id is required.");
1511 }
1512 _queryParams["id"] = [id];
1513
1514 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertiserGroups';
1515
1516 var _response = _requester.request(_url,
1517 "PATCH",
1518 body: _body,
1519 queryParams: _queryParams,
1520 uploadOptions: _uploadOptions,
1521 uploadMedia: _uploadMedia,
1522 downloadOptions: _downloadOptions);
1523 return _response.then((data) => new AdvertiserGroup.fromJson(data));
1524 }
1525
1526 /**
1527 * Updates an existing advertiser group.
1528 *
1529 * [request] - The metadata request object.
1530 *
1531 * Request parameters:
1532 *
1533 * [profileId] - User profile ID associated with this request.
1534 *
1535 * Completes with a [AdvertiserGroup].
1536 *
1537 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1538 * error.
1539 *
1540 * If the used [http.Client] completes with an error when making a REST call,
1541 * this method will complete with the same error.
1542 */
1543 async.Future<AdvertiserGroup> update(AdvertiserGroup request, core.String prof ileId) {
1544 var _url = null;
1545 var _queryParams = new core.Map();
1546 var _uploadMedia = null;
1547 var _uploadOptions = null;
1548 var _downloadOptions = commons.DownloadOptions.Metadata;
1549 var _body = null;
1550
1551 if (request != null) {
1552 _body = convert.JSON.encode((request).toJson());
1553 }
1554 if (profileId == null) {
1555 throw new core.ArgumentError("Parameter profileId is required.");
1556 }
1557
1558 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertiserGroups';
1559
1560 var _response = _requester.request(_url,
1561 "PUT",
1562 body: _body,
1563 queryParams: _queryParams,
1564 uploadOptions: _uploadOptions,
1565 uploadMedia: _uploadMedia,
1566 downloadOptions: _downloadOptions);
1567 return _response.then((data) => new AdvertiserGroup.fromJson(data));
1568 }
1569
1570 }
1571
1572
1573 class AdvertisersResourceApi {
1574 final commons.ApiRequester _requester;
1575
1576 AdvertisersResourceApi(commons.ApiRequester client) :
1577 _requester = client;
1578
1579 /**
1580 * Gets one advertiser by ID.
1581 *
1582 * Request parameters:
1583 *
1584 * [profileId] - User profile ID associated with this request.
1585 *
1586 * [id] - Advertiser ID.
1587 *
1588 * Completes with a [Advertiser].
1589 *
1590 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1591 * error.
1592 *
1593 * If the used [http.Client] completes with an error when making a REST call,
1594 * this method will complete with the same error.
1595 */
1596 async.Future<Advertiser> get(core.String profileId, core.String id) {
1597 var _url = null;
1598 var _queryParams = new core.Map();
1599 var _uploadMedia = null;
1600 var _uploadOptions = null;
1601 var _downloadOptions = commons.DownloadOptions.Metadata;
1602 var _body = null;
1603
1604 if (profileId == null) {
1605 throw new core.ArgumentError("Parameter profileId is required.");
1606 }
1607 if (id == null) {
1608 throw new core.ArgumentError("Parameter id is required.");
1609 }
1610
1611 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertisers/' + commons.Escaper.ecapeVariable('$id');
1612
1613 var _response = _requester.request(_url,
1614 "GET",
1615 body: _body,
1616 queryParams: _queryParams,
1617 uploadOptions: _uploadOptions,
1618 uploadMedia: _uploadMedia,
1619 downloadOptions: _downloadOptions);
1620 return _response.then((data) => new Advertiser.fromJson(data));
1621 }
1622
1623 /**
1624 * Inserts a new advertiser.
1625 *
1626 * [request] - The metadata request object.
1627 *
1628 * Request parameters:
1629 *
1630 * [profileId] - User profile ID associated with this request.
1631 *
1632 * Completes with a [Advertiser].
1633 *
1634 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1635 * error.
1636 *
1637 * If the used [http.Client] completes with an error when making a REST call,
1638 * this method will complete with the same error.
1639 */
1640 async.Future<Advertiser> insert(Advertiser request, core.String profileId) {
1641 var _url = null;
1642 var _queryParams = new core.Map();
1643 var _uploadMedia = null;
1644 var _uploadOptions = null;
1645 var _downloadOptions = commons.DownloadOptions.Metadata;
1646 var _body = null;
1647
1648 if (request != null) {
1649 _body = convert.JSON.encode((request).toJson());
1650 }
1651 if (profileId == null) {
1652 throw new core.ArgumentError("Parameter profileId is required.");
1653 }
1654
1655 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertisers';
1656
1657 var _response = _requester.request(_url,
1658 "POST",
1659 body: _body,
1660 queryParams: _queryParams,
1661 uploadOptions: _uploadOptions,
1662 uploadMedia: _uploadMedia,
1663 downloadOptions: _downloadOptions);
1664 return _response.then((data) => new Advertiser.fromJson(data));
1665 }
1666
1667 /**
1668 * Retrieves a list of advertisers, possibly filtered. This method supports
1669 * paging.
1670 *
1671 * Request parameters:
1672 *
1673 * [profileId] - User profile ID associated with this request.
1674 *
1675 * [advertiserGroupIds] - Select only advertisers with these advertiser group
1676 * IDs.
1677 *
1678 * [floodlightConfigurationIds] - Select only advertisers with these
1679 * floodlight configuration IDs.
1680 *
1681 * [ids] - Select only advertisers with these IDs.
1682 *
1683 * [includeAdvertisersWithoutGroupsOnly] - Select only advertisers which do
1684 * not belong to any advertiser group.
1685 *
1686 * [maxResults] - Maximum number of results to return.
1687 *
1688 * [onlyParent] - Select only advertisers which use another advertiser's
1689 * floodlight configuration.
1690 *
1691 * [pageToken] - Value of the nextPageToken from the previous result page.
1692 *
1693 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
1694 * are allowed. For example, "advertiser*2015" will return objects with names
1695 * like "advertiser June 2015", "advertiser April 2015", or simply "advertiser
1696 * 2015". Most of the searches also add wildcards implicitly at the start and
1697 * the end of the search string. For example, a search string of "advertiser"
1698 * will match objects with name "my advertiser", "advertiser 2015", or simply
1699 * "advertiser".
1700 *
1701 * [sortField] - Field by which to sort the list.
1702 * Possible string values are:
1703 * - "ID"
1704 * - "NAME"
1705 *
1706 * [sortOrder] - Order of sorted results, default is ASCENDING.
1707 * Possible string values are:
1708 * - "ASCENDING"
1709 * - "DESCENDING"
1710 *
1711 * [status] - Select only advertisers with the specified status.
1712 * Possible string values are:
1713 * - "APPROVED"
1714 * - "ON_HOLD"
1715 *
1716 * [subaccountId] - Select only advertisers with these subaccount IDs.
1717 *
1718 * Completes with a [AdvertisersListResponse].
1719 *
1720 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1721 * error.
1722 *
1723 * If the used [http.Client] completes with an error when making a REST call,
1724 * this method will complete with the same error.
1725 */
1726 async.Future<AdvertisersListResponse> list(core.String profileId, {core.List<c ore.String> advertiserGroupIds, core.List<core.String> floodlightConfigurationId s, core.List<core.String> ids, core.bool includeAdvertisersWithoutGroupsOnly, co re.int maxResults, core.bool onlyParent, core.String pageToken, core.String sear chString, core.String sortField, core.String sortOrder, core.String status, core .String subaccountId}) {
1727 var _url = null;
1728 var _queryParams = new core.Map();
1729 var _uploadMedia = null;
1730 var _uploadOptions = null;
1731 var _downloadOptions = commons.DownloadOptions.Metadata;
1732 var _body = null;
1733
1734 if (profileId == null) {
1735 throw new core.ArgumentError("Parameter profileId is required.");
1736 }
1737 if (advertiserGroupIds != null) {
1738 _queryParams["advertiserGroupIds"] = advertiserGroupIds;
1739 }
1740 if (floodlightConfigurationIds != null) {
1741 _queryParams["floodlightConfigurationIds"] = floodlightConfigurationIds;
1742 }
1743 if (ids != null) {
1744 _queryParams["ids"] = ids;
1745 }
1746 if (includeAdvertisersWithoutGroupsOnly != null) {
1747 _queryParams["includeAdvertisersWithoutGroupsOnly"] = ["${includeAdvertise rsWithoutGroupsOnly}"];
1748 }
1749 if (maxResults != null) {
1750 _queryParams["maxResults"] = ["${maxResults}"];
1751 }
1752 if (onlyParent != null) {
1753 _queryParams["onlyParent"] = ["${onlyParent}"];
1754 }
1755 if (pageToken != null) {
1756 _queryParams["pageToken"] = [pageToken];
1757 }
1758 if (searchString != null) {
1759 _queryParams["searchString"] = [searchString];
1760 }
1761 if (sortField != null) {
1762 _queryParams["sortField"] = [sortField];
1763 }
1764 if (sortOrder != null) {
1765 _queryParams["sortOrder"] = [sortOrder];
1766 }
1767 if (status != null) {
1768 _queryParams["status"] = [status];
1769 }
1770 if (subaccountId != null) {
1771 _queryParams["subaccountId"] = [subaccountId];
1772 }
1773
1774 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertisers';
1775
1776 var _response = _requester.request(_url,
1777 "GET",
1778 body: _body,
1779 queryParams: _queryParams,
1780 uploadOptions: _uploadOptions,
1781 uploadMedia: _uploadMedia,
1782 downloadOptions: _downloadOptions);
1783 return _response.then((data) => new AdvertisersListResponse.fromJson(data));
1784 }
1785
1786 /**
1787 * Updates an existing advertiser. This method supports patch semantics.
1788 *
1789 * [request] - The metadata request object.
1790 *
1791 * Request parameters:
1792 *
1793 * [profileId] - User profile ID associated with this request.
1794 *
1795 * [id] - Advertiser ID.
1796 *
1797 * Completes with a [Advertiser].
1798 *
1799 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1800 * error.
1801 *
1802 * If the used [http.Client] completes with an error when making a REST call,
1803 * this method will complete with the same error.
1804 */
1805 async.Future<Advertiser> patch(Advertiser request, core.String profileId, core .String id) {
1806 var _url = null;
1807 var _queryParams = new core.Map();
1808 var _uploadMedia = null;
1809 var _uploadOptions = null;
1810 var _downloadOptions = commons.DownloadOptions.Metadata;
1811 var _body = null;
1812
1813 if (request != null) {
1814 _body = convert.JSON.encode((request).toJson());
1815 }
1816 if (profileId == null) {
1817 throw new core.ArgumentError("Parameter profileId is required.");
1818 }
1819 if (id == null) {
1820 throw new core.ArgumentError("Parameter id is required.");
1821 }
1822 _queryParams["id"] = [id];
1823
1824 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertisers';
1825
1826 var _response = _requester.request(_url,
1827 "PATCH",
1828 body: _body,
1829 queryParams: _queryParams,
1830 uploadOptions: _uploadOptions,
1831 uploadMedia: _uploadMedia,
1832 downloadOptions: _downloadOptions);
1833 return _response.then((data) => new Advertiser.fromJson(data));
1834 }
1835
1836 /**
1837 * Updates an existing advertiser.
1838 *
1839 * [request] - The metadata request object.
1840 *
1841 * Request parameters:
1842 *
1843 * [profileId] - User profile ID associated with this request.
1844 *
1845 * Completes with a [Advertiser].
1846 *
1847 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1848 * error.
1849 *
1850 * If the used [http.Client] completes with an error when making a REST call,
1851 * this method will complete with the same error.
1852 */
1853 async.Future<Advertiser> update(Advertiser request, core.String profileId) {
1854 var _url = null;
1855 var _queryParams = new core.Map();
1856 var _uploadMedia = null;
1857 var _uploadOptions = null;
1858 var _downloadOptions = commons.DownloadOptions.Metadata;
1859 var _body = null;
1860
1861 if (request != null) {
1862 _body = convert.JSON.encode((request).toJson());
1863 }
1864 if (profileId == null) {
1865 throw new core.ArgumentError("Parameter profileId is required.");
1866 }
1867
1868 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/adv ertisers';
1869
1870 var _response = _requester.request(_url,
1871 "PUT",
1872 body: _body,
1873 queryParams: _queryParams,
1874 uploadOptions: _uploadOptions,
1875 uploadMedia: _uploadMedia,
1876 downloadOptions: _downloadOptions);
1877 return _response.then((data) => new Advertiser.fromJson(data));
1878 }
1879
1880 }
1881
1882
1883 class BrowsersResourceApi {
1884 final commons.ApiRequester _requester;
1885
1886 BrowsersResourceApi(commons.ApiRequester client) :
1887 _requester = client;
1888
1889 /**
1890 * Retrieves a list of browsers.
1891 *
1892 * Request parameters:
1893 *
1894 * [profileId] - User profile ID associated with this request.
1895 *
1896 * Completes with a [BrowsersListResponse].
1897 *
1898 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1899 * error.
1900 *
1901 * If the used [http.Client] completes with an error when making a REST call,
1902 * this method will complete with the same error.
1903 */
1904 async.Future<BrowsersListResponse> list(core.String profileId) {
1905 var _url = null;
1906 var _queryParams = new core.Map();
1907 var _uploadMedia = null;
1908 var _uploadOptions = null;
1909 var _downloadOptions = commons.DownloadOptions.Metadata;
1910 var _body = null;
1911
1912 if (profileId == null) {
1913 throw new core.ArgumentError("Parameter profileId is required.");
1914 }
1915
1916 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/bro wsers';
1917
1918 var _response = _requester.request(_url,
1919 "GET",
1920 body: _body,
1921 queryParams: _queryParams,
1922 uploadOptions: _uploadOptions,
1923 uploadMedia: _uploadMedia,
1924 downloadOptions: _downloadOptions);
1925 return _response.then((data) => new BrowsersListResponse.fromJson(data));
1926 }
1927
1928 }
1929
1930
1931 class CampaignCreativeAssociationsResourceApi {
1932 final commons.ApiRequester _requester;
1933
1934 CampaignCreativeAssociationsResourceApi(commons.ApiRequester client) :
1935 _requester = client;
1936
1937 /**
1938 * Associates a creative with the specified campaign. This method creates a
1939 * default ad with dimensions matching the creative in the campaign if such a
1940 * default ad does not exist already.
1941 *
1942 * [request] - The metadata request object.
1943 *
1944 * Request parameters:
1945 *
1946 * [profileId] - User profile ID associated with this request.
1947 *
1948 * [campaignId] - Campaign ID in this association.
1949 *
1950 * Completes with a [CampaignCreativeAssociation].
1951 *
1952 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1953 * error.
1954 *
1955 * If the used [http.Client] completes with an error when making a REST call,
1956 * this method will complete with the same error.
1957 */
1958 async.Future<CampaignCreativeAssociation> insert(CampaignCreativeAssociation r equest, core.String profileId, core.String campaignId) {
1959 var _url = null;
1960 var _queryParams = new core.Map();
1961 var _uploadMedia = null;
1962 var _uploadOptions = null;
1963 var _downloadOptions = commons.DownloadOptions.Metadata;
1964 var _body = null;
1965
1966 if (request != null) {
1967 _body = convert.JSON.encode((request).toJson());
1968 }
1969 if (profileId == null) {
1970 throw new core.ArgumentError("Parameter profileId is required.");
1971 }
1972 if (campaignId == null) {
1973 throw new core.ArgumentError("Parameter campaignId is required.");
1974 }
1975
1976 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/campaignCreativeAsso ciations';
1977
1978 var _response = _requester.request(_url,
1979 "POST",
1980 body: _body,
1981 queryParams: _queryParams,
1982 uploadOptions: _uploadOptions,
1983 uploadMedia: _uploadMedia,
1984 downloadOptions: _downloadOptions);
1985 return _response.then((data) => new CampaignCreativeAssociation.fromJson(dat a));
1986 }
1987
1988 /**
1989 * Retrieves the list of creative IDs associated with the specified campaign.
1990 * This method supports paging.
1991 *
1992 * Request parameters:
1993 *
1994 * [profileId] - User profile ID associated with this request.
1995 *
1996 * [campaignId] - Campaign ID in this association.
1997 *
1998 * [maxResults] - Maximum number of results to return.
1999 *
2000 * [pageToken] - Value of the nextPageToken from the previous result page.
2001 *
2002 * [sortOrder] - Order of sorted results, default is ASCENDING.
2003 * Possible string values are:
2004 * - "ASCENDING"
2005 * - "DESCENDING"
2006 *
2007 * Completes with a [CampaignCreativeAssociationsListResponse].
2008 *
2009 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2010 * error.
2011 *
2012 * If the used [http.Client] completes with an error when making a REST call,
2013 * this method will complete with the same error.
2014 */
2015 async.Future<CampaignCreativeAssociationsListResponse> list(core.String profil eId, core.String campaignId, {core.int maxResults, core.String pageToken, core.S tring sortOrder}) {
2016 var _url = null;
2017 var _queryParams = new core.Map();
2018 var _uploadMedia = null;
2019 var _uploadOptions = null;
2020 var _downloadOptions = commons.DownloadOptions.Metadata;
2021 var _body = null;
2022
2023 if (profileId == null) {
2024 throw new core.ArgumentError("Parameter profileId is required.");
2025 }
2026 if (campaignId == null) {
2027 throw new core.ArgumentError("Parameter campaignId is required.");
2028 }
2029 if (maxResults != null) {
2030 _queryParams["maxResults"] = ["${maxResults}"];
2031 }
2032 if (pageToken != null) {
2033 _queryParams["pageToken"] = [pageToken];
2034 }
2035 if (sortOrder != null) {
2036 _queryParams["sortOrder"] = [sortOrder];
2037 }
2038
2039 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/campaignCreativeAsso ciations';
2040
2041 var _response = _requester.request(_url,
2042 "GET",
2043 body: _body,
2044 queryParams: _queryParams,
2045 uploadOptions: _uploadOptions,
2046 uploadMedia: _uploadMedia,
2047 downloadOptions: _downloadOptions);
2048 return _response.then((data) => new CampaignCreativeAssociationsListResponse .fromJson(data));
2049 }
2050
2051 }
2052
2053
2054 class CampaignsResourceApi {
2055 final commons.ApiRequester _requester;
2056
2057 CampaignsResourceApi(commons.ApiRequester client) :
2058 _requester = client;
2059
2060 /**
2061 * Gets one campaign by ID.
2062 *
2063 * Request parameters:
2064 *
2065 * [profileId] - User profile ID associated with this request.
2066 *
2067 * [id] - Campaign ID.
2068 *
2069 * Completes with a [Campaign].
2070 *
2071 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2072 * error.
2073 *
2074 * If the used [http.Client] completes with an error when making a REST call,
2075 * this method will complete with the same error.
2076 */
2077 async.Future<Campaign> get(core.String profileId, core.String id) {
2078 var _url = null;
2079 var _queryParams = new core.Map();
2080 var _uploadMedia = null;
2081 var _uploadOptions = null;
2082 var _downloadOptions = commons.DownloadOptions.Metadata;
2083 var _body = null;
2084
2085 if (profileId == null) {
2086 throw new core.ArgumentError("Parameter profileId is required.");
2087 }
2088 if (id == null) {
2089 throw new core.ArgumentError("Parameter id is required.");
2090 }
2091
2092 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns/' + commons.Escaper.ecapeVariable('$id');
2093
2094 var _response = _requester.request(_url,
2095 "GET",
2096 body: _body,
2097 queryParams: _queryParams,
2098 uploadOptions: _uploadOptions,
2099 uploadMedia: _uploadMedia,
2100 downloadOptions: _downloadOptions);
2101 return _response.then((data) => new Campaign.fromJson(data));
2102 }
2103
2104 /**
2105 * Inserts a new campaign.
2106 *
2107 * [request] - The metadata request object.
2108 *
2109 * Request parameters:
2110 *
2111 * [profileId] - User profile ID associated with this request.
2112 *
2113 * [defaultLandingPageName] - Default landing page name for this new campaign.
2114 * Must be less than 256 characters long.
2115 *
2116 * [defaultLandingPageUrl] - Default landing page URL for this new campaign.
2117 *
2118 * Completes with a [Campaign].
2119 *
2120 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2121 * error.
2122 *
2123 * If the used [http.Client] completes with an error when making a REST call,
2124 * this method will complete with the same error.
2125 */
2126 async.Future<Campaign> insert(Campaign request, core.String profileId, core.St ring defaultLandingPageName, core.String defaultLandingPageUrl) {
2127 var _url = null;
2128 var _queryParams = new core.Map();
2129 var _uploadMedia = null;
2130 var _uploadOptions = null;
2131 var _downloadOptions = commons.DownloadOptions.Metadata;
2132 var _body = null;
2133
2134 if (request != null) {
2135 _body = convert.JSON.encode((request).toJson());
2136 }
2137 if (profileId == null) {
2138 throw new core.ArgumentError("Parameter profileId is required.");
2139 }
2140 if (defaultLandingPageName == null) {
2141 throw new core.ArgumentError("Parameter defaultLandingPageName is required .");
2142 }
2143 _queryParams["defaultLandingPageName"] = [defaultLandingPageName];
2144 if (defaultLandingPageUrl == null) {
2145 throw new core.ArgumentError("Parameter defaultLandingPageUrl is required. ");
2146 }
2147 _queryParams["defaultLandingPageUrl"] = [defaultLandingPageUrl];
2148
2149 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns';
2150
2151 var _response = _requester.request(_url,
2152 "POST",
2153 body: _body,
2154 queryParams: _queryParams,
2155 uploadOptions: _uploadOptions,
2156 uploadMedia: _uploadMedia,
2157 downloadOptions: _downloadOptions);
2158 return _response.then((data) => new Campaign.fromJson(data));
2159 }
2160
2161 /**
2162 * Retrieves a list of campaigns, possibly filtered. This method supports
2163 * paging.
2164 *
2165 * Request parameters:
2166 *
2167 * [profileId] - User profile ID associated with this request.
2168 *
2169 * [advertiserGroupIds] - Select only campaigns whose advertisers belong to
2170 * these advertiser groups.
2171 *
2172 * [advertiserIds] - Select only campaigns that belong to these advertisers.
2173 *
2174 * [archived] - Select only archived campaigns. Don't set this field to select
2175 * both archived and non-archived campaigns.
2176 *
2177 * [atLeastOneOptimizationActivity] - Select only campaigns that have at least
2178 * one optimization activity.
2179 *
2180 * [excludedIds] - Exclude campaigns with these IDs.
2181 *
2182 * [ids] - Select only campaigns with these IDs.
2183 *
2184 * [maxResults] - Maximum number of results to return.
2185 *
2186 * [overriddenEventTagId] - Select only campaigns that have overridden this
2187 * event tag ID.
2188 *
2189 * [pageToken] - Value of the nextPageToken from the previous result page.
2190 *
2191 * [searchString] - Allows searching for campaigns by name or ID. Wildcards
2192 * (*) are allowed. For example, "campaign*2015" will return campaigns with
2193 * names like "campaign June 2015", "campaign April 2015", or simply "campaign
2194 * 2015". Most of the searches also add wildcards implicitly at the start and
2195 * the end of the search string. For example, a search string of "campaign"
2196 * will match campaigns with name "my campaign", "campaign 2015", or simply
2197 * "campaign".
2198 *
2199 * [sortField] - Field by which to sort the list.
2200 * Possible string values are:
2201 * - "ID"
2202 * - "NAME"
2203 *
2204 * [sortOrder] - Order of sorted results, default is ASCENDING.
2205 * Possible string values are:
2206 * - "ASCENDING"
2207 * - "DESCENDING"
2208 *
2209 * [subaccountId] - Select only campaigns that belong to this subaccount.
2210 *
2211 * Completes with a [CampaignsListResponse].
2212 *
2213 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2214 * error.
2215 *
2216 * If the used [http.Client] completes with an error when making a REST call,
2217 * this method will complete with the same error.
2218 */
2219 async.Future<CampaignsListResponse> list(core.String profileId, {core.List<cor e.String> advertiserGroupIds, core.List<core.String> advertiserIds, core.bool ar chived, core.bool atLeastOneOptimizationActivity, core.List<core.String> exclude dIds, core.List<core.String> ids, core.int maxResults, core.String overriddenEve ntTagId, core.String pageToken, core.String searchString, core.String sortField, core.String sortOrder, core.String subaccountId}) {
2220 var _url = null;
2221 var _queryParams = new core.Map();
2222 var _uploadMedia = null;
2223 var _uploadOptions = null;
2224 var _downloadOptions = commons.DownloadOptions.Metadata;
2225 var _body = null;
2226
2227 if (profileId == null) {
2228 throw new core.ArgumentError("Parameter profileId is required.");
2229 }
2230 if (advertiserGroupIds != null) {
2231 _queryParams["advertiserGroupIds"] = advertiserGroupIds;
2232 }
2233 if (advertiserIds != null) {
2234 _queryParams["advertiserIds"] = advertiserIds;
2235 }
2236 if (archived != null) {
2237 _queryParams["archived"] = ["${archived}"];
2238 }
2239 if (atLeastOneOptimizationActivity != null) {
2240 _queryParams["atLeastOneOptimizationActivity"] = ["${atLeastOneOptimizatio nActivity}"];
2241 }
2242 if (excludedIds != null) {
2243 _queryParams["excludedIds"] = excludedIds;
2244 }
2245 if (ids != null) {
2246 _queryParams["ids"] = ids;
2247 }
2248 if (maxResults != null) {
2249 _queryParams["maxResults"] = ["${maxResults}"];
2250 }
2251 if (overriddenEventTagId != null) {
2252 _queryParams["overriddenEventTagId"] = [overriddenEventTagId];
2253 }
2254 if (pageToken != null) {
2255 _queryParams["pageToken"] = [pageToken];
2256 }
2257 if (searchString != null) {
2258 _queryParams["searchString"] = [searchString];
2259 }
2260 if (sortField != null) {
2261 _queryParams["sortField"] = [sortField];
2262 }
2263 if (sortOrder != null) {
2264 _queryParams["sortOrder"] = [sortOrder];
2265 }
2266 if (subaccountId != null) {
2267 _queryParams["subaccountId"] = [subaccountId];
2268 }
2269
2270 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns';
2271
2272 var _response = _requester.request(_url,
2273 "GET",
2274 body: _body,
2275 queryParams: _queryParams,
2276 uploadOptions: _uploadOptions,
2277 uploadMedia: _uploadMedia,
2278 downloadOptions: _downloadOptions);
2279 return _response.then((data) => new CampaignsListResponse.fromJson(data));
2280 }
2281
2282 /**
2283 * Updates an existing campaign. This method supports patch semantics.
2284 *
2285 * [request] - The metadata request object.
2286 *
2287 * Request parameters:
2288 *
2289 * [profileId] - User profile ID associated with this request.
2290 *
2291 * [id] - Campaign ID.
2292 *
2293 * Completes with a [Campaign].
2294 *
2295 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2296 * error.
2297 *
2298 * If the used [http.Client] completes with an error when making a REST call,
2299 * this method will complete with the same error.
2300 */
2301 async.Future<Campaign> patch(Campaign request, core.String profileId, core.Str ing id) {
2302 var _url = null;
2303 var _queryParams = new core.Map();
2304 var _uploadMedia = null;
2305 var _uploadOptions = null;
2306 var _downloadOptions = commons.DownloadOptions.Metadata;
2307 var _body = null;
2308
2309 if (request != null) {
2310 _body = convert.JSON.encode((request).toJson());
2311 }
2312 if (profileId == null) {
2313 throw new core.ArgumentError("Parameter profileId is required.");
2314 }
2315 if (id == null) {
2316 throw new core.ArgumentError("Parameter id is required.");
2317 }
2318 _queryParams["id"] = [id];
2319
2320 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns';
2321
2322 var _response = _requester.request(_url,
2323 "PATCH",
2324 body: _body,
2325 queryParams: _queryParams,
2326 uploadOptions: _uploadOptions,
2327 uploadMedia: _uploadMedia,
2328 downloadOptions: _downloadOptions);
2329 return _response.then((data) => new Campaign.fromJson(data));
2330 }
2331
2332 /**
2333 * Updates an existing campaign.
2334 *
2335 * [request] - The metadata request object.
2336 *
2337 * Request parameters:
2338 *
2339 * [profileId] - User profile ID associated with this request.
2340 *
2341 * Completes with a [Campaign].
2342 *
2343 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2344 * error.
2345 *
2346 * If the used [http.Client] completes with an error when making a REST call,
2347 * this method will complete with the same error.
2348 */
2349 async.Future<Campaign> update(Campaign request, core.String profileId) {
2350 var _url = null;
2351 var _queryParams = new core.Map();
2352 var _uploadMedia = null;
2353 var _uploadOptions = null;
2354 var _downloadOptions = commons.DownloadOptions.Metadata;
2355 var _body = null;
2356
2357 if (request != null) {
2358 _body = convert.JSON.encode((request).toJson());
2359 }
2360 if (profileId == null) {
2361 throw new core.ArgumentError("Parameter profileId is required.");
2362 }
2363
2364 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns';
2365
2366 var _response = _requester.request(_url,
2367 "PUT",
2368 body: _body,
2369 queryParams: _queryParams,
2370 uploadOptions: _uploadOptions,
2371 uploadMedia: _uploadMedia,
2372 downloadOptions: _downloadOptions);
2373 return _response.then((data) => new Campaign.fromJson(data));
2374 }
2375
2376 }
2377
2378
2379 class ChangeLogsResourceApi {
2380 final commons.ApiRequester _requester;
2381
2382 ChangeLogsResourceApi(commons.ApiRequester client) :
2383 _requester = client;
2384
2385 /**
2386 * Gets one change log by ID.
2387 *
2388 * Request parameters:
2389 *
2390 * [profileId] - User profile ID associated with this request.
2391 *
2392 * [id] - Change log ID.
2393 *
2394 * Completes with a [ChangeLog].
2395 *
2396 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2397 * error.
2398 *
2399 * If the used [http.Client] completes with an error when making a REST call,
2400 * this method will complete with the same error.
2401 */
2402 async.Future<ChangeLog> get(core.String profileId, core.String id) {
2403 var _url = null;
2404 var _queryParams = new core.Map();
2405 var _uploadMedia = null;
2406 var _uploadOptions = null;
2407 var _downloadOptions = commons.DownloadOptions.Metadata;
2408 var _body = null;
2409
2410 if (profileId == null) {
2411 throw new core.ArgumentError("Parameter profileId is required.");
2412 }
2413 if (id == null) {
2414 throw new core.ArgumentError("Parameter id is required.");
2415 }
2416
2417 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cha ngeLogs/' + commons.Escaper.ecapeVariable('$id');
2418
2419 var _response = _requester.request(_url,
2420 "GET",
2421 body: _body,
2422 queryParams: _queryParams,
2423 uploadOptions: _uploadOptions,
2424 uploadMedia: _uploadMedia,
2425 downloadOptions: _downloadOptions);
2426 return _response.then((data) => new ChangeLog.fromJson(data));
2427 }
2428
2429 /**
2430 * Retrieves a list of change logs. This method supports paging.
2431 *
2432 * Request parameters:
2433 *
2434 * [profileId] - User profile ID associated with this request.
2435 *
2436 * [action] - Select only change logs with the specified action.
2437 * Possible string values are:
2438 * - "ACTION_ADD"
2439 * - "ACTION_ASSIGN"
2440 * - "ACTION_ASSOCIATE"
2441 * - "ACTION_CREATE"
2442 * - "ACTION_DELETE"
2443 * - "ACTION_DISABLE"
2444 * - "ACTION_EMAIL_TAGS"
2445 * - "ACTION_ENABLE"
2446 * - "ACTION_LINK"
2447 * - "ACTION_MARK_AS_DEFAULT"
2448 * - "ACTION_PUSH"
2449 * - "ACTION_REMOVE"
2450 * - "ACTION_SEND"
2451 * - "ACTION_SHARE"
2452 * - "ACTION_UNASSIGN"
2453 * - "ACTION_UNLINK"
2454 * - "ACTION_UPDATE"
2455 *
2456 * [ids] - Select only change logs with these IDs.
2457 *
2458 * [maxChangeTime] - Select only change logs whose change time is before the
2459 * specified maxChangeTime.The time should be formatted as an RFC3339
2460 * date/time string. For example, for 10:54 PM on July 18th, 2015, in the
2461 * America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In
2462 * other words, the year, month, day, the letter T, the hour (24-hour clock
2463 * system), minute, second, and then the time zone offset.
2464 *
2465 * [maxResults] - Maximum number of results to return.
2466 *
2467 * [minChangeTime] - Select only change logs whose change time is before the
2468 * specified minChangeTime.The time should be formatted as an RFC3339
2469 * date/time string. For example, for 10:54 PM on July 18th, 2015, in the
2470 * America/New York time zone, the format is "2015-07-18T22:54:00-04:00". In
2471 * other words, the year, month, day, the letter T, the hour (24-hour clock
2472 * system), minute, second, and then the time zone offset.
2473 *
2474 * [objectIds] - Select only change logs with these object IDs.
2475 *
2476 * [objectType] - Select only change logs with the specified object type.
2477 * Possible string values are:
2478 * - "OBJECT_ACCOUNT"
2479 * - "OBJECT_ACCOUNT_BILLING_FEATURE"
2480 * - "OBJECT_AD"
2481 * - "OBJECT_ADVERTISER"
2482 * - "OBJECT_ADVERTISER_GROUP"
2483 * - "OBJECT_BILLING_ACCOUNT_GROUP"
2484 * - "OBJECT_BILLING_FEATURE"
2485 * - "OBJECT_BILLING_MINIMUM_FEE"
2486 * - "OBJECT_BILLING_PROFILE"
2487 * - "OBJECT_CAMPAIGN"
2488 * - "OBJECT_CONTENT_CATEGORY"
2489 * - "OBJECT_CREATIVE"
2490 * - "OBJECT_CREATIVE_ASSET"
2491 * - "OBJECT_CREATIVE_BUNDLE"
2492 * - "OBJECT_CREATIVE_FIELD"
2493 * - "OBJECT_CREATIVE_GROUP"
2494 * - "OBJECT_DFA_SITE"
2495 * - "OBJECT_EVENT_TAG"
2496 * - "OBJECT_FLOODLIGHT_ACTIVITY_GROUP"
2497 * - "OBJECT_FLOODLIGHT_ACTVITY"
2498 * - "OBJECT_FLOODLIGHT_CONFIGURATION"
2499 * - "OBJECT_INSTREAM_CREATIVE"
2500 * - "OBJECT_LANDING_PAGE"
2501 * - "OBJECT_MEDIA_ORDER"
2502 * - "OBJECT_PLACEMENT"
2503 * - "OBJECT_PLACEMENT_STRATEGY"
2504 * - "OBJECT_PLAYSTORE_LINK"
2505 * - "OBJECT_PROVIDED_LIST_CLIENT"
2506 * - "OBJECT_RATE_CARD"
2507 * - "OBJECT_REMARKETING_LIST"
2508 * - "OBJECT_RICHMEDIA_CREATIVE"
2509 * - "OBJECT_SD_SITE"
2510 * - "OBJECT_SEARCH_LIFT_STUDY"
2511 * - "OBJECT_SIZE"
2512 * - "OBJECT_SUBACCOUNT"
2513 * - "OBJECT_TARGETING_TEMPLATE"
2514 * - "OBJECT_USER_PROFILE"
2515 * - "OBJECT_USER_PROFILE_FILTER"
2516 * - "OBJECT_USER_ROLE"
2517 *
2518 * [pageToken] - Value of the nextPageToken from the previous result page.
2519 *
2520 * [searchString] - Select only change logs whose object ID, user name, old or
2521 * new values match the search string.
2522 *
2523 * [userProfileIds] - Select only change logs with these user profile IDs.
2524 *
2525 * Completes with a [ChangeLogsListResponse].
2526 *
2527 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2528 * error.
2529 *
2530 * If the used [http.Client] completes with an error when making a REST call,
2531 * this method will complete with the same error.
2532 */
2533 async.Future<ChangeLogsListResponse> list(core.String profileId, {core.String action, core.List<core.String> ids, core.String maxChangeTime, core.int maxResul ts, core.String minChangeTime, core.List<core.String> objectIds, core.String obj ectType, core.String pageToken, core.String searchString, core.List<core.String> userProfileIds}) {
2534 var _url = null;
2535 var _queryParams = new core.Map();
2536 var _uploadMedia = null;
2537 var _uploadOptions = null;
2538 var _downloadOptions = commons.DownloadOptions.Metadata;
2539 var _body = null;
2540
2541 if (profileId == null) {
2542 throw new core.ArgumentError("Parameter profileId is required.");
2543 }
2544 if (action != null) {
2545 _queryParams["action"] = [action];
2546 }
2547 if (ids != null) {
2548 _queryParams["ids"] = ids;
2549 }
2550 if (maxChangeTime != null) {
2551 _queryParams["maxChangeTime"] = [maxChangeTime];
2552 }
2553 if (maxResults != null) {
2554 _queryParams["maxResults"] = ["${maxResults}"];
2555 }
2556 if (minChangeTime != null) {
2557 _queryParams["minChangeTime"] = [minChangeTime];
2558 }
2559 if (objectIds != null) {
2560 _queryParams["objectIds"] = objectIds;
2561 }
2562 if (objectType != null) {
2563 _queryParams["objectType"] = [objectType];
2564 }
2565 if (pageToken != null) {
2566 _queryParams["pageToken"] = [pageToken];
2567 }
2568 if (searchString != null) {
2569 _queryParams["searchString"] = [searchString];
2570 }
2571 if (userProfileIds != null) {
2572 _queryParams["userProfileIds"] = userProfileIds;
2573 }
2574
2575 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cha ngeLogs';
2576
2577 var _response = _requester.request(_url,
2578 "GET",
2579 body: _body,
2580 queryParams: _queryParams,
2581 uploadOptions: _uploadOptions,
2582 uploadMedia: _uploadMedia,
2583 downloadOptions: _downloadOptions);
2584 return _response.then((data) => new ChangeLogsListResponse.fromJson(data));
2585 }
2586
2587 }
2588
2589
2590 class CitiesResourceApi {
2591 final commons.ApiRequester _requester;
2592
2593 CitiesResourceApi(commons.ApiRequester client) :
2594 _requester = client;
2595
2596 /**
2597 * Retrieves a list of cities, possibly filtered.
2598 *
2599 * Request parameters:
2600 *
2601 * [profileId] - User profile ID associated with this request.
2602 *
2603 * [countryDartIds] - Select only cities from these countries.
2604 *
2605 * [dartIds] - Select only cities with these DART IDs.
2606 *
2607 * [namePrefix] - Select only cities with names starting with this prefix.
2608 *
2609 * [regionDartIds] - Select only cities from these regions.
2610 *
2611 * Completes with a [CitiesListResponse].
2612 *
2613 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2614 * error.
2615 *
2616 * If the used [http.Client] completes with an error when making a REST call,
2617 * this method will complete with the same error.
2618 */
2619 async.Future<CitiesListResponse> list(core.String profileId, {core.List<core.S tring> countryDartIds, core.List<core.String> dartIds, core.String namePrefix, c ore.List<core.String> regionDartIds}) {
2620 var _url = null;
2621 var _queryParams = new core.Map();
2622 var _uploadMedia = null;
2623 var _uploadOptions = null;
2624 var _downloadOptions = commons.DownloadOptions.Metadata;
2625 var _body = null;
2626
2627 if (profileId == null) {
2628 throw new core.ArgumentError("Parameter profileId is required.");
2629 }
2630 if (countryDartIds != null) {
2631 _queryParams["countryDartIds"] = countryDartIds;
2632 }
2633 if (dartIds != null) {
2634 _queryParams["dartIds"] = dartIds;
2635 }
2636 if (namePrefix != null) {
2637 _queryParams["namePrefix"] = [namePrefix];
2638 }
2639 if (regionDartIds != null) {
2640 _queryParams["regionDartIds"] = regionDartIds;
2641 }
2642
2643 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cit ies';
2644
2645 var _response = _requester.request(_url,
2646 "GET",
2647 body: _body,
2648 queryParams: _queryParams,
2649 uploadOptions: _uploadOptions,
2650 uploadMedia: _uploadMedia,
2651 downloadOptions: _downloadOptions);
2652 return _response.then((data) => new CitiesListResponse.fromJson(data));
2653 }
2654
2655 }
2656
2657
2658 class ConnectionTypesResourceApi {
2659 final commons.ApiRequester _requester;
2660
2661 ConnectionTypesResourceApi(commons.ApiRequester client) :
2662 _requester = client;
2663
2664 /**
2665 * Gets one connection type by ID.
2666 *
2667 * Request parameters:
2668 *
2669 * [profileId] - User profile ID associated with this request.
2670 *
2671 * [id] - Connection type ID.
2672 *
2673 * Completes with a [ConnectionType].
2674 *
2675 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2676 * error.
2677 *
2678 * If the used [http.Client] completes with an error when making a REST call,
2679 * this method will complete with the same error.
2680 */
2681 async.Future<ConnectionType> get(core.String profileId, core.String id) {
2682 var _url = null;
2683 var _queryParams = new core.Map();
2684 var _uploadMedia = null;
2685 var _uploadOptions = null;
2686 var _downloadOptions = commons.DownloadOptions.Metadata;
2687 var _body = null;
2688
2689 if (profileId == null) {
2690 throw new core.ArgumentError("Parameter profileId is required.");
2691 }
2692 if (id == null) {
2693 throw new core.ArgumentError("Parameter id is required.");
2694 }
2695
2696 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con nectionTypes/' + commons.Escaper.ecapeVariable('$id');
2697
2698 var _response = _requester.request(_url,
2699 "GET",
2700 body: _body,
2701 queryParams: _queryParams,
2702 uploadOptions: _uploadOptions,
2703 uploadMedia: _uploadMedia,
2704 downloadOptions: _downloadOptions);
2705 return _response.then((data) => new ConnectionType.fromJson(data));
2706 }
2707
2708 /**
2709 * Retrieves a list of connection types.
2710 *
2711 * Request parameters:
2712 *
2713 * [profileId] - User profile ID associated with this request.
2714 *
2715 * Completes with a [ConnectionTypesListResponse].
2716 *
2717 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2718 * error.
2719 *
2720 * If the used [http.Client] completes with an error when making a REST call,
2721 * this method will complete with the same error.
2722 */
2723 async.Future<ConnectionTypesListResponse> list(core.String profileId) {
2724 var _url = null;
2725 var _queryParams = new core.Map();
2726 var _uploadMedia = null;
2727 var _uploadOptions = null;
2728 var _downloadOptions = commons.DownloadOptions.Metadata;
2729 var _body = null;
2730
2731 if (profileId == null) {
2732 throw new core.ArgumentError("Parameter profileId is required.");
2733 }
2734
2735 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con nectionTypes';
2736
2737 var _response = _requester.request(_url,
2738 "GET",
2739 body: _body,
2740 queryParams: _queryParams,
2741 uploadOptions: _uploadOptions,
2742 uploadMedia: _uploadMedia,
2743 downloadOptions: _downloadOptions);
2744 return _response.then((data) => new ConnectionTypesListResponse.fromJson(dat a));
2745 }
2746
2747 }
2748
2749
2750 class ContentCategoriesResourceApi {
2751 final commons.ApiRequester _requester;
2752
2753 ContentCategoriesResourceApi(commons.ApiRequester client) :
2754 _requester = client;
2755
2756 /**
2757 * Deletes an existing content category.
2758 *
2759 * Request parameters:
2760 *
2761 * [profileId] - User profile ID associated with this request.
2762 *
2763 * [id] - Content category ID.
2764 *
2765 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2766 * error.
2767 *
2768 * If the used [http.Client] completes with an error when making a REST call,
2769 * this method will complete with the same error.
2770 */
2771 async.Future delete(core.String profileId, core.String id) {
2772 var _url = null;
2773 var _queryParams = new core.Map();
2774 var _uploadMedia = null;
2775 var _uploadOptions = null;
2776 var _downloadOptions = commons.DownloadOptions.Metadata;
2777 var _body = null;
2778
2779 if (profileId == null) {
2780 throw new core.ArgumentError("Parameter profileId is required.");
2781 }
2782 if (id == null) {
2783 throw new core.ArgumentError("Parameter id is required.");
2784 }
2785
2786 _downloadOptions = null;
2787
2788 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con tentCategories/' + commons.Escaper.ecapeVariable('$id');
2789
2790 var _response = _requester.request(_url,
2791 "DELETE",
2792 body: _body,
2793 queryParams: _queryParams,
2794 uploadOptions: _uploadOptions,
2795 uploadMedia: _uploadMedia,
2796 downloadOptions: _downloadOptions);
2797 return _response.then((data) => null);
2798 }
2799
2800 /**
2801 * Gets one content category by ID.
2802 *
2803 * Request parameters:
2804 *
2805 * [profileId] - User profile ID associated with this request.
2806 *
2807 * [id] - Content category ID.
2808 *
2809 * Completes with a [ContentCategory].
2810 *
2811 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2812 * error.
2813 *
2814 * If the used [http.Client] completes with an error when making a REST call,
2815 * this method will complete with the same error.
2816 */
2817 async.Future<ContentCategory> get(core.String profileId, core.String id) {
2818 var _url = null;
2819 var _queryParams = new core.Map();
2820 var _uploadMedia = null;
2821 var _uploadOptions = null;
2822 var _downloadOptions = commons.DownloadOptions.Metadata;
2823 var _body = null;
2824
2825 if (profileId == null) {
2826 throw new core.ArgumentError("Parameter profileId is required.");
2827 }
2828 if (id == null) {
2829 throw new core.ArgumentError("Parameter id is required.");
2830 }
2831
2832 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con tentCategories/' + commons.Escaper.ecapeVariable('$id');
2833
2834 var _response = _requester.request(_url,
2835 "GET",
2836 body: _body,
2837 queryParams: _queryParams,
2838 uploadOptions: _uploadOptions,
2839 uploadMedia: _uploadMedia,
2840 downloadOptions: _downloadOptions);
2841 return _response.then((data) => new ContentCategory.fromJson(data));
2842 }
2843
2844 /**
2845 * Inserts a new content category.
2846 *
2847 * [request] - The metadata request object.
2848 *
2849 * Request parameters:
2850 *
2851 * [profileId] - User profile ID associated with this request.
2852 *
2853 * Completes with a [ContentCategory].
2854 *
2855 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2856 * error.
2857 *
2858 * If the used [http.Client] completes with an error when making a REST call,
2859 * this method will complete with the same error.
2860 */
2861 async.Future<ContentCategory> insert(ContentCategory request, core.String prof ileId) {
2862 var _url = null;
2863 var _queryParams = new core.Map();
2864 var _uploadMedia = null;
2865 var _uploadOptions = null;
2866 var _downloadOptions = commons.DownloadOptions.Metadata;
2867 var _body = null;
2868
2869 if (request != null) {
2870 _body = convert.JSON.encode((request).toJson());
2871 }
2872 if (profileId == null) {
2873 throw new core.ArgumentError("Parameter profileId is required.");
2874 }
2875
2876 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con tentCategories';
2877
2878 var _response = _requester.request(_url,
2879 "POST",
2880 body: _body,
2881 queryParams: _queryParams,
2882 uploadOptions: _uploadOptions,
2883 uploadMedia: _uploadMedia,
2884 downloadOptions: _downloadOptions);
2885 return _response.then((data) => new ContentCategory.fromJson(data));
2886 }
2887
2888 /**
2889 * Retrieves a list of content categories, possibly filtered. This method
2890 * supports paging.
2891 *
2892 * Request parameters:
2893 *
2894 * [profileId] - User profile ID associated with this request.
2895 *
2896 * [ids] - Select only content categories with these IDs.
2897 *
2898 * [maxResults] - Maximum number of results to return.
2899 *
2900 * [pageToken] - Value of the nextPageToken from the previous result page.
2901 *
2902 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
2903 * are allowed. For example, "contentcategory*2015" will return objects with
2904 * names like "contentcategory June 2015", "contentcategory April 2015", or
2905 * simply "contentcategory 2015". Most of the searches also add wildcards
2906 * implicitly at the start and the end of the search string. For example, a
2907 * search string of "contentcategory" will match objects with name "my
2908 * contentcategory", "contentcategory 2015", or simply "contentcategory".
2909 *
2910 * [sortField] - Field by which to sort the list.
2911 * Possible string values are:
2912 * - "ID"
2913 * - "NAME"
2914 *
2915 * [sortOrder] - Order of sorted results, default is ASCENDING.
2916 * Possible string values are:
2917 * - "ASCENDING"
2918 * - "DESCENDING"
2919 *
2920 * Completes with a [ContentCategoriesListResponse].
2921 *
2922 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2923 * error.
2924 *
2925 * If the used [http.Client] completes with an error when making a REST call,
2926 * this method will complete with the same error.
2927 */
2928 async.Future<ContentCategoriesListResponse> list(core.String profileId, {core. List<core.String> ids, core.int maxResults, core.String pageToken, core.String s earchString, core.String sortField, core.String sortOrder}) {
2929 var _url = null;
2930 var _queryParams = new core.Map();
2931 var _uploadMedia = null;
2932 var _uploadOptions = null;
2933 var _downloadOptions = commons.DownloadOptions.Metadata;
2934 var _body = null;
2935
2936 if (profileId == null) {
2937 throw new core.ArgumentError("Parameter profileId is required.");
2938 }
2939 if (ids != null) {
2940 _queryParams["ids"] = ids;
2941 }
2942 if (maxResults != null) {
2943 _queryParams["maxResults"] = ["${maxResults}"];
2944 }
2945 if (pageToken != null) {
2946 _queryParams["pageToken"] = [pageToken];
2947 }
2948 if (searchString != null) {
2949 _queryParams["searchString"] = [searchString];
2950 }
2951 if (sortField != null) {
2952 _queryParams["sortField"] = [sortField];
2953 }
2954 if (sortOrder != null) {
2955 _queryParams["sortOrder"] = [sortOrder];
2956 }
2957
2958 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con tentCategories';
2959
2960 var _response = _requester.request(_url,
2961 "GET",
2962 body: _body,
2963 queryParams: _queryParams,
2964 uploadOptions: _uploadOptions,
2965 uploadMedia: _uploadMedia,
2966 downloadOptions: _downloadOptions);
2967 return _response.then((data) => new ContentCategoriesListResponse.fromJson(d ata));
2968 }
2969
2970 /**
2971 * Updates an existing content category. This method supports patch semantics.
2972 *
2973 * [request] - The metadata request object.
2974 *
2975 * Request parameters:
2976 *
2977 * [profileId] - User profile ID associated with this request.
2978 *
2979 * [id] - Content category ID.
2980 *
2981 * Completes with a [ContentCategory].
2982 *
2983 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
2984 * error.
2985 *
2986 * If the used [http.Client] completes with an error when making a REST call,
2987 * this method will complete with the same error.
2988 */
2989 async.Future<ContentCategory> patch(ContentCategory request, core.String profi leId, core.String id) {
2990 var _url = null;
2991 var _queryParams = new core.Map();
2992 var _uploadMedia = null;
2993 var _uploadOptions = null;
2994 var _downloadOptions = commons.DownloadOptions.Metadata;
2995 var _body = null;
2996
2997 if (request != null) {
2998 _body = convert.JSON.encode((request).toJson());
2999 }
3000 if (profileId == null) {
3001 throw new core.ArgumentError("Parameter profileId is required.");
3002 }
3003 if (id == null) {
3004 throw new core.ArgumentError("Parameter id is required.");
3005 }
3006 _queryParams["id"] = [id];
3007
3008 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con tentCategories';
3009
3010 var _response = _requester.request(_url,
3011 "PATCH",
3012 body: _body,
3013 queryParams: _queryParams,
3014 uploadOptions: _uploadOptions,
3015 uploadMedia: _uploadMedia,
3016 downloadOptions: _downloadOptions);
3017 return _response.then((data) => new ContentCategory.fromJson(data));
3018 }
3019
3020 /**
3021 * Updates an existing content category.
3022 *
3023 * [request] - The metadata request object.
3024 *
3025 * Request parameters:
3026 *
3027 * [profileId] - User profile ID associated with this request.
3028 *
3029 * Completes with a [ContentCategory].
3030 *
3031 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3032 * error.
3033 *
3034 * If the used [http.Client] completes with an error when making a REST call,
3035 * this method will complete with the same error.
3036 */
3037 async.Future<ContentCategory> update(ContentCategory request, core.String prof ileId) {
3038 var _url = null;
3039 var _queryParams = new core.Map();
3040 var _uploadMedia = null;
3041 var _uploadOptions = null;
3042 var _downloadOptions = commons.DownloadOptions.Metadata;
3043 var _body = null;
3044
3045 if (request != null) {
3046 _body = convert.JSON.encode((request).toJson());
3047 }
3048 if (profileId == null) {
3049 throw new core.ArgumentError("Parameter profileId is required.");
3050 }
3051
3052 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/con tentCategories';
3053
3054 var _response = _requester.request(_url,
3055 "PUT",
3056 body: _body,
3057 queryParams: _queryParams,
3058 uploadOptions: _uploadOptions,
3059 uploadMedia: _uploadMedia,
3060 downloadOptions: _downloadOptions);
3061 return _response.then((data) => new ContentCategory.fromJson(data));
3062 }
3063
3064 }
3065
3066
3067 class CountriesResourceApi {
3068 final commons.ApiRequester _requester;
3069
3070 CountriesResourceApi(commons.ApiRequester client) :
3071 _requester = client;
3072
3073 /**
3074 * Gets one country by ID.
3075 *
3076 * Request parameters:
3077 *
3078 * [profileId] - User profile ID associated with this request.
3079 *
3080 * [dartId] - Country DART ID.
3081 *
3082 * Completes with a [Country].
3083 *
3084 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3085 * error.
3086 *
3087 * If the used [http.Client] completes with an error when making a REST call,
3088 * this method will complete with the same error.
3089 */
3090 async.Future<Country> get(core.String profileId, core.String dartId) {
3091 var _url = null;
3092 var _queryParams = new core.Map();
3093 var _uploadMedia = null;
3094 var _uploadOptions = null;
3095 var _downloadOptions = commons.DownloadOptions.Metadata;
3096 var _body = null;
3097
3098 if (profileId == null) {
3099 throw new core.ArgumentError("Parameter profileId is required.");
3100 }
3101 if (dartId == null) {
3102 throw new core.ArgumentError("Parameter dartId is required.");
3103 }
3104
3105 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cou ntries/' + commons.Escaper.ecapeVariable('$dartId');
3106
3107 var _response = _requester.request(_url,
3108 "GET",
3109 body: _body,
3110 queryParams: _queryParams,
3111 uploadOptions: _uploadOptions,
3112 uploadMedia: _uploadMedia,
3113 downloadOptions: _downloadOptions);
3114 return _response.then((data) => new Country.fromJson(data));
3115 }
3116
3117 /**
3118 * Retrieves a list of countries.
3119 *
3120 * Request parameters:
3121 *
3122 * [profileId] - User profile ID associated with this request.
3123 *
3124 * Completes with a [CountriesListResponse].
3125 *
3126 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3127 * error.
3128 *
3129 * If the used [http.Client] completes with an error when making a REST call,
3130 * this method will complete with the same error.
3131 */
3132 async.Future<CountriesListResponse> list(core.String profileId) {
3133 var _url = null;
3134 var _queryParams = new core.Map();
3135 var _uploadMedia = null;
3136 var _uploadOptions = null;
3137 var _downloadOptions = commons.DownloadOptions.Metadata;
3138 var _body = null;
3139
3140 if (profileId == null) {
3141 throw new core.ArgumentError("Parameter profileId is required.");
3142 }
3143
3144 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cou ntries';
3145
3146 var _response = _requester.request(_url,
3147 "GET",
3148 body: _body,
3149 queryParams: _queryParams,
3150 uploadOptions: _uploadOptions,
3151 uploadMedia: _uploadMedia,
3152 downloadOptions: _downloadOptions);
3153 return _response.then((data) => new CountriesListResponse.fromJson(data));
3154 }
3155
3156 }
3157
3158
3159 class CreativeAssetsResourceApi {
3160 final commons.ApiRequester _requester;
3161
3162 CreativeAssetsResourceApi(commons.ApiRequester client) :
3163 _requester = client;
3164
3165 /**
3166 * Inserts a new creative asset.
3167 *
3168 * [request] - The metadata request object.
3169 *
3170 * Request parameters:
3171 *
3172 * [profileId] - User profile ID associated with this request.
3173 *
3174 * [advertiserId] - Advertiser ID of this creative. This is a required field.
3175 *
3176 * [uploadMedia] - The media to upload.
3177 *
3178 * [uploadOptions] - Options for the media upload. Streaming Media without the
3179 * length being known ahead of time is only supported via resumable uploads.
3180 *
3181 * Completes with a [CreativeAssetMetadata].
3182 *
3183 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3184 * error.
3185 *
3186 * If the used [http.Client] completes with an error when making a REST call,
3187 * this method will complete with the same error.
3188 */
3189 async.Future<CreativeAssetMetadata> insert(CreativeAssetMetadata request, core .String profileId, core.String advertiserId, {commons.UploadOptions uploadOption s : commons.UploadOptions.Default, commons.Media uploadMedia}) {
3190 var _url = null;
3191 var _queryParams = new core.Map();
3192 var _uploadMedia = null;
3193 var _uploadOptions = null;
3194 var _downloadOptions = commons.DownloadOptions.Metadata;
3195 var _body = null;
3196
3197 if (request != null) {
3198 _body = convert.JSON.encode((request).toJson());
3199 }
3200 if (profileId == null) {
3201 throw new core.ArgumentError("Parameter profileId is required.");
3202 }
3203 if (advertiserId == null) {
3204 throw new core.ArgumentError("Parameter advertiserId is required.");
3205 }
3206
3207 _uploadMedia = uploadMedia;
3208 _uploadOptions = uploadOptions;
3209
3210 if (_uploadMedia == null) {
3211 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/c reativeAssets/' + commons.Escaper.ecapeVariable('$advertiserId') + '/creativeAss ets';
3212 } else if (_uploadOptions is commons.ResumableUploadOptions) {
3213 _url = '/resumable/upload/dfareporting/v2.4/userprofiles/' + commons.Escap er.ecapeVariable('$profileId') + '/creativeAssets/' + commons.Escaper.ecapeVaria ble('$advertiserId') + '/creativeAssets';
3214 } else {
3215 _url = '/upload/dfareporting/v2.4/userprofiles/' + commons.Escaper.ecapeVa riable('$profileId') + '/creativeAssets/' + commons.Escaper.ecapeVariable('$adve rtiserId') + '/creativeAssets';
3216 }
3217
3218
3219 var _response = _requester.request(_url,
3220 "POST",
3221 body: _body,
3222 queryParams: _queryParams,
3223 uploadOptions: _uploadOptions,
3224 uploadMedia: _uploadMedia,
3225 downloadOptions: _downloadOptions);
3226 return _response.then((data) => new CreativeAssetMetadata.fromJson(data));
3227 }
3228
3229 }
3230
3231
3232 class CreativeFieldValuesResourceApi {
3233 final commons.ApiRequester _requester;
3234
3235 CreativeFieldValuesResourceApi(commons.ApiRequester client) :
3236 _requester = client;
3237
3238 /**
3239 * Deletes an existing creative field value.
3240 *
3241 * Request parameters:
3242 *
3243 * [profileId] - User profile ID associated with this request.
3244 *
3245 * [creativeFieldId] - Creative field ID for this creative field value.
3246 *
3247 * [id] - Creative Field Value ID
3248 *
3249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3250 * error.
3251 *
3252 * If the used [http.Client] completes with an error when making a REST call,
3253 * this method will complete with the same error.
3254 */
3255 async.Future delete(core.String profileId, core.String creativeFieldId, core.S tring id) {
3256 var _url = null;
3257 var _queryParams = new core.Map();
3258 var _uploadMedia = null;
3259 var _uploadOptions = null;
3260 var _downloadOptions = commons.DownloadOptions.Metadata;
3261 var _body = null;
3262
3263 if (profileId == null) {
3264 throw new core.ArgumentError("Parameter profileId is required.");
3265 }
3266 if (creativeFieldId == null) {
3267 throw new core.ArgumentError("Parameter creativeFieldId is required.");
3268 }
3269 if (id == null) {
3270 throw new core.ArgumentError("Parameter id is required.");
3271 }
3272
3273 _downloadOptions = null;
3274
3275 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi eldValues/' + commons.Escaper.ecapeVariable('$id');
3276
3277 var _response = _requester.request(_url,
3278 "DELETE",
3279 body: _body,
3280 queryParams: _queryParams,
3281 uploadOptions: _uploadOptions,
3282 uploadMedia: _uploadMedia,
3283 downloadOptions: _downloadOptions);
3284 return _response.then((data) => null);
3285 }
3286
3287 /**
3288 * Gets one creative field value by ID.
3289 *
3290 * Request parameters:
3291 *
3292 * [profileId] - User profile ID associated with this request.
3293 *
3294 * [creativeFieldId] - Creative field ID for this creative field value.
3295 *
3296 * [id] - Creative Field Value ID
3297 *
3298 * Completes with a [CreativeFieldValue].
3299 *
3300 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3301 * error.
3302 *
3303 * If the used [http.Client] completes with an error when making a REST call,
3304 * this method will complete with the same error.
3305 */
3306 async.Future<CreativeFieldValue> get(core.String profileId, core.String creati veFieldId, core.String id) {
3307 var _url = null;
3308 var _queryParams = new core.Map();
3309 var _uploadMedia = null;
3310 var _uploadOptions = null;
3311 var _downloadOptions = commons.DownloadOptions.Metadata;
3312 var _body = null;
3313
3314 if (profileId == null) {
3315 throw new core.ArgumentError("Parameter profileId is required.");
3316 }
3317 if (creativeFieldId == null) {
3318 throw new core.ArgumentError("Parameter creativeFieldId is required.");
3319 }
3320 if (id == null) {
3321 throw new core.ArgumentError("Parameter id is required.");
3322 }
3323
3324 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi eldValues/' + commons.Escaper.ecapeVariable('$id');
3325
3326 var _response = _requester.request(_url,
3327 "GET",
3328 body: _body,
3329 queryParams: _queryParams,
3330 uploadOptions: _uploadOptions,
3331 uploadMedia: _uploadMedia,
3332 downloadOptions: _downloadOptions);
3333 return _response.then((data) => new CreativeFieldValue.fromJson(data));
3334 }
3335
3336 /**
3337 * Inserts a new creative field value.
3338 *
3339 * [request] - The metadata request object.
3340 *
3341 * Request parameters:
3342 *
3343 * [profileId] - User profile ID associated with this request.
3344 *
3345 * [creativeFieldId] - Creative field ID for this creative field value.
3346 *
3347 * Completes with a [CreativeFieldValue].
3348 *
3349 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3350 * error.
3351 *
3352 * If the used [http.Client] completes with an error when making a REST call,
3353 * this method will complete with the same error.
3354 */
3355 async.Future<CreativeFieldValue> insert(CreativeFieldValue request, core.Strin g profileId, core.String creativeFieldId) {
3356 var _url = null;
3357 var _queryParams = new core.Map();
3358 var _uploadMedia = null;
3359 var _uploadOptions = null;
3360 var _downloadOptions = commons.DownloadOptions.Metadata;
3361 var _body = null;
3362
3363 if (request != null) {
3364 _body = convert.JSON.encode((request).toJson());
3365 }
3366 if (profileId == null) {
3367 throw new core.ArgumentError("Parameter profileId is required.");
3368 }
3369 if (creativeFieldId == null) {
3370 throw new core.ArgumentError("Parameter creativeFieldId is required.");
3371 }
3372
3373 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi eldValues';
3374
3375 var _response = _requester.request(_url,
3376 "POST",
3377 body: _body,
3378 queryParams: _queryParams,
3379 uploadOptions: _uploadOptions,
3380 uploadMedia: _uploadMedia,
3381 downloadOptions: _downloadOptions);
3382 return _response.then((data) => new CreativeFieldValue.fromJson(data));
3383 }
3384
3385 /**
3386 * Retrieves a list of creative field values, possibly filtered. This method
3387 * supports paging.
3388 *
3389 * Request parameters:
3390 *
3391 * [profileId] - User profile ID associated with this request.
3392 *
3393 * [creativeFieldId] - Creative field ID for this creative field value.
3394 *
3395 * [ids] - Select only creative field values with these IDs.
3396 *
3397 * [maxResults] - Maximum number of results to return.
3398 *
3399 * [pageToken] - Value of the nextPageToken from the previous result page.
3400 *
3401 * [searchString] - Allows searching for creative field values by their
3402 * values. Wildcards (e.g. *) are not allowed.
3403 *
3404 * [sortField] - Field by which to sort the list.
3405 * Possible string values are:
3406 * - "ID"
3407 * - "VALUE"
3408 *
3409 * [sortOrder] - Order of sorted results, default is ASCENDING.
3410 * Possible string values are:
3411 * - "ASCENDING"
3412 * - "DESCENDING"
3413 *
3414 * Completes with a [CreativeFieldValuesListResponse].
3415 *
3416 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3417 * error.
3418 *
3419 * If the used [http.Client] completes with an error when making a REST call,
3420 * this method will complete with the same error.
3421 */
3422 async.Future<CreativeFieldValuesListResponse> list(core.String profileId, core .String creativeFieldId, {core.List<core.String> ids, core.int maxResults, core. String pageToken, core.String searchString, core.String sortField, core.String s ortOrder}) {
3423 var _url = null;
3424 var _queryParams = new core.Map();
3425 var _uploadMedia = null;
3426 var _uploadOptions = null;
3427 var _downloadOptions = commons.DownloadOptions.Metadata;
3428 var _body = null;
3429
3430 if (profileId == null) {
3431 throw new core.ArgumentError("Parameter profileId is required.");
3432 }
3433 if (creativeFieldId == null) {
3434 throw new core.ArgumentError("Parameter creativeFieldId is required.");
3435 }
3436 if (ids != null) {
3437 _queryParams["ids"] = ids;
3438 }
3439 if (maxResults != null) {
3440 _queryParams["maxResults"] = ["${maxResults}"];
3441 }
3442 if (pageToken != null) {
3443 _queryParams["pageToken"] = [pageToken];
3444 }
3445 if (searchString != null) {
3446 _queryParams["searchString"] = [searchString];
3447 }
3448 if (sortField != null) {
3449 _queryParams["sortField"] = [sortField];
3450 }
3451 if (sortOrder != null) {
3452 _queryParams["sortOrder"] = [sortOrder];
3453 }
3454
3455 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi eldValues';
3456
3457 var _response = _requester.request(_url,
3458 "GET",
3459 body: _body,
3460 queryParams: _queryParams,
3461 uploadOptions: _uploadOptions,
3462 uploadMedia: _uploadMedia,
3463 downloadOptions: _downloadOptions);
3464 return _response.then((data) => new CreativeFieldValuesListResponse.fromJson (data));
3465 }
3466
3467 /**
3468 * Updates an existing creative field value. This method supports patch
3469 * semantics.
3470 *
3471 * [request] - The metadata request object.
3472 *
3473 * Request parameters:
3474 *
3475 * [profileId] - User profile ID associated with this request.
3476 *
3477 * [creativeFieldId] - Creative field ID for this creative field value.
3478 *
3479 * [id] - Creative Field Value ID
3480 *
3481 * Completes with a [CreativeFieldValue].
3482 *
3483 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3484 * error.
3485 *
3486 * If the used [http.Client] completes with an error when making a REST call,
3487 * this method will complete with the same error.
3488 */
3489 async.Future<CreativeFieldValue> patch(CreativeFieldValue request, core.String profileId, core.String creativeFieldId, core.String id) {
3490 var _url = null;
3491 var _queryParams = new core.Map();
3492 var _uploadMedia = null;
3493 var _uploadOptions = null;
3494 var _downloadOptions = commons.DownloadOptions.Metadata;
3495 var _body = null;
3496
3497 if (request != null) {
3498 _body = convert.JSON.encode((request).toJson());
3499 }
3500 if (profileId == null) {
3501 throw new core.ArgumentError("Parameter profileId is required.");
3502 }
3503 if (creativeFieldId == null) {
3504 throw new core.ArgumentError("Parameter creativeFieldId is required.");
3505 }
3506 if (id == null) {
3507 throw new core.ArgumentError("Parameter id is required.");
3508 }
3509 _queryParams["id"] = [id];
3510
3511 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi eldValues';
3512
3513 var _response = _requester.request(_url,
3514 "PATCH",
3515 body: _body,
3516 queryParams: _queryParams,
3517 uploadOptions: _uploadOptions,
3518 uploadMedia: _uploadMedia,
3519 downloadOptions: _downloadOptions);
3520 return _response.then((data) => new CreativeFieldValue.fromJson(data));
3521 }
3522
3523 /**
3524 * Updates an existing creative field value.
3525 *
3526 * [request] - The metadata request object.
3527 *
3528 * Request parameters:
3529 *
3530 * [profileId] - User profile ID associated with this request.
3531 *
3532 * [creativeFieldId] - Creative field ID for this creative field value.
3533 *
3534 * Completes with a [CreativeFieldValue].
3535 *
3536 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3537 * error.
3538 *
3539 * If the used [http.Client] completes with an error when making a REST call,
3540 * this method will complete with the same error.
3541 */
3542 async.Future<CreativeFieldValue> update(CreativeFieldValue request, core.Strin g profileId, core.String creativeFieldId) {
3543 var _url = null;
3544 var _queryParams = new core.Map();
3545 var _uploadMedia = null;
3546 var _uploadOptions = null;
3547 var _downloadOptions = commons.DownloadOptions.Metadata;
3548 var _body = null;
3549
3550 if (request != null) {
3551 _body = convert.JSON.encode((request).toJson());
3552 }
3553 if (profileId == null) {
3554 throw new core.ArgumentError("Parameter profileId is required.");
3555 }
3556 if (creativeFieldId == null) {
3557 throw new core.ArgumentError("Parameter creativeFieldId is required.");
3558 }
3559
3560 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields/' + commons.Escaper.ecapeVariable('$creativeFieldId') + '/creativeFi eldValues';
3561
3562 var _response = _requester.request(_url,
3563 "PUT",
3564 body: _body,
3565 queryParams: _queryParams,
3566 uploadOptions: _uploadOptions,
3567 uploadMedia: _uploadMedia,
3568 downloadOptions: _downloadOptions);
3569 return _response.then((data) => new CreativeFieldValue.fromJson(data));
3570 }
3571
3572 }
3573
3574
3575 class CreativeFieldsResourceApi {
3576 final commons.ApiRequester _requester;
3577
3578 CreativeFieldsResourceApi(commons.ApiRequester client) :
3579 _requester = client;
3580
3581 /**
3582 * Deletes an existing creative field.
3583 *
3584 * Request parameters:
3585 *
3586 * [profileId] - User profile ID associated with this request.
3587 *
3588 * [id] - Creative Field ID
3589 *
3590 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3591 * error.
3592 *
3593 * If the used [http.Client] completes with an error when making a REST call,
3594 * this method will complete with the same error.
3595 */
3596 async.Future delete(core.String profileId, core.String id) {
3597 var _url = null;
3598 var _queryParams = new core.Map();
3599 var _uploadMedia = null;
3600 var _uploadOptions = null;
3601 var _downloadOptions = commons.DownloadOptions.Metadata;
3602 var _body = null;
3603
3604 if (profileId == null) {
3605 throw new core.ArgumentError("Parameter profileId is required.");
3606 }
3607 if (id == null) {
3608 throw new core.ArgumentError("Parameter id is required.");
3609 }
3610
3611 _downloadOptions = null;
3612
3613 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields/' + commons.Escaper.ecapeVariable('$id');
3614
3615 var _response = _requester.request(_url,
3616 "DELETE",
3617 body: _body,
3618 queryParams: _queryParams,
3619 uploadOptions: _uploadOptions,
3620 uploadMedia: _uploadMedia,
3621 downloadOptions: _downloadOptions);
3622 return _response.then((data) => null);
3623 }
3624
3625 /**
3626 * Gets one creative field by ID.
3627 *
3628 * Request parameters:
3629 *
3630 * [profileId] - User profile ID associated with this request.
3631 *
3632 * [id] - Creative Field ID
3633 *
3634 * Completes with a [CreativeField].
3635 *
3636 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3637 * error.
3638 *
3639 * If the used [http.Client] completes with an error when making a REST call,
3640 * this method will complete with the same error.
3641 */
3642 async.Future<CreativeField> get(core.String profileId, core.String id) {
3643 var _url = null;
3644 var _queryParams = new core.Map();
3645 var _uploadMedia = null;
3646 var _uploadOptions = null;
3647 var _downloadOptions = commons.DownloadOptions.Metadata;
3648 var _body = null;
3649
3650 if (profileId == null) {
3651 throw new core.ArgumentError("Parameter profileId is required.");
3652 }
3653 if (id == null) {
3654 throw new core.ArgumentError("Parameter id is required.");
3655 }
3656
3657 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields/' + commons.Escaper.ecapeVariable('$id');
3658
3659 var _response = _requester.request(_url,
3660 "GET",
3661 body: _body,
3662 queryParams: _queryParams,
3663 uploadOptions: _uploadOptions,
3664 uploadMedia: _uploadMedia,
3665 downloadOptions: _downloadOptions);
3666 return _response.then((data) => new CreativeField.fromJson(data));
3667 }
3668
3669 /**
3670 * Inserts a new creative field.
3671 *
3672 * [request] - The metadata request object.
3673 *
3674 * Request parameters:
3675 *
3676 * [profileId] - User profile ID associated with this request.
3677 *
3678 * Completes with a [CreativeField].
3679 *
3680 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3681 * error.
3682 *
3683 * If the used [http.Client] completes with an error when making a REST call,
3684 * this method will complete with the same error.
3685 */
3686 async.Future<CreativeField> insert(CreativeField request, core.String profileI d) {
3687 var _url = null;
3688 var _queryParams = new core.Map();
3689 var _uploadMedia = null;
3690 var _uploadOptions = null;
3691 var _downloadOptions = commons.DownloadOptions.Metadata;
3692 var _body = null;
3693
3694 if (request != null) {
3695 _body = convert.JSON.encode((request).toJson());
3696 }
3697 if (profileId == null) {
3698 throw new core.ArgumentError("Parameter profileId is required.");
3699 }
3700
3701 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields';
3702
3703 var _response = _requester.request(_url,
3704 "POST",
3705 body: _body,
3706 queryParams: _queryParams,
3707 uploadOptions: _uploadOptions,
3708 uploadMedia: _uploadMedia,
3709 downloadOptions: _downloadOptions);
3710 return _response.then((data) => new CreativeField.fromJson(data));
3711 }
3712
3713 /**
3714 * Retrieves a list of creative fields, possibly filtered. This method
3715 * supports paging.
3716 *
3717 * Request parameters:
3718 *
3719 * [profileId] - User profile ID associated with this request.
3720 *
3721 * [advertiserIds] - Select only creative fields that belong to these
3722 * advertisers.
3723 *
3724 * [ids] - Select only creative fields with these IDs.
3725 *
3726 * [maxResults] - Maximum number of results to return.
3727 *
3728 * [pageToken] - Value of the nextPageToken from the previous result page.
3729 *
3730 * [searchString] - Allows searching for creative fields by name or ID.
3731 * Wildcards (*) are allowed. For example, "creativefield*2015" will return
3732 * creative fields with names like "creativefield June 2015", "creativefield
3733 * April 2015", or simply "creativefield 2015". Most of the searches also add
3734 * wild-cards implicitly at the start and the end of the search string. For
3735 * example, a search string of "creativefield" will match creative fields with
3736 * the name "my creativefield", "creativefield 2015", or simply
3737 * "creativefield".
3738 *
3739 * [sortField] - Field by which to sort the list.
3740 * Possible string values are:
3741 * - "ID"
3742 * - "NAME"
3743 *
3744 * [sortOrder] - Order of sorted results, default is ASCENDING.
3745 * Possible string values are:
3746 * - "ASCENDING"
3747 * - "DESCENDING"
3748 *
3749 * Completes with a [CreativeFieldsListResponse].
3750 *
3751 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3752 * error.
3753 *
3754 * If the used [http.Client] completes with an error when making a REST call,
3755 * this method will complete with the same error.
3756 */
3757 async.Future<CreativeFieldsListResponse> list(core.String profileId, {core.Lis t<core.String> advertiserIds, core.List<core.String> ids, core.int maxResults, c ore.String pageToken, core.String searchString, core.String sortField, core.Stri ng sortOrder}) {
3758 var _url = null;
3759 var _queryParams = new core.Map();
3760 var _uploadMedia = null;
3761 var _uploadOptions = null;
3762 var _downloadOptions = commons.DownloadOptions.Metadata;
3763 var _body = null;
3764
3765 if (profileId == null) {
3766 throw new core.ArgumentError("Parameter profileId is required.");
3767 }
3768 if (advertiserIds != null) {
3769 _queryParams["advertiserIds"] = advertiserIds;
3770 }
3771 if (ids != null) {
3772 _queryParams["ids"] = ids;
3773 }
3774 if (maxResults != null) {
3775 _queryParams["maxResults"] = ["${maxResults}"];
3776 }
3777 if (pageToken != null) {
3778 _queryParams["pageToken"] = [pageToken];
3779 }
3780 if (searchString != null) {
3781 _queryParams["searchString"] = [searchString];
3782 }
3783 if (sortField != null) {
3784 _queryParams["sortField"] = [sortField];
3785 }
3786 if (sortOrder != null) {
3787 _queryParams["sortOrder"] = [sortOrder];
3788 }
3789
3790 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields';
3791
3792 var _response = _requester.request(_url,
3793 "GET",
3794 body: _body,
3795 queryParams: _queryParams,
3796 uploadOptions: _uploadOptions,
3797 uploadMedia: _uploadMedia,
3798 downloadOptions: _downloadOptions);
3799 return _response.then((data) => new CreativeFieldsListResponse.fromJson(data ));
3800 }
3801
3802 /**
3803 * Updates an existing creative field. This method supports patch semantics.
3804 *
3805 * [request] - The metadata request object.
3806 *
3807 * Request parameters:
3808 *
3809 * [profileId] - User profile ID associated with this request.
3810 *
3811 * [id] - Creative Field ID
3812 *
3813 * Completes with a [CreativeField].
3814 *
3815 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3816 * error.
3817 *
3818 * If the used [http.Client] completes with an error when making a REST call,
3819 * this method will complete with the same error.
3820 */
3821 async.Future<CreativeField> patch(CreativeField request, core.String profileId , core.String id) {
3822 var _url = null;
3823 var _queryParams = new core.Map();
3824 var _uploadMedia = null;
3825 var _uploadOptions = null;
3826 var _downloadOptions = commons.DownloadOptions.Metadata;
3827 var _body = null;
3828
3829 if (request != null) {
3830 _body = convert.JSON.encode((request).toJson());
3831 }
3832 if (profileId == null) {
3833 throw new core.ArgumentError("Parameter profileId is required.");
3834 }
3835 if (id == null) {
3836 throw new core.ArgumentError("Parameter id is required.");
3837 }
3838 _queryParams["id"] = [id];
3839
3840 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields';
3841
3842 var _response = _requester.request(_url,
3843 "PATCH",
3844 body: _body,
3845 queryParams: _queryParams,
3846 uploadOptions: _uploadOptions,
3847 uploadMedia: _uploadMedia,
3848 downloadOptions: _downloadOptions);
3849 return _response.then((data) => new CreativeField.fromJson(data));
3850 }
3851
3852 /**
3853 * Updates an existing creative field.
3854 *
3855 * [request] - The metadata request object.
3856 *
3857 * Request parameters:
3858 *
3859 * [profileId] - User profile ID associated with this request.
3860 *
3861 * Completes with a [CreativeField].
3862 *
3863 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3864 * error.
3865 *
3866 * If the used [http.Client] completes with an error when making a REST call,
3867 * this method will complete with the same error.
3868 */
3869 async.Future<CreativeField> update(CreativeField request, core.String profileI d) {
3870 var _url = null;
3871 var _queryParams = new core.Map();
3872 var _uploadMedia = null;
3873 var _uploadOptions = null;
3874 var _downloadOptions = commons.DownloadOptions.Metadata;
3875 var _body = null;
3876
3877 if (request != null) {
3878 _body = convert.JSON.encode((request).toJson());
3879 }
3880 if (profileId == null) {
3881 throw new core.ArgumentError("Parameter profileId is required.");
3882 }
3883
3884 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeFields';
3885
3886 var _response = _requester.request(_url,
3887 "PUT",
3888 body: _body,
3889 queryParams: _queryParams,
3890 uploadOptions: _uploadOptions,
3891 uploadMedia: _uploadMedia,
3892 downloadOptions: _downloadOptions);
3893 return _response.then((data) => new CreativeField.fromJson(data));
3894 }
3895
3896 }
3897
3898
3899 class CreativeGroupsResourceApi {
3900 final commons.ApiRequester _requester;
3901
3902 CreativeGroupsResourceApi(commons.ApiRequester client) :
3903 _requester = client;
3904
3905 /**
3906 * Gets one creative group by ID.
3907 *
3908 * Request parameters:
3909 *
3910 * [profileId] - User profile ID associated with this request.
3911 *
3912 * [id] - Creative group ID.
3913 *
3914 * Completes with a [CreativeGroup].
3915 *
3916 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3917 * error.
3918 *
3919 * If the used [http.Client] completes with an error when making a REST call,
3920 * this method will complete with the same error.
3921 */
3922 async.Future<CreativeGroup> get(core.String profileId, core.String id) {
3923 var _url = null;
3924 var _queryParams = new core.Map();
3925 var _uploadMedia = null;
3926 var _uploadOptions = null;
3927 var _downloadOptions = commons.DownloadOptions.Metadata;
3928 var _body = null;
3929
3930 if (profileId == null) {
3931 throw new core.ArgumentError("Parameter profileId is required.");
3932 }
3933 if (id == null) {
3934 throw new core.ArgumentError("Parameter id is required.");
3935 }
3936
3937 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeGroups/' + commons.Escaper.ecapeVariable('$id');
3938
3939 var _response = _requester.request(_url,
3940 "GET",
3941 body: _body,
3942 queryParams: _queryParams,
3943 uploadOptions: _uploadOptions,
3944 uploadMedia: _uploadMedia,
3945 downloadOptions: _downloadOptions);
3946 return _response.then((data) => new CreativeGroup.fromJson(data));
3947 }
3948
3949 /**
3950 * Inserts a new creative group.
3951 *
3952 * [request] - The metadata request object.
3953 *
3954 * Request parameters:
3955 *
3956 * [profileId] - User profile ID associated with this request.
3957 *
3958 * Completes with a [CreativeGroup].
3959 *
3960 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
3961 * error.
3962 *
3963 * If the used [http.Client] completes with an error when making a REST call,
3964 * this method will complete with the same error.
3965 */
3966 async.Future<CreativeGroup> insert(CreativeGroup request, core.String profileI d) {
3967 var _url = null;
3968 var _queryParams = new core.Map();
3969 var _uploadMedia = null;
3970 var _uploadOptions = null;
3971 var _downloadOptions = commons.DownloadOptions.Metadata;
3972 var _body = null;
3973
3974 if (request != null) {
3975 _body = convert.JSON.encode((request).toJson());
3976 }
3977 if (profileId == null) {
3978 throw new core.ArgumentError("Parameter profileId is required.");
3979 }
3980
3981 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeGroups';
3982
3983 var _response = _requester.request(_url,
3984 "POST",
3985 body: _body,
3986 queryParams: _queryParams,
3987 uploadOptions: _uploadOptions,
3988 uploadMedia: _uploadMedia,
3989 downloadOptions: _downloadOptions);
3990 return _response.then((data) => new CreativeGroup.fromJson(data));
3991 }
3992
3993 /**
3994 * Retrieves a list of creative groups, possibly filtered. This method
3995 * supports paging.
3996 *
3997 * Request parameters:
3998 *
3999 * [profileId] - User profile ID associated with this request.
4000 *
4001 * [advertiserIds] - Select only creative groups that belong to these
4002 * advertisers.
4003 *
4004 * [groupNumber] - Select only creative groups that belong to this subgroup.
4005 *
4006 * [ids] - Select only creative groups with these IDs.
4007 *
4008 * [maxResults] - Maximum number of results to return.
4009 *
4010 * [pageToken] - Value of the nextPageToken from the previous result page.
4011 *
4012 * [searchString] - Allows searching for creative groups by name or ID.
4013 * Wildcards (*) are allowed. For example, "creativegroup*2015" will return
4014 * creative groups with names like "creativegroup June 2015", "creativegroup
4015 * April 2015", or simply "creativegroup 2015". Most of the searches also add
4016 * wild-cards implicitly at the start and the end of the search string. For
4017 * example, a search string of "creativegroup" will match creative groups with
4018 * the name "my creativegroup", "creativegroup 2015", or simply
4019 * "creativegroup".
4020 *
4021 * [sortField] - Field by which to sort the list.
4022 * Possible string values are:
4023 * - "ID"
4024 * - "NAME"
4025 *
4026 * [sortOrder] - Order of sorted results, default is ASCENDING.
4027 * Possible string values are:
4028 * - "ASCENDING"
4029 * - "DESCENDING"
4030 *
4031 * Completes with a [CreativeGroupsListResponse].
4032 *
4033 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4034 * error.
4035 *
4036 * If the used [http.Client] completes with an error when making a REST call,
4037 * this method will complete with the same error.
4038 */
4039 async.Future<CreativeGroupsListResponse> list(core.String profileId, {core.Lis t<core.String> advertiserIds, core.int groupNumber, core.List<core.String> ids, core.int maxResults, core.String pageToken, core.String searchString, core.Strin g sortField, core.String sortOrder}) {
4040 var _url = null;
4041 var _queryParams = new core.Map();
4042 var _uploadMedia = null;
4043 var _uploadOptions = null;
4044 var _downloadOptions = commons.DownloadOptions.Metadata;
4045 var _body = null;
4046
4047 if (profileId == null) {
4048 throw new core.ArgumentError("Parameter profileId is required.");
4049 }
4050 if (advertiserIds != null) {
4051 _queryParams["advertiserIds"] = advertiserIds;
4052 }
4053 if (groupNumber != null) {
4054 _queryParams["groupNumber"] = ["${groupNumber}"];
4055 }
4056 if (ids != null) {
4057 _queryParams["ids"] = ids;
4058 }
4059 if (maxResults != null) {
4060 _queryParams["maxResults"] = ["${maxResults}"];
4061 }
4062 if (pageToken != null) {
4063 _queryParams["pageToken"] = [pageToken];
4064 }
4065 if (searchString != null) {
4066 _queryParams["searchString"] = [searchString];
4067 }
4068 if (sortField != null) {
4069 _queryParams["sortField"] = [sortField];
4070 }
4071 if (sortOrder != null) {
4072 _queryParams["sortOrder"] = [sortOrder];
4073 }
4074
4075 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeGroups';
4076
4077 var _response = _requester.request(_url,
4078 "GET",
4079 body: _body,
4080 queryParams: _queryParams,
4081 uploadOptions: _uploadOptions,
4082 uploadMedia: _uploadMedia,
4083 downloadOptions: _downloadOptions);
4084 return _response.then((data) => new CreativeGroupsListResponse.fromJson(data ));
4085 }
4086
4087 /**
4088 * Updates an existing creative group. This method supports patch semantics.
4089 *
4090 * [request] - The metadata request object.
4091 *
4092 * Request parameters:
4093 *
4094 * [profileId] - User profile ID associated with this request.
4095 *
4096 * [id] - Creative group ID.
4097 *
4098 * Completes with a [CreativeGroup].
4099 *
4100 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4101 * error.
4102 *
4103 * If the used [http.Client] completes with an error when making a REST call,
4104 * this method will complete with the same error.
4105 */
4106 async.Future<CreativeGroup> patch(CreativeGroup request, core.String profileId , core.String id) {
4107 var _url = null;
4108 var _queryParams = new core.Map();
4109 var _uploadMedia = null;
4110 var _uploadOptions = null;
4111 var _downloadOptions = commons.DownloadOptions.Metadata;
4112 var _body = null;
4113
4114 if (request != null) {
4115 _body = convert.JSON.encode((request).toJson());
4116 }
4117 if (profileId == null) {
4118 throw new core.ArgumentError("Parameter profileId is required.");
4119 }
4120 if (id == null) {
4121 throw new core.ArgumentError("Parameter id is required.");
4122 }
4123 _queryParams["id"] = [id];
4124
4125 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeGroups';
4126
4127 var _response = _requester.request(_url,
4128 "PATCH",
4129 body: _body,
4130 queryParams: _queryParams,
4131 uploadOptions: _uploadOptions,
4132 uploadMedia: _uploadMedia,
4133 downloadOptions: _downloadOptions);
4134 return _response.then((data) => new CreativeGroup.fromJson(data));
4135 }
4136
4137 /**
4138 * Updates an existing creative group.
4139 *
4140 * [request] - The metadata request object.
4141 *
4142 * Request parameters:
4143 *
4144 * [profileId] - User profile ID associated with this request.
4145 *
4146 * Completes with a [CreativeGroup].
4147 *
4148 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4149 * error.
4150 *
4151 * If the used [http.Client] completes with an error when making a REST call,
4152 * this method will complete with the same error.
4153 */
4154 async.Future<CreativeGroup> update(CreativeGroup request, core.String profileI d) {
4155 var _url = null;
4156 var _queryParams = new core.Map();
4157 var _uploadMedia = null;
4158 var _uploadOptions = null;
4159 var _downloadOptions = commons.DownloadOptions.Metadata;
4160 var _body = null;
4161
4162 if (request != null) {
4163 _body = convert.JSON.encode((request).toJson());
4164 }
4165 if (profileId == null) {
4166 throw new core.ArgumentError("Parameter profileId is required.");
4167 }
4168
4169 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre ativeGroups';
4170
4171 var _response = _requester.request(_url,
4172 "PUT",
4173 body: _body,
4174 queryParams: _queryParams,
4175 uploadOptions: _uploadOptions,
4176 uploadMedia: _uploadMedia,
4177 downloadOptions: _downloadOptions);
4178 return _response.then((data) => new CreativeGroup.fromJson(data));
4179 }
4180
4181 }
4182
4183
4184 class CreativesResourceApi {
4185 final commons.ApiRequester _requester;
4186
4187 CreativesResourceApi(commons.ApiRequester client) :
4188 _requester = client;
4189
4190 /**
4191 * Gets one creative by ID.
4192 *
4193 * Request parameters:
4194 *
4195 * [profileId] - User profile ID associated with this request.
4196 *
4197 * [id] - Creative ID.
4198 *
4199 * Completes with a [Creative].
4200 *
4201 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4202 * error.
4203 *
4204 * If the used [http.Client] completes with an error when making a REST call,
4205 * this method will complete with the same error.
4206 */
4207 async.Future<Creative> get(core.String profileId, core.String id) {
4208 var _url = null;
4209 var _queryParams = new core.Map();
4210 var _uploadMedia = null;
4211 var _uploadOptions = null;
4212 var _downloadOptions = commons.DownloadOptions.Metadata;
4213 var _body = null;
4214
4215 if (profileId == null) {
4216 throw new core.ArgumentError("Parameter profileId is required.");
4217 }
4218 if (id == null) {
4219 throw new core.ArgumentError("Parameter id is required.");
4220 }
4221
4222 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre atives/' + commons.Escaper.ecapeVariable('$id');
4223
4224 var _response = _requester.request(_url,
4225 "GET",
4226 body: _body,
4227 queryParams: _queryParams,
4228 uploadOptions: _uploadOptions,
4229 uploadMedia: _uploadMedia,
4230 downloadOptions: _downloadOptions);
4231 return _response.then((data) => new Creative.fromJson(data));
4232 }
4233
4234 /**
4235 * Inserts a new creative.
4236 *
4237 * [request] - The metadata request object.
4238 *
4239 * Request parameters:
4240 *
4241 * [profileId] - User profile ID associated with this request.
4242 *
4243 * Completes with a [Creative].
4244 *
4245 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4246 * error.
4247 *
4248 * If the used [http.Client] completes with an error when making a REST call,
4249 * this method will complete with the same error.
4250 */
4251 async.Future<Creative> insert(Creative request, core.String profileId) {
4252 var _url = null;
4253 var _queryParams = new core.Map();
4254 var _uploadMedia = null;
4255 var _uploadOptions = null;
4256 var _downloadOptions = commons.DownloadOptions.Metadata;
4257 var _body = null;
4258
4259 if (request != null) {
4260 _body = convert.JSON.encode((request).toJson());
4261 }
4262 if (profileId == null) {
4263 throw new core.ArgumentError("Parameter profileId is required.");
4264 }
4265
4266 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre atives';
4267
4268 var _response = _requester.request(_url,
4269 "POST",
4270 body: _body,
4271 queryParams: _queryParams,
4272 uploadOptions: _uploadOptions,
4273 uploadMedia: _uploadMedia,
4274 downloadOptions: _downloadOptions);
4275 return _response.then((data) => new Creative.fromJson(data));
4276 }
4277
4278 /**
4279 * Retrieves a list of creatives, possibly filtered. This method supports
4280 * paging.
4281 *
4282 * Request parameters:
4283 *
4284 * [profileId] - User profile ID associated with this request.
4285 *
4286 * [active] - Select only active creatives. Leave blank to select active and
4287 * inactive creatives.
4288 *
4289 * [advertiserId] - Select only creatives with this advertiser ID.
4290 *
4291 * [archived] - Select only archived creatives. Leave blank to select archived
4292 * and unarchived creatives.
4293 *
4294 * [campaignId] - Select only creatives with this campaign ID.
4295 *
4296 * [companionCreativeIds] - Select only in-stream video creatives with these
4297 * companion IDs.
4298 *
4299 * [creativeFieldIds] - Select only creatives with these creative field IDs.
4300 *
4301 * [ids] - Select only creatives with these IDs.
4302 *
4303 * [maxResults] - Maximum number of results to return.
4304 *
4305 * [pageToken] - Value of the nextPageToken from the previous result page.
4306 *
4307 * [renderingIds] - Select only creatives with these rendering IDs.
4308 *
4309 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
4310 * are allowed. For example, "creative*2015" will return objects with names
4311 * like "creative June 2015", "creative April 2015", or simply "creative
4312 * 2015". Most of the searches also add wildcards implicitly at the start and
4313 * the end of the search string. For example, a search string of "creative"
4314 * will match objects with name "my creative", "creative 2015", or simply
4315 * "creative".
4316 *
4317 * [sizeIds] - Select only creatives with these size IDs.
4318 *
4319 * [sortField] - Field by which to sort the list.
4320 * Possible string values are:
4321 * - "ID"
4322 * - "NAME"
4323 *
4324 * [sortOrder] - Order of sorted results, default is ASCENDING.
4325 * Possible string values are:
4326 * - "ASCENDING"
4327 * - "DESCENDING"
4328 *
4329 * [studioCreativeId] - Select only creatives corresponding to this Studio
4330 * creative ID.
4331 *
4332 * [types] - Select only creatives with these creative types.
4333 *
4334 * Completes with a [CreativesListResponse].
4335 *
4336 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4337 * error.
4338 *
4339 * If the used [http.Client] completes with an error when making a REST call,
4340 * this method will complete with the same error.
4341 */
4342 async.Future<CreativesListResponse> list(core.String profileId, {core.bool act ive, core.String advertiserId, core.bool archived, core.String campaignId, core. List<core.String> companionCreativeIds, core.List<core.String> creativeFieldIds, core.List<core.String> ids, core.int maxResults, core.String pageToken, core.Li st<core.String> renderingIds, core.String searchString, core.List<core.String> s izeIds, core.String sortField, core.String sortOrder, core.String studioCreative Id, core.List<core.String> types}) {
4343 var _url = null;
4344 var _queryParams = new core.Map();
4345 var _uploadMedia = null;
4346 var _uploadOptions = null;
4347 var _downloadOptions = commons.DownloadOptions.Metadata;
4348 var _body = null;
4349
4350 if (profileId == null) {
4351 throw new core.ArgumentError("Parameter profileId is required.");
4352 }
4353 if (active != null) {
4354 _queryParams["active"] = ["${active}"];
4355 }
4356 if (advertiserId != null) {
4357 _queryParams["advertiserId"] = [advertiserId];
4358 }
4359 if (archived != null) {
4360 _queryParams["archived"] = ["${archived}"];
4361 }
4362 if (campaignId != null) {
4363 _queryParams["campaignId"] = [campaignId];
4364 }
4365 if (companionCreativeIds != null) {
4366 _queryParams["companionCreativeIds"] = companionCreativeIds;
4367 }
4368 if (creativeFieldIds != null) {
4369 _queryParams["creativeFieldIds"] = creativeFieldIds;
4370 }
4371 if (ids != null) {
4372 _queryParams["ids"] = ids;
4373 }
4374 if (maxResults != null) {
4375 _queryParams["maxResults"] = ["${maxResults}"];
4376 }
4377 if (pageToken != null) {
4378 _queryParams["pageToken"] = [pageToken];
4379 }
4380 if (renderingIds != null) {
4381 _queryParams["renderingIds"] = renderingIds;
4382 }
4383 if (searchString != null) {
4384 _queryParams["searchString"] = [searchString];
4385 }
4386 if (sizeIds != null) {
4387 _queryParams["sizeIds"] = sizeIds;
4388 }
4389 if (sortField != null) {
4390 _queryParams["sortField"] = [sortField];
4391 }
4392 if (sortOrder != null) {
4393 _queryParams["sortOrder"] = [sortOrder];
4394 }
4395 if (studioCreativeId != null) {
4396 _queryParams["studioCreativeId"] = [studioCreativeId];
4397 }
4398 if (types != null) {
4399 _queryParams["types"] = types;
4400 }
4401
4402 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre atives';
4403
4404 var _response = _requester.request(_url,
4405 "GET",
4406 body: _body,
4407 queryParams: _queryParams,
4408 uploadOptions: _uploadOptions,
4409 uploadMedia: _uploadMedia,
4410 downloadOptions: _downloadOptions);
4411 return _response.then((data) => new CreativesListResponse.fromJson(data));
4412 }
4413
4414 /**
4415 * Updates an existing creative. This method supports patch semantics.
4416 *
4417 * [request] - The metadata request object.
4418 *
4419 * Request parameters:
4420 *
4421 * [profileId] - User profile ID associated with this request.
4422 *
4423 * [id] - Creative ID.
4424 *
4425 * Completes with a [Creative].
4426 *
4427 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4428 * error.
4429 *
4430 * If the used [http.Client] completes with an error when making a REST call,
4431 * this method will complete with the same error.
4432 */
4433 async.Future<Creative> patch(Creative request, core.String profileId, core.Str ing id) {
4434 var _url = null;
4435 var _queryParams = new core.Map();
4436 var _uploadMedia = null;
4437 var _uploadOptions = null;
4438 var _downloadOptions = commons.DownloadOptions.Metadata;
4439 var _body = null;
4440
4441 if (request != null) {
4442 _body = convert.JSON.encode((request).toJson());
4443 }
4444 if (profileId == null) {
4445 throw new core.ArgumentError("Parameter profileId is required.");
4446 }
4447 if (id == null) {
4448 throw new core.ArgumentError("Parameter id is required.");
4449 }
4450 _queryParams["id"] = [id];
4451
4452 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre atives';
4453
4454 var _response = _requester.request(_url,
4455 "PATCH",
4456 body: _body,
4457 queryParams: _queryParams,
4458 uploadOptions: _uploadOptions,
4459 uploadMedia: _uploadMedia,
4460 downloadOptions: _downloadOptions);
4461 return _response.then((data) => new Creative.fromJson(data));
4462 }
4463
4464 /**
4465 * Updates an existing creative.
4466 *
4467 * [request] - The metadata request object.
4468 *
4469 * Request parameters:
4470 *
4471 * [profileId] - User profile ID associated with this request.
4472 *
4473 * Completes with a [Creative].
4474 *
4475 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4476 * error.
4477 *
4478 * If the used [http.Client] completes with an error when making a REST call,
4479 * this method will complete with the same error.
4480 */
4481 async.Future<Creative> update(Creative request, core.String profileId) {
4482 var _url = null;
4483 var _queryParams = new core.Map();
4484 var _uploadMedia = null;
4485 var _uploadOptions = null;
4486 var _downloadOptions = commons.DownloadOptions.Metadata;
4487 var _body = null;
4488
4489 if (request != null) {
4490 _body = convert.JSON.encode((request).toJson());
4491 }
4492 if (profileId == null) {
4493 throw new core.ArgumentError("Parameter profileId is required.");
4494 }
4495
4496 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cre atives';
4497
4498 var _response = _requester.request(_url,
4499 "PUT",
4500 body: _body,
4501 queryParams: _queryParams,
4502 uploadOptions: _uploadOptions,
4503 uploadMedia: _uploadMedia,
4504 downloadOptions: _downloadOptions);
4505 return _response.then((data) => new Creative.fromJson(data));
4506 }
4507
4508 }
4509
4510
4511 class DimensionValuesResourceApi {
4512 final commons.ApiRequester _requester;
4513
4514 DimensionValuesResourceApi(commons.ApiRequester client) :
4515 _requester = client;
4516
4517 /**
4518 * Retrieves list of report dimension values for a list of filters.
4519 *
4520 * [request] - The metadata request object.
4521 *
4522 * Request parameters:
4523 *
4524 * [profileId] - The DFA user profile ID.
4525 *
4526 * [maxResults] - Maximum number of results to return.
4527 * Value must be between "0" and "100".
4528 *
4529 * [pageToken] - The value of the nextToken from the previous result page.
4530 *
4531 * Completes with a [DimensionValueList].
4532 *
4533 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4534 * error.
4535 *
4536 * If the used [http.Client] completes with an error when making a REST call,
4537 * this method will complete with the same error.
4538 */
4539 async.Future<DimensionValueList> query(DimensionValueRequest request, core.Str ing profileId, {core.int maxResults, core.String pageToken}) {
4540 var _url = null;
4541 var _queryParams = new core.Map();
4542 var _uploadMedia = null;
4543 var _uploadOptions = null;
4544 var _downloadOptions = commons.DownloadOptions.Metadata;
4545 var _body = null;
4546
4547 if (request != null) {
4548 _body = convert.JSON.encode((request).toJson());
4549 }
4550 if (profileId == null) {
4551 throw new core.ArgumentError("Parameter profileId is required.");
4552 }
4553 if (maxResults != null) {
4554 _queryParams["maxResults"] = ["${maxResults}"];
4555 }
4556 if (pageToken != null) {
4557 _queryParams["pageToken"] = [pageToken];
4558 }
4559
4560 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dim ensionvalues/query';
4561
4562 var _response = _requester.request(_url,
4563 "POST",
4564 body: _body,
4565 queryParams: _queryParams,
4566 uploadOptions: _uploadOptions,
4567 uploadMedia: _uploadMedia,
4568 downloadOptions: _downloadOptions);
4569 return _response.then((data) => new DimensionValueList.fromJson(data));
4570 }
4571
4572 }
4573
4574
4575 class DirectorySiteContactsResourceApi {
4576 final commons.ApiRequester _requester;
4577
4578 DirectorySiteContactsResourceApi(commons.ApiRequester client) :
4579 _requester = client;
4580
4581 /**
4582 * Gets one directory site contact by ID.
4583 *
4584 * Request parameters:
4585 *
4586 * [profileId] - User profile ID associated with this request.
4587 *
4588 * [id] - Directory site contact ID.
4589 *
4590 * Completes with a [DirectorySiteContact].
4591 *
4592 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4593 * error.
4594 *
4595 * If the used [http.Client] completes with an error when making a REST call,
4596 * this method will complete with the same error.
4597 */
4598 async.Future<DirectorySiteContact> get(core.String profileId, core.String id) {
4599 var _url = null;
4600 var _queryParams = new core.Map();
4601 var _uploadMedia = null;
4602 var _uploadOptions = null;
4603 var _downloadOptions = commons.DownloadOptions.Metadata;
4604 var _body = null;
4605
4606 if (profileId == null) {
4607 throw new core.ArgumentError("Parameter profileId is required.");
4608 }
4609 if (id == null) {
4610 throw new core.ArgumentError("Parameter id is required.");
4611 }
4612
4613 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir ectorySiteContacts/' + commons.Escaper.ecapeVariable('$id');
4614
4615 var _response = _requester.request(_url,
4616 "GET",
4617 body: _body,
4618 queryParams: _queryParams,
4619 uploadOptions: _uploadOptions,
4620 uploadMedia: _uploadMedia,
4621 downloadOptions: _downloadOptions);
4622 return _response.then((data) => new DirectorySiteContact.fromJson(data));
4623 }
4624
4625 /**
4626 * Retrieves a list of directory site contacts, possibly filtered. This method
4627 * supports paging.
4628 *
4629 * Request parameters:
4630 *
4631 * [profileId] - User profile ID associated with this request.
4632 *
4633 * [directorySiteIds] - Select only directory site contacts with these
4634 * directory site IDs. This is a required field.
4635 *
4636 * [ids] - Select only directory site contacts with these IDs.
4637 *
4638 * [maxResults] - Maximum number of results to return.
4639 *
4640 * [pageToken] - Value of the nextPageToken from the previous result page.
4641 *
4642 * [searchString] - Allows searching for objects by name, ID or email.
4643 * Wildcards (*) are allowed. For example, "directory site contact*2015" will
4644 * return objects with names like "directory site contact June 2015",
4645 * "directory site contact April 2015", or simply "directory site contact
4646 * 2015". Most of the searches also add wildcards implicitly at the start and
4647 * the end of the search string. For example, a search string of "directory
4648 * site contact" will match objects with name "my directory site contact",
4649 * "directory site contact 2015", or simply "directory site contact".
4650 *
4651 * [sortField] - Field by which to sort the list.
4652 * Possible string values are:
4653 * - "ID"
4654 * - "NAME"
4655 *
4656 * [sortOrder] - Order of sorted results, default is ASCENDING.
4657 * Possible string values are:
4658 * - "ASCENDING"
4659 * - "DESCENDING"
4660 *
4661 * Completes with a [DirectorySiteContactsListResponse].
4662 *
4663 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4664 * error.
4665 *
4666 * If the used [http.Client] completes with an error when making a REST call,
4667 * this method will complete with the same error.
4668 */
4669 async.Future<DirectorySiteContactsListResponse> list(core.String profileId, {c ore.List<core.String> directorySiteIds, core.List<core.String> ids, core.int max Results, core.String pageToken, core.String searchString, core.String sortField, core.String sortOrder}) {
4670 var _url = null;
4671 var _queryParams = new core.Map();
4672 var _uploadMedia = null;
4673 var _uploadOptions = null;
4674 var _downloadOptions = commons.DownloadOptions.Metadata;
4675 var _body = null;
4676
4677 if (profileId == null) {
4678 throw new core.ArgumentError("Parameter profileId is required.");
4679 }
4680 if (directorySiteIds != null) {
4681 _queryParams["directorySiteIds"] = directorySiteIds;
4682 }
4683 if (ids != null) {
4684 _queryParams["ids"] = ids;
4685 }
4686 if (maxResults != null) {
4687 _queryParams["maxResults"] = ["${maxResults}"];
4688 }
4689 if (pageToken != null) {
4690 _queryParams["pageToken"] = [pageToken];
4691 }
4692 if (searchString != null) {
4693 _queryParams["searchString"] = [searchString];
4694 }
4695 if (sortField != null) {
4696 _queryParams["sortField"] = [sortField];
4697 }
4698 if (sortOrder != null) {
4699 _queryParams["sortOrder"] = [sortOrder];
4700 }
4701
4702 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir ectorySiteContacts';
4703
4704 var _response = _requester.request(_url,
4705 "GET",
4706 body: _body,
4707 queryParams: _queryParams,
4708 uploadOptions: _uploadOptions,
4709 uploadMedia: _uploadMedia,
4710 downloadOptions: _downloadOptions);
4711 return _response.then((data) => new DirectorySiteContactsListResponse.fromJs on(data));
4712 }
4713
4714 }
4715
4716
4717 class DirectorySitesResourceApi {
4718 final commons.ApiRequester _requester;
4719
4720 DirectorySitesResourceApi(commons.ApiRequester client) :
4721 _requester = client;
4722
4723 /**
4724 * Gets one directory site by ID.
4725 *
4726 * Request parameters:
4727 *
4728 * [profileId] - User profile ID associated with this request.
4729 *
4730 * [id] - Directory site ID.
4731 *
4732 * Completes with a [DirectorySite].
4733 *
4734 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4735 * error.
4736 *
4737 * If the used [http.Client] completes with an error when making a REST call,
4738 * this method will complete with the same error.
4739 */
4740 async.Future<DirectorySite> get(core.String profileId, core.String id) {
4741 var _url = null;
4742 var _queryParams = new core.Map();
4743 var _uploadMedia = null;
4744 var _uploadOptions = null;
4745 var _downloadOptions = commons.DownloadOptions.Metadata;
4746 var _body = null;
4747
4748 if (profileId == null) {
4749 throw new core.ArgumentError("Parameter profileId is required.");
4750 }
4751 if (id == null) {
4752 throw new core.ArgumentError("Parameter id is required.");
4753 }
4754
4755 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir ectorySites/' + commons.Escaper.ecapeVariable('$id');
4756
4757 var _response = _requester.request(_url,
4758 "GET",
4759 body: _body,
4760 queryParams: _queryParams,
4761 uploadOptions: _uploadOptions,
4762 uploadMedia: _uploadMedia,
4763 downloadOptions: _downloadOptions);
4764 return _response.then((data) => new DirectorySite.fromJson(data));
4765 }
4766
4767 /**
4768 * Inserts a new directory site.
4769 *
4770 * [request] - The metadata request object.
4771 *
4772 * Request parameters:
4773 *
4774 * [profileId] - User profile ID associated with this request.
4775 *
4776 * Completes with a [DirectorySite].
4777 *
4778 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4779 * error.
4780 *
4781 * If the used [http.Client] completes with an error when making a REST call,
4782 * this method will complete with the same error.
4783 */
4784 async.Future<DirectorySite> insert(DirectorySite request, core.String profileI d) {
4785 var _url = null;
4786 var _queryParams = new core.Map();
4787 var _uploadMedia = null;
4788 var _uploadOptions = null;
4789 var _downloadOptions = commons.DownloadOptions.Metadata;
4790 var _body = null;
4791
4792 if (request != null) {
4793 _body = convert.JSON.encode((request).toJson());
4794 }
4795 if (profileId == null) {
4796 throw new core.ArgumentError("Parameter profileId is required.");
4797 }
4798
4799 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir ectorySites';
4800
4801 var _response = _requester.request(_url,
4802 "POST",
4803 body: _body,
4804 queryParams: _queryParams,
4805 uploadOptions: _uploadOptions,
4806 uploadMedia: _uploadMedia,
4807 downloadOptions: _downloadOptions);
4808 return _response.then((data) => new DirectorySite.fromJson(data));
4809 }
4810
4811 /**
4812 * Retrieves a list of directory sites, possibly filtered. This method
4813 * supports paging.
4814 *
4815 * Request parameters:
4816 *
4817 * [profileId] - User profile ID associated with this request.
4818 *
4819 * [acceptsInStreamVideoPlacements] - This search filter is no longer
4820 * supported and will have no effect on the results returned.
4821 *
4822 * [acceptsInterstitialPlacements] - This search filter is no longer supported
4823 * and will have no effect on the results returned.
4824 *
4825 * [acceptsPublisherPaidPlacements] - Select only directory sites that accept
4826 * publisher paid placements. This field can be left blank.
4827 *
4828 * [active] - Select only active directory sites. Leave blank to retrieve both
4829 * active and inactive directory sites.
4830 *
4831 * [countryId] - Select only directory sites with this country ID.
4832 *
4833 * [dfpNetworkCode] - Select only directory sites with this DFP network code.
4834 *
4835 * [ids] - Select only directory sites with these IDs.
4836 *
4837 * [maxResults] - Maximum number of results to return.
4838 *
4839 * [pageToken] - Value of the nextPageToken from the previous result page.
4840 *
4841 * [parentId] - Select only directory sites with this parent ID.
4842 *
4843 * [searchString] - Allows searching for objects by name, ID or URL. Wildcards
4844 * (*) are allowed. For example, "directory site*2015" will return objects
4845 * with names like "directory site June 2015", "directory site April 2015", or
4846 * simply "directory site 2015". Most of the searches also add wildcards
4847 * implicitly at the start and the end of the search string. For example, a
4848 * search string of "directory site" will match objects with name "my
4849 * directory site", "directory site 2015" or simply, "directory site".
4850 *
4851 * [sortField] - Field by which to sort the list.
4852 * Possible string values are:
4853 * - "ID"
4854 * - "NAME"
4855 *
4856 * [sortOrder] - Order of sorted results, default is ASCENDING.
4857 * Possible string values are:
4858 * - "ASCENDING"
4859 * - "DESCENDING"
4860 *
4861 * Completes with a [DirectorySitesListResponse].
4862 *
4863 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4864 * error.
4865 *
4866 * If the used [http.Client] completes with an error when making a REST call,
4867 * this method will complete with the same error.
4868 */
4869 async.Future<DirectorySitesListResponse> list(core.String profileId, {core.boo l acceptsInStreamVideoPlacements, core.bool acceptsInterstitialPlacements, core. bool acceptsPublisherPaidPlacements, core.bool active, core.String countryId, co re.String dfpNetworkCode, core.List<core.String> ids, core.int maxResults, core. String pageToken, core.String parentId, core.String searchString, core.String so rtField, core.String sortOrder}) {
4870 var _url = null;
4871 var _queryParams = new core.Map();
4872 var _uploadMedia = null;
4873 var _uploadOptions = null;
4874 var _downloadOptions = commons.DownloadOptions.Metadata;
4875 var _body = null;
4876
4877 if (profileId == null) {
4878 throw new core.ArgumentError("Parameter profileId is required.");
4879 }
4880 if (acceptsInStreamVideoPlacements != null) {
4881 _queryParams["acceptsInStreamVideoPlacements"] = ["${acceptsInStreamVideoP lacements}"];
4882 }
4883 if (acceptsInterstitialPlacements != null) {
4884 _queryParams["acceptsInterstitialPlacements"] = ["${acceptsInterstitialPla cements}"];
4885 }
4886 if (acceptsPublisherPaidPlacements != null) {
4887 _queryParams["acceptsPublisherPaidPlacements"] = ["${acceptsPublisherPaidP lacements}"];
4888 }
4889 if (active != null) {
4890 _queryParams["active"] = ["${active}"];
4891 }
4892 if (countryId != null) {
4893 _queryParams["countryId"] = [countryId];
4894 }
4895 if (dfpNetworkCode != null) {
4896 _queryParams["dfp_network_code"] = [dfpNetworkCode];
4897 }
4898 if (ids != null) {
4899 _queryParams["ids"] = ids;
4900 }
4901 if (maxResults != null) {
4902 _queryParams["maxResults"] = ["${maxResults}"];
4903 }
4904 if (pageToken != null) {
4905 _queryParams["pageToken"] = [pageToken];
4906 }
4907 if (parentId != null) {
4908 _queryParams["parentId"] = [parentId];
4909 }
4910 if (searchString != null) {
4911 _queryParams["searchString"] = [searchString];
4912 }
4913 if (sortField != null) {
4914 _queryParams["sortField"] = [sortField];
4915 }
4916 if (sortOrder != null) {
4917 _queryParams["sortOrder"] = [sortOrder];
4918 }
4919
4920 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/dir ectorySites';
4921
4922 var _response = _requester.request(_url,
4923 "GET",
4924 body: _body,
4925 queryParams: _queryParams,
4926 uploadOptions: _uploadOptions,
4927 uploadMedia: _uploadMedia,
4928 downloadOptions: _downloadOptions);
4929 return _response.then((data) => new DirectorySitesListResponse.fromJson(data ));
4930 }
4931
4932 }
4933
4934
4935 class EventTagsResourceApi {
4936 final commons.ApiRequester _requester;
4937
4938 EventTagsResourceApi(commons.ApiRequester client) :
4939 _requester = client;
4940
4941 /**
4942 * Deletes an existing event tag.
4943 *
4944 * Request parameters:
4945 *
4946 * [profileId] - User profile ID associated with this request.
4947 *
4948 * [id] - Event tag ID.
4949 *
4950 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4951 * error.
4952 *
4953 * If the used [http.Client] completes with an error when making a REST call,
4954 * this method will complete with the same error.
4955 */
4956 async.Future delete(core.String profileId, core.String id) {
4957 var _url = null;
4958 var _queryParams = new core.Map();
4959 var _uploadMedia = null;
4960 var _uploadOptions = null;
4961 var _downloadOptions = commons.DownloadOptions.Metadata;
4962 var _body = null;
4963
4964 if (profileId == null) {
4965 throw new core.ArgumentError("Parameter profileId is required.");
4966 }
4967 if (id == null) {
4968 throw new core.ArgumentError("Parameter id is required.");
4969 }
4970
4971 _downloadOptions = null;
4972
4973 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve ntTags/' + commons.Escaper.ecapeVariable('$id');
4974
4975 var _response = _requester.request(_url,
4976 "DELETE",
4977 body: _body,
4978 queryParams: _queryParams,
4979 uploadOptions: _uploadOptions,
4980 uploadMedia: _uploadMedia,
4981 downloadOptions: _downloadOptions);
4982 return _response.then((data) => null);
4983 }
4984
4985 /**
4986 * Gets one event tag by ID.
4987 *
4988 * Request parameters:
4989 *
4990 * [profileId] - User profile ID associated with this request.
4991 *
4992 * [id] - Event tag ID.
4993 *
4994 * Completes with a [EventTag].
4995 *
4996 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
4997 * error.
4998 *
4999 * If the used [http.Client] completes with an error when making a REST call,
5000 * this method will complete with the same error.
5001 */
5002 async.Future<EventTag> get(core.String profileId, core.String id) {
5003 var _url = null;
5004 var _queryParams = new core.Map();
5005 var _uploadMedia = null;
5006 var _uploadOptions = null;
5007 var _downloadOptions = commons.DownloadOptions.Metadata;
5008 var _body = null;
5009
5010 if (profileId == null) {
5011 throw new core.ArgumentError("Parameter profileId is required.");
5012 }
5013 if (id == null) {
5014 throw new core.ArgumentError("Parameter id is required.");
5015 }
5016
5017 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve ntTags/' + commons.Escaper.ecapeVariable('$id');
5018
5019 var _response = _requester.request(_url,
5020 "GET",
5021 body: _body,
5022 queryParams: _queryParams,
5023 uploadOptions: _uploadOptions,
5024 uploadMedia: _uploadMedia,
5025 downloadOptions: _downloadOptions);
5026 return _response.then((data) => new EventTag.fromJson(data));
5027 }
5028
5029 /**
5030 * Inserts a new event tag.
5031 *
5032 * [request] - The metadata request object.
5033 *
5034 * Request parameters:
5035 *
5036 * [profileId] - User profile ID associated with this request.
5037 *
5038 * Completes with a [EventTag].
5039 *
5040 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5041 * error.
5042 *
5043 * If the used [http.Client] completes with an error when making a REST call,
5044 * this method will complete with the same error.
5045 */
5046 async.Future<EventTag> insert(EventTag request, core.String profileId) {
5047 var _url = null;
5048 var _queryParams = new core.Map();
5049 var _uploadMedia = null;
5050 var _uploadOptions = null;
5051 var _downloadOptions = commons.DownloadOptions.Metadata;
5052 var _body = null;
5053
5054 if (request != null) {
5055 _body = convert.JSON.encode((request).toJson());
5056 }
5057 if (profileId == null) {
5058 throw new core.ArgumentError("Parameter profileId is required.");
5059 }
5060
5061 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve ntTags';
5062
5063 var _response = _requester.request(_url,
5064 "POST",
5065 body: _body,
5066 queryParams: _queryParams,
5067 uploadOptions: _uploadOptions,
5068 uploadMedia: _uploadMedia,
5069 downloadOptions: _downloadOptions);
5070 return _response.then((data) => new EventTag.fromJson(data));
5071 }
5072
5073 /**
5074 * Retrieves a list of event tags, possibly filtered.
5075 *
5076 * Request parameters:
5077 *
5078 * [profileId] - User profile ID associated with this request.
5079 *
5080 * [adId] - Select only event tags that belong to this ad.
5081 *
5082 * [advertiserId] - Select only event tags that belong to this advertiser.
5083 *
5084 * [campaignId] - Select only event tags that belong to this campaign.
5085 *
5086 * [definitionsOnly] - Examine only the specified campaign or advertiser's
5087 * event tags for matching selector criteria. When set to false, the parent
5088 * advertiser and parent campaign of the specified ad or campaign is examined
5089 * as well. In addition, when set to false, the status field is examined as
5090 * well, along with the enabledByDefault field. This parameter can not be set
5091 * to true when adId is specified as ads do not define their own even tags.
5092 *
5093 * [enabled] - Select only enabled event tags. What is considered enabled or
5094 * disabled depends on the definitionsOnly parameter. When definitionsOnly is
5095 * set to true, only the specified advertiser or campaign's event tags'
5096 * enabledByDefault field is examined. When definitionsOnly is set to false,
5097 * the specified ad or specified campaign's parent advertiser's or parent
5098 * campaign's event tags' enabledByDefault and status fields are examined as
5099 * well.
5100 *
5101 * [eventTagTypes] - Select only event tags with the specified event tag
5102 * types. Event tag types can be used to specify whether to use a third-party
5103 * pixel, a third-party JavaScript URL, or a third-party click-through URL for
5104 * either impression or click tracking.
5105 *
5106 * [ids] - Select only event tags with these IDs.
5107 *
5108 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
5109 * are allowed. For example, "eventtag*2015" will return objects with names
5110 * like "eventtag June 2015", "eventtag April 2015", or simply "eventtag
5111 * 2015". Most of the searches also add wildcards implicitly at the start and
5112 * the end of the search string. For example, a search string of "eventtag"
5113 * will match objects with name "my eventtag", "eventtag 2015", or simply
5114 * "eventtag".
5115 *
5116 * [sortField] - Field by which to sort the list.
5117 * Possible string values are:
5118 * - "ID"
5119 * - "NAME"
5120 *
5121 * [sortOrder] - Order of sorted results, default is ASCENDING.
5122 * Possible string values are:
5123 * - "ASCENDING"
5124 * - "DESCENDING"
5125 *
5126 * Completes with a [EventTagsListResponse].
5127 *
5128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5129 * error.
5130 *
5131 * If the used [http.Client] completes with an error when making a REST call,
5132 * this method will complete with the same error.
5133 */
5134 async.Future<EventTagsListResponse> list(core.String profileId, {core.String a dId, core.String advertiserId, core.String campaignId, core.bool definitionsOnly , core.bool enabled, core.List<core.String> eventTagTypes, core.List<core.String > ids, core.String searchString, core.String sortField, core.String sortOrder}) {
5135 var _url = null;
5136 var _queryParams = new core.Map();
5137 var _uploadMedia = null;
5138 var _uploadOptions = null;
5139 var _downloadOptions = commons.DownloadOptions.Metadata;
5140 var _body = null;
5141
5142 if (profileId == null) {
5143 throw new core.ArgumentError("Parameter profileId is required.");
5144 }
5145 if (adId != null) {
5146 _queryParams["adId"] = [adId];
5147 }
5148 if (advertiserId != null) {
5149 _queryParams["advertiserId"] = [advertiserId];
5150 }
5151 if (campaignId != null) {
5152 _queryParams["campaignId"] = [campaignId];
5153 }
5154 if (definitionsOnly != null) {
5155 _queryParams["definitionsOnly"] = ["${definitionsOnly}"];
5156 }
5157 if (enabled != null) {
5158 _queryParams["enabled"] = ["${enabled}"];
5159 }
5160 if (eventTagTypes != null) {
5161 _queryParams["eventTagTypes"] = eventTagTypes;
5162 }
5163 if (ids != null) {
5164 _queryParams["ids"] = ids;
5165 }
5166 if (searchString != null) {
5167 _queryParams["searchString"] = [searchString];
5168 }
5169 if (sortField != null) {
5170 _queryParams["sortField"] = [sortField];
5171 }
5172 if (sortOrder != null) {
5173 _queryParams["sortOrder"] = [sortOrder];
5174 }
5175
5176 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve ntTags';
5177
5178 var _response = _requester.request(_url,
5179 "GET",
5180 body: _body,
5181 queryParams: _queryParams,
5182 uploadOptions: _uploadOptions,
5183 uploadMedia: _uploadMedia,
5184 downloadOptions: _downloadOptions);
5185 return _response.then((data) => new EventTagsListResponse.fromJson(data));
5186 }
5187
5188 /**
5189 * Updates an existing event tag. This method supports patch semantics.
5190 *
5191 * [request] - The metadata request object.
5192 *
5193 * Request parameters:
5194 *
5195 * [profileId] - User profile ID associated with this request.
5196 *
5197 * [id] - Event tag ID.
5198 *
5199 * Completes with a [EventTag].
5200 *
5201 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5202 * error.
5203 *
5204 * If the used [http.Client] completes with an error when making a REST call,
5205 * this method will complete with the same error.
5206 */
5207 async.Future<EventTag> patch(EventTag request, core.String profileId, core.Str ing id) {
5208 var _url = null;
5209 var _queryParams = new core.Map();
5210 var _uploadMedia = null;
5211 var _uploadOptions = null;
5212 var _downloadOptions = commons.DownloadOptions.Metadata;
5213 var _body = null;
5214
5215 if (request != null) {
5216 _body = convert.JSON.encode((request).toJson());
5217 }
5218 if (profileId == null) {
5219 throw new core.ArgumentError("Parameter profileId is required.");
5220 }
5221 if (id == null) {
5222 throw new core.ArgumentError("Parameter id is required.");
5223 }
5224 _queryParams["id"] = [id];
5225
5226 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve ntTags';
5227
5228 var _response = _requester.request(_url,
5229 "PATCH",
5230 body: _body,
5231 queryParams: _queryParams,
5232 uploadOptions: _uploadOptions,
5233 uploadMedia: _uploadMedia,
5234 downloadOptions: _downloadOptions);
5235 return _response.then((data) => new EventTag.fromJson(data));
5236 }
5237
5238 /**
5239 * Updates an existing event tag.
5240 *
5241 * [request] - The metadata request object.
5242 *
5243 * Request parameters:
5244 *
5245 * [profileId] - User profile ID associated with this request.
5246 *
5247 * Completes with a [EventTag].
5248 *
5249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5250 * error.
5251 *
5252 * If the used [http.Client] completes with an error when making a REST call,
5253 * this method will complete with the same error.
5254 */
5255 async.Future<EventTag> update(EventTag request, core.String profileId) {
5256 var _url = null;
5257 var _queryParams = new core.Map();
5258 var _uploadMedia = null;
5259 var _uploadOptions = null;
5260 var _downloadOptions = commons.DownloadOptions.Metadata;
5261 var _body = null;
5262
5263 if (request != null) {
5264 _body = convert.JSON.encode((request).toJson());
5265 }
5266 if (profileId == null) {
5267 throw new core.ArgumentError("Parameter profileId is required.");
5268 }
5269
5270 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/eve ntTags';
5271
5272 var _response = _requester.request(_url,
5273 "PUT",
5274 body: _body,
5275 queryParams: _queryParams,
5276 uploadOptions: _uploadOptions,
5277 uploadMedia: _uploadMedia,
5278 downloadOptions: _downloadOptions);
5279 return _response.then((data) => new EventTag.fromJson(data));
5280 }
5281
5282 }
5283
5284
5285 class FilesResourceApi {
5286 final commons.ApiRequester _requester;
5287
5288 FilesResourceApi(commons.ApiRequester client) :
5289 _requester = client;
5290
5291 /**
5292 * Retrieves a report file by its report ID and file ID.
5293 *
5294 * Request parameters:
5295 *
5296 * [reportId] - The ID of the report.
5297 *
5298 * [fileId] - The ID of the report file.
5299 *
5300 * [downloadOptions] - Options for downloading. A download can be either a
5301 * Metadata (default) or Media download. Partial Media downloads are possible
5302 * as well.
5303 *
5304 * Completes with a
5305 *
5306 * - [File] for Metadata downloads (see [downloadOptions]).
5307 *
5308 * - [commons.Media] for Media downloads (see [downloadOptions]).
5309 *
5310 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5311 * error.
5312 *
5313 * If the used [http.Client] completes with an error when making a REST call,
5314 * this method will complete with the same error.
5315 */
5316 async.Future get(core.String reportId, core.String fileId, {commons.DownloadOp tions downloadOptions: commons.DownloadOptions.Metadata}) {
5317 var _url = null;
5318 var _queryParams = new core.Map();
5319 var _uploadMedia = null;
5320 var _uploadOptions = null;
5321 var _downloadOptions = commons.DownloadOptions.Metadata;
5322 var _body = null;
5323
5324 if (reportId == null) {
5325 throw new core.ArgumentError("Parameter reportId is required.");
5326 }
5327 if (fileId == null) {
5328 throw new core.ArgumentError("Parameter fileId is required.");
5329 }
5330
5331 _downloadOptions = downloadOptions;
5332
5333 _url = 'reports/' + commons.Escaper.ecapeVariable('$reportId') + '/files/' + commons.Escaper.ecapeVariable('$fileId');
5334
5335 var _response = _requester.request(_url,
5336 "GET",
5337 body: _body,
5338 queryParams: _queryParams,
5339 uploadOptions: _uploadOptions,
5340 uploadMedia: _uploadMedia,
5341 downloadOptions: _downloadOptions);
5342 if (_downloadOptions == null ||
5343 _downloadOptions == commons.DownloadOptions.Metadata) {
5344 return _response.then((data) => new File.fromJson(data));
5345 } else {
5346 return _response;
5347 }
5348 }
5349
5350 /**
5351 * Lists files for a user profile.
5352 *
5353 * Request parameters:
5354 *
5355 * [profileId] - The DFA profile ID.
5356 *
5357 * [maxResults] - Maximum number of results to return.
5358 * Value must be between "0" and "10".
5359 *
5360 * [pageToken] - The value of the nextToken from the previous result page.
5361 *
5362 * [scope] - The scope that defines which results are returned, default is
5363 * 'MINE'.
5364 * Possible string values are:
5365 * - "ALL" : All files in account.
5366 * - "MINE" : My files.
5367 * - "SHARED_WITH_ME" : Files shared with me.
5368 *
5369 * [sortField] - The field by which to sort the list.
5370 * Possible string values are:
5371 * - "ID" : Sort by file ID.
5372 * - "LAST_MODIFIED_TIME" : Sort by 'lastmodifiedAt' field.
5373 *
5374 * [sortOrder] - Order of sorted results, default is 'DESCENDING'.
5375 * Possible string values are:
5376 * - "ASCENDING" : Ascending order.
5377 * - "DESCENDING" : Descending order.
5378 *
5379 * Completes with a [FileList].
5380 *
5381 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5382 * error.
5383 *
5384 * If the used [http.Client] completes with an error when making a REST call,
5385 * this method will complete with the same error.
5386 */
5387 async.Future<FileList> list(core.String profileId, {core.int maxResults, core. String pageToken, core.String scope, core.String sortField, core.String sortOrde r}) {
5388 var _url = null;
5389 var _queryParams = new core.Map();
5390 var _uploadMedia = null;
5391 var _uploadOptions = null;
5392 var _downloadOptions = commons.DownloadOptions.Metadata;
5393 var _body = null;
5394
5395 if (profileId == null) {
5396 throw new core.ArgumentError("Parameter profileId is required.");
5397 }
5398 if (maxResults != null) {
5399 _queryParams["maxResults"] = ["${maxResults}"];
5400 }
5401 if (pageToken != null) {
5402 _queryParams["pageToken"] = [pageToken];
5403 }
5404 if (scope != null) {
5405 _queryParams["scope"] = [scope];
5406 }
5407 if (sortField != null) {
5408 _queryParams["sortField"] = [sortField];
5409 }
5410 if (sortOrder != null) {
5411 _queryParams["sortOrder"] = [sortOrder];
5412 }
5413
5414 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/fil es';
5415
5416 var _response = _requester.request(_url,
5417 "GET",
5418 body: _body,
5419 queryParams: _queryParams,
5420 uploadOptions: _uploadOptions,
5421 uploadMedia: _uploadMedia,
5422 downloadOptions: _downloadOptions);
5423 return _response.then((data) => new FileList.fromJson(data));
5424 }
5425
5426 }
5427
5428
5429 class FloodlightActivitiesResourceApi {
5430 final commons.ApiRequester _requester;
5431
5432 FloodlightActivitiesResourceApi(commons.ApiRequester client) :
5433 _requester = client;
5434
5435 /**
5436 * Deletes an existing floodlight activity.
5437 *
5438 * Request parameters:
5439 *
5440 * [profileId] - User profile ID associated with this request.
5441 *
5442 * [id] - Floodlight activity ID.
5443 *
5444 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5445 * error.
5446 *
5447 * If the used [http.Client] completes with an error when making a REST call,
5448 * this method will complete with the same error.
5449 */
5450 async.Future delete(core.String profileId, core.String id) {
5451 var _url = null;
5452 var _queryParams = new core.Map();
5453 var _uploadMedia = null;
5454 var _uploadOptions = null;
5455 var _downloadOptions = commons.DownloadOptions.Metadata;
5456 var _body = null;
5457
5458 if (profileId == null) {
5459 throw new core.ArgumentError("Parameter profileId is required.");
5460 }
5461 if (id == null) {
5462 throw new core.ArgumentError("Parameter id is required.");
5463 }
5464
5465 _downloadOptions = null;
5466
5467 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivities/' + commons.Escaper.ecapeVariable('$id');
5468
5469 var _response = _requester.request(_url,
5470 "DELETE",
5471 body: _body,
5472 queryParams: _queryParams,
5473 uploadOptions: _uploadOptions,
5474 uploadMedia: _uploadMedia,
5475 downloadOptions: _downloadOptions);
5476 return _response.then((data) => null);
5477 }
5478
5479 /**
5480 * Generates a tag for a floodlight activity.
5481 *
5482 * Request parameters:
5483 *
5484 * [profileId] - User profile ID associated with this request.
5485 *
5486 * [floodlightActivityId] - Floodlight activity ID for which we want to
5487 * generate a tag.
5488 *
5489 * Completes with a [FloodlightActivitiesGenerateTagResponse].
5490 *
5491 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5492 * error.
5493 *
5494 * If the used [http.Client] completes with an error when making a REST call,
5495 * this method will complete with the same error.
5496 */
5497 async.Future<FloodlightActivitiesGenerateTagResponse> generatetag(core.String profileId, {core.String floodlightActivityId}) {
5498 var _url = null;
5499 var _queryParams = new core.Map();
5500 var _uploadMedia = null;
5501 var _uploadOptions = null;
5502 var _downloadOptions = commons.DownloadOptions.Metadata;
5503 var _body = null;
5504
5505 if (profileId == null) {
5506 throw new core.ArgumentError("Parameter profileId is required.");
5507 }
5508 if (floodlightActivityId != null) {
5509 _queryParams["floodlightActivityId"] = [floodlightActivityId];
5510 }
5511
5512 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivities/generatetag';
5513
5514 var _response = _requester.request(_url,
5515 "POST",
5516 body: _body,
5517 queryParams: _queryParams,
5518 uploadOptions: _uploadOptions,
5519 uploadMedia: _uploadMedia,
5520 downloadOptions: _downloadOptions);
5521 return _response.then((data) => new FloodlightActivitiesGenerateTagResponse. fromJson(data));
5522 }
5523
5524 /**
5525 * Gets one floodlight activity by ID.
5526 *
5527 * Request parameters:
5528 *
5529 * [profileId] - User profile ID associated with this request.
5530 *
5531 * [id] - Floodlight activity ID.
5532 *
5533 * Completes with a [FloodlightActivity].
5534 *
5535 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5536 * error.
5537 *
5538 * If the used [http.Client] completes with an error when making a REST call,
5539 * this method will complete with the same error.
5540 */
5541 async.Future<FloodlightActivity> get(core.String profileId, core.String id) {
5542 var _url = null;
5543 var _queryParams = new core.Map();
5544 var _uploadMedia = null;
5545 var _uploadOptions = null;
5546 var _downloadOptions = commons.DownloadOptions.Metadata;
5547 var _body = null;
5548
5549 if (profileId == null) {
5550 throw new core.ArgumentError("Parameter profileId is required.");
5551 }
5552 if (id == null) {
5553 throw new core.ArgumentError("Parameter id is required.");
5554 }
5555
5556 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivities/' + commons.Escaper.ecapeVariable('$id');
5557
5558 var _response = _requester.request(_url,
5559 "GET",
5560 body: _body,
5561 queryParams: _queryParams,
5562 uploadOptions: _uploadOptions,
5563 uploadMedia: _uploadMedia,
5564 downloadOptions: _downloadOptions);
5565 return _response.then((data) => new FloodlightActivity.fromJson(data));
5566 }
5567
5568 /**
5569 * Inserts a new floodlight activity.
5570 *
5571 * [request] - The metadata request object.
5572 *
5573 * Request parameters:
5574 *
5575 * [profileId] - User profile ID associated with this request.
5576 *
5577 * Completes with a [FloodlightActivity].
5578 *
5579 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5580 * error.
5581 *
5582 * If the used [http.Client] completes with an error when making a REST call,
5583 * this method will complete with the same error.
5584 */
5585 async.Future<FloodlightActivity> insert(FloodlightActivity request, core.Strin g profileId) {
5586 var _url = null;
5587 var _queryParams = new core.Map();
5588 var _uploadMedia = null;
5589 var _uploadOptions = null;
5590 var _downloadOptions = commons.DownloadOptions.Metadata;
5591 var _body = null;
5592
5593 if (request != null) {
5594 _body = convert.JSON.encode((request).toJson());
5595 }
5596 if (profileId == null) {
5597 throw new core.ArgumentError("Parameter profileId is required.");
5598 }
5599
5600 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivities';
5601
5602 var _response = _requester.request(_url,
5603 "POST",
5604 body: _body,
5605 queryParams: _queryParams,
5606 uploadOptions: _uploadOptions,
5607 uploadMedia: _uploadMedia,
5608 downloadOptions: _downloadOptions);
5609 return _response.then((data) => new FloodlightActivity.fromJson(data));
5610 }
5611
5612 /**
5613 * Retrieves a list of floodlight activities, possibly filtered. This method
5614 * supports paging.
5615 *
5616 * Request parameters:
5617 *
5618 * [profileId] - User profile ID associated with this request.
5619 *
5620 * [advertiserId] - Select only floodlight activities for the specified
5621 * advertiser ID. Must specify either ids, advertiserId, or
5622 * floodlightConfigurationId for a non-empty result.
5623 *
5624 * [floodlightActivityGroupIds] - Select only floodlight activities with the
5625 * specified floodlight activity group IDs.
5626 *
5627 * [floodlightActivityGroupName] - Select only floodlight activities with the
5628 * specified floodlight activity group name.
5629 *
5630 * [floodlightActivityGroupTagString] - Select only floodlight activities with
5631 * the specified floodlight activity group tag string.
5632 *
5633 * [floodlightActivityGroupType] - Select only floodlight activities with the
5634 * specified floodlight activity group type.
5635 * Possible string values are:
5636 * - "COUNTER"
5637 * - "SALE"
5638 *
5639 * [floodlightConfigurationId] - Select only floodlight activities for the
5640 * specified floodlight configuration ID. Must specify either ids,
5641 * advertiserId, or floodlightConfigurationId for a non-empty result.
5642 *
5643 * [ids] - Select only floodlight activities with the specified IDs. Must
5644 * specify either ids, advertiserId, or floodlightConfigurationId for a
5645 * non-empty result.
5646 *
5647 * [maxResults] - Maximum number of results to return.
5648 *
5649 * [pageToken] - Value of the nextPageToken from the previous result page.
5650 *
5651 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
5652 * are allowed. For example, "floodlightactivity*2015" will return objects
5653 * with names like "floodlightactivity June 2015", "floodlightactivity April
5654 * 2015", or simply "floodlightactivity 2015". Most of the searches also add
5655 * wildcards implicitly at the start and the end of the search string. For
5656 * example, a search string of "floodlightactivity" will match objects with
5657 * name "my floodlightactivity activity", "floodlightactivity 2015", or simply
5658 * "floodlightactivity".
5659 *
5660 * [sortField] - Field by which to sort the list.
5661 * Possible string values are:
5662 * - "ID"
5663 * - "NAME"
5664 *
5665 * [sortOrder] - Order of sorted results, default is ASCENDING.
5666 * Possible string values are:
5667 * - "ASCENDING"
5668 * - "DESCENDING"
5669 *
5670 * [tagString] - Select only floodlight activities with the specified tag
5671 * string.
5672 *
5673 * Completes with a [FloodlightActivitiesListResponse].
5674 *
5675 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5676 * error.
5677 *
5678 * If the used [http.Client] completes with an error when making a REST call,
5679 * this method will complete with the same error.
5680 */
5681 async.Future<FloodlightActivitiesListResponse> list(core.String profileId, {co re.String advertiserId, core.List<core.String> floodlightActivityGroupIds, core. String floodlightActivityGroupName, core.String floodlightActivityGroupTagString , core.String floodlightActivityGroupType, core.String floodlightConfigurationId , core.List<core.String> ids, core.int maxResults, core.String pageToken, core.S tring searchString, core.String sortField, core.String sortOrder, core.String ta gString}) {
5682 var _url = null;
5683 var _queryParams = new core.Map();
5684 var _uploadMedia = null;
5685 var _uploadOptions = null;
5686 var _downloadOptions = commons.DownloadOptions.Metadata;
5687 var _body = null;
5688
5689 if (profileId == null) {
5690 throw new core.ArgumentError("Parameter profileId is required.");
5691 }
5692 if (advertiserId != null) {
5693 _queryParams["advertiserId"] = [advertiserId];
5694 }
5695 if (floodlightActivityGroupIds != null) {
5696 _queryParams["floodlightActivityGroupIds"] = floodlightActivityGroupIds;
5697 }
5698 if (floodlightActivityGroupName != null) {
5699 _queryParams["floodlightActivityGroupName"] = [floodlightActivityGroupName ];
5700 }
5701 if (floodlightActivityGroupTagString != null) {
5702 _queryParams["floodlightActivityGroupTagString"] = [floodlightActivityGrou pTagString];
5703 }
5704 if (floodlightActivityGroupType != null) {
5705 _queryParams["floodlightActivityGroupType"] = [floodlightActivityGroupType ];
5706 }
5707 if (floodlightConfigurationId != null) {
5708 _queryParams["floodlightConfigurationId"] = [floodlightConfigurationId];
5709 }
5710 if (ids != null) {
5711 _queryParams["ids"] = ids;
5712 }
5713 if (maxResults != null) {
5714 _queryParams["maxResults"] = ["${maxResults}"];
5715 }
5716 if (pageToken != null) {
5717 _queryParams["pageToken"] = [pageToken];
5718 }
5719 if (searchString != null) {
5720 _queryParams["searchString"] = [searchString];
5721 }
5722 if (sortField != null) {
5723 _queryParams["sortField"] = [sortField];
5724 }
5725 if (sortOrder != null) {
5726 _queryParams["sortOrder"] = [sortOrder];
5727 }
5728 if (tagString != null) {
5729 _queryParams["tagString"] = [tagString];
5730 }
5731
5732 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivities';
5733
5734 var _response = _requester.request(_url,
5735 "GET",
5736 body: _body,
5737 queryParams: _queryParams,
5738 uploadOptions: _uploadOptions,
5739 uploadMedia: _uploadMedia,
5740 downloadOptions: _downloadOptions);
5741 return _response.then((data) => new FloodlightActivitiesListResponse.fromJso n(data));
5742 }
5743
5744 /**
5745 * Updates an existing floodlight activity. This method supports patch
5746 * semantics.
5747 *
5748 * [request] - The metadata request object.
5749 *
5750 * Request parameters:
5751 *
5752 * [profileId] - User profile ID associated with this request.
5753 *
5754 * [id] - Floodlight activity ID.
5755 *
5756 * Completes with a [FloodlightActivity].
5757 *
5758 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5759 * error.
5760 *
5761 * If the used [http.Client] completes with an error when making a REST call,
5762 * this method will complete with the same error.
5763 */
5764 async.Future<FloodlightActivity> patch(FloodlightActivity request, core.String profileId, core.String id) {
5765 var _url = null;
5766 var _queryParams = new core.Map();
5767 var _uploadMedia = null;
5768 var _uploadOptions = null;
5769 var _downloadOptions = commons.DownloadOptions.Metadata;
5770 var _body = null;
5771
5772 if (request != null) {
5773 _body = convert.JSON.encode((request).toJson());
5774 }
5775 if (profileId == null) {
5776 throw new core.ArgumentError("Parameter profileId is required.");
5777 }
5778 if (id == null) {
5779 throw new core.ArgumentError("Parameter id is required.");
5780 }
5781 _queryParams["id"] = [id];
5782
5783 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivities';
5784
5785 var _response = _requester.request(_url,
5786 "PATCH",
5787 body: _body,
5788 queryParams: _queryParams,
5789 uploadOptions: _uploadOptions,
5790 uploadMedia: _uploadMedia,
5791 downloadOptions: _downloadOptions);
5792 return _response.then((data) => new FloodlightActivity.fromJson(data));
5793 }
5794
5795 /**
5796 * Updates an existing floodlight activity.
5797 *
5798 * [request] - The metadata request object.
5799 *
5800 * Request parameters:
5801 *
5802 * [profileId] - User profile ID associated with this request.
5803 *
5804 * Completes with a [FloodlightActivity].
5805 *
5806 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5807 * error.
5808 *
5809 * If the used [http.Client] completes with an error when making a REST call,
5810 * this method will complete with the same error.
5811 */
5812 async.Future<FloodlightActivity> update(FloodlightActivity request, core.Strin g profileId) {
5813 var _url = null;
5814 var _queryParams = new core.Map();
5815 var _uploadMedia = null;
5816 var _uploadOptions = null;
5817 var _downloadOptions = commons.DownloadOptions.Metadata;
5818 var _body = null;
5819
5820 if (request != null) {
5821 _body = convert.JSON.encode((request).toJson());
5822 }
5823 if (profileId == null) {
5824 throw new core.ArgumentError("Parameter profileId is required.");
5825 }
5826
5827 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivities';
5828
5829 var _response = _requester.request(_url,
5830 "PUT",
5831 body: _body,
5832 queryParams: _queryParams,
5833 uploadOptions: _uploadOptions,
5834 uploadMedia: _uploadMedia,
5835 downloadOptions: _downloadOptions);
5836 return _response.then((data) => new FloodlightActivity.fromJson(data));
5837 }
5838
5839 }
5840
5841
5842 class FloodlightActivityGroupsResourceApi {
5843 final commons.ApiRequester _requester;
5844
5845 FloodlightActivityGroupsResourceApi(commons.ApiRequester client) :
5846 _requester = client;
5847
5848 /**
5849 * Gets one floodlight activity group by ID.
5850 *
5851 * Request parameters:
5852 *
5853 * [profileId] - User profile ID associated with this request.
5854 *
5855 * [id] - Floodlight activity Group ID.
5856 *
5857 * Completes with a [FloodlightActivityGroup].
5858 *
5859 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5860 * error.
5861 *
5862 * If the used [http.Client] completes with an error when making a REST call,
5863 * this method will complete with the same error.
5864 */
5865 async.Future<FloodlightActivityGroup> get(core.String profileId, core.String i d) {
5866 var _url = null;
5867 var _queryParams = new core.Map();
5868 var _uploadMedia = null;
5869 var _uploadOptions = null;
5870 var _downloadOptions = commons.DownloadOptions.Metadata;
5871 var _body = null;
5872
5873 if (profileId == null) {
5874 throw new core.ArgumentError("Parameter profileId is required.");
5875 }
5876 if (id == null) {
5877 throw new core.ArgumentError("Parameter id is required.");
5878 }
5879
5880 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivityGroups/' + commons.Escaper.ecapeVariable('$id');
5881
5882 var _response = _requester.request(_url,
5883 "GET",
5884 body: _body,
5885 queryParams: _queryParams,
5886 uploadOptions: _uploadOptions,
5887 uploadMedia: _uploadMedia,
5888 downloadOptions: _downloadOptions);
5889 return _response.then((data) => new FloodlightActivityGroup.fromJson(data));
5890 }
5891
5892 /**
5893 * Inserts a new floodlight activity group.
5894 *
5895 * [request] - The metadata request object.
5896 *
5897 * Request parameters:
5898 *
5899 * [profileId] - User profile ID associated with this request.
5900 *
5901 * Completes with a [FloodlightActivityGroup].
5902 *
5903 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5904 * error.
5905 *
5906 * If the used [http.Client] completes with an error when making a REST call,
5907 * this method will complete with the same error.
5908 */
5909 async.Future<FloodlightActivityGroup> insert(FloodlightActivityGroup request, core.String profileId) {
5910 var _url = null;
5911 var _queryParams = new core.Map();
5912 var _uploadMedia = null;
5913 var _uploadOptions = null;
5914 var _downloadOptions = commons.DownloadOptions.Metadata;
5915 var _body = null;
5916
5917 if (request != null) {
5918 _body = convert.JSON.encode((request).toJson());
5919 }
5920 if (profileId == null) {
5921 throw new core.ArgumentError("Parameter profileId is required.");
5922 }
5923
5924 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivityGroups';
5925
5926 var _response = _requester.request(_url,
5927 "POST",
5928 body: _body,
5929 queryParams: _queryParams,
5930 uploadOptions: _uploadOptions,
5931 uploadMedia: _uploadMedia,
5932 downloadOptions: _downloadOptions);
5933 return _response.then((data) => new FloodlightActivityGroup.fromJson(data));
5934 }
5935
5936 /**
5937 * Retrieves a list of floodlight activity groups, possibly filtered. This
5938 * method supports paging.
5939 *
5940 * Request parameters:
5941 *
5942 * [profileId] - User profile ID associated with this request.
5943 *
5944 * [advertiserId] - Select only floodlight activity groups with the specified
5945 * advertiser ID. Must specify either advertiserId or
5946 * floodlightConfigurationId for a non-empty result.
5947 *
5948 * [floodlightConfigurationId] - Select only floodlight activity groups with
5949 * the specified floodlight configuration ID. Must specify either
5950 * advertiserId, or floodlightConfigurationId for a non-empty result.
5951 *
5952 * [ids] - Select only floodlight activity groups with the specified IDs. Must
5953 * specify either advertiserId or floodlightConfigurationId for a non-empty
5954 * result.
5955 *
5956 * [maxResults] - Maximum number of results to return.
5957 *
5958 * [pageToken] - Value of the nextPageToken from the previous result page.
5959 *
5960 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
5961 * are allowed. For example, "floodlightactivitygroup*2015" will return
5962 * objects with names like "floodlightactivitygroup June 2015",
5963 * "floodlightactivitygroup April 2015", or simply "floodlightactivitygroup
5964 * 2015". Most of the searches also add wildcards implicitly at the start and
5965 * the end of the search string. For example, a search string of
5966 * "floodlightactivitygroup" will match objects with name "my
5967 * floodlightactivitygroup activity", "floodlightactivitygroup 2015", or
5968 * simply "floodlightactivitygroup".
5969 *
5970 * [sortField] - Field by which to sort the list.
5971 * Possible string values are:
5972 * - "ID"
5973 * - "NAME"
5974 *
5975 * [sortOrder] - Order of sorted results, default is ASCENDING.
5976 * Possible string values are:
5977 * - "ASCENDING"
5978 * - "DESCENDING"
5979 *
5980 * [type] - Select only floodlight activity groups with the specified
5981 * floodlight activity group type.
5982 * Possible string values are:
5983 * - "COUNTER"
5984 * - "SALE"
5985 *
5986 * Completes with a [FloodlightActivityGroupsListResponse].
5987 *
5988 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
5989 * error.
5990 *
5991 * If the used [http.Client] completes with an error when making a REST call,
5992 * this method will complete with the same error.
5993 */
5994 async.Future<FloodlightActivityGroupsListResponse> list(core.String profileId, {core.String advertiserId, core.String floodlightConfigurationId, core.List<cor e.String> ids, core.int maxResults, core.String pageToken, core.String searchStr ing, core.String sortField, core.String sortOrder, core.String type}) {
5995 var _url = null;
5996 var _queryParams = new core.Map();
5997 var _uploadMedia = null;
5998 var _uploadOptions = null;
5999 var _downloadOptions = commons.DownloadOptions.Metadata;
6000 var _body = null;
6001
6002 if (profileId == null) {
6003 throw new core.ArgumentError("Parameter profileId is required.");
6004 }
6005 if (advertiserId != null) {
6006 _queryParams["advertiserId"] = [advertiserId];
6007 }
6008 if (floodlightConfigurationId != null) {
6009 _queryParams["floodlightConfigurationId"] = [floodlightConfigurationId];
6010 }
6011 if (ids != null) {
6012 _queryParams["ids"] = ids;
6013 }
6014 if (maxResults != null) {
6015 _queryParams["maxResults"] = ["${maxResults}"];
6016 }
6017 if (pageToken != null) {
6018 _queryParams["pageToken"] = [pageToken];
6019 }
6020 if (searchString != null) {
6021 _queryParams["searchString"] = [searchString];
6022 }
6023 if (sortField != null) {
6024 _queryParams["sortField"] = [sortField];
6025 }
6026 if (sortOrder != null) {
6027 _queryParams["sortOrder"] = [sortOrder];
6028 }
6029 if (type != null) {
6030 _queryParams["type"] = [type];
6031 }
6032
6033 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivityGroups';
6034
6035 var _response = _requester.request(_url,
6036 "GET",
6037 body: _body,
6038 queryParams: _queryParams,
6039 uploadOptions: _uploadOptions,
6040 uploadMedia: _uploadMedia,
6041 downloadOptions: _downloadOptions);
6042 return _response.then((data) => new FloodlightActivityGroupsListResponse.fro mJson(data));
6043 }
6044
6045 /**
6046 * Updates an existing floodlight activity group. This method supports patch
6047 * semantics.
6048 *
6049 * [request] - The metadata request object.
6050 *
6051 * Request parameters:
6052 *
6053 * [profileId] - User profile ID associated with this request.
6054 *
6055 * [id] - Floodlight activity Group ID.
6056 *
6057 * Completes with a [FloodlightActivityGroup].
6058 *
6059 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6060 * error.
6061 *
6062 * If the used [http.Client] completes with an error when making a REST call,
6063 * this method will complete with the same error.
6064 */
6065 async.Future<FloodlightActivityGroup> patch(FloodlightActivityGroup request, c ore.String profileId, core.String id) {
6066 var _url = null;
6067 var _queryParams = new core.Map();
6068 var _uploadMedia = null;
6069 var _uploadOptions = null;
6070 var _downloadOptions = commons.DownloadOptions.Metadata;
6071 var _body = null;
6072
6073 if (request != null) {
6074 _body = convert.JSON.encode((request).toJson());
6075 }
6076 if (profileId == null) {
6077 throw new core.ArgumentError("Parameter profileId is required.");
6078 }
6079 if (id == null) {
6080 throw new core.ArgumentError("Parameter id is required.");
6081 }
6082 _queryParams["id"] = [id];
6083
6084 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivityGroups';
6085
6086 var _response = _requester.request(_url,
6087 "PATCH",
6088 body: _body,
6089 queryParams: _queryParams,
6090 uploadOptions: _uploadOptions,
6091 uploadMedia: _uploadMedia,
6092 downloadOptions: _downloadOptions);
6093 return _response.then((data) => new FloodlightActivityGroup.fromJson(data));
6094 }
6095
6096 /**
6097 * Updates an existing floodlight activity group.
6098 *
6099 * [request] - The metadata request object.
6100 *
6101 * Request parameters:
6102 *
6103 * [profileId] - User profile ID associated with this request.
6104 *
6105 * Completes with a [FloodlightActivityGroup].
6106 *
6107 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6108 * error.
6109 *
6110 * If the used [http.Client] completes with an error when making a REST call,
6111 * this method will complete with the same error.
6112 */
6113 async.Future<FloodlightActivityGroup> update(FloodlightActivityGroup request, core.String profileId) {
6114 var _url = null;
6115 var _queryParams = new core.Map();
6116 var _uploadMedia = null;
6117 var _uploadOptions = null;
6118 var _downloadOptions = commons.DownloadOptions.Metadata;
6119 var _body = null;
6120
6121 if (request != null) {
6122 _body = convert.JSON.encode((request).toJson());
6123 }
6124 if (profileId == null) {
6125 throw new core.ArgumentError("Parameter profileId is required.");
6126 }
6127
6128 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightActivityGroups';
6129
6130 var _response = _requester.request(_url,
6131 "PUT",
6132 body: _body,
6133 queryParams: _queryParams,
6134 uploadOptions: _uploadOptions,
6135 uploadMedia: _uploadMedia,
6136 downloadOptions: _downloadOptions);
6137 return _response.then((data) => new FloodlightActivityGroup.fromJson(data));
6138 }
6139
6140 }
6141
6142
6143 class FloodlightConfigurationsResourceApi {
6144 final commons.ApiRequester _requester;
6145
6146 FloodlightConfigurationsResourceApi(commons.ApiRequester client) :
6147 _requester = client;
6148
6149 /**
6150 * Gets one floodlight configuration by ID.
6151 *
6152 * Request parameters:
6153 *
6154 * [profileId] - User profile ID associated with this request.
6155 *
6156 * [id] - Floodlight configuration ID.
6157 *
6158 * Completes with a [FloodlightConfiguration].
6159 *
6160 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6161 * error.
6162 *
6163 * If the used [http.Client] completes with an error when making a REST call,
6164 * this method will complete with the same error.
6165 */
6166 async.Future<FloodlightConfiguration> get(core.String profileId, core.String i d) {
6167 var _url = null;
6168 var _queryParams = new core.Map();
6169 var _uploadMedia = null;
6170 var _uploadOptions = null;
6171 var _downloadOptions = commons.DownloadOptions.Metadata;
6172 var _body = null;
6173
6174 if (profileId == null) {
6175 throw new core.ArgumentError("Parameter profileId is required.");
6176 }
6177 if (id == null) {
6178 throw new core.ArgumentError("Parameter id is required.");
6179 }
6180
6181 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightConfigurations/' + commons.Escaper.ecapeVariable('$id');
6182
6183 var _response = _requester.request(_url,
6184 "GET",
6185 body: _body,
6186 queryParams: _queryParams,
6187 uploadOptions: _uploadOptions,
6188 uploadMedia: _uploadMedia,
6189 downloadOptions: _downloadOptions);
6190 return _response.then((data) => new FloodlightConfiguration.fromJson(data));
6191 }
6192
6193 /**
6194 * Retrieves a list of floodlight configurations, possibly filtered.
6195 *
6196 * Request parameters:
6197 *
6198 * [profileId] - User profile ID associated with this request.
6199 *
6200 * [ids] - Set of IDs of floodlight configurations to retrieve. Required
6201 * field; otherwise an empty list will be returned.
6202 *
6203 * Completes with a [FloodlightConfigurationsListResponse].
6204 *
6205 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6206 * error.
6207 *
6208 * If the used [http.Client] completes with an error when making a REST call,
6209 * this method will complete with the same error.
6210 */
6211 async.Future<FloodlightConfigurationsListResponse> list(core.String profileId, {core.List<core.String> ids}) {
6212 var _url = null;
6213 var _queryParams = new core.Map();
6214 var _uploadMedia = null;
6215 var _uploadOptions = null;
6216 var _downloadOptions = commons.DownloadOptions.Metadata;
6217 var _body = null;
6218
6219 if (profileId == null) {
6220 throw new core.ArgumentError("Parameter profileId is required.");
6221 }
6222 if (ids != null) {
6223 _queryParams["ids"] = ids;
6224 }
6225
6226 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightConfigurations';
6227
6228 var _response = _requester.request(_url,
6229 "GET",
6230 body: _body,
6231 queryParams: _queryParams,
6232 uploadOptions: _uploadOptions,
6233 uploadMedia: _uploadMedia,
6234 downloadOptions: _downloadOptions);
6235 return _response.then((data) => new FloodlightConfigurationsListResponse.fro mJson(data));
6236 }
6237
6238 /**
6239 * Updates an existing floodlight configuration. This method supports patch
6240 * semantics.
6241 *
6242 * [request] - The metadata request object.
6243 *
6244 * Request parameters:
6245 *
6246 * [profileId] - User profile ID associated with this request.
6247 *
6248 * [id] - Floodlight configuration ID.
6249 *
6250 * Completes with a [FloodlightConfiguration].
6251 *
6252 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6253 * error.
6254 *
6255 * If the used [http.Client] completes with an error when making a REST call,
6256 * this method will complete with the same error.
6257 */
6258 async.Future<FloodlightConfiguration> patch(FloodlightConfiguration request, c ore.String profileId, core.String id) {
6259 var _url = null;
6260 var _queryParams = new core.Map();
6261 var _uploadMedia = null;
6262 var _uploadOptions = null;
6263 var _downloadOptions = commons.DownloadOptions.Metadata;
6264 var _body = null;
6265
6266 if (request != null) {
6267 _body = convert.JSON.encode((request).toJson());
6268 }
6269 if (profileId == null) {
6270 throw new core.ArgumentError("Parameter profileId is required.");
6271 }
6272 if (id == null) {
6273 throw new core.ArgumentError("Parameter id is required.");
6274 }
6275 _queryParams["id"] = [id];
6276
6277 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightConfigurations';
6278
6279 var _response = _requester.request(_url,
6280 "PATCH",
6281 body: _body,
6282 queryParams: _queryParams,
6283 uploadOptions: _uploadOptions,
6284 uploadMedia: _uploadMedia,
6285 downloadOptions: _downloadOptions);
6286 return _response.then((data) => new FloodlightConfiguration.fromJson(data));
6287 }
6288
6289 /**
6290 * Updates an existing floodlight configuration.
6291 *
6292 * [request] - The metadata request object.
6293 *
6294 * Request parameters:
6295 *
6296 * [profileId] - User profile ID associated with this request.
6297 *
6298 * Completes with a [FloodlightConfiguration].
6299 *
6300 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6301 * error.
6302 *
6303 * If the used [http.Client] completes with an error when making a REST call,
6304 * this method will complete with the same error.
6305 */
6306 async.Future<FloodlightConfiguration> update(FloodlightConfiguration request, core.String profileId) {
6307 var _url = null;
6308 var _queryParams = new core.Map();
6309 var _uploadMedia = null;
6310 var _uploadOptions = null;
6311 var _downloadOptions = commons.DownloadOptions.Metadata;
6312 var _body = null;
6313
6314 if (request != null) {
6315 _body = convert.JSON.encode((request).toJson());
6316 }
6317 if (profileId == null) {
6318 throw new core.ArgumentError("Parameter profileId is required.");
6319 }
6320
6321 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/flo odlightConfigurations';
6322
6323 var _response = _requester.request(_url,
6324 "PUT",
6325 body: _body,
6326 queryParams: _queryParams,
6327 uploadOptions: _uploadOptions,
6328 uploadMedia: _uploadMedia,
6329 downloadOptions: _downloadOptions);
6330 return _response.then((data) => new FloodlightConfiguration.fromJson(data));
6331 }
6332
6333 }
6334
6335
6336 class InventoryItemsResourceApi {
6337 final commons.ApiRequester _requester;
6338
6339 InventoryItemsResourceApi(commons.ApiRequester client) :
6340 _requester = client;
6341
6342 /**
6343 * Gets one inventory item by ID.
6344 *
6345 * Request parameters:
6346 *
6347 * [profileId] - User profile ID associated with this request.
6348 *
6349 * [projectId] - Project ID for order documents.
6350 *
6351 * [id] - Inventory item ID.
6352 *
6353 * Completes with a [InventoryItem].
6354 *
6355 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6356 * error.
6357 *
6358 * If the used [http.Client] completes with an error when making a REST call,
6359 * this method will complete with the same error.
6360 */
6361 async.Future<InventoryItem> get(core.String profileId, core.String projectId, core.String id) {
6362 var _url = null;
6363 var _queryParams = new core.Map();
6364 var _uploadMedia = null;
6365 var _uploadOptions = null;
6366 var _downloadOptions = commons.DownloadOptions.Metadata;
6367 var _body = null;
6368
6369 if (profileId == null) {
6370 throw new core.ArgumentError("Parameter profileId is required.");
6371 }
6372 if (projectId == null) {
6373 throw new core.ArgumentError("Parameter projectId is required.");
6374 }
6375 if (id == null) {
6376 throw new core.ArgumentError("Parameter id is required.");
6377 }
6378
6379 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro jects/' + commons.Escaper.ecapeVariable('$projectId') + '/inventoryItems/' + com mons.Escaper.ecapeVariable('$id');
6380
6381 var _response = _requester.request(_url,
6382 "GET",
6383 body: _body,
6384 queryParams: _queryParams,
6385 uploadOptions: _uploadOptions,
6386 uploadMedia: _uploadMedia,
6387 downloadOptions: _downloadOptions);
6388 return _response.then((data) => new InventoryItem.fromJson(data));
6389 }
6390
6391 /**
6392 * Retrieves a list of inventory items, possibly filtered. This method
6393 * supports paging.
6394 *
6395 * Request parameters:
6396 *
6397 * [profileId] - User profile ID associated with this request.
6398 *
6399 * [projectId] - Project ID for order documents.
6400 *
6401 * [ids] - Select only inventory items with these IDs.
6402 *
6403 * [inPlan] - Select only inventory items that are in plan.
6404 *
6405 * [maxResults] - Maximum number of results to return.
6406 *
6407 * [orderId] - Select only inventory items that belong to specified orders.
6408 *
6409 * [pageToken] - Value of the nextPageToken from the previous result page.
6410 *
6411 * [siteId] - Select only inventory items that are associated with these
6412 * sites.
6413 *
6414 * [sortField] - Field by which to sort the list.
6415 * Possible string values are:
6416 * - "ID"
6417 * - "NAME"
6418 *
6419 * [sortOrder] - Order of sorted results, default is ASCENDING.
6420 * Possible string values are:
6421 * - "ASCENDING"
6422 * - "DESCENDING"
6423 *
6424 * [type] - Select only inventory items with this type.
6425 * Possible string values are:
6426 * - "PLANNING_PLACEMENT_TYPE_CREDIT"
6427 * - "PLANNING_PLACEMENT_TYPE_REGULAR"
6428 *
6429 * Completes with a [InventoryItemsListResponse].
6430 *
6431 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6432 * error.
6433 *
6434 * If the used [http.Client] completes with an error when making a REST call,
6435 * this method will complete with the same error.
6436 */
6437 async.Future<InventoryItemsListResponse> list(core.String profileId, core.Stri ng projectId, {core.List<core.String> ids, core.bool inPlan, core.int maxResults , core.List<core.String> orderId, core.String pageToken, core.List<core.String> siteId, core.String sortField, core.String sortOrder, core.String type}) {
6438 var _url = null;
6439 var _queryParams = new core.Map();
6440 var _uploadMedia = null;
6441 var _uploadOptions = null;
6442 var _downloadOptions = commons.DownloadOptions.Metadata;
6443 var _body = null;
6444
6445 if (profileId == null) {
6446 throw new core.ArgumentError("Parameter profileId is required.");
6447 }
6448 if (projectId == null) {
6449 throw new core.ArgumentError("Parameter projectId is required.");
6450 }
6451 if (ids != null) {
6452 _queryParams["ids"] = ids;
6453 }
6454 if (inPlan != null) {
6455 _queryParams["inPlan"] = ["${inPlan}"];
6456 }
6457 if (maxResults != null) {
6458 _queryParams["maxResults"] = ["${maxResults}"];
6459 }
6460 if (orderId != null) {
6461 _queryParams["orderId"] = orderId;
6462 }
6463 if (pageToken != null) {
6464 _queryParams["pageToken"] = [pageToken];
6465 }
6466 if (siteId != null) {
6467 _queryParams["siteId"] = siteId;
6468 }
6469 if (sortField != null) {
6470 _queryParams["sortField"] = [sortField];
6471 }
6472 if (sortOrder != null) {
6473 _queryParams["sortOrder"] = [sortOrder];
6474 }
6475 if (type != null) {
6476 _queryParams["type"] = [type];
6477 }
6478
6479 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro jects/' + commons.Escaper.ecapeVariable('$projectId') + '/inventoryItems';
6480
6481 var _response = _requester.request(_url,
6482 "GET",
6483 body: _body,
6484 queryParams: _queryParams,
6485 uploadOptions: _uploadOptions,
6486 uploadMedia: _uploadMedia,
6487 downloadOptions: _downloadOptions);
6488 return _response.then((data) => new InventoryItemsListResponse.fromJson(data ));
6489 }
6490
6491 }
6492
6493
6494 class LandingPagesResourceApi {
6495 final commons.ApiRequester _requester;
6496
6497 LandingPagesResourceApi(commons.ApiRequester client) :
6498 _requester = client;
6499
6500 /**
6501 * Deletes an existing campaign landing page.
6502 *
6503 * Request parameters:
6504 *
6505 * [profileId] - User profile ID associated with this request.
6506 *
6507 * [campaignId] - Landing page campaign ID.
6508 *
6509 * [id] - Landing page ID.
6510 *
6511 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6512 * error.
6513 *
6514 * If the used [http.Client] completes with an error when making a REST call,
6515 * this method will complete with the same error.
6516 */
6517 async.Future delete(core.String profileId, core.String campaignId, core.String id) {
6518 var _url = null;
6519 var _queryParams = new core.Map();
6520 var _uploadMedia = null;
6521 var _uploadOptions = null;
6522 var _downloadOptions = commons.DownloadOptions.Metadata;
6523 var _body = null;
6524
6525 if (profileId == null) {
6526 throw new core.ArgumentError("Parameter profileId is required.");
6527 }
6528 if (campaignId == null) {
6529 throw new core.ArgumentError("Parameter campaignId is required.");
6530 }
6531 if (id == null) {
6532 throw new core.ArgumentError("Parameter id is required.");
6533 }
6534
6535 _downloadOptions = null;
6536
6537 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages/' + com mons.Escaper.ecapeVariable('$id');
6538
6539 var _response = _requester.request(_url,
6540 "DELETE",
6541 body: _body,
6542 queryParams: _queryParams,
6543 uploadOptions: _uploadOptions,
6544 uploadMedia: _uploadMedia,
6545 downloadOptions: _downloadOptions);
6546 return _response.then((data) => null);
6547 }
6548
6549 /**
6550 * Gets one campaign landing page by ID.
6551 *
6552 * Request parameters:
6553 *
6554 * [profileId] - User profile ID associated with this request.
6555 *
6556 * [campaignId] - Landing page campaign ID.
6557 *
6558 * [id] - Landing page ID.
6559 *
6560 * Completes with a [LandingPage].
6561 *
6562 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6563 * error.
6564 *
6565 * If the used [http.Client] completes with an error when making a REST call,
6566 * this method will complete with the same error.
6567 */
6568 async.Future<LandingPage> get(core.String profileId, core.String campaignId, c ore.String id) {
6569 var _url = null;
6570 var _queryParams = new core.Map();
6571 var _uploadMedia = null;
6572 var _uploadOptions = null;
6573 var _downloadOptions = commons.DownloadOptions.Metadata;
6574 var _body = null;
6575
6576 if (profileId == null) {
6577 throw new core.ArgumentError("Parameter profileId is required.");
6578 }
6579 if (campaignId == null) {
6580 throw new core.ArgumentError("Parameter campaignId is required.");
6581 }
6582 if (id == null) {
6583 throw new core.ArgumentError("Parameter id is required.");
6584 }
6585
6586 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages/' + com mons.Escaper.ecapeVariable('$id');
6587
6588 var _response = _requester.request(_url,
6589 "GET",
6590 body: _body,
6591 queryParams: _queryParams,
6592 uploadOptions: _uploadOptions,
6593 uploadMedia: _uploadMedia,
6594 downloadOptions: _downloadOptions);
6595 return _response.then((data) => new LandingPage.fromJson(data));
6596 }
6597
6598 /**
6599 * Inserts a new landing page for the specified campaign.
6600 *
6601 * [request] - The metadata request object.
6602 *
6603 * Request parameters:
6604 *
6605 * [profileId] - User profile ID associated with this request.
6606 *
6607 * [campaignId] - Landing page campaign ID.
6608 *
6609 * Completes with a [LandingPage].
6610 *
6611 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6612 * error.
6613 *
6614 * If the used [http.Client] completes with an error when making a REST call,
6615 * this method will complete with the same error.
6616 */
6617 async.Future<LandingPage> insert(LandingPage request, core.String profileId, c ore.String campaignId) {
6618 var _url = null;
6619 var _queryParams = new core.Map();
6620 var _uploadMedia = null;
6621 var _uploadOptions = null;
6622 var _downloadOptions = commons.DownloadOptions.Metadata;
6623 var _body = null;
6624
6625 if (request != null) {
6626 _body = convert.JSON.encode((request).toJson());
6627 }
6628 if (profileId == null) {
6629 throw new core.ArgumentError("Parameter profileId is required.");
6630 }
6631 if (campaignId == null) {
6632 throw new core.ArgumentError("Parameter campaignId is required.");
6633 }
6634
6635 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages';
6636
6637 var _response = _requester.request(_url,
6638 "POST",
6639 body: _body,
6640 queryParams: _queryParams,
6641 uploadOptions: _uploadOptions,
6642 uploadMedia: _uploadMedia,
6643 downloadOptions: _downloadOptions);
6644 return _response.then((data) => new LandingPage.fromJson(data));
6645 }
6646
6647 /**
6648 * Retrieves the list of landing pages for the specified campaign.
6649 *
6650 * Request parameters:
6651 *
6652 * [profileId] - User profile ID associated with this request.
6653 *
6654 * [campaignId] - Landing page campaign ID.
6655 *
6656 * Completes with a [LandingPagesListResponse].
6657 *
6658 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6659 * error.
6660 *
6661 * If the used [http.Client] completes with an error when making a REST call,
6662 * this method will complete with the same error.
6663 */
6664 async.Future<LandingPagesListResponse> list(core.String profileId, core.String campaignId) {
6665 var _url = null;
6666 var _queryParams = new core.Map();
6667 var _uploadMedia = null;
6668 var _uploadOptions = null;
6669 var _downloadOptions = commons.DownloadOptions.Metadata;
6670 var _body = null;
6671
6672 if (profileId == null) {
6673 throw new core.ArgumentError("Parameter profileId is required.");
6674 }
6675 if (campaignId == null) {
6676 throw new core.ArgumentError("Parameter campaignId is required.");
6677 }
6678
6679 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages';
6680
6681 var _response = _requester.request(_url,
6682 "GET",
6683 body: _body,
6684 queryParams: _queryParams,
6685 uploadOptions: _uploadOptions,
6686 uploadMedia: _uploadMedia,
6687 downloadOptions: _downloadOptions);
6688 return _response.then((data) => new LandingPagesListResponse.fromJson(data)) ;
6689 }
6690
6691 /**
6692 * Updates an existing campaign landing page. This method supports patch
6693 * semantics.
6694 *
6695 * [request] - The metadata request object.
6696 *
6697 * Request parameters:
6698 *
6699 * [profileId] - User profile ID associated with this request.
6700 *
6701 * [campaignId] - Landing page campaign ID.
6702 *
6703 * [id] - Landing page ID.
6704 *
6705 * Completes with a [LandingPage].
6706 *
6707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6708 * error.
6709 *
6710 * If the used [http.Client] completes with an error when making a REST call,
6711 * this method will complete with the same error.
6712 */
6713 async.Future<LandingPage> patch(LandingPage request, core.String profileId, co re.String campaignId, core.String id) {
6714 var _url = null;
6715 var _queryParams = new core.Map();
6716 var _uploadMedia = null;
6717 var _uploadOptions = null;
6718 var _downloadOptions = commons.DownloadOptions.Metadata;
6719 var _body = null;
6720
6721 if (request != null) {
6722 _body = convert.JSON.encode((request).toJson());
6723 }
6724 if (profileId == null) {
6725 throw new core.ArgumentError("Parameter profileId is required.");
6726 }
6727 if (campaignId == null) {
6728 throw new core.ArgumentError("Parameter campaignId is required.");
6729 }
6730 if (id == null) {
6731 throw new core.ArgumentError("Parameter id is required.");
6732 }
6733 _queryParams["id"] = [id];
6734
6735 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages';
6736
6737 var _response = _requester.request(_url,
6738 "PATCH",
6739 body: _body,
6740 queryParams: _queryParams,
6741 uploadOptions: _uploadOptions,
6742 uploadMedia: _uploadMedia,
6743 downloadOptions: _downloadOptions);
6744 return _response.then((data) => new LandingPage.fromJson(data));
6745 }
6746
6747 /**
6748 * Updates an existing campaign landing page.
6749 *
6750 * [request] - The metadata request object.
6751 *
6752 * Request parameters:
6753 *
6754 * [profileId] - User profile ID associated with this request.
6755 *
6756 * [campaignId] - Landing page campaign ID.
6757 *
6758 * Completes with a [LandingPage].
6759 *
6760 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6761 * error.
6762 *
6763 * If the used [http.Client] completes with an error when making a REST call,
6764 * this method will complete with the same error.
6765 */
6766 async.Future<LandingPage> update(LandingPage request, core.String profileId, c ore.String campaignId) {
6767 var _url = null;
6768 var _queryParams = new core.Map();
6769 var _uploadMedia = null;
6770 var _uploadOptions = null;
6771 var _downloadOptions = commons.DownloadOptions.Metadata;
6772 var _body = null;
6773
6774 if (request != null) {
6775 _body = convert.JSON.encode((request).toJson());
6776 }
6777 if (profileId == null) {
6778 throw new core.ArgumentError("Parameter profileId is required.");
6779 }
6780 if (campaignId == null) {
6781 throw new core.ArgumentError("Parameter campaignId is required.");
6782 }
6783
6784 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/cam paigns/' + commons.Escaper.ecapeVariable('$campaignId') + '/landingPages';
6785
6786 var _response = _requester.request(_url,
6787 "PUT",
6788 body: _body,
6789 queryParams: _queryParams,
6790 uploadOptions: _uploadOptions,
6791 uploadMedia: _uploadMedia,
6792 downloadOptions: _downloadOptions);
6793 return _response.then((data) => new LandingPage.fromJson(data));
6794 }
6795
6796 }
6797
6798
6799 class MetrosResourceApi {
6800 final commons.ApiRequester _requester;
6801
6802 MetrosResourceApi(commons.ApiRequester client) :
6803 _requester = client;
6804
6805 /**
6806 * Retrieves a list of metros.
6807 *
6808 * Request parameters:
6809 *
6810 * [profileId] - User profile ID associated with this request.
6811 *
6812 * Completes with a [MetrosListResponse].
6813 *
6814 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6815 * error.
6816 *
6817 * If the used [http.Client] completes with an error when making a REST call,
6818 * this method will complete with the same error.
6819 */
6820 async.Future<MetrosListResponse> list(core.String profileId) {
6821 var _url = null;
6822 var _queryParams = new core.Map();
6823 var _uploadMedia = null;
6824 var _uploadOptions = null;
6825 var _downloadOptions = commons.DownloadOptions.Metadata;
6826 var _body = null;
6827
6828 if (profileId == null) {
6829 throw new core.ArgumentError("Parameter profileId is required.");
6830 }
6831
6832 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/met ros';
6833
6834 var _response = _requester.request(_url,
6835 "GET",
6836 body: _body,
6837 queryParams: _queryParams,
6838 uploadOptions: _uploadOptions,
6839 uploadMedia: _uploadMedia,
6840 downloadOptions: _downloadOptions);
6841 return _response.then((data) => new MetrosListResponse.fromJson(data));
6842 }
6843
6844 }
6845
6846
6847 class MobileCarriersResourceApi {
6848 final commons.ApiRequester _requester;
6849
6850 MobileCarriersResourceApi(commons.ApiRequester client) :
6851 _requester = client;
6852
6853 /**
6854 * Gets one mobile carrier by ID.
6855 *
6856 * Request parameters:
6857 *
6858 * [profileId] - User profile ID associated with this request.
6859 *
6860 * [id] - Mobile carrier ID.
6861 *
6862 * Completes with a [MobileCarrier].
6863 *
6864 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6865 * error.
6866 *
6867 * If the used [http.Client] completes with an error when making a REST call,
6868 * this method will complete with the same error.
6869 */
6870 async.Future<MobileCarrier> get(core.String profileId, core.String id) {
6871 var _url = null;
6872 var _queryParams = new core.Map();
6873 var _uploadMedia = null;
6874 var _uploadOptions = null;
6875 var _downloadOptions = commons.DownloadOptions.Metadata;
6876 var _body = null;
6877
6878 if (profileId == null) {
6879 throw new core.ArgumentError("Parameter profileId is required.");
6880 }
6881 if (id == null) {
6882 throw new core.ArgumentError("Parameter id is required.");
6883 }
6884
6885 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/mob ileCarriers/' + commons.Escaper.ecapeVariable('$id');
6886
6887 var _response = _requester.request(_url,
6888 "GET",
6889 body: _body,
6890 queryParams: _queryParams,
6891 uploadOptions: _uploadOptions,
6892 uploadMedia: _uploadMedia,
6893 downloadOptions: _downloadOptions);
6894 return _response.then((data) => new MobileCarrier.fromJson(data));
6895 }
6896
6897 /**
6898 * Retrieves a list of mobile carriers.
6899 *
6900 * Request parameters:
6901 *
6902 * [profileId] - User profile ID associated with this request.
6903 *
6904 * Completes with a [MobileCarriersListResponse].
6905 *
6906 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6907 * error.
6908 *
6909 * If the used [http.Client] completes with an error when making a REST call,
6910 * this method will complete with the same error.
6911 */
6912 async.Future<MobileCarriersListResponse> list(core.String profileId) {
6913 var _url = null;
6914 var _queryParams = new core.Map();
6915 var _uploadMedia = null;
6916 var _uploadOptions = null;
6917 var _downloadOptions = commons.DownloadOptions.Metadata;
6918 var _body = null;
6919
6920 if (profileId == null) {
6921 throw new core.ArgumentError("Parameter profileId is required.");
6922 }
6923
6924 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/mob ileCarriers';
6925
6926 var _response = _requester.request(_url,
6927 "GET",
6928 body: _body,
6929 queryParams: _queryParams,
6930 uploadOptions: _uploadOptions,
6931 uploadMedia: _uploadMedia,
6932 downloadOptions: _downloadOptions);
6933 return _response.then((data) => new MobileCarriersListResponse.fromJson(data ));
6934 }
6935
6936 }
6937
6938
6939 class OperatingSystemVersionsResourceApi {
6940 final commons.ApiRequester _requester;
6941
6942 OperatingSystemVersionsResourceApi(commons.ApiRequester client) :
6943 _requester = client;
6944
6945 /**
6946 * Gets one operating system version by ID.
6947 *
6948 * Request parameters:
6949 *
6950 * [profileId] - User profile ID associated with this request.
6951 *
6952 * [id] - Operating system version ID.
6953 *
6954 * Completes with a [OperatingSystemVersion].
6955 *
6956 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6957 * error.
6958 *
6959 * If the used [http.Client] completes with an error when making a REST call,
6960 * this method will complete with the same error.
6961 */
6962 async.Future<OperatingSystemVersion> get(core.String profileId, core.String id ) {
6963 var _url = null;
6964 var _queryParams = new core.Map();
6965 var _uploadMedia = null;
6966 var _uploadOptions = null;
6967 var _downloadOptions = commons.DownloadOptions.Metadata;
6968 var _body = null;
6969
6970 if (profileId == null) {
6971 throw new core.ArgumentError("Parameter profileId is required.");
6972 }
6973 if (id == null) {
6974 throw new core.ArgumentError("Parameter id is required.");
6975 }
6976
6977 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ope ratingSystemVersions/' + commons.Escaper.ecapeVariable('$id');
6978
6979 var _response = _requester.request(_url,
6980 "GET",
6981 body: _body,
6982 queryParams: _queryParams,
6983 uploadOptions: _uploadOptions,
6984 uploadMedia: _uploadMedia,
6985 downloadOptions: _downloadOptions);
6986 return _response.then((data) => new OperatingSystemVersion.fromJson(data));
6987 }
6988
6989 /**
6990 * Retrieves a list of operating system versions.
6991 *
6992 * Request parameters:
6993 *
6994 * [profileId] - User profile ID associated with this request.
6995 *
6996 * Completes with a [OperatingSystemVersionsListResponse].
6997 *
6998 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
6999 * error.
7000 *
7001 * If the used [http.Client] completes with an error when making a REST call,
7002 * this method will complete with the same error.
7003 */
7004 async.Future<OperatingSystemVersionsListResponse> list(core.String profileId) {
7005 var _url = null;
7006 var _queryParams = new core.Map();
7007 var _uploadMedia = null;
7008 var _uploadOptions = null;
7009 var _downloadOptions = commons.DownloadOptions.Metadata;
7010 var _body = null;
7011
7012 if (profileId == null) {
7013 throw new core.ArgumentError("Parameter profileId is required.");
7014 }
7015
7016 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ope ratingSystemVersions';
7017
7018 var _response = _requester.request(_url,
7019 "GET",
7020 body: _body,
7021 queryParams: _queryParams,
7022 uploadOptions: _uploadOptions,
7023 uploadMedia: _uploadMedia,
7024 downloadOptions: _downloadOptions);
7025 return _response.then((data) => new OperatingSystemVersionsListResponse.from Json(data));
7026 }
7027
7028 }
7029
7030
7031 class OperatingSystemsResourceApi {
7032 final commons.ApiRequester _requester;
7033
7034 OperatingSystemsResourceApi(commons.ApiRequester client) :
7035 _requester = client;
7036
7037 /**
7038 * Gets one operating system by DART ID.
7039 *
7040 * Request parameters:
7041 *
7042 * [profileId] - User profile ID associated with this request.
7043 *
7044 * [dartId] - Operating system DART ID.
7045 *
7046 * Completes with a [OperatingSystem].
7047 *
7048 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7049 * error.
7050 *
7051 * If the used [http.Client] completes with an error when making a REST call,
7052 * this method will complete with the same error.
7053 */
7054 async.Future<OperatingSystem> get(core.String profileId, core.String dartId) {
7055 var _url = null;
7056 var _queryParams = new core.Map();
7057 var _uploadMedia = null;
7058 var _uploadOptions = null;
7059 var _downloadOptions = commons.DownloadOptions.Metadata;
7060 var _body = null;
7061
7062 if (profileId == null) {
7063 throw new core.ArgumentError("Parameter profileId is required.");
7064 }
7065 if (dartId == null) {
7066 throw new core.ArgumentError("Parameter dartId is required.");
7067 }
7068
7069 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ope ratingSystems/' + commons.Escaper.ecapeVariable('$dartId');
7070
7071 var _response = _requester.request(_url,
7072 "GET",
7073 body: _body,
7074 queryParams: _queryParams,
7075 uploadOptions: _uploadOptions,
7076 uploadMedia: _uploadMedia,
7077 downloadOptions: _downloadOptions);
7078 return _response.then((data) => new OperatingSystem.fromJson(data));
7079 }
7080
7081 /**
7082 * Retrieves a list of operating systems.
7083 *
7084 * Request parameters:
7085 *
7086 * [profileId] - User profile ID associated with this request.
7087 *
7088 * Completes with a [OperatingSystemsListResponse].
7089 *
7090 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7091 * error.
7092 *
7093 * If the used [http.Client] completes with an error when making a REST call,
7094 * this method will complete with the same error.
7095 */
7096 async.Future<OperatingSystemsListResponse> list(core.String profileId) {
7097 var _url = null;
7098 var _queryParams = new core.Map();
7099 var _uploadMedia = null;
7100 var _uploadOptions = null;
7101 var _downloadOptions = commons.DownloadOptions.Metadata;
7102 var _body = null;
7103
7104 if (profileId == null) {
7105 throw new core.ArgumentError("Parameter profileId is required.");
7106 }
7107
7108 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/ope ratingSystems';
7109
7110 var _response = _requester.request(_url,
7111 "GET",
7112 body: _body,
7113 queryParams: _queryParams,
7114 uploadOptions: _uploadOptions,
7115 uploadMedia: _uploadMedia,
7116 downloadOptions: _downloadOptions);
7117 return _response.then((data) => new OperatingSystemsListResponse.fromJson(da ta));
7118 }
7119
7120 }
7121
7122
7123 class OrderDocumentsResourceApi {
7124 final commons.ApiRequester _requester;
7125
7126 OrderDocumentsResourceApi(commons.ApiRequester client) :
7127 _requester = client;
7128
7129 /**
7130 * Gets one order document by ID.
7131 *
7132 * Request parameters:
7133 *
7134 * [profileId] - User profile ID associated with this request.
7135 *
7136 * [projectId] - Project ID for order documents.
7137 *
7138 * [id] - Order document ID.
7139 *
7140 * Completes with a [OrderDocument].
7141 *
7142 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7143 * error.
7144 *
7145 * If the used [http.Client] completes with an error when making a REST call,
7146 * this method will complete with the same error.
7147 */
7148 async.Future<OrderDocument> get(core.String profileId, core.String projectId, core.String id) {
7149 var _url = null;
7150 var _queryParams = new core.Map();
7151 var _uploadMedia = null;
7152 var _uploadOptions = null;
7153 var _downloadOptions = commons.DownloadOptions.Metadata;
7154 var _body = null;
7155
7156 if (profileId == null) {
7157 throw new core.ArgumentError("Parameter profileId is required.");
7158 }
7159 if (projectId == null) {
7160 throw new core.ArgumentError("Parameter projectId is required.");
7161 }
7162 if (id == null) {
7163 throw new core.ArgumentError("Parameter id is required.");
7164 }
7165
7166 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro jects/' + commons.Escaper.ecapeVariable('$projectId') + '/orderDocuments/' + com mons.Escaper.ecapeVariable('$id');
7167
7168 var _response = _requester.request(_url,
7169 "GET",
7170 body: _body,
7171 queryParams: _queryParams,
7172 uploadOptions: _uploadOptions,
7173 uploadMedia: _uploadMedia,
7174 downloadOptions: _downloadOptions);
7175 return _response.then((data) => new OrderDocument.fromJson(data));
7176 }
7177
7178 /**
7179 * Retrieves a list of order documents, possibly filtered. This method
7180 * supports paging.
7181 *
7182 * Request parameters:
7183 *
7184 * [profileId] - User profile ID associated with this request.
7185 *
7186 * [projectId] - Project ID for order documents.
7187 *
7188 * [approved] - Select only order documents that have been approved by at
7189 * least one user.
7190 *
7191 * [ids] - Select only order documents with these IDs.
7192 *
7193 * [maxResults] - Maximum number of results to return.
7194 *
7195 * [orderId] - Select only order documents for specified orders.
7196 *
7197 * [pageToken] - Value of the nextPageToken from the previous result page.
7198 *
7199 * [searchString] - Allows searching for order documents by name or ID.
7200 * Wildcards (*) are allowed. For example, "orderdocument*2015" will return
7201 * order documents with names like "orderdocument June 2015", "orderdocument
7202 * April 2015", or simply "orderdocument 2015". Most of the searches also add
7203 * wildcards implicitly at the start and the end of the search string. For
7204 * example, a search string of "orderdocument" will match order documents with
7205 * name "my orderdocument", "orderdocument 2015", or simply "orderdocument".
7206 *
7207 * [siteId] - Select only order documents that are associated with these
7208 * sites.
7209 *
7210 * [sortField] - Field by which to sort the list.
7211 * Possible string values are:
7212 * - "ID"
7213 * - "NAME"
7214 *
7215 * [sortOrder] - Order of sorted results, default is ASCENDING.
7216 * Possible string values are:
7217 * - "ASCENDING"
7218 * - "DESCENDING"
7219 *
7220 * Completes with a [OrderDocumentsListResponse].
7221 *
7222 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7223 * error.
7224 *
7225 * If the used [http.Client] completes with an error when making a REST call,
7226 * this method will complete with the same error.
7227 */
7228 async.Future<OrderDocumentsListResponse> list(core.String profileId, core.Stri ng projectId, {core.bool approved, core.List<core.String> ids, core.int maxResul ts, core.List<core.String> orderId, core.String pageToken, core.String searchStr ing, core.List<core.String> siteId, core.String sortField, core.String sortOrder }) {
7229 var _url = null;
7230 var _queryParams = new core.Map();
7231 var _uploadMedia = null;
7232 var _uploadOptions = null;
7233 var _downloadOptions = commons.DownloadOptions.Metadata;
7234 var _body = null;
7235
7236 if (profileId == null) {
7237 throw new core.ArgumentError("Parameter profileId is required.");
7238 }
7239 if (projectId == null) {
7240 throw new core.ArgumentError("Parameter projectId is required.");
7241 }
7242 if (approved != null) {
7243 _queryParams["approved"] = ["${approved}"];
7244 }
7245 if (ids != null) {
7246 _queryParams["ids"] = ids;
7247 }
7248 if (maxResults != null) {
7249 _queryParams["maxResults"] = ["${maxResults}"];
7250 }
7251 if (orderId != null) {
7252 _queryParams["orderId"] = orderId;
7253 }
7254 if (pageToken != null) {
7255 _queryParams["pageToken"] = [pageToken];
7256 }
7257 if (searchString != null) {
7258 _queryParams["searchString"] = [searchString];
7259 }
7260 if (siteId != null) {
7261 _queryParams["siteId"] = siteId;
7262 }
7263 if (sortField != null) {
7264 _queryParams["sortField"] = [sortField];
7265 }
7266 if (sortOrder != null) {
7267 _queryParams["sortOrder"] = [sortOrder];
7268 }
7269
7270 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro jects/' + commons.Escaper.ecapeVariable('$projectId') + '/orderDocuments';
7271
7272 var _response = _requester.request(_url,
7273 "GET",
7274 body: _body,
7275 queryParams: _queryParams,
7276 uploadOptions: _uploadOptions,
7277 uploadMedia: _uploadMedia,
7278 downloadOptions: _downloadOptions);
7279 return _response.then((data) => new OrderDocumentsListResponse.fromJson(data ));
7280 }
7281
7282 }
7283
7284
7285 class OrdersResourceApi {
7286 final commons.ApiRequester _requester;
7287
7288 OrdersResourceApi(commons.ApiRequester client) :
7289 _requester = client;
7290
7291 /**
7292 * Gets one order by ID.
7293 *
7294 * Request parameters:
7295 *
7296 * [profileId] - User profile ID associated with this request.
7297 *
7298 * [projectId] - Project ID for orders.
7299 *
7300 * [id] - Order ID.
7301 *
7302 * Completes with a [Order].
7303 *
7304 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7305 * error.
7306 *
7307 * If the used [http.Client] completes with an error when making a REST call,
7308 * this method will complete with the same error.
7309 */
7310 async.Future<Order> get(core.String profileId, core.String projectId, core.Str ing id) {
7311 var _url = null;
7312 var _queryParams = new core.Map();
7313 var _uploadMedia = null;
7314 var _uploadOptions = null;
7315 var _downloadOptions = commons.DownloadOptions.Metadata;
7316 var _body = null;
7317
7318 if (profileId == null) {
7319 throw new core.ArgumentError("Parameter profileId is required.");
7320 }
7321 if (projectId == null) {
7322 throw new core.ArgumentError("Parameter projectId is required.");
7323 }
7324 if (id == null) {
7325 throw new core.ArgumentError("Parameter id is required.");
7326 }
7327
7328 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro jects/' + commons.Escaper.ecapeVariable('$projectId') + '/orders/' + commons.Esc aper.ecapeVariable('$id');
7329
7330 var _response = _requester.request(_url,
7331 "GET",
7332 body: _body,
7333 queryParams: _queryParams,
7334 uploadOptions: _uploadOptions,
7335 uploadMedia: _uploadMedia,
7336 downloadOptions: _downloadOptions);
7337 return _response.then((data) => new Order.fromJson(data));
7338 }
7339
7340 /**
7341 * Retrieves a list of orders, possibly filtered. This method supports paging.
7342 *
7343 * Request parameters:
7344 *
7345 * [profileId] - User profile ID associated with this request.
7346 *
7347 * [projectId] - Project ID for orders.
7348 *
7349 * [ids] - Select only orders with these IDs.
7350 *
7351 * [maxResults] - Maximum number of results to return.
7352 *
7353 * [pageToken] - Value of the nextPageToken from the previous result page.
7354 *
7355 * [searchString] - Allows searching for orders by name or ID. Wildcards (*)
7356 * are allowed. For example, "order*2015" will return orders with names like
7357 * "order June 2015", "order April 2015", or simply "order 2015". Most of the
7358 * searches also add wildcards implicitly at the start and the end of the
7359 * search string. For example, a search string of "order" will match orders
7360 * with name "my order", "order 2015", or simply "order".
7361 *
7362 * [siteId] - Select only orders that are associated with these site IDs.
7363 *
7364 * [sortField] - Field by which to sort the list.
7365 * Possible string values are:
7366 * - "ID"
7367 * - "NAME"
7368 *
7369 * [sortOrder] - Order of sorted results, default is ASCENDING.
7370 * Possible string values are:
7371 * - "ASCENDING"
7372 * - "DESCENDING"
7373 *
7374 * Completes with a [OrdersListResponse].
7375 *
7376 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7377 * error.
7378 *
7379 * If the used [http.Client] completes with an error when making a REST call,
7380 * this method will complete with the same error.
7381 */
7382 async.Future<OrdersListResponse> list(core.String profileId, core.String proje ctId, {core.List<core.String> ids, core.int maxResults, core.String pageToken, c ore.String searchString, core.List<core.String> siteId, core.String sortField, c ore.String sortOrder}) {
7383 var _url = null;
7384 var _queryParams = new core.Map();
7385 var _uploadMedia = null;
7386 var _uploadOptions = null;
7387 var _downloadOptions = commons.DownloadOptions.Metadata;
7388 var _body = null;
7389
7390 if (profileId == null) {
7391 throw new core.ArgumentError("Parameter profileId is required.");
7392 }
7393 if (projectId == null) {
7394 throw new core.ArgumentError("Parameter projectId is required.");
7395 }
7396 if (ids != null) {
7397 _queryParams["ids"] = ids;
7398 }
7399 if (maxResults != null) {
7400 _queryParams["maxResults"] = ["${maxResults}"];
7401 }
7402 if (pageToken != null) {
7403 _queryParams["pageToken"] = [pageToken];
7404 }
7405 if (searchString != null) {
7406 _queryParams["searchString"] = [searchString];
7407 }
7408 if (siteId != null) {
7409 _queryParams["siteId"] = siteId;
7410 }
7411 if (sortField != null) {
7412 _queryParams["sortField"] = [sortField];
7413 }
7414 if (sortOrder != null) {
7415 _queryParams["sortOrder"] = [sortOrder];
7416 }
7417
7418 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro jects/' + commons.Escaper.ecapeVariable('$projectId') + '/orders';
7419
7420 var _response = _requester.request(_url,
7421 "GET",
7422 body: _body,
7423 queryParams: _queryParams,
7424 uploadOptions: _uploadOptions,
7425 uploadMedia: _uploadMedia,
7426 downloadOptions: _downloadOptions);
7427 return _response.then((data) => new OrdersListResponse.fromJson(data));
7428 }
7429
7430 }
7431
7432
7433 class PlacementGroupsResourceApi {
7434 final commons.ApiRequester _requester;
7435
7436 PlacementGroupsResourceApi(commons.ApiRequester client) :
7437 _requester = client;
7438
7439 /**
7440 * Gets one placement group by ID.
7441 *
7442 * Request parameters:
7443 *
7444 * [profileId] - User profile ID associated with this request.
7445 *
7446 * [id] - Placement group ID.
7447 *
7448 * Completes with a [PlacementGroup].
7449 *
7450 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7451 * error.
7452 *
7453 * If the used [http.Client] completes with an error when making a REST call,
7454 * this method will complete with the same error.
7455 */
7456 async.Future<PlacementGroup> get(core.String profileId, core.String id) {
7457 var _url = null;
7458 var _queryParams = new core.Map();
7459 var _uploadMedia = null;
7460 var _uploadOptions = null;
7461 var _downloadOptions = commons.DownloadOptions.Metadata;
7462 var _body = null;
7463
7464 if (profileId == null) {
7465 throw new core.ArgumentError("Parameter profileId is required.");
7466 }
7467 if (id == null) {
7468 throw new core.ArgumentError("Parameter id is required.");
7469 }
7470
7471 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementGroups/' + commons.Escaper.ecapeVariable('$id');
7472
7473 var _response = _requester.request(_url,
7474 "GET",
7475 body: _body,
7476 queryParams: _queryParams,
7477 uploadOptions: _uploadOptions,
7478 uploadMedia: _uploadMedia,
7479 downloadOptions: _downloadOptions);
7480 return _response.then((data) => new PlacementGroup.fromJson(data));
7481 }
7482
7483 /**
7484 * Inserts a new placement group.
7485 *
7486 * [request] - The metadata request object.
7487 *
7488 * Request parameters:
7489 *
7490 * [profileId] - User profile ID associated with this request.
7491 *
7492 * Completes with a [PlacementGroup].
7493 *
7494 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7495 * error.
7496 *
7497 * If the used [http.Client] completes with an error when making a REST call,
7498 * this method will complete with the same error.
7499 */
7500 async.Future<PlacementGroup> insert(PlacementGroup request, core.String profil eId) {
7501 var _url = null;
7502 var _queryParams = new core.Map();
7503 var _uploadMedia = null;
7504 var _uploadOptions = null;
7505 var _downloadOptions = commons.DownloadOptions.Metadata;
7506 var _body = null;
7507
7508 if (request != null) {
7509 _body = convert.JSON.encode((request).toJson());
7510 }
7511 if (profileId == null) {
7512 throw new core.ArgumentError("Parameter profileId is required.");
7513 }
7514
7515 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementGroups';
7516
7517 var _response = _requester.request(_url,
7518 "POST",
7519 body: _body,
7520 queryParams: _queryParams,
7521 uploadOptions: _uploadOptions,
7522 uploadMedia: _uploadMedia,
7523 downloadOptions: _downloadOptions);
7524 return _response.then((data) => new PlacementGroup.fromJson(data));
7525 }
7526
7527 /**
7528 * Retrieves a list of placement groups, possibly filtered. This method
7529 * supports paging.
7530 *
7531 * Request parameters:
7532 *
7533 * [profileId] - User profile ID associated with this request.
7534 *
7535 * [advertiserIds] - Select only placement groups that belong to these
7536 * advertisers.
7537 *
7538 * [archived] - Select only archived placements. Don't set this field to
7539 * select both archived and non-archived placements.
7540 *
7541 * [campaignIds] - Select only placement groups that belong to these
7542 * campaigns.
7543 *
7544 * [contentCategoryIds] - Select only placement groups that are associated
7545 * with these content categories.
7546 *
7547 * [directorySiteIds] - Select only placement groups that are associated with
7548 * these directory sites.
7549 *
7550 * [ids] - Select only placement groups with these IDs.
7551 *
7552 * [maxEndDate] - Select only placements or placement groups whose end date is
7553 * on or before the specified maxEndDate. The date should be formatted as
7554 * "yyyy-MM-dd".
7555 *
7556 * [maxResults] - Maximum number of results to return.
7557 *
7558 * [maxStartDate] - Select only placements or placement groups whose start
7559 * date is on or before the specified maxStartDate. The date should be
7560 * formatted as "yyyy-MM-dd".
7561 *
7562 * [minEndDate] - Select only placements or placement groups whose end date is
7563 * on or after the specified minEndDate. The date should be formatted as
7564 * "yyyy-MM-dd".
7565 *
7566 * [minStartDate] - Select only placements or placement groups whose start
7567 * date is on or after the specified minStartDate. The date should be
7568 * formatted as "yyyy-MM-dd".
7569 *
7570 * [pageToken] - Value of the nextPageToken from the previous result page.
7571 *
7572 * [placementGroupType] - Select only placement groups belonging with this
7573 * group type. A package is a simple group of placements that acts as a single
7574 * pricing point for a group of tags. A roadblock is a group of placements
7575 * that not only acts as a single pricing point but also assumes that all the
7576 * tags in it will be served at the same time. A roadblock requires one of its
7577 * assigned placements to be marked as primary for reporting.
7578 * Possible string values are:
7579 * - "PLACEMENT_PACKAGE"
7580 * - "PLACEMENT_ROADBLOCK"
7581 *
7582 * [placementStrategyIds] - Select only placement groups that are associated
7583 * with these placement strategies.
7584 *
7585 * [pricingTypes] - Select only placement groups with these pricing types.
7586 *
7587 * [searchString] - Allows searching for placement groups by name or ID.
7588 * Wildcards (*) are allowed. For example, "placement*2015" will return
7589 * placement groups with names like "placement group June 2015", "placement
7590 * group May 2015", or simply "placements 2015". Most of the searches also add
7591 * wildcards implicitly at the start and the end of the search string. For
7592 * example, a search string of "placementgroup" will match placement groups
7593 * with name "my placementgroup", "placementgroup 2015", or simply
7594 * "placementgroup".
7595 *
7596 * [siteIds] - Select only placement groups that are associated with these
7597 * sites.
7598 *
7599 * [sortField] - Field by which to sort the list.
7600 * Possible string values are:
7601 * - "ID"
7602 * - "NAME"
7603 *
7604 * [sortOrder] - Order of sorted results, default is ASCENDING.
7605 * Possible string values are:
7606 * - "ASCENDING"
7607 * - "DESCENDING"
7608 *
7609 * Completes with a [PlacementGroupsListResponse].
7610 *
7611 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7612 * error.
7613 *
7614 * If the used [http.Client] completes with an error when making a REST call,
7615 * this method will complete with the same error.
7616 */
7617 async.Future<PlacementGroupsListResponse> list(core.String profileId, {core.Li st<core.String> advertiserIds, core.bool archived, core.List<core.String> campai gnIds, core.List<core.String> contentCategoryIds, core.List<core.String> directo rySiteIds, core.List<core.String> ids, core.String maxEndDate, core.int maxResul ts, core.String maxStartDate, core.String minEndDate, core.String minStartDate, core.String pageToken, core.String placementGroupType, core.List<core.String> pl acementStrategyIds, core.List<core.String> pricingTypes, core.String searchStrin g, core.List<core.String> siteIds, core.String sortField, core.String sortOrder} ) {
7618 var _url = null;
7619 var _queryParams = new core.Map();
7620 var _uploadMedia = null;
7621 var _uploadOptions = null;
7622 var _downloadOptions = commons.DownloadOptions.Metadata;
7623 var _body = null;
7624
7625 if (profileId == null) {
7626 throw new core.ArgumentError("Parameter profileId is required.");
7627 }
7628 if (advertiserIds != null) {
7629 _queryParams["advertiserIds"] = advertiserIds;
7630 }
7631 if (archived != null) {
7632 _queryParams["archived"] = ["${archived}"];
7633 }
7634 if (campaignIds != null) {
7635 _queryParams["campaignIds"] = campaignIds;
7636 }
7637 if (contentCategoryIds != null) {
7638 _queryParams["contentCategoryIds"] = contentCategoryIds;
7639 }
7640 if (directorySiteIds != null) {
7641 _queryParams["directorySiteIds"] = directorySiteIds;
7642 }
7643 if (ids != null) {
7644 _queryParams["ids"] = ids;
7645 }
7646 if (maxEndDate != null) {
7647 _queryParams["maxEndDate"] = [maxEndDate];
7648 }
7649 if (maxResults != null) {
7650 _queryParams["maxResults"] = ["${maxResults}"];
7651 }
7652 if (maxStartDate != null) {
7653 _queryParams["maxStartDate"] = [maxStartDate];
7654 }
7655 if (minEndDate != null) {
7656 _queryParams["minEndDate"] = [minEndDate];
7657 }
7658 if (minStartDate != null) {
7659 _queryParams["minStartDate"] = [minStartDate];
7660 }
7661 if (pageToken != null) {
7662 _queryParams["pageToken"] = [pageToken];
7663 }
7664 if (placementGroupType != null) {
7665 _queryParams["placementGroupType"] = [placementGroupType];
7666 }
7667 if (placementStrategyIds != null) {
7668 _queryParams["placementStrategyIds"] = placementStrategyIds;
7669 }
7670 if (pricingTypes != null) {
7671 _queryParams["pricingTypes"] = pricingTypes;
7672 }
7673 if (searchString != null) {
7674 _queryParams["searchString"] = [searchString];
7675 }
7676 if (siteIds != null) {
7677 _queryParams["siteIds"] = siteIds;
7678 }
7679 if (sortField != null) {
7680 _queryParams["sortField"] = [sortField];
7681 }
7682 if (sortOrder != null) {
7683 _queryParams["sortOrder"] = [sortOrder];
7684 }
7685
7686 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementGroups';
7687
7688 var _response = _requester.request(_url,
7689 "GET",
7690 body: _body,
7691 queryParams: _queryParams,
7692 uploadOptions: _uploadOptions,
7693 uploadMedia: _uploadMedia,
7694 downloadOptions: _downloadOptions);
7695 return _response.then((data) => new PlacementGroupsListResponse.fromJson(dat a));
7696 }
7697
7698 /**
7699 * Updates an existing placement group. This method supports patch semantics.
7700 *
7701 * [request] - The metadata request object.
7702 *
7703 * Request parameters:
7704 *
7705 * [profileId] - User profile ID associated with this request.
7706 *
7707 * [id] - Placement group ID.
7708 *
7709 * Completes with a [PlacementGroup].
7710 *
7711 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7712 * error.
7713 *
7714 * If the used [http.Client] completes with an error when making a REST call,
7715 * this method will complete with the same error.
7716 */
7717 async.Future<PlacementGroup> patch(PlacementGroup request, core.String profile Id, core.String id) {
7718 var _url = null;
7719 var _queryParams = new core.Map();
7720 var _uploadMedia = null;
7721 var _uploadOptions = null;
7722 var _downloadOptions = commons.DownloadOptions.Metadata;
7723 var _body = null;
7724
7725 if (request != null) {
7726 _body = convert.JSON.encode((request).toJson());
7727 }
7728 if (profileId == null) {
7729 throw new core.ArgumentError("Parameter profileId is required.");
7730 }
7731 if (id == null) {
7732 throw new core.ArgumentError("Parameter id is required.");
7733 }
7734 _queryParams["id"] = [id];
7735
7736 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementGroups';
7737
7738 var _response = _requester.request(_url,
7739 "PATCH",
7740 body: _body,
7741 queryParams: _queryParams,
7742 uploadOptions: _uploadOptions,
7743 uploadMedia: _uploadMedia,
7744 downloadOptions: _downloadOptions);
7745 return _response.then((data) => new PlacementGroup.fromJson(data));
7746 }
7747
7748 /**
7749 * Updates an existing placement group.
7750 *
7751 * [request] - The metadata request object.
7752 *
7753 * Request parameters:
7754 *
7755 * [profileId] - User profile ID associated with this request.
7756 *
7757 * Completes with a [PlacementGroup].
7758 *
7759 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7760 * error.
7761 *
7762 * If the used [http.Client] completes with an error when making a REST call,
7763 * this method will complete with the same error.
7764 */
7765 async.Future<PlacementGroup> update(PlacementGroup request, core.String profil eId) {
7766 var _url = null;
7767 var _queryParams = new core.Map();
7768 var _uploadMedia = null;
7769 var _uploadOptions = null;
7770 var _downloadOptions = commons.DownloadOptions.Metadata;
7771 var _body = null;
7772
7773 if (request != null) {
7774 _body = convert.JSON.encode((request).toJson());
7775 }
7776 if (profileId == null) {
7777 throw new core.ArgumentError("Parameter profileId is required.");
7778 }
7779
7780 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementGroups';
7781
7782 var _response = _requester.request(_url,
7783 "PUT",
7784 body: _body,
7785 queryParams: _queryParams,
7786 uploadOptions: _uploadOptions,
7787 uploadMedia: _uploadMedia,
7788 downloadOptions: _downloadOptions);
7789 return _response.then((data) => new PlacementGroup.fromJson(data));
7790 }
7791
7792 }
7793
7794
7795 class PlacementStrategiesResourceApi {
7796 final commons.ApiRequester _requester;
7797
7798 PlacementStrategiesResourceApi(commons.ApiRequester client) :
7799 _requester = client;
7800
7801 /**
7802 * Deletes an existing placement strategy.
7803 *
7804 * Request parameters:
7805 *
7806 * [profileId] - User profile ID associated with this request.
7807 *
7808 * [id] - Placement strategy ID.
7809 *
7810 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7811 * error.
7812 *
7813 * If the used [http.Client] completes with an error when making a REST call,
7814 * this method will complete with the same error.
7815 */
7816 async.Future delete(core.String profileId, core.String id) {
7817 var _url = null;
7818 var _queryParams = new core.Map();
7819 var _uploadMedia = null;
7820 var _uploadOptions = null;
7821 var _downloadOptions = commons.DownloadOptions.Metadata;
7822 var _body = null;
7823
7824 if (profileId == null) {
7825 throw new core.ArgumentError("Parameter profileId is required.");
7826 }
7827 if (id == null) {
7828 throw new core.ArgumentError("Parameter id is required.");
7829 }
7830
7831 _downloadOptions = null;
7832
7833 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementStrategies/' + commons.Escaper.ecapeVariable('$id');
7834
7835 var _response = _requester.request(_url,
7836 "DELETE",
7837 body: _body,
7838 queryParams: _queryParams,
7839 uploadOptions: _uploadOptions,
7840 uploadMedia: _uploadMedia,
7841 downloadOptions: _downloadOptions);
7842 return _response.then((data) => null);
7843 }
7844
7845 /**
7846 * Gets one placement strategy by ID.
7847 *
7848 * Request parameters:
7849 *
7850 * [profileId] - User profile ID associated with this request.
7851 *
7852 * [id] - Placement strategy ID.
7853 *
7854 * Completes with a [PlacementStrategy].
7855 *
7856 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7857 * error.
7858 *
7859 * If the used [http.Client] completes with an error when making a REST call,
7860 * this method will complete with the same error.
7861 */
7862 async.Future<PlacementStrategy> get(core.String profileId, core.String id) {
7863 var _url = null;
7864 var _queryParams = new core.Map();
7865 var _uploadMedia = null;
7866 var _uploadOptions = null;
7867 var _downloadOptions = commons.DownloadOptions.Metadata;
7868 var _body = null;
7869
7870 if (profileId == null) {
7871 throw new core.ArgumentError("Parameter profileId is required.");
7872 }
7873 if (id == null) {
7874 throw new core.ArgumentError("Parameter id is required.");
7875 }
7876
7877 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementStrategies/' + commons.Escaper.ecapeVariable('$id');
7878
7879 var _response = _requester.request(_url,
7880 "GET",
7881 body: _body,
7882 queryParams: _queryParams,
7883 uploadOptions: _uploadOptions,
7884 uploadMedia: _uploadMedia,
7885 downloadOptions: _downloadOptions);
7886 return _response.then((data) => new PlacementStrategy.fromJson(data));
7887 }
7888
7889 /**
7890 * Inserts a new placement strategy.
7891 *
7892 * [request] - The metadata request object.
7893 *
7894 * Request parameters:
7895 *
7896 * [profileId] - User profile ID associated with this request.
7897 *
7898 * Completes with a [PlacementStrategy].
7899 *
7900 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7901 * error.
7902 *
7903 * If the used [http.Client] completes with an error when making a REST call,
7904 * this method will complete with the same error.
7905 */
7906 async.Future<PlacementStrategy> insert(PlacementStrategy request, core.String profileId) {
7907 var _url = null;
7908 var _queryParams = new core.Map();
7909 var _uploadMedia = null;
7910 var _uploadOptions = null;
7911 var _downloadOptions = commons.DownloadOptions.Metadata;
7912 var _body = null;
7913
7914 if (request != null) {
7915 _body = convert.JSON.encode((request).toJson());
7916 }
7917 if (profileId == null) {
7918 throw new core.ArgumentError("Parameter profileId is required.");
7919 }
7920
7921 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementStrategies';
7922
7923 var _response = _requester.request(_url,
7924 "POST",
7925 body: _body,
7926 queryParams: _queryParams,
7927 uploadOptions: _uploadOptions,
7928 uploadMedia: _uploadMedia,
7929 downloadOptions: _downloadOptions);
7930 return _response.then((data) => new PlacementStrategy.fromJson(data));
7931 }
7932
7933 /**
7934 * Retrieves a list of placement strategies, possibly filtered. This method
7935 * supports paging.
7936 *
7937 * Request parameters:
7938 *
7939 * [profileId] - User profile ID associated with this request.
7940 *
7941 * [ids] - Select only placement strategies with these IDs.
7942 *
7943 * [maxResults] - Maximum number of results to return.
7944 *
7945 * [pageToken] - Value of the nextPageToken from the previous result page.
7946 *
7947 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
7948 * are allowed. For example, "placementstrategy*2015" will return objects with
7949 * names like "placementstrategy June 2015", "placementstrategy April 2015",
7950 * or simply "placementstrategy 2015". Most of the searches also add wildcards
7951 * implicitly at the start and the end of the search string. For example, a
7952 * search string of "placementstrategy" will match objects with name "my
7953 * placementstrategy", "placementstrategy 2015", or simply
7954 * "placementstrategy".
7955 *
7956 * [sortField] - Field by which to sort the list.
7957 * Possible string values are:
7958 * - "ID"
7959 * - "NAME"
7960 *
7961 * [sortOrder] - Order of sorted results, default is ASCENDING.
7962 * Possible string values are:
7963 * - "ASCENDING"
7964 * - "DESCENDING"
7965 *
7966 * Completes with a [PlacementStrategiesListResponse].
7967 *
7968 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
7969 * error.
7970 *
7971 * If the used [http.Client] completes with an error when making a REST call,
7972 * this method will complete with the same error.
7973 */
7974 async.Future<PlacementStrategiesListResponse> list(core.String profileId, {cor e.List<core.String> ids, core.int maxResults, core.String pageToken, core.String searchString, core.String sortField, core.String sortOrder}) {
7975 var _url = null;
7976 var _queryParams = new core.Map();
7977 var _uploadMedia = null;
7978 var _uploadOptions = null;
7979 var _downloadOptions = commons.DownloadOptions.Metadata;
7980 var _body = null;
7981
7982 if (profileId == null) {
7983 throw new core.ArgumentError("Parameter profileId is required.");
7984 }
7985 if (ids != null) {
7986 _queryParams["ids"] = ids;
7987 }
7988 if (maxResults != null) {
7989 _queryParams["maxResults"] = ["${maxResults}"];
7990 }
7991 if (pageToken != null) {
7992 _queryParams["pageToken"] = [pageToken];
7993 }
7994 if (searchString != null) {
7995 _queryParams["searchString"] = [searchString];
7996 }
7997 if (sortField != null) {
7998 _queryParams["sortField"] = [sortField];
7999 }
8000 if (sortOrder != null) {
8001 _queryParams["sortOrder"] = [sortOrder];
8002 }
8003
8004 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementStrategies';
8005
8006 var _response = _requester.request(_url,
8007 "GET",
8008 body: _body,
8009 queryParams: _queryParams,
8010 uploadOptions: _uploadOptions,
8011 uploadMedia: _uploadMedia,
8012 downloadOptions: _downloadOptions);
8013 return _response.then((data) => new PlacementStrategiesListResponse.fromJson (data));
8014 }
8015
8016 /**
8017 * Updates an existing placement strategy. This method supports patch
8018 * semantics.
8019 *
8020 * [request] - The metadata request object.
8021 *
8022 * Request parameters:
8023 *
8024 * [profileId] - User profile ID associated with this request.
8025 *
8026 * [id] - Placement strategy ID.
8027 *
8028 * Completes with a [PlacementStrategy].
8029 *
8030 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8031 * error.
8032 *
8033 * If the used [http.Client] completes with an error when making a REST call,
8034 * this method will complete with the same error.
8035 */
8036 async.Future<PlacementStrategy> patch(PlacementStrategy request, core.String p rofileId, core.String id) {
8037 var _url = null;
8038 var _queryParams = new core.Map();
8039 var _uploadMedia = null;
8040 var _uploadOptions = null;
8041 var _downloadOptions = commons.DownloadOptions.Metadata;
8042 var _body = null;
8043
8044 if (request != null) {
8045 _body = convert.JSON.encode((request).toJson());
8046 }
8047 if (profileId == null) {
8048 throw new core.ArgumentError("Parameter profileId is required.");
8049 }
8050 if (id == null) {
8051 throw new core.ArgumentError("Parameter id is required.");
8052 }
8053 _queryParams["id"] = [id];
8054
8055 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementStrategies';
8056
8057 var _response = _requester.request(_url,
8058 "PATCH",
8059 body: _body,
8060 queryParams: _queryParams,
8061 uploadOptions: _uploadOptions,
8062 uploadMedia: _uploadMedia,
8063 downloadOptions: _downloadOptions);
8064 return _response.then((data) => new PlacementStrategy.fromJson(data));
8065 }
8066
8067 /**
8068 * Updates an existing placement strategy.
8069 *
8070 * [request] - The metadata request object.
8071 *
8072 * Request parameters:
8073 *
8074 * [profileId] - User profile ID associated with this request.
8075 *
8076 * Completes with a [PlacementStrategy].
8077 *
8078 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8079 * error.
8080 *
8081 * If the used [http.Client] completes with an error when making a REST call,
8082 * this method will complete with the same error.
8083 */
8084 async.Future<PlacementStrategy> update(PlacementStrategy request, core.String profileId) {
8085 var _url = null;
8086 var _queryParams = new core.Map();
8087 var _uploadMedia = null;
8088 var _uploadOptions = null;
8089 var _downloadOptions = commons.DownloadOptions.Metadata;
8090 var _body = null;
8091
8092 if (request != null) {
8093 _body = convert.JSON.encode((request).toJson());
8094 }
8095 if (profileId == null) {
8096 throw new core.ArgumentError("Parameter profileId is required.");
8097 }
8098
8099 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cementStrategies';
8100
8101 var _response = _requester.request(_url,
8102 "PUT",
8103 body: _body,
8104 queryParams: _queryParams,
8105 uploadOptions: _uploadOptions,
8106 uploadMedia: _uploadMedia,
8107 downloadOptions: _downloadOptions);
8108 return _response.then((data) => new PlacementStrategy.fromJson(data));
8109 }
8110
8111 }
8112
8113
8114 class PlacementsResourceApi {
8115 final commons.ApiRequester _requester;
8116
8117 PlacementsResourceApi(commons.ApiRequester client) :
8118 _requester = client;
8119
8120 /**
8121 * Generates tags for a placement.
8122 *
8123 * Request parameters:
8124 *
8125 * [profileId] - User profile ID associated with this request.
8126 *
8127 * [campaignId] - Generate placements belonging to this campaign. This is a
8128 * required field.
8129 *
8130 * [placementIds] - Generate tags for these placements.
8131 *
8132 * [tagFormats] - Tag formats to generate for these placements.
8133 *
8134 * Completes with a [PlacementsGenerateTagsResponse].
8135 *
8136 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8137 * error.
8138 *
8139 * If the used [http.Client] completes with an error when making a REST call,
8140 * this method will complete with the same error.
8141 */
8142 async.Future<PlacementsGenerateTagsResponse> generatetags(core.String profileI d, {core.String campaignId, core.List<core.String> placementIds, core.List<core. String> tagFormats}) {
8143 var _url = null;
8144 var _queryParams = new core.Map();
8145 var _uploadMedia = null;
8146 var _uploadOptions = null;
8147 var _downloadOptions = commons.DownloadOptions.Metadata;
8148 var _body = null;
8149
8150 if (profileId == null) {
8151 throw new core.ArgumentError("Parameter profileId is required.");
8152 }
8153 if (campaignId != null) {
8154 _queryParams["campaignId"] = [campaignId];
8155 }
8156 if (placementIds != null) {
8157 _queryParams["placementIds"] = placementIds;
8158 }
8159 if (tagFormats != null) {
8160 _queryParams["tagFormats"] = tagFormats;
8161 }
8162
8163 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cements/generatetags';
8164
8165 var _response = _requester.request(_url,
8166 "POST",
8167 body: _body,
8168 queryParams: _queryParams,
8169 uploadOptions: _uploadOptions,
8170 uploadMedia: _uploadMedia,
8171 downloadOptions: _downloadOptions);
8172 return _response.then((data) => new PlacementsGenerateTagsResponse.fromJson( data));
8173 }
8174
8175 /**
8176 * Gets one placement by ID.
8177 *
8178 * Request parameters:
8179 *
8180 * [profileId] - User profile ID associated with this request.
8181 *
8182 * [id] - Placement ID.
8183 *
8184 * Completes with a [Placement].
8185 *
8186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8187 * error.
8188 *
8189 * If the used [http.Client] completes with an error when making a REST call,
8190 * this method will complete with the same error.
8191 */
8192 async.Future<Placement> get(core.String profileId, core.String id) {
8193 var _url = null;
8194 var _queryParams = new core.Map();
8195 var _uploadMedia = null;
8196 var _uploadOptions = null;
8197 var _downloadOptions = commons.DownloadOptions.Metadata;
8198 var _body = null;
8199
8200 if (profileId == null) {
8201 throw new core.ArgumentError("Parameter profileId is required.");
8202 }
8203 if (id == null) {
8204 throw new core.ArgumentError("Parameter id is required.");
8205 }
8206
8207 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cements/' + commons.Escaper.ecapeVariable('$id');
8208
8209 var _response = _requester.request(_url,
8210 "GET",
8211 body: _body,
8212 queryParams: _queryParams,
8213 uploadOptions: _uploadOptions,
8214 uploadMedia: _uploadMedia,
8215 downloadOptions: _downloadOptions);
8216 return _response.then((data) => new Placement.fromJson(data));
8217 }
8218
8219 /**
8220 * Inserts a new placement.
8221 *
8222 * [request] - The metadata request object.
8223 *
8224 * Request parameters:
8225 *
8226 * [profileId] - User profile ID associated with this request.
8227 *
8228 * Completes with a [Placement].
8229 *
8230 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8231 * error.
8232 *
8233 * If the used [http.Client] completes with an error when making a REST call,
8234 * this method will complete with the same error.
8235 */
8236 async.Future<Placement> insert(Placement request, core.String profileId) {
8237 var _url = null;
8238 var _queryParams = new core.Map();
8239 var _uploadMedia = null;
8240 var _uploadOptions = null;
8241 var _downloadOptions = commons.DownloadOptions.Metadata;
8242 var _body = null;
8243
8244 if (request != null) {
8245 _body = convert.JSON.encode((request).toJson());
8246 }
8247 if (profileId == null) {
8248 throw new core.ArgumentError("Parameter profileId is required.");
8249 }
8250
8251 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cements';
8252
8253 var _response = _requester.request(_url,
8254 "POST",
8255 body: _body,
8256 queryParams: _queryParams,
8257 uploadOptions: _uploadOptions,
8258 uploadMedia: _uploadMedia,
8259 downloadOptions: _downloadOptions);
8260 return _response.then((data) => new Placement.fromJson(data));
8261 }
8262
8263 /**
8264 * Retrieves a list of placements, possibly filtered. This method supports
8265 * paging.
8266 *
8267 * Request parameters:
8268 *
8269 * [profileId] - User profile ID associated with this request.
8270 *
8271 * [advertiserIds] - Select only placements that belong to these advertisers.
8272 *
8273 * [archived] - Select only archived placements. Don't set this field to
8274 * select both archived and non-archived placements.
8275 *
8276 * [campaignIds] - Select only placements that belong to these campaigns.
8277 *
8278 * [compatibilities] - Select only placements that are associated with these
8279 * compatibilities. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either
8280 * on desktop or on mobile devices for regular or interstitial ads
8281 * respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.
8282 * IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with
8283 * the VAST standard.
8284 *
8285 * [contentCategoryIds] - Select only placements that are associated with
8286 * these content categories.
8287 *
8288 * [directorySiteIds] - Select only placements that are associated with these
8289 * directory sites.
8290 *
8291 * [groupIds] - Select only placements that belong to these placement groups.
8292 *
8293 * [ids] - Select only placements with these IDs.
8294 *
8295 * [maxEndDate] - Select only placements or placement groups whose end date is
8296 * on or before the specified maxEndDate. The date should be formatted as
8297 * "yyyy-MM-dd".
8298 *
8299 * [maxResults] - Maximum number of results to return.
8300 *
8301 * [maxStartDate] - Select only placements or placement groups whose start
8302 * date is on or before the specified maxStartDate. The date should be
8303 * formatted as "yyyy-MM-dd".
8304 *
8305 * [minEndDate] - Select only placements or placement groups whose end date is
8306 * on or after the specified minEndDate. The date should be formatted as
8307 * "yyyy-MM-dd".
8308 *
8309 * [minStartDate] - Select only placements or placement groups whose start
8310 * date is on or after the specified minStartDate. The date should be
8311 * formatted as "yyyy-MM-dd".
8312 *
8313 * [pageToken] - Value of the nextPageToken from the previous result page.
8314 *
8315 * [paymentSource] - Select only placements with this payment source.
8316 * Possible string values are:
8317 * - "PLACEMENT_AGENCY_PAID"
8318 * - "PLACEMENT_PUBLISHER_PAID"
8319 *
8320 * [placementStrategyIds] - Select only placements that are associated with
8321 * these placement strategies.
8322 *
8323 * [pricingTypes] - Select only placements with these pricing types.
8324 *
8325 * [searchString] - Allows searching for placements by name or ID. Wildcards
8326 * (*) are allowed. For example, "placement*2015" will return placements with
8327 * names like "placement June 2015", "placement May 2015", or simply
8328 * "placements 2015". Most of the searches also add wildcards implicitly at
8329 * the start and the end of the search string. For example, a search string of
8330 * "placement" will match placements with name "my placement", "placement
8331 * 2015", or simply "placement".
8332 *
8333 * [siteIds] - Select only placements that are associated with these sites.
8334 *
8335 * [sizeIds] - Select only placements that are associated with these sizes.
8336 *
8337 * [sortField] - Field by which to sort the list.
8338 * Possible string values are:
8339 * - "ID"
8340 * - "NAME"
8341 *
8342 * [sortOrder] - Order of sorted results, default is ASCENDING.
8343 * Possible string values are:
8344 * - "ASCENDING"
8345 * - "DESCENDING"
8346 *
8347 * Completes with a [PlacementsListResponse].
8348 *
8349 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8350 * error.
8351 *
8352 * If the used [http.Client] completes with an error when making a REST call,
8353 * this method will complete with the same error.
8354 */
8355 async.Future<PlacementsListResponse> list(core.String profileId, {core.List<co re.String> advertiserIds, core.bool archived, core.List<core.String> campaignIds , core.List<core.String> compatibilities, core.List<core.String> contentCategory Ids, core.List<core.String> directorySiteIds, core.List<core.String> groupIds, c ore.List<core.String> ids, core.String maxEndDate, core.int maxResults, core.Str ing maxStartDate, core.String minEndDate, core.String minStartDate, core.String pageToken, core.String paymentSource, core.List<core.String> placementStrategyId s, core.List<core.String> pricingTypes, core.String searchString, core.List<core .String> siteIds, core.List<core.String> sizeIds, core.String sortField, core.St ring sortOrder}) {
8356 var _url = null;
8357 var _queryParams = new core.Map();
8358 var _uploadMedia = null;
8359 var _uploadOptions = null;
8360 var _downloadOptions = commons.DownloadOptions.Metadata;
8361 var _body = null;
8362
8363 if (profileId == null) {
8364 throw new core.ArgumentError("Parameter profileId is required.");
8365 }
8366 if (advertiserIds != null) {
8367 _queryParams["advertiserIds"] = advertiserIds;
8368 }
8369 if (archived != null) {
8370 _queryParams["archived"] = ["${archived}"];
8371 }
8372 if (campaignIds != null) {
8373 _queryParams["campaignIds"] = campaignIds;
8374 }
8375 if (compatibilities != null) {
8376 _queryParams["compatibilities"] = compatibilities;
8377 }
8378 if (contentCategoryIds != null) {
8379 _queryParams["contentCategoryIds"] = contentCategoryIds;
8380 }
8381 if (directorySiteIds != null) {
8382 _queryParams["directorySiteIds"] = directorySiteIds;
8383 }
8384 if (groupIds != null) {
8385 _queryParams["groupIds"] = groupIds;
8386 }
8387 if (ids != null) {
8388 _queryParams["ids"] = ids;
8389 }
8390 if (maxEndDate != null) {
8391 _queryParams["maxEndDate"] = [maxEndDate];
8392 }
8393 if (maxResults != null) {
8394 _queryParams["maxResults"] = ["${maxResults}"];
8395 }
8396 if (maxStartDate != null) {
8397 _queryParams["maxStartDate"] = [maxStartDate];
8398 }
8399 if (minEndDate != null) {
8400 _queryParams["minEndDate"] = [minEndDate];
8401 }
8402 if (minStartDate != null) {
8403 _queryParams["minStartDate"] = [minStartDate];
8404 }
8405 if (pageToken != null) {
8406 _queryParams["pageToken"] = [pageToken];
8407 }
8408 if (paymentSource != null) {
8409 _queryParams["paymentSource"] = [paymentSource];
8410 }
8411 if (placementStrategyIds != null) {
8412 _queryParams["placementStrategyIds"] = placementStrategyIds;
8413 }
8414 if (pricingTypes != null) {
8415 _queryParams["pricingTypes"] = pricingTypes;
8416 }
8417 if (searchString != null) {
8418 _queryParams["searchString"] = [searchString];
8419 }
8420 if (siteIds != null) {
8421 _queryParams["siteIds"] = siteIds;
8422 }
8423 if (sizeIds != null) {
8424 _queryParams["sizeIds"] = sizeIds;
8425 }
8426 if (sortField != null) {
8427 _queryParams["sortField"] = [sortField];
8428 }
8429 if (sortOrder != null) {
8430 _queryParams["sortOrder"] = [sortOrder];
8431 }
8432
8433 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cements';
8434
8435 var _response = _requester.request(_url,
8436 "GET",
8437 body: _body,
8438 queryParams: _queryParams,
8439 uploadOptions: _uploadOptions,
8440 uploadMedia: _uploadMedia,
8441 downloadOptions: _downloadOptions);
8442 return _response.then((data) => new PlacementsListResponse.fromJson(data));
8443 }
8444
8445 /**
8446 * Updates an existing placement. This method supports patch semantics.
8447 *
8448 * [request] - The metadata request object.
8449 *
8450 * Request parameters:
8451 *
8452 * [profileId] - User profile ID associated with this request.
8453 *
8454 * [id] - Placement ID.
8455 *
8456 * Completes with a [Placement].
8457 *
8458 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8459 * error.
8460 *
8461 * If the used [http.Client] completes with an error when making a REST call,
8462 * this method will complete with the same error.
8463 */
8464 async.Future<Placement> patch(Placement request, core.String profileId, core.S tring id) {
8465 var _url = null;
8466 var _queryParams = new core.Map();
8467 var _uploadMedia = null;
8468 var _uploadOptions = null;
8469 var _downloadOptions = commons.DownloadOptions.Metadata;
8470 var _body = null;
8471
8472 if (request != null) {
8473 _body = convert.JSON.encode((request).toJson());
8474 }
8475 if (profileId == null) {
8476 throw new core.ArgumentError("Parameter profileId is required.");
8477 }
8478 if (id == null) {
8479 throw new core.ArgumentError("Parameter id is required.");
8480 }
8481 _queryParams["id"] = [id];
8482
8483 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cements';
8484
8485 var _response = _requester.request(_url,
8486 "PATCH",
8487 body: _body,
8488 queryParams: _queryParams,
8489 uploadOptions: _uploadOptions,
8490 uploadMedia: _uploadMedia,
8491 downloadOptions: _downloadOptions);
8492 return _response.then((data) => new Placement.fromJson(data));
8493 }
8494
8495 /**
8496 * Updates an existing placement.
8497 *
8498 * [request] - The metadata request object.
8499 *
8500 * Request parameters:
8501 *
8502 * [profileId] - User profile ID associated with this request.
8503 *
8504 * Completes with a [Placement].
8505 *
8506 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8507 * error.
8508 *
8509 * If the used [http.Client] completes with an error when making a REST call,
8510 * this method will complete with the same error.
8511 */
8512 async.Future<Placement> update(Placement request, core.String profileId) {
8513 var _url = null;
8514 var _queryParams = new core.Map();
8515 var _uploadMedia = null;
8516 var _uploadOptions = null;
8517 var _downloadOptions = commons.DownloadOptions.Metadata;
8518 var _body = null;
8519
8520 if (request != null) {
8521 _body = convert.JSON.encode((request).toJson());
8522 }
8523 if (profileId == null) {
8524 throw new core.ArgumentError("Parameter profileId is required.");
8525 }
8526
8527 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla cements';
8528
8529 var _response = _requester.request(_url,
8530 "PUT",
8531 body: _body,
8532 queryParams: _queryParams,
8533 uploadOptions: _uploadOptions,
8534 uploadMedia: _uploadMedia,
8535 downloadOptions: _downloadOptions);
8536 return _response.then((data) => new Placement.fromJson(data));
8537 }
8538
8539 }
8540
8541
8542 class PlatformTypesResourceApi {
8543 final commons.ApiRequester _requester;
8544
8545 PlatformTypesResourceApi(commons.ApiRequester client) :
8546 _requester = client;
8547
8548 /**
8549 * Gets one platform type by ID.
8550 *
8551 * Request parameters:
8552 *
8553 * [profileId] - User profile ID associated with this request.
8554 *
8555 * [id] - Platform type ID.
8556 *
8557 * Completes with a [PlatformType].
8558 *
8559 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8560 * error.
8561 *
8562 * If the used [http.Client] completes with an error when making a REST call,
8563 * this method will complete with the same error.
8564 */
8565 async.Future<PlatformType> get(core.String profileId, core.String id) {
8566 var _url = null;
8567 var _queryParams = new core.Map();
8568 var _uploadMedia = null;
8569 var _uploadOptions = null;
8570 var _downloadOptions = commons.DownloadOptions.Metadata;
8571 var _body = null;
8572
8573 if (profileId == null) {
8574 throw new core.ArgumentError("Parameter profileId is required.");
8575 }
8576 if (id == null) {
8577 throw new core.ArgumentError("Parameter id is required.");
8578 }
8579
8580 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla tformTypes/' + commons.Escaper.ecapeVariable('$id');
8581
8582 var _response = _requester.request(_url,
8583 "GET",
8584 body: _body,
8585 queryParams: _queryParams,
8586 uploadOptions: _uploadOptions,
8587 uploadMedia: _uploadMedia,
8588 downloadOptions: _downloadOptions);
8589 return _response.then((data) => new PlatformType.fromJson(data));
8590 }
8591
8592 /**
8593 * Retrieves a list of platform types.
8594 *
8595 * Request parameters:
8596 *
8597 * [profileId] - User profile ID associated with this request.
8598 *
8599 * Completes with a [PlatformTypesListResponse].
8600 *
8601 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8602 * error.
8603 *
8604 * If the used [http.Client] completes with an error when making a REST call,
8605 * this method will complete with the same error.
8606 */
8607 async.Future<PlatformTypesListResponse> list(core.String profileId) {
8608 var _url = null;
8609 var _queryParams = new core.Map();
8610 var _uploadMedia = null;
8611 var _uploadOptions = null;
8612 var _downloadOptions = commons.DownloadOptions.Metadata;
8613 var _body = null;
8614
8615 if (profileId == null) {
8616 throw new core.ArgumentError("Parameter profileId is required.");
8617 }
8618
8619 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pla tformTypes';
8620
8621 var _response = _requester.request(_url,
8622 "GET",
8623 body: _body,
8624 queryParams: _queryParams,
8625 uploadOptions: _uploadOptions,
8626 uploadMedia: _uploadMedia,
8627 downloadOptions: _downloadOptions);
8628 return _response.then((data) => new PlatformTypesListResponse.fromJson(data) );
8629 }
8630
8631 }
8632
8633
8634 class PostalCodesResourceApi {
8635 final commons.ApiRequester _requester;
8636
8637 PostalCodesResourceApi(commons.ApiRequester client) :
8638 _requester = client;
8639
8640 /**
8641 * Gets one postal code by ID.
8642 *
8643 * Request parameters:
8644 *
8645 * [profileId] - User profile ID associated with this request.
8646 *
8647 * [code] - Postal code ID.
8648 *
8649 * Completes with a [PostalCode].
8650 *
8651 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8652 * error.
8653 *
8654 * If the used [http.Client] completes with an error when making a REST call,
8655 * this method will complete with the same error.
8656 */
8657 async.Future<PostalCode> get(core.String profileId, core.String code) {
8658 var _url = null;
8659 var _queryParams = new core.Map();
8660 var _uploadMedia = null;
8661 var _uploadOptions = null;
8662 var _downloadOptions = commons.DownloadOptions.Metadata;
8663 var _body = null;
8664
8665 if (profileId == null) {
8666 throw new core.ArgumentError("Parameter profileId is required.");
8667 }
8668 if (code == null) {
8669 throw new core.ArgumentError("Parameter code is required.");
8670 }
8671
8672 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pos talCodes/' + commons.Escaper.ecapeVariable('$code');
8673
8674 var _response = _requester.request(_url,
8675 "GET",
8676 body: _body,
8677 queryParams: _queryParams,
8678 uploadOptions: _uploadOptions,
8679 uploadMedia: _uploadMedia,
8680 downloadOptions: _downloadOptions);
8681 return _response.then((data) => new PostalCode.fromJson(data));
8682 }
8683
8684 /**
8685 * Retrieves a list of postal codes.
8686 *
8687 * Request parameters:
8688 *
8689 * [profileId] - User profile ID associated with this request.
8690 *
8691 * Completes with a [PostalCodesListResponse].
8692 *
8693 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8694 * error.
8695 *
8696 * If the used [http.Client] completes with an error when making a REST call,
8697 * this method will complete with the same error.
8698 */
8699 async.Future<PostalCodesListResponse> list(core.String profileId) {
8700 var _url = null;
8701 var _queryParams = new core.Map();
8702 var _uploadMedia = null;
8703 var _uploadOptions = null;
8704 var _downloadOptions = commons.DownloadOptions.Metadata;
8705 var _body = null;
8706
8707 if (profileId == null) {
8708 throw new core.ArgumentError("Parameter profileId is required.");
8709 }
8710
8711 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pos talCodes';
8712
8713 var _response = _requester.request(_url,
8714 "GET",
8715 body: _body,
8716 queryParams: _queryParams,
8717 uploadOptions: _uploadOptions,
8718 uploadMedia: _uploadMedia,
8719 downloadOptions: _downloadOptions);
8720 return _response.then((data) => new PostalCodesListResponse.fromJson(data));
8721 }
8722
8723 }
8724
8725
8726 class ProjectsResourceApi {
8727 final commons.ApiRequester _requester;
8728
8729 ProjectsResourceApi(commons.ApiRequester client) :
8730 _requester = client;
8731
8732 /**
8733 * Gets one project by ID.
8734 *
8735 * Request parameters:
8736 *
8737 * [profileId] - User profile ID associated with this request.
8738 *
8739 * [id] - Project ID.
8740 *
8741 * Completes with a [Project].
8742 *
8743 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8744 * error.
8745 *
8746 * If the used [http.Client] completes with an error when making a REST call,
8747 * this method will complete with the same error.
8748 */
8749 async.Future<Project> get(core.String profileId, core.String id) {
8750 var _url = null;
8751 var _queryParams = new core.Map();
8752 var _uploadMedia = null;
8753 var _uploadOptions = null;
8754 var _downloadOptions = commons.DownloadOptions.Metadata;
8755 var _body = null;
8756
8757 if (profileId == null) {
8758 throw new core.ArgumentError("Parameter profileId is required.");
8759 }
8760 if (id == null) {
8761 throw new core.ArgumentError("Parameter id is required.");
8762 }
8763
8764 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro jects/' + commons.Escaper.ecapeVariable('$id');
8765
8766 var _response = _requester.request(_url,
8767 "GET",
8768 body: _body,
8769 queryParams: _queryParams,
8770 uploadOptions: _uploadOptions,
8771 uploadMedia: _uploadMedia,
8772 downloadOptions: _downloadOptions);
8773 return _response.then((data) => new Project.fromJson(data));
8774 }
8775
8776 /**
8777 * Retrieves a list of projects, possibly filtered. This method supports
8778 * paging.
8779 *
8780 * Request parameters:
8781 *
8782 * [profileId] - User profile ID associated with this request.
8783 *
8784 * [advertiserIds] - Select only projects with these advertiser IDs.
8785 *
8786 * [ids] - Select only projects with these IDs.
8787 *
8788 * [maxResults] - Maximum number of results to return.
8789 *
8790 * [pageToken] - Value of the nextPageToken from the previous result page.
8791 *
8792 * [searchString] - Allows searching for projects by name or ID. Wildcards (*)
8793 * are allowed. For example, "project*2015" will return projects with names
8794 * like "project June 2015", "project April 2015", or simply "project 2015".
8795 * Most of the searches also add wildcards implicitly at the start and the end
8796 * of the search string. For example, a search string of "project" will match
8797 * projects with name "my project", "project 2015", or simply "project".
8798 *
8799 * [sortField] - Field by which to sort the list.
8800 * Possible string values are:
8801 * - "ID"
8802 * - "NAME"
8803 *
8804 * [sortOrder] - Order of sorted results, default is ASCENDING.
8805 * Possible string values are:
8806 * - "ASCENDING"
8807 * - "DESCENDING"
8808 *
8809 * Completes with a [ProjectsListResponse].
8810 *
8811 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8812 * error.
8813 *
8814 * If the used [http.Client] completes with an error when making a REST call,
8815 * this method will complete with the same error.
8816 */
8817 async.Future<ProjectsListResponse> list(core.String profileId, {core.List<core .String> advertiserIds, core.List<core.String> ids, core.int maxResults, core.St ring pageToken, core.String searchString, core.String sortField, core.String sor tOrder}) {
8818 var _url = null;
8819 var _queryParams = new core.Map();
8820 var _uploadMedia = null;
8821 var _uploadOptions = null;
8822 var _downloadOptions = commons.DownloadOptions.Metadata;
8823 var _body = null;
8824
8825 if (profileId == null) {
8826 throw new core.ArgumentError("Parameter profileId is required.");
8827 }
8828 if (advertiserIds != null) {
8829 _queryParams["advertiserIds"] = advertiserIds;
8830 }
8831 if (ids != null) {
8832 _queryParams["ids"] = ids;
8833 }
8834 if (maxResults != null) {
8835 _queryParams["maxResults"] = ["${maxResults}"];
8836 }
8837 if (pageToken != null) {
8838 _queryParams["pageToken"] = [pageToken];
8839 }
8840 if (searchString != null) {
8841 _queryParams["searchString"] = [searchString];
8842 }
8843 if (sortField != null) {
8844 _queryParams["sortField"] = [sortField];
8845 }
8846 if (sortOrder != null) {
8847 _queryParams["sortOrder"] = [sortOrder];
8848 }
8849
8850 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/pro jects';
8851
8852 var _response = _requester.request(_url,
8853 "GET",
8854 body: _body,
8855 queryParams: _queryParams,
8856 uploadOptions: _uploadOptions,
8857 uploadMedia: _uploadMedia,
8858 downloadOptions: _downloadOptions);
8859 return _response.then((data) => new ProjectsListResponse.fromJson(data));
8860 }
8861
8862 }
8863
8864
8865 class RegionsResourceApi {
8866 final commons.ApiRequester _requester;
8867
8868 RegionsResourceApi(commons.ApiRequester client) :
8869 _requester = client;
8870
8871 /**
8872 * Retrieves a list of regions.
8873 *
8874 * Request parameters:
8875 *
8876 * [profileId] - User profile ID associated with this request.
8877 *
8878 * Completes with a [RegionsListResponse].
8879 *
8880 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8881 * error.
8882 *
8883 * If the used [http.Client] completes with an error when making a REST call,
8884 * this method will complete with the same error.
8885 */
8886 async.Future<RegionsListResponse> list(core.String profileId) {
8887 var _url = null;
8888 var _queryParams = new core.Map();
8889 var _uploadMedia = null;
8890 var _uploadOptions = null;
8891 var _downloadOptions = commons.DownloadOptions.Metadata;
8892 var _body = null;
8893
8894 if (profileId == null) {
8895 throw new core.ArgumentError("Parameter profileId is required.");
8896 }
8897
8898 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/reg ions';
8899
8900 var _response = _requester.request(_url,
8901 "GET",
8902 body: _body,
8903 queryParams: _queryParams,
8904 uploadOptions: _uploadOptions,
8905 uploadMedia: _uploadMedia,
8906 downloadOptions: _downloadOptions);
8907 return _response.then((data) => new RegionsListResponse.fromJson(data));
8908 }
8909
8910 }
8911
8912
8913 class RemarketingListSharesResourceApi {
8914 final commons.ApiRequester _requester;
8915
8916 RemarketingListSharesResourceApi(commons.ApiRequester client) :
8917 _requester = client;
8918
8919 /**
8920 * Gets one remarketing list share by remarketing list ID.
8921 *
8922 * Request parameters:
8923 *
8924 * [profileId] - User profile ID associated with this request.
8925 *
8926 * [remarketingListId] - Remarketing list ID.
8927 *
8928 * Completes with a [RemarketingListShare].
8929 *
8930 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8931 * error.
8932 *
8933 * If the used [http.Client] completes with an error when making a REST call,
8934 * this method will complete with the same error.
8935 */
8936 async.Future<RemarketingListShare> get(core.String profileId, core.String rema rketingListId) {
8937 var _url = null;
8938 var _queryParams = new core.Map();
8939 var _uploadMedia = null;
8940 var _uploadOptions = null;
8941 var _downloadOptions = commons.DownloadOptions.Metadata;
8942 var _body = null;
8943
8944 if (profileId == null) {
8945 throw new core.ArgumentError("Parameter profileId is required.");
8946 }
8947 if (remarketingListId == null) {
8948 throw new core.ArgumentError("Parameter remarketingListId is required.");
8949 }
8950
8951 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem arketingListShares/' + commons.Escaper.ecapeVariable('$remarketingListId');
8952
8953 var _response = _requester.request(_url,
8954 "GET",
8955 body: _body,
8956 queryParams: _queryParams,
8957 uploadOptions: _uploadOptions,
8958 uploadMedia: _uploadMedia,
8959 downloadOptions: _downloadOptions);
8960 return _response.then((data) => new RemarketingListShare.fromJson(data));
8961 }
8962
8963 /**
8964 * Updates an existing remarketing list share. This method supports patch
8965 * semantics.
8966 *
8967 * [request] - The metadata request object.
8968 *
8969 * Request parameters:
8970 *
8971 * [profileId] - User profile ID associated with this request.
8972 *
8973 * [remarketingListId] - Remarketing list ID.
8974 *
8975 * Completes with a [RemarketingListShare].
8976 *
8977 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
8978 * error.
8979 *
8980 * If the used [http.Client] completes with an error when making a REST call,
8981 * this method will complete with the same error.
8982 */
8983 async.Future<RemarketingListShare> patch(RemarketingListShare request, core.St ring profileId, core.String remarketingListId) {
8984 var _url = null;
8985 var _queryParams = new core.Map();
8986 var _uploadMedia = null;
8987 var _uploadOptions = null;
8988 var _downloadOptions = commons.DownloadOptions.Metadata;
8989 var _body = null;
8990
8991 if (request != null) {
8992 _body = convert.JSON.encode((request).toJson());
8993 }
8994 if (profileId == null) {
8995 throw new core.ArgumentError("Parameter profileId is required.");
8996 }
8997 if (remarketingListId == null) {
8998 throw new core.ArgumentError("Parameter remarketingListId is required.");
8999 }
9000 _queryParams["remarketingListId"] = [remarketingListId];
9001
9002 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem arketingListShares';
9003
9004 var _response = _requester.request(_url,
9005 "PATCH",
9006 body: _body,
9007 queryParams: _queryParams,
9008 uploadOptions: _uploadOptions,
9009 uploadMedia: _uploadMedia,
9010 downloadOptions: _downloadOptions);
9011 return _response.then((data) => new RemarketingListShare.fromJson(data));
9012 }
9013
9014 /**
9015 * Updates an existing remarketing list share.
9016 *
9017 * [request] - The metadata request object.
9018 *
9019 * Request parameters:
9020 *
9021 * [profileId] - User profile ID associated with this request.
9022 *
9023 * Completes with a [RemarketingListShare].
9024 *
9025 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9026 * error.
9027 *
9028 * If the used [http.Client] completes with an error when making a REST call,
9029 * this method will complete with the same error.
9030 */
9031 async.Future<RemarketingListShare> update(RemarketingListShare request, core.S tring profileId) {
9032 var _url = null;
9033 var _queryParams = new core.Map();
9034 var _uploadMedia = null;
9035 var _uploadOptions = null;
9036 var _downloadOptions = commons.DownloadOptions.Metadata;
9037 var _body = null;
9038
9039 if (request != null) {
9040 _body = convert.JSON.encode((request).toJson());
9041 }
9042 if (profileId == null) {
9043 throw new core.ArgumentError("Parameter profileId is required.");
9044 }
9045
9046 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem arketingListShares';
9047
9048 var _response = _requester.request(_url,
9049 "PUT",
9050 body: _body,
9051 queryParams: _queryParams,
9052 uploadOptions: _uploadOptions,
9053 uploadMedia: _uploadMedia,
9054 downloadOptions: _downloadOptions);
9055 return _response.then((data) => new RemarketingListShare.fromJson(data));
9056 }
9057
9058 }
9059
9060
9061 class RemarketingListsResourceApi {
9062 final commons.ApiRequester _requester;
9063
9064 RemarketingListsResourceApi(commons.ApiRequester client) :
9065 _requester = client;
9066
9067 /**
9068 * Gets one remarketing list by ID.
9069 *
9070 * Request parameters:
9071 *
9072 * [profileId] - User profile ID associated with this request.
9073 *
9074 * [id] - Remarketing list ID.
9075 *
9076 * Completes with a [RemarketingList].
9077 *
9078 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9079 * error.
9080 *
9081 * If the used [http.Client] completes with an error when making a REST call,
9082 * this method will complete with the same error.
9083 */
9084 async.Future<RemarketingList> get(core.String profileId, core.String id) {
9085 var _url = null;
9086 var _queryParams = new core.Map();
9087 var _uploadMedia = null;
9088 var _uploadOptions = null;
9089 var _downloadOptions = commons.DownloadOptions.Metadata;
9090 var _body = null;
9091
9092 if (profileId == null) {
9093 throw new core.ArgumentError("Parameter profileId is required.");
9094 }
9095 if (id == null) {
9096 throw new core.ArgumentError("Parameter id is required.");
9097 }
9098
9099 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem arketingLists/' + commons.Escaper.ecapeVariable('$id');
9100
9101 var _response = _requester.request(_url,
9102 "GET",
9103 body: _body,
9104 queryParams: _queryParams,
9105 uploadOptions: _uploadOptions,
9106 uploadMedia: _uploadMedia,
9107 downloadOptions: _downloadOptions);
9108 return _response.then((data) => new RemarketingList.fromJson(data));
9109 }
9110
9111 /**
9112 * Inserts a new remarketing list.
9113 *
9114 * [request] - The metadata request object.
9115 *
9116 * Request parameters:
9117 *
9118 * [profileId] - User profile ID associated with this request.
9119 *
9120 * Completes with a [RemarketingList].
9121 *
9122 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9123 * error.
9124 *
9125 * If the used [http.Client] completes with an error when making a REST call,
9126 * this method will complete with the same error.
9127 */
9128 async.Future<RemarketingList> insert(RemarketingList request, core.String prof ileId) {
9129 var _url = null;
9130 var _queryParams = new core.Map();
9131 var _uploadMedia = null;
9132 var _uploadOptions = null;
9133 var _downloadOptions = commons.DownloadOptions.Metadata;
9134 var _body = null;
9135
9136 if (request != null) {
9137 _body = convert.JSON.encode((request).toJson());
9138 }
9139 if (profileId == null) {
9140 throw new core.ArgumentError("Parameter profileId is required.");
9141 }
9142
9143 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem arketingLists';
9144
9145 var _response = _requester.request(_url,
9146 "POST",
9147 body: _body,
9148 queryParams: _queryParams,
9149 uploadOptions: _uploadOptions,
9150 uploadMedia: _uploadMedia,
9151 downloadOptions: _downloadOptions);
9152 return _response.then((data) => new RemarketingList.fromJson(data));
9153 }
9154
9155 /**
9156 * Retrieves a list of remarketing lists, possibly filtered. This method
9157 * supports paging.
9158 *
9159 * Request parameters:
9160 *
9161 * [profileId] - User profile ID associated with this request.
9162 *
9163 * [advertiserId] - Select only remarketing lists owned by this advertiser.
9164 *
9165 * [active] - Select only active or only inactive remarketing lists.
9166 *
9167 * [floodlightActivityId] - Select only remarketing lists that have this
9168 * floodlight activity ID.
9169 *
9170 * [maxResults] - Maximum number of results to return.
9171 *
9172 * [name] - Allows searching for objects by name or ID. Wildcards (*) are
9173 * allowed. For example, "remarketing list*2015" will return objects with
9174 * names like "remarketing list June 2015", "remarketing list April 2015", or
9175 * simply "remarketing list 2015". Most of the searches also add wildcards
9176 * implicitly at the start and the end of the search string. For example, a
9177 * search string of "remarketing list" will match objects with name "my
9178 * remarketing list", "remarketing list 2015", or simply "remarketing list".
9179 *
9180 * [pageToken] - Value of the nextPageToken from the previous result page.
9181 *
9182 * [sortField] - Field by which to sort the list.
9183 * Possible string values are:
9184 * - "ID"
9185 * - "NAME"
9186 *
9187 * [sortOrder] - Order of sorted results, default is ASCENDING.
9188 * Possible string values are:
9189 * - "ASCENDING"
9190 * - "DESCENDING"
9191 *
9192 * Completes with a [RemarketingListsListResponse].
9193 *
9194 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9195 * error.
9196 *
9197 * If the used [http.Client] completes with an error when making a REST call,
9198 * this method will complete with the same error.
9199 */
9200 async.Future<RemarketingListsListResponse> list(core.String profileId, core.St ring advertiserId, {core.bool active, core.String floodlightActivityId, core.int maxResults, core.String name, core.String pageToken, core.String sortField, cor e.String sortOrder}) {
9201 var _url = null;
9202 var _queryParams = new core.Map();
9203 var _uploadMedia = null;
9204 var _uploadOptions = null;
9205 var _downloadOptions = commons.DownloadOptions.Metadata;
9206 var _body = null;
9207
9208 if (profileId == null) {
9209 throw new core.ArgumentError("Parameter profileId is required.");
9210 }
9211 if (advertiserId == null) {
9212 throw new core.ArgumentError("Parameter advertiserId is required.");
9213 }
9214 _queryParams["advertiserId"] = [advertiserId];
9215 if (active != null) {
9216 _queryParams["active"] = ["${active}"];
9217 }
9218 if (floodlightActivityId != null) {
9219 _queryParams["floodlightActivityId"] = [floodlightActivityId];
9220 }
9221 if (maxResults != null) {
9222 _queryParams["maxResults"] = ["${maxResults}"];
9223 }
9224 if (name != null) {
9225 _queryParams["name"] = [name];
9226 }
9227 if (pageToken != null) {
9228 _queryParams["pageToken"] = [pageToken];
9229 }
9230 if (sortField != null) {
9231 _queryParams["sortField"] = [sortField];
9232 }
9233 if (sortOrder != null) {
9234 _queryParams["sortOrder"] = [sortOrder];
9235 }
9236
9237 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem arketingLists';
9238
9239 var _response = _requester.request(_url,
9240 "GET",
9241 body: _body,
9242 queryParams: _queryParams,
9243 uploadOptions: _uploadOptions,
9244 uploadMedia: _uploadMedia,
9245 downloadOptions: _downloadOptions);
9246 return _response.then((data) => new RemarketingListsListResponse.fromJson(da ta));
9247 }
9248
9249 /**
9250 * Updates an existing remarketing list. This method supports patch semantics.
9251 *
9252 * [request] - The metadata request object.
9253 *
9254 * Request parameters:
9255 *
9256 * [profileId] - User profile ID associated with this request.
9257 *
9258 * [id] - Remarketing list ID.
9259 *
9260 * Completes with a [RemarketingList].
9261 *
9262 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9263 * error.
9264 *
9265 * If the used [http.Client] completes with an error when making a REST call,
9266 * this method will complete with the same error.
9267 */
9268 async.Future<RemarketingList> patch(RemarketingList request, core.String profi leId, core.String id) {
9269 var _url = null;
9270 var _queryParams = new core.Map();
9271 var _uploadMedia = null;
9272 var _uploadOptions = null;
9273 var _downloadOptions = commons.DownloadOptions.Metadata;
9274 var _body = null;
9275
9276 if (request != null) {
9277 _body = convert.JSON.encode((request).toJson());
9278 }
9279 if (profileId == null) {
9280 throw new core.ArgumentError("Parameter profileId is required.");
9281 }
9282 if (id == null) {
9283 throw new core.ArgumentError("Parameter id is required.");
9284 }
9285 _queryParams["id"] = [id];
9286
9287 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem arketingLists';
9288
9289 var _response = _requester.request(_url,
9290 "PATCH",
9291 body: _body,
9292 queryParams: _queryParams,
9293 uploadOptions: _uploadOptions,
9294 uploadMedia: _uploadMedia,
9295 downloadOptions: _downloadOptions);
9296 return _response.then((data) => new RemarketingList.fromJson(data));
9297 }
9298
9299 /**
9300 * Updates an existing remarketing list.
9301 *
9302 * [request] - The metadata request object.
9303 *
9304 * Request parameters:
9305 *
9306 * [profileId] - User profile ID associated with this request.
9307 *
9308 * Completes with a [RemarketingList].
9309 *
9310 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9311 * error.
9312 *
9313 * If the used [http.Client] completes with an error when making a REST call,
9314 * this method will complete with the same error.
9315 */
9316 async.Future<RemarketingList> update(RemarketingList request, core.String prof ileId) {
9317 var _url = null;
9318 var _queryParams = new core.Map();
9319 var _uploadMedia = null;
9320 var _uploadOptions = null;
9321 var _downloadOptions = commons.DownloadOptions.Metadata;
9322 var _body = null;
9323
9324 if (request != null) {
9325 _body = convert.JSON.encode((request).toJson());
9326 }
9327 if (profileId == null) {
9328 throw new core.ArgumentError("Parameter profileId is required.");
9329 }
9330
9331 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rem arketingLists';
9332
9333 var _response = _requester.request(_url,
9334 "PUT",
9335 body: _body,
9336 queryParams: _queryParams,
9337 uploadOptions: _uploadOptions,
9338 uploadMedia: _uploadMedia,
9339 downloadOptions: _downloadOptions);
9340 return _response.then((data) => new RemarketingList.fromJson(data));
9341 }
9342
9343 }
9344
9345
9346 class ReportsResourceApi {
9347 final commons.ApiRequester _requester;
9348
9349 ReportsCompatibleFieldsResourceApi get compatibleFields => new ReportsCompatib leFieldsResourceApi(_requester);
9350 ReportsFilesResourceApi get files => new ReportsFilesResourceApi(_requester);
9351
9352 ReportsResourceApi(commons.ApiRequester client) :
9353 _requester = client;
9354
9355 /**
9356 * Deletes a report by its ID.
9357 *
9358 * Request parameters:
9359 *
9360 * [profileId] - The DFA user profile ID.
9361 *
9362 * [reportId] - The ID of the report.
9363 *
9364 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9365 * error.
9366 *
9367 * If the used [http.Client] completes with an error when making a REST call,
9368 * this method will complete with the same error.
9369 */
9370 async.Future delete(core.String profileId, core.String reportId) {
9371 var _url = null;
9372 var _queryParams = new core.Map();
9373 var _uploadMedia = null;
9374 var _uploadOptions = null;
9375 var _downloadOptions = commons.DownloadOptions.Metadata;
9376 var _body = null;
9377
9378 if (profileId == null) {
9379 throw new core.ArgumentError("Parameter profileId is required.");
9380 }
9381 if (reportId == null) {
9382 throw new core.ArgumentError("Parameter reportId is required.");
9383 }
9384
9385 _downloadOptions = null;
9386
9387 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts/' + commons.Escaper.ecapeVariable('$reportId');
9388
9389 var _response = _requester.request(_url,
9390 "DELETE",
9391 body: _body,
9392 queryParams: _queryParams,
9393 uploadOptions: _uploadOptions,
9394 uploadMedia: _uploadMedia,
9395 downloadOptions: _downloadOptions);
9396 return _response.then((data) => null);
9397 }
9398
9399 /**
9400 * Retrieves a report by its ID.
9401 *
9402 * Request parameters:
9403 *
9404 * [profileId] - The DFA user profile ID.
9405 *
9406 * [reportId] - The ID of the report.
9407 *
9408 * Completes with a [Report].
9409 *
9410 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9411 * error.
9412 *
9413 * If the used [http.Client] completes with an error when making a REST call,
9414 * this method will complete with the same error.
9415 */
9416 async.Future<Report> get(core.String profileId, core.String reportId) {
9417 var _url = null;
9418 var _queryParams = new core.Map();
9419 var _uploadMedia = null;
9420 var _uploadOptions = null;
9421 var _downloadOptions = commons.DownloadOptions.Metadata;
9422 var _body = null;
9423
9424 if (profileId == null) {
9425 throw new core.ArgumentError("Parameter profileId is required.");
9426 }
9427 if (reportId == null) {
9428 throw new core.ArgumentError("Parameter reportId is required.");
9429 }
9430
9431 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts/' + commons.Escaper.ecapeVariable('$reportId');
9432
9433 var _response = _requester.request(_url,
9434 "GET",
9435 body: _body,
9436 queryParams: _queryParams,
9437 uploadOptions: _uploadOptions,
9438 uploadMedia: _uploadMedia,
9439 downloadOptions: _downloadOptions);
9440 return _response.then((data) => new Report.fromJson(data));
9441 }
9442
9443 /**
9444 * Creates a report.
9445 *
9446 * [request] - The metadata request object.
9447 *
9448 * Request parameters:
9449 *
9450 * [profileId] - The DFA user profile ID.
9451 *
9452 * Completes with a [Report].
9453 *
9454 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9455 * error.
9456 *
9457 * If the used [http.Client] completes with an error when making a REST call,
9458 * this method will complete with the same error.
9459 */
9460 async.Future<Report> insert(Report request, core.String profileId) {
9461 var _url = null;
9462 var _queryParams = new core.Map();
9463 var _uploadMedia = null;
9464 var _uploadOptions = null;
9465 var _downloadOptions = commons.DownloadOptions.Metadata;
9466 var _body = null;
9467
9468 if (request != null) {
9469 _body = convert.JSON.encode((request).toJson());
9470 }
9471 if (profileId == null) {
9472 throw new core.ArgumentError("Parameter profileId is required.");
9473 }
9474
9475 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts';
9476
9477 var _response = _requester.request(_url,
9478 "POST",
9479 body: _body,
9480 queryParams: _queryParams,
9481 uploadOptions: _uploadOptions,
9482 uploadMedia: _uploadMedia,
9483 downloadOptions: _downloadOptions);
9484 return _response.then((data) => new Report.fromJson(data));
9485 }
9486
9487 /**
9488 * Retrieves list of reports.
9489 *
9490 * Request parameters:
9491 *
9492 * [profileId] - The DFA user profile ID.
9493 *
9494 * [maxResults] - Maximum number of results to return.
9495 * Value must be between "0" and "10".
9496 *
9497 * [pageToken] - The value of the nextToken from the previous result page.
9498 *
9499 * [scope] - The scope that defines which results are returned, default is
9500 * 'MINE'.
9501 * Possible string values are:
9502 * - "ALL" : All reports in account.
9503 * - "MINE" : My reports.
9504 *
9505 * [sortField] - The field by which to sort the list.
9506 * Possible string values are:
9507 * - "ID" : Sort by report ID.
9508 * - "LAST_MODIFIED_TIME" : Sort by 'lastModifiedTime' field.
9509 * - "NAME" : Sort by name of reports.
9510 *
9511 * [sortOrder] - Order of sorted results, default is 'DESCENDING'.
9512 * Possible string values are:
9513 * - "ASCENDING" : Ascending order.
9514 * - "DESCENDING" : Descending order.
9515 *
9516 * Completes with a [ReportList].
9517 *
9518 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9519 * error.
9520 *
9521 * If the used [http.Client] completes with an error when making a REST call,
9522 * this method will complete with the same error.
9523 */
9524 async.Future<ReportList> list(core.String profileId, {core.int maxResults, cor e.String pageToken, core.String scope, core.String sortField, core.String sortOr der}) {
9525 var _url = null;
9526 var _queryParams = new core.Map();
9527 var _uploadMedia = null;
9528 var _uploadOptions = null;
9529 var _downloadOptions = commons.DownloadOptions.Metadata;
9530 var _body = null;
9531
9532 if (profileId == null) {
9533 throw new core.ArgumentError("Parameter profileId is required.");
9534 }
9535 if (maxResults != null) {
9536 _queryParams["maxResults"] = ["${maxResults}"];
9537 }
9538 if (pageToken != null) {
9539 _queryParams["pageToken"] = [pageToken];
9540 }
9541 if (scope != null) {
9542 _queryParams["scope"] = [scope];
9543 }
9544 if (sortField != null) {
9545 _queryParams["sortField"] = [sortField];
9546 }
9547 if (sortOrder != null) {
9548 _queryParams["sortOrder"] = [sortOrder];
9549 }
9550
9551 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts';
9552
9553 var _response = _requester.request(_url,
9554 "GET",
9555 body: _body,
9556 queryParams: _queryParams,
9557 uploadOptions: _uploadOptions,
9558 uploadMedia: _uploadMedia,
9559 downloadOptions: _downloadOptions);
9560 return _response.then((data) => new ReportList.fromJson(data));
9561 }
9562
9563 /**
9564 * Updates a report. This method supports patch semantics.
9565 *
9566 * [request] - The metadata request object.
9567 *
9568 * Request parameters:
9569 *
9570 * [profileId] - The DFA user profile ID.
9571 *
9572 * [reportId] - The ID of the report.
9573 *
9574 * Completes with a [Report].
9575 *
9576 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9577 * error.
9578 *
9579 * If the used [http.Client] completes with an error when making a REST call,
9580 * this method will complete with the same error.
9581 */
9582 async.Future<Report> patch(Report request, core.String profileId, core.String reportId) {
9583 var _url = null;
9584 var _queryParams = new core.Map();
9585 var _uploadMedia = null;
9586 var _uploadOptions = null;
9587 var _downloadOptions = commons.DownloadOptions.Metadata;
9588 var _body = null;
9589
9590 if (request != null) {
9591 _body = convert.JSON.encode((request).toJson());
9592 }
9593 if (profileId == null) {
9594 throw new core.ArgumentError("Parameter profileId is required.");
9595 }
9596 if (reportId == null) {
9597 throw new core.ArgumentError("Parameter reportId is required.");
9598 }
9599
9600 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts/' + commons.Escaper.ecapeVariable('$reportId');
9601
9602 var _response = _requester.request(_url,
9603 "PATCH",
9604 body: _body,
9605 queryParams: _queryParams,
9606 uploadOptions: _uploadOptions,
9607 uploadMedia: _uploadMedia,
9608 downloadOptions: _downloadOptions);
9609 return _response.then((data) => new Report.fromJson(data));
9610 }
9611
9612 /**
9613 * Runs a report.
9614 *
9615 * Request parameters:
9616 *
9617 * [profileId] - The DFA profile ID.
9618 *
9619 * [reportId] - The ID of the report.
9620 *
9621 * [synchronous] - If set and true, tries to run the report synchronously.
9622 *
9623 * Completes with a [File].
9624 *
9625 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9626 * error.
9627 *
9628 * If the used [http.Client] completes with an error when making a REST call,
9629 * this method will complete with the same error.
9630 */
9631 async.Future<File> run(core.String profileId, core.String reportId, {core.bool synchronous}) {
9632 var _url = null;
9633 var _queryParams = new core.Map();
9634 var _uploadMedia = null;
9635 var _uploadOptions = null;
9636 var _downloadOptions = commons.DownloadOptions.Metadata;
9637 var _body = null;
9638
9639 if (profileId == null) {
9640 throw new core.ArgumentError("Parameter profileId is required.");
9641 }
9642 if (reportId == null) {
9643 throw new core.ArgumentError("Parameter reportId is required.");
9644 }
9645 if (synchronous != null) {
9646 _queryParams["synchronous"] = ["${synchronous}"];
9647 }
9648
9649 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts/' + commons.Escaper.ecapeVariable('$reportId') + '/run';
9650
9651 var _response = _requester.request(_url,
9652 "POST",
9653 body: _body,
9654 queryParams: _queryParams,
9655 uploadOptions: _uploadOptions,
9656 uploadMedia: _uploadMedia,
9657 downloadOptions: _downloadOptions);
9658 return _response.then((data) => new File.fromJson(data));
9659 }
9660
9661 /**
9662 * Updates a report.
9663 *
9664 * [request] - The metadata request object.
9665 *
9666 * Request parameters:
9667 *
9668 * [profileId] - The DFA user profile ID.
9669 *
9670 * [reportId] - The ID of the report.
9671 *
9672 * Completes with a [Report].
9673 *
9674 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9675 * error.
9676 *
9677 * If the used [http.Client] completes with an error when making a REST call,
9678 * this method will complete with the same error.
9679 */
9680 async.Future<Report> update(Report request, core.String profileId, core.String reportId) {
9681 var _url = null;
9682 var _queryParams = new core.Map();
9683 var _uploadMedia = null;
9684 var _uploadOptions = null;
9685 var _downloadOptions = commons.DownloadOptions.Metadata;
9686 var _body = null;
9687
9688 if (request != null) {
9689 _body = convert.JSON.encode((request).toJson());
9690 }
9691 if (profileId == null) {
9692 throw new core.ArgumentError("Parameter profileId is required.");
9693 }
9694 if (reportId == null) {
9695 throw new core.ArgumentError("Parameter reportId is required.");
9696 }
9697
9698 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts/' + commons.Escaper.ecapeVariable('$reportId');
9699
9700 var _response = _requester.request(_url,
9701 "PUT",
9702 body: _body,
9703 queryParams: _queryParams,
9704 uploadOptions: _uploadOptions,
9705 uploadMedia: _uploadMedia,
9706 downloadOptions: _downloadOptions);
9707 return _response.then((data) => new Report.fromJson(data));
9708 }
9709
9710 }
9711
9712
9713 class ReportsCompatibleFieldsResourceApi {
9714 final commons.ApiRequester _requester;
9715
9716 ReportsCompatibleFieldsResourceApi(commons.ApiRequester client) :
9717 _requester = client;
9718
9719 /**
9720 * Returns the fields that are compatible to be selected in the respective
9721 * sections of a report criteria, given the fields already selected in the
9722 * input report and user permissions.
9723 *
9724 * [request] - The metadata request object.
9725 *
9726 * Request parameters:
9727 *
9728 * [profileId] - The DFA user profile ID.
9729 *
9730 * Completes with a [CompatibleFields].
9731 *
9732 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9733 * error.
9734 *
9735 * If the used [http.Client] completes with an error when making a REST call,
9736 * this method will complete with the same error.
9737 */
9738 async.Future<CompatibleFields> query(Report request, core.String profileId) {
9739 var _url = null;
9740 var _queryParams = new core.Map();
9741 var _uploadMedia = null;
9742 var _uploadOptions = null;
9743 var _downloadOptions = commons.DownloadOptions.Metadata;
9744 var _body = null;
9745
9746 if (request != null) {
9747 _body = convert.JSON.encode((request).toJson());
9748 }
9749 if (profileId == null) {
9750 throw new core.ArgumentError("Parameter profileId is required.");
9751 }
9752
9753 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts/compatiblefields/query';
9754
9755 var _response = _requester.request(_url,
9756 "POST",
9757 body: _body,
9758 queryParams: _queryParams,
9759 uploadOptions: _uploadOptions,
9760 uploadMedia: _uploadMedia,
9761 downloadOptions: _downloadOptions);
9762 return _response.then((data) => new CompatibleFields.fromJson(data));
9763 }
9764
9765 }
9766
9767
9768 class ReportsFilesResourceApi {
9769 final commons.ApiRequester _requester;
9770
9771 ReportsFilesResourceApi(commons.ApiRequester client) :
9772 _requester = client;
9773
9774 /**
9775 * Retrieves a report file.
9776 *
9777 * Request parameters:
9778 *
9779 * [profileId] - The DFA profile ID.
9780 *
9781 * [reportId] - The ID of the report.
9782 *
9783 * [fileId] - The ID of the report file.
9784 *
9785 * [downloadOptions] - Options for downloading. A download can be either a
9786 * Metadata (default) or Media download. Partial Media downloads are possible
9787 * as well.
9788 *
9789 * Completes with a
9790 *
9791 * - [File] for Metadata downloads (see [downloadOptions]).
9792 *
9793 * - [commons.Media] for Media downloads (see [downloadOptions]).
9794 *
9795 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9796 * error.
9797 *
9798 * If the used [http.Client] completes with an error when making a REST call,
9799 * this method will complete with the same error.
9800 */
9801 async.Future get(core.String profileId, core.String reportId, core.String file Id, {commons.DownloadOptions downloadOptions: commons.DownloadOptions.Metadata}) {
9802 var _url = null;
9803 var _queryParams = new core.Map();
9804 var _uploadMedia = null;
9805 var _uploadOptions = null;
9806 var _downloadOptions = commons.DownloadOptions.Metadata;
9807 var _body = null;
9808
9809 if (profileId == null) {
9810 throw new core.ArgumentError("Parameter profileId is required.");
9811 }
9812 if (reportId == null) {
9813 throw new core.ArgumentError("Parameter reportId is required.");
9814 }
9815 if (fileId == null) {
9816 throw new core.ArgumentError("Parameter fileId is required.");
9817 }
9818
9819 _downloadOptions = downloadOptions;
9820
9821 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts/' + commons.Escaper.ecapeVariable('$reportId') + '/files/' + commons.Escape r.ecapeVariable('$fileId');
9822
9823 var _response = _requester.request(_url,
9824 "GET",
9825 body: _body,
9826 queryParams: _queryParams,
9827 uploadOptions: _uploadOptions,
9828 uploadMedia: _uploadMedia,
9829 downloadOptions: _downloadOptions);
9830 if (_downloadOptions == null ||
9831 _downloadOptions == commons.DownloadOptions.Metadata) {
9832 return _response.then((data) => new File.fromJson(data));
9833 } else {
9834 return _response;
9835 }
9836 }
9837
9838 /**
9839 * Lists files for a report.
9840 *
9841 * Request parameters:
9842 *
9843 * [profileId] - The DFA profile ID.
9844 *
9845 * [reportId] - The ID of the parent report.
9846 *
9847 * [maxResults] - Maximum number of results to return.
9848 * Value must be between "0" and "10".
9849 *
9850 * [pageToken] - The value of the nextToken from the previous result page.
9851 *
9852 * [sortField] - The field by which to sort the list.
9853 * Possible string values are:
9854 * - "ID" : Sort by file ID.
9855 * - "LAST_MODIFIED_TIME" : Sort by 'lastmodifiedAt' field.
9856 *
9857 * [sortOrder] - Order of sorted results, default is 'DESCENDING'.
9858 * Possible string values are:
9859 * - "ASCENDING" : Ascending order.
9860 * - "DESCENDING" : Descending order.
9861 *
9862 * Completes with a [FileList].
9863 *
9864 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9865 * error.
9866 *
9867 * If the used [http.Client] completes with an error when making a REST call,
9868 * this method will complete with the same error.
9869 */
9870 async.Future<FileList> list(core.String profileId, core.String reportId, {core .int maxResults, core.String pageToken, core.String sortField, core.String sortO rder}) {
9871 var _url = null;
9872 var _queryParams = new core.Map();
9873 var _uploadMedia = null;
9874 var _uploadOptions = null;
9875 var _downloadOptions = commons.DownloadOptions.Metadata;
9876 var _body = null;
9877
9878 if (profileId == null) {
9879 throw new core.ArgumentError("Parameter profileId is required.");
9880 }
9881 if (reportId == null) {
9882 throw new core.ArgumentError("Parameter reportId is required.");
9883 }
9884 if (maxResults != null) {
9885 _queryParams["maxResults"] = ["${maxResults}"];
9886 }
9887 if (pageToken != null) {
9888 _queryParams["pageToken"] = [pageToken];
9889 }
9890 if (sortField != null) {
9891 _queryParams["sortField"] = [sortField];
9892 }
9893 if (sortOrder != null) {
9894 _queryParams["sortOrder"] = [sortOrder];
9895 }
9896
9897 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/rep orts/' + commons.Escaper.ecapeVariable('$reportId') + '/files';
9898
9899 var _response = _requester.request(_url,
9900 "GET",
9901 body: _body,
9902 queryParams: _queryParams,
9903 uploadOptions: _uploadOptions,
9904 uploadMedia: _uploadMedia,
9905 downloadOptions: _downloadOptions);
9906 return _response.then((data) => new FileList.fromJson(data));
9907 }
9908
9909 }
9910
9911
9912 class SitesResourceApi {
9913 final commons.ApiRequester _requester;
9914
9915 SitesResourceApi(commons.ApiRequester client) :
9916 _requester = client;
9917
9918 /**
9919 * Gets one site by ID.
9920 *
9921 * Request parameters:
9922 *
9923 * [profileId] - User profile ID associated with this request.
9924 *
9925 * [id] - Site ID.
9926 *
9927 * Completes with a [Site].
9928 *
9929 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9930 * error.
9931 *
9932 * If the used [http.Client] completes with an error when making a REST call,
9933 * this method will complete with the same error.
9934 */
9935 async.Future<Site> get(core.String profileId, core.String id) {
9936 var _url = null;
9937 var _queryParams = new core.Map();
9938 var _uploadMedia = null;
9939 var _uploadOptions = null;
9940 var _downloadOptions = commons.DownloadOptions.Metadata;
9941 var _body = null;
9942
9943 if (profileId == null) {
9944 throw new core.ArgumentError("Parameter profileId is required.");
9945 }
9946 if (id == null) {
9947 throw new core.ArgumentError("Parameter id is required.");
9948 }
9949
9950 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit es/' + commons.Escaper.ecapeVariable('$id');
9951
9952 var _response = _requester.request(_url,
9953 "GET",
9954 body: _body,
9955 queryParams: _queryParams,
9956 uploadOptions: _uploadOptions,
9957 uploadMedia: _uploadMedia,
9958 downloadOptions: _downloadOptions);
9959 return _response.then((data) => new Site.fromJson(data));
9960 }
9961
9962 /**
9963 * Inserts a new site.
9964 *
9965 * [request] - The metadata request object.
9966 *
9967 * Request parameters:
9968 *
9969 * [profileId] - User profile ID associated with this request.
9970 *
9971 * Completes with a [Site].
9972 *
9973 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
9974 * error.
9975 *
9976 * If the used [http.Client] completes with an error when making a REST call,
9977 * this method will complete with the same error.
9978 */
9979 async.Future<Site> insert(Site request, core.String profileId) {
9980 var _url = null;
9981 var _queryParams = new core.Map();
9982 var _uploadMedia = null;
9983 var _uploadOptions = null;
9984 var _downloadOptions = commons.DownloadOptions.Metadata;
9985 var _body = null;
9986
9987 if (request != null) {
9988 _body = convert.JSON.encode((request).toJson());
9989 }
9990 if (profileId == null) {
9991 throw new core.ArgumentError("Parameter profileId is required.");
9992 }
9993
9994 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit es';
9995
9996 var _response = _requester.request(_url,
9997 "POST",
9998 body: _body,
9999 queryParams: _queryParams,
10000 uploadOptions: _uploadOptions,
10001 uploadMedia: _uploadMedia,
10002 downloadOptions: _downloadOptions);
10003 return _response.then((data) => new Site.fromJson(data));
10004 }
10005
10006 /**
10007 * Retrieves a list of sites, possibly filtered. This method supports paging.
10008 *
10009 * Request parameters:
10010 *
10011 * [profileId] - User profile ID associated with this request.
10012 *
10013 * [acceptsInStreamVideoPlacements] - This search filter is no longer
10014 * supported and will have no effect on the results returned.
10015 *
10016 * [acceptsInterstitialPlacements] - This search filter is no longer supported
10017 * and will have no effect on the results returned.
10018 *
10019 * [acceptsPublisherPaidPlacements] - Select only sites that accept publisher
10020 * paid placements.
10021 *
10022 * [adWordsSite] - Select only AdWords sites.
10023 *
10024 * [approved] - Select only approved sites.
10025 *
10026 * [campaignIds] - Select only sites with these campaign IDs.
10027 *
10028 * [directorySiteIds] - Select only sites with these directory site IDs.
10029 *
10030 * [ids] - Select only sites with these IDs.
10031 *
10032 * [maxResults] - Maximum number of results to return.
10033 *
10034 * [pageToken] - Value of the nextPageToken from the previous result page.
10035 *
10036 * [searchString] - Allows searching for objects by name, ID or keyName.
10037 * Wildcards (*) are allowed. For example, "site*2015" will return objects
10038 * with names like "site June 2015", "site April 2015", or simply "site 2015".
10039 * Most of the searches also add wildcards implicitly at the start and the end
10040 * of the search string. For example, a search string of "site" will match
10041 * objects with name "my site", "site 2015", or simply "site".
10042 *
10043 * [sortField] - Field by which to sort the list.
10044 * Possible string values are:
10045 * - "ID"
10046 * - "NAME"
10047 *
10048 * [sortOrder] - Order of sorted results, default is ASCENDING.
10049 * Possible string values are:
10050 * - "ASCENDING"
10051 * - "DESCENDING"
10052 *
10053 * [subaccountId] - Select only sites with this subaccount ID.
10054 *
10055 * [unmappedSite] - Select only sites that have not been mapped to a directory
10056 * site.
10057 *
10058 * Completes with a [SitesListResponse].
10059 *
10060 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10061 * error.
10062 *
10063 * If the used [http.Client] completes with an error when making a REST call,
10064 * this method will complete with the same error.
10065 */
10066 async.Future<SitesListResponse> list(core.String profileId, {core.bool accepts InStreamVideoPlacements, core.bool acceptsInterstitialPlacements, core.bool acce ptsPublisherPaidPlacements, core.bool adWordsSite, core.bool approved, core.List <core.String> campaignIds, core.List<core.String> directorySiteIds, core.List<co re.String> ids, core.int maxResults, core.String pageToken, core.String searchSt ring, core.String sortField, core.String sortOrder, core.String subaccountId, co re.bool unmappedSite}) {
10067 var _url = null;
10068 var _queryParams = new core.Map();
10069 var _uploadMedia = null;
10070 var _uploadOptions = null;
10071 var _downloadOptions = commons.DownloadOptions.Metadata;
10072 var _body = null;
10073
10074 if (profileId == null) {
10075 throw new core.ArgumentError("Parameter profileId is required.");
10076 }
10077 if (acceptsInStreamVideoPlacements != null) {
10078 _queryParams["acceptsInStreamVideoPlacements"] = ["${acceptsInStreamVideoP lacements}"];
10079 }
10080 if (acceptsInterstitialPlacements != null) {
10081 _queryParams["acceptsInterstitialPlacements"] = ["${acceptsInterstitialPla cements}"];
10082 }
10083 if (acceptsPublisherPaidPlacements != null) {
10084 _queryParams["acceptsPublisherPaidPlacements"] = ["${acceptsPublisherPaidP lacements}"];
10085 }
10086 if (adWordsSite != null) {
10087 _queryParams["adWordsSite"] = ["${adWordsSite}"];
10088 }
10089 if (approved != null) {
10090 _queryParams["approved"] = ["${approved}"];
10091 }
10092 if (campaignIds != null) {
10093 _queryParams["campaignIds"] = campaignIds;
10094 }
10095 if (directorySiteIds != null) {
10096 _queryParams["directorySiteIds"] = directorySiteIds;
10097 }
10098 if (ids != null) {
10099 _queryParams["ids"] = ids;
10100 }
10101 if (maxResults != null) {
10102 _queryParams["maxResults"] = ["${maxResults}"];
10103 }
10104 if (pageToken != null) {
10105 _queryParams["pageToken"] = [pageToken];
10106 }
10107 if (searchString != null) {
10108 _queryParams["searchString"] = [searchString];
10109 }
10110 if (sortField != null) {
10111 _queryParams["sortField"] = [sortField];
10112 }
10113 if (sortOrder != null) {
10114 _queryParams["sortOrder"] = [sortOrder];
10115 }
10116 if (subaccountId != null) {
10117 _queryParams["subaccountId"] = [subaccountId];
10118 }
10119 if (unmappedSite != null) {
10120 _queryParams["unmappedSite"] = ["${unmappedSite}"];
10121 }
10122
10123 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit es';
10124
10125 var _response = _requester.request(_url,
10126 "GET",
10127 body: _body,
10128 queryParams: _queryParams,
10129 uploadOptions: _uploadOptions,
10130 uploadMedia: _uploadMedia,
10131 downloadOptions: _downloadOptions);
10132 return _response.then((data) => new SitesListResponse.fromJson(data));
10133 }
10134
10135 /**
10136 * Updates an existing site. This method supports patch semantics.
10137 *
10138 * [request] - The metadata request object.
10139 *
10140 * Request parameters:
10141 *
10142 * [profileId] - User profile ID associated with this request.
10143 *
10144 * [id] - Site ID.
10145 *
10146 * Completes with a [Site].
10147 *
10148 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10149 * error.
10150 *
10151 * If the used [http.Client] completes with an error when making a REST call,
10152 * this method will complete with the same error.
10153 */
10154 async.Future<Site> patch(Site request, core.String profileId, core.String id) {
10155 var _url = null;
10156 var _queryParams = new core.Map();
10157 var _uploadMedia = null;
10158 var _uploadOptions = null;
10159 var _downloadOptions = commons.DownloadOptions.Metadata;
10160 var _body = null;
10161
10162 if (request != null) {
10163 _body = convert.JSON.encode((request).toJson());
10164 }
10165 if (profileId == null) {
10166 throw new core.ArgumentError("Parameter profileId is required.");
10167 }
10168 if (id == null) {
10169 throw new core.ArgumentError("Parameter id is required.");
10170 }
10171 _queryParams["id"] = [id];
10172
10173 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit es';
10174
10175 var _response = _requester.request(_url,
10176 "PATCH",
10177 body: _body,
10178 queryParams: _queryParams,
10179 uploadOptions: _uploadOptions,
10180 uploadMedia: _uploadMedia,
10181 downloadOptions: _downloadOptions);
10182 return _response.then((data) => new Site.fromJson(data));
10183 }
10184
10185 /**
10186 * Updates an existing site.
10187 *
10188 * [request] - The metadata request object.
10189 *
10190 * Request parameters:
10191 *
10192 * [profileId] - User profile ID associated with this request.
10193 *
10194 * Completes with a [Site].
10195 *
10196 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10197 * error.
10198 *
10199 * If the used [http.Client] completes with an error when making a REST call,
10200 * this method will complete with the same error.
10201 */
10202 async.Future<Site> update(Site request, core.String profileId) {
10203 var _url = null;
10204 var _queryParams = new core.Map();
10205 var _uploadMedia = null;
10206 var _uploadOptions = null;
10207 var _downloadOptions = commons.DownloadOptions.Metadata;
10208 var _body = null;
10209
10210 if (request != null) {
10211 _body = convert.JSON.encode((request).toJson());
10212 }
10213 if (profileId == null) {
10214 throw new core.ArgumentError("Parameter profileId is required.");
10215 }
10216
10217 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sit es';
10218
10219 var _response = _requester.request(_url,
10220 "PUT",
10221 body: _body,
10222 queryParams: _queryParams,
10223 uploadOptions: _uploadOptions,
10224 uploadMedia: _uploadMedia,
10225 downloadOptions: _downloadOptions);
10226 return _response.then((data) => new Site.fromJson(data));
10227 }
10228
10229 }
10230
10231
10232 class SizesResourceApi {
10233 final commons.ApiRequester _requester;
10234
10235 SizesResourceApi(commons.ApiRequester client) :
10236 _requester = client;
10237
10238 /**
10239 * Gets one size by ID.
10240 *
10241 * Request parameters:
10242 *
10243 * [profileId] - User profile ID associated with this request.
10244 *
10245 * [id] - Size ID.
10246 *
10247 * Completes with a [Size].
10248 *
10249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10250 * error.
10251 *
10252 * If the used [http.Client] completes with an error when making a REST call,
10253 * this method will complete with the same error.
10254 */
10255 async.Future<Size> get(core.String profileId, core.String id) {
10256 var _url = null;
10257 var _queryParams = new core.Map();
10258 var _uploadMedia = null;
10259 var _uploadOptions = null;
10260 var _downloadOptions = commons.DownloadOptions.Metadata;
10261 var _body = null;
10262
10263 if (profileId == null) {
10264 throw new core.ArgumentError("Parameter profileId is required.");
10265 }
10266 if (id == null) {
10267 throw new core.ArgumentError("Parameter id is required.");
10268 }
10269
10270 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/siz es/' + commons.Escaper.ecapeVariable('$id');
10271
10272 var _response = _requester.request(_url,
10273 "GET",
10274 body: _body,
10275 queryParams: _queryParams,
10276 uploadOptions: _uploadOptions,
10277 uploadMedia: _uploadMedia,
10278 downloadOptions: _downloadOptions);
10279 return _response.then((data) => new Size.fromJson(data));
10280 }
10281
10282 /**
10283 * Inserts a new size.
10284 *
10285 * [request] - The metadata request object.
10286 *
10287 * Request parameters:
10288 *
10289 * [profileId] - User profile ID associated with this request.
10290 *
10291 * Completes with a [Size].
10292 *
10293 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10294 * error.
10295 *
10296 * If the used [http.Client] completes with an error when making a REST call,
10297 * this method will complete with the same error.
10298 */
10299 async.Future<Size> insert(Size request, core.String profileId) {
10300 var _url = null;
10301 var _queryParams = new core.Map();
10302 var _uploadMedia = null;
10303 var _uploadOptions = null;
10304 var _downloadOptions = commons.DownloadOptions.Metadata;
10305 var _body = null;
10306
10307 if (request != null) {
10308 _body = convert.JSON.encode((request).toJson());
10309 }
10310 if (profileId == null) {
10311 throw new core.ArgumentError("Parameter profileId is required.");
10312 }
10313
10314 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/siz es';
10315
10316 var _response = _requester.request(_url,
10317 "POST",
10318 body: _body,
10319 queryParams: _queryParams,
10320 uploadOptions: _uploadOptions,
10321 uploadMedia: _uploadMedia,
10322 downloadOptions: _downloadOptions);
10323 return _response.then((data) => new Size.fromJson(data));
10324 }
10325
10326 /**
10327 * Retrieves a list of sizes, possibly filtered.
10328 *
10329 * Request parameters:
10330 *
10331 * [profileId] - User profile ID associated with this request.
10332 *
10333 * [height] - Select only sizes with this height.
10334 *
10335 * [iabStandard] - Select only IAB standard sizes.
10336 *
10337 * [ids] - Select only sizes with these IDs.
10338 *
10339 * [width] - Select only sizes with this width.
10340 *
10341 * Completes with a [SizesListResponse].
10342 *
10343 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10344 * error.
10345 *
10346 * If the used [http.Client] completes with an error when making a REST call,
10347 * this method will complete with the same error.
10348 */
10349 async.Future<SizesListResponse> list(core.String profileId, {core.int height, core.bool iabStandard, core.List<core.String> ids, core.int width}) {
10350 var _url = null;
10351 var _queryParams = new core.Map();
10352 var _uploadMedia = null;
10353 var _uploadOptions = null;
10354 var _downloadOptions = commons.DownloadOptions.Metadata;
10355 var _body = null;
10356
10357 if (profileId == null) {
10358 throw new core.ArgumentError("Parameter profileId is required.");
10359 }
10360 if (height != null) {
10361 _queryParams["height"] = ["${height}"];
10362 }
10363 if (iabStandard != null) {
10364 _queryParams["iabStandard"] = ["${iabStandard}"];
10365 }
10366 if (ids != null) {
10367 _queryParams["ids"] = ids;
10368 }
10369 if (width != null) {
10370 _queryParams["width"] = ["${width}"];
10371 }
10372
10373 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/siz es';
10374
10375 var _response = _requester.request(_url,
10376 "GET",
10377 body: _body,
10378 queryParams: _queryParams,
10379 uploadOptions: _uploadOptions,
10380 uploadMedia: _uploadMedia,
10381 downloadOptions: _downloadOptions);
10382 return _response.then((data) => new SizesListResponse.fromJson(data));
10383 }
10384
10385 }
10386
10387
10388 class SubaccountsResourceApi {
10389 final commons.ApiRequester _requester;
10390
10391 SubaccountsResourceApi(commons.ApiRequester client) :
10392 _requester = client;
10393
10394 /**
10395 * Gets one subaccount by ID.
10396 *
10397 * Request parameters:
10398 *
10399 * [profileId] - User profile ID associated with this request.
10400 *
10401 * [id] - Subaccount ID.
10402 *
10403 * Completes with a [Subaccount].
10404 *
10405 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10406 * error.
10407 *
10408 * If the used [http.Client] completes with an error when making a REST call,
10409 * this method will complete with the same error.
10410 */
10411 async.Future<Subaccount> get(core.String profileId, core.String id) {
10412 var _url = null;
10413 var _queryParams = new core.Map();
10414 var _uploadMedia = null;
10415 var _uploadOptions = null;
10416 var _downloadOptions = commons.DownloadOptions.Metadata;
10417 var _body = null;
10418
10419 if (profileId == null) {
10420 throw new core.ArgumentError("Parameter profileId is required.");
10421 }
10422 if (id == null) {
10423 throw new core.ArgumentError("Parameter id is required.");
10424 }
10425
10426 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub accounts/' + commons.Escaper.ecapeVariable('$id');
10427
10428 var _response = _requester.request(_url,
10429 "GET",
10430 body: _body,
10431 queryParams: _queryParams,
10432 uploadOptions: _uploadOptions,
10433 uploadMedia: _uploadMedia,
10434 downloadOptions: _downloadOptions);
10435 return _response.then((data) => new Subaccount.fromJson(data));
10436 }
10437
10438 /**
10439 * Inserts a new subaccount.
10440 *
10441 * [request] - The metadata request object.
10442 *
10443 * Request parameters:
10444 *
10445 * [profileId] - User profile ID associated with this request.
10446 *
10447 * Completes with a [Subaccount].
10448 *
10449 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10450 * error.
10451 *
10452 * If the used [http.Client] completes with an error when making a REST call,
10453 * this method will complete with the same error.
10454 */
10455 async.Future<Subaccount> insert(Subaccount request, core.String profileId) {
10456 var _url = null;
10457 var _queryParams = new core.Map();
10458 var _uploadMedia = null;
10459 var _uploadOptions = null;
10460 var _downloadOptions = commons.DownloadOptions.Metadata;
10461 var _body = null;
10462
10463 if (request != null) {
10464 _body = convert.JSON.encode((request).toJson());
10465 }
10466 if (profileId == null) {
10467 throw new core.ArgumentError("Parameter profileId is required.");
10468 }
10469
10470 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub accounts';
10471
10472 var _response = _requester.request(_url,
10473 "POST",
10474 body: _body,
10475 queryParams: _queryParams,
10476 uploadOptions: _uploadOptions,
10477 uploadMedia: _uploadMedia,
10478 downloadOptions: _downloadOptions);
10479 return _response.then((data) => new Subaccount.fromJson(data));
10480 }
10481
10482 /**
10483 * Gets a list of subaccounts, possibly filtered. This method supports paging.
10484 *
10485 * Request parameters:
10486 *
10487 * [profileId] - User profile ID associated with this request.
10488 *
10489 * [ids] - Select only subaccounts with these IDs.
10490 *
10491 * [maxResults] - Maximum number of results to return.
10492 *
10493 * [pageToken] - Value of the nextPageToken from the previous result page.
10494 *
10495 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
10496 * are allowed. For example, "subaccount*2015" will return objects with names
10497 * like "subaccount June 2015", "subaccount April 2015", or simply "subaccount
10498 * 2015". Most of the searches also add wildcards implicitly at the start and
10499 * the end of the search string. For example, a search string of "subaccount"
10500 * will match objects with name "my subaccount", "subaccount 2015", or simply
10501 * "subaccount".
10502 *
10503 * [sortField] - Field by which to sort the list.
10504 * Possible string values are:
10505 * - "ID"
10506 * - "NAME"
10507 *
10508 * [sortOrder] - Order of sorted results, default is ASCENDING.
10509 * Possible string values are:
10510 * - "ASCENDING"
10511 * - "DESCENDING"
10512 *
10513 * Completes with a [SubaccountsListResponse].
10514 *
10515 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10516 * error.
10517 *
10518 * If the used [http.Client] completes with an error when making a REST call,
10519 * this method will complete with the same error.
10520 */
10521 async.Future<SubaccountsListResponse> list(core.String profileId, {core.List<c ore.String> ids, core.int maxResults, core.String pageToken, core.String searchS tring, core.String sortField, core.String sortOrder}) {
10522 var _url = null;
10523 var _queryParams = new core.Map();
10524 var _uploadMedia = null;
10525 var _uploadOptions = null;
10526 var _downloadOptions = commons.DownloadOptions.Metadata;
10527 var _body = null;
10528
10529 if (profileId == null) {
10530 throw new core.ArgumentError("Parameter profileId is required.");
10531 }
10532 if (ids != null) {
10533 _queryParams["ids"] = ids;
10534 }
10535 if (maxResults != null) {
10536 _queryParams["maxResults"] = ["${maxResults}"];
10537 }
10538 if (pageToken != null) {
10539 _queryParams["pageToken"] = [pageToken];
10540 }
10541 if (searchString != null) {
10542 _queryParams["searchString"] = [searchString];
10543 }
10544 if (sortField != null) {
10545 _queryParams["sortField"] = [sortField];
10546 }
10547 if (sortOrder != null) {
10548 _queryParams["sortOrder"] = [sortOrder];
10549 }
10550
10551 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub accounts';
10552
10553 var _response = _requester.request(_url,
10554 "GET",
10555 body: _body,
10556 queryParams: _queryParams,
10557 uploadOptions: _uploadOptions,
10558 uploadMedia: _uploadMedia,
10559 downloadOptions: _downloadOptions);
10560 return _response.then((data) => new SubaccountsListResponse.fromJson(data));
10561 }
10562
10563 /**
10564 * Updates an existing subaccount. This method supports patch semantics.
10565 *
10566 * [request] - The metadata request object.
10567 *
10568 * Request parameters:
10569 *
10570 * [profileId] - User profile ID associated with this request.
10571 *
10572 * [id] - Subaccount ID.
10573 *
10574 * Completes with a [Subaccount].
10575 *
10576 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10577 * error.
10578 *
10579 * If the used [http.Client] completes with an error when making a REST call,
10580 * this method will complete with the same error.
10581 */
10582 async.Future<Subaccount> patch(Subaccount request, core.String profileId, core .String id) {
10583 var _url = null;
10584 var _queryParams = new core.Map();
10585 var _uploadMedia = null;
10586 var _uploadOptions = null;
10587 var _downloadOptions = commons.DownloadOptions.Metadata;
10588 var _body = null;
10589
10590 if (request != null) {
10591 _body = convert.JSON.encode((request).toJson());
10592 }
10593 if (profileId == null) {
10594 throw new core.ArgumentError("Parameter profileId is required.");
10595 }
10596 if (id == null) {
10597 throw new core.ArgumentError("Parameter id is required.");
10598 }
10599 _queryParams["id"] = [id];
10600
10601 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub accounts';
10602
10603 var _response = _requester.request(_url,
10604 "PATCH",
10605 body: _body,
10606 queryParams: _queryParams,
10607 uploadOptions: _uploadOptions,
10608 uploadMedia: _uploadMedia,
10609 downloadOptions: _downloadOptions);
10610 return _response.then((data) => new Subaccount.fromJson(data));
10611 }
10612
10613 /**
10614 * Updates an existing subaccount.
10615 *
10616 * [request] - The metadata request object.
10617 *
10618 * Request parameters:
10619 *
10620 * [profileId] - User profile ID associated with this request.
10621 *
10622 * Completes with a [Subaccount].
10623 *
10624 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10625 * error.
10626 *
10627 * If the used [http.Client] completes with an error when making a REST call,
10628 * this method will complete with the same error.
10629 */
10630 async.Future<Subaccount> update(Subaccount request, core.String profileId) {
10631 var _url = null;
10632 var _queryParams = new core.Map();
10633 var _uploadMedia = null;
10634 var _uploadOptions = null;
10635 var _downloadOptions = commons.DownloadOptions.Metadata;
10636 var _body = null;
10637
10638 if (request != null) {
10639 _body = convert.JSON.encode((request).toJson());
10640 }
10641 if (profileId == null) {
10642 throw new core.ArgumentError("Parameter profileId is required.");
10643 }
10644
10645 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/sub accounts';
10646
10647 var _response = _requester.request(_url,
10648 "PUT",
10649 body: _body,
10650 queryParams: _queryParams,
10651 uploadOptions: _uploadOptions,
10652 uploadMedia: _uploadMedia,
10653 downloadOptions: _downloadOptions);
10654 return _response.then((data) => new Subaccount.fromJson(data));
10655 }
10656
10657 }
10658
10659
10660 class TargetableRemarketingListsResourceApi {
10661 final commons.ApiRequester _requester;
10662
10663 TargetableRemarketingListsResourceApi(commons.ApiRequester client) :
10664 _requester = client;
10665
10666 /**
10667 * Gets one remarketing list by ID.
10668 *
10669 * Request parameters:
10670 *
10671 * [profileId] - User profile ID associated with this request.
10672 *
10673 * [id] - Remarketing list ID.
10674 *
10675 * Completes with a [TargetableRemarketingList].
10676 *
10677 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10678 * error.
10679 *
10680 * If the used [http.Client] completes with an error when making a REST call,
10681 * this method will complete with the same error.
10682 */
10683 async.Future<TargetableRemarketingList> get(core.String profileId, core.String id) {
10684 var _url = null;
10685 var _queryParams = new core.Map();
10686 var _uploadMedia = null;
10687 var _uploadOptions = null;
10688 var _downloadOptions = commons.DownloadOptions.Metadata;
10689 var _body = null;
10690
10691 if (profileId == null) {
10692 throw new core.ArgumentError("Parameter profileId is required.");
10693 }
10694 if (id == null) {
10695 throw new core.ArgumentError("Parameter id is required.");
10696 }
10697
10698 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/tar getableRemarketingLists/' + commons.Escaper.ecapeVariable('$id');
10699
10700 var _response = _requester.request(_url,
10701 "GET",
10702 body: _body,
10703 queryParams: _queryParams,
10704 uploadOptions: _uploadOptions,
10705 uploadMedia: _uploadMedia,
10706 downloadOptions: _downloadOptions);
10707 return _response.then((data) => new TargetableRemarketingList.fromJson(data) );
10708 }
10709
10710 /**
10711 * Retrieves a list of targetable remarketing lists, possibly filtered. This
10712 * method supports paging.
10713 *
10714 * Request parameters:
10715 *
10716 * [profileId] - User profile ID associated with this request.
10717 *
10718 * [advertiserId] - Select only targetable remarketing lists targetable by
10719 * these advertisers.
10720 *
10721 * [active] - Select only active or only inactive targetable remarketing
10722 * lists.
10723 *
10724 * [maxResults] - Maximum number of results to return.
10725 *
10726 * [name] - Allows searching for objects by name or ID. Wildcards (*) are
10727 * allowed. For example, "remarketing list*2015" will return objects with
10728 * names like "remarketing list June 2015", "remarketing list April 2015", or
10729 * simply "remarketing list 2015". Most of the searches also add wildcards
10730 * implicitly at the start and the end of the search string. For example, a
10731 * search string of "remarketing list" will match objects with name "my
10732 * remarketing list", "remarketing list 2015", or simply "remarketing list".
10733 *
10734 * [pageToken] - Value of the nextPageToken from the previous result page.
10735 *
10736 * [sortField] - Field by which to sort the list.
10737 * Possible string values are:
10738 * - "ID"
10739 * - "NAME"
10740 *
10741 * [sortOrder] - Order of sorted results, default is ASCENDING.
10742 * Possible string values are:
10743 * - "ASCENDING"
10744 * - "DESCENDING"
10745 *
10746 * Completes with a [TargetableRemarketingListsListResponse].
10747 *
10748 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10749 * error.
10750 *
10751 * If the used [http.Client] completes with an error when making a REST call,
10752 * this method will complete with the same error.
10753 */
10754 async.Future<TargetableRemarketingListsListResponse> list(core.String profileI d, core.String advertiserId, {core.bool active, core.int maxResults, core.String name, core.String pageToken, core.String sortField, core.String sortOrder}) {
10755 var _url = null;
10756 var _queryParams = new core.Map();
10757 var _uploadMedia = null;
10758 var _uploadOptions = null;
10759 var _downloadOptions = commons.DownloadOptions.Metadata;
10760 var _body = null;
10761
10762 if (profileId == null) {
10763 throw new core.ArgumentError("Parameter profileId is required.");
10764 }
10765 if (advertiserId == null) {
10766 throw new core.ArgumentError("Parameter advertiserId is required.");
10767 }
10768 _queryParams["advertiserId"] = [advertiserId];
10769 if (active != null) {
10770 _queryParams["active"] = ["${active}"];
10771 }
10772 if (maxResults != null) {
10773 _queryParams["maxResults"] = ["${maxResults}"];
10774 }
10775 if (name != null) {
10776 _queryParams["name"] = [name];
10777 }
10778 if (pageToken != null) {
10779 _queryParams["pageToken"] = [pageToken];
10780 }
10781 if (sortField != null) {
10782 _queryParams["sortField"] = [sortField];
10783 }
10784 if (sortOrder != null) {
10785 _queryParams["sortOrder"] = [sortOrder];
10786 }
10787
10788 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/tar getableRemarketingLists';
10789
10790 var _response = _requester.request(_url,
10791 "GET",
10792 body: _body,
10793 queryParams: _queryParams,
10794 uploadOptions: _uploadOptions,
10795 uploadMedia: _uploadMedia,
10796 downloadOptions: _downloadOptions);
10797 return _response.then((data) => new TargetableRemarketingListsListResponse.f romJson(data));
10798 }
10799
10800 }
10801
10802
10803 class UserProfilesResourceApi {
10804 final commons.ApiRequester _requester;
10805
10806 UserProfilesResourceApi(commons.ApiRequester client) :
10807 _requester = client;
10808
10809 /**
10810 * Gets one user profile by ID.
10811 *
10812 * Request parameters:
10813 *
10814 * [profileId] - The user profile ID.
10815 *
10816 * Completes with a [UserProfile].
10817 *
10818 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10819 * error.
10820 *
10821 * If the used [http.Client] completes with an error when making a REST call,
10822 * this method will complete with the same error.
10823 */
10824 async.Future<UserProfile> get(core.String profileId) {
10825 var _url = null;
10826 var _queryParams = new core.Map();
10827 var _uploadMedia = null;
10828 var _uploadOptions = null;
10829 var _downloadOptions = commons.DownloadOptions.Metadata;
10830 var _body = null;
10831
10832 if (profileId == null) {
10833 throw new core.ArgumentError("Parameter profileId is required.");
10834 }
10835
10836 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId');
10837
10838 var _response = _requester.request(_url,
10839 "GET",
10840 body: _body,
10841 queryParams: _queryParams,
10842 uploadOptions: _uploadOptions,
10843 uploadMedia: _uploadMedia,
10844 downloadOptions: _downloadOptions);
10845 return _response.then((data) => new UserProfile.fromJson(data));
10846 }
10847
10848 /**
10849 * Retrieves list of user profiles for a user.
10850 *
10851 * Request parameters:
10852 *
10853 * Completes with a [UserProfileList].
10854 *
10855 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10856 * error.
10857 *
10858 * If the used [http.Client] completes with an error when making a REST call,
10859 * this method will complete with the same error.
10860 */
10861 async.Future<UserProfileList> list() {
10862 var _url = null;
10863 var _queryParams = new core.Map();
10864 var _uploadMedia = null;
10865 var _uploadOptions = null;
10866 var _downloadOptions = commons.DownloadOptions.Metadata;
10867 var _body = null;
10868
10869
10870 _url = 'userprofiles';
10871
10872 var _response = _requester.request(_url,
10873 "GET",
10874 body: _body,
10875 queryParams: _queryParams,
10876 uploadOptions: _uploadOptions,
10877 uploadMedia: _uploadMedia,
10878 downloadOptions: _downloadOptions);
10879 return _response.then((data) => new UserProfileList.fromJson(data));
10880 }
10881
10882 }
10883
10884
10885 class UserRolePermissionGroupsResourceApi {
10886 final commons.ApiRequester _requester;
10887
10888 UserRolePermissionGroupsResourceApi(commons.ApiRequester client) :
10889 _requester = client;
10890
10891 /**
10892 * Gets one user role permission group by ID.
10893 *
10894 * Request parameters:
10895 *
10896 * [profileId] - User profile ID associated with this request.
10897 *
10898 * [id] - User role permission group ID.
10899 *
10900 * Completes with a [UserRolePermissionGroup].
10901 *
10902 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10903 * error.
10904 *
10905 * If the used [http.Client] completes with an error when making a REST call,
10906 * this method will complete with the same error.
10907 */
10908 async.Future<UserRolePermissionGroup> get(core.String profileId, core.String i d) {
10909 var _url = null;
10910 var _queryParams = new core.Map();
10911 var _uploadMedia = null;
10912 var _uploadOptions = null;
10913 var _downloadOptions = commons.DownloadOptions.Metadata;
10914 var _body = null;
10915
10916 if (profileId == null) {
10917 throw new core.ArgumentError("Parameter profileId is required.");
10918 }
10919 if (id == null) {
10920 throw new core.ArgumentError("Parameter id is required.");
10921 }
10922
10923 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRolePermissionGroups/' + commons.Escaper.ecapeVariable('$id');
10924
10925 var _response = _requester.request(_url,
10926 "GET",
10927 body: _body,
10928 queryParams: _queryParams,
10929 uploadOptions: _uploadOptions,
10930 uploadMedia: _uploadMedia,
10931 downloadOptions: _downloadOptions);
10932 return _response.then((data) => new UserRolePermissionGroup.fromJson(data));
10933 }
10934
10935 /**
10936 * Gets a list of all supported user role permission groups.
10937 *
10938 * Request parameters:
10939 *
10940 * [profileId] - User profile ID associated with this request.
10941 *
10942 * Completes with a [UserRolePermissionGroupsListResponse].
10943 *
10944 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10945 * error.
10946 *
10947 * If the used [http.Client] completes with an error when making a REST call,
10948 * this method will complete with the same error.
10949 */
10950 async.Future<UserRolePermissionGroupsListResponse> list(core.String profileId) {
10951 var _url = null;
10952 var _queryParams = new core.Map();
10953 var _uploadMedia = null;
10954 var _uploadOptions = null;
10955 var _downloadOptions = commons.DownloadOptions.Metadata;
10956 var _body = null;
10957
10958 if (profileId == null) {
10959 throw new core.ArgumentError("Parameter profileId is required.");
10960 }
10961
10962 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRolePermissionGroups';
10963
10964 var _response = _requester.request(_url,
10965 "GET",
10966 body: _body,
10967 queryParams: _queryParams,
10968 uploadOptions: _uploadOptions,
10969 uploadMedia: _uploadMedia,
10970 downloadOptions: _downloadOptions);
10971 return _response.then((data) => new UserRolePermissionGroupsListResponse.fro mJson(data));
10972 }
10973
10974 }
10975
10976
10977 class UserRolePermissionsResourceApi {
10978 final commons.ApiRequester _requester;
10979
10980 UserRolePermissionsResourceApi(commons.ApiRequester client) :
10981 _requester = client;
10982
10983 /**
10984 * Gets one user role permission by ID.
10985 *
10986 * Request parameters:
10987 *
10988 * [profileId] - User profile ID associated with this request.
10989 *
10990 * [id] - User role permission ID.
10991 *
10992 * Completes with a [UserRolePermission].
10993 *
10994 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
10995 * error.
10996 *
10997 * If the used [http.Client] completes with an error when making a REST call,
10998 * this method will complete with the same error.
10999 */
11000 async.Future<UserRolePermission> get(core.String profileId, core.String id) {
11001 var _url = null;
11002 var _queryParams = new core.Map();
11003 var _uploadMedia = null;
11004 var _uploadOptions = null;
11005 var _downloadOptions = commons.DownloadOptions.Metadata;
11006 var _body = null;
11007
11008 if (profileId == null) {
11009 throw new core.ArgumentError("Parameter profileId is required.");
11010 }
11011 if (id == null) {
11012 throw new core.ArgumentError("Parameter id is required.");
11013 }
11014
11015 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRolePermissions/' + commons.Escaper.ecapeVariable('$id');
11016
11017 var _response = _requester.request(_url,
11018 "GET",
11019 body: _body,
11020 queryParams: _queryParams,
11021 uploadOptions: _uploadOptions,
11022 uploadMedia: _uploadMedia,
11023 downloadOptions: _downloadOptions);
11024 return _response.then((data) => new UserRolePermission.fromJson(data));
11025 }
11026
11027 /**
11028 * Gets a list of user role permissions, possibly filtered.
11029 *
11030 * Request parameters:
11031 *
11032 * [profileId] - User profile ID associated with this request.
11033 *
11034 * [ids] - Select only user role permissions with these IDs.
11035 *
11036 * Completes with a [UserRolePermissionsListResponse].
11037 *
11038 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
11039 * error.
11040 *
11041 * If the used [http.Client] completes with an error when making a REST call,
11042 * this method will complete with the same error.
11043 */
11044 async.Future<UserRolePermissionsListResponse> list(core.String profileId, {cor e.List<core.String> ids}) {
11045 var _url = null;
11046 var _queryParams = new core.Map();
11047 var _uploadMedia = null;
11048 var _uploadOptions = null;
11049 var _downloadOptions = commons.DownloadOptions.Metadata;
11050 var _body = null;
11051
11052 if (profileId == null) {
11053 throw new core.ArgumentError("Parameter profileId is required.");
11054 }
11055 if (ids != null) {
11056 _queryParams["ids"] = ids;
11057 }
11058
11059 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRolePermissions';
11060
11061 var _response = _requester.request(_url,
11062 "GET",
11063 body: _body,
11064 queryParams: _queryParams,
11065 uploadOptions: _uploadOptions,
11066 uploadMedia: _uploadMedia,
11067 downloadOptions: _downloadOptions);
11068 return _response.then((data) => new UserRolePermissionsListResponse.fromJson (data));
11069 }
11070
11071 }
11072
11073
11074 class UserRolesResourceApi {
11075 final commons.ApiRequester _requester;
11076
11077 UserRolesResourceApi(commons.ApiRequester client) :
11078 _requester = client;
11079
11080 /**
11081 * Deletes an existing user role.
11082 *
11083 * Request parameters:
11084 *
11085 * [profileId] - User profile ID associated with this request.
11086 *
11087 * [id] - User role ID.
11088 *
11089 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
11090 * error.
11091 *
11092 * If the used [http.Client] completes with an error when making a REST call,
11093 * this method will complete with the same error.
11094 */
11095 async.Future delete(core.String profileId, core.String id) {
11096 var _url = null;
11097 var _queryParams = new core.Map();
11098 var _uploadMedia = null;
11099 var _uploadOptions = null;
11100 var _downloadOptions = commons.DownloadOptions.Metadata;
11101 var _body = null;
11102
11103 if (profileId == null) {
11104 throw new core.ArgumentError("Parameter profileId is required.");
11105 }
11106 if (id == null) {
11107 throw new core.ArgumentError("Parameter id is required.");
11108 }
11109
11110 _downloadOptions = null;
11111
11112 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRoles/' + commons.Escaper.ecapeVariable('$id');
11113
11114 var _response = _requester.request(_url,
11115 "DELETE",
11116 body: _body,
11117 queryParams: _queryParams,
11118 uploadOptions: _uploadOptions,
11119 uploadMedia: _uploadMedia,
11120 downloadOptions: _downloadOptions);
11121 return _response.then((data) => null);
11122 }
11123
11124 /**
11125 * Gets one user role by ID.
11126 *
11127 * Request parameters:
11128 *
11129 * [profileId] - User profile ID associated with this request.
11130 *
11131 * [id] - User role ID.
11132 *
11133 * Completes with a [UserRole].
11134 *
11135 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
11136 * error.
11137 *
11138 * If the used [http.Client] completes with an error when making a REST call,
11139 * this method will complete with the same error.
11140 */
11141 async.Future<UserRole> get(core.String profileId, core.String id) {
11142 var _url = null;
11143 var _queryParams = new core.Map();
11144 var _uploadMedia = null;
11145 var _uploadOptions = null;
11146 var _downloadOptions = commons.DownloadOptions.Metadata;
11147 var _body = null;
11148
11149 if (profileId == null) {
11150 throw new core.ArgumentError("Parameter profileId is required.");
11151 }
11152 if (id == null) {
11153 throw new core.ArgumentError("Parameter id is required.");
11154 }
11155
11156 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRoles/' + commons.Escaper.ecapeVariable('$id');
11157
11158 var _response = _requester.request(_url,
11159 "GET",
11160 body: _body,
11161 queryParams: _queryParams,
11162 uploadOptions: _uploadOptions,
11163 uploadMedia: _uploadMedia,
11164 downloadOptions: _downloadOptions);
11165 return _response.then((data) => new UserRole.fromJson(data));
11166 }
11167
11168 /**
11169 * Inserts a new user role.
11170 *
11171 * [request] - The metadata request object.
11172 *
11173 * Request parameters:
11174 *
11175 * [profileId] - User profile ID associated with this request.
11176 *
11177 * Completes with a [UserRole].
11178 *
11179 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
11180 * error.
11181 *
11182 * If the used [http.Client] completes with an error when making a REST call,
11183 * this method will complete with the same error.
11184 */
11185 async.Future<UserRole> insert(UserRole request, core.String profileId) {
11186 var _url = null;
11187 var _queryParams = new core.Map();
11188 var _uploadMedia = null;
11189 var _uploadOptions = null;
11190 var _downloadOptions = commons.DownloadOptions.Metadata;
11191 var _body = null;
11192
11193 if (request != null) {
11194 _body = convert.JSON.encode((request).toJson());
11195 }
11196 if (profileId == null) {
11197 throw new core.ArgumentError("Parameter profileId is required.");
11198 }
11199
11200 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRoles';
11201
11202 var _response = _requester.request(_url,
11203 "POST",
11204 body: _body,
11205 queryParams: _queryParams,
11206 uploadOptions: _uploadOptions,
11207 uploadMedia: _uploadMedia,
11208 downloadOptions: _downloadOptions);
11209 return _response.then((data) => new UserRole.fromJson(data));
11210 }
11211
11212 /**
11213 * Retrieves a list of user roles, possibly filtered. This method supports
11214 * paging.
11215 *
11216 * Request parameters:
11217 *
11218 * [profileId] - User profile ID associated with this request.
11219 *
11220 * [accountUserRoleOnly] - Select only account level user roles not associated
11221 * with any specific subaccount.
11222 *
11223 * [ids] - Select only user roles with the specified IDs.
11224 *
11225 * [maxResults] - Maximum number of results to return.
11226 *
11227 * [pageToken] - Value of the nextPageToken from the previous result page.
11228 *
11229 * [searchString] - Allows searching for objects by name or ID. Wildcards (*)
11230 * are allowed. For example, "userrole*2015" will return objects with names
11231 * like "userrole June 2015", "userrole April 2015", or simply "userrole
11232 * 2015". Most of the searches also add wildcards implicitly at the start and
11233 * the end of the search string. For example, a search string of "userrole"
11234 * will match objects with name "my userrole", "userrole 2015", or simply
11235 * "userrole".
11236 *
11237 * [sortField] - Field by which to sort the list.
11238 * Possible string values are:
11239 * - "ID"
11240 * - "NAME"
11241 *
11242 * [sortOrder] - Order of sorted results, default is ASCENDING.
11243 * Possible string values are:
11244 * - "ASCENDING"
11245 * - "DESCENDING"
11246 *
11247 * [subaccountId] - Select only user roles that belong to this subaccount.
11248 *
11249 * Completes with a [UserRolesListResponse].
11250 *
11251 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
11252 * error.
11253 *
11254 * If the used [http.Client] completes with an error when making a REST call,
11255 * this method will complete with the same error.
11256 */
11257 async.Future<UserRolesListResponse> list(core.String profileId, {core.bool acc ountUserRoleOnly, core.List<core.String> ids, core.int maxResults, core.String p ageToken, core.String searchString, core.String sortField, core.String sortOrder , core.String subaccountId}) {
11258 var _url = null;
11259 var _queryParams = new core.Map();
11260 var _uploadMedia = null;
11261 var _uploadOptions = null;
11262 var _downloadOptions = commons.DownloadOptions.Metadata;
11263 var _body = null;
11264
11265 if (profileId == null) {
11266 throw new core.ArgumentError("Parameter profileId is required.");
11267 }
11268 if (accountUserRoleOnly != null) {
11269 _queryParams["accountUserRoleOnly"] = ["${accountUserRoleOnly}"];
11270 }
11271 if (ids != null) {
11272 _queryParams["ids"] = ids;
11273 }
11274 if (maxResults != null) {
11275 _queryParams["maxResults"] = ["${maxResults}"];
11276 }
11277 if (pageToken != null) {
11278 _queryParams["pageToken"] = [pageToken];
11279 }
11280 if (searchString != null) {
11281 _queryParams["searchString"] = [searchString];
11282 }
11283 if (sortField != null) {
11284 _queryParams["sortField"] = [sortField];
11285 }
11286 if (sortOrder != null) {
11287 _queryParams["sortOrder"] = [sortOrder];
11288 }
11289 if (subaccountId != null) {
11290 _queryParams["subaccountId"] = [subaccountId];
11291 }
11292
11293 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRoles';
11294
11295 var _response = _requester.request(_url,
11296 "GET",
11297 body: _body,
11298 queryParams: _queryParams,
11299 uploadOptions: _uploadOptions,
11300 uploadMedia: _uploadMedia,
11301 downloadOptions: _downloadOptions);
11302 return _response.then((data) => new UserRolesListResponse.fromJson(data));
11303 }
11304
11305 /**
11306 * Updates an existing user role. This method supports patch semantics.
11307 *
11308 * [request] - The metadata request object.
11309 *
11310 * Request parameters:
11311 *
11312 * [profileId] - User profile ID associated with this request.
11313 *
11314 * [id] - User role ID.
11315 *
11316 * Completes with a [UserRole].
11317 *
11318 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
11319 * error.
11320 *
11321 * If the used [http.Client] completes with an error when making a REST call,
11322 * this method will complete with the same error.
11323 */
11324 async.Future<UserRole> patch(UserRole request, core.String profileId, core.Str ing id) {
11325 var _url = null;
11326 var _queryParams = new core.Map();
11327 var _uploadMedia = null;
11328 var _uploadOptions = null;
11329 var _downloadOptions = commons.DownloadOptions.Metadata;
11330 var _body = null;
11331
11332 if (request != null) {
11333 _body = convert.JSON.encode((request).toJson());
11334 }
11335 if (profileId == null) {
11336 throw new core.ArgumentError("Parameter profileId is required.");
11337 }
11338 if (id == null) {
11339 throw new core.ArgumentError("Parameter id is required.");
11340 }
11341 _queryParams["id"] = [id];
11342
11343 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRoles';
11344
11345 var _response = _requester.request(_url,
11346 "PATCH",
11347 body: _body,
11348 queryParams: _queryParams,
11349 uploadOptions: _uploadOptions,
11350 uploadMedia: _uploadMedia,
11351 downloadOptions: _downloadOptions);
11352 return _response.then((data) => new UserRole.fromJson(data));
11353 }
11354
11355 /**
11356 * Updates an existing user role.
11357 *
11358 * [request] - The metadata request object.
11359 *
11360 * Request parameters:
11361 *
11362 * [profileId] - User profile ID associated with this request.
11363 *
11364 * Completes with a [UserRole].
11365 *
11366 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
11367 * error.
11368 *
11369 * If the used [http.Client] completes with an error when making a REST call,
11370 * this method will complete with the same error.
11371 */
11372 async.Future<UserRole> update(UserRole request, core.String profileId) {
11373 var _url = null;
11374 var _queryParams = new core.Map();
11375 var _uploadMedia = null;
11376 var _uploadOptions = null;
11377 var _downloadOptions = commons.DownloadOptions.Metadata;
11378 var _body = null;
11379
11380 if (request != null) {
11381 _body = convert.JSON.encode((request).toJson());
11382 }
11383 if (profileId == null) {
11384 throw new core.ArgumentError("Parameter profileId is required.");
11385 }
11386
11387 _url = 'userprofiles/' + commons.Escaper.ecapeVariable('$profileId') + '/use rRoles';
11388
11389 var _response = _requester.request(_url,
11390 "PUT",
11391 body: _body,
11392 queryParams: _queryParams,
11393 uploadOptions: _uploadOptions,
11394 uploadMedia: _uploadMedia,
11395 downloadOptions: _downloadOptions);
11396 return _response.then((data) => new UserRole.fromJson(data));
11397 }
11398
11399 }
11400
11401
11402
11403 /** Contains properties of a DCM account. */
11404 class Account {
11405 /** Account permissions assigned to this account. */
11406 core.List<core.String> accountPermissionIds;
11407 /**
11408 * Profile for this account. This is a read-only field that can be left blank.
11409 * Possible string values are:
11410 * - "ACCOUNT_PROFILE_BASIC"
11411 * - "ACCOUNT_PROFILE_STANDARD"
11412 */
11413 core.String accountProfile;
11414 /** Whether this account is active. */
11415 core.bool active;
11416 /**
11417 * Maximum number of active ads allowed for this account.
11418 * Possible string values are:
11419 * - "ACTIVE_ADS_TIER_100K"
11420 * - "ACTIVE_ADS_TIER_200K"
11421 * - "ACTIVE_ADS_TIER_300K"
11422 * - "ACTIVE_ADS_TIER_40K"
11423 * - "ACTIVE_ADS_TIER_500K"
11424 * - "ACTIVE_ADS_TIER_750K"
11425 * - "ACTIVE_ADS_TIER_75K"
11426 */
11427 core.String activeAdsLimitTier;
11428 /**
11429 * Whether to serve creatives with Active View tags. If disabled, viewability
11430 * data will not be available for any impressions.
11431 */
11432 core.bool activeViewOptOut;
11433 /** User role permissions available to the user roles of this account. */
11434 core.List<core.String> availablePermissionIds;
11435 /**
11436 * Whether campaigns created in this account will be enabled for comScore vCE
11437 * by default.
11438 */
11439 core.bool comscoreVceEnabled;
11440 /** ID of the country associated with this account. */
11441 core.String countryId;
11442 /**
11443 * ID of currency associated with this account. This is a required field.
11444 * Acceptable values are:
11445 * - "1" for USD
11446 * - "2" for GBP
11447 * - "3" for ESP
11448 * - "4" for SEK
11449 * - "5" for CAD
11450 * - "6" for JPY
11451 * - "7" for DEM
11452 * - "8" for AUD
11453 * - "9" for FRF
11454 * - "10" for ITL
11455 * - "11" for DKK
11456 * - "12" for NOK
11457 * - "13" for FIM
11458 * - "14" for ZAR
11459 * - "15" for IEP
11460 * - "16" for NLG
11461 * - "17" for EUR
11462 * - "18" for KRW
11463 * - "19" for TWD
11464 * - "20" for SGD
11465 * - "21" for CNY
11466 * - "22" for HKD
11467 * - "23" for NZD
11468 * - "24" for MYR
11469 * - "25" for BRL
11470 * - "26" for PTE
11471 * - "27" for MXP
11472 * - "28" for CLP
11473 * - "29" for TRY
11474 * - "30" for ARS
11475 * - "31" for PEN
11476 * - "32" for ILS
11477 * - "33" for CHF
11478 * - "34" for VEF
11479 * - "35" for COP
11480 * - "36" for GTQ
11481 * - "37" for PLN
11482 * - "39" for INR
11483 * - "40" for THB
11484 * - "41" for IDR
11485 * - "42" for CZK
11486 * - "43" for RON
11487 * - "44" for HUF
11488 * - "45" for RUB
11489 * - "46" for AED
11490 * - "47" for BGN
11491 * - "48" for HRK
11492 */
11493 core.String currencyId;
11494 /** Default placement dimensions for this account. */
11495 core.String defaultCreativeSizeId;
11496 /** Description of this account. */
11497 core.String description;
11498 /** ID of this account. This is a read-only, auto-generated field. */
11499 core.String id;
11500 /**
11501 * Identifies what kind of resource this is. Value: the fixed string
11502 * "dfareporting#account".
11503 */
11504 core.String kind;
11505 /**
11506 * Locale of this account.
11507 * Acceptable values are:
11508 * - "cs" (Czech)
11509 * - "de" (German)
11510 * - "en" (English)
11511 * - "en-GB" (English United Kingdom)
11512 * - "es" (Spanish)
11513 * - "fr" (French)
11514 * - "it" (Italian)
11515 * - "ja" (Japanese)
11516 * - "ko" (Korean)
11517 * - "pl" (Polish)
11518 * - "pt-BR" (Portuguese Brazil)
11519 * - "ru" (Russian)
11520 * - "sv" (Swedish)
11521 * - "tr" (Turkish)
11522 * - "zh-CN" (Chinese Simplified)
11523 * - "zh-TW" (Chinese Traditional)
11524 */
11525 core.String locale;
11526 /** Maximum image size allowed for this account. */
11527 core.String maximumImageSize;
11528 /**
11529 * Name of this account. This is a required field, and must be less than 128
11530 * characters long and be globally unique.
11531 */
11532 core.String name;
11533 /**
11534 * Whether campaigns created in this account will be enabled for Nielsen OCR
11535 * reach ratings by default.
11536 */
11537 core.bool nielsenOcrEnabled;
11538 /** Reporting configuration of this account. */
11539 ReportsConfiguration reportsConfiguration;
11540 /**
11541 * File size limit in kilobytes of Rich Media teaser creatives. Must be
11542 * between 1 and 10240.
11543 */
11544 core.String teaserSizeLimit;
11545
11546 Account();
11547
11548 Account.fromJson(core.Map _json) {
11549 if (_json.containsKey("accountPermissionIds")) {
11550 accountPermissionIds = _json["accountPermissionIds"];
11551 }
11552 if (_json.containsKey("accountProfile")) {
11553 accountProfile = _json["accountProfile"];
11554 }
11555 if (_json.containsKey("active")) {
11556 active = _json["active"];
11557 }
11558 if (_json.containsKey("activeAdsLimitTier")) {
11559 activeAdsLimitTier = _json["activeAdsLimitTier"];
11560 }
11561 if (_json.containsKey("activeViewOptOut")) {
11562 activeViewOptOut = _json["activeViewOptOut"];
11563 }
11564 if (_json.containsKey("availablePermissionIds")) {
11565 availablePermissionIds = _json["availablePermissionIds"];
11566 }
11567 if (_json.containsKey("comscoreVceEnabled")) {
11568 comscoreVceEnabled = _json["comscoreVceEnabled"];
11569 }
11570 if (_json.containsKey("countryId")) {
11571 countryId = _json["countryId"];
11572 }
11573 if (_json.containsKey("currencyId")) {
11574 currencyId = _json["currencyId"];
11575 }
11576 if (_json.containsKey("defaultCreativeSizeId")) {
11577 defaultCreativeSizeId = _json["defaultCreativeSizeId"];
11578 }
11579 if (_json.containsKey("description")) {
11580 description = _json["description"];
11581 }
11582 if (_json.containsKey("id")) {
11583 id = _json["id"];
11584 }
11585 if (_json.containsKey("kind")) {
11586 kind = _json["kind"];
11587 }
11588 if (_json.containsKey("locale")) {
11589 locale = _json["locale"];
11590 }
11591 if (_json.containsKey("maximumImageSize")) {
11592 maximumImageSize = _json["maximumImageSize"];
11593 }
11594 if (_json.containsKey("name")) {
11595 name = _json["name"];
11596 }
11597 if (_json.containsKey("nielsenOcrEnabled")) {
11598 nielsenOcrEnabled = _json["nielsenOcrEnabled"];
11599 }
11600 if (_json.containsKey("reportsConfiguration")) {
11601 reportsConfiguration = new ReportsConfiguration.fromJson(_json["reportsCon figuration"]);
11602 }
11603 if (_json.containsKey("teaserSizeLimit")) {
11604 teaserSizeLimit = _json["teaserSizeLimit"];
11605 }
11606 }
11607
11608 core.Map toJson() {
11609 var _json = new core.Map();
11610 if (accountPermissionIds != null) {
11611 _json["accountPermissionIds"] = accountPermissionIds;
11612 }
11613 if (accountProfile != null) {
11614 _json["accountProfile"] = accountProfile;
11615 }
11616 if (active != null) {
11617 _json["active"] = active;
11618 }
11619 if (activeAdsLimitTier != null) {
11620 _json["activeAdsLimitTier"] = activeAdsLimitTier;
11621 }
11622 if (activeViewOptOut != null) {
11623 _json["activeViewOptOut"] = activeViewOptOut;
11624 }
11625 if (availablePermissionIds != null) {
11626 _json["availablePermissionIds"] = availablePermissionIds;
11627 }
11628 if (comscoreVceEnabled != null) {
11629 _json["comscoreVceEnabled"] = comscoreVceEnabled;
11630 }
11631 if (countryId != null) {
11632 _json["countryId"] = countryId;
11633 }
11634 if (currencyId != null) {
11635 _json["currencyId"] = currencyId;
11636 }
11637 if (defaultCreativeSizeId != null) {
11638 _json["defaultCreativeSizeId"] = defaultCreativeSizeId;
11639 }
11640 if (description != null) {
11641 _json["description"] = description;
11642 }
11643 if (id != null) {
11644 _json["id"] = id;
11645 }
11646 if (kind != null) {
11647 _json["kind"] = kind;
11648 }
11649 if (locale != null) {
11650 _json["locale"] = locale;
11651 }
11652 if (maximumImageSize != null) {
11653 _json["maximumImageSize"] = maximumImageSize;
11654 }
11655 if (name != null) {
11656 _json["name"] = name;
11657 }
11658 if (nielsenOcrEnabled != null) {
11659 _json["nielsenOcrEnabled"] = nielsenOcrEnabled;
11660 }
11661 if (reportsConfiguration != null) {
11662 _json["reportsConfiguration"] = (reportsConfiguration).toJson();
11663 }
11664 if (teaserSizeLimit != null) {
11665 _json["teaserSizeLimit"] = teaserSizeLimit;
11666 }
11667 return _json;
11668 }
11669 }
11670
11671 /** Gets a summary of active ads in an account. */
11672 class AccountActiveAdSummary {
11673 /** ID of the account. */
11674 core.String accountId;
11675 /** Ads that have been activated for the account */
11676 core.String activeAds;
11677 /**
11678 * Maximum number of active ads allowed for the account.
11679 * Possible string values are:
11680 * - "ACTIVE_ADS_TIER_100K"
11681 * - "ACTIVE_ADS_TIER_200K"
11682 * - "ACTIVE_ADS_TIER_300K"
11683 * - "ACTIVE_ADS_TIER_40K"
11684 * - "ACTIVE_ADS_TIER_500K"
11685 * - "ACTIVE_ADS_TIER_750K"
11686 * - "ACTIVE_ADS_TIER_75K"
11687 */
11688 core.String activeAdsLimitTier;
11689 /** Ads that can be activated for the account. */
11690 core.String availableAds;
11691 /**
11692 * Identifies what kind of resource this is. Value: the fixed string
11693 * "dfareporting#accountActiveAdSummary".
11694 */
11695 core.String kind;
11696
11697 AccountActiveAdSummary();
11698
11699 AccountActiveAdSummary.fromJson(core.Map _json) {
11700 if (_json.containsKey("accountId")) {
11701 accountId = _json["accountId"];
11702 }
11703 if (_json.containsKey("activeAds")) {
11704 activeAds = _json["activeAds"];
11705 }
11706 if (_json.containsKey("activeAdsLimitTier")) {
11707 activeAdsLimitTier = _json["activeAdsLimitTier"];
11708 }
11709 if (_json.containsKey("availableAds")) {
11710 availableAds = _json["availableAds"];
11711 }
11712 if (_json.containsKey("kind")) {
11713 kind = _json["kind"];
11714 }
11715 }
11716
11717 core.Map toJson() {
11718 var _json = new core.Map();
11719 if (accountId != null) {
11720 _json["accountId"] = accountId;
11721 }
11722 if (activeAds != null) {
11723 _json["activeAds"] = activeAds;
11724 }
11725 if (activeAdsLimitTier != null) {
11726 _json["activeAdsLimitTier"] = activeAdsLimitTier;
11727 }
11728 if (availableAds != null) {
11729 _json["availableAds"] = availableAds;
11730 }
11731 if (kind != null) {
11732 _json["kind"] = kind;
11733 }
11734 return _json;
11735 }
11736 }
11737
11738 /**
11739 * AccountPermissions contains information about a particular account
11740 * permission. Some features of DCM require an account permission to be present
11741 * in the account.
11742 */
11743 class AccountPermission {
11744 /**
11745 * Account profiles associated with this account permission.
11746 *
11747 * Possible values are:
11748 * - "ACCOUNT_PROFILE_BASIC"
11749 * - "ACCOUNT_PROFILE_STANDARD"
11750 */
11751 core.List<core.String> accountProfiles;
11752 /** ID of this account permission. */
11753 core.String id;
11754 /**
11755 * Identifies what kind of resource this is. Value: the fixed string
11756 * "dfareporting#accountPermission".
11757 */
11758 core.String kind;
11759 /**
11760 * Administrative level required to enable this account permission.
11761 * Possible string values are:
11762 * - "ADMINISTRATOR"
11763 * - "USER"
11764 */
11765 core.String level;
11766 /** Name of this account permission. */
11767 core.String name;
11768 /** Permission group of this account permission. */
11769 core.String permissionGroupId;
11770
11771 AccountPermission();
11772
11773 AccountPermission.fromJson(core.Map _json) {
11774 if (_json.containsKey("accountProfiles")) {
11775 accountProfiles = _json["accountProfiles"];
11776 }
11777 if (_json.containsKey("id")) {
11778 id = _json["id"];
11779 }
11780 if (_json.containsKey("kind")) {
11781 kind = _json["kind"];
11782 }
11783 if (_json.containsKey("level")) {
11784 level = _json["level"];
11785 }
11786 if (_json.containsKey("name")) {
11787 name = _json["name"];
11788 }
11789 if (_json.containsKey("permissionGroupId")) {
11790 permissionGroupId = _json["permissionGroupId"];
11791 }
11792 }
11793
11794 core.Map toJson() {
11795 var _json = new core.Map();
11796 if (accountProfiles != null) {
11797 _json["accountProfiles"] = accountProfiles;
11798 }
11799 if (id != null) {
11800 _json["id"] = id;
11801 }
11802 if (kind != null) {
11803 _json["kind"] = kind;
11804 }
11805 if (level != null) {
11806 _json["level"] = level;
11807 }
11808 if (name != null) {
11809 _json["name"] = name;
11810 }
11811 if (permissionGroupId != null) {
11812 _json["permissionGroupId"] = permissionGroupId;
11813 }
11814 return _json;
11815 }
11816 }
11817
11818 /**
11819 * AccountPermissionGroups contains a mapping of permission group IDs to names.
11820 * A permission group is a grouping of account permissions.
11821 */
11822 class AccountPermissionGroup {
11823 /** ID of this account permission group. */
11824 core.String id;
11825 /**
11826 * Identifies what kind of resource this is. Value: the fixed string
11827 * "dfareporting#accountPermissionGroup".
11828 */
11829 core.String kind;
11830 /** Name of this account permission group. */
11831 core.String name;
11832
11833 AccountPermissionGroup();
11834
11835 AccountPermissionGroup.fromJson(core.Map _json) {
11836 if (_json.containsKey("id")) {
11837 id = _json["id"];
11838 }
11839 if (_json.containsKey("kind")) {
11840 kind = _json["kind"];
11841 }
11842 if (_json.containsKey("name")) {
11843 name = _json["name"];
11844 }
11845 }
11846
11847 core.Map toJson() {
11848 var _json = new core.Map();
11849 if (id != null) {
11850 _json["id"] = id;
11851 }
11852 if (kind != null) {
11853 _json["kind"] = kind;
11854 }
11855 if (name != null) {
11856 _json["name"] = name;
11857 }
11858 return _json;
11859 }
11860 }
11861
11862 /** Account Permission Group List Response */
11863 class AccountPermissionGroupsListResponse {
11864 /** Account permission group collection. */
11865 core.List<AccountPermissionGroup> accountPermissionGroups;
11866 /**
11867 * Identifies what kind of resource this is. Value: the fixed string
11868 * "dfareporting#accountPermissionGroupsListResponse".
11869 */
11870 core.String kind;
11871
11872 AccountPermissionGroupsListResponse();
11873
11874 AccountPermissionGroupsListResponse.fromJson(core.Map _json) {
11875 if (_json.containsKey("accountPermissionGroups")) {
11876 accountPermissionGroups = _json["accountPermissionGroups"].map((value) => new AccountPermissionGroup.fromJson(value)).toList();
11877 }
11878 if (_json.containsKey("kind")) {
11879 kind = _json["kind"];
11880 }
11881 }
11882
11883 core.Map toJson() {
11884 var _json = new core.Map();
11885 if (accountPermissionGroups != null) {
11886 _json["accountPermissionGroups"] = accountPermissionGroups.map((value) => (value).toJson()).toList();
11887 }
11888 if (kind != null) {
11889 _json["kind"] = kind;
11890 }
11891 return _json;
11892 }
11893 }
11894
11895 /** Account Permission List Response */
11896 class AccountPermissionsListResponse {
11897 /** Account permission collection. */
11898 core.List<AccountPermission> accountPermissions;
11899 /**
11900 * Identifies what kind of resource this is. Value: the fixed string
11901 * "dfareporting#accountPermissionsListResponse".
11902 */
11903 core.String kind;
11904
11905 AccountPermissionsListResponse();
11906
11907 AccountPermissionsListResponse.fromJson(core.Map _json) {
11908 if (_json.containsKey("accountPermissions")) {
11909 accountPermissions = _json["accountPermissions"].map((value) => new Accoun tPermission.fromJson(value)).toList();
11910 }
11911 if (_json.containsKey("kind")) {
11912 kind = _json["kind"];
11913 }
11914 }
11915
11916 core.Map toJson() {
11917 var _json = new core.Map();
11918 if (accountPermissions != null) {
11919 _json["accountPermissions"] = accountPermissions.map((value) => (value).to Json()).toList();
11920 }
11921 if (kind != null) {
11922 _json["kind"] = kind;
11923 }
11924 return _json;
11925 }
11926 }
11927
11928 /**
11929 * AccountUserProfiles contains properties of a DCM user profile. This resource
11930 * is specifically for managing user profiles, whereas UserProfiles is for
11931 * accessing the API.
11932 */
11933 class AccountUserProfile {
11934 /**
11935 * Account ID of the user profile. This is a read-only field that can be left
11936 * blank.
11937 */
11938 core.String accountId;
11939 /**
11940 * Whether this user profile is active. This defaults to false, and must be
11941 * set true on insert for the user profile to be usable.
11942 */
11943 core.bool active;
11944 /**
11945 * Filter that describes which advertisers are visible to the user profile.
11946 */
11947 ObjectFilter advertiserFilter;
11948 /** Filter that describes which campaigns are visible to the user profile. */
11949 ObjectFilter campaignFilter;
11950 /** Comments for this user profile. */
11951 core.String comments;
11952 /**
11953 * Email of the user profile. The email addresss must be linked to a Google
11954 * Account. This field is required on insertion and is read-only after
11955 * insertion.
11956 */
11957 core.String email;
11958 /** ID of the user profile. This is a read-only, auto-generated field. */
11959 core.String id;
11960 /**
11961 * Identifies what kind of resource this is. Value: the fixed string
11962 * "dfareporting#accountUserProfile".
11963 */
11964 core.String kind;
11965 /**
11966 * Locale of the user profile. This is a required field.
11967 * Acceptable values are:
11968 * - "cs" (Czech)
11969 * - "de" (German)
11970 * - "en" (English)
11971 * - "en-GB" (English United Kingdom)
11972 * - "es" (Spanish)
11973 * - "fr" (French)
11974 * - "it" (Italian)
11975 * - "ja" (Japanese)
11976 * - "ko" (Korean)
11977 * - "pl" (Polish)
11978 * - "pt-BR" (Portuguese Brazil)
11979 * - "ru" (Russian)
11980 * - "sv" (Swedish)
11981 * - "tr" (Turkish)
11982 * - "zh-CN" (Chinese Simplified)
11983 * - "zh-TW" (Chinese Traditional)
11984 */
11985 core.String locale;
11986 /**
11987 * Name of the user profile. This is a required field. Must be less than 64
11988 * characters long, must be globally unique, and cannot contain whitespace or
11989 * any of the following characters: "&;"#%,".
11990 */
11991 core.String name;
11992 /** Filter that describes which sites are visible to the user profile. */
11993 ObjectFilter siteFilter;
11994 /**
11995 * Subaccount ID of the user profile. This is a read-only field that can be
11996 * left blank.
11997 */
11998 core.String subaccountId;
11999 /**
12000 * Trafficker type of this user profile.
12001 * Possible string values are:
12002 * - "EXTERNAL_TRAFFICKER"
12003 * - "INTERNAL_NON_TRAFFICKER"
12004 * - "INTERNAL_TRAFFICKER"
12005 */
12006 core.String traffickerType;
12007 /**
12008 * User type of the user profile. This is a read-only field that can be left
12009 * blank.
12010 * Possible string values are:
12011 * - "INTERNAL_ADMINISTRATOR"
12012 * - "NORMAL_USER"
12013 * - "READ_ONLY_SUPER_USER"
12014 * - "SUPER_USER"
12015 */
12016 core.String userAccessType;
12017 /**
12018 * Filter that describes which user roles are visible to the user profile.
12019 */
12020 ObjectFilter userRoleFilter;
12021 /** User role ID of the user profile. This is a required field. */
12022 core.String userRoleId;
12023
12024 AccountUserProfile();
12025
12026 AccountUserProfile.fromJson(core.Map _json) {
12027 if (_json.containsKey("accountId")) {
12028 accountId = _json["accountId"];
12029 }
12030 if (_json.containsKey("active")) {
12031 active = _json["active"];
12032 }
12033 if (_json.containsKey("advertiserFilter")) {
12034 advertiserFilter = new ObjectFilter.fromJson(_json["advertiserFilter"]);
12035 }
12036 if (_json.containsKey("campaignFilter")) {
12037 campaignFilter = new ObjectFilter.fromJson(_json["campaignFilter"]);
12038 }
12039 if (_json.containsKey("comments")) {
12040 comments = _json["comments"];
12041 }
12042 if (_json.containsKey("email")) {
12043 email = _json["email"];
12044 }
12045 if (_json.containsKey("id")) {
12046 id = _json["id"];
12047 }
12048 if (_json.containsKey("kind")) {
12049 kind = _json["kind"];
12050 }
12051 if (_json.containsKey("locale")) {
12052 locale = _json["locale"];
12053 }
12054 if (_json.containsKey("name")) {
12055 name = _json["name"];
12056 }
12057 if (_json.containsKey("siteFilter")) {
12058 siteFilter = new ObjectFilter.fromJson(_json["siteFilter"]);
12059 }
12060 if (_json.containsKey("subaccountId")) {
12061 subaccountId = _json["subaccountId"];
12062 }
12063 if (_json.containsKey("traffickerType")) {
12064 traffickerType = _json["traffickerType"];
12065 }
12066 if (_json.containsKey("userAccessType")) {
12067 userAccessType = _json["userAccessType"];
12068 }
12069 if (_json.containsKey("userRoleFilter")) {
12070 userRoleFilter = new ObjectFilter.fromJson(_json["userRoleFilter"]);
12071 }
12072 if (_json.containsKey("userRoleId")) {
12073 userRoleId = _json["userRoleId"];
12074 }
12075 }
12076
12077 core.Map toJson() {
12078 var _json = new core.Map();
12079 if (accountId != null) {
12080 _json["accountId"] = accountId;
12081 }
12082 if (active != null) {
12083 _json["active"] = active;
12084 }
12085 if (advertiserFilter != null) {
12086 _json["advertiserFilter"] = (advertiserFilter).toJson();
12087 }
12088 if (campaignFilter != null) {
12089 _json["campaignFilter"] = (campaignFilter).toJson();
12090 }
12091 if (comments != null) {
12092 _json["comments"] = comments;
12093 }
12094 if (email != null) {
12095 _json["email"] = email;
12096 }
12097 if (id != null) {
12098 _json["id"] = id;
12099 }
12100 if (kind != null) {
12101 _json["kind"] = kind;
12102 }
12103 if (locale != null) {
12104 _json["locale"] = locale;
12105 }
12106 if (name != null) {
12107 _json["name"] = name;
12108 }
12109 if (siteFilter != null) {
12110 _json["siteFilter"] = (siteFilter).toJson();
12111 }
12112 if (subaccountId != null) {
12113 _json["subaccountId"] = subaccountId;
12114 }
12115 if (traffickerType != null) {
12116 _json["traffickerType"] = traffickerType;
12117 }
12118 if (userAccessType != null) {
12119 _json["userAccessType"] = userAccessType;
12120 }
12121 if (userRoleFilter != null) {
12122 _json["userRoleFilter"] = (userRoleFilter).toJson();
12123 }
12124 if (userRoleId != null) {
12125 _json["userRoleId"] = userRoleId;
12126 }
12127 return _json;
12128 }
12129 }
12130
12131 /** Account User Profile List Response */
12132 class AccountUserProfilesListResponse {
12133 /** Account user profile collection. */
12134 core.List<AccountUserProfile> accountUserProfiles;
12135 /**
12136 * Identifies what kind of resource this is. Value: the fixed string
12137 * "dfareporting#accountUserProfilesListResponse".
12138 */
12139 core.String kind;
12140 /** Pagination token to be used for the next list operation. */
12141 core.String nextPageToken;
12142
12143 AccountUserProfilesListResponse();
12144
12145 AccountUserProfilesListResponse.fromJson(core.Map _json) {
12146 if (_json.containsKey("accountUserProfiles")) {
12147 accountUserProfiles = _json["accountUserProfiles"].map((value) => new Acco untUserProfile.fromJson(value)).toList();
12148 }
12149 if (_json.containsKey("kind")) {
12150 kind = _json["kind"];
12151 }
12152 if (_json.containsKey("nextPageToken")) {
12153 nextPageToken = _json["nextPageToken"];
12154 }
12155 }
12156
12157 core.Map toJson() {
12158 var _json = new core.Map();
12159 if (accountUserProfiles != null) {
12160 _json["accountUserProfiles"] = accountUserProfiles.map((value) => (value). toJson()).toList();
12161 }
12162 if (kind != null) {
12163 _json["kind"] = kind;
12164 }
12165 if (nextPageToken != null) {
12166 _json["nextPageToken"] = nextPageToken;
12167 }
12168 return _json;
12169 }
12170 }
12171
12172 /** Account List Response */
12173 class AccountsListResponse {
12174 /** Account collection. */
12175 core.List<Account> accounts;
12176 /**
12177 * Identifies what kind of resource this is. Value: the fixed string
12178 * "dfareporting#accountsListResponse".
12179 */
12180 core.String kind;
12181 /** Pagination token to be used for the next list operation. */
12182 core.String nextPageToken;
12183
12184 AccountsListResponse();
12185
12186 AccountsListResponse.fromJson(core.Map _json) {
12187 if (_json.containsKey("accounts")) {
12188 accounts = _json["accounts"].map((value) => new Account.fromJson(value)).t oList();
12189 }
12190 if (_json.containsKey("kind")) {
12191 kind = _json["kind"];
12192 }
12193 if (_json.containsKey("nextPageToken")) {
12194 nextPageToken = _json["nextPageToken"];
12195 }
12196 }
12197
12198 core.Map toJson() {
12199 var _json = new core.Map();
12200 if (accounts != null) {
12201 _json["accounts"] = accounts.map((value) => (value).toJson()).toList();
12202 }
12203 if (kind != null) {
12204 _json["kind"] = kind;
12205 }
12206 if (nextPageToken != null) {
12207 _json["nextPageToken"] = nextPageToken;
12208 }
12209 return _json;
12210 }
12211 }
12212
12213 /** Represents an activity group. */
12214 class Activities {
12215 /**
12216 * List of activity filters. The dimension values need to be all either of
12217 * type "dfa:activity" or "dfa:activityGroup".
12218 */
12219 core.List<DimensionValue> filters;
12220 /** The kind of resource this is, in this case dfareporting#activities. */
12221 core.String kind;
12222 /** List of names of floodlight activity metrics. */
12223 core.List<core.String> metricNames;
12224
12225 Activities();
12226
12227 Activities.fromJson(core.Map _json) {
12228 if (_json.containsKey("filters")) {
12229 filters = _json["filters"].map((value) => new DimensionValue.fromJson(valu e)).toList();
12230 }
12231 if (_json.containsKey("kind")) {
12232 kind = _json["kind"];
12233 }
12234 if (_json.containsKey("metricNames")) {
12235 metricNames = _json["metricNames"];
12236 }
12237 }
12238
12239 core.Map toJson() {
12240 var _json = new core.Map();
12241 if (filters != null) {
12242 _json["filters"] = filters.map((value) => (value).toJson()).toList();
12243 }
12244 if (kind != null) {
12245 _json["kind"] = kind;
12246 }
12247 if (metricNames != null) {
12248 _json["metricNames"] = metricNames;
12249 }
12250 return _json;
12251 }
12252 }
12253
12254 /** Contains properties of a DCM ad. */
12255 class Ad {
12256 /**
12257 * Account ID of this ad. This is a read-only field that can be left blank.
12258 */
12259 core.String accountId;
12260 /** Whether this ad is active. When true, archived must be false. */
12261 core.bool active;
12262 /** Advertiser ID of this ad. This is a required field on insertion. */
12263 core.String advertiserId;
12264 /**
12265 * Dimension value for the ID of the advertiser. This is a read-only,
12266 * auto-generated field.
12267 */
12268 DimensionValue advertiserIdDimensionValue;
12269 /** Whether this ad is archived. When true, active must be false. */
12270 core.bool archived;
12271 /**
12272 * Audience segment ID that is being targeted for this ad. Applicable when
12273 * type is AD_SERVING_STANDARD_AD.
12274 */
12275 core.String audienceSegmentId;
12276 /** Campaign ID of this ad. This is a required field on insertion. */
12277 core.String campaignId;
12278 /**
12279 * Dimension value for the ID of the campaign. This is a read-only,
12280 * auto-generated field.
12281 */
12282 DimensionValue campaignIdDimensionValue;
12283 /**
12284 * Click-through URL for this ad. This is a required field on insertion.
12285 * Applicable when type is AD_SERVING_CLICK_TRACKER.
12286 */
12287 ClickThroughUrl clickThroughUrl;
12288 /**
12289 * Click-through URL suffix properties for this ad. Applies to the URL in the
12290 * ad or (if overriding ad properties) the URL in the creative.
12291 */
12292 ClickThroughUrlSuffixProperties clickThroughUrlSuffixProperties;
12293 /** Comments for this ad. */
12294 core.String comments;
12295 /**
12296 * Compatibility of this ad. Applicable when type is AD_SERVING_DEFAULT_AD.
12297 * DISPLAY and DISPLAY_INTERSTITIAL refer to either rendering on desktop or on
12298 * mobile devices or in mobile apps for regular or interstitial ads,
12299 * respectively. APP and APP_INTERSTITIAL are only used for existing default
12300 * ads. New mobile placements must be assigned DISPLAY or DISPLAY_INTERSTITIAL
12301 * and default ads created for those placements will be limited to those
12302 * compatibility types. IN_STREAM_VIDEO refers to rendering in-stream video
12303 * ads developed with the VAST standard.
12304 * Possible string values are:
12305 * - "APP"
12306 * - "APP_INTERSTITIAL"
12307 * - "DISPLAY"
12308 * - "DISPLAY_INTERSTITIAL"
12309 * - "IN_STREAM_VIDEO"
12310 */
12311 core.String compatibility;
12312 /** Information about the creation of this ad. This is a read-only field. */
12313 LastModifiedInfo createInfo;
12314 /**
12315 * Creative group assignments for this ad. Applicable when type is
12316 * AD_SERVING_CLICK_TRACKER. Only one assignment per creative group number is
12317 * allowed for a maximum of two assignments.
12318 */
12319 core.List<CreativeGroupAssignment> creativeGroupAssignments;
12320 /**
12321 * Creative rotation for this ad. Applicable when type is
12322 * AD_SERVING_DEFAULT_AD, AD_SERVING_STANDARD_AD, or AD_SERVING_TRACKING. When
12323 * type is AD_SERVING_DEFAULT_AD, this field should have exactly one
12324 * creativeAssignment.
12325 */
12326 CreativeRotation creativeRotation;
12327 /**
12328 * Time and day targeting information for this ad. This field must be left
12329 * blank if the ad is using a targeting template. Applicable when type is
12330 * AD_SERVING_STANDARD_AD.
12331 */
12332 DayPartTargeting dayPartTargeting;
12333 /** Default click-through event tag properties for this ad. */
12334 DefaultClickThroughEventTagProperties defaultClickThroughEventTagProperties;
12335 /**
12336 * Delivery schedule information for this ad. Applicable when type is
12337 * AD_SERVING_STANDARD_AD or AD_SERVING_TRACKING. This field along with
12338 * subfields priority and impressionRatio are required on insertion when type
12339 * is AD_SERVING_STANDARD_AD.
12340 */
12341 DeliverySchedule deliverySchedule;
12342 /**
12343 * Whether this ad is a dynamic click tracker. Applicable when type is
12344 * AD_SERVING_CLICK_TRACKER. This is a required field on insert, and is
12345 * read-only after insert.
12346 */
12347 core.bool dynamicClickTracker;
12348 /**
12349 * Date and time that this ad should stop serving. Must be later than the
12350 * start time. This is a required field on insertion.
12351 */
12352 core.DateTime endTime;
12353 /** Event tag overrides for this ad. */
12354 core.List<EventTagOverride> eventTagOverrides;
12355 /**
12356 * Geographical targeting information for this ad. This field must be left
12357 * blank if the ad is using a targeting template. Applicable when type is
12358 * AD_SERVING_STANDARD_AD.
12359 */
12360 GeoTargeting geoTargeting;
12361 /** ID of this ad. This is a read-only, auto-generated field. */
12362 core.String id;
12363 /**
12364 * Dimension value for the ID of this ad. This is a read-only, auto-generated
12365 * field.
12366 */
12367 DimensionValue idDimensionValue;
12368 /**
12369 * Key-value targeting information for this ad. This field must be left blank
12370 * if the ad is using a targeting template. Applicable when type is
12371 * AD_SERVING_STANDARD_AD.
12372 */
12373 KeyValueTargetingExpression keyValueTargetingExpression;
12374 /**
12375 * Identifies what kind of resource this is. Value: the fixed string
12376 * "dfareporting#ad".
12377 */
12378 core.String kind;
12379 /**
12380 * Information about the most recent modification of this ad. This is a
12381 * read-only field.
12382 */
12383 LastModifiedInfo lastModifiedInfo;
12384 /**
12385 * Name of this ad. This is a required field and must be less than 256
12386 * characters long.
12387 */
12388 core.String name;
12389 /** Placement assignments for this ad. */
12390 core.List<PlacementAssignment> placementAssignments;
12391 /**
12392 * Remarketing list targeting expression for this ad. This field must be left
12393 * blank if the ad is using a targeting template. Applicable when type is
12394 * AD_SERVING_STANDARD_AD.
12395 */
12396 ListTargetingExpression remarketingListExpression;
12397 /** Size of this ad. Applicable when type is AD_SERVING_DEFAULT_AD. */
12398 Size size;
12399 /**
12400 * Whether this ad is ssl compliant. This is a read-only field that is
12401 * auto-generated when the ad is inserted or updated.
12402 */
12403 core.bool sslCompliant;
12404 /**
12405 * Whether this ad requires ssl. This is a read-only field that is
12406 * auto-generated when the ad is inserted or updated.
12407 */
12408 core.bool sslRequired;
12409 /**
12410 * Date and time that this ad should start serving. If creating an ad, this
12411 * field must be a time in the future. This is a required field on insertion.
12412 */
12413 core.DateTime startTime;
12414 /**
12415 * Subaccount ID of this ad. This is a read-only field that can be left blank.
12416 */
12417 core.String subaccountId;
12418 /**
12419 * Technology platform targeting information for this ad. This field must be
12420 * left blank if the ad is using a targeting template. Applicable when type is
12421 * AD_SERVING_STANDARD_AD.
12422 */
12423 TechnologyTargeting technologyTargeting;
12424 /**
12425 * Type of ad. This is a required field on insertion. Note that default ads
12426 * (AD_SERVING_DEFAULT_AD) cannot be created directly (see Creative resource).
12427 * Possible string values are:
12428 * - "AD_SERVING_CLICK_TRACKER"
12429 * - "AD_SERVING_DEFAULT_AD"
12430 * - "AD_SERVING_STANDARD_AD"
12431 * - "AD_SERVING_TRACKING"
12432 */
12433 core.String type;
12434
12435 Ad();
12436
12437 Ad.fromJson(core.Map _json) {
12438 if (_json.containsKey("accountId")) {
12439 accountId = _json["accountId"];
12440 }
12441 if (_json.containsKey("active")) {
12442 active = _json["active"];
12443 }
12444 if (_json.containsKey("advertiserId")) {
12445 advertiserId = _json["advertiserId"];
12446 }
12447 if (_json.containsKey("advertiserIdDimensionValue")) {
12448 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
12449 }
12450 if (_json.containsKey("archived")) {
12451 archived = _json["archived"];
12452 }
12453 if (_json.containsKey("audienceSegmentId")) {
12454 audienceSegmentId = _json["audienceSegmentId"];
12455 }
12456 if (_json.containsKey("campaignId")) {
12457 campaignId = _json["campaignId"];
12458 }
12459 if (_json.containsKey("campaignIdDimensionValue")) {
12460 campaignIdDimensionValue = new DimensionValue.fromJson(_json["campaignIdDi mensionValue"]);
12461 }
12462 if (_json.containsKey("clickThroughUrl")) {
12463 clickThroughUrl = new ClickThroughUrl.fromJson(_json["clickThroughUrl"]);
12464 }
12465 if (_json.containsKey("clickThroughUrlSuffixProperties")) {
12466 clickThroughUrlSuffixProperties = new ClickThroughUrlSuffixProperties.from Json(_json["clickThroughUrlSuffixProperties"]);
12467 }
12468 if (_json.containsKey("comments")) {
12469 comments = _json["comments"];
12470 }
12471 if (_json.containsKey("compatibility")) {
12472 compatibility = _json["compatibility"];
12473 }
12474 if (_json.containsKey("createInfo")) {
12475 createInfo = new LastModifiedInfo.fromJson(_json["createInfo"]);
12476 }
12477 if (_json.containsKey("creativeGroupAssignments")) {
12478 creativeGroupAssignments = _json["creativeGroupAssignments"].map((value) = > new CreativeGroupAssignment.fromJson(value)).toList();
12479 }
12480 if (_json.containsKey("creativeRotation")) {
12481 creativeRotation = new CreativeRotation.fromJson(_json["creativeRotation"] );
12482 }
12483 if (_json.containsKey("dayPartTargeting")) {
12484 dayPartTargeting = new DayPartTargeting.fromJson(_json["dayPartTargeting"] );
12485 }
12486 if (_json.containsKey("defaultClickThroughEventTagProperties")) {
12487 defaultClickThroughEventTagProperties = new DefaultClickThroughEventTagPro perties.fromJson(_json["defaultClickThroughEventTagProperties"]);
12488 }
12489 if (_json.containsKey("deliverySchedule")) {
12490 deliverySchedule = new DeliverySchedule.fromJson(_json["deliverySchedule"] );
12491 }
12492 if (_json.containsKey("dynamicClickTracker")) {
12493 dynamicClickTracker = _json["dynamicClickTracker"];
12494 }
12495 if (_json.containsKey("endTime")) {
12496 endTime = core.DateTime.parse(_json["endTime"]);
12497 }
12498 if (_json.containsKey("eventTagOverrides")) {
12499 eventTagOverrides = _json["eventTagOverrides"].map((value) => new EventTag Override.fromJson(value)).toList();
12500 }
12501 if (_json.containsKey("geoTargeting")) {
12502 geoTargeting = new GeoTargeting.fromJson(_json["geoTargeting"]);
12503 }
12504 if (_json.containsKey("id")) {
12505 id = _json["id"];
12506 }
12507 if (_json.containsKey("idDimensionValue")) {
12508 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
12509 }
12510 if (_json.containsKey("keyValueTargetingExpression")) {
12511 keyValueTargetingExpression = new KeyValueTargetingExpression.fromJson(_js on["keyValueTargetingExpression"]);
12512 }
12513 if (_json.containsKey("kind")) {
12514 kind = _json["kind"];
12515 }
12516 if (_json.containsKey("lastModifiedInfo")) {
12517 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"] );
12518 }
12519 if (_json.containsKey("name")) {
12520 name = _json["name"];
12521 }
12522 if (_json.containsKey("placementAssignments")) {
12523 placementAssignments = _json["placementAssignments"].map((value) => new Pl acementAssignment.fromJson(value)).toList();
12524 }
12525 if (_json.containsKey("remarketingListExpression")) {
12526 remarketingListExpression = new ListTargetingExpression.fromJson(_json["re marketingListExpression"]);
12527 }
12528 if (_json.containsKey("size")) {
12529 size = new Size.fromJson(_json["size"]);
12530 }
12531 if (_json.containsKey("sslCompliant")) {
12532 sslCompliant = _json["sslCompliant"];
12533 }
12534 if (_json.containsKey("sslRequired")) {
12535 sslRequired = _json["sslRequired"];
12536 }
12537 if (_json.containsKey("startTime")) {
12538 startTime = core.DateTime.parse(_json["startTime"]);
12539 }
12540 if (_json.containsKey("subaccountId")) {
12541 subaccountId = _json["subaccountId"];
12542 }
12543 if (_json.containsKey("technologyTargeting")) {
12544 technologyTargeting = new TechnologyTargeting.fromJson(_json["technologyTa rgeting"]);
12545 }
12546 if (_json.containsKey("type")) {
12547 type = _json["type"];
12548 }
12549 }
12550
12551 core.Map toJson() {
12552 var _json = new core.Map();
12553 if (accountId != null) {
12554 _json["accountId"] = accountId;
12555 }
12556 if (active != null) {
12557 _json["active"] = active;
12558 }
12559 if (advertiserId != null) {
12560 _json["advertiserId"] = advertiserId;
12561 }
12562 if (advertiserIdDimensionValue != null) {
12563 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
12564 }
12565 if (archived != null) {
12566 _json["archived"] = archived;
12567 }
12568 if (audienceSegmentId != null) {
12569 _json["audienceSegmentId"] = audienceSegmentId;
12570 }
12571 if (campaignId != null) {
12572 _json["campaignId"] = campaignId;
12573 }
12574 if (campaignIdDimensionValue != null) {
12575 _json["campaignIdDimensionValue"] = (campaignIdDimensionValue).toJson();
12576 }
12577 if (clickThroughUrl != null) {
12578 _json["clickThroughUrl"] = (clickThroughUrl).toJson();
12579 }
12580 if (clickThroughUrlSuffixProperties != null) {
12581 _json["clickThroughUrlSuffixProperties"] = (clickThroughUrlSuffixPropertie s).toJson();
12582 }
12583 if (comments != null) {
12584 _json["comments"] = comments;
12585 }
12586 if (compatibility != null) {
12587 _json["compatibility"] = compatibility;
12588 }
12589 if (createInfo != null) {
12590 _json["createInfo"] = (createInfo).toJson();
12591 }
12592 if (creativeGroupAssignments != null) {
12593 _json["creativeGroupAssignments"] = creativeGroupAssignments.map((value) = > (value).toJson()).toList();
12594 }
12595 if (creativeRotation != null) {
12596 _json["creativeRotation"] = (creativeRotation).toJson();
12597 }
12598 if (dayPartTargeting != null) {
12599 _json["dayPartTargeting"] = (dayPartTargeting).toJson();
12600 }
12601 if (defaultClickThroughEventTagProperties != null) {
12602 _json["defaultClickThroughEventTagProperties"] = (defaultClickThroughEvent TagProperties).toJson();
12603 }
12604 if (deliverySchedule != null) {
12605 _json["deliverySchedule"] = (deliverySchedule).toJson();
12606 }
12607 if (dynamicClickTracker != null) {
12608 _json["dynamicClickTracker"] = dynamicClickTracker;
12609 }
12610 if (endTime != null) {
12611 _json["endTime"] = (endTime).toIso8601String();
12612 }
12613 if (eventTagOverrides != null) {
12614 _json["eventTagOverrides"] = eventTagOverrides.map((value) => (value).toJs on()).toList();
12615 }
12616 if (geoTargeting != null) {
12617 _json["geoTargeting"] = (geoTargeting).toJson();
12618 }
12619 if (id != null) {
12620 _json["id"] = id;
12621 }
12622 if (idDimensionValue != null) {
12623 _json["idDimensionValue"] = (idDimensionValue).toJson();
12624 }
12625 if (keyValueTargetingExpression != null) {
12626 _json["keyValueTargetingExpression"] = (keyValueTargetingExpression).toJso n();
12627 }
12628 if (kind != null) {
12629 _json["kind"] = kind;
12630 }
12631 if (lastModifiedInfo != null) {
12632 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson();
12633 }
12634 if (name != null) {
12635 _json["name"] = name;
12636 }
12637 if (placementAssignments != null) {
12638 _json["placementAssignments"] = placementAssignments.map((value) => (value ).toJson()).toList();
12639 }
12640 if (remarketingListExpression != null) {
12641 _json["remarketingListExpression"] = (remarketingListExpression).toJson();
12642 }
12643 if (size != null) {
12644 _json["size"] = (size).toJson();
12645 }
12646 if (sslCompliant != null) {
12647 _json["sslCompliant"] = sslCompliant;
12648 }
12649 if (sslRequired != null) {
12650 _json["sslRequired"] = sslRequired;
12651 }
12652 if (startTime != null) {
12653 _json["startTime"] = (startTime).toIso8601String();
12654 }
12655 if (subaccountId != null) {
12656 _json["subaccountId"] = subaccountId;
12657 }
12658 if (technologyTargeting != null) {
12659 _json["technologyTargeting"] = (technologyTargeting).toJson();
12660 }
12661 if (type != null) {
12662 _json["type"] = type;
12663 }
12664 return _json;
12665 }
12666 }
12667
12668 /** Ad Slot */
12669 class AdSlot {
12670 /** Comment for this ad slot. */
12671 core.String comment;
12672 /**
12673 * Ad slot compatibility. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering
12674 * either on desktop, mobile devices or in mobile apps for regular or
12675 * interstitial ads respectively. APP and APP_INTERSTITIAL are for rendering
12676 * in mobile apps. IN_STREAM_VIDEO refers to rendering in in-stream video ads
12677 * developed with the VAST standard.
12678 * Possible string values are:
12679 * - "APP"
12680 * - "APP_INTERSTITIAL"
12681 * - "DISPLAY"
12682 * - "DISPLAY_INTERSTITIAL"
12683 * - "IN_STREAM_VIDEO"
12684 */
12685 core.String compatibility;
12686 /** Height of this ad slot. */
12687 core.String height;
12688 /**
12689 * ID of the placement from an external platform that is linked to this ad
12690 * slot.
12691 */
12692 core.String linkedPlacementId;
12693 /** Name of this ad slot. */
12694 core.String name;
12695 /**
12696 * Payment source type of this ad slot.
12697 * Possible string values are:
12698 * - "PLANNING_PAYMENT_SOURCE_TYPE_AGENCY_PAID"
12699 * - "PLANNING_PAYMENT_SOURCE_TYPE_PUBLISHER_PAID"
12700 */
12701 core.String paymentSourceType;
12702 /** Primary ad slot of a roadblock inventory item. */
12703 core.bool primary;
12704 /** Width of this ad slot. */
12705 core.String width;
12706
12707 AdSlot();
12708
12709 AdSlot.fromJson(core.Map _json) {
12710 if (_json.containsKey("comment")) {
12711 comment = _json["comment"];
12712 }
12713 if (_json.containsKey("compatibility")) {
12714 compatibility = _json["compatibility"];
12715 }
12716 if (_json.containsKey("height")) {
12717 height = _json["height"];
12718 }
12719 if (_json.containsKey("linkedPlacementId")) {
12720 linkedPlacementId = _json["linkedPlacementId"];
12721 }
12722 if (_json.containsKey("name")) {
12723 name = _json["name"];
12724 }
12725 if (_json.containsKey("paymentSourceType")) {
12726 paymentSourceType = _json["paymentSourceType"];
12727 }
12728 if (_json.containsKey("primary")) {
12729 primary = _json["primary"];
12730 }
12731 if (_json.containsKey("width")) {
12732 width = _json["width"];
12733 }
12734 }
12735
12736 core.Map toJson() {
12737 var _json = new core.Map();
12738 if (comment != null) {
12739 _json["comment"] = comment;
12740 }
12741 if (compatibility != null) {
12742 _json["compatibility"] = compatibility;
12743 }
12744 if (height != null) {
12745 _json["height"] = height;
12746 }
12747 if (linkedPlacementId != null) {
12748 _json["linkedPlacementId"] = linkedPlacementId;
12749 }
12750 if (name != null) {
12751 _json["name"] = name;
12752 }
12753 if (paymentSourceType != null) {
12754 _json["paymentSourceType"] = paymentSourceType;
12755 }
12756 if (primary != null) {
12757 _json["primary"] = primary;
12758 }
12759 if (width != null) {
12760 _json["width"] = width;
12761 }
12762 return _json;
12763 }
12764 }
12765
12766 /** Ad List Response */
12767 class AdsListResponse {
12768 /** Ad collection. */
12769 core.List<Ad> ads;
12770 /**
12771 * Identifies what kind of resource this is. Value: the fixed string
12772 * "dfareporting#adsListResponse".
12773 */
12774 core.String kind;
12775 /** Pagination token to be used for the next list operation. */
12776 core.String nextPageToken;
12777
12778 AdsListResponse();
12779
12780 AdsListResponse.fromJson(core.Map _json) {
12781 if (_json.containsKey("ads")) {
12782 ads = _json["ads"].map((value) => new Ad.fromJson(value)).toList();
12783 }
12784 if (_json.containsKey("kind")) {
12785 kind = _json["kind"];
12786 }
12787 if (_json.containsKey("nextPageToken")) {
12788 nextPageToken = _json["nextPageToken"];
12789 }
12790 }
12791
12792 core.Map toJson() {
12793 var _json = new core.Map();
12794 if (ads != null) {
12795 _json["ads"] = ads.map((value) => (value).toJson()).toList();
12796 }
12797 if (kind != null) {
12798 _json["kind"] = kind;
12799 }
12800 if (nextPageToken != null) {
12801 _json["nextPageToken"] = nextPageToken;
12802 }
12803 return _json;
12804 }
12805 }
12806
12807 /** Contains properties of a DCM advertiser. */
12808 class Advertiser {
12809 /**
12810 * Account ID of this advertiser.This is a read-only field that can be left
12811 * blank.
12812 */
12813 core.String accountId;
12814 /**
12815 * ID of the advertiser group this advertiser belongs to. You can group
12816 * advertisers for reporting purposes, allowing you to see aggregated
12817 * information for all advertisers in each group.
12818 */
12819 core.String advertiserGroupId;
12820 /**
12821 * Suffix added to click-through URL of ad creative associations under this
12822 * advertiser. Must be less than 129 characters long.
12823 */
12824 core.String clickThroughUrlSuffix;
12825 /**
12826 * ID of the click-through event tag to apply by default to the landing pages
12827 * of this advertiser's campaigns.
12828 */
12829 core.String defaultClickThroughEventTagId;
12830 /** Default email address used in sender field for tag emails. */
12831 core.String defaultEmail;
12832 /**
12833 * Floodlight configuration ID of this advertiser. The floodlight
12834 * configuration ID will be created automatically, so on insert this field
12835 * should be left blank. This field can be set to another advertiser's
12836 * floodlight configuration ID in order to share that advertiser's floodlight
12837 * configuration with this advertiser, so long as:
12838 * - This advertiser's original floodlight configuration is not already
12839 * associated with floodlight activities or floodlight activity groups.
12840 * - This advertiser's original floodlight configuration is not already shared
12841 * with another advertiser.
12842 */
12843 core.String floodlightConfigurationId;
12844 /**
12845 * Dimension value for the ID of the floodlight configuration. This is a
12846 * read-only, auto-generated field.
12847 */
12848 DimensionValue floodlightConfigurationIdDimensionValue;
12849 /** ID of this advertiser. This is a read-only, auto-generated field. */
12850 core.String id;
12851 /**
12852 * Dimension value for the ID of this advertiser. This is a read-only,
12853 * auto-generated field.
12854 */
12855 DimensionValue idDimensionValue;
12856 /**
12857 * Identifies what kind of resource this is. Value: the fixed string
12858 * "dfareporting#advertiser".
12859 */
12860 core.String kind;
12861 /**
12862 * Name of this advertiser. This is a required field and must be less than 256
12863 * characters long and unique among advertisers of the same account.
12864 */
12865 core.String name;
12866 /**
12867 * Original floodlight configuration before any sharing occurred. Set the
12868 * floodlightConfigurationId of this advertiser to
12869 * originalFloodlightConfigurationId to unshare the advertiser's current
12870 * floodlight configuration. You cannot unshare an advertiser's floodlight
12871 * configuration if the shared configuration has activities associated with
12872 * any campaign or placement.
12873 */
12874 core.String originalFloodlightConfigurationId;
12875 /**
12876 * Status of this advertiser.
12877 * Possible string values are:
12878 * - "APPROVED"
12879 * - "ON_HOLD"
12880 */
12881 core.String status;
12882 /**
12883 * Subaccount ID of this advertiser.This is a read-only field that can be left
12884 * blank.
12885 */
12886 core.String subaccountId;
12887 /** Suspension status of this advertiser. */
12888 core.bool suspended;
12889
12890 Advertiser();
12891
12892 Advertiser.fromJson(core.Map _json) {
12893 if (_json.containsKey("accountId")) {
12894 accountId = _json["accountId"];
12895 }
12896 if (_json.containsKey("advertiserGroupId")) {
12897 advertiserGroupId = _json["advertiserGroupId"];
12898 }
12899 if (_json.containsKey("clickThroughUrlSuffix")) {
12900 clickThroughUrlSuffix = _json["clickThroughUrlSuffix"];
12901 }
12902 if (_json.containsKey("defaultClickThroughEventTagId")) {
12903 defaultClickThroughEventTagId = _json["defaultClickThroughEventTagId"];
12904 }
12905 if (_json.containsKey("defaultEmail")) {
12906 defaultEmail = _json["defaultEmail"];
12907 }
12908 if (_json.containsKey("floodlightConfigurationId")) {
12909 floodlightConfigurationId = _json["floodlightConfigurationId"];
12910 }
12911 if (_json.containsKey("floodlightConfigurationIdDimensionValue")) {
12912 floodlightConfigurationIdDimensionValue = new DimensionValue.fromJson(_jso n["floodlightConfigurationIdDimensionValue"]);
12913 }
12914 if (_json.containsKey("id")) {
12915 id = _json["id"];
12916 }
12917 if (_json.containsKey("idDimensionValue")) {
12918 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
12919 }
12920 if (_json.containsKey("kind")) {
12921 kind = _json["kind"];
12922 }
12923 if (_json.containsKey("name")) {
12924 name = _json["name"];
12925 }
12926 if (_json.containsKey("originalFloodlightConfigurationId")) {
12927 originalFloodlightConfigurationId = _json["originalFloodlightConfiguration Id"];
12928 }
12929 if (_json.containsKey("status")) {
12930 status = _json["status"];
12931 }
12932 if (_json.containsKey("subaccountId")) {
12933 subaccountId = _json["subaccountId"];
12934 }
12935 if (_json.containsKey("suspended")) {
12936 suspended = _json["suspended"];
12937 }
12938 }
12939
12940 core.Map toJson() {
12941 var _json = new core.Map();
12942 if (accountId != null) {
12943 _json["accountId"] = accountId;
12944 }
12945 if (advertiserGroupId != null) {
12946 _json["advertiserGroupId"] = advertiserGroupId;
12947 }
12948 if (clickThroughUrlSuffix != null) {
12949 _json["clickThroughUrlSuffix"] = clickThroughUrlSuffix;
12950 }
12951 if (defaultClickThroughEventTagId != null) {
12952 _json["defaultClickThroughEventTagId"] = defaultClickThroughEventTagId;
12953 }
12954 if (defaultEmail != null) {
12955 _json["defaultEmail"] = defaultEmail;
12956 }
12957 if (floodlightConfigurationId != null) {
12958 _json["floodlightConfigurationId"] = floodlightConfigurationId;
12959 }
12960 if (floodlightConfigurationIdDimensionValue != null) {
12961 _json["floodlightConfigurationIdDimensionValue"] = (floodlightConfiguratio nIdDimensionValue).toJson();
12962 }
12963 if (id != null) {
12964 _json["id"] = id;
12965 }
12966 if (idDimensionValue != null) {
12967 _json["idDimensionValue"] = (idDimensionValue).toJson();
12968 }
12969 if (kind != null) {
12970 _json["kind"] = kind;
12971 }
12972 if (name != null) {
12973 _json["name"] = name;
12974 }
12975 if (originalFloodlightConfigurationId != null) {
12976 _json["originalFloodlightConfigurationId"] = originalFloodlightConfigurati onId;
12977 }
12978 if (status != null) {
12979 _json["status"] = status;
12980 }
12981 if (subaccountId != null) {
12982 _json["subaccountId"] = subaccountId;
12983 }
12984 if (suspended != null) {
12985 _json["suspended"] = suspended;
12986 }
12987 return _json;
12988 }
12989 }
12990
12991 /**
12992 * Groups advertisers together so that reports can be generated for the entire
12993 * group at once.
12994 */
12995 class AdvertiserGroup {
12996 /**
12997 * Account ID of this advertiser group. This is a read-only field that can be
12998 * left blank.
12999 */
13000 core.String accountId;
13001 /**
13002 * ID of this advertiser group. This is a read-only, auto-generated field.
13003 */
13004 core.String id;
13005 /**
13006 * Identifies what kind of resource this is. Value: the fixed string
13007 * "dfareporting#advertiserGroup".
13008 */
13009 core.String kind;
13010 /**
13011 * Name of this advertiser group. This is a required field and must be less
13012 * than 256 characters long and unique among advertiser groups of the same
13013 * account.
13014 */
13015 core.String name;
13016
13017 AdvertiserGroup();
13018
13019 AdvertiserGroup.fromJson(core.Map _json) {
13020 if (_json.containsKey("accountId")) {
13021 accountId = _json["accountId"];
13022 }
13023 if (_json.containsKey("id")) {
13024 id = _json["id"];
13025 }
13026 if (_json.containsKey("kind")) {
13027 kind = _json["kind"];
13028 }
13029 if (_json.containsKey("name")) {
13030 name = _json["name"];
13031 }
13032 }
13033
13034 core.Map toJson() {
13035 var _json = new core.Map();
13036 if (accountId != null) {
13037 _json["accountId"] = accountId;
13038 }
13039 if (id != null) {
13040 _json["id"] = id;
13041 }
13042 if (kind != null) {
13043 _json["kind"] = kind;
13044 }
13045 if (name != null) {
13046 _json["name"] = name;
13047 }
13048 return _json;
13049 }
13050 }
13051
13052 /** Advertiser Group List Response */
13053 class AdvertiserGroupsListResponse {
13054 /** Advertiser group collection. */
13055 core.List<AdvertiserGroup> advertiserGroups;
13056 /**
13057 * Identifies what kind of resource this is. Value: the fixed string
13058 * "dfareporting#advertiserGroupsListResponse".
13059 */
13060 core.String kind;
13061 /** Pagination token to be used for the next list operation. */
13062 core.String nextPageToken;
13063
13064 AdvertiserGroupsListResponse();
13065
13066 AdvertiserGroupsListResponse.fromJson(core.Map _json) {
13067 if (_json.containsKey("advertiserGroups")) {
13068 advertiserGroups = _json["advertiserGroups"].map((value) => new Advertiser Group.fromJson(value)).toList();
13069 }
13070 if (_json.containsKey("kind")) {
13071 kind = _json["kind"];
13072 }
13073 if (_json.containsKey("nextPageToken")) {
13074 nextPageToken = _json["nextPageToken"];
13075 }
13076 }
13077
13078 core.Map toJson() {
13079 var _json = new core.Map();
13080 if (advertiserGroups != null) {
13081 _json["advertiserGroups"] = advertiserGroups.map((value) => (value).toJson ()).toList();
13082 }
13083 if (kind != null) {
13084 _json["kind"] = kind;
13085 }
13086 if (nextPageToken != null) {
13087 _json["nextPageToken"] = nextPageToken;
13088 }
13089 return _json;
13090 }
13091 }
13092
13093 /** Advertiser List Response */
13094 class AdvertisersListResponse {
13095 /** Advertiser collection. */
13096 core.List<Advertiser> advertisers;
13097 /**
13098 * Identifies what kind of resource this is. Value: the fixed string
13099 * "dfareporting#advertisersListResponse".
13100 */
13101 core.String kind;
13102 /** Pagination token to be used for the next list operation. */
13103 core.String nextPageToken;
13104
13105 AdvertisersListResponse();
13106
13107 AdvertisersListResponse.fromJson(core.Map _json) {
13108 if (_json.containsKey("advertisers")) {
13109 advertisers = _json["advertisers"].map((value) => new Advertiser.fromJson( value)).toList();
13110 }
13111 if (_json.containsKey("kind")) {
13112 kind = _json["kind"];
13113 }
13114 if (_json.containsKey("nextPageToken")) {
13115 nextPageToken = _json["nextPageToken"];
13116 }
13117 }
13118
13119 core.Map toJson() {
13120 var _json = new core.Map();
13121 if (advertisers != null) {
13122 _json["advertisers"] = advertisers.map((value) => (value).toJson()).toList ();
13123 }
13124 if (kind != null) {
13125 _json["kind"] = kind;
13126 }
13127 if (nextPageToken != null) {
13128 _json["nextPageToken"] = nextPageToken;
13129 }
13130 return _json;
13131 }
13132 }
13133
13134 /** Audience Segment. */
13135 class AudienceSegment {
13136 /**
13137 * Weight allocated to this segment. Must be between 1 and 1000. The weight
13138 * assigned will be understood in proportion to the weights assigned to other
13139 * segments in the same segment group.
13140 */
13141 core.int allocation;
13142 /**
13143 * ID of this audience segment. This is a read-only, auto-generated field.
13144 */
13145 core.String id;
13146 /**
13147 * Name of this audience segment. This is a required field and must be less
13148 * than 65 characters long.
13149 */
13150 core.String name;
13151
13152 AudienceSegment();
13153
13154 AudienceSegment.fromJson(core.Map _json) {
13155 if (_json.containsKey("allocation")) {
13156 allocation = _json["allocation"];
13157 }
13158 if (_json.containsKey("id")) {
13159 id = _json["id"];
13160 }
13161 if (_json.containsKey("name")) {
13162 name = _json["name"];
13163 }
13164 }
13165
13166 core.Map toJson() {
13167 var _json = new core.Map();
13168 if (allocation != null) {
13169 _json["allocation"] = allocation;
13170 }
13171 if (id != null) {
13172 _json["id"] = id;
13173 }
13174 if (name != null) {
13175 _json["name"] = name;
13176 }
13177 return _json;
13178 }
13179 }
13180
13181 /** Audience Segment Group. */
13182 class AudienceSegmentGroup {
13183 /**
13184 * Audience segments assigned to this group. The number of segments must be
13185 * between 2 and 100.
13186 */
13187 core.List<AudienceSegment> audienceSegments;
13188 /**
13189 * ID of this audience segment group. This is a read-only, auto-generated
13190 * field.
13191 */
13192 core.String id;
13193 /**
13194 * Name of this audience segment group. This is a required field and must be
13195 * less than 65 characters long.
13196 */
13197 core.String name;
13198
13199 AudienceSegmentGroup();
13200
13201 AudienceSegmentGroup.fromJson(core.Map _json) {
13202 if (_json.containsKey("audienceSegments")) {
13203 audienceSegments = _json["audienceSegments"].map((value) => new AudienceSe gment.fromJson(value)).toList();
13204 }
13205 if (_json.containsKey("id")) {
13206 id = _json["id"];
13207 }
13208 if (_json.containsKey("name")) {
13209 name = _json["name"];
13210 }
13211 }
13212
13213 core.Map toJson() {
13214 var _json = new core.Map();
13215 if (audienceSegments != null) {
13216 _json["audienceSegments"] = audienceSegments.map((value) => (value).toJson ()).toList();
13217 }
13218 if (id != null) {
13219 _json["id"] = id;
13220 }
13221 if (name != null) {
13222 _json["name"] = name;
13223 }
13224 return _json;
13225 }
13226 }
13227
13228 /** Contains information about a browser that can be targeted by ads. */
13229 class Browser {
13230 /**
13231 * ID referring to this grouping of browser and version numbers. This is the
13232 * ID used for targeting.
13233 */
13234 core.String browserVersionId;
13235 /** DART ID of this browser. This is the ID used when generating reports. */
13236 core.String dartId;
13237 /**
13238 * Identifies what kind of resource this is. Value: the fixed string
13239 * "dfareporting#browser".
13240 */
13241 core.String kind;
13242 /**
13243 * Major version number (leftmost number) of this browser. For example, for
13244 * Chrome 5.0.376.86 beta, this field should be set to 5. An asterisk (*) may
13245 * be used to target any version number, and a question mark (?) may be used
13246 * to target cases where the version number cannot be identified. For example,
13247 * Chrome *.* targets any version of Chrome: 1.2, 2.5, 3.5, and so on. Chrome
13248 * 3.* targets Chrome 3.1, 3.5, but not 4.0. Firefox ?.? targets cases where
13249 * the ad server knows the browser is Firefox but can't tell which version it
13250 * is.
13251 */
13252 core.String majorVersion;
13253 /**
13254 * Minor version number (number after first dot on left) of this browser. For
13255 * example, for Chrome 5.0.375.86 beta, this field should be set to 0. An
13256 * asterisk (*) may be used to target any version number, and a question mark
13257 * (?) may be used to target cases where the version number cannot be
13258 * identified. For example, Chrome *.* targets any version of Chrome: 1.2,
13259 * 2.5, 3.5, and so on. Chrome 3.* targets Chrome 3.1, 3.5, but not 4.0.
13260 * Firefox ?.? targets cases where the ad server knows the browser is Firefox
13261 * but can't tell which version it is.
13262 */
13263 core.String minorVersion;
13264 /** Name of this browser. */
13265 core.String name;
13266
13267 Browser();
13268
13269 Browser.fromJson(core.Map _json) {
13270 if (_json.containsKey("browserVersionId")) {
13271 browserVersionId = _json["browserVersionId"];
13272 }
13273 if (_json.containsKey("dartId")) {
13274 dartId = _json["dartId"];
13275 }
13276 if (_json.containsKey("kind")) {
13277 kind = _json["kind"];
13278 }
13279 if (_json.containsKey("majorVersion")) {
13280 majorVersion = _json["majorVersion"];
13281 }
13282 if (_json.containsKey("minorVersion")) {
13283 minorVersion = _json["minorVersion"];
13284 }
13285 if (_json.containsKey("name")) {
13286 name = _json["name"];
13287 }
13288 }
13289
13290 core.Map toJson() {
13291 var _json = new core.Map();
13292 if (browserVersionId != null) {
13293 _json["browserVersionId"] = browserVersionId;
13294 }
13295 if (dartId != null) {
13296 _json["dartId"] = dartId;
13297 }
13298 if (kind != null) {
13299 _json["kind"] = kind;
13300 }
13301 if (majorVersion != null) {
13302 _json["majorVersion"] = majorVersion;
13303 }
13304 if (minorVersion != null) {
13305 _json["minorVersion"] = minorVersion;
13306 }
13307 if (name != null) {
13308 _json["name"] = name;
13309 }
13310 return _json;
13311 }
13312 }
13313
13314 /** Browser List Response */
13315 class BrowsersListResponse {
13316 /** Browser collection. */
13317 core.List<Browser> browsers;
13318 /**
13319 * Identifies what kind of resource this is. Value: the fixed string
13320 * "dfareporting#browsersListResponse".
13321 */
13322 core.String kind;
13323
13324 BrowsersListResponse();
13325
13326 BrowsersListResponse.fromJson(core.Map _json) {
13327 if (_json.containsKey("browsers")) {
13328 browsers = _json["browsers"].map((value) => new Browser.fromJson(value)).t oList();
13329 }
13330 if (_json.containsKey("kind")) {
13331 kind = _json["kind"];
13332 }
13333 }
13334
13335 core.Map toJson() {
13336 var _json = new core.Map();
13337 if (browsers != null) {
13338 _json["browsers"] = browsers.map((value) => (value).toJson()).toList();
13339 }
13340 if (kind != null) {
13341 _json["kind"] = kind;
13342 }
13343 return _json;
13344 }
13345 }
13346
13347 /** Contains properties of a DCM campaign. */
13348 class Campaign {
13349 /**
13350 * Account ID of this campaign. This is a read-only field that can be left
13351 * blank.
13352 */
13353 core.String accountId;
13354 /** Additional creative optimization configurations for the campaign. */
13355 core.List<CreativeOptimizationConfiguration> additionalCreativeOptimizationCon figurations;
13356 /** Advertiser group ID of the associated advertiser. */
13357 core.String advertiserGroupId;
13358 /** Advertiser ID of this campaign. This is a required field. */
13359 core.String advertiserId;
13360 /**
13361 * Dimension value for the advertiser ID of this campaign. This is a
13362 * read-only, auto-generated field.
13363 */
13364 DimensionValue advertiserIdDimensionValue;
13365 /** Whether this campaign has been archived. */
13366 core.bool archived;
13367 /**
13368 * Audience segment groups assigned to this campaign. Cannot have more than
13369 * 300 segment groups.
13370 */
13371 core.List<AudienceSegmentGroup> audienceSegmentGroups;
13372 /**
13373 * Billing invoice code included in the DCM client billing invoices associated
13374 * with the campaign.
13375 */
13376 core.String billingInvoiceCode;
13377 /** Click-through URL suffix override properties for this campaign. */
13378 ClickThroughUrlSuffixProperties clickThroughUrlSuffixProperties;
13379 /**
13380 * Arbitrary comments about this campaign. Must be less than 256 characters
13381 * long.
13382 */
13383 core.String comment;
13384 /** Whether comScore vCE reports are enabled for this campaign. */
13385 core.bool comscoreVceEnabled;
13386 /**
13387 * Information about the creation of this campaign. This is a read-only field.
13388 */
13389 LastModifiedInfo createInfo;
13390 /** List of creative group IDs that are assigned to the campaign. */
13391 core.List<core.String> creativeGroupIds;
13392 /** Creative optimization configuration for the campaign. */
13393 CreativeOptimizationConfiguration creativeOptimizationConfiguration;
13394 /** Click-through event tag ID override properties for this campaign. */
13395 DefaultClickThroughEventTagProperties defaultClickThroughEventTagProperties;
13396 /**
13397 * Date on which the campaign will stop running. On insert, the end date must
13398 * be today or a future date. The end date must be later than or be the same
13399 * as the start date. If, for example, you set 6/25/2015 as both the start and
13400 * end dates, the effective campaign run date is just that day only,
13401 * 6/25/2015. The hours, minutes, and seconds of the end date should not be
13402 * set, as doing so will result in an error. This is a required field.
13403 */
13404 core.DateTime endDate;
13405 /**
13406 * Overrides that can be used to activate or deactivate advertiser event tags.
13407 */
13408 core.List<EventTagOverride> eventTagOverrides;
13409 /** External ID for this campaign. */
13410 core.String externalId;
13411 /** ID of this campaign. This is a read-only auto-generated field. */
13412 core.String id;
13413 /**
13414 * Dimension value for the ID of this campaign. This is a read-only,
13415 * auto-generated field.
13416 */
13417 DimensionValue idDimensionValue;
13418 /**
13419 * Identifies what kind of resource this is. Value: the fixed string
13420 * "dfareporting#campaign".
13421 */
13422 core.String kind;
13423 /**
13424 * Information about the most recent modification of this campaign. This is a
13425 * read-only field.
13426 */
13427 LastModifiedInfo lastModifiedInfo;
13428 /** Lookback window settings for the campaign. */
13429 LookbackConfiguration lookbackConfiguration;
13430 /**
13431 * Name of this campaign. This is a required field and must be less than 256
13432 * characters long and unique among campaigns of the same advertiser.
13433 */
13434 core.String name;
13435 /** Whether Nielsen reports are enabled for this campaign. */
13436 core.bool nielsenOcrEnabled;
13437 /**
13438 * Date on which the campaign starts running. The start date can be any date.
13439 * The hours, minutes, and seconds of the start date should not be set, as
13440 * doing so will result in an error. This is a required field.
13441 */
13442 core.DateTime startDate;
13443 /**
13444 * Subaccount ID of this campaign. This is a read-only field that can be left
13445 * blank.
13446 */
13447 core.String subaccountId;
13448 /** Campaign trafficker contact emails. */
13449 core.List<core.String> traffickerEmails;
13450
13451 Campaign();
13452
13453 Campaign.fromJson(core.Map _json) {
13454 if (_json.containsKey("accountId")) {
13455 accountId = _json["accountId"];
13456 }
13457 if (_json.containsKey("additionalCreativeOptimizationConfigurations")) {
13458 additionalCreativeOptimizationConfigurations = _json["additionalCreativeOp timizationConfigurations"].map((value) => new CreativeOptimizationConfiguration. fromJson(value)).toList();
13459 }
13460 if (_json.containsKey("advertiserGroupId")) {
13461 advertiserGroupId = _json["advertiserGroupId"];
13462 }
13463 if (_json.containsKey("advertiserId")) {
13464 advertiserId = _json["advertiserId"];
13465 }
13466 if (_json.containsKey("advertiserIdDimensionValue")) {
13467 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
13468 }
13469 if (_json.containsKey("archived")) {
13470 archived = _json["archived"];
13471 }
13472 if (_json.containsKey("audienceSegmentGroups")) {
13473 audienceSegmentGroups = _json["audienceSegmentGroups"].map((value) => new AudienceSegmentGroup.fromJson(value)).toList();
13474 }
13475 if (_json.containsKey("billingInvoiceCode")) {
13476 billingInvoiceCode = _json["billingInvoiceCode"];
13477 }
13478 if (_json.containsKey("clickThroughUrlSuffixProperties")) {
13479 clickThroughUrlSuffixProperties = new ClickThroughUrlSuffixProperties.from Json(_json["clickThroughUrlSuffixProperties"]);
13480 }
13481 if (_json.containsKey("comment")) {
13482 comment = _json["comment"];
13483 }
13484 if (_json.containsKey("comscoreVceEnabled")) {
13485 comscoreVceEnabled = _json["comscoreVceEnabled"];
13486 }
13487 if (_json.containsKey("createInfo")) {
13488 createInfo = new LastModifiedInfo.fromJson(_json["createInfo"]);
13489 }
13490 if (_json.containsKey("creativeGroupIds")) {
13491 creativeGroupIds = _json["creativeGroupIds"];
13492 }
13493 if (_json.containsKey("creativeOptimizationConfiguration")) {
13494 creativeOptimizationConfiguration = new CreativeOptimizationConfiguration. fromJson(_json["creativeOptimizationConfiguration"]);
13495 }
13496 if (_json.containsKey("defaultClickThroughEventTagProperties")) {
13497 defaultClickThroughEventTagProperties = new DefaultClickThroughEventTagPro perties.fromJson(_json["defaultClickThroughEventTagProperties"]);
13498 }
13499 if (_json.containsKey("endDate")) {
13500 endDate = core.DateTime.parse(_json["endDate"]);
13501 }
13502 if (_json.containsKey("eventTagOverrides")) {
13503 eventTagOverrides = _json["eventTagOverrides"].map((value) => new EventTag Override.fromJson(value)).toList();
13504 }
13505 if (_json.containsKey("externalId")) {
13506 externalId = _json["externalId"];
13507 }
13508 if (_json.containsKey("id")) {
13509 id = _json["id"];
13510 }
13511 if (_json.containsKey("idDimensionValue")) {
13512 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
13513 }
13514 if (_json.containsKey("kind")) {
13515 kind = _json["kind"];
13516 }
13517 if (_json.containsKey("lastModifiedInfo")) {
13518 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"] );
13519 }
13520 if (_json.containsKey("lookbackConfiguration")) {
13521 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback Configuration"]);
13522 }
13523 if (_json.containsKey("name")) {
13524 name = _json["name"];
13525 }
13526 if (_json.containsKey("nielsenOcrEnabled")) {
13527 nielsenOcrEnabled = _json["nielsenOcrEnabled"];
13528 }
13529 if (_json.containsKey("startDate")) {
13530 startDate = core.DateTime.parse(_json["startDate"]);
13531 }
13532 if (_json.containsKey("subaccountId")) {
13533 subaccountId = _json["subaccountId"];
13534 }
13535 if (_json.containsKey("traffickerEmails")) {
13536 traffickerEmails = _json["traffickerEmails"];
13537 }
13538 }
13539
13540 core.Map toJson() {
13541 var _json = new core.Map();
13542 if (accountId != null) {
13543 _json["accountId"] = accountId;
13544 }
13545 if (additionalCreativeOptimizationConfigurations != null) {
13546 _json["additionalCreativeOptimizationConfigurations"] = additionalCreative OptimizationConfigurations.map((value) => (value).toJson()).toList();
13547 }
13548 if (advertiserGroupId != null) {
13549 _json["advertiserGroupId"] = advertiserGroupId;
13550 }
13551 if (advertiserId != null) {
13552 _json["advertiserId"] = advertiserId;
13553 }
13554 if (advertiserIdDimensionValue != null) {
13555 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
13556 }
13557 if (archived != null) {
13558 _json["archived"] = archived;
13559 }
13560 if (audienceSegmentGroups != null) {
13561 _json["audienceSegmentGroups"] = audienceSegmentGroups.map((value) => (val ue).toJson()).toList();
13562 }
13563 if (billingInvoiceCode != null) {
13564 _json["billingInvoiceCode"] = billingInvoiceCode;
13565 }
13566 if (clickThroughUrlSuffixProperties != null) {
13567 _json["clickThroughUrlSuffixProperties"] = (clickThroughUrlSuffixPropertie s).toJson();
13568 }
13569 if (comment != null) {
13570 _json["comment"] = comment;
13571 }
13572 if (comscoreVceEnabled != null) {
13573 _json["comscoreVceEnabled"] = comscoreVceEnabled;
13574 }
13575 if (createInfo != null) {
13576 _json["createInfo"] = (createInfo).toJson();
13577 }
13578 if (creativeGroupIds != null) {
13579 _json["creativeGroupIds"] = creativeGroupIds;
13580 }
13581 if (creativeOptimizationConfiguration != null) {
13582 _json["creativeOptimizationConfiguration"] = (creativeOptimizationConfigur ation).toJson();
13583 }
13584 if (defaultClickThroughEventTagProperties != null) {
13585 _json["defaultClickThroughEventTagProperties"] = (defaultClickThroughEvent TagProperties).toJson();
13586 }
13587 if (endDate != null) {
13588 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')} ";
13589 }
13590 if (eventTagOverrides != null) {
13591 _json["eventTagOverrides"] = eventTagOverrides.map((value) => (value).toJs on()).toList();
13592 }
13593 if (externalId != null) {
13594 _json["externalId"] = externalId;
13595 }
13596 if (id != null) {
13597 _json["id"] = id;
13598 }
13599 if (idDimensionValue != null) {
13600 _json["idDimensionValue"] = (idDimensionValue).toJson();
13601 }
13602 if (kind != null) {
13603 _json["kind"] = kind;
13604 }
13605 if (lastModifiedInfo != null) {
13606 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson();
13607 }
13608 if (lookbackConfiguration != null) {
13609 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson();
13610 }
13611 if (name != null) {
13612 _json["name"] = name;
13613 }
13614 if (nielsenOcrEnabled != null) {
13615 _json["nielsenOcrEnabled"] = nielsenOcrEnabled;
13616 }
13617 if (startDate != null) {
13618 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft( 2, '0')}";
13619 }
13620 if (subaccountId != null) {
13621 _json["subaccountId"] = subaccountId;
13622 }
13623 if (traffickerEmails != null) {
13624 _json["traffickerEmails"] = traffickerEmails;
13625 }
13626 return _json;
13627 }
13628 }
13629
13630 /** Identifies a creative which has been associated with a given campaign. */
13631 class CampaignCreativeAssociation {
13632 /**
13633 * ID of the creative associated with the campaign. This is a required field.
13634 */
13635 core.String creativeId;
13636 /**
13637 * Identifies what kind of resource this is. Value: the fixed string
13638 * "dfareporting#campaignCreativeAssociation".
13639 */
13640 core.String kind;
13641
13642 CampaignCreativeAssociation();
13643
13644 CampaignCreativeAssociation.fromJson(core.Map _json) {
13645 if (_json.containsKey("creativeId")) {
13646 creativeId = _json["creativeId"];
13647 }
13648 if (_json.containsKey("kind")) {
13649 kind = _json["kind"];
13650 }
13651 }
13652
13653 core.Map toJson() {
13654 var _json = new core.Map();
13655 if (creativeId != null) {
13656 _json["creativeId"] = creativeId;
13657 }
13658 if (kind != null) {
13659 _json["kind"] = kind;
13660 }
13661 return _json;
13662 }
13663 }
13664
13665 /** Campaign Creative Association List Response */
13666 class CampaignCreativeAssociationsListResponse {
13667 /** Campaign creative association collection */
13668 core.List<CampaignCreativeAssociation> campaignCreativeAssociations;
13669 /**
13670 * Identifies what kind of resource this is. Value: the fixed string
13671 * "dfareporting#campaignCreativeAssociationsListResponse".
13672 */
13673 core.String kind;
13674 /** Pagination token to be used for the next list operation. */
13675 core.String nextPageToken;
13676
13677 CampaignCreativeAssociationsListResponse();
13678
13679 CampaignCreativeAssociationsListResponse.fromJson(core.Map _json) {
13680 if (_json.containsKey("campaignCreativeAssociations")) {
13681 campaignCreativeAssociations = _json["campaignCreativeAssociations"].map(( value) => new CampaignCreativeAssociation.fromJson(value)).toList();
13682 }
13683 if (_json.containsKey("kind")) {
13684 kind = _json["kind"];
13685 }
13686 if (_json.containsKey("nextPageToken")) {
13687 nextPageToken = _json["nextPageToken"];
13688 }
13689 }
13690
13691 core.Map toJson() {
13692 var _json = new core.Map();
13693 if (campaignCreativeAssociations != null) {
13694 _json["campaignCreativeAssociations"] = campaignCreativeAssociations.map(( value) => (value).toJson()).toList();
13695 }
13696 if (kind != null) {
13697 _json["kind"] = kind;
13698 }
13699 if (nextPageToken != null) {
13700 _json["nextPageToken"] = nextPageToken;
13701 }
13702 return _json;
13703 }
13704 }
13705
13706 /** Campaign List Response */
13707 class CampaignsListResponse {
13708 /** Campaign collection. */
13709 core.List<Campaign> campaigns;
13710 /**
13711 * Identifies what kind of resource this is. Value: the fixed string
13712 * "dfareporting#campaignsListResponse".
13713 */
13714 core.String kind;
13715 /** Pagination token to be used for the next list operation. */
13716 core.String nextPageToken;
13717
13718 CampaignsListResponse();
13719
13720 CampaignsListResponse.fromJson(core.Map _json) {
13721 if (_json.containsKey("campaigns")) {
13722 campaigns = _json["campaigns"].map((value) => new Campaign.fromJson(value) ).toList();
13723 }
13724 if (_json.containsKey("kind")) {
13725 kind = _json["kind"];
13726 }
13727 if (_json.containsKey("nextPageToken")) {
13728 nextPageToken = _json["nextPageToken"];
13729 }
13730 }
13731
13732 core.Map toJson() {
13733 var _json = new core.Map();
13734 if (campaigns != null) {
13735 _json["campaigns"] = campaigns.map((value) => (value).toJson()).toList();
13736 }
13737 if (kind != null) {
13738 _json["kind"] = kind;
13739 }
13740 if (nextPageToken != null) {
13741 _json["nextPageToken"] = nextPageToken;
13742 }
13743 return _json;
13744 }
13745 }
13746
13747 /** Describes a change that a user has made to a resource. */
13748 class ChangeLog {
13749 /** Account ID of the modified object. */
13750 core.String accountId;
13751 /** Action which caused the change. */
13752 core.String action;
13753 /** Time when the object was modified. */
13754 core.DateTime changeTime;
13755 /** Field name of the object which changed. */
13756 core.String fieldName;
13757 /** ID of this change log. */
13758 core.String id;
13759 /**
13760 * Identifies what kind of resource this is. Value: the fixed string
13761 * "dfareporting#changeLog".
13762 */
13763 core.String kind;
13764 /** New value of the object field. */
13765 core.String newValue;
13766 /**
13767 * ID of the object of this change log. The object could be a campaign,
13768 * placement, ad, or other type.
13769 */
13770 core.String objectId;
13771 /** Object type of the change log. */
13772 core.String objectType;
13773 /** Old value of the object field. */
13774 core.String oldValue;
13775 /** Subaccount ID of the modified object. */
13776 core.String subaccountId;
13777 /**
13778 * Transaction ID of this change log. When a single API call results in many
13779 * changes, each change will have a separate ID in the change log but will
13780 * share the same transactionId.
13781 */
13782 core.String transactionId;
13783 /** ID of the user who modified the object. */
13784 core.String userProfileId;
13785 /** User profile name of the user who modified the object. */
13786 core.String userProfileName;
13787
13788 ChangeLog();
13789
13790 ChangeLog.fromJson(core.Map _json) {
13791 if (_json.containsKey("accountId")) {
13792 accountId = _json["accountId"];
13793 }
13794 if (_json.containsKey("action")) {
13795 action = _json["action"];
13796 }
13797 if (_json.containsKey("changeTime")) {
13798 changeTime = core.DateTime.parse(_json["changeTime"]);
13799 }
13800 if (_json.containsKey("fieldName")) {
13801 fieldName = _json["fieldName"];
13802 }
13803 if (_json.containsKey("id")) {
13804 id = _json["id"];
13805 }
13806 if (_json.containsKey("kind")) {
13807 kind = _json["kind"];
13808 }
13809 if (_json.containsKey("newValue")) {
13810 newValue = _json["newValue"];
13811 }
13812 if (_json.containsKey("objectId")) {
13813 objectId = _json["objectId"];
13814 }
13815 if (_json.containsKey("objectType")) {
13816 objectType = _json["objectType"];
13817 }
13818 if (_json.containsKey("oldValue")) {
13819 oldValue = _json["oldValue"];
13820 }
13821 if (_json.containsKey("subaccountId")) {
13822 subaccountId = _json["subaccountId"];
13823 }
13824 if (_json.containsKey("transactionId")) {
13825 transactionId = _json["transactionId"];
13826 }
13827 if (_json.containsKey("userProfileId")) {
13828 userProfileId = _json["userProfileId"];
13829 }
13830 if (_json.containsKey("userProfileName")) {
13831 userProfileName = _json["userProfileName"];
13832 }
13833 }
13834
13835 core.Map toJson() {
13836 var _json = new core.Map();
13837 if (accountId != null) {
13838 _json["accountId"] = accountId;
13839 }
13840 if (action != null) {
13841 _json["action"] = action;
13842 }
13843 if (changeTime != null) {
13844 _json["changeTime"] = (changeTime).toIso8601String();
13845 }
13846 if (fieldName != null) {
13847 _json["fieldName"] = fieldName;
13848 }
13849 if (id != null) {
13850 _json["id"] = id;
13851 }
13852 if (kind != null) {
13853 _json["kind"] = kind;
13854 }
13855 if (newValue != null) {
13856 _json["newValue"] = newValue;
13857 }
13858 if (objectId != null) {
13859 _json["objectId"] = objectId;
13860 }
13861 if (objectType != null) {
13862 _json["objectType"] = objectType;
13863 }
13864 if (oldValue != null) {
13865 _json["oldValue"] = oldValue;
13866 }
13867 if (subaccountId != null) {
13868 _json["subaccountId"] = subaccountId;
13869 }
13870 if (transactionId != null) {
13871 _json["transactionId"] = transactionId;
13872 }
13873 if (userProfileId != null) {
13874 _json["userProfileId"] = userProfileId;
13875 }
13876 if (userProfileName != null) {
13877 _json["userProfileName"] = userProfileName;
13878 }
13879 return _json;
13880 }
13881 }
13882
13883 /** Change Log List Response */
13884 class ChangeLogsListResponse {
13885 /** Change log collection. */
13886 core.List<ChangeLog> changeLogs;
13887 /**
13888 * Identifies what kind of resource this is. Value: the fixed string
13889 * "dfareporting#changeLogsListResponse".
13890 */
13891 core.String kind;
13892 /** Pagination token to be used for the next list operation. */
13893 core.String nextPageToken;
13894
13895 ChangeLogsListResponse();
13896
13897 ChangeLogsListResponse.fromJson(core.Map _json) {
13898 if (_json.containsKey("changeLogs")) {
13899 changeLogs = _json["changeLogs"].map((value) => new ChangeLog.fromJson(val ue)).toList();
13900 }
13901 if (_json.containsKey("kind")) {
13902 kind = _json["kind"];
13903 }
13904 if (_json.containsKey("nextPageToken")) {
13905 nextPageToken = _json["nextPageToken"];
13906 }
13907 }
13908
13909 core.Map toJson() {
13910 var _json = new core.Map();
13911 if (changeLogs != null) {
13912 _json["changeLogs"] = changeLogs.map((value) => (value).toJson()).toList() ;
13913 }
13914 if (kind != null) {
13915 _json["kind"] = kind;
13916 }
13917 if (nextPageToken != null) {
13918 _json["nextPageToken"] = nextPageToken;
13919 }
13920 return _json;
13921 }
13922 }
13923
13924 /** City List Response */
13925 class CitiesListResponse {
13926 /** City collection. */
13927 core.List<City> cities;
13928 /**
13929 * Identifies what kind of resource this is. Value: the fixed string
13930 * "dfareporting#citiesListResponse".
13931 */
13932 core.String kind;
13933
13934 CitiesListResponse();
13935
13936 CitiesListResponse.fromJson(core.Map _json) {
13937 if (_json.containsKey("cities")) {
13938 cities = _json["cities"].map((value) => new City.fromJson(value)).toList() ;
13939 }
13940 if (_json.containsKey("kind")) {
13941 kind = _json["kind"];
13942 }
13943 }
13944
13945 core.Map toJson() {
13946 var _json = new core.Map();
13947 if (cities != null) {
13948 _json["cities"] = cities.map((value) => (value).toJson()).toList();
13949 }
13950 if (kind != null) {
13951 _json["kind"] = kind;
13952 }
13953 return _json;
13954 }
13955 }
13956
13957 /** Contains information about a city that can be targeted by ads. */
13958 class City {
13959 /** Country code of the country to which this city belongs. */
13960 core.String countryCode;
13961 /** DART ID of the country to which this city belongs. */
13962 core.String countryDartId;
13963 /**
13964 * DART ID of this city. This is the ID used for targeting and generating
13965 * reports.
13966 */
13967 core.String dartId;
13968 /**
13969 * Identifies what kind of resource this is. Value: the fixed string
13970 * "dfareporting#city".
13971 */
13972 core.String kind;
13973 /**
13974 * Metro region code of the metro region (DMA) to which this city belongs.
13975 */
13976 core.String metroCode;
13977 /** ID of the metro region (DMA) to which this city belongs. */
13978 core.String metroDmaId;
13979 /** Name of this city. */
13980 core.String name;
13981 /** Region code of the region to which this city belongs. */
13982 core.String regionCode;
13983 /** DART ID of the region to which this city belongs. */
13984 core.String regionDartId;
13985
13986 City();
13987
13988 City.fromJson(core.Map _json) {
13989 if (_json.containsKey("countryCode")) {
13990 countryCode = _json["countryCode"];
13991 }
13992 if (_json.containsKey("countryDartId")) {
13993 countryDartId = _json["countryDartId"];
13994 }
13995 if (_json.containsKey("dartId")) {
13996 dartId = _json["dartId"];
13997 }
13998 if (_json.containsKey("kind")) {
13999 kind = _json["kind"];
14000 }
14001 if (_json.containsKey("metroCode")) {
14002 metroCode = _json["metroCode"];
14003 }
14004 if (_json.containsKey("metroDmaId")) {
14005 metroDmaId = _json["metroDmaId"];
14006 }
14007 if (_json.containsKey("name")) {
14008 name = _json["name"];
14009 }
14010 if (_json.containsKey("regionCode")) {
14011 regionCode = _json["regionCode"];
14012 }
14013 if (_json.containsKey("regionDartId")) {
14014 regionDartId = _json["regionDartId"];
14015 }
14016 }
14017
14018 core.Map toJson() {
14019 var _json = new core.Map();
14020 if (countryCode != null) {
14021 _json["countryCode"] = countryCode;
14022 }
14023 if (countryDartId != null) {
14024 _json["countryDartId"] = countryDartId;
14025 }
14026 if (dartId != null) {
14027 _json["dartId"] = dartId;
14028 }
14029 if (kind != null) {
14030 _json["kind"] = kind;
14031 }
14032 if (metroCode != null) {
14033 _json["metroCode"] = metroCode;
14034 }
14035 if (metroDmaId != null) {
14036 _json["metroDmaId"] = metroDmaId;
14037 }
14038 if (name != null) {
14039 _json["name"] = name;
14040 }
14041 if (regionCode != null) {
14042 _json["regionCode"] = regionCode;
14043 }
14044 if (regionDartId != null) {
14045 _json["regionDartId"] = regionDartId;
14046 }
14047 return _json;
14048 }
14049 }
14050
14051 /** Creative Click Tag. */
14052 class ClickTag {
14053 /**
14054 * Advertiser event name associated with the click tag. This field is used by
14055 * ENHANCED_IMAGE, and HTML5_BANNER creatives. Applicable to ENHANCED_BANNER
14056 * when the primary asset type is not HTML_IMAGE
14057 */
14058 core.String eventName;
14059 /**
14060 * Parameter name for the specified click tag. For ENHANCED_IMAGE creative
14061 * assets, this field must match the value of the creative asset's
14062 * creativeAssetId.name field.
14063 */
14064 core.String name;
14065 /**
14066 * Parameter value for the specified click tag. This field contains a
14067 * click-through url.
14068 */
14069 core.String value;
14070
14071 ClickTag();
14072
14073 ClickTag.fromJson(core.Map _json) {
14074 if (_json.containsKey("eventName")) {
14075 eventName = _json["eventName"];
14076 }
14077 if (_json.containsKey("name")) {
14078 name = _json["name"];
14079 }
14080 if (_json.containsKey("value")) {
14081 value = _json["value"];
14082 }
14083 }
14084
14085 core.Map toJson() {
14086 var _json = new core.Map();
14087 if (eventName != null) {
14088 _json["eventName"] = eventName;
14089 }
14090 if (name != null) {
14091 _json["name"] = name;
14092 }
14093 if (value != null) {
14094 _json["value"] = value;
14095 }
14096 return _json;
14097 }
14098 }
14099
14100 /** Click-through URL */
14101 class ClickThroughUrl {
14102 /**
14103 * Read-only convenience field representing the actual URL that will be used
14104 * for this click-through. The URL is computed as follows:
14105 * - If defaultLandingPage is enabled then the campaign's default landing page
14106 * URL is assigned to this field.
14107 * - If defaultLandingPage is not enabled and a landingPageId is specified
14108 * then that landing page's URL is assigned to this field.
14109 * - If neither of the above cases apply, then the customClickThroughUrl is
14110 * assigned to this field.
14111 */
14112 core.String computedClickThroughUrl;
14113 /**
14114 * Custom click-through URL. Applicable if the defaultLandingPage field is set
14115 * to false and the landingPageId field is left unset.
14116 */
14117 core.String customClickThroughUrl;
14118 /** Whether the campaign default landing page is used. */
14119 core.bool defaultLandingPage;
14120 /**
14121 * ID of the landing page for the click-through URL. Applicable if the
14122 * defaultLandingPage field is set to false.
14123 */
14124 core.String landingPageId;
14125
14126 ClickThroughUrl();
14127
14128 ClickThroughUrl.fromJson(core.Map _json) {
14129 if (_json.containsKey("computedClickThroughUrl")) {
14130 computedClickThroughUrl = _json["computedClickThroughUrl"];
14131 }
14132 if (_json.containsKey("customClickThroughUrl")) {
14133 customClickThroughUrl = _json["customClickThroughUrl"];
14134 }
14135 if (_json.containsKey("defaultLandingPage")) {
14136 defaultLandingPage = _json["defaultLandingPage"];
14137 }
14138 if (_json.containsKey("landingPageId")) {
14139 landingPageId = _json["landingPageId"];
14140 }
14141 }
14142
14143 core.Map toJson() {
14144 var _json = new core.Map();
14145 if (computedClickThroughUrl != null) {
14146 _json["computedClickThroughUrl"] = computedClickThroughUrl;
14147 }
14148 if (customClickThroughUrl != null) {
14149 _json["customClickThroughUrl"] = customClickThroughUrl;
14150 }
14151 if (defaultLandingPage != null) {
14152 _json["defaultLandingPage"] = defaultLandingPage;
14153 }
14154 if (landingPageId != null) {
14155 _json["landingPageId"] = landingPageId;
14156 }
14157 return _json;
14158 }
14159 }
14160
14161 /** Click Through URL Suffix settings. */
14162 class ClickThroughUrlSuffixProperties {
14163 /**
14164 * Click-through URL suffix to apply to all ads in this entity's scope. Must
14165 * be less than 128 characters long.
14166 */
14167 core.String clickThroughUrlSuffix;
14168 /**
14169 * Whether this entity should override the inherited click-through URL suffix
14170 * with its own defined value.
14171 */
14172 core.bool overrideInheritedSuffix;
14173
14174 ClickThroughUrlSuffixProperties();
14175
14176 ClickThroughUrlSuffixProperties.fromJson(core.Map _json) {
14177 if (_json.containsKey("clickThroughUrlSuffix")) {
14178 clickThroughUrlSuffix = _json["clickThroughUrlSuffix"];
14179 }
14180 if (_json.containsKey("overrideInheritedSuffix")) {
14181 overrideInheritedSuffix = _json["overrideInheritedSuffix"];
14182 }
14183 }
14184
14185 core.Map toJson() {
14186 var _json = new core.Map();
14187 if (clickThroughUrlSuffix != null) {
14188 _json["clickThroughUrlSuffix"] = clickThroughUrlSuffix;
14189 }
14190 if (overrideInheritedSuffix != null) {
14191 _json["overrideInheritedSuffix"] = overrideInheritedSuffix;
14192 }
14193 return _json;
14194 }
14195 }
14196
14197 /** Companion Click-through override. */
14198 class CompanionClickThroughOverride {
14199 /** Click-through URL of this companion click-through override. */
14200 ClickThroughUrl clickThroughUrl;
14201 /** ID of the creative for this companion click-through override. */
14202 core.String creativeId;
14203
14204 CompanionClickThroughOverride();
14205
14206 CompanionClickThroughOverride.fromJson(core.Map _json) {
14207 if (_json.containsKey("clickThroughUrl")) {
14208 clickThroughUrl = new ClickThroughUrl.fromJson(_json["clickThroughUrl"]);
14209 }
14210 if (_json.containsKey("creativeId")) {
14211 creativeId = _json["creativeId"];
14212 }
14213 }
14214
14215 core.Map toJson() {
14216 var _json = new core.Map();
14217 if (clickThroughUrl != null) {
14218 _json["clickThroughUrl"] = (clickThroughUrl).toJson();
14219 }
14220 if (creativeId != null) {
14221 _json["creativeId"] = creativeId;
14222 }
14223 return _json;
14224 }
14225 }
14226
14227 /** Represents a response to the queryCompatibleFields method. */
14228 class CompatibleFields {
14229 /**
14230 * Contains items that are compatible to be selected for a report of type
14231 * "CROSS_DIMENSION_REACH".
14232 */
14233 CrossDimensionReachReportCompatibleFields crossDimensionReachReportCompatibleF ields;
14234 /**
14235 * Contains items that are compatible to be selected for a report of type
14236 * "FLOODLIGHT".
14237 */
14238 FloodlightReportCompatibleFields floodlightReportCompatibleFields;
14239 /**
14240 * The kind of resource this is, in this case dfareporting#compatibleFields.
14241 */
14242 core.String kind;
14243 /**
14244 * Contains items that are compatible to be selected for a report of type
14245 * "PATH_TO_CONVERSION".
14246 */
14247 PathToConversionReportCompatibleFields pathToConversionReportCompatibleFields;
14248 /**
14249 * Contains items that are compatible to be selected for a report of type
14250 * "REACH".
14251 */
14252 ReachReportCompatibleFields reachReportCompatibleFields;
14253 /**
14254 * Contains items that are compatible to be selected for a report of type
14255 * "STANDARD".
14256 */
14257 ReportCompatibleFields reportCompatibleFields;
14258
14259 CompatibleFields();
14260
14261 CompatibleFields.fromJson(core.Map _json) {
14262 if (_json.containsKey("crossDimensionReachReportCompatibleFields")) {
14263 crossDimensionReachReportCompatibleFields = new CrossDimensionReachReportC ompatibleFields.fromJson(_json["crossDimensionReachReportCompatibleFields"]);
14264 }
14265 if (_json.containsKey("floodlightReportCompatibleFields")) {
14266 floodlightReportCompatibleFields = new FloodlightReportCompatibleFields.fr omJson(_json["floodlightReportCompatibleFields"]);
14267 }
14268 if (_json.containsKey("kind")) {
14269 kind = _json["kind"];
14270 }
14271 if (_json.containsKey("pathToConversionReportCompatibleFields")) {
14272 pathToConversionReportCompatibleFields = new PathToConversionReportCompati bleFields.fromJson(_json["pathToConversionReportCompatibleFields"]);
14273 }
14274 if (_json.containsKey("reachReportCompatibleFields")) {
14275 reachReportCompatibleFields = new ReachReportCompatibleFields.fromJson(_js on["reachReportCompatibleFields"]);
14276 }
14277 if (_json.containsKey("reportCompatibleFields")) {
14278 reportCompatibleFields = new ReportCompatibleFields.fromJson(_json["report CompatibleFields"]);
14279 }
14280 }
14281
14282 core.Map toJson() {
14283 var _json = new core.Map();
14284 if (crossDimensionReachReportCompatibleFields != null) {
14285 _json["crossDimensionReachReportCompatibleFields"] = (crossDimensionReachR eportCompatibleFields).toJson();
14286 }
14287 if (floodlightReportCompatibleFields != null) {
14288 _json["floodlightReportCompatibleFields"] = (floodlightReportCompatibleFie lds).toJson();
14289 }
14290 if (kind != null) {
14291 _json["kind"] = kind;
14292 }
14293 if (pathToConversionReportCompatibleFields != null) {
14294 _json["pathToConversionReportCompatibleFields"] = (pathToConversionReportC ompatibleFields).toJson();
14295 }
14296 if (reachReportCompatibleFields != null) {
14297 _json["reachReportCompatibleFields"] = (reachReportCompatibleFields).toJso n();
14298 }
14299 if (reportCompatibleFields != null) {
14300 _json["reportCompatibleFields"] = (reportCompatibleFields).toJson();
14301 }
14302 return _json;
14303 }
14304 }
14305
14306 /**
14307 * Contains information about an internet connection type that can be targeted
14308 * by ads. Clients can use the connection type to target mobile vs. broadband
14309 * users.
14310 */
14311 class ConnectionType {
14312 /** ID of this connection type. */
14313 core.String id;
14314 /**
14315 * Identifies what kind of resource this is. Value: the fixed string
14316 * "dfareporting#connectionType".
14317 */
14318 core.String kind;
14319 /** Name of this connection type. */
14320 core.String name;
14321
14322 ConnectionType();
14323
14324 ConnectionType.fromJson(core.Map _json) {
14325 if (_json.containsKey("id")) {
14326 id = _json["id"];
14327 }
14328 if (_json.containsKey("kind")) {
14329 kind = _json["kind"];
14330 }
14331 if (_json.containsKey("name")) {
14332 name = _json["name"];
14333 }
14334 }
14335
14336 core.Map toJson() {
14337 var _json = new core.Map();
14338 if (id != null) {
14339 _json["id"] = id;
14340 }
14341 if (kind != null) {
14342 _json["kind"] = kind;
14343 }
14344 if (name != null) {
14345 _json["name"] = name;
14346 }
14347 return _json;
14348 }
14349 }
14350
14351 /** Connection Type List Response */
14352 class ConnectionTypesListResponse {
14353 /** Collection of connection types such as broadband and mobile. */
14354 core.List<ConnectionType> connectionTypes;
14355 /**
14356 * Identifies what kind of resource this is. Value: the fixed string
14357 * "dfareporting#connectionTypesListResponse".
14358 */
14359 core.String kind;
14360
14361 ConnectionTypesListResponse();
14362
14363 ConnectionTypesListResponse.fromJson(core.Map _json) {
14364 if (_json.containsKey("connectionTypes")) {
14365 connectionTypes = _json["connectionTypes"].map((value) => new ConnectionTy pe.fromJson(value)).toList();
14366 }
14367 if (_json.containsKey("kind")) {
14368 kind = _json["kind"];
14369 }
14370 }
14371
14372 core.Map toJson() {
14373 var _json = new core.Map();
14374 if (connectionTypes != null) {
14375 _json["connectionTypes"] = connectionTypes.map((value) => (value).toJson() ).toList();
14376 }
14377 if (kind != null) {
14378 _json["kind"] = kind;
14379 }
14380 return _json;
14381 }
14382 }
14383
14384 /** Content Category List Response */
14385 class ContentCategoriesListResponse {
14386 /** Content category collection. */
14387 core.List<ContentCategory> contentCategories;
14388 /**
14389 * Identifies what kind of resource this is. Value: the fixed string
14390 * "dfareporting#contentCategoriesListResponse".
14391 */
14392 core.String kind;
14393 /** Pagination token to be used for the next list operation. */
14394 core.String nextPageToken;
14395
14396 ContentCategoriesListResponse();
14397
14398 ContentCategoriesListResponse.fromJson(core.Map _json) {
14399 if (_json.containsKey("contentCategories")) {
14400 contentCategories = _json["contentCategories"].map((value) => new ContentC ategory.fromJson(value)).toList();
14401 }
14402 if (_json.containsKey("kind")) {
14403 kind = _json["kind"];
14404 }
14405 if (_json.containsKey("nextPageToken")) {
14406 nextPageToken = _json["nextPageToken"];
14407 }
14408 }
14409
14410 core.Map toJson() {
14411 var _json = new core.Map();
14412 if (contentCategories != null) {
14413 _json["contentCategories"] = contentCategories.map((value) => (value).toJs on()).toList();
14414 }
14415 if (kind != null) {
14416 _json["kind"] = kind;
14417 }
14418 if (nextPageToken != null) {
14419 _json["nextPageToken"] = nextPageToken;
14420 }
14421 return _json;
14422 }
14423 }
14424
14425 /**
14426 * Organizes placements according to the contents of their associated webpages.
14427 */
14428 class ContentCategory {
14429 /**
14430 * Account ID of this content category. This is a read-only field that can be
14431 * left blank.
14432 */
14433 core.String accountId;
14434 /**
14435 * ID of this content category. This is a read-only, auto-generated field.
14436 */
14437 core.String id;
14438 /**
14439 * Identifies what kind of resource this is. Value: the fixed string
14440 * "dfareporting#contentCategory".
14441 */
14442 core.String kind;
14443 /**
14444 * Name of this content category. This is a required field and must be less
14445 * than 256 characters long and unique among content categories of the same
14446 * account.
14447 */
14448 core.String name;
14449
14450 ContentCategory();
14451
14452 ContentCategory.fromJson(core.Map _json) {
14453 if (_json.containsKey("accountId")) {
14454 accountId = _json["accountId"];
14455 }
14456 if (_json.containsKey("id")) {
14457 id = _json["id"];
14458 }
14459 if (_json.containsKey("kind")) {
14460 kind = _json["kind"];
14461 }
14462 if (_json.containsKey("name")) {
14463 name = _json["name"];
14464 }
14465 }
14466
14467 core.Map toJson() {
14468 var _json = new core.Map();
14469 if (accountId != null) {
14470 _json["accountId"] = accountId;
14471 }
14472 if (id != null) {
14473 _json["id"] = id;
14474 }
14475 if (kind != null) {
14476 _json["kind"] = kind;
14477 }
14478 if (name != null) {
14479 _json["name"] = name;
14480 }
14481 return _json;
14482 }
14483 }
14484
14485 /** Country List Response */
14486 class CountriesListResponse {
14487 /** Country collection. */
14488 core.List<Country> countries;
14489 /**
14490 * Identifies what kind of resource this is. Value: the fixed string
14491 * "dfareporting#countriesListResponse".
14492 */
14493 core.String kind;
14494
14495 CountriesListResponse();
14496
14497 CountriesListResponse.fromJson(core.Map _json) {
14498 if (_json.containsKey("countries")) {
14499 countries = _json["countries"].map((value) => new Country.fromJson(value)) .toList();
14500 }
14501 if (_json.containsKey("kind")) {
14502 kind = _json["kind"];
14503 }
14504 }
14505
14506 core.Map toJson() {
14507 var _json = new core.Map();
14508 if (countries != null) {
14509 _json["countries"] = countries.map((value) => (value).toJson()).toList();
14510 }
14511 if (kind != null) {
14512 _json["kind"] = kind;
14513 }
14514 return _json;
14515 }
14516 }
14517
14518 /** Contains information about a country that can be targeted by ads. */
14519 class Country {
14520 /** Country code. */
14521 core.String countryCode;
14522 /**
14523 * DART ID of this country. This is the ID used for targeting and generating
14524 * reports.
14525 */
14526 core.String dartId;
14527 /**
14528 * Identifies what kind of resource this is. Value: the fixed string
14529 * "dfareporting#country".
14530 */
14531 core.String kind;
14532 /** Name of this country. */
14533 core.String name;
14534 /** Whether ad serving supports secure servers in this country. */
14535 core.bool sslEnabled;
14536
14537 Country();
14538
14539 Country.fromJson(core.Map _json) {
14540 if (_json.containsKey("countryCode")) {
14541 countryCode = _json["countryCode"];
14542 }
14543 if (_json.containsKey("dartId")) {
14544 dartId = _json["dartId"];
14545 }
14546 if (_json.containsKey("kind")) {
14547 kind = _json["kind"];
14548 }
14549 if (_json.containsKey("name")) {
14550 name = _json["name"];
14551 }
14552 if (_json.containsKey("sslEnabled")) {
14553 sslEnabled = _json["sslEnabled"];
14554 }
14555 }
14556
14557 core.Map toJson() {
14558 var _json = new core.Map();
14559 if (countryCode != null) {
14560 _json["countryCode"] = countryCode;
14561 }
14562 if (dartId != null) {
14563 _json["dartId"] = dartId;
14564 }
14565 if (kind != null) {
14566 _json["kind"] = kind;
14567 }
14568 if (name != null) {
14569 _json["name"] = name;
14570 }
14571 if (sslEnabled != null) {
14572 _json["sslEnabled"] = sslEnabled;
14573 }
14574 return _json;
14575 }
14576 }
14577
14578 /** Contains properties of a Creative. */
14579 class Creative {
14580 /**
14581 * Account ID of this creative. This field, if left unset, will be
14582 * auto-generated for both insert and update operations. Applicable to all
14583 * creative types.
14584 */
14585 core.String accountId;
14586 /** Whether the creative is active. Applicable to all creative types. */
14587 core.bool active;
14588 /**
14589 * Ad parameters user for VPAID creative. This is a read-only field.
14590 * Applicable to the following creative types: all VPAID.
14591 */
14592 core.String adParameters;
14593 /**
14594 * Keywords for a Rich Media creative. Keywords let you customize the creative
14595 * settings of a Rich Media ad running on your site without having to contact
14596 * the advertiser. You can use keywords to dynamically change the look or
14597 * functionality of a creative. Applicable to the following creative types:
14598 * all RICH_MEDIA, and all VPAID.
14599 */
14600 core.List<core.String> adTagKeys;
14601 /**
14602 * Advertiser ID of this creative. This is a required field. Applicable to all
14603 * creative types.
14604 */
14605 core.String advertiserId;
14606 /**
14607 * Whether script access is allowed for this creative. This is a read-only and
14608 * deprecated field which will automatically be set to true on update.
14609 * Applicable to the following creative types: FLASH_INPAGE.
14610 */
14611 core.bool allowScriptAccess;
14612 /** Whether the creative is archived. Applicable to all creative types. */
14613 core.bool archived;
14614 /**
14615 * Type of artwork used for the creative. This is a read-only field.
14616 * Applicable to the following creative types: all RICH_MEDIA, and all VPAID.
14617 * Possible string values are:
14618 * - "ARTWORK_TYPE_FLASH"
14619 * - "ARTWORK_TYPE_HTML5"
14620 * - "ARTWORK_TYPE_IMAGE"
14621 * - "ARTWORK_TYPE_MIXED"
14622 */
14623 core.String artworkType;
14624 /**
14625 * Source application where creative was authored. Presently, only DBM
14626 * authored creatives will have this field set. Applicable to all creative
14627 * types.
14628 * Possible string values are:
14629 * - "CREATIVE_AUTHORING_SOURCE_DBM"
14630 * - "CREATIVE_AUTHORING_SOURCE_DCM"
14631 * - "CREATIVE_AUTHORING_SOURCE_STUDIO"
14632 */
14633 core.String authoringSource;
14634 /**
14635 * Authoring tool for HTML5 banner creatives. This is a read-only field.
14636 * Applicable to the following creative types: HTML5_BANNER.
14637 * Possible string values are:
14638 * - "NINJA"
14639 * - "SWIFFY"
14640 */
14641 core.String authoringTool;
14642 /**
14643 * Whether images are automatically advanced for enhanced image creatives.
14644 * Applicable to the following creative types: ENHANCED_IMAGE.
14645 */
14646 core.bool autoAdvanceImages;
14647 /**
14648 * The 6-character HTML color code, beginning with #, for the background of
14649 * the window area where the Flash file is displayed. Default is white.
14650 * Applicable to the following creative types: FLASH_INPAGE.
14651 */
14652 core.String backgroundColor;
14653 /**
14654 * Click-through URL for backup image. Applicable to the following creative
14655 * types: FLASH_INPAGE, and HTML5_BANNER. Applicable to ENHANCED_BANNER when
14656 * the primary asset type is not HTML_IMAGE.
14657 */
14658 core.String backupImageClickThroughUrl;
14659 /**
14660 * List of feature dependencies that will cause a backup image to be served if
14661 * the browser that serves the ad does not support them. Feature dependencies
14662 * are features that a browser must be able to support in order to render your
14663 * HTML5 creative asset correctly. This field is initially auto-generated to
14664 * contain all features detected by DCM for all the assets of this creative
14665 * and can then be modified by the client. To reset this field, copy over all
14666 * the creativeAssets' detected features. Applicable to the following creative
14667 * types: HTML5_BANNER. Applicable to ENHANCED_BANNER when the primary asset
14668 * is not HTML_IMAGE.
14669 */
14670 core.List<core.String> backupImageFeatures;
14671 /**
14672 * Reporting label used for HTML5 banner backup image. Applicable to
14673 * ENHANCED_BANNER when the primary asset type is not HTML_IMAGE.
14674 */
14675 core.String backupImageReportingLabel;
14676 /**
14677 * Target window for backup image. Applicable to the following creative types:
14678 * FLASH_INPAGE, and HTML5_BANNER. Applicable to ENHANCED_BANNER when the
14679 * primary asset type is not HTML_IMAGE.
14680 */
14681 TargetWindow backupImageTargetWindow;
14682 /**
14683 * Click tags of the creative. For ENHANCED_BANNER, FLASH_INPAGE, and
14684 * HTML5_BANNER creatives, this is a subset of detected click tags for the
14685 * assets associated with this creative. After creating a flash asset,
14686 * detected click tags will be returned in the creativeAssetMetadata. When
14687 * inserting the creative, populate the creative clickTags field using the
14688 * creativeAssetMetadata.clickTags field. For ENHANCED_IMAGE creatives, there
14689 * should be exactly one entry in this list for each image creative asset. A
14690 * click tag is matched with a corresponding creative asset by matching the
14691 * clickTag.name field with the creativeAsset.assetIdentifier.name field.
14692 * Applicable to the following creative types: ENHANCED_IMAGE, FLASH_INPAGE
14693 * HTML5_BANNER. Applicable to ENHANCED_BANNER when the primary asset type is
14694 * not HTML_IMAGE.
14695 */
14696 core.List<ClickTag> clickTags;
14697 /**
14698 * Industry standard ID assigned to creative for reach and frequency.
14699 * Applicable to the following creative types: all INSTREAM_VIDEO and all
14700 * VPAID.
14701 */
14702 core.String commercialId;
14703 /**
14704 * List of companion creatives assigned to an in-Stream videocreative.
14705 * Acceptable values include IDs of existing flash and image creatives.
14706 * Applicable to the following creative types: all INSTREAM_VIDEO and all
14707 * VPAID.
14708 */
14709 core.List<core.String> companionCreatives;
14710 /**
14711 * Compatibilities associated with this creative. This is a read-only field.
14712 * DISPLAY and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on
14713 * mobile devices or in mobile apps for regular or interstitial ads,
14714 * respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.
14715 * Only pre-existing creatives may have these compatibilities since new
14716 * creatives will either be assigned DISPLAY or DISPLAY_INTERSTITIAL instead.
14717 * IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with
14718 * the VAST standard. Applicable to all creative types.
14719 *
14720 * Acceptable values are:
14721 * - "APP"
14722 * - "APP_INTERSTITIAL"
14723 * - "IN_STREAM_VIDEO"
14724 * - "DISPLAY"
14725 * - "DISPLAY_INTERSTITIAL"
14726 */
14727 core.List<core.String> compatibility;
14728 /**
14729 * Whether Flash assets associated with the creative need to be automatically
14730 * converted to HTML5. This flag is enabled by default and users can choose to
14731 * disable it if they don't want the system to generate and use HTML5 asset
14732 * for this creative. Applicable to the following creative type: FLASH_INPAGE.
14733 * Applicable to ENHANCED_BANNER when the primary asset type is not
14734 * HTML_IMAGE.
14735 */
14736 core.bool convertFlashToHtml5;
14737 /**
14738 * List of counter events configured for the creative. For ENHANCED_IMAGE
14739 * creatives, these are read-only and auto-generated from clickTags.
14740 * Applicable to the following creative types: ENHANCED_IMAGE, all RICH_MEDIA,
14741 * and all VPAID.
14742 */
14743 core.List<CreativeCustomEvent> counterCustomEvents;
14744 /**
14745 * Assets associated with a creative. Applicable to all but the following
14746 * creative types: INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, and
14747 * REDIRECT
14748 */
14749 core.List<CreativeAsset> creativeAssets;
14750 /**
14751 * Creative field assignments for this creative. Applicable to all creative
14752 * types.
14753 */
14754 core.List<CreativeFieldAssignment> creativeFieldAssignments;
14755 /**
14756 * Custom key-values for a Rich Media creative. Key-values let you customize
14757 * the creative settings of a Rich Media ad running on your site without
14758 * having to contact the advertiser. You can use key-values to dynamically
14759 * change the look or functionality of a creative. Applicable to the following
14760 * creative types: all RICH_MEDIA, and all VPAID.
14761 */
14762 core.List<core.String> customKeyValues;
14763 /**
14764 * List of exit events configured for the creative. For ENHANCED_BANNER and
14765 * ENHANCED_IMAGE creatives, these are read-only and auto-generated from
14766 * clickTags, For ENHANCED_BANNER, an event is also created from the
14767 * backupImageReportingLabel. Applicable to the following creative types:
14768 * ENHANCED_IMAGE, all RICH_MEDIA, and all VPAID. Applicable to
14769 * ENHANCED_BANNER when the primary asset is not HTML_IMAGE.
14770 */
14771 core.List<CreativeCustomEvent> exitCustomEvents;
14772 /**
14773 * OpenWindow FSCommand of this creative. This lets the SWF file communicate
14774 * with either Flash Player or the program hosting Flash Player, such as a web
14775 * browser. This is only triggered if allowScriptAccess field is true.
14776 * Applicable to the following creative types: FLASH_INPAGE.
14777 */
14778 FsCommand fsCommand;
14779 /**
14780 * HTML code for the creative. This is a required field when applicable. This
14781 * field is ignored if htmlCodeLocked is false. Applicable to the following
14782 * creative types: all CUSTOM, FLASH_INPAGE, and HTML5_BANNER, and all
14783 * RICH_MEDIA.
14784 */
14785 core.String htmlCode;
14786 /**
14787 * Whether HTML code is DCM-generated or manually entered. Set to true to
14788 * ignore changes to htmlCode. Applicable to the following creative types:
14789 * FLASH_INPAGE and HTML5_BANNER.
14790 */
14791 core.bool htmlCodeLocked;
14792 /**
14793 * ID of this creative. This is a read-only, auto-generated field. Applicable
14794 * to all creative types.
14795 */
14796 core.String id;
14797 /**
14798 * Dimension value for the ID of this creative. This is a read-only field.
14799 * Applicable to all creative types.
14800 */
14801 DimensionValue idDimensionValue;
14802 /**
14803 * Identifies what kind of resource this is. Value: the fixed string
14804 * "dfareporting#creative".
14805 */
14806 core.String kind;
14807 /**
14808 * Creative last modification information. This is a read-only field.
14809 * Applicable to all creative types.
14810 */
14811 LastModifiedInfo lastModifiedInfo;
14812 /**
14813 * Latest Studio trafficked creative ID associated with rich media and VPAID
14814 * creatives. This is a read-only field. Applicable to the following creative
14815 * types: all RICH_MEDIA, and all VPAID.
14816 */
14817 core.String latestTraffickedCreativeId;
14818 /**
14819 * Name of the creative. This is a required field and must be less than 256
14820 * characters long. Applicable to all creative types.
14821 */
14822 core.String name;
14823 /**
14824 * Override CSS value for rich media creatives. Applicable to the following
14825 * creative types: all RICH_MEDIA.
14826 */
14827 core.String overrideCss;
14828 /**
14829 * URL of hosted image or hosted video or another ad tag. For
14830 * INSTREAM_VIDEO_REDIRECT creatives this is the in-stream video redirect URL.
14831 * The standard for a VAST (Video Ad Serving Template) ad response allows for
14832 * a redirect link to another VAST 2.0 or 3.0 call. This is a required field
14833 * when applicable. Applicable to the following creative types:
14834 * INTERNAL_REDIRECT, INTERSTITIAL_INTERNAL_REDIRECT, REDIRECT, and
14835 * INSTREAM_VIDEO_REDIRECT
14836 */
14837 core.String redirectUrl;
14838 /**
14839 * ID of current rendering version. This is a read-only field. Applicable to
14840 * all creative types.
14841 */
14842 core.String renderingId;
14843 /**
14844 * Dimension value for the rendering ID of this creative. This is a read-only
14845 * field. Applicable to all creative types.
14846 */
14847 DimensionValue renderingIdDimensionValue;
14848 /**
14849 * The minimum required Flash plugin version for this creative. For example,
14850 * 11.2.202.235. This is a read-only field. Applicable to the following
14851 * creative types: all RICH_MEDIA, and all VPAID.
14852 */
14853 core.String requiredFlashPluginVersion;
14854 /**
14855 * The internal Flash version for this creative as calculated by DoubleClick
14856 * Studio. This is a read-only field. Applicable to the following creative
14857 * types: FLASH_INPAGE, all RICH_MEDIA, and all VPAID. Applicable to
14858 * ENHANCED_BANNER when the primary asset type is not HTML_IMAGE.
14859 */
14860 core.int requiredFlashVersion;
14861 /**
14862 * Size associated with this creative. When inserting or updating a creative
14863 * either the size ID field or size width and height fields can be used. This
14864 * is a required field when applicable; however for IMAGE and FLASH_INPAGE
14865 * creatives, and for ENHANCED_BANNER creatives with a primary asset of type
14866 * HTML_IMAGE, if left blank, this field will be automatically set using the
14867 * actual size of the associated image assets. Applicable to the following
14868 * creative types: ENHANCED_BANNER, ENHANCED_IMAGE, FLASH_INPAGE,
14869 * HTML5_BANNER, IMAGE, and all RICH_MEDIA.
14870 */
14871 Size size;
14872 /**
14873 * Whether the user can choose to skip the creative. Applicable to the
14874 * following creative types: all INSTREAM_VIDEO and all VPAID.
14875 */
14876 core.bool skippable;
14877 /**
14878 * Whether the creative is SSL-compliant. This is a read-only field.
14879 * Applicable to all creative types.
14880 */
14881 core.bool sslCompliant;
14882 /**
14883 * Whether creative should be treated as SSL compliant even if the system scan
14884 * shows it's not. Applicable to all creative types.
14885 */
14886 core.bool sslOverride;
14887 /**
14888 * Studio advertiser ID associated with rich media and VPAID creatives. This
14889 * is a read-only field. Applicable to the following creative types: all
14890 * RICH_MEDIA, and all VPAID.
14891 */
14892 core.String studioAdvertiserId;
14893 /**
14894 * Studio creative ID associated with rich media and VPAID creatives. This is
14895 * a read-only field. Applicable to the following creative types: all
14896 * RICH_MEDIA, and all VPAID.
14897 */
14898 core.String studioCreativeId;
14899 /**
14900 * Studio trafficked creative ID associated with rich media and VPAID
14901 * creatives. This is a read-only field. Applicable to the following creative
14902 * types: all RICH_MEDIA, and all VPAID.
14903 */
14904 core.String studioTraffickedCreativeId;
14905 /**
14906 * Subaccount ID of this creative. This field, if left unset, will be
14907 * auto-generated for both insert and update operations. Applicable to all
14908 * creative types.
14909 */
14910 core.String subaccountId;
14911 /**
14912 * Third-party URL used to record backup image impressions. Applicable to the
14913 * following creative types: all RICH_MEDIA.
14914 */
14915 core.String thirdPartyBackupImageImpressionsUrl;
14916 /**
14917 * Third-party URL used to record rich media impressions. Applicable to the
14918 * following creative types: all RICH_MEDIA.
14919 */
14920 core.String thirdPartyRichMediaImpressionsUrl;
14921 /**
14922 * Third-party URLs for tracking in-stream video creative events. Applicable
14923 * to the following creative types: all INSTREAM_VIDEO and all VPAID.
14924 */
14925 core.List<ThirdPartyTrackingUrl> thirdPartyUrls;
14926 /**
14927 * List of timer events configured for the creative. For ENHANCED_IMAGE
14928 * creatives, these are read-only and auto-generated from clickTags.
14929 * Applicable to the following creative types: ENHANCED_IMAGE, all RICH_MEDIA,
14930 * and all VPAID. Applicable to ENHANCED_BANNER when the primary asset is not
14931 * HTML_IMAGE.
14932 */
14933 core.List<CreativeCustomEvent> timerCustomEvents;
14934 /**
14935 * Combined size of all creative assets. This is a read-only field. Applicable
14936 * to the following creative types: all RICH_MEDIA, and all VPAID.
14937 */
14938 core.String totalFileSize;
14939 /**
14940 * Type of this creative.This is a required field. Applicable to all creative
14941 * types.
14942 * Possible string values are:
14943 * - "BRAND_SAFE_DEFAULT_INSTREAM_VIDEO"
14944 * - "CUSTOM_INPAGE"
14945 * - "CUSTOM_INTERSTITIAL"
14946 * - "ENHANCED_BANNER"
14947 * - "ENHANCED_IMAGE"
14948 * - "FLASH_INPAGE"
14949 * - "HTML5_BANNER"
14950 * - "IMAGE"
14951 * - "INSTREAM_VIDEO"
14952 * - "INSTREAM_VIDEO_REDIRECT"
14953 * - "INTERNAL_REDIRECT"
14954 * - "INTERSTITIAL_INTERNAL_REDIRECT"
14955 * - "REDIRECT"
14956 * - "RICH_MEDIA_EXPANDING"
14957 * - "RICH_MEDIA_IM_EXPAND"
14958 * - "RICH_MEDIA_INPAGE"
14959 * - "RICH_MEDIA_INPAGE_FLOATING"
14960 * - "RICH_MEDIA_INTERSTITIAL_FLOAT"
14961 * - "RICH_MEDIA_MOBILE_IN_APP"
14962 * - "RICH_MEDIA_MULTI_FLOATING"
14963 * - "RICH_MEDIA_PEEL_DOWN"
14964 * - "TRACKING_TEXT"
14965 * - "VPAID_LINEAR"
14966 * - "VPAID_NON_LINEAR"
14967 */
14968 core.String type;
14969 /**
14970 * The version number helps you keep track of multiple versions of your
14971 * creative in your reports. The version number will always be auto-generated
14972 * during insert operations to start at 1. For tracking creatives the version
14973 * cannot be incremented and will always remain at 1. For all other creative
14974 * types the version can be incremented only by 1 during update operations. In
14975 * addition, the version will be automatically incremented by 1 when
14976 * undergoing Rich Media creative merging. Applicable to all creative types.
14977 */
14978 core.int version;
14979 /**
14980 * Description of the video ad. Applicable to the following creative types:
14981 * all INSTREAM_VIDEO and all VPAID.
14982 */
14983 core.String videoDescription;
14984 /**
14985 * Creative video duration in seconds. This is a read-only field. Applicable
14986 * to the following creative types: INSTREAM_VIDEO, all RICH_MEDIA, and all
14987 * VPAID.
14988 */
14989 core.double videoDuration;
14990
14991 Creative();
14992
14993 Creative.fromJson(core.Map _json) {
14994 if (_json.containsKey("accountId")) {
14995 accountId = _json["accountId"];
14996 }
14997 if (_json.containsKey("active")) {
14998 active = _json["active"];
14999 }
15000 if (_json.containsKey("adParameters")) {
15001 adParameters = _json["adParameters"];
15002 }
15003 if (_json.containsKey("adTagKeys")) {
15004 adTagKeys = _json["adTagKeys"];
15005 }
15006 if (_json.containsKey("advertiserId")) {
15007 advertiserId = _json["advertiserId"];
15008 }
15009 if (_json.containsKey("allowScriptAccess")) {
15010 allowScriptAccess = _json["allowScriptAccess"];
15011 }
15012 if (_json.containsKey("archived")) {
15013 archived = _json["archived"];
15014 }
15015 if (_json.containsKey("artworkType")) {
15016 artworkType = _json["artworkType"];
15017 }
15018 if (_json.containsKey("authoringSource")) {
15019 authoringSource = _json["authoringSource"];
15020 }
15021 if (_json.containsKey("authoringTool")) {
15022 authoringTool = _json["authoringTool"];
15023 }
15024 if (_json.containsKey("auto_advance_images")) {
15025 autoAdvanceImages = _json["auto_advance_images"];
15026 }
15027 if (_json.containsKey("backgroundColor")) {
15028 backgroundColor = _json["backgroundColor"];
15029 }
15030 if (_json.containsKey("backupImageClickThroughUrl")) {
15031 backupImageClickThroughUrl = _json["backupImageClickThroughUrl"];
15032 }
15033 if (_json.containsKey("backupImageFeatures")) {
15034 backupImageFeatures = _json["backupImageFeatures"];
15035 }
15036 if (_json.containsKey("backupImageReportingLabel")) {
15037 backupImageReportingLabel = _json["backupImageReportingLabel"];
15038 }
15039 if (_json.containsKey("backupImageTargetWindow")) {
15040 backupImageTargetWindow = new TargetWindow.fromJson(_json["backupImageTarg etWindow"]);
15041 }
15042 if (_json.containsKey("clickTags")) {
15043 clickTags = _json["clickTags"].map((value) => new ClickTag.fromJson(value) ).toList();
15044 }
15045 if (_json.containsKey("commercialId")) {
15046 commercialId = _json["commercialId"];
15047 }
15048 if (_json.containsKey("companionCreatives")) {
15049 companionCreatives = _json["companionCreatives"];
15050 }
15051 if (_json.containsKey("compatibility")) {
15052 compatibility = _json["compatibility"];
15053 }
15054 if (_json.containsKey("convertFlashToHtml5")) {
15055 convertFlashToHtml5 = _json["convertFlashToHtml5"];
15056 }
15057 if (_json.containsKey("counterCustomEvents")) {
15058 counterCustomEvents = _json["counterCustomEvents"].map((value) => new Crea tiveCustomEvent.fromJson(value)).toList();
15059 }
15060 if (_json.containsKey("creativeAssets")) {
15061 creativeAssets = _json["creativeAssets"].map((value) => new CreativeAsset. fromJson(value)).toList();
15062 }
15063 if (_json.containsKey("creativeFieldAssignments")) {
15064 creativeFieldAssignments = _json["creativeFieldAssignments"].map((value) = > new CreativeFieldAssignment.fromJson(value)).toList();
15065 }
15066 if (_json.containsKey("customKeyValues")) {
15067 customKeyValues = _json["customKeyValues"];
15068 }
15069 if (_json.containsKey("exitCustomEvents")) {
15070 exitCustomEvents = _json["exitCustomEvents"].map((value) => new CreativeCu stomEvent.fromJson(value)).toList();
15071 }
15072 if (_json.containsKey("fsCommand")) {
15073 fsCommand = new FsCommand.fromJson(_json["fsCommand"]);
15074 }
15075 if (_json.containsKey("htmlCode")) {
15076 htmlCode = _json["htmlCode"];
15077 }
15078 if (_json.containsKey("htmlCodeLocked")) {
15079 htmlCodeLocked = _json["htmlCodeLocked"];
15080 }
15081 if (_json.containsKey("id")) {
15082 id = _json["id"];
15083 }
15084 if (_json.containsKey("idDimensionValue")) {
15085 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
15086 }
15087 if (_json.containsKey("kind")) {
15088 kind = _json["kind"];
15089 }
15090 if (_json.containsKey("lastModifiedInfo")) {
15091 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"] );
15092 }
15093 if (_json.containsKey("latestTraffickedCreativeId")) {
15094 latestTraffickedCreativeId = _json["latestTraffickedCreativeId"];
15095 }
15096 if (_json.containsKey("name")) {
15097 name = _json["name"];
15098 }
15099 if (_json.containsKey("overrideCss")) {
15100 overrideCss = _json["overrideCss"];
15101 }
15102 if (_json.containsKey("redirectUrl")) {
15103 redirectUrl = _json["redirectUrl"];
15104 }
15105 if (_json.containsKey("renderingId")) {
15106 renderingId = _json["renderingId"];
15107 }
15108 if (_json.containsKey("renderingIdDimensionValue")) {
15109 renderingIdDimensionValue = new DimensionValue.fromJson(_json["renderingId DimensionValue"]);
15110 }
15111 if (_json.containsKey("requiredFlashPluginVersion")) {
15112 requiredFlashPluginVersion = _json["requiredFlashPluginVersion"];
15113 }
15114 if (_json.containsKey("requiredFlashVersion")) {
15115 requiredFlashVersion = _json["requiredFlashVersion"];
15116 }
15117 if (_json.containsKey("size")) {
15118 size = new Size.fromJson(_json["size"]);
15119 }
15120 if (_json.containsKey("skippable")) {
15121 skippable = _json["skippable"];
15122 }
15123 if (_json.containsKey("sslCompliant")) {
15124 sslCompliant = _json["sslCompliant"];
15125 }
15126 if (_json.containsKey("sslOverride")) {
15127 sslOverride = _json["sslOverride"];
15128 }
15129 if (_json.containsKey("studioAdvertiserId")) {
15130 studioAdvertiserId = _json["studioAdvertiserId"];
15131 }
15132 if (_json.containsKey("studioCreativeId")) {
15133 studioCreativeId = _json["studioCreativeId"];
15134 }
15135 if (_json.containsKey("studioTraffickedCreativeId")) {
15136 studioTraffickedCreativeId = _json["studioTraffickedCreativeId"];
15137 }
15138 if (_json.containsKey("subaccountId")) {
15139 subaccountId = _json["subaccountId"];
15140 }
15141 if (_json.containsKey("thirdPartyBackupImageImpressionsUrl")) {
15142 thirdPartyBackupImageImpressionsUrl = _json["thirdPartyBackupImageImpressi onsUrl"];
15143 }
15144 if (_json.containsKey("thirdPartyRichMediaImpressionsUrl")) {
15145 thirdPartyRichMediaImpressionsUrl = _json["thirdPartyRichMediaImpressionsU rl"];
15146 }
15147 if (_json.containsKey("thirdPartyUrls")) {
15148 thirdPartyUrls = _json["thirdPartyUrls"].map((value) => new ThirdPartyTrac kingUrl.fromJson(value)).toList();
15149 }
15150 if (_json.containsKey("timerCustomEvents")) {
15151 timerCustomEvents = _json["timerCustomEvents"].map((value) => new Creative CustomEvent.fromJson(value)).toList();
15152 }
15153 if (_json.containsKey("totalFileSize")) {
15154 totalFileSize = _json["totalFileSize"];
15155 }
15156 if (_json.containsKey("type")) {
15157 type = _json["type"];
15158 }
15159 if (_json.containsKey("version")) {
15160 version = _json["version"];
15161 }
15162 if (_json.containsKey("videoDescription")) {
15163 videoDescription = _json["videoDescription"];
15164 }
15165 if (_json.containsKey("videoDuration")) {
15166 videoDuration = _json["videoDuration"];
15167 }
15168 }
15169
15170 core.Map toJson() {
15171 var _json = new core.Map();
15172 if (accountId != null) {
15173 _json["accountId"] = accountId;
15174 }
15175 if (active != null) {
15176 _json["active"] = active;
15177 }
15178 if (adParameters != null) {
15179 _json["adParameters"] = adParameters;
15180 }
15181 if (adTagKeys != null) {
15182 _json["adTagKeys"] = adTagKeys;
15183 }
15184 if (advertiserId != null) {
15185 _json["advertiserId"] = advertiserId;
15186 }
15187 if (allowScriptAccess != null) {
15188 _json["allowScriptAccess"] = allowScriptAccess;
15189 }
15190 if (archived != null) {
15191 _json["archived"] = archived;
15192 }
15193 if (artworkType != null) {
15194 _json["artworkType"] = artworkType;
15195 }
15196 if (authoringSource != null) {
15197 _json["authoringSource"] = authoringSource;
15198 }
15199 if (authoringTool != null) {
15200 _json["authoringTool"] = authoringTool;
15201 }
15202 if (autoAdvanceImages != null) {
15203 _json["auto_advance_images"] = autoAdvanceImages;
15204 }
15205 if (backgroundColor != null) {
15206 _json["backgroundColor"] = backgroundColor;
15207 }
15208 if (backupImageClickThroughUrl != null) {
15209 _json["backupImageClickThroughUrl"] = backupImageClickThroughUrl;
15210 }
15211 if (backupImageFeatures != null) {
15212 _json["backupImageFeatures"] = backupImageFeatures;
15213 }
15214 if (backupImageReportingLabel != null) {
15215 _json["backupImageReportingLabel"] = backupImageReportingLabel;
15216 }
15217 if (backupImageTargetWindow != null) {
15218 _json["backupImageTargetWindow"] = (backupImageTargetWindow).toJson();
15219 }
15220 if (clickTags != null) {
15221 _json["clickTags"] = clickTags.map((value) => (value).toJson()).toList();
15222 }
15223 if (commercialId != null) {
15224 _json["commercialId"] = commercialId;
15225 }
15226 if (companionCreatives != null) {
15227 _json["companionCreatives"] = companionCreatives;
15228 }
15229 if (compatibility != null) {
15230 _json["compatibility"] = compatibility;
15231 }
15232 if (convertFlashToHtml5 != null) {
15233 _json["convertFlashToHtml5"] = convertFlashToHtml5;
15234 }
15235 if (counterCustomEvents != null) {
15236 _json["counterCustomEvents"] = counterCustomEvents.map((value) => (value). toJson()).toList();
15237 }
15238 if (creativeAssets != null) {
15239 _json["creativeAssets"] = creativeAssets.map((value) => (value).toJson()). toList();
15240 }
15241 if (creativeFieldAssignments != null) {
15242 _json["creativeFieldAssignments"] = creativeFieldAssignments.map((value) = > (value).toJson()).toList();
15243 }
15244 if (customKeyValues != null) {
15245 _json["customKeyValues"] = customKeyValues;
15246 }
15247 if (exitCustomEvents != null) {
15248 _json["exitCustomEvents"] = exitCustomEvents.map((value) => (value).toJson ()).toList();
15249 }
15250 if (fsCommand != null) {
15251 _json["fsCommand"] = (fsCommand).toJson();
15252 }
15253 if (htmlCode != null) {
15254 _json["htmlCode"] = htmlCode;
15255 }
15256 if (htmlCodeLocked != null) {
15257 _json["htmlCodeLocked"] = htmlCodeLocked;
15258 }
15259 if (id != null) {
15260 _json["id"] = id;
15261 }
15262 if (idDimensionValue != null) {
15263 _json["idDimensionValue"] = (idDimensionValue).toJson();
15264 }
15265 if (kind != null) {
15266 _json["kind"] = kind;
15267 }
15268 if (lastModifiedInfo != null) {
15269 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson();
15270 }
15271 if (latestTraffickedCreativeId != null) {
15272 _json["latestTraffickedCreativeId"] = latestTraffickedCreativeId;
15273 }
15274 if (name != null) {
15275 _json["name"] = name;
15276 }
15277 if (overrideCss != null) {
15278 _json["overrideCss"] = overrideCss;
15279 }
15280 if (redirectUrl != null) {
15281 _json["redirectUrl"] = redirectUrl;
15282 }
15283 if (renderingId != null) {
15284 _json["renderingId"] = renderingId;
15285 }
15286 if (renderingIdDimensionValue != null) {
15287 _json["renderingIdDimensionValue"] = (renderingIdDimensionValue).toJson();
15288 }
15289 if (requiredFlashPluginVersion != null) {
15290 _json["requiredFlashPluginVersion"] = requiredFlashPluginVersion;
15291 }
15292 if (requiredFlashVersion != null) {
15293 _json["requiredFlashVersion"] = requiredFlashVersion;
15294 }
15295 if (size != null) {
15296 _json["size"] = (size).toJson();
15297 }
15298 if (skippable != null) {
15299 _json["skippable"] = skippable;
15300 }
15301 if (sslCompliant != null) {
15302 _json["sslCompliant"] = sslCompliant;
15303 }
15304 if (sslOverride != null) {
15305 _json["sslOverride"] = sslOverride;
15306 }
15307 if (studioAdvertiserId != null) {
15308 _json["studioAdvertiserId"] = studioAdvertiserId;
15309 }
15310 if (studioCreativeId != null) {
15311 _json["studioCreativeId"] = studioCreativeId;
15312 }
15313 if (studioTraffickedCreativeId != null) {
15314 _json["studioTraffickedCreativeId"] = studioTraffickedCreativeId;
15315 }
15316 if (subaccountId != null) {
15317 _json["subaccountId"] = subaccountId;
15318 }
15319 if (thirdPartyBackupImageImpressionsUrl != null) {
15320 _json["thirdPartyBackupImageImpressionsUrl"] = thirdPartyBackupImageImpres sionsUrl;
15321 }
15322 if (thirdPartyRichMediaImpressionsUrl != null) {
15323 _json["thirdPartyRichMediaImpressionsUrl"] = thirdPartyRichMediaImpression sUrl;
15324 }
15325 if (thirdPartyUrls != null) {
15326 _json["thirdPartyUrls"] = thirdPartyUrls.map((value) => (value).toJson()). toList();
15327 }
15328 if (timerCustomEvents != null) {
15329 _json["timerCustomEvents"] = timerCustomEvents.map((value) => (value).toJs on()).toList();
15330 }
15331 if (totalFileSize != null) {
15332 _json["totalFileSize"] = totalFileSize;
15333 }
15334 if (type != null) {
15335 _json["type"] = type;
15336 }
15337 if (version != null) {
15338 _json["version"] = version;
15339 }
15340 if (videoDescription != null) {
15341 _json["videoDescription"] = videoDescription;
15342 }
15343 if (videoDuration != null) {
15344 _json["videoDuration"] = videoDuration;
15345 }
15346 return _json;
15347 }
15348 }
15349
15350 /** Creative Asset. */
15351 class CreativeAsset {
15352 /**
15353 * Whether ActionScript3 is enabled for the flash asset. This is a read-only
15354 * field. Applicable to the following creative type: FLASH_INPAGE. Applicable
15355 * to ENHANCED_BANNER when the primary asset type is not HTML_IMAGE.
15356 */
15357 core.bool actionScript3;
15358 /**
15359 * Whether the video asset is active. This is a read-only field for
15360 * VPAID_NON_LINEAR assets. Applicable to the following creative types:
15361 * INSTREAM_VIDEO and all VPAID.
15362 */
15363 core.bool active;
15364 /**
15365 * Possible alignments for an asset. This is a read-only field. Applicable to
15366 * the following creative types: RICH_MEDIA_MULTI_FLOATING.
15367 * Possible string values are:
15368 * - "ALIGNMENT_BOTTOM"
15369 * - "ALIGNMENT_LEFT"
15370 * - "ALIGNMENT_RIGHT"
15371 * - "ALIGNMENT_TOP"
15372 */
15373 core.String alignment;
15374 /**
15375 * Artwork type of rich media creative. This is a read-only field. Applicable
15376 * to the following creative types: all RICH_MEDIA.
15377 * Possible string values are:
15378 * - "ARTWORK_TYPE_FLASH"
15379 * - "ARTWORK_TYPE_HTML5"
15380 * - "ARTWORK_TYPE_IMAGE"
15381 * - "ARTWORK_TYPE_MIXED"
15382 */
15383 core.String artworkType;
15384 /**
15385 * Identifier of this asset. This is the same identifier returned during
15386 * creative asset insert operation. This is a required field. Applicable to
15387 * all but the following creative types: all REDIRECT and TRACKING_TEXT.
15388 */
15389 CreativeAssetId assetIdentifier;
15390 /**
15391 * Exit event configured for the backup image. Applicable to the following
15392 * creative types: all RICH_MEDIA.
15393 */
15394 CreativeCustomEvent backupImageExit;
15395 /**
15396 * Detected bit-rate for video asset. This is a read-only field. Applicable to
15397 * the following creative types: INSTREAM_VIDEO and all VPAID.
15398 */
15399 core.int bitRate;
15400 /**
15401 * Rich media child asset type. This is a read-only field. Applicable to the
15402 * following creative types: all VPAID.
15403 * Possible string values are:
15404 * - "CHILD_ASSET_TYPE_DATA"
15405 * - "CHILD_ASSET_TYPE_FLASH"
15406 * - "CHILD_ASSET_TYPE_IMAGE"
15407 * - "CHILD_ASSET_TYPE_VIDEO"
15408 */
15409 core.String childAssetType;
15410 /**
15411 * Size of an asset when collapsed. This is a read-only field. Applicable to
15412 * the following creative types: all RICH_MEDIA and all VPAID. Additionally,
15413 * applicable to assets whose displayType is ASSET_DISPLAY_TYPE_EXPANDING or
15414 * ASSET_DISPLAY_TYPE_PEEL_DOWN.
15415 */
15416 Size collapsedSize;
15417 /**
15418 * Custom start time in seconds for making the asset visible. Applicable to
15419 * the following creative types: all RICH_MEDIA.
15420 */
15421 core.int customStartTimeValue;
15422 /**
15423 * List of feature dependencies for the creative asset that are detected by
15424 * DCM. Feature dependencies are features that a browser must be able to
15425 * support in order to render your HTML5 creative correctly. This is a
15426 * read-only, auto-generated field. Applicable to the following creative
15427 * types: ENHANCED_BANNER and HTML5_BANNER.
15428 */
15429 core.List<core.String> detectedFeatures;
15430 /**
15431 * Type of rich media asset. This is a read-only field. Applicable to the
15432 * following creative types: all RICH_MEDIA.
15433 * Possible string values are:
15434 * - "ASSET_DISPLAY_TYPE_BACKDROP"
15435 * - "ASSET_DISPLAY_TYPE_EXPANDING"
15436 * - "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH"
15437 * - "ASSET_DISPLAY_TYPE_FLASH_IN_FLASH_EXPANDING"
15438 * - "ASSET_DISPLAY_TYPE_FLOATING"
15439 * - "ASSET_DISPLAY_TYPE_INPAGE"
15440 * - "ASSET_DISPLAY_TYPE_OVERLAY"
15441 * - "ASSET_DISPLAY_TYPE_PEEL_DOWN"
15442 * - "ASSET_DISPLAY_TYPE_VPAID_LINEAR"
15443 * - "ASSET_DISPLAY_TYPE_VPAID_NON_LINEAR"
15444 */
15445 core.String displayType;
15446 /**
15447 * Duration in seconds for which an asset will be displayed. Applicable to the
15448 * following creative types: INSTREAM_VIDEO and VPAID_LINEAR.
15449 */
15450 core.int duration;
15451 /**
15452 * Duration type for which an asset will be displayed. Applicable to the
15453 * following creative types: all RICH_MEDIA.
15454 * Possible string values are:
15455 * - "ASSET_DURATION_TYPE_AUTO"
15456 * - "ASSET_DURATION_TYPE_CUSTOM"
15457 * - "ASSET_DURATION_TYPE_NONE"
15458 */
15459 core.String durationType;
15460 /**
15461 * Detected expanded dimension for video asset. This is a read-only field.
15462 * Applicable to the following creative types: INSTREAM_VIDEO and all VPAID.
15463 */
15464 Size expandedDimension;
15465 /**
15466 * File size associated with this creative asset. This is a read-only field.
15467 * Applicable to all but the following creative types: all REDIRECT and
15468 * TRACKING_TEXT.
15469 */
15470 core.String fileSize;
15471 /**
15472 * Flash version of the asset. This is a read-only field. Applicable to the
15473 * following creative types: FLASH_INPAGE, all RICH_MEDIA, and all VPAID.
15474 * Applicable to ENHANCED_BANNER when the primary asset type is not
15475 * HTML_IMAGE.
15476 */
15477 core.int flashVersion;
15478 /**
15479 * Whether to hide Flash objects flag for an asset. Applicable to the
15480 * following creative types: all RICH_MEDIA.
15481 */
15482 core.bool hideFlashObjects;
15483 /**
15484 * Whether to hide selection boxes flag for an asset. Applicable to the
15485 * following creative types: all RICH_MEDIA.
15486 */
15487 core.bool hideSelectionBoxes;
15488 /**
15489 * Whether the asset is horizontally locked. This is a read-only field.
15490 * Applicable to the following creative types: all RICH_MEDIA.
15491 */
15492 core.bool horizontallyLocked;
15493 /**
15494 * Numeric ID of this creative asset. This is a required field and should not
15495 * be modified. Applicable to all but the following creative types: all
15496 * REDIRECT and TRACKING_TEXT.
15497 */
15498 core.String id;
15499 /**
15500 * Detected MIME type for video asset. This is a read-only field. Applicable
15501 * to the following creative types: INSTREAM_VIDEO and all VPAID.
15502 */
15503 core.String mimeType;
15504 /**
15505 * Offset position for an asset in collapsed mode. This is a read-only field.
15506 * Applicable to the following creative types: all RICH_MEDIA and all VPAID.
15507 * Additionally, only applicable to assets whose displayType is
15508 * ASSET_DISPLAY_TYPE_EXPANDING or ASSET_DISPLAY_TYPE_PEEL_DOWN.
15509 */
15510 OffsetPosition offset;
15511 /**
15512 * Whether the backup asset is original or changed by the user in DCM.
15513 * Applicable to the following creative types: all RICH_MEDIA.
15514 */
15515 core.bool originalBackup;
15516 /**
15517 * Offset position for an asset. Applicable to the following creative types:
15518 * all RICH_MEDIA.
15519 */
15520 OffsetPosition position;
15521 /**
15522 * Offset left unit for an asset. This is a read-only field. Applicable to the
15523 * following creative types: all RICH_MEDIA.
15524 * Possible string values are:
15525 * - "OFFSET_UNIT_PERCENT"
15526 * - "OFFSET_UNIT_PIXEL"
15527 * - "OFFSET_UNIT_PIXEL_FROM_CENTER"
15528 */
15529 core.String positionLeftUnit;
15530 /**
15531 * Offset top unit for an asset. This is a read-only field if the asset
15532 * displayType is ASSET_DISPLAY_TYPE_OVERLAY. Applicable to the following
15533 * creative types: all RICH_MEDIA.
15534 * Possible string values are:
15535 * - "OFFSET_UNIT_PERCENT"
15536 * - "OFFSET_UNIT_PIXEL"
15537 * - "OFFSET_UNIT_PIXEL_FROM_CENTER"
15538 */
15539 core.String positionTopUnit;
15540 /**
15541 * Progressive URL for video asset. This is a read-only field. Applicable to
15542 * the following creative types: INSTREAM_VIDEO and all VPAID.
15543 */
15544 core.String progressiveServingUrl;
15545 /**
15546 * Whether the asset pushes down other content. Applicable to the following
15547 * creative types: all RICH_MEDIA. Additionally, only applicable when the
15548 * asset offsets are 0, the collapsedSize.width matches size.width, and the
15549 * collapsedSize.height is less than size.height.
15550 */
15551 core.bool pushdown;
15552 /**
15553 * Pushdown duration in seconds for an asset. Must be between 0 and 9.99.
15554 * Applicable to the following creative types: all RICH_MEDIA.Additionally,
15555 * only applicable when the asset pushdown field is true, the offsets are 0,
15556 * the collapsedSize.width matches size.width, and the collapsedSize.height is
15557 * less than size.height.
15558 */
15559 core.double pushdownDuration;
15560 /**
15561 * Role of the asset in relation to creative. Applicable to all but the
15562 * following creative types: all REDIRECT and TRACKING_TEXT. This is a
15563 * required field.
15564 * PRIMARY applies to ENHANCED_BANNER, FLASH_INPAGE, HTML5_BANNER, IMAGE,
15565 * IMAGE_GALLERY, all RICH_MEDIA (which may contain multiple primary assets),
15566 * and all VPAID creatives.
15567 * BACKUP_IMAGE applies to ENHANCED_BANNER, FLASH_INPAGE, HTML5_BANNER, all
15568 * RICH_MEDIA, and all VPAID creatives.
15569 * ADDITIONAL_IMAGE and ADDITIONAL_FLASH apply to FLASH_INPAGE creatives.
15570 * OTHER refers to assets from sources other than DCM, such as Studio uploaded
15571 * assets, applicable to all RICH_MEDIA and all VPAID creatives.
15572 * PARENT_VIDEO refers to videos uploaded by the user in DCM and is applicable
15573 * to INSTREAM_VIDEO and VPAID_LINEAR creatives.
15574 * TRANSCODED_VIDEO refers to videos transcoded by DCM from PARENT_VIDEO
15575 * assets and is applicable to INSTREAM_VIDEO and VPAID_LINEAR creatives.
15576 * ALTERNATE_VIDEO refers to the DCM representation of child asset videos from
15577 * Studio, and is applicable to VPAID_LINEAR_VIDEO creatives. These cannot be
15578 * added or removed within DCM.
15579 * For VPAID_LINEAR creatives, PARENT_VIDEO, TRANSCODED_VIDEO and
15580 * ALTERNATE_VIDEO assets that are marked active serve as backup in case the
15581 * VPAID creative cannot be served. Only PARENT_VIDEO assets can be added or
15582 * removed for an INSTREAM_VIDEO or VPAID_LINEAR creative.
15583 * Possible string values are:
15584 * - "ADDITIONAL_FLASH"
15585 * - "ADDITIONAL_IMAGE"
15586 * - "ALTERNATE_VIDEO"
15587 * - "BACKUP_IMAGE"
15588 * - "OTHER"
15589 * - "PARENT_VIDEO"
15590 * - "PRIMARY"
15591 * - "TRANSCODED_VIDEO"
15592 */
15593 core.String role;
15594 /**
15595 * Size associated with this creative asset. This is a required field when
15596 * applicable; however for IMAGE and FLASH_INPAGE creatives, if left blank,
15597 * this field will be automatically set using the actual size of the
15598 * associated image asset. Applicable to the following creative types:
15599 * ENHANCED_IMAGE, FLASH_INPAGE, HTML5_BANNER, IMAGE, and all RICH_MEDIA.
15600 * Applicable to ENHANCED_BANNER when the primary asset type is not
15601 * HTML_IMAGE.
15602 */
15603 Size size;
15604 /**
15605 * Whether the asset is SSL-compliant. This is a read-only field. Applicable
15606 * to all but the following creative types: all REDIRECT and TRACKING_TEXT.
15607 */
15608 core.bool sslCompliant;
15609 /**
15610 * Initial wait time type before making the asset visible. Applicable to the
15611 * following creative types: all RICH_MEDIA.
15612 * Possible string values are:
15613 * - "ASSET_START_TIME_TYPE_CUSTOM"
15614 * - "ASSET_START_TIME_TYPE_NONE"
15615 */
15616 core.String startTimeType;
15617 /**
15618 * Streaming URL for video asset. This is a read-only field. Applicable to the
15619 * following creative types: INSTREAM_VIDEO and all VPAID.
15620 */
15621 core.String streamingServingUrl;
15622 /**
15623 * Whether the asset is transparent. Applicable to the following creative
15624 * types: all RICH_MEDIA. Additionally, only applicable to HTML5 assets.
15625 */
15626 core.bool transparency;
15627 /**
15628 * Whether the asset is vertically locked. This is a read-only field.
15629 * Applicable to the following creative types: all RICH_MEDIA.
15630 */
15631 core.bool verticallyLocked;
15632 /**
15633 * Detected video duration for video asset. This is a read-only field.
15634 * Applicable to the following creative types: INSTREAM_VIDEO and all VPAID.
15635 */
15636 core.double videoDuration;
15637 /**
15638 * Window mode options for flash assets. Applicable to the following creative
15639 * types: FLASH_INPAGE, RICH_MEDIA_EXPANDING, RICH_MEDIA_IM_EXPAND,
15640 * RICH_MEDIA_INPAGE, and RICH_MEDIA_INPAGE_FLOATING.
15641 * Possible string values are:
15642 * - "OPAQUE"
15643 * - "TRANSPARENT"
15644 * - "WINDOW"
15645 */
15646 core.String windowMode;
15647 /**
15648 * zIndex value of an asset. This is a read-only field. Applicable to the
15649 * following creative types: all RICH_MEDIA.Additionally, only applicable to
15650 * assets whose displayType is NOT one of the following types:
15651 * ASSET_DISPLAY_TYPE_INPAGE or ASSET_DISPLAY_TYPE_OVERLAY.
15652 */
15653 core.int zIndex;
15654 /**
15655 * File name of zip file. This is a read-only field. Applicable to the
15656 * following creative types: HTML5_BANNER.
15657 */
15658 core.String zipFilename;
15659 /**
15660 * Size of zip file. This is a read-only field. Applicable to the following
15661 * creative types: HTML5_BANNER.
15662 */
15663 core.String zipFilesize;
15664
15665 CreativeAsset();
15666
15667 CreativeAsset.fromJson(core.Map _json) {
15668 if (_json.containsKey("actionScript3")) {
15669 actionScript3 = _json["actionScript3"];
15670 }
15671 if (_json.containsKey("active")) {
15672 active = _json["active"];
15673 }
15674 if (_json.containsKey("alignment")) {
15675 alignment = _json["alignment"];
15676 }
15677 if (_json.containsKey("artworkType")) {
15678 artworkType = _json["artworkType"];
15679 }
15680 if (_json.containsKey("assetIdentifier")) {
15681 assetIdentifier = new CreativeAssetId.fromJson(_json["assetIdentifier"]);
15682 }
15683 if (_json.containsKey("backupImageExit")) {
15684 backupImageExit = new CreativeCustomEvent.fromJson(_json["backupImageExit" ]);
15685 }
15686 if (_json.containsKey("bitRate")) {
15687 bitRate = _json["bitRate"];
15688 }
15689 if (_json.containsKey("childAssetType")) {
15690 childAssetType = _json["childAssetType"];
15691 }
15692 if (_json.containsKey("collapsedSize")) {
15693 collapsedSize = new Size.fromJson(_json["collapsedSize"]);
15694 }
15695 if (_json.containsKey("customStartTimeValue")) {
15696 customStartTimeValue = _json["customStartTimeValue"];
15697 }
15698 if (_json.containsKey("detectedFeatures")) {
15699 detectedFeatures = _json["detectedFeatures"];
15700 }
15701 if (_json.containsKey("displayType")) {
15702 displayType = _json["displayType"];
15703 }
15704 if (_json.containsKey("duration")) {
15705 duration = _json["duration"];
15706 }
15707 if (_json.containsKey("durationType")) {
15708 durationType = _json["durationType"];
15709 }
15710 if (_json.containsKey("expandedDimension")) {
15711 expandedDimension = new Size.fromJson(_json["expandedDimension"]);
15712 }
15713 if (_json.containsKey("fileSize")) {
15714 fileSize = _json["fileSize"];
15715 }
15716 if (_json.containsKey("flashVersion")) {
15717 flashVersion = _json["flashVersion"];
15718 }
15719 if (_json.containsKey("hideFlashObjects")) {
15720 hideFlashObjects = _json["hideFlashObjects"];
15721 }
15722 if (_json.containsKey("hideSelectionBoxes")) {
15723 hideSelectionBoxes = _json["hideSelectionBoxes"];
15724 }
15725 if (_json.containsKey("horizontallyLocked")) {
15726 horizontallyLocked = _json["horizontallyLocked"];
15727 }
15728 if (_json.containsKey("id")) {
15729 id = _json["id"];
15730 }
15731 if (_json.containsKey("mimeType")) {
15732 mimeType = _json["mimeType"];
15733 }
15734 if (_json.containsKey("offset")) {
15735 offset = new OffsetPosition.fromJson(_json["offset"]);
15736 }
15737 if (_json.containsKey("originalBackup")) {
15738 originalBackup = _json["originalBackup"];
15739 }
15740 if (_json.containsKey("position")) {
15741 position = new OffsetPosition.fromJson(_json["position"]);
15742 }
15743 if (_json.containsKey("positionLeftUnit")) {
15744 positionLeftUnit = _json["positionLeftUnit"];
15745 }
15746 if (_json.containsKey("positionTopUnit")) {
15747 positionTopUnit = _json["positionTopUnit"];
15748 }
15749 if (_json.containsKey("progressiveServingUrl")) {
15750 progressiveServingUrl = _json["progressiveServingUrl"];
15751 }
15752 if (_json.containsKey("pushdown")) {
15753 pushdown = _json["pushdown"];
15754 }
15755 if (_json.containsKey("pushdownDuration")) {
15756 pushdownDuration = _json["pushdownDuration"];
15757 }
15758 if (_json.containsKey("role")) {
15759 role = _json["role"];
15760 }
15761 if (_json.containsKey("size")) {
15762 size = new Size.fromJson(_json["size"]);
15763 }
15764 if (_json.containsKey("sslCompliant")) {
15765 sslCompliant = _json["sslCompliant"];
15766 }
15767 if (_json.containsKey("startTimeType")) {
15768 startTimeType = _json["startTimeType"];
15769 }
15770 if (_json.containsKey("streamingServingUrl")) {
15771 streamingServingUrl = _json["streamingServingUrl"];
15772 }
15773 if (_json.containsKey("transparency")) {
15774 transparency = _json["transparency"];
15775 }
15776 if (_json.containsKey("verticallyLocked")) {
15777 verticallyLocked = _json["verticallyLocked"];
15778 }
15779 if (_json.containsKey("videoDuration")) {
15780 videoDuration = _json["videoDuration"];
15781 }
15782 if (_json.containsKey("windowMode")) {
15783 windowMode = _json["windowMode"];
15784 }
15785 if (_json.containsKey("zIndex")) {
15786 zIndex = _json["zIndex"];
15787 }
15788 if (_json.containsKey("zipFilename")) {
15789 zipFilename = _json["zipFilename"];
15790 }
15791 if (_json.containsKey("zipFilesize")) {
15792 zipFilesize = _json["zipFilesize"];
15793 }
15794 }
15795
15796 core.Map toJson() {
15797 var _json = new core.Map();
15798 if (actionScript3 != null) {
15799 _json["actionScript3"] = actionScript3;
15800 }
15801 if (active != null) {
15802 _json["active"] = active;
15803 }
15804 if (alignment != null) {
15805 _json["alignment"] = alignment;
15806 }
15807 if (artworkType != null) {
15808 _json["artworkType"] = artworkType;
15809 }
15810 if (assetIdentifier != null) {
15811 _json["assetIdentifier"] = (assetIdentifier).toJson();
15812 }
15813 if (backupImageExit != null) {
15814 _json["backupImageExit"] = (backupImageExit).toJson();
15815 }
15816 if (bitRate != null) {
15817 _json["bitRate"] = bitRate;
15818 }
15819 if (childAssetType != null) {
15820 _json["childAssetType"] = childAssetType;
15821 }
15822 if (collapsedSize != null) {
15823 _json["collapsedSize"] = (collapsedSize).toJson();
15824 }
15825 if (customStartTimeValue != null) {
15826 _json["customStartTimeValue"] = customStartTimeValue;
15827 }
15828 if (detectedFeatures != null) {
15829 _json["detectedFeatures"] = detectedFeatures;
15830 }
15831 if (displayType != null) {
15832 _json["displayType"] = displayType;
15833 }
15834 if (duration != null) {
15835 _json["duration"] = duration;
15836 }
15837 if (durationType != null) {
15838 _json["durationType"] = durationType;
15839 }
15840 if (expandedDimension != null) {
15841 _json["expandedDimension"] = (expandedDimension).toJson();
15842 }
15843 if (fileSize != null) {
15844 _json["fileSize"] = fileSize;
15845 }
15846 if (flashVersion != null) {
15847 _json["flashVersion"] = flashVersion;
15848 }
15849 if (hideFlashObjects != null) {
15850 _json["hideFlashObjects"] = hideFlashObjects;
15851 }
15852 if (hideSelectionBoxes != null) {
15853 _json["hideSelectionBoxes"] = hideSelectionBoxes;
15854 }
15855 if (horizontallyLocked != null) {
15856 _json["horizontallyLocked"] = horizontallyLocked;
15857 }
15858 if (id != null) {
15859 _json["id"] = id;
15860 }
15861 if (mimeType != null) {
15862 _json["mimeType"] = mimeType;
15863 }
15864 if (offset != null) {
15865 _json["offset"] = (offset).toJson();
15866 }
15867 if (originalBackup != null) {
15868 _json["originalBackup"] = originalBackup;
15869 }
15870 if (position != null) {
15871 _json["position"] = (position).toJson();
15872 }
15873 if (positionLeftUnit != null) {
15874 _json["positionLeftUnit"] = positionLeftUnit;
15875 }
15876 if (positionTopUnit != null) {
15877 _json["positionTopUnit"] = positionTopUnit;
15878 }
15879 if (progressiveServingUrl != null) {
15880 _json["progressiveServingUrl"] = progressiveServingUrl;
15881 }
15882 if (pushdown != null) {
15883 _json["pushdown"] = pushdown;
15884 }
15885 if (pushdownDuration != null) {
15886 _json["pushdownDuration"] = pushdownDuration;
15887 }
15888 if (role != null) {
15889 _json["role"] = role;
15890 }
15891 if (size != null) {
15892 _json["size"] = (size).toJson();
15893 }
15894 if (sslCompliant != null) {
15895 _json["sslCompliant"] = sslCompliant;
15896 }
15897 if (startTimeType != null) {
15898 _json["startTimeType"] = startTimeType;
15899 }
15900 if (streamingServingUrl != null) {
15901 _json["streamingServingUrl"] = streamingServingUrl;
15902 }
15903 if (transparency != null) {
15904 _json["transparency"] = transparency;
15905 }
15906 if (verticallyLocked != null) {
15907 _json["verticallyLocked"] = verticallyLocked;
15908 }
15909 if (videoDuration != null) {
15910 _json["videoDuration"] = videoDuration;
15911 }
15912 if (windowMode != null) {
15913 _json["windowMode"] = windowMode;
15914 }
15915 if (zIndex != null) {
15916 _json["zIndex"] = zIndex;
15917 }
15918 if (zipFilename != null) {
15919 _json["zipFilename"] = zipFilename;
15920 }
15921 if (zipFilesize != null) {
15922 _json["zipFilesize"] = zipFilesize;
15923 }
15924 return _json;
15925 }
15926 }
15927
15928 /** Creative Asset ID. */
15929 class CreativeAssetId {
15930 /**
15931 * Name of the creative asset. This is a required field while inserting an
15932 * asset. After insertion, this assetIdentifier is used to identify the
15933 * uploaded asset. Characters in the name must be alphanumeric or one of the
15934 * following: ".-_ ". Spaces are allowed.
15935 */
15936 core.String name;
15937 /**
15938 * Type of asset to upload. This is a required field. IMAGE is solely used for
15939 * IMAGE creatives. Other image assets should use HTML_IMAGE.
15940 * Possible string values are:
15941 * - "FLASH"
15942 * - "HTML"
15943 * - "HTML_IMAGE"
15944 * - "IMAGE"
15945 * - "VIDEO"
15946 */
15947 core.String type;
15948
15949 CreativeAssetId();
15950
15951 CreativeAssetId.fromJson(core.Map _json) {
15952 if (_json.containsKey("name")) {
15953 name = _json["name"];
15954 }
15955 if (_json.containsKey("type")) {
15956 type = _json["type"];
15957 }
15958 }
15959
15960 core.Map toJson() {
15961 var _json = new core.Map();
15962 if (name != null) {
15963 _json["name"] = name;
15964 }
15965 if (type != null) {
15966 _json["type"] = type;
15967 }
15968 return _json;
15969 }
15970 }
15971
15972 /**
15973 * CreativeAssets contains properties of a creative asset file which will be
15974 * uploaded or has already been uploaded. Refer to the creative sample code for
15975 * how to upload assets and insert a creative.
15976 */
15977 class CreativeAssetMetadata {
15978 /** ID of the creative asset. This is a required field. */
15979 CreativeAssetId assetIdentifier;
15980 /**
15981 * List of detected click tags for assets. This is a read-only auto-generated
15982 * field.
15983 */
15984 core.List<ClickTag> clickTags;
15985 /**
15986 * List of feature dependencies for the creative asset that are detected by
15987 * DCM. Feature dependencies are features that a browser must be able to
15988 * support in order to render your HTML5 creative correctly. This is a
15989 * read-only, auto-generated field.
15990 */
15991 core.List<core.String> detectedFeatures;
15992 /**
15993 * Identifies what kind of resource this is. Value: the fixed string
15994 * "dfareporting#creativeAssetMetadata".
15995 */
15996 core.String kind;
15997 /**
15998 * Rules validated during code generation that generated a warning. This is a
15999 * read-only, auto-generated field.
16000 *
16001 * Possible values are:
16002 * - "ADMOB_REFERENCED"
16003 * - "ASSET_FORMAT_UNSUPPORTED_DCM"
16004 * - "ASSET_INVALID"
16005 * - "CLICK_TAG_HARD_CODED"
16006 * - "CLICK_TAG_INVALID"
16007 * - "CLICK_TAG_IN_GWD"
16008 * - "CLICK_TAG_MISSING"
16009 * - "CLICK_TAG_MORE_THAN_ONE"
16010 * - "CLICK_TAG_NON_TOP_LEVEL"
16011 * - "COMPONENT_UNSUPPORTED_DCM"
16012 * - "ENABLER_UNSUPPORTED_METHOD_DCM"
16013 * - "EXTERNAL_FILE_REFERENCED"
16014 * - "FILE_DETAIL_EMPTY"
16015 * - "FILE_TYPE_INVALID"
16016 * - "GWD_PROPERTIES_INVALID"
16017 * - "HTML5_FEATURE_UNSUPPORTED"
16018 * - "LINKED_FILE_NOT_FOUND"
16019 * - "MAX_FLASH_VERSION_11"
16020 * - "MRAID_REFERENCED"
16021 * - "NOT_SSL_COMPLIANT"
16022 * - "ORPHANED_ASSET"
16023 * - "PRIMARY_HTML_MISSING"
16024 * - "SVG_INVALID"
16025 * - "ZIP_INVALID"
16026 */
16027 core.List<core.String> warnedValidationRules;
16028
16029 CreativeAssetMetadata();
16030
16031 CreativeAssetMetadata.fromJson(core.Map _json) {
16032 if (_json.containsKey("assetIdentifier")) {
16033 assetIdentifier = new CreativeAssetId.fromJson(_json["assetIdentifier"]);
16034 }
16035 if (_json.containsKey("clickTags")) {
16036 clickTags = _json["clickTags"].map((value) => new ClickTag.fromJson(value) ).toList();
16037 }
16038 if (_json.containsKey("detectedFeatures")) {
16039 detectedFeatures = _json["detectedFeatures"];
16040 }
16041 if (_json.containsKey("kind")) {
16042 kind = _json["kind"];
16043 }
16044 if (_json.containsKey("warnedValidationRules")) {
16045 warnedValidationRules = _json["warnedValidationRules"];
16046 }
16047 }
16048
16049 core.Map toJson() {
16050 var _json = new core.Map();
16051 if (assetIdentifier != null) {
16052 _json["assetIdentifier"] = (assetIdentifier).toJson();
16053 }
16054 if (clickTags != null) {
16055 _json["clickTags"] = clickTags.map((value) => (value).toJson()).toList();
16056 }
16057 if (detectedFeatures != null) {
16058 _json["detectedFeatures"] = detectedFeatures;
16059 }
16060 if (kind != null) {
16061 _json["kind"] = kind;
16062 }
16063 if (warnedValidationRules != null) {
16064 _json["warnedValidationRules"] = warnedValidationRules;
16065 }
16066 return _json;
16067 }
16068 }
16069
16070 /** Creative Assignment. */
16071 class CreativeAssignment {
16072 /**
16073 * Whether this creative assignment is active. When true, the creative will be
16074 * included in the ad's rotation.
16075 */
16076 core.bool active;
16077 /**
16078 * Whether applicable event tags should fire when this creative assignment is
16079 * rendered. If this value is unset when the ad is inserted or updated, it
16080 * will default to true for all creative types EXCEPT for INTERNAL_REDIRECT,
16081 * INTERSTITIAL_INTERNAL_REDIRECT, and INSTREAM_VIDEO.
16082 */
16083 core.bool applyEventTags;
16084 /** Click-through URL of the creative assignment. */
16085 ClickThroughUrl clickThroughUrl;
16086 /**
16087 * Companion creative overrides for this creative assignment. Applicable to
16088 * video ads.
16089 */
16090 core.List<CompanionClickThroughOverride> companionCreativeOverrides;
16091 /**
16092 * Creative group assignments for this creative assignment. Only one
16093 * assignment per creative group number is allowed for a maximum of two
16094 * assignments.
16095 */
16096 core.List<CreativeGroupAssignment> creativeGroupAssignments;
16097 /** ID of the creative to be assigned. This is a required field. */
16098 core.String creativeId;
16099 /**
16100 * Dimension value for the ID of the creative. This is a read-only,
16101 * auto-generated field.
16102 */
16103 DimensionValue creativeIdDimensionValue;
16104 /**
16105 * Date and time that the assigned creative should stop serving. Must be later
16106 * than the start time.
16107 */
16108 core.DateTime endTime;
16109 /**
16110 * Rich media exit overrides for this creative assignment.
16111 * Applicable when the creative type is any of the following:
16112 * - RICH_MEDIA_INPAGE
16113 * - RICH_MEDIA_INPAGE_FLOATING
16114 * - RICH_MEDIA_IM_EXPAND
16115 * - RICH_MEDIA_EXPANDING
16116 * - RICH_MEDIA_INTERSTITIAL_FLOAT
16117 * - RICH_MEDIA_MOBILE_IN_APP
16118 * - RICH_MEDIA_MULTI_FLOATING
16119 * - RICH_MEDIA_PEEL_DOWN
16120 * - ADVANCED_BANNER
16121 * - VPAID_LINEAR
16122 * - VPAID_NON_LINEAR
16123 */
16124 core.List<RichMediaExitOverride> richMediaExitOverrides;
16125 /**
16126 * Sequence number of the creative assignment, applicable when the rotation
16127 * type is CREATIVE_ROTATION_TYPE_SEQUENTIAL.
16128 */
16129 core.int sequence;
16130 /**
16131 * Whether the creative to be assigned is SSL-compliant. This is a read-only
16132 * field that is auto-generated when the ad is inserted or updated.
16133 */
16134 core.bool sslCompliant;
16135 /** Date and time that the assigned creative should start serving. */
16136 core.DateTime startTime;
16137 /**
16138 * Weight of the creative assignment, applicable when the rotation type is
16139 * CREATIVE_ROTATION_TYPE_RANDOM.
16140 */
16141 core.int weight;
16142
16143 CreativeAssignment();
16144
16145 CreativeAssignment.fromJson(core.Map _json) {
16146 if (_json.containsKey("active")) {
16147 active = _json["active"];
16148 }
16149 if (_json.containsKey("applyEventTags")) {
16150 applyEventTags = _json["applyEventTags"];
16151 }
16152 if (_json.containsKey("clickThroughUrl")) {
16153 clickThroughUrl = new ClickThroughUrl.fromJson(_json["clickThroughUrl"]);
16154 }
16155 if (_json.containsKey("companionCreativeOverrides")) {
16156 companionCreativeOverrides = _json["companionCreativeOverrides"].map((valu e) => new CompanionClickThroughOverride.fromJson(value)).toList();
16157 }
16158 if (_json.containsKey("creativeGroupAssignments")) {
16159 creativeGroupAssignments = _json["creativeGroupAssignments"].map((value) = > new CreativeGroupAssignment.fromJson(value)).toList();
16160 }
16161 if (_json.containsKey("creativeId")) {
16162 creativeId = _json["creativeId"];
16163 }
16164 if (_json.containsKey("creativeIdDimensionValue")) {
16165 creativeIdDimensionValue = new DimensionValue.fromJson(_json["creativeIdDi mensionValue"]);
16166 }
16167 if (_json.containsKey("endTime")) {
16168 endTime = core.DateTime.parse(_json["endTime"]);
16169 }
16170 if (_json.containsKey("richMediaExitOverrides")) {
16171 richMediaExitOverrides = _json["richMediaExitOverrides"].map((value) => ne w RichMediaExitOverride.fromJson(value)).toList();
16172 }
16173 if (_json.containsKey("sequence")) {
16174 sequence = _json["sequence"];
16175 }
16176 if (_json.containsKey("sslCompliant")) {
16177 sslCompliant = _json["sslCompliant"];
16178 }
16179 if (_json.containsKey("startTime")) {
16180 startTime = core.DateTime.parse(_json["startTime"]);
16181 }
16182 if (_json.containsKey("weight")) {
16183 weight = _json["weight"];
16184 }
16185 }
16186
16187 core.Map toJson() {
16188 var _json = new core.Map();
16189 if (active != null) {
16190 _json["active"] = active;
16191 }
16192 if (applyEventTags != null) {
16193 _json["applyEventTags"] = applyEventTags;
16194 }
16195 if (clickThroughUrl != null) {
16196 _json["clickThroughUrl"] = (clickThroughUrl).toJson();
16197 }
16198 if (companionCreativeOverrides != null) {
16199 _json["companionCreativeOverrides"] = companionCreativeOverrides.map((valu e) => (value).toJson()).toList();
16200 }
16201 if (creativeGroupAssignments != null) {
16202 _json["creativeGroupAssignments"] = creativeGroupAssignments.map((value) = > (value).toJson()).toList();
16203 }
16204 if (creativeId != null) {
16205 _json["creativeId"] = creativeId;
16206 }
16207 if (creativeIdDimensionValue != null) {
16208 _json["creativeIdDimensionValue"] = (creativeIdDimensionValue).toJson();
16209 }
16210 if (endTime != null) {
16211 _json["endTime"] = (endTime).toIso8601String();
16212 }
16213 if (richMediaExitOverrides != null) {
16214 _json["richMediaExitOverrides"] = richMediaExitOverrides.map((value) => (v alue).toJson()).toList();
16215 }
16216 if (sequence != null) {
16217 _json["sequence"] = sequence;
16218 }
16219 if (sslCompliant != null) {
16220 _json["sslCompliant"] = sslCompliant;
16221 }
16222 if (startTime != null) {
16223 _json["startTime"] = (startTime).toIso8601String();
16224 }
16225 if (weight != null) {
16226 _json["weight"] = weight;
16227 }
16228 return _json;
16229 }
16230 }
16231
16232 /** Creative Custom Event. */
16233 class CreativeCustomEvent {
16234 /**
16235 * Unique ID of this event used by DDM Reporting and Data Transfer. This is a
16236 * read-only field.
16237 */
16238 core.String advertiserCustomEventId;
16239 /** User-entered name for the event. */
16240 core.String advertiserCustomEventName;
16241 /**
16242 * Type of the event. This is a read-only field.
16243 * Possible string values are:
16244 * - "ADVERTISER_EVENT_COUNTER"
16245 * - "ADVERTISER_EVENT_EXIT"
16246 * - "ADVERTISER_EVENT_TIMER"
16247 */
16248 core.String advertiserCustomEventType;
16249 /**
16250 * Artwork label column, used to link events in DCM back to events in Studio.
16251 * This is a required field and should not be modified after insertion.
16252 */
16253 core.String artworkLabel;
16254 /**
16255 * Artwork type used by the creative.This is a read-only field.
16256 * Possible string values are:
16257 * - "ARTWORK_TYPE_FLASH"
16258 * - "ARTWORK_TYPE_HTML5"
16259 * - "ARTWORK_TYPE_IMAGE"
16260 * - "ARTWORK_TYPE_MIXED"
16261 */
16262 core.String artworkType;
16263 /** Exit URL of the event. This field is used only for exit events. */
16264 core.String exitUrl;
16265 /**
16266 * ID of this event. This is a required field and should not be modified after
16267 * insertion.
16268 */
16269 core.String id;
16270 /**
16271 * Properties for rich media popup windows. This field is used only for exit
16272 * events.
16273 */
16274 PopupWindowProperties popupWindowProperties;
16275 /**
16276 * Target type used by the event.
16277 * Possible string values are:
16278 * - "TARGET_BLANK"
16279 * - "TARGET_PARENT"
16280 * - "TARGET_POPUP"
16281 * - "TARGET_SELF"
16282 * - "TARGET_TOP"
16283 */
16284 core.String targetType;
16285 /**
16286 * Video reporting ID, used to differentiate multiple videos in a single
16287 * creative. This is a read-only field.
16288 */
16289 core.String videoReportingId;
16290
16291 CreativeCustomEvent();
16292
16293 CreativeCustomEvent.fromJson(core.Map _json) {
16294 if (_json.containsKey("advertiserCustomEventId")) {
16295 advertiserCustomEventId = _json["advertiserCustomEventId"];
16296 }
16297 if (_json.containsKey("advertiserCustomEventName")) {
16298 advertiserCustomEventName = _json["advertiserCustomEventName"];
16299 }
16300 if (_json.containsKey("advertiserCustomEventType")) {
16301 advertiserCustomEventType = _json["advertiserCustomEventType"];
16302 }
16303 if (_json.containsKey("artworkLabel")) {
16304 artworkLabel = _json["artworkLabel"];
16305 }
16306 if (_json.containsKey("artworkType")) {
16307 artworkType = _json["artworkType"];
16308 }
16309 if (_json.containsKey("exitUrl")) {
16310 exitUrl = _json["exitUrl"];
16311 }
16312 if (_json.containsKey("id")) {
16313 id = _json["id"];
16314 }
16315 if (_json.containsKey("popupWindowProperties")) {
16316 popupWindowProperties = new PopupWindowProperties.fromJson(_json["popupWin dowProperties"]);
16317 }
16318 if (_json.containsKey("targetType")) {
16319 targetType = _json["targetType"];
16320 }
16321 if (_json.containsKey("videoReportingId")) {
16322 videoReportingId = _json["videoReportingId"];
16323 }
16324 }
16325
16326 core.Map toJson() {
16327 var _json = new core.Map();
16328 if (advertiserCustomEventId != null) {
16329 _json["advertiserCustomEventId"] = advertiserCustomEventId;
16330 }
16331 if (advertiserCustomEventName != null) {
16332 _json["advertiserCustomEventName"] = advertiserCustomEventName;
16333 }
16334 if (advertiserCustomEventType != null) {
16335 _json["advertiserCustomEventType"] = advertiserCustomEventType;
16336 }
16337 if (artworkLabel != null) {
16338 _json["artworkLabel"] = artworkLabel;
16339 }
16340 if (artworkType != null) {
16341 _json["artworkType"] = artworkType;
16342 }
16343 if (exitUrl != null) {
16344 _json["exitUrl"] = exitUrl;
16345 }
16346 if (id != null) {
16347 _json["id"] = id;
16348 }
16349 if (popupWindowProperties != null) {
16350 _json["popupWindowProperties"] = (popupWindowProperties).toJson();
16351 }
16352 if (targetType != null) {
16353 _json["targetType"] = targetType;
16354 }
16355 if (videoReportingId != null) {
16356 _json["videoReportingId"] = videoReportingId;
16357 }
16358 return _json;
16359 }
16360 }
16361
16362 /** Contains properties of a creative field. */
16363 class CreativeField {
16364 /**
16365 * Account ID of this creative field. This is a read-only field that can be
16366 * left blank.
16367 */
16368 core.String accountId;
16369 /**
16370 * Advertiser ID of this creative field. This is a required field on
16371 * insertion.
16372 */
16373 core.String advertiserId;
16374 /**
16375 * Dimension value for the ID of the advertiser. This is a read-only,
16376 * auto-generated field.
16377 */
16378 DimensionValue advertiserIdDimensionValue;
16379 /** ID of this creative field. This is a read-only, auto-generated field. */
16380 core.String id;
16381 /**
16382 * Identifies what kind of resource this is. Value: the fixed string
16383 * "dfareporting#creativeField".
16384 */
16385 core.String kind;
16386 /**
16387 * Name of this creative field. This is a required field and must be less than
16388 * 256 characters long and unique among creative fields of the same
16389 * advertiser.
16390 */
16391 core.String name;
16392 /**
16393 * Subaccount ID of this creative field. This is a read-only field that can be
16394 * left blank.
16395 */
16396 core.String subaccountId;
16397
16398 CreativeField();
16399
16400 CreativeField.fromJson(core.Map _json) {
16401 if (_json.containsKey("accountId")) {
16402 accountId = _json["accountId"];
16403 }
16404 if (_json.containsKey("advertiserId")) {
16405 advertiserId = _json["advertiserId"];
16406 }
16407 if (_json.containsKey("advertiserIdDimensionValue")) {
16408 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
16409 }
16410 if (_json.containsKey("id")) {
16411 id = _json["id"];
16412 }
16413 if (_json.containsKey("kind")) {
16414 kind = _json["kind"];
16415 }
16416 if (_json.containsKey("name")) {
16417 name = _json["name"];
16418 }
16419 if (_json.containsKey("subaccountId")) {
16420 subaccountId = _json["subaccountId"];
16421 }
16422 }
16423
16424 core.Map toJson() {
16425 var _json = new core.Map();
16426 if (accountId != null) {
16427 _json["accountId"] = accountId;
16428 }
16429 if (advertiserId != null) {
16430 _json["advertiserId"] = advertiserId;
16431 }
16432 if (advertiserIdDimensionValue != null) {
16433 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
16434 }
16435 if (id != null) {
16436 _json["id"] = id;
16437 }
16438 if (kind != null) {
16439 _json["kind"] = kind;
16440 }
16441 if (name != null) {
16442 _json["name"] = name;
16443 }
16444 if (subaccountId != null) {
16445 _json["subaccountId"] = subaccountId;
16446 }
16447 return _json;
16448 }
16449 }
16450
16451 /** Creative Field Assignment. */
16452 class CreativeFieldAssignment {
16453 /** ID of the creative field. */
16454 core.String creativeFieldId;
16455 /** ID of the creative field value. */
16456 core.String creativeFieldValueId;
16457
16458 CreativeFieldAssignment();
16459
16460 CreativeFieldAssignment.fromJson(core.Map _json) {
16461 if (_json.containsKey("creativeFieldId")) {
16462 creativeFieldId = _json["creativeFieldId"];
16463 }
16464 if (_json.containsKey("creativeFieldValueId")) {
16465 creativeFieldValueId = _json["creativeFieldValueId"];
16466 }
16467 }
16468
16469 core.Map toJson() {
16470 var _json = new core.Map();
16471 if (creativeFieldId != null) {
16472 _json["creativeFieldId"] = creativeFieldId;
16473 }
16474 if (creativeFieldValueId != null) {
16475 _json["creativeFieldValueId"] = creativeFieldValueId;
16476 }
16477 return _json;
16478 }
16479 }
16480
16481 /** Contains properties of a creative field value. */
16482 class CreativeFieldValue {
16483 /**
16484 * ID of this creative field value. This is a read-only, auto-generated field.
16485 */
16486 core.String id;
16487 /**
16488 * Identifies what kind of resource this is. Value: the fixed string
16489 * "dfareporting#creativeFieldValue".
16490 */
16491 core.String kind;
16492 /**
16493 * Value of this creative field value. It needs to be less than 256 characters
16494 * in length and unique per creative field.
16495 */
16496 core.String value;
16497
16498 CreativeFieldValue();
16499
16500 CreativeFieldValue.fromJson(core.Map _json) {
16501 if (_json.containsKey("id")) {
16502 id = _json["id"];
16503 }
16504 if (_json.containsKey("kind")) {
16505 kind = _json["kind"];
16506 }
16507 if (_json.containsKey("value")) {
16508 value = _json["value"];
16509 }
16510 }
16511
16512 core.Map toJson() {
16513 var _json = new core.Map();
16514 if (id != null) {
16515 _json["id"] = id;
16516 }
16517 if (kind != null) {
16518 _json["kind"] = kind;
16519 }
16520 if (value != null) {
16521 _json["value"] = value;
16522 }
16523 return _json;
16524 }
16525 }
16526
16527 /** Creative Field Value List Response */
16528 class CreativeFieldValuesListResponse {
16529 /** Creative field value collection. */
16530 core.List<CreativeFieldValue> creativeFieldValues;
16531 /**
16532 * Identifies what kind of resource this is. Value: the fixed string
16533 * "dfareporting#creativeFieldValuesListResponse".
16534 */
16535 core.String kind;
16536 /** Pagination token to be used for the next list operation. */
16537 core.String nextPageToken;
16538
16539 CreativeFieldValuesListResponse();
16540
16541 CreativeFieldValuesListResponse.fromJson(core.Map _json) {
16542 if (_json.containsKey("creativeFieldValues")) {
16543 creativeFieldValues = _json["creativeFieldValues"].map((value) => new Crea tiveFieldValue.fromJson(value)).toList();
16544 }
16545 if (_json.containsKey("kind")) {
16546 kind = _json["kind"];
16547 }
16548 if (_json.containsKey("nextPageToken")) {
16549 nextPageToken = _json["nextPageToken"];
16550 }
16551 }
16552
16553 core.Map toJson() {
16554 var _json = new core.Map();
16555 if (creativeFieldValues != null) {
16556 _json["creativeFieldValues"] = creativeFieldValues.map((value) => (value). toJson()).toList();
16557 }
16558 if (kind != null) {
16559 _json["kind"] = kind;
16560 }
16561 if (nextPageToken != null) {
16562 _json["nextPageToken"] = nextPageToken;
16563 }
16564 return _json;
16565 }
16566 }
16567
16568 /** Creative Field List Response */
16569 class CreativeFieldsListResponse {
16570 /** Creative field collection. */
16571 core.List<CreativeField> creativeFields;
16572 /**
16573 * Identifies what kind of resource this is. Value: the fixed string
16574 * "dfareporting#creativeFieldsListResponse".
16575 */
16576 core.String kind;
16577 /** Pagination token to be used for the next list operation. */
16578 core.String nextPageToken;
16579
16580 CreativeFieldsListResponse();
16581
16582 CreativeFieldsListResponse.fromJson(core.Map _json) {
16583 if (_json.containsKey("creativeFields")) {
16584 creativeFields = _json["creativeFields"].map((value) => new CreativeField. fromJson(value)).toList();
16585 }
16586 if (_json.containsKey("kind")) {
16587 kind = _json["kind"];
16588 }
16589 if (_json.containsKey("nextPageToken")) {
16590 nextPageToken = _json["nextPageToken"];
16591 }
16592 }
16593
16594 core.Map toJson() {
16595 var _json = new core.Map();
16596 if (creativeFields != null) {
16597 _json["creativeFields"] = creativeFields.map((value) => (value).toJson()). toList();
16598 }
16599 if (kind != null) {
16600 _json["kind"] = kind;
16601 }
16602 if (nextPageToken != null) {
16603 _json["nextPageToken"] = nextPageToken;
16604 }
16605 return _json;
16606 }
16607 }
16608
16609 /** Contains properties of a creative group. */
16610 class CreativeGroup {
16611 /**
16612 * Account ID of this creative group. This is a read-only field that can be
16613 * left blank.
16614 */
16615 core.String accountId;
16616 /**
16617 * Advertiser ID of this creative group. This is a required field on
16618 * insertion.
16619 */
16620 core.String advertiserId;
16621 /**
16622 * Dimension value for the ID of the advertiser. This is a read-only,
16623 * auto-generated field.
16624 */
16625 DimensionValue advertiserIdDimensionValue;
16626 /**
16627 * Subgroup of the creative group. Assign your creative groups to one of the
16628 * following subgroups in order to filter or manage them more easily. This
16629 * field is required on insertion and is read-only after insertion.
16630 * Acceptable values are:
16631 * - 1
16632 * - 2
16633 */
16634 core.int groupNumber;
16635 /** ID of this creative group. This is a read-only, auto-generated field. */
16636 core.String id;
16637 /**
16638 * Identifies what kind of resource this is. Value: the fixed string
16639 * "dfareporting#creativeGroup".
16640 */
16641 core.String kind;
16642 /**
16643 * Name of this creative group. This is a required field and must be less than
16644 * 256 characters long and unique among creative groups of the same
16645 * advertiser.
16646 */
16647 core.String name;
16648 /**
16649 * Subaccount ID of this creative group. This is a read-only field that can be
16650 * left blank.
16651 */
16652 core.String subaccountId;
16653
16654 CreativeGroup();
16655
16656 CreativeGroup.fromJson(core.Map _json) {
16657 if (_json.containsKey("accountId")) {
16658 accountId = _json["accountId"];
16659 }
16660 if (_json.containsKey("advertiserId")) {
16661 advertiserId = _json["advertiserId"];
16662 }
16663 if (_json.containsKey("advertiserIdDimensionValue")) {
16664 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
16665 }
16666 if (_json.containsKey("groupNumber")) {
16667 groupNumber = _json["groupNumber"];
16668 }
16669 if (_json.containsKey("id")) {
16670 id = _json["id"];
16671 }
16672 if (_json.containsKey("kind")) {
16673 kind = _json["kind"];
16674 }
16675 if (_json.containsKey("name")) {
16676 name = _json["name"];
16677 }
16678 if (_json.containsKey("subaccountId")) {
16679 subaccountId = _json["subaccountId"];
16680 }
16681 }
16682
16683 core.Map toJson() {
16684 var _json = new core.Map();
16685 if (accountId != null) {
16686 _json["accountId"] = accountId;
16687 }
16688 if (advertiserId != null) {
16689 _json["advertiserId"] = advertiserId;
16690 }
16691 if (advertiserIdDimensionValue != null) {
16692 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
16693 }
16694 if (groupNumber != null) {
16695 _json["groupNumber"] = groupNumber;
16696 }
16697 if (id != null) {
16698 _json["id"] = id;
16699 }
16700 if (kind != null) {
16701 _json["kind"] = kind;
16702 }
16703 if (name != null) {
16704 _json["name"] = name;
16705 }
16706 if (subaccountId != null) {
16707 _json["subaccountId"] = subaccountId;
16708 }
16709 return _json;
16710 }
16711 }
16712
16713 /** Creative Group Assignment. */
16714 class CreativeGroupAssignment {
16715 /** ID of the creative group to be assigned. */
16716 core.String creativeGroupId;
16717 /**
16718 * Creative group number of the creative group assignment.
16719 * Possible string values are:
16720 * - "CREATIVE_GROUP_ONE"
16721 * - "CREATIVE_GROUP_TWO"
16722 */
16723 core.String creativeGroupNumber;
16724
16725 CreativeGroupAssignment();
16726
16727 CreativeGroupAssignment.fromJson(core.Map _json) {
16728 if (_json.containsKey("creativeGroupId")) {
16729 creativeGroupId = _json["creativeGroupId"];
16730 }
16731 if (_json.containsKey("creativeGroupNumber")) {
16732 creativeGroupNumber = _json["creativeGroupNumber"];
16733 }
16734 }
16735
16736 core.Map toJson() {
16737 var _json = new core.Map();
16738 if (creativeGroupId != null) {
16739 _json["creativeGroupId"] = creativeGroupId;
16740 }
16741 if (creativeGroupNumber != null) {
16742 _json["creativeGroupNumber"] = creativeGroupNumber;
16743 }
16744 return _json;
16745 }
16746 }
16747
16748 /** Creative Group List Response */
16749 class CreativeGroupsListResponse {
16750 /** Creative group collection. */
16751 core.List<CreativeGroup> creativeGroups;
16752 /**
16753 * Identifies what kind of resource this is. Value: the fixed string
16754 * "dfareporting#creativeGroupsListResponse".
16755 */
16756 core.String kind;
16757 /** Pagination token to be used for the next list operation. */
16758 core.String nextPageToken;
16759
16760 CreativeGroupsListResponse();
16761
16762 CreativeGroupsListResponse.fromJson(core.Map _json) {
16763 if (_json.containsKey("creativeGroups")) {
16764 creativeGroups = _json["creativeGroups"].map((value) => new CreativeGroup. fromJson(value)).toList();
16765 }
16766 if (_json.containsKey("kind")) {
16767 kind = _json["kind"];
16768 }
16769 if (_json.containsKey("nextPageToken")) {
16770 nextPageToken = _json["nextPageToken"];
16771 }
16772 }
16773
16774 core.Map toJson() {
16775 var _json = new core.Map();
16776 if (creativeGroups != null) {
16777 _json["creativeGroups"] = creativeGroups.map((value) => (value).toJson()). toList();
16778 }
16779 if (kind != null) {
16780 _json["kind"] = kind;
16781 }
16782 if (nextPageToken != null) {
16783 _json["nextPageToken"] = nextPageToken;
16784 }
16785 return _json;
16786 }
16787 }
16788
16789 /** Creative optimization settings. */
16790 class CreativeOptimizationConfiguration {
16791 /**
16792 * ID of this creative optimization config. This field is auto-generated when
16793 * the campaign is inserted or updated. It can be null for existing campaigns.
16794 */
16795 core.String id;
16796 /**
16797 * Name of this creative optimization config. This is a required field and
16798 * must be less than 129 characters long.
16799 */
16800 core.String name;
16801 /** List of optimization activities associated with this configuration. */
16802 core.List<OptimizationActivity> optimizationActivitys;
16803 /**
16804 * Optimization model for this configuration.
16805 * Possible string values are:
16806 * - "CLICK"
16807 * - "POST_CLICK"
16808 * - "POST_CLICK_AND_IMPRESSION"
16809 * - "POST_IMPRESSION"
16810 * - "VIDEO_COMPLETION"
16811 */
16812 core.String optimizationModel;
16813
16814 CreativeOptimizationConfiguration();
16815
16816 CreativeOptimizationConfiguration.fromJson(core.Map _json) {
16817 if (_json.containsKey("id")) {
16818 id = _json["id"];
16819 }
16820 if (_json.containsKey("name")) {
16821 name = _json["name"];
16822 }
16823 if (_json.containsKey("optimizationActivitys")) {
16824 optimizationActivitys = _json["optimizationActivitys"].map((value) => new OptimizationActivity.fromJson(value)).toList();
16825 }
16826 if (_json.containsKey("optimizationModel")) {
16827 optimizationModel = _json["optimizationModel"];
16828 }
16829 }
16830
16831 core.Map toJson() {
16832 var _json = new core.Map();
16833 if (id != null) {
16834 _json["id"] = id;
16835 }
16836 if (name != null) {
16837 _json["name"] = name;
16838 }
16839 if (optimizationActivitys != null) {
16840 _json["optimizationActivitys"] = optimizationActivitys.map((value) => (val ue).toJson()).toList();
16841 }
16842 if (optimizationModel != null) {
16843 _json["optimizationModel"] = optimizationModel;
16844 }
16845 return _json;
16846 }
16847 }
16848
16849 /** Creative Rotation. */
16850 class CreativeRotation {
16851 /** Creative assignments in this creative rotation. */
16852 core.List<CreativeAssignment> creativeAssignments;
16853 /**
16854 * Creative optimization configuration that is used by this ad. It should
16855 * refer to one of the existing optimization configurations in the ad's
16856 * campaign. If it is unset or set to 0, then the campaign's default
16857 * optimization configuration will be used for this ad.
16858 */
16859 core.String creativeOptimizationConfigurationId;
16860 /**
16861 * Type of creative rotation. Can be used to specify whether to use sequential
16862 * or random rotation.
16863 * Possible string values are:
16864 * - "CREATIVE_ROTATION_TYPE_RANDOM"
16865 * - "CREATIVE_ROTATION_TYPE_SEQUENTIAL"
16866 */
16867 core.String type;
16868 /**
16869 * Strategy for calculating weights. Used with CREATIVE_ROTATION_TYPE_RANDOM.
16870 * Possible string values are:
16871 * - "WEIGHT_STRATEGY_CUSTOM"
16872 * - "WEIGHT_STRATEGY_EQUAL"
16873 * - "WEIGHT_STRATEGY_HIGHEST_CTR"
16874 * - "WEIGHT_STRATEGY_OPTIMIZED"
16875 */
16876 core.String weightCalculationStrategy;
16877
16878 CreativeRotation();
16879
16880 CreativeRotation.fromJson(core.Map _json) {
16881 if (_json.containsKey("creativeAssignments")) {
16882 creativeAssignments = _json["creativeAssignments"].map((value) => new Crea tiveAssignment.fromJson(value)).toList();
16883 }
16884 if (_json.containsKey("creativeOptimizationConfigurationId")) {
16885 creativeOptimizationConfigurationId = _json["creativeOptimizationConfigura tionId"];
16886 }
16887 if (_json.containsKey("type")) {
16888 type = _json["type"];
16889 }
16890 if (_json.containsKey("weightCalculationStrategy")) {
16891 weightCalculationStrategy = _json["weightCalculationStrategy"];
16892 }
16893 }
16894
16895 core.Map toJson() {
16896 var _json = new core.Map();
16897 if (creativeAssignments != null) {
16898 _json["creativeAssignments"] = creativeAssignments.map((value) => (value). toJson()).toList();
16899 }
16900 if (creativeOptimizationConfigurationId != null) {
16901 _json["creativeOptimizationConfigurationId"] = creativeOptimizationConfigu rationId;
16902 }
16903 if (type != null) {
16904 _json["type"] = type;
16905 }
16906 if (weightCalculationStrategy != null) {
16907 _json["weightCalculationStrategy"] = weightCalculationStrategy;
16908 }
16909 return _json;
16910 }
16911 }
16912
16913 /** Creative Settings */
16914 class CreativeSettings {
16915 /**
16916 * Header text for iFrames for this site. Must be less than or equal to 2000
16917 * characters long.
16918 */
16919 core.String iFrameFooter;
16920 /**
16921 * Header text for iFrames for this site. Must be less than or equal to 2000
16922 * characters long.
16923 */
16924 core.String iFrameHeader;
16925
16926 CreativeSettings();
16927
16928 CreativeSettings.fromJson(core.Map _json) {
16929 if (_json.containsKey("iFrameFooter")) {
16930 iFrameFooter = _json["iFrameFooter"];
16931 }
16932 if (_json.containsKey("iFrameHeader")) {
16933 iFrameHeader = _json["iFrameHeader"];
16934 }
16935 }
16936
16937 core.Map toJson() {
16938 var _json = new core.Map();
16939 if (iFrameFooter != null) {
16940 _json["iFrameFooter"] = iFrameFooter;
16941 }
16942 if (iFrameHeader != null) {
16943 _json["iFrameHeader"] = iFrameHeader;
16944 }
16945 return _json;
16946 }
16947 }
16948
16949 /** Creative List Response */
16950 class CreativesListResponse {
16951 /** Creative collection. */
16952 core.List<Creative> creatives;
16953 /**
16954 * Identifies what kind of resource this is. Value: the fixed string
16955 * "dfareporting#creativesListResponse".
16956 */
16957 core.String kind;
16958 /** Pagination token to be used for the next list operation. */
16959 core.String nextPageToken;
16960
16961 CreativesListResponse();
16962
16963 CreativesListResponse.fromJson(core.Map _json) {
16964 if (_json.containsKey("creatives")) {
16965 creatives = _json["creatives"].map((value) => new Creative.fromJson(value) ).toList();
16966 }
16967 if (_json.containsKey("kind")) {
16968 kind = _json["kind"];
16969 }
16970 if (_json.containsKey("nextPageToken")) {
16971 nextPageToken = _json["nextPageToken"];
16972 }
16973 }
16974
16975 core.Map toJson() {
16976 var _json = new core.Map();
16977 if (creatives != null) {
16978 _json["creatives"] = creatives.map((value) => (value).toJson()).toList();
16979 }
16980 if (kind != null) {
16981 _json["kind"] = kind;
16982 }
16983 if (nextPageToken != null) {
16984 _json["nextPageToken"] = nextPageToken;
16985 }
16986 return _json;
16987 }
16988 }
16989
16990 /**
16991 * Represents fields that are compatible to be selected for a report of type
16992 * "CROSS_DIMENSION_REACH".
16993 */
16994 class CrossDimensionReachReportCompatibleFields {
16995 /**
16996 * Dimensions which are compatible to be selected in the "breakdown" section
16997 * of the report.
16998 */
16999 core.List<Dimension> breakdown;
17000 /**
17001 * Dimensions which are compatible to be selected in the "dimensionFilters"
17002 * section of the report.
17003 */
17004 core.List<Dimension> dimensionFilters;
17005 /**
17006 * The kind of resource this is, in this case
17007 * dfareporting#crossDimensionReachReportCompatibleFields.
17008 */
17009 core.String kind;
17010 /**
17011 * Metrics which are compatible to be selected in the "metricNames" section of
17012 * the report.
17013 */
17014 core.List<Metric> metrics;
17015 /**
17016 * Metrics which are compatible to be selected in the "overlapMetricNames"
17017 * section of the report.
17018 */
17019 core.List<Metric> overlapMetrics;
17020
17021 CrossDimensionReachReportCompatibleFields();
17022
17023 CrossDimensionReachReportCompatibleFields.fromJson(core.Map _json) {
17024 if (_json.containsKey("breakdown")) {
17025 breakdown = _json["breakdown"].map((value) => new Dimension.fromJson(value )).toList();
17026 }
17027 if (_json.containsKey("dimensionFilters")) {
17028 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension. fromJson(value)).toList();
17029 }
17030 if (_json.containsKey("kind")) {
17031 kind = _json["kind"];
17032 }
17033 if (_json.containsKey("metrics")) {
17034 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi st();
17035 }
17036 if (_json.containsKey("overlapMetrics")) {
17037 overlapMetrics = _json["overlapMetrics"].map((value) => new Metric.fromJso n(value)).toList();
17038 }
17039 }
17040
17041 core.Map toJson() {
17042 var _json = new core.Map();
17043 if (breakdown != null) {
17044 _json["breakdown"] = breakdown.map((value) => (value).toJson()).toList();
17045 }
17046 if (dimensionFilters != null) {
17047 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson ()).toList();
17048 }
17049 if (kind != null) {
17050 _json["kind"] = kind;
17051 }
17052 if (metrics != null) {
17053 _json["metrics"] = metrics.map((value) => (value).toJson()).toList();
17054 }
17055 if (overlapMetrics != null) {
17056 _json["overlapMetrics"] = overlapMetrics.map((value) => (value).toJson()). toList();
17057 }
17058 return _json;
17059 }
17060 }
17061
17062 /** Represents a Custom Rich Media Events group. */
17063 class CustomRichMediaEvents {
17064 /**
17065 * List of custom rich media event IDs. Dimension values must be all of type
17066 * dfa:richMediaEventTypeIdAndName.
17067 */
17068 core.List<DimensionValue> filteredEventIds;
17069 /**
17070 * The kind of resource this is, in this case
17071 * dfareporting#customRichMediaEvents.
17072 */
17073 core.String kind;
17074
17075 CustomRichMediaEvents();
17076
17077 CustomRichMediaEvents.fromJson(core.Map _json) {
17078 if (_json.containsKey("filteredEventIds")) {
17079 filteredEventIds = _json["filteredEventIds"].map((value) => new DimensionV alue.fromJson(value)).toList();
17080 }
17081 if (_json.containsKey("kind")) {
17082 kind = _json["kind"];
17083 }
17084 }
17085
17086 core.Map toJson() {
17087 var _json = new core.Map();
17088 if (filteredEventIds != null) {
17089 _json["filteredEventIds"] = filteredEventIds.map((value) => (value).toJson ()).toList();
17090 }
17091 if (kind != null) {
17092 _json["kind"] = kind;
17093 }
17094 return _json;
17095 }
17096 }
17097
17098 /** Represents a date range. */
17099 class DateRange {
17100 /**
17101 * The end date of the date range, inclusive. A string of the format:
17102 * "yyyy-MM-dd".
17103 */
17104 core.DateTime endDate;
17105 /** The kind of resource this is, in this case dfareporting#dateRange. */
17106 core.String kind;
17107 /**
17108 * The date range relative to the date of when the report is run.
17109 * Possible string values are:
17110 * - "LAST_24_MONTHS"
17111 * - "LAST_30_DAYS"
17112 * - "LAST_365_DAYS"
17113 * - "LAST_7_DAYS"
17114 * - "LAST_90_DAYS"
17115 * - "MONTH_TO_DATE"
17116 * - "PREVIOUS_MONTH"
17117 * - "PREVIOUS_QUARTER"
17118 * - "PREVIOUS_WEEK"
17119 * - "PREVIOUS_YEAR"
17120 * - "QUARTER_TO_DATE"
17121 * - "TODAY"
17122 * - "WEEK_TO_DATE"
17123 * - "YEAR_TO_DATE"
17124 * - "YESTERDAY"
17125 */
17126 core.String relativeDateRange;
17127 /**
17128 * The start date of the date range, inclusive. A string of the format:
17129 * "yyyy-MM-dd".
17130 */
17131 core.DateTime startDate;
17132
17133 DateRange();
17134
17135 DateRange.fromJson(core.Map _json) {
17136 if (_json.containsKey("endDate")) {
17137 endDate = core.DateTime.parse(_json["endDate"]);
17138 }
17139 if (_json.containsKey("kind")) {
17140 kind = _json["kind"];
17141 }
17142 if (_json.containsKey("relativeDateRange")) {
17143 relativeDateRange = _json["relativeDateRange"];
17144 }
17145 if (_json.containsKey("startDate")) {
17146 startDate = core.DateTime.parse(_json["startDate"]);
17147 }
17148 }
17149
17150 core.Map toJson() {
17151 var _json = new core.Map();
17152 if (endDate != null) {
17153 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')} ";
17154 }
17155 if (kind != null) {
17156 _json["kind"] = kind;
17157 }
17158 if (relativeDateRange != null) {
17159 _json["relativeDateRange"] = relativeDateRange;
17160 }
17161 if (startDate != null) {
17162 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft( 2, '0')}";
17163 }
17164 return _json;
17165 }
17166 }
17167
17168 /** Day Part Targeting. */
17169 class DayPartTargeting {
17170 /**
17171 * Days of the week when the ad will serve.
17172 *
17173 * Acceptable values are:
17174 * - "SUNDAY"
17175 * - "MONDAY"
17176 * - "TUESDAY"
17177 * - "WEDNESDAY"
17178 * - "THURSDAY"
17179 * - "FRIDAY"
17180 * - "SATURDAY"
17181 */
17182 core.List<core.String> daysOfWeek;
17183 /**
17184 * Hours of the day when the ad will serve. Must be an integer between 0 and
17185 * 23 (inclusive), where 0 is midnight to 1 AM, and 23 is 11 PM to midnight.
17186 * Can be specified with days of week, in which case the ad would serve during
17187 * these hours on the specified days. For example, if Monday, Wednesday,
17188 * Friday are the days of week specified and 9-10am, 3-5pm (hours 9, 15, and
17189 * 16) is specified, the ad would serve Monday, Wednesdays, and Fridays at
17190 * 9-10am and 3-5pm.
17191 */
17192 core.List<core.int> hoursOfDay;
17193 /**
17194 * Whether or not to use the user's local time. If false, the America/New York
17195 * time zone applies.
17196 */
17197 core.bool userLocalTime;
17198
17199 DayPartTargeting();
17200
17201 DayPartTargeting.fromJson(core.Map _json) {
17202 if (_json.containsKey("daysOfWeek")) {
17203 daysOfWeek = _json["daysOfWeek"];
17204 }
17205 if (_json.containsKey("hoursOfDay")) {
17206 hoursOfDay = _json["hoursOfDay"];
17207 }
17208 if (_json.containsKey("userLocalTime")) {
17209 userLocalTime = _json["userLocalTime"];
17210 }
17211 }
17212
17213 core.Map toJson() {
17214 var _json = new core.Map();
17215 if (daysOfWeek != null) {
17216 _json["daysOfWeek"] = daysOfWeek;
17217 }
17218 if (hoursOfDay != null) {
17219 _json["hoursOfDay"] = hoursOfDay;
17220 }
17221 if (userLocalTime != null) {
17222 _json["userLocalTime"] = userLocalTime;
17223 }
17224 return _json;
17225 }
17226 }
17227
17228 /**
17229 * Properties of inheriting and overriding the default click-through event tag.
17230 * A campaign may override the event tag defined at the advertiser level, and an
17231 * ad may also override the campaign's setting further.
17232 */
17233 class DefaultClickThroughEventTagProperties {
17234 /**
17235 * ID of the click-through event tag to apply to all ads in this entity's
17236 * scope.
17237 */
17238 core.String defaultClickThroughEventTagId;
17239 /**
17240 * Whether this entity should override the inherited default click-through
17241 * event tag with its own defined value.
17242 */
17243 core.bool overrideInheritedEventTag;
17244
17245 DefaultClickThroughEventTagProperties();
17246
17247 DefaultClickThroughEventTagProperties.fromJson(core.Map _json) {
17248 if (_json.containsKey("defaultClickThroughEventTagId")) {
17249 defaultClickThroughEventTagId = _json["defaultClickThroughEventTagId"];
17250 }
17251 if (_json.containsKey("overrideInheritedEventTag")) {
17252 overrideInheritedEventTag = _json["overrideInheritedEventTag"];
17253 }
17254 }
17255
17256 core.Map toJson() {
17257 var _json = new core.Map();
17258 if (defaultClickThroughEventTagId != null) {
17259 _json["defaultClickThroughEventTagId"] = defaultClickThroughEventTagId;
17260 }
17261 if (overrideInheritedEventTag != null) {
17262 _json["overrideInheritedEventTag"] = overrideInheritedEventTag;
17263 }
17264 return _json;
17265 }
17266 }
17267
17268 /** Delivery Schedule. */
17269 class DeliverySchedule {
17270 /**
17271 * Limit on the number of times an individual user can be served the ad within
17272 * a specified period of time.
17273 */
17274 FrequencyCap frequencyCap;
17275 /**
17276 * Whether or not hard cutoff is enabled. If true, the ad will not serve after
17277 * the end date and time. Otherwise the ad will continue to be served until it
17278 * has reached its delivery goals.
17279 */
17280 core.bool hardCutoff;
17281 /**
17282 * Impression ratio for this ad. This ratio determines how often each ad is
17283 * served relative to the others. For example, if ad A has an impression ratio
17284 * of 1 and ad B has an impression ratio of 3, then DCM will serve ad B three
17285 * times as often as ad A. Must be between 1 and 10.
17286 */
17287 core.String impressionRatio;
17288 /**
17289 * Serving priority of an ad, with respect to other ads. The lower the
17290 * priority number, the greater the priority with which it is served.
17291 * Possible string values are:
17292 * - "AD_PRIORITY_01"
17293 * - "AD_PRIORITY_02"
17294 * - "AD_PRIORITY_03"
17295 * - "AD_PRIORITY_04"
17296 * - "AD_PRIORITY_05"
17297 * - "AD_PRIORITY_06"
17298 * - "AD_PRIORITY_07"
17299 * - "AD_PRIORITY_08"
17300 * - "AD_PRIORITY_09"
17301 * - "AD_PRIORITY_10"
17302 * - "AD_PRIORITY_11"
17303 * - "AD_PRIORITY_12"
17304 * - "AD_PRIORITY_13"
17305 * - "AD_PRIORITY_14"
17306 * - "AD_PRIORITY_15"
17307 * - "AD_PRIORITY_16"
17308 */
17309 core.String priority;
17310
17311 DeliverySchedule();
17312
17313 DeliverySchedule.fromJson(core.Map _json) {
17314 if (_json.containsKey("frequencyCap")) {
17315 frequencyCap = new FrequencyCap.fromJson(_json["frequencyCap"]);
17316 }
17317 if (_json.containsKey("hardCutoff")) {
17318 hardCutoff = _json["hardCutoff"];
17319 }
17320 if (_json.containsKey("impressionRatio")) {
17321 impressionRatio = _json["impressionRatio"];
17322 }
17323 if (_json.containsKey("priority")) {
17324 priority = _json["priority"];
17325 }
17326 }
17327
17328 core.Map toJson() {
17329 var _json = new core.Map();
17330 if (frequencyCap != null) {
17331 _json["frequencyCap"] = (frequencyCap).toJson();
17332 }
17333 if (hardCutoff != null) {
17334 _json["hardCutoff"] = hardCutoff;
17335 }
17336 if (impressionRatio != null) {
17337 _json["impressionRatio"] = impressionRatio;
17338 }
17339 if (priority != null) {
17340 _json["priority"] = priority;
17341 }
17342 return _json;
17343 }
17344 }
17345
17346 /** DFP Settings */
17347 class DfpSettings {
17348 /** DFP network code for this directory site. */
17349 core.String dfpNetworkCode;
17350 /** DFP network name for this directory site. */
17351 core.String dfpNetworkName;
17352 /** Whether this directory site accepts programmatic placements. */
17353 core.bool programmaticPlacementAccepted;
17354 /** Whether this directory site accepts publisher-paid tags. */
17355 core.bool pubPaidPlacementAccepted;
17356 /**
17357 * Whether this directory site is available only via DoubleClick Publisher
17358 * Portal.
17359 */
17360 core.bool publisherPortalOnly;
17361
17362 DfpSettings();
17363
17364 DfpSettings.fromJson(core.Map _json) {
17365 if (_json.containsKey("dfp_network_code")) {
17366 dfpNetworkCode = _json["dfp_network_code"];
17367 }
17368 if (_json.containsKey("dfp_network_name")) {
17369 dfpNetworkName = _json["dfp_network_name"];
17370 }
17371 if (_json.containsKey("programmaticPlacementAccepted")) {
17372 programmaticPlacementAccepted = _json["programmaticPlacementAccepted"];
17373 }
17374 if (_json.containsKey("pubPaidPlacementAccepted")) {
17375 pubPaidPlacementAccepted = _json["pubPaidPlacementAccepted"];
17376 }
17377 if (_json.containsKey("publisherPortalOnly")) {
17378 publisherPortalOnly = _json["publisherPortalOnly"];
17379 }
17380 }
17381
17382 core.Map toJson() {
17383 var _json = new core.Map();
17384 if (dfpNetworkCode != null) {
17385 _json["dfp_network_code"] = dfpNetworkCode;
17386 }
17387 if (dfpNetworkName != null) {
17388 _json["dfp_network_name"] = dfpNetworkName;
17389 }
17390 if (programmaticPlacementAccepted != null) {
17391 _json["programmaticPlacementAccepted"] = programmaticPlacementAccepted;
17392 }
17393 if (pubPaidPlacementAccepted != null) {
17394 _json["pubPaidPlacementAccepted"] = pubPaidPlacementAccepted;
17395 }
17396 if (publisherPortalOnly != null) {
17397 _json["publisherPortalOnly"] = publisherPortalOnly;
17398 }
17399 return _json;
17400 }
17401 }
17402
17403 /** Represents a dimension. */
17404 class Dimension {
17405 /** The kind of resource this is, in this case dfareporting#dimension. */
17406 core.String kind;
17407 /** The dimension name, e.g. dfa:advertiser */
17408 core.String name;
17409
17410 Dimension();
17411
17412 Dimension.fromJson(core.Map _json) {
17413 if (_json.containsKey("kind")) {
17414 kind = _json["kind"];
17415 }
17416 if (_json.containsKey("name")) {
17417 name = _json["name"];
17418 }
17419 }
17420
17421 core.Map toJson() {
17422 var _json = new core.Map();
17423 if (kind != null) {
17424 _json["kind"] = kind;
17425 }
17426 if (name != null) {
17427 _json["name"] = name;
17428 }
17429 return _json;
17430 }
17431 }
17432
17433 /** Represents a dimension filter. */
17434 class DimensionFilter {
17435 /** The name of the dimension to filter. */
17436 core.String dimensionName;
17437 /**
17438 * The kind of resource this is, in this case dfareporting#dimensionFilter.
17439 */
17440 core.String kind;
17441 /** The value of the dimension to filter. */
17442 core.String value;
17443
17444 DimensionFilter();
17445
17446 DimensionFilter.fromJson(core.Map _json) {
17447 if (_json.containsKey("dimensionName")) {
17448 dimensionName = _json["dimensionName"];
17449 }
17450 if (_json.containsKey("kind")) {
17451 kind = _json["kind"];
17452 }
17453 if (_json.containsKey("value")) {
17454 value = _json["value"];
17455 }
17456 }
17457
17458 core.Map toJson() {
17459 var _json = new core.Map();
17460 if (dimensionName != null) {
17461 _json["dimensionName"] = dimensionName;
17462 }
17463 if (kind != null) {
17464 _json["kind"] = kind;
17465 }
17466 if (value != null) {
17467 _json["value"] = value;
17468 }
17469 return _json;
17470 }
17471 }
17472
17473 /** Represents a DimensionValue resource. */
17474 class DimensionValue {
17475 /** The name of the dimension. */
17476 core.String dimensionName;
17477 /** The eTag of this response for caching purposes. */
17478 core.String etag;
17479 /** The ID associated with the value if available. */
17480 core.String id;
17481 /**
17482 * The kind of resource this is, in this case dfareporting#dimensionValue.
17483 */
17484 core.String kind;
17485 /**
17486 * Determines how the 'value' field is matched when filtering. If not
17487 * specified, defaults to EXACT. If set to WILDCARD_EXPRESSION, '*' is allowed
17488 * as a placeholder for variable length character sequences, and it can be
17489 * escaped with a backslash. Note, only paid search dimensions
17490 * ('dfa:paidSearch*') allow a matchType other than EXACT.
17491 * Possible string values are:
17492 * - "BEGINS_WITH"
17493 * - "CONTAINS"
17494 * - "EXACT"
17495 * - "WILDCARD_EXPRESSION"
17496 */
17497 core.String matchType;
17498 /** The value of the dimension. */
17499 core.String value;
17500
17501 DimensionValue();
17502
17503 DimensionValue.fromJson(core.Map _json) {
17504 if (_json.containsKey("dimensionName")) {
17505 dimensionName = _json["dimensionName"];
17506 }
17507 if (_json.containsKey("etag")) {
17508 etag = _json["etag"];
17509 }
17510 if (_json.containsKey("id")) {
17511 id = _json["id"];
17512 }
17513 if (_json.containsKey("kind")) {
17514 kind = _json["kind"];
17515 }
17516 if (_json.containsKey("matchType")) {
17517 matchType = _json["matchType"];
17518 }
17519 if (_json.containsKey("value")) {
17520 value = _json["value"];
17521 }
17522 }
17523
17524 core.Map toJson() {
17525 var _json = new core.Map();
17526 if (dimensionName != null) {
17527 _json["dimensionName"] = dimensionName;
17528 }
17529 if (etag != null) {
17530 _json["etag"] = etag;
17531 }
17532 if (id != null) {
17533 _json["id"] = id;
17534 }
17535 if (kind != null) {
17536 _json["kind"] = kind;
17537 }
17538 if (matchType != null) {
17539 _json["matchType"] = matchType;
17540 }
17541 if (value != null) {
17542 _json["value"] = value;
17543 }
17544 return _json;
17545 }
17546 }
17547
17548 /** Represents the list of DimensionValue resources. */
17549 class DimensionValueList {
17550 /** The eTag of this response for caching purposes. */
17551 core.String etag;
17552 /** The dimension values returned in this response. */
17553 core.List<DimensionValue> items;
17554 /**
17555 * The kind of list this is, in this case dfareporting#dimensionValueList.
17556 */
17557 core.String kind;
17558 /**
17559 * Continuation token used to page through dimension values. To retrieve the
17560 * next page of results, set the next request's "pageToken" to the value of
17561 * this field. The page token is only valid for a limited amount of time and
17562 * should not be persisted.
17563 */
17564 core.String nextPageToken;
17565
17566 DimensionValueList();
17567
17568 DimensionValueList.fromJson(core.Map _json) {
17569 if (_json.containsKey("etag")) {
17570 etag = _json["etag"];
17571 }
17572 if (_json.containsKey("items")) {
17573 items = _json["items"].map((value) => new DimensionValue.fromJson(value)). toList();
17574 }
17575 if (_json.containsKey("kind")) {
17576 kind = _json["kind"];
17577 }
17578 if (_json.containsKey("nextPageToken")) {
17579 nextPageToken = _json["nextPageToken"];
17580 }
17581 }
17582
17583 core.Map toJson() {
17584 var _json = new core.Map();
17585 if (etag != null) {
17586 _json["etag"] = etag;
17587 }
17588 if (items != null) {
17589 _json["items"] = items.map((value) => (value).toJson()).toList();
17590 }
17591 if (kind != null) {
17592 _json["kind"] = kind;
17593 }
17594 if (nextPageToken != null) {
17595 _json["nextPageToken"] = nextPageToken;
17596 }
17597 return _json;
17598 }
17599 }
17600
17601 /** Represents a DimensionValuesRequest. */
17602 class DimensionValueRequest {
17603 /** The name of the dimension for which values should be requested. */
17604 core.String dimensionName;
17605 /**
17606 * The end date of the date range for which to retrieve dimension values. A
17607 * string of the format "yyyy-MM-dd".
17608 */
17609 core.DateTime endDate;
17610 /** The list of filters by which to filter values. The filters are ANDed. */
17611 core.List<DimensionFilter> filters;
17612 /**
17613 * The kind of request this is, in this case
17614 * dfareporting#dimensionValueRequest.
17615 */
17616 core.String kind;
17617 /**
17618 * The start date of the date range for which to retrieve dimension values. A
17619 * string of the format "yyyy-MM-dd".
17620 */
17621 core.DateTime startDate;
17622
17623 DimensionValueRequest();
17624
17625 DimensionValueRequest.fromJson(core.Map _json) {
17626 if (_json.containsKey("dimensionName")) {
17627 dimensionName = _json["dimensionName"];
17628 }
17629 if (_json.containsKey("endDate")) {
17630 endDate = core.DateTime.parse(_json["endDate"]);
17631 }
17632 if (_json.containsKey("filters")) {
17633 filters = _json["filters"].map((value) => new DimensionFilter.fromJson(val ue)).toList();
17634 }
17635 if (_json.containsKey("kind")) {
17636 kind = _json["kind"];
17637 }
17638 if (_json.containsKey("startDate")) {
17639 startDate = core.DateTime.parse(_json["startDate"]);
17640 }
17641 }
17642
17643 core.Map toJson() {
17644 var _json = new core.Map();
17645 if (dimensionName != null) {
17646 _json["dimensionName"] = dimensionName;
17647 }
17648 if (endDate != null) {
17649 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')} ";
17650 }
17651 if (filters != null) {
17652 _json["filters"] = filters.map((value) => (value).toJson()).toList();
17653 }
17654 if (kind != null) {
17655 _json["kind"] = kind;
17656 }
17657 if (startDate != null) {
17658 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft( 2, '0')}";
17659 }
17660 return _json;
17661 }
17662 }
17663
17664 /**
17665 * DirectorySites contains properties of a website from the Site Directory.
17666 * Sites need to be added to an account via the Sites resource before they can
17667 * be assigned to a placement.
17668 */
17669 class DirectorySite {
17670 /** Whether this directory site is active. */
17671 core.bool active;
17672 /** Directory site contacts. */
17673 core.List<DirectorySiteContactAssignment> contactAssignments;
17674 /** Country ID of this directory site. */
17675 core.String countryId;
17676 /**
17677 * Currency ID of this directory site.
17678 * Possible values are:
17679 * - "1" for USD
17680 * - "2" for GBP
17681 * - "3" for ESP
17682 * - "4" for SEK
17683 * - "5" for CAD
17684 * - "6" for JPY
17685 * - "7" for DEM
17686 * - "8" for AUD
17687 * - "9" for FRF
17688 * - "10" for ITL
17689 * - "11" for DKK
17690 * - "12" for NOK
17691 * - "13" for FIM
17692 * - "14" for ZAR
17693 * - "15" for IEP
17694 * - "16" for NLG
17695 * - "17" for EUR
17696 * - "18" for KRW
17697 * - "19" for TWD
17698 * - "20" for SGD
17699 * - "21" for CNY
17700 * - "22" for HKD
17701 * - "23" for NZD
17702 * - "24" for MYR
17703 * - "25" for BRL
17704 * - "26" for PTE
17705 * - "27" for MXP
17706 * - "28" for CLP
17707 * - "29" for TRY
17708 * - "30" for ARS
17709 * - "31" for PEN
17710 * - "32" for ILS
17711 * - "33" for CHF
17712 * - "34" for VEF
17713 * - "35" for COP
17714 * - "36" for GTQ
17715 * - "37" for PLN
17716 * - "39" for INR
17717 * - "40" for THB
17718 * - "41" for IDR
17719 * - "42" for CZK
17720 * - "43" for RON
17721 * - "44" for HUF
17722 * - "45" for RUB
17723 * - "46" for AED
17724 * - "47" for BGN
17725 * - "48" for HRK
17726 */
17727 core.String currencyId;
17728 /** Description of this directory site. */
17729 core.String description;
17730 /** ID of this directory site. This is a read-only, auto-generated field. */
17731 core.String id;
17732 /**
17733 * Dimension value for the ID of this directory site. This is a read-only,
17734 * auto-generated field.
17735 */
17736 DimensionValue idDimensionValue;
17737 /**
17738 * Tag types for regular placements.
17739 *
17740 * Acceptable values are:
17741 * - "STANDARD"
17742 * - "IFRAME_JAVASCRIPT_INPAGE"
17743 * - "INTERNAL_REDIRECT_INPAGE"
17744 * - "JAVASCRIPT_INPAGE"
17745 */
17746 core.List<core.String> inpageTagFormats;
17747 /**
17748 * Tag types for interstitial placements.
17749 *
17750 * Acceptable values are:
17751 * - "IFRAME_JAVASCRIPT_INTERSTITIAL"
17752 * - "INTERNAL_REDIRECT_INTERSTITIAL"
17753 * - "JAVASCRIPT_INTERSTITIAL"
17754 */
17755 core.List<core.String> interstitialTagFormats;
17756 /**
17757 * Identifies what kind of resource this is. Value: the fixed string
17758 * "dfareporting#directorySite".
17759 */
17760 core.String kind;
17761 /** Name of this directory site. */
17762 core.String name;
17763 /** Parent directory site ID. */
17764 core.String parentId;
17765 /** Directory site settings. */
17766 DirectorySiteSettings settings;
17767 /** URL of this directory site. */
17768 core.String url;
17769
17770 DirectorySite();
17771
17772 DirectorySite.fromJson(core.Map _json) {
17773 if (_json.containsKey("active")) {
17774 active = _json["active"];
17775 }
17776 if (_json.containsKey("contactAssignments")) {
17777 contactAssignments = _json["contactAssignments"].map((value) => new Direct orySiteContactAssignment.fromJson(value)).toList();
17778 }
17779 if (_json.containsKey("countryId")) {
17780 countryId = _json["countryId"];
17781 }
17782 if (_json.containsKey("currencyId")) {
17783 currencyId = _json["currencyId"];
17784 }
17785 if (_json.containsKey("description")) {
17786 description = _json["description"];
17787 }
17788 if (_json.containsKey("id")) {
17789 id = _json["id"];
17790 }
17791 if (_json.containsKey("idDimensionValue")) {
17792 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
17793 }
17794 if (_json.containsKey("inpageTagFormats")) {
17795 inpageTagFormats = _json["inpageTagFormats"];
17796 }
17797 if (_json.containsKey("interstitialTagFormats")) {
17798 interstitialTagFormats = _json["interstitialTagFormats"];
17799 }
17800 if (_json.containsKey("kind")) {
17801 kind = _json["kind"];
17802 }
17803 if (_json.containsKey("name")) {
17804 name = _json["name"];
17805 }
17806 if (_json.containsKey("parentId")) {
17807 parentId = _json["parentId"];
17808 }
17809 if (_json.containsKey("settings")) {
17810 settings = new DirectorySiteSettings.fromJson(_json["settings"]);
17811 }
17812 if (_json.containsKey("url")) {
17813 url = _json["url"];
17814 }
17815 }
17816
17817 core.Map toJson() {
17818 var _json = new core.Map();
17819 if (active != null) {
17820 _json["active"] = active;
17821 }
17822 if (contactAssignments != null) {
17823 _json["contactAssignments"] = contactAssignments.map((value) => (value).to Json()).toList();
17824 }
17825 if (countryId != null) {
17826 _json["countryId"] = countryId;
17827 }
17828 if (currencyId != null) {
17829 _json["currencyId"] = currencyId;
17830 }
17831 if (description != null) {
17832 _json["description"] = description;
17833 }
17834 if (id != null) {
17835 _json["id"] = id;
17836 }
17837 if (idDimensionValue != null) {
17838 _json["idDimensionValue"] = (idDimensionValue).toJson();
17839 }
17840 if (inpageTagFormats != null) {
17841 _json["inpageTagFormats"] = inpageTagFormats;
17842 }
17843 if (interstitialTagFormats != null) {
17844 _json["interstitialTagFormats"] = interstitialTagFormats;
17845 }
17846 if (kind != null) {
17847 _json["kind"] = kind;
17848 }
17849 if (name != null) {
17850 _json["name"] = name;
17851 }
17852 if (parentId != null) {
17853 _json["parentId"] = parentId;
17854 }
17855 if (settings != null) {
17856 _json["settings"] = (settings).toJson();
17857 }
17858 if (url != null) {
17859 _json["url"] = url;
17860 }
17861 return _json;
17862 }
17863 }
17864
17865 /** Contains properties of a Site Directory contact. */
17866 class DirectorySiteContact {
17867 /** Address of this directory site contact. */
17868 core.String address;
17869 /** Email address of this directory site contact. */
17870 core.String email;
17871 /** First name of this directory site contact. */
17872 core.String firstName;
17873 /**
17874 * ID of this directory site contact. This is a read-only, auto-generated
17875 * field.
17876 */
17877 core.String id;
17878 /**
17879 * Identifies what kind of resource this is. Value: the fixed string
17880 * "dfareporting#directorySiteContact".
17881 */
17882 core.String kind;
17883 /** Last name of this directory site contact. */
17884 core.String lastName;
17885 /** Phone number of this directory site contact. */
17886 core.String phone;
17887 /**
17888 * Directory site contact role.
17889 * Possible string values are:
17890 * - "ADMIN"
17891 * - "EDIT"
17892 * - "VIEW"
17893 */
17894 core.String role;
17895 /** Title or designation of this directory site contact. */
17896 core.String title;
17897 /**
17898 * Directory site contact type.
17899 * Possible string values are:
17900 * - "BILLING"
17901 * - "OTHER"
17902 * - "SALES"
17903 * - "TECHNICAL"
17904 */
17905 core.String type;
17906
17907 DirectorySiteContact();
17908
17909 DirectorySiteContact.fromJson(core.Map _json) {
17910 if (_json.containsKey("address")) {
17911 address = _json["address"];
17912 }
17913 if (_json.containsKey("email")) {
17914 email = _json["email"];
17915 }
17916 if (_json.containsKey("firstName")) {
17917 firstName = _json["firstName"];
17918 }
17919 if (_json.containsKey("id")) {
17920 id = _json["id"];
17921 }
17922 if (_json.containsKey("kind")) {
17923 kind = _json["kind"];
17924 }
17925 if (_json.containsKey("lastName")) {
17926 lastName = _json["lastName"];
17927 }
17928 if (_json.containsKey("phone")) {
17929 phone = _json["phone"];
17930 }
17931 if (_json.containsKey("role")) {
17932 role = _json["role"];
17933 }
17934 if (_json.containsKey("title")) {
17935 title = _json["title"];
17936 }
17937 if (_json.containsKey("type")) {
17938 type = _json["type"];
17939 }
17940 }
17941
17942 core.Map toJson() {
17943 var _json = new core.Map();
17944 if (address != null) {
17945 _json["address"] = address;
17946 }
17947 if (email != null) {
17948 _json["email"] = email;
17949 }
17950 if (firstName != null) {
17951 _json["firstName"] = firstName;
17952 }
17953 if (id != null) {
17954 _json["id"] = id;
17955 }
17956 if (kind != null) {
17957 _json["kind"] = kind;
17958 }
17959 if (lastName != null) {
17960 _json["lastName"] = lastName;
17961 }
17962 if (phone != null) {
17963 _json["phone"] = phone;
17964 }
17965 if (role != null) {
17966 _json["role"] = role;
17967 }
17968 if (title != null) {
17969 _json["title"] = title;
17970 }
17971 if (type != null) {
17972 _json["type"] = type;
17973 }
17974 return _json;
17975 }
17976 }
17977
17978 /** Directory Site Contact Assignment */
17979 class DirectorySiteContactAssignment {
17980 /**
17981 * ID of this directory site contact. This is a read-only, auto-generated
17982 * field.
17983 */
17984 core.String contactId;
17985 /**
17986 * Visibility of this directory site contact assignment. When set to PUBLIC
17987 * this contact assignment is visible to all account and agency users; when
17988 * set to PRIVATE it is visible only to the site.
17989 * Possible string values are:
17990 * - "PRIVATE"
17991 * - "PUBLIC"
17992 */
17993 core.String visibility;
17994
17995 DirectorySiteContactAssignment();
17996
17997 DirectorySiteContactAssignment.fromJson(core.Map _json) {
17998 if (_json.containsKey("contactId")) {
17999 contactId = _json["contactId"];
18000 }
18001 if (_json.containsKey("visibility")) {
18002 visibility = _json["visibility"];
18003 }
18004 }
18005
18006 core.Map toJson() {
18007 var _json = new core.Map();
18008 if (contactId != null) {
18009 _json["contactId"] = contactId;
18010 }
18011 if (visibility != null) {
18012 _json["visibility"] = visibility;
18013 }
18014 return _json;
18015 }
18016 }
18017
18018 /** Directory Site Contact List Response */
18019 class DirectorySiteContactsListResponse {
18020 /** Directory site contact collection */
18021 core.List<DirectorySiteContact> directorySiteContacts;
18022 /**
18023 * Identifies what kind of resource this is. Value: the fixed string
18024 * "dfareporting#directorySiteContactsListResponse".
18025 */
18026 core.String kind;
18027 /** Pagination token to be used for the next list operation. */
18028 core.String nextPageToken;
18029
18030 DirectorySiteContactsListResponse();
18031
18032 DirectorySiteContactsListResponse.fromJson(core.Map _json) {
18033 if (_json.containsKey("directorySiteContacts")) {
18034 directorySiteContacts = _json["directorySiteContacts"].map((value) => new DirectorySiteContact.fromJson(value)).toList();
18035 }
18036 if (_json.containsKey("kind")) {
18037 kind = _json["kind"];
18038 }
18039 if (_json.containsKey("nextPageToken")) {
18040 nextPageToken = _json["nextPageToken"];
18041 }
18042 }
18043
18044 core.Map toJson() {
18045 var _json = new core.Map();
18046 if (directorySiteContacts != null) {
18047 _json["directorySiteContacts"] = directorySiteContacts.map((value) => (val ue).toJson()).toList();
18048 }
18049 if (kind != null) {
18050 _json["kind"] = kind;
18051 }
18052 if (nextPageToken != null) {
18053 _json["nextPageToken"] = nextPageToken;
18054 }
18055 return _json;
18056 }
18057 }
18058
18059 /** Directory Site Settings */
18060 class DirectorySiteSettings {
18061 /** Whether this directory site has disabled active view creatives. */
18062 core.bool activeViewOptOut;
18063 /** Directory site DFP settings. */
18064 DfpSettings dfpSettings;
18065 /** Whether this site accepts in-stream video ads. */
18066 core.bool instreamVideoPlacementAccepted;
18067 /** Whether this site accepts interstitial ads. */
18068 core.bool interstitialPlacementAccepted;
18069 /** Whether this directory site has disabled Nielsen OCR reach ratings. */
18070 core.bool nielsenOcrOptOut;
18071 /**
18072 * Whether this directory site has disabled generation of Verification ins
18073 * tags.
18074 */
18075 core.bool verificationTagOptOut;
18076 /**
18077 * Whether this directory site has disabled active view for in-stream video
18078 * creatives.
18079 */
18080 core.bool videoActiveViewOptOut;
18081
18082 DirectorySiteSettings();
18083
18084 DirectorySiteSettings.fromJson(core.Map _json) {
18085 if (_json.containsKey("activeViewOptOut")) {
18086 activeViewOptOut = _json["activeViewOptOut"];
18087 }
18088 if (_json.containsKey("dfp_settings")) {
18089 dfpSettings = new DfpSettings.fromJson(_json["dfp_settings"]);
18090 }
18091 if (_json.containsKey("instream_video_placement_accepted")) {
18092 instreamVideoPlacementAccepted = _json["instream_video_placement_accepted" ];
18093 }
18094 if (_json.containsKey("interstitialPlacementAccepted")) {
18095 interstitialPlacementAccepted = _json["interstitialPlacementAccepted"];
18096 }
18097 if (_json.containsKey("nielsenOcrOptOut")) {
18098 nielsenOcrOptOut = _json["nielsenOcrOptOut"];
18099 }
18100 if (_json.containsKey("verificationTagOptOut")) {
18101 verificationTagOptOut = _json["verificationTagOptOut"];
18102 }
18103 if (_json.containsKey("videoActiveViewOptOut")) {
18104 videoActiveViewOptOut = _json["videoActiveViewOptOut"];
18105 }
18106 }
18107
18108 core.Map toJson() {
18109 var _json = new core.Map();
18110 if (activeViewOptOut != null) {
18111 _json["activeViewOptOut"] = activeViewOptOut;
18112 }
18113 if (dfpSettings != null) {
18114 _json["dfp_settings"] = (dfpSettings).toJson();
18115 }
18116 if (instreamVideoPlacementAccepted != null) {
18117 _json["instream_video_placement_accepted"] = instreamVideoPlacementAccepte d;
18118 }
18119 if (interstitialPlacementAccepted != null) {
18120 _json["interstitialPlacementAccepted"] = interstitialPlacementAccepted;
18121 }
18122 if (nielsenOcrOptOut != null) {
18123 _json["nielsenOcrOptOut"] = nielsenOcrOptOut;
18124 }
18125 if (verificationTagOptOut != null) {
18126 _json["verificationTagOptOut"] = verificationTagOptOut;
18127 }
18128 if (videoActiveViewOptOut != null) {
18129 _json["videoActiveViewOptOut"] = videoActiveViewOptOut;
18130 }
18131 return _json;
18132 }
18133 }
18134
18135 /** Directory Site List Response */
18136 class DirectorySitesListResponse {
18137 /** Directory site collection. */
18138 core.List<DirectorySite> directorySites;
18139 /**
18140 * Identifies what kind of resource this is. Value: the fixed string
18141 * "dfareporting#directorySitesListResponse".
18142 */
18143 core.String kind;
18144 /** Pagination token to be used for the next list operation. */
18145 core.String nextPageToken;
18146
18147 DirectorySitesListResponse();
18148
18149 DirectorySitesListResponse.fromJson(core.Map _json) {
18150 if (_json.containsKey("directorySites")) {
18151 directorySites = _json["directorySites"].map((value) => new DirectorySite. fromJson(value)).toList();
18152 }
18153 if (_json.containsKey("kind")) {
18154 kind = _json["kind"];
18155 }
18156 if (_json.containsKey("nextPageToken")) {
18157 nextPageToken = _json["nextPageToken"];
18158 }
18159 }
18160
18161 core.Map toJson() {
18162 var _json = new core.Map();
18163 if (directorySites != null) {
18164 _json["directorySites"] = directorySites.map((value) => (value).toJson()). toList();
18165 }
18166 if (kind != null) {
18167 _json["kind"] = kind;
18168 }
18169 if (nextPageToken != null) {
18170 _json["nextPageToken"] = nextPageToken;
18171 }
18172 return _json;
18173 }
18174 }
18175
18176 /** Contains properties of an event tag. */
18177 class EventTag {
18178 /**
18179 * Account ID of this event tag. This is a read-only field that can be left
18180 * blank.
18181 */
18182 core.String accountId;
18183 /**
18184 * Advertiser ID of this event tag. This field or the campaignId field is
18185 * required on insertion.
18186 */
18187 core.String advertiserId;
18188 /**
18189 * Dimension value for the ID of the advertiser. This is a read-only,
18190 * auto-generated field.
18191 */
18192 DimensionValue advertiserIdDimensionValue;
18193 /**
18194 * Campaign ID of this event tag. This field or the advertiserId field is
18195 * required on insertion.
18196 */
18197 core.String campaignId;
18198 /**
18199 * Dimension value for the ID of the campaign. This is a read-only,
18200 * auto-generated field.
18201 */
18202 DimensionValue campaignIdDimensionValue;
18203 /**
18204 * Whether this event tag should be automatically enabled for all of the
18205 * advertiser's campaigns and ads.
18206 */
18207 core.bool enabledByDefault;
18208 /**
18209 * Whether to remove this event tag from ads that are trafficked through
18210 * DoubleClick Bid Manager to Ad Exchange. This may be useful if the event tag
18211 * uses a pixel that is unapproved for Ad Exchange bids on one or more
18212 * networks, such as the Google Display Network.
18213 */
18214 core.bool excludeFromAdxRequests;
18215 /** ID of this event tag. This is a read-only, auto-generated field. */
18216 core.String id;
18217 /**
18218 * Identifies what kind of resource this is. Value: the fixed string
18219 * "dfareporting#eventTag".
18220 */
18221 core.String kind;
18222 /**
18223 * Name of this event tag. This is a required field and must be less than 256
18224 * characters long.
18225 */
18226 core.String name;
18227 /**
18228 * Site filter type for this event tag. If no type is specified then the event
18229 * tag will be applied to all sites.
18230 * Possible string values are:
18231 * - "BLACKLIST"
18232 * - "WHITELIST"
18233 */
18234 core.String siteFilterType;
18235 /**
18236 * Filter list of site IDs associated with this event tag. The siteFilterType
18237 * determines whether this is a whitelist or blacklist filter.
18238 */
18239 core.List<core.String> siteIds;
18240 /** Whether this tag is SSL-compliant or not. This is a read-only field. */
18241 core.bool sslCompliant;
18242 /**
18243 * Status of this event tag. Must be ENABLED for this event tag to fire. This
18244 * is a required field.
18245 * Possible string values are:
18246 * - "DISABLED"
18247 * - "ENABLED"
18248 */
18249 core.String status;
18250 /**
18251 * Subaccount ID of this event tag. This is a read-only field that can be left
18252 * blank.
18253 */
18254 core.String subaccountId;
18255 /**
18256 * Event tag type. Can be used to specify whether to use a third-party pixel,
18257 * a third-party JavaScript URL, or a third-party click-through URL for either
18258 * impression or click tracking. This is a required field.
18259 * Possible string values are:
18260 * - "CLICK_THROUGH_EVENT_TAG"
18261 * - "IMPRESSION_IMAGE_EVENT_TAG"
18262 * - "IMPRESSION_JAVASCRIPT_EVENT_TAG"
18263 */
18264 core.String type;
18265 /**
18266 * Payload URL for this event tag. The URL on a click-through event tag should
18267 * have a landing page URL appended to the end of it. This field is required
18268 * on insertion.
18269 */
18270 core.String url;
18271 /**
18272 * Number of times the landing page URL should be URL-escaped before being
18273 * appended to the click-through event tag URL. Only applies to click-through
18274 * event tags as specified by the event tag type.
18275 */
18276 core.int urlEscapeLevels;
18277
18278 EventTag();
18279
18280 EventTag.fromJson(core.Map _json) {
18281 if (_json.containsKey("accountId")) {
18282 accountId = _json["accountId"];
18283 }
18284 if (_json.containsKey("advertiserId")) {
18285 advertiserId = _json["advertiserId"];
18286 }
18287 if (_json.containsKey("advertiserIdDimensionValue")) {
18288 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
18289 }
18290 if (_json.containsKey("campaignId")) {
18291 campaignId = _json["campaignId"];
18292 }
18293 if (_json.containsKey("campaignIdDimensionValue")) {
18294 campaignIdDimensionValue = new DimensionValue.fromJson(_json["campaignIdDi mensionValue"]);
18295 }
18296 if (_json.containsKey("enabledByDefault")) {
18297 enabledByDefault = _json["enabledByDefault"];
18298 }
18299 if (_json.containsKey("excludeFromAdxRequests")) {
18300 excludeFromAdxRequests = _json["excludeFromAdxRequests"];
18301 }
18302 if (_json.containsKey("id")) {
18303 id = _json["id"];
18304 }
18305 if (_json.containsKey("kind")) {
18306 kind = _json["kind"];
18307 }
18308 if (_json.containsKey("name")) {
18309 name = _json["name"];
18310 }
18311 if (_json.containsKey("siteFilterType")) {
18312 siteFilterType = _json["siteFilterType"];
18313 }
18314 if (_json.containsKey("siteIds")) {
18315 siteIds = _json["siteIds"];
18316 }
18317 if (_json.containsKey("sslCompliant")) {
18318 sslCompliant = _json["sslCompliant"];
18319 }
18320 if (_json.containsKey("status")) {
18321 status = _json["status"];
18322 }
18323 if (_json.containsKey("subaccountId")) {
18324 subaccountId = _json["subaccountId"];
18325 }
18326 if (_json.containsKey("type")) {
18327 type = _json["type"];
18328 }
18329 if (_json.containsKey("url")) {
18330 url = _json["url"];
18331 }
18332 if (_json.containsKey("urlEscapeLevels")) {
18333 urlEscapeLevels = _json["urlEscapeLevels"];
18334 }
18335 }
18336
18337 core.Map toJson() {
18338 var _json = new core.Map();
18339 if (accountId != null) {
18340 _json["accountId"] = accountId;
18341 }
18342 if (advertiserId != null) {
18343 _json["advertiserId"] = advertiserId;
18344 }
18345 if (advertiserIdDimensionValue != null) {
18346 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
18347 }
18348 if (campaignId != null) {
18349 _json["campaignId"] = campaignId;
18350 }
18351 if (campaignIdDimensionValue != null) {
18352 _json["campaignIdDimensionValue"] = (campaignIdDimensionValue).toJson();
18353 }
18354 if (enabledByDefault != null) {
18355 _json["enabledByDefault"] = enabledByDefault;
18356 }
18357 if (excludeFromAdxRequests != null) {
18358 _json["excludeFromAdxRequests"] = excludeFromAdxRequests;
18359 }
18360 if (id != null) {
18361 _json["id"] = id;
18362 }
18363 if (kind != null) {
18364 _json["kind"] = kind;
18365 }
18366 if (name != null) {
18367 _json["name"] = name;
18368 }
18369 if (siteFilterType != null) {
18370 _json["siteFilterType"] = siteFilterType;
18371 }
18372 if (siteIds != null) {
18373 _json["siteIds"] = siteIds;
18374 }
18375 if (sslCompliant != null) {
18376 _json["sslCompliant"] = sslCompliant;
18377 }
18378 if (status != null) {
18379 _json["status"] = status;
18380 }
18381 if (subaccountId != null) {
18382 _json["subaccountId"] = subaccountId;
18383 }
18384 if (type != null) {
18385 _json["type"] = type;
18386 }
18387 if (url != null) {
18388 _json["url"] = url;
18389 }
18390 if (urlEscapeLevels != null) {
18391 _json["urlEscapeLevels"] = urlEscapeLevels;
18392 }
18393 return _json;
18394 }
18395 }
18396
18397 /** Event tag override information. */
18398 class EventTagOverride {
18399 /** Whether this override is enabled. */
18400 core.bool enabled;
18401 /**
18402 * ID of this event tag override. This is a read-only, auto-generated field.
18403 */
18404 core.String id;
18405
18406 EventTagOverride();
18407
18408 EventTagOverride.fromJson(core.Map _json) {
18409 if (_json.containsKey("enabled")) {
18410 enabled = _json["enabled"];
18411 }
18412 if (_json.containsKey("id")) {
18413 id = _json["id"];
18414 }
18415 }
18416
18417 core.Map toJson() {
18418 var _json = new core.Map();
18419 if (enabled != null) {
18420 _json["enabled"] = enabled;
18421 }
18422 if (id != null) {
18423 _json["id"] = id;
18424 }
18425 return _json;
18426 }
18427 }
18428
18429 /** Event Tag List Response */
18430 class EventTagsListResponse {
18431 /** Event tag collection. */
18432 core.List<EventTag> eventTags;
18433 /**
18434 * Identifies what kind of resource this is. Value: the fixed string
18435 * "dfareporting#eventTagsListResponse".
18436 */
18437 core.String kind;
18438
18439 EventTagsListResponse();
18440
18441 EventTagsListResponse.fromJson(core.Map _json) {
18442 if (_json.containsKey("eventTags")) {
18443 eventTags = _json["eventTags"].map((value) => new EventTag.fromJson(value) ).toList();
18444 }
18445 if (_json.containsKey("kind")) {
18446 kind = _json["kind"];
18447 }
18448 }
18449
18450 core.Map toJson() {
18451 var _json = new core.Map();
18452 if (eventTags != null) {
18453 _json["eventTags"] = eventTags.map((value) => (value).toJson()).toList();
18454 }
18455 if (kind != null) {
18456 _json["kind"] = kind;
18457 }
18458 return _json;
18459 }
18460 }
18461
18462 /** The URLs where the completed report file can be downloaded. */
18463 class FileUrls {
18464 /** The URL for downloading the report data through the API. */
18465 core.String apiUrl;
18466 /** The URL for downloading the report data through a browser. */
18467 core.String browserUrl;
18468
18469 FileUrls();
18470
18471 FileUrls.fromJson(core.Map _json) {
18472 if (_json.containsKey("apiUrl")) {
18473 apiUrl = _json["apiUrl"];
18474 }
18475 if (_json.containsKey("browserUrl")) {
18476 browserUrl = _json["browserUrl"];
18477 }
18478 }
18479
18480 core.Map toJson() {
18481 var _json = new core.Map();
18482 if (apiUrl != null) {
18483 _json["apiUrl"] = apiUrl;
18484 }
18485 if (browserUrl != null) {
18486 _json["browserUrl"] = browserUrl;
18487 }
18488 return _json;
18489 }
18490 }
18491
18492 /**
18493 * Represents a File resource. A file contains the metadata for a report run. It
18494 * shows the status of the run and holds the URLs to the generated report data
18495 * if the run is finished and the status is "REPORT_AVAILABLE".
18496 */
18497 class File {
18498 /**
18499 * The date range for which the file has report data. The date range will
18500 * always be the absolute date range for which the report is run.
18501 */
18502 DateRange dateRange;
18503 /** The eTag of this response for caching purposes. */
18504 core.String etag;
18505 /** The filename of the file. */
18506 core.String fileName;
18507 /**
18508 * The output format of the report. Only available once the file is available.
18509 * Possible string values are:
18510 * - "CSV"
18511 * - "EXCEL"
18512 */
18513 core.String format;
18514 /** The unique ID of this report file. */
18515 core.String id;
18516 /** The kind of resource this is, in this case dfareporting#file. */
18517 core.String kind;
18518 /**
18519 * The timestamp in milliseconds since epoch when this file was last modified.
18520 */
18521 core.String lastModifiedTime;
18522 /** The ID of the report this file was generated from. */
18523 core.String reportId;
18524 /**
18525 * The status of the report file.
18526 * Possible string values are:
18527 * - "CANCELLED"
18528 * - "FAILED"
18529 * - "PROCESSING"
18530 * - "REPORT_AVAILABLE"
18531 */
18532 core.String status;
18533 /** The URLs where the completed report file can be downloaded. */
18534 FileUrls urls;
18535
18536 File();
18537
18538 File.fromJson(core.Map _json) {
18539 if (_json.containsKey("dateRange")) {
18540 dateRange = new DateRange.fromJson(_json["dateRange"]);
18541 }
18542 if (_json.containsKey("etag")) {
18543 etag = _json["etag"];
18544 }
18545 if (_json.containsKey("fileName")) {
18546 fileName = _json["fileName"];
18547 }
18548 if (_json.containsKey("format")) {
18549 format = _json["format"];
18550 }
18551 if (_json.containsKey("id")) {
18552 id = _json["id"];
18553 }
18554 if (_json.containsKey("kind")) {
18555 kind = _json["kind"];
18556 }
18557 if (_json.containsKey("lastModifiedTime")) {
18558 lastModifiedTime = _json["lastModifiedTime"];
18559 }
18560 if (_json.containsKey("reportId")) {
18561 reportId = _json["reportId"];
18562 }
18563 if (_json.containsKey("status")) {
18564 status = _json["status"];
18565 }
18566 if (_json.containsKey("urls")) {
18567 urls = new FileUrls.fromJson(_json["urls"]);
18568 }
18569 }
18570
18571 core.Map toJson() {
18572 var _json = new core.Map();
18573 if (dateRange != null) {
18574 _json["dateRange"] = (dateRange).toJson();
18575 }
18576 if (etag != null) {
18577 _json["etag"] = etag;
18578 }
18579 if (fileName != null) {
18580 _json["fileName"] = fileName;
18581 }
18582 if (format != null) {
18583 _json["format"] = format;
18584 }
18585 if (id != null) {
18586 _json["id"] = id;
18587 }
18588 if (kind != null) {
18589 _json["kind"] = kind;
18590 }
18591 if (lastModifiedTime != null) {
18592 _json["lastModifiedTime"] = lastModifiedTime;
18593 }
18594 if (reportId != null) {
18595 _json["reportId"] = reportId;
18596 }
18597 if (status != null) {
18598 _json["status"] = status;
18599 }
18600 if (urls != null) {
18601 _json["urls"] = (urls).toJson();
18602 }
18603 return _json;
18604 }
18605 }
18606
18607 /** Represents the list of File resources. */
18608 class FileList {
18609 /** The eTag of this response for caching purposes. */
18610 core.String etag;
18611 /** The files returned in this response. */
18612 core.List<File> items;
18613 /** The kind of list this is, in this case dfareporting#fileList. */
18614 core.String kind;
18615 /**
18616 * Continuation token used to page through files. To retrieve the next page of
18617 * results, set the next request's "pageToken" to the value of this field. The
18618 * page token is only valid for a limited amount of time and should not be
18619 * persisted.
18620 */
18621 core.String nextPageToken;
18622
18623 FileList();
18624
18625 FileList.fromJson(core.Map _json) {
18626 if (_json.containsKey("etag")) {
18627 etag = _json["etag"];
18628 }
18629 if (_json.containsKey("items")) {
18630 items = _json["items"].map((value) => new File.fromJson(value)).toList();
18631 }
18632 if (_json.containsKey("kind")) {
18633 kind = _json["kind"];
18634 }
18635 if (_json.containsKey("nextPageToken")) {
18636 nextPageToken = _json["nextPageToken"];
18637 }
18638 }
18639
18640 core.Map toJson() {
18641 var _json = new core.Map();
18642 if (etag != null) {
18643 _json["etag"] = etag;
18644 }
18645 if (items != null) {
18646 _json["items"] = items.map((value) => (value).toJson()).toList();
18647 }
18648 if (kind != null) {
18649 _json["kind"] = kind;
18650 }
18651 if (nextPageToken != null) {
18652 _json["nextPageToken"] = nextPageToken;
18653 }
18654 return _json;
18655 }
18656 }
18657
18658 /** Flight */
18659 class Flight {
18660 /** Inventory item flight end date. */
18661 core.DateTime endDate;
18662 /** Rate or cost of this flight. */
18663 core.String rateOrCost;
18664 /** Inventory item flight start date. */
18665 core.DateTime startDate;
18666 /** Units of this flight. */
18667 core.String units;
18668
18669 Flight();
18670
18671 Flight.fromJson(core.Map _json) {
18672 if (_json.containsKey("endDate")) {
18673 endDate = core.DateTime.parse(_json["endDate"]);
18674 }
18675 if (_json.containsKey("rateOrCost")) {
18676 rateOrCost = _json["rateOrCost"];
18677 }
18678 if (_json.containsKey("startDate")) {
18679 startDate = core.DateTime.parse(_json["startDate"]);
18680 }
18681 if (_json.containsKey("units")) {
18682 units = _json["units"];
18683 }
18684 }
18685
18686 core.Map toJson() {
18687 var _json = new core.Map();
18688 if (endDate != null) {
18689 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')} ";
18690 }
18691 if (rateOrCost != null) {
18692 _json["rateOrCost"] = rateOrCost;
18693 }
18694 if (startDate != null) {
18695 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft( 2, '0')}";
18696 }
18697 if (units != null) {
18698 _json["units"] = units;
18699 }
18700 return _json;
18701 }
18702 }
18703
18704 /** Floodlight Activity GenerateTag Response */
18705 class FloodlightActivitiesGenerateTagResponse {
18706 /** Generated tag for this floodlight activity. */
18707 core.String floodlightActivityTag;
18708 /**
18709 * Identifies what kind of resource this is. Value: the fixed string
18710 * "dfareporting#floodlightActivitiesGenerateTagResponse".
18711 */
18712 core.String kind;
18713
18714 FloodlightActivitiesGenerateTagResponse();
18715
18716 FloodlightActivitiesGenerateTagResponse.fromJson(core.Map _json) {
18717 if (_json.containsKey("floodlightActivityTag")) {
18718 floodlightActivityTag = _json["floodlightActivityTag"];
18719 }
18720 if (_json.containsKey("kind")) {
18721 kind = _json["kind"];
18722 }
18723 }
18724
18725 core.Map toJson() {
18726 var _json = new core.Map();
18727 if (floodlightActivityTag != null) {
18728 _json["floodlightActivityTag"] = floodlightActivityTag;
18729 }
18730 if (kind != null) {
18731 _json["kind"] = kind;
18732 }
18733 return _json;
18734 }
18735 }
18736
18737 /** Floodlight Activity List Response */
18738 class FloodlightActivitiesListResponse {
18739 /** Floodlight activity collection. */
18740 core.List<FloodlightActivity> floodlightActivities;
18741 /**
18742 * Identifies what kind of resource this is. Value: the fixed string
18743 * "dfareporting#floodlightActivitiesListResponse".
18744 */
18745 core.String kind;
18746 /** Pagination token to be used for the next list operation. */
18747 core.String nextPageToken;
18748
18749 FloodlightActivitiesListResponse();
18750
18751 FloodlightActivitiesListResponse.fromJson(core.Map _json) {
18752 if (_json.containsKey("floodlightActivities")) {
18753 floodlightActivities = _json["floodlightActivities"].map((value) => new Fl oodlightActivity.fromJson(value)).toList();
18754 }
18755 if (_json.containsKey("kind")) {
18756 kind = _json["kind"];
18757 }
18758 if (_json.containsKey("nextPageToken")) {
18759 nextPageToken = _json["nextPageToken"];
18760 }
18761 }
18762
18763 core.Map toJson() {
18764 var _json = new core.Map();
18765 if (floodlightActivities != null) {
18766 _json["floodlightActivities"] = floodlightActivities.map((value) => (value ).toJson()).toList();
18767 }
18768 if (kind != null) {
18769 _json["kind"] = kind;
18770 }
18771 if (nextPageToken != null) {
18772 _json["nextPageToken"] = nextPageToken;
18773 }
18774 return _json;
18775 }
18776 }
18777
18778 /** Contains properties of a Floodlight activity. */
18779 class FloodlightActivity {
18780 /**
18781 * Account ID of this floodlight activity. This is a read-only field that can
18782 * be left blank.
18783 */
18784 core.String accountId;
18785 /**
18786 * Advertiser ID of this floodlight activity. If this field is left blank, the
18787 * value will be copied over either from the activity group's advertiser or
18788 * the existing activity's advertiser.
18789 */
18790 core.String advertiserId;
18791 /**
18792 * Dimension value for the ID of the advertiser. This is a read-only,
18793 * auto-generated field.
18794 */
18795 DimensionValue advertiserIdDimensionValue;
18796 /**
18797 * Code type used for cache busting in the generated tag.
18798 * Possible string values are:
18799 * - "ACTIVE_SERVER_PAGE"
18800 * - "COLD_FUSION"
18801 * - "JAVASCRIPT"
18802 * - "JSP"
18803 * - "PHP"
18804 */
18805 core.String cacheBustingType;
18806 /**
18807 * Counting method for conversions for this floodlight activity. This is a
18808 * required field.
18809 * Possible string values are:
18810 * - "ITEMS_SOLD_COUNTING"
18811 * - "SESSION_COUNTING"
18812 * - "STANDARD_COUNTING"
18813 * - "TRANSACTIONS_COUNTING"
18814 * - "UNIQUE_COUNTING"
18815 */
18816 core.String countingMethod;
18817 /** Dynamic floodlight tags. */
18818 core.List<FloodlightActivityDynamicTag> defaultTags;
18819 /**
18820 * URL where this tag will be deployed. If specified, must be less than 256
18821 * characters long.
18822 */
18823 core.String expectedUrl;
18824 /**
18825 * Floodlight activity group ID of this floodlight activity. This is a
18826 * required field.
18827 */
18828 core.String floodlightActivityGroupId;
18829 /**
18830 * Name of the associated floodlight activity group. This is a read-only
18831 * field.
18832 */
18833 core.String floodlightActivityGroupName;
18834 /**
18835 * Tag string of the associated floodlight activity group. This is a read-only
18836 * field.
18837 */
18838 core.String floodlightActivityGroupTagString;
18839 /**
18840 * Type of the associated floodlight activity group. This is a read-only
18841 * field.
18842 * Possible string values are:
18843 * - "COUNTER"
18844 * - "SALE"
18845 */
18846 core.String floodlightActivityGroupType;
18847 /**
18848 * Floodlight configuration ID of this floodlight activity. If this field is
18849 * left blank, the value will be copied over either from the activity group's
18850 * floodlight configuration or from the existing activity's floodlight
18851 * configuration.
18852 */
18853 core.String floodlightConfigurationId;
18854 /**
18855 * Dimension value for the ID of the floodlight configuration. This is a
18856 * read-only, auto-generated field.
18857 */
18858 DimensionValue floodlightConfigurationIdDimensionValue;
18859 /** Whether this activity is archived. */
18860 core.bool hidden;
18861 /**
18862 * ID of this floodlight activity. This is a read-only, auto-generated field.
18863 */
18864 core.String id;
18865 /**
18866 * Dimension value for the ID of this floodlight activity. This is a
18867 * read-only, auto-generated field.
18868 */
18869 DimensionValue idDimensionValue;
18870 /** Whether the image tag is enabled for this activity. */
18871 core.bool imageTagEnabled;
18872 /**
18873 * Identifies what kind of resource this is. Value: the fixed string
18874 * "dfareporting#floodlightActivity".
18875 */
18876 core.String kind;
18877 /**
18878 * Name of this floodlight activity. This is a required field. Must be less
18879 * than 129 characters long and cannot contain quotes.
18880 */
18881 core.String name;
18882 /** General notes or implementation instructions for the tag. */
18883 core.String notes;
18884 /** Publisher dynamic floodlight tags. */
18885 core.List<FloodlightActivityPublisherDynamicTag> publisherTags;
18886 /** Whether this tag should use SSL. */
18887 core.bool secure;
18888 /**
18889 * Whether the floodlight activity is SSL-compliant. This is a read-only
18890 * field, its value detected by the system from the floodlight tags.
18891 */
18892 core.bool sslCompliant;
18893 /** Whether this floodlight activity must be SSL-compliant. */
18894 core.bool sslRequired;
18895 /**
18896 * Subaccount ID of this floodlight activity. This is a read-only field that
18897 * can be left blank.
18898 */
18899 core.String subaccountId;
18900 /**
18901 * Tag format type for the floodlight activity. If left blank, the tag format
18902 * will default to HTML.
18903 * Possible string values are:
18904 * - "HTML"
18905 * - "XHTML"
18906 */
18907 core.String tagFormat;
18908 /**
18909 * Value of the cat= paramter in the floodlight tag, which the ad servers use
18910 * to identify the activity. This is optional: if empty, a new tag string will
18911 * be generated for you. This string must be 1 to 8 characters long, with
18912 * valid characters being [a-z][A-Z][0-9][-][ _ ]. This tag string must also
18913 * be unique among activities of the same activity group. This field is
18914 * read-only after insertion.
18915 */
18916 core.String tagString;
18917 /**
18918 * List of the user-defined variables used by this conversion tag. These map
18919 * to the "u[1-20]=" in the tags. Each of these can have a user defined type.
18920 * Acceptable values are:
18921 * - "U1"
18922 * - "U2"
18923 * - "U3"
18924 * - "U4"
18925 * - "U5"
18926 * - "U6"
18927 * - "U7"
18928 * - "U8"
18929 * - "U9"
18930 * - "U10"
18931 * - "U11"
18932 * - "U12"
18933 * - "U13"
18934 * - "U14"
18935 * - "U15"
18936 * - "U16"
18937 * - "U17"
18938 * - "U18"
18939 * - "U19"
18940 * - "U20"
18941 */
18942 core.List<core.String> userDefinedVariableTypes;
18943
18944 FloodlightActivity();
18945
18946 FloodlightActivity.fromJson(core.Map _json) {
18947 if (_json.containsKey("accountId")) {
18948 accountId = _json["accountId"];
18949 }
18950 if (_json.containsKey("advertiserId")) {
18951 advertiserId = _json["advertiserId"];
18952 }
18953 if (_json.containsKey("advertiserIdDimensionValue")) {
18954 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
18955 }
18956 if (_json.containsKey("cacheBustingType")) {
18957 cacheBustingType = _json["cacheBustingType"];
18958 }
18959 if (_json.containsKey("countingMethod")) {
18960 countingMethod = _json["countingMethod"];
18961 }
18962 if (_json.containsKey("defaultTags")) {
18963 defaultTags = _json["defaultTags"].map((value) => new FloodlightActivityDy namicTag.fromJson(value)).toList();
18964 }
18965 if (_json.containsKey("expectedUrl")) {
18966 expectedUrl = _json["expectedUrl"];
18967 }
18968 if (_json.containsKey("floodlightActivityGroupId")) {
18969 floodlightActivityGroupId = _json["floodlightActivityGroupId"];
18970 }
18971 if (_json.containsKey("floodlightActivityGroupName")) {
18972 floodlightActivityGroupName = _json["floodlightActivityGroupName"];
18973 }
18974 if (_json.containsKey("floodlightActivityGroupTagString")) {
18975 floodlightActivityGroupTagString = _json["floodlightActivityGroupTagString "];
18976 }
18977 if (_json.containsKey("floodlightActivityGroupType")) {
18978 floodlightActivityGroupType = _json["floodlightActivityGroupType"];
18979 }
18980 if (_json.containsKey("floodlightConfigurationId")) {
18981 floodlightConfigurationId = _json["floodlightConfigurationId"];
18982 }
18983 if (_json.containsKey("floodlightConfigurationIdDimensionValue")) {
18984 floodlightConfigurationIdDimensionValue = new DimensionValue.fromJson(_jso n["floodlightConfigurationIdDimensionValue"]);
18985 }
18986 if (_json.containsKey("hidden")) {
18987 hidden = _json["hidden"];
18988 }
18989 if (_json.containsKey("id")) {
18990 id = _json["id"];
18991 }
18992 if (_json.containsKey("idDimensionValue")) {
18993 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
18994 }
18995 if (_json.containsKey("imageTagEnabled")) {
18996 imageTagEnabled = _json["imageTagEnabled"];
18997 }
18998 if (_json.containsKey("kind")) {
18999 kind = _json["kind"];
19000 }
19001 if (_json.containsKey("name")) {
19002 name = _json["name"];
19003 }
19004 if (_json.containsKey("notes")) {
19005 notes = _json["notes"];
19006 }
19007 if (_json.containsKey("publisherTags")) {
19008 publisherTags = _json["publisherTags"].map((value) => new FloodlightActivi tyPublisherDynamicTag.fromJson(value)).toList();
19009 }
19010 if (_json.containsKey("secure")) {
19011 secure = _json["secure"];
19012 }
19013 if (_json.containsKey("sslCompliant")) {
19014 sslCompliant = _json["sslCompliant"];
19015 }
19016 if (_json.containsKey("sslRequired")) {
19017 sslRequired = _json["sslRequired"];
19018 }
19019 if (_json.containsKey("subaccountId")) {
19020 subaccountId = _json["subaccountId"];
19021 }
19022 if (_json.containsKey("tagFormat")) {
19023 tagFormat = _json["tagFormat"];
19024 }
19025 if (_json.containsKey("tagString")) {
19026 tagString = _json["tagString"];
19027 }
19028 if (_json.containsKey("userDefinedVariableTypes")) {
19029 userDefinedVariableTypes = _json["userDefinedVariableTypes"];
19030 }
19031 }
19032
19033 core.Map toJson() {
19034 var _json = new core.Map();
19035 if (accountId != null) {
19036 _json["accountId"] = accountId;
19037 }
19038 if (advertiserId != null) {
19039 _json["advertiserId"] = advertiserId;
19040 }
19041 if (advertiserIdDimensionValue != null) {
19042 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
19043 }
19044 if (cacheBustingType != null) {
19045 _json["cacheBustingType"] = cacheBustingType;
19046 }
19047 if (countingMethod != null) {
19048 _json["countingMethod"] = countingMethod;
19049 }
19050 if (defaultTags != null) {
19051 _json["defaultTags"] = defaultTags.map((value) => (value).toJson()).toList ();
19052 }
19053 if (expectedUrl != null) {
19054 _json["expectedUrl"] = expectedUrl;
19055 }
19056 if (floodlightActivityGroupId != null) {
19057 _json["floodlightActivityGroupId"] = floodlightActivityGroupId;
19058 }
19059 if (floodlightActivityGroupName != null) {
19060 _json["floodlightActivityGroupName"] = floodlightActivityGroupName;
19061 }
19062 if (floodlightActivityGroupTagString != null) {
19063 _json["floodlightActivityGroupTagString"] = floodlightActivityGroupTagStri ng;
19064 }
19065 if (floodlightActivityGroupType != null) {
19066 _json["floodlightActivityGroupType"] = floodlightActivityGroupType;
19067 }
19068 if (floodlightConfigurationId != null) {
19069 _json["floodlightConfigurationId"] = floodlightConfigurationId;
19070 }
19071 if (floodlightConfigurationIdDimensionValue != null) {
19072 _json["floodlightConfigurationIdDimensionValue"] = (floodlightConfiguratio nIdDimensionValue).toJson();
19073 }
19074 if (hidden != null) {
19075 _json["hidden"] = hidden;
19076 }
19077 if (id != null) {
19078 _json["id"] = id;
19079 }
19080 if (idDimensionValue != null) {
19081 _json["idDimensionValue"] = (idDimensionValue).toJson();
19082 }
19083 if (imageTagEnabled != null) {
19084 _json["imageTagEnabled"] = imageTagEnabled;
19085 }
19086 if (kind != null) {
19087 _json["kind"] = kind;
19088 }
19089 if (name != null) {
19090 _json["name"] = name;
19091 }
19092 if (notes != null) {
19093 _json["notes"] = notes;
19094 }
19095 if (publisherTags != null) {
19096 _json["publisherTags"] = publisherTags.map((value) => (value).toJson()).to List();
19097 }
19098 if (secure != null) {
19099 _json["secure"] = secure;
19100 }
19101 if (sslCompliant != null) {
19102 _json["sslCompliant"] = sslCompliant;
19103 }
19104 if (sslRequired != null) {
19105 _json["sslRequired"] = sslRequired;
19106 }
19107 if (subaccountId != null) {
19108 _json["subaccountId"] = subaccountId;
19109 }
19110 if (tagFormat != null) {
19111 _json["tagFormat"] = tagFormat;
19112 }
19113 if (tagString != null) {
19114 _json["tagString"] = tagString;
19115 }
19116 if (userDefinedVariableTypes != null) {
19117 _json["userDefinedVariableTypes"] = userDefinedVariableTypes;
19118 }
19119 return _json;
19120 }
19121 }
19122
19123 /** Dynamic Tag */
19124 class FloodlightActivityDynamicTag {
19125 /** ID of this dynamic tag. This is a read-only, auto-generated field. */
19126 core.String id;
19127 /** Name of this tag. */
19128 core.String name;
19129 /** Tag code. */
19130 core.String tag;
19131
19132 FloodlightActivityDynamicTag();
19133
19134 FloodlightActivityDynamicTag.fromJson(core.Map _json) {
19135 if (_json.containsKey("id")) {
19136 id = _json["id"];
19137 }
19138 if (_json.containsKey("name")) {
19139 name = _json["name"];
19140 }
19141 if (_json.containsKey("tag")) {
19142 tag = _json["tag"];
19143 }
19144 }
19145
19146 core.Map toJson() {
19147 var _json = new core.Map();
19148 if (id != null) {
19149 _json["id"] = id;
19150 }
19151 if (name != null) {
19152 _json["name"] = name;
19153 }
19154 if (tag != null) {
19155 _json["tag"] = tag;
19156 }
19157 return _json;
19158 }
19159 }
19160
19161 /** Contains properties of a Floodlight activity group. */
19162 class FloodlightActivityGroup {
19163 /**
19164 * Account ID of this floodlight activity group. This is a read-only field
19165 * that can be left blank.
19166 */
19167 core.String accountId;
19168 /**
19169 * Advertiser ID of this floodlight activity group. If this field is left
19170 * blank, the value will be copied over either from the floodlight
19171 * configuration's advertiser or from the existing activity group's
19172 * advertiser.
19173 */
19174 core.String advertiserId;
19175 /**
19176 * Dimension value for the ID of the advertiser. This is a read-only,
19177 * auto-generated field.
19178 */
19179 DimensionValue advertiserIdDimensionValue;
19180 /**
19181 * Floodlight configuration ID of this floodlight activity group. This is a
19182 * required field.
19183 */
19184 core.String floodlightConfigurationId;
19185 /**
19186 * Dimension value for the ID of the floodlight configuration. This is a
19187 * read-only, auto-generated field.
19188 */
19189 DimensionValue floodlightConfigurationIdDimensionValue;
19190 /**
19191 * ID of this floodlight activity group. This is a read-only, auto-generated
19192 * field.
19193 */
19194 core.String id;
19195 /**
19196 * Dimension value for the ID of this floodlight activity group. This is a
19197 * read-only, auto-generated field.
19198 */
19199 DimensionValue idDimensionValue;
19200 /**
19201 * Identifies what kind of resource this is. Value: the fixed string
19202 * "dfareporting#floodlightActivityGroup".
19203 */
19204 core.String kind;
19205 /**
19206 * Name of this floodlight activity group. This is a required field. Must be
19207 * less than 65 characters long and cannot contain quotes.
19208 */
19209 core.String name;
19210 /**
19211 * Subaccount ID of this floodlight activity group. This is a read-only field
19212 * that can be left blank.
19213 */
19214 core.String subaccountId;
19215 /**
19216 * Value of the type= parameter in the floodlight tag, which the ad servers
19217 * use to identify the activity group that the activity belongs to. This is
19218 * optional: if empty, a new tag string will be generated for you. This string
19219 * must be 1 to 8 characters long, with valid characters being
19220 * [a-z][A-Z][0-9][-][ _ ]. This tag string must also be unique among activity
19221 * groups of the same floodlight configuration. This field is read-only after
19222 * insertion.
19223 */
19224 core.String tagString;
19225 /**
19226 * Type of the floodlight activity group. This is a required field that is
19227 * read-only after insertion.
19228 * Possible string values are:
19229 * - "COUNTER"
19230 * - "SALE"
19231 */
19232 core.String type;
19233
19234 FloodlightActivityGroup();
19235
19236 FloodlightActivityGroup.fromJson(core.Map _json) {
19237 if (_json.containsKey("accountId")) {
19238 accountId = _json["accountId"];
19239 }
19240 if (_json.containsKey("advertiserId")) {
19241 advertiserId = _json["advertiserId"];
19242 }
19243 if (_json.containsKey("advertiserIdDimensionValue")) {
19244 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
19245 }
19246 if (_json.containsKey("floodlightConfigurationId")) {
19247 floodlightConfigurationId = _json["floodlightConfigurationId"];
19248 }
19249 if (_json.containsKey("floodlightConfigurationIdDimensionValue")) {
19250 floodlightConfigurationIdDimensionValue = new DimensionValue.fromJson(_jso n["floodlightConfigurationIdDimensionValue"]);
19251 }
19252 if (_json.containsKey("id")) {
19253 id = _json["id"];
19254 }
19255 if (_json.containsKey("idDimensionValue")) {
19256 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
19257 }
19258 if (_json.containsKey("kind")) {
19259 kind = _json["kind"];
19260 }
19261 if (_json.containsKey("name")) {
19262 name = _json["name"];
19263 }
19264 if (_json.containsKey("subaccountId")) {
19265 subaccountId = _json["subaccountId"];
19266 }
19267 if (_json.containsKey("tagString")) {
19268 tagString = _json["tagString"];
19269 }
19270 if (_json.containsKey("type")) {
19271 type = _json["type"];
19272 }
19273 }
19274
19275 core.Map toJson() {
19276 var _json = new core.Map();
19277 if (accountId != null) {
19278 _json["accountId"] = accountId;
19279 }
19280 if (advertiserId != null) {
19281 _json["advertiserId"] = advertiserId;
19282 }
19283 if (advertiserIdDimensionValue != null) {
19284 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
19285 }
19286 if (floodlightConfigurationId != null) {
19287 _json["floodlightConfigurationId"] = floodlightConfigurationId;
19288 }
19289 if (floodlightConfigurationIdDimensionValue != null) {
19290 _json["floodlightConfigurationIdDimensionValue"] = (floodlightConfiguratio nIdDimensionValue).toJson();
19291 }
19292 if (id != null) {
19293 _json["id"] = id;
19294 }
19295 if (idDimensionValue != null) {
19296 _json["idDimensionValue"] = (idDimensionValue).toJson();
19297 }
19298 if (kind != null) {
19299 _json["kind"] = kind;
19300 }
19301 if (name != null) {
19302 _json["name"] = name;
19303 }
19304 if (subaccountId != null) {
19305 _json["subaccountId"] = subaccountId;
19306 }
19307 if (tagString != null) {
19308 _json["tagString"] = tagString;
19309 }
19310 if (type != null) {
19311 _json["type"] = type;
19312 }
19313 return _json;
19314 }
19315 }
19316
19317 /** Floodlight Activity Group List Response */
19318 class FloodlightActivityGroupsListResponse {
19319 /** Floodlight activity group collection. */
19320 core.List<FloodlightActivityGroup> floodlightActivityGroups;
19321 /**
19322 * Identifies what kind of resource this is. Value: the fixed string
19323 * "dfareporting#floodlightActivityGroupsListResponse".
19324 */
19325 core.String kind;
19326 /** Pagination token to be used for the next list operation. */
19327 core.String nextPageToken;
19328
19329 FloodlightActivityGroupsListResponse();
19330
19331 FloodlightActivityGroupsListResponse.fromJson(core.Map _json) {
19332 if (_json.containsKey("floodlightActivityGroups")) {
19333 floodlightActivityGroups = _json["floodlightActivityGroups"].map((value) = > new FloodlightActivityGroup.fromJson(value)).toList();
19334 }
19335 if (_json.containsKey("kind")) {
19336 kind = _json["kind"];
19337 }
19338 if (_json.containsKey("nextPageToken")) {
19339 nextPageToken = _json["nextPageToken"];
19340 }
19341 }
19342
19343 core.Map toJson() {
19344 var _json = new core.Map();
19345 if (floodlightActivityGroups != null) {
19346 _json["floodlightActivityGroups"] = floodlightActivityGroups.map((value) = > (value).toJson()).toList();
19347 }
19348 if (kind != null) {
19349 _json["kind"] = kind;
19350 }
19351 if (nextPageToken != null) {
19352 _json["nextPageToken"] = nextPageToken;
19353 }
19354 return _json;
19355 }
19356 }
19357
19358 /** Publisher Dynamic Tag */
19359 class FloodlightActivityPublisherDynamicTag {
19360 /** Whether this tag is applicable only for click-throughs. */
19361 core.bool clickThrough;
19362 /**
19363 * Directory site ID of this dynamic tag. This is a write-only field that can
19364 * be used as an alternative to the siteId field. When this resource is
19365 * retrieved, only the siteId field will be populated.
19366 */
19367 core.String directorySiteId;
19368 /** Dynamic floodlight tag. */
19369 FloodlightActivityDynamicTag dynamicTag;
19370 /** Site ID of this dynamic tag. */
19371 core.String siteId;
19372 /**
19373 * Dimension value for the ID of the site. This is a read-only, auto-generated
19374 * field.
19375 */
19376 DimensionValue siteIdDimensionValue;
19377 /** Whether this tag is applicable only for view-throughs. */
19378 core.bool viewThrough;
19379
19380 FloodlightActivityPublisherDynamicTag();
19381
19382 FloodlightActivityPublisherDynamicTag.fromJson(core.Map _json) {
19383 if (_json.containsKey("clickThrough")) {
19384 clickThrough = _json["clickThrough"];
19385 }
19386 if (_json.containsKey("directorySiteId")) {
19387 directorySiteId = _json["directorySiteId"];
19388 }
19389 if (_json.containsKey("dynamicTag")) {
19390 dynamicTag = new FloodlightActivityDynamicTag.fromJson(_json["dynamicTag"] );
19391 }
19392 if (_json.containsKey("siteId")) {
19393 siteId = _json["siteId"];
19394 }
19395 if (_json.containsKey("siteIdDimensionValue")) {
19396 siteIdDimensionValue = new DimensionValue.fromJson(_json["siteIdDimensionV alue"]);
19397 }
19398 if (_json.containsKey("viewThrough")) {
19399 viewThrough = _json["viewThrough"];
19400 }
19401 }
19402
19403 core.Map toJson() {
19404 var _json = new core.Map();
19405 if (clickThrough != null) {
19406 _json["clickThrough"] = clickThrough;
19407 }
19408 if (directorySiteId != null) {
19409 _json["directorySiteId"] = directorySiteId;
19410 }
19411 if (dynamicTag != null) {
19412 _json["dynamicTag"] = (dynamicTag).toJson();
19413 }
19414 if (siteId != null) {
19415 _json["siteId"] = siteId;
19416 }
19417 if (siteIdDimensionValue != null) {
19418 _json["siteIdDimensionValue"] = (siteIdDimensionValue).toJson();
19419 }
19420 if (viewThrough != null) {
19421 _json["viewThrough"] = viewThrough;
19422 }
19423 return _json;
19424 }
19425 }
19426
19427 /** Contains properties of a Floodlight configuration. */
19428 class FloodlightConfiguration {
19429 /**
19430 * Account ID of this floodlight configuration. This is a read-only field that
19431 * can be left blank.
19432 */
19433 core.String accountId;
19434 /**
19435 * Advertiser ID of the parent advertiser of this floodlight configuration.
19436 */
19437 core.String advertiserId;
19438 /**
19439 * Dimension value for the ID of the advertiser. This is a read-only,
19440 * auto-generated field.
19441 */
19442 DimensionValue advertiserIdDimensionValue;
19443 /** Whether advertiser data is shared with Google Analytics. */
19444 core.bool analyticsDataSharingEnabled;
19445 /**
19446 * Whether the exposure-to-conversion report is enabled. This report shows
19447 * detailed pathway information on up to 10 of the most recent ad exposures
19448 * seen by a user before converting.
19449 */
19450 core.bool exposureToConversionEnabled;
19451 /**
19452 * Day that will be counted as the first day of the week in reports. This is a
19453 * required field.
19454 * Possible string values are:
19455 * - "MONDAY"
19456 * - "SUNDAY"
19457 */
19458 core.String firstDayOfWeek;
19459 /**
19460 * ID of this floodlight configuration. This is a read-only, auto-generated
19461 * field.
19462 */
19463 core.String id;
19464 /**
19465 * Dimension value for the ID of this floodlight configuration. This is a
19466 * read-only, auto-generated field.
19467 */
19468 DimensionValue idDimensionValue;
19469 /** Whether in-app attribution tracking is enabled. */
19470 core.bool inAppAttributionTrackingEnabled;
19471 /**
19472 * Identifies what kind of resource this is. Value: the fixed string
19473 * "dfareporting#floodlightConfiguration".
19474 */
19475 core.String kind;
19476 /** Lookback window settings for this floodlight configuration. */
19477 LookbackConfiguration lookbackConfiguration;
19478 /**
19479 * Types of attribution options for natural search conversions.
19480 * Possible string values are:
19481 * - "EXCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
19482 * - "INCLUDE_NATURAL_SEARCH_CONVERSION_ATTRIBUTION"
19483 * - "INCLUDE_NATURAL_SEARCH_TIERED_CONVERSION_ATTRIBUTION"
19484 */
19485 core.String naturalSearchConversionAttributionOption;
19486 /** Settings for DCM Omniture integration. */
19487 OmnitureSettings omnitureSettings;
19488 /**
19489 * List of standard variables enabled for this configuration.
19490 *
19491 * Acceptable values are:
19492 * - "ORD"
19493 * - "NUM"
19494 */
19495 core.List<core.String> standardVariableTypes;
19496 /**
19497 * Subaccount ID of this floodlight configuration. This is a read-only field
19498 * that can be left blank.
19499 */
19500 core.String subaccountId;
19501 /** Configuration settings for dynamic and image floodlight tags. */
19502 TagSettings tagSettings;
19503 /**
19504 * List of third-party authentication tokens enabled for this configuration.
19505 */
19506 core.List<ThirdPartyAuthenticationToken> thirdPartyAuthenticationTokens;
19507 /** List of user defined variables enabled for this configuration. */
19508 core.List<UserDefinedVariableConfiguration> userDefinedVariableConfigurations;
19509
19510 FloodlightConfiguration();
19511
19512 FloodlightConfiguration.fromJson(core.Map _json) {
19513 if (_json.containsKey("accountId")) {
19514 accountId = _json["accountId"];
19515 }
19516 if (_json.containsKey("advertiserId")) {
19517 advertiserId = _json["advertiserId"];
19518 }
19519 if (_json.containsKey("advertiserIdDimensionValue")) {
19520 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
19521 }
19522 if (_json.containsKey("analyticsDataSharingEnabled")) {
19523 analyticsDataSharingEnabled = _json["analyticsDataSharingEnabled"];
19524 }
19525 if (_json.containsKey("exposureToConversionEnabled")) {
19526 exposureToConversionEnabled = _json["exposureToConversionEnabled"];
19527 }
19528 if (_json.containsKey("firstDayOfWeek")) {
19529 firstDayOfWeek = _json["firstDayOfWeek"];
19530 }
19531 if (_json.containsKey("id")) {
19532 id = _json["id"];
19533 }
19534 if (_json.containsKey("idDimensionValue")) {
19535 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
19536 }
19537 if (_json.containsKey("inAppAttributionTrackingEnabled")) {
19538 inAppAttributionTrackingEnabled = _json["inAppAttributionTrackingEnabled"] ;
19539 }
19540 if (_json.containsKey("kind")) {
19541 kind = _json["kind"];
19542 }
19543 if (_json.containsKey("lookbackConfiguration")) {
19544 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback Configuration"]);
19545 }
19546 if (_json.containsKey("naturalSearchConversionAttributionOption")) {
19547 naturalSearchConversionAttributionOption = _json["naturalSearchConversionA ttributionOption"];
19548 }
19549 if (_json.containsKey("omnitureSettings")) {
19550 omnitureSettings = new OmnitureSettings.fromJson(_json["omnitureSettings"] );
19551 }
19552 if (_json.containsKey("standardVariableTypes")) {
19553 standardVariableTypes = _json["standardVariableTypes"];
19554 }
19555 if (_json.containsKey("subaccountId")) {
19556 subaccountId = _json["subaccountId"];
19557 }
19558 if (_json.containsKey("tagSettings")) {
19559 tagSettings = new TagSettings.fromJson(_json["tagSettings"]);
19560 }
19561 if (_json.containsKey("thirdPartyAuthenticationTokens")) {
19562 thirdPartyAuthenticationTokens = _json["thirdPartyAuthenticationTokens"].m ap((value) => new ThirdPartyAuthenticationToken.fromJson(value)).toList();
19563 }
19564 if (_json.containsKey("userDefinedVariableConfigurations")) {
19565 userDefinedVariableConfigurations = _json["userDefinedVariableConfiguratio ns"].map((value) => new UserDefinedVariableConfiguration.fromJson(value)).toList ();
19566 }
19567 }
19568
19569 core.Map toJson() {
19570 var _json = new core.Map();
19571 if (accountId != null) {
19572 _json["accountId"] = accountId;
19573 }
19574 if (advertiserId != null) {
19575 _json["advertiserId"] = advertiserId;
19576 }
19577 if (advertiserIdDimensionValue != null) {
19578 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
19579 }
19580 if (analyticsDataSharingEnabled != null) {
19581 _json["analyticsDataSharingEnabled"] = analyticsDataSharingEnabled;
19582 }
19583 if (exposureToConversionEnabled != null) {
19584 _json["exposureToConversionEnabled"] = exposureToConversionEnabled;
19585 }
19586 if (firstDayOfWeek != null) {
19587 _json["firstDayOfWeek"] = firstDayOfWeek;
19588 }
19589 if (id != null) {
19590 _json["id"] = id;
19591 }
19592 if (idDimensionValue != null) {
19593 _json["idDimensionValue"] = (idDimensionValue).toJson();
19594 }
19595 if (inAppAttributionTrackingEnabled != null) {
19596 _json["inAppAttributionTrackingEnabled"] = inAppAttributionTrackingEnabled ;
19597 }
19598 if (kind != null) {
19599 _json["kind"] = kind;
19600 }
19601 if (lookbackConfiguration != null) {
19602 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson();
19603 }
19604 if (naturalSearchConversionAttributionOption != null) {
19605 _json["naturalSearchConversionAttributionOption"] = naturalSearchConversio nAttributionOption;
19606 }
19607 if (omnitureSettings != null) {
19608 _json["omnitureSettings"] = (omnitureSettings).toJson();
19609 }
19610 if (standardVariableTypes != null) {
19611 _json["standardVariableTypes"] = standardVariableTypes;
19612 }
19613 if (subaccountId != null) {
19614 _json["subaccountId"] = subaccountId;
19615 }
19616 if (tagSettings != null) {
19617 _json["tagSettings"] = (tagSettings).toJson();
19618 }
19619 if (thirdPartyAuthenticationTokens != null) {
19620 _json["thirdPartyAuthenticationTokens"] = thirdPartyAuthenticationTokens.m ap((value) => (value).toJson()).toList();
19621 }
19622 if (userDefinedVariableConfigurations != null) {
19623 _json["userDefinedVariableConfigurations"] = userDefinedVariableConfigurat ions.map((value) => (value).toJson()).toList();
19624 }
19625 return _json;
19626 }
19627 }
19628
19629 /** Floodlight Configuration List Response */
19630 class FloodlightConfigurationsListResponse {
19631 /** Floodlight configuration collection. */
19632 core.List<FloodlightConfiguration> floodlightConfigurations;
19633 /**
19634 * Identifies what kind of resource this is. Value: the fixed string
19635 * "dfareporting#floodlightConfigurationsListResponse".
19636 */
19637 core.String kind;
19638
19639 FloodlightConfigurationsListResponse();
19640
19641 FloodlightConfigurationsListResponse.fromJson(core.Map _json) {
19642 if (_json.containsKey("floodlightConfigurations")) {
19643 floodlightConfigurations = _json["floodlightConfigurations"].map((value) = > new FloodlightConfiguration.fromJson(value)).toList();
19644 }
19645 if (_json.containsKey("kind")) {
19646 kind = _json["kind"];
19647 }
19648 }
19649
19650 core.Map toJson() {
19651 var _json = new core.Map();
19652 if (floodlightConfigurations != null) {
19653 _json["floodlightConfigurations"] = floodlightConfigurations.map((value) = > (value).toJson()).toList();
19654 }
19655 if (kind != null) {
19656 _json["kind"] = kind;
19657 }
19658 return _json;
19659 }
19660 }
19661
19662 /**
19663 * Represents fields that are compatible to be selected for a report of type
19664 * "FlOODLIGHT".
19665 */
19666 class FloodlightReportCompatibleFields {
19667 /**
19668 * Dimensions which are compatible to be selected in the "dimensionFilters"
19669 * section of the report.
19670 */
19671 core.List<Dimension> dimensionFilters;
19672 /**
19673 * Dimensions which are compatible to be selected in the "dimensions" section
19674 * of the report.
19675 */
19676 core.List<Dimension> dimensions;
19677 /**
19678 * The kind of resource this is, in this case
19679 * dfareporting#floodlightReportCompatibleFields.
19680 */
19681 core.String kind;
19682 /**
19683 * Metrics which are compatible to be selected in the "metricNames" section of
19684 * the report.
19685 */
19686 core.List<Metric> metrics;
19687
19688 FloodlightReportCompatibleFields();
19689
19690 FloodlightReportCompatibleFields.fromJson(core.Map _json) {
19691 if (_json.containsKey("dimensionFilters")) {
19692 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension. fromJson(value)).toList();
19693 }
19694 if (_json.containsKey("dimensions")) {
19695 dimensions = _json["dimensions"].map((value) => new Dimension.fromJson(val ue)).toList();
19696 }
19697 if (_json.containsKey("kind")) {
19698 kind = _json["kind"];
19699 }
19700 if (_json.containsKey("metrics")) {
19701 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi st();
19702 }
19703 }
19704
19705 core.Map toJson() {
19706 var _json = new core.Map();
19707 if (dimensionFilters != null) {
19708 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson ()).toList();
19709 }
19710 if (dimensions != null) {
19711 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList() ;
19712 }
19713 if (kind != null) {
19714 _json["kind"] = kind;
19715 }
19716 if (metrics != null) {
19717 _json["metrics"] = metrics.map((value) => (value).toJson()).toList();
19718 }
19719 return _json;
19720 }
19721 }
19722
19723 /** Frequency Cap. */
19724 class FrequencyCap {
19725 /**
19726 * Duration of time, in seconds, for this frequency cap. The maximum duration
19727 * is 90 days in seconds, or 7,776,000.
19728 */
19729 core.String duration;
19730 /**
19731 * Number of times an individual user can be served the ad within the
19732 * specified duration. The maximum allowed is 15.
19733 */
19734 core.String impressions;
19735
19736 FrequencyCap();
19737
19738 FrequencyCap.fromJson(core.Map _json) {
19739 if (_json.containsKey("duration")) {
19740 duration = _json["duration"];
19741 }
19742 if (_json.containsKey("impressions")) {
19743 impressions = _json["impressions"];
19744 }
19745 }
19746
19747 core.Map toJson() {
19748 var _json = new core.Map();
19749 if (duration != null) {
19750 _json["duration"] = duration;
19751 }
19752 if (impressions != null) {
19753 _json["impressions"] = impressions;
19754 }
19755 return _json;
19756 }
19757 }
19758
19759 /** FsCommand. */
19760 class FsCommand {
19761 /**
19762 * Distance from the left of the browser.Applicable when positionOption is
19763 * DISTANCE_FROM_TOP_LEFT_CORNER.
19764 */
19765 core.int left;
19766 /**
19767 * Position in the browser where the window will open.
19768 * Possible string values are:
19769 * - "CENTERED"
19770 * - "DISTANCE_FROM_TOP_LEFT_CORNER"
19771 */
19772 core.String positionOption;
19773 /**
19774 * Distance from the top of the browser. Applicable when positionOption is
19775 * DISTANCE_FROM_TOP_LEFT_CORNER.
19776 */
19777 core.int top;
19778 /** Height of the window. */
19779 core.int windowHeight;
19780 /** Width of the window. */
19781 core.int windowWidth;
19782
19783 FsCommand();
19784
19785 FsCommand.fromJson(core.Map _json) {
19786 if (_json.containsKey("left")) {
19787 left = _json["left"];
19788 }
19789 if (_json.containsKey("positionOption")) {
19790 positionOption = _json["positionOption"];
19791 }
19792 if (_json.containsKey("top")) {
19793 top = _json["top"];
19794 }
19795 if (_json.containsKey("windowHeight")) {
19796 windowHeight = _json["windowHeight"];
19797 }
19798 if (_json.containsKey("windowWidth")) {
19799 windowWidth = _json["windowWidth"];
19800 }
19801 }
19802
19803 core.Map toJson() {
19804 var _json = new core.Map();
19805 if (left != null) {
19806 _json["left"] = left;
19807 }
19808 if (positionOption != null) {
19809 _json["positionOption"] = positionOption;
19810 }
19811 if (top != null) {
19812 _json["top"] = top;
19813 }
19814 if (windowHeight != null) {
19815 _json["windowHeight"] = windowHeight;
19816 }
19817 if (windowWidth != null) {
19818 _json["windowWidth"] = windowWidth;
19819 }
19820 return _json;
19821 }
19822 }
19823
19824 /** Geographical Targeting. */
19825 class GeoTargeting {
19826 /**
19827 * Cities to be targeted. For each city only dartId is required. The other
19828 * fields are populated automatically when the ad is inserted or updated. If
19829 * targeting a city, do not target or exclude the country of the city, and do
19830 * not target the metro or region of the city.
19831 */
19832 core.List<City> cities;
19833 /**
19834 * Countries to be targeted or excluded from targeting, depending on the
19835 * setting of the excludeCountries field. For each country only dartId is
19836 * required. The other fields are populated automatically when the ad is
19837 * inserted or updated. If targeting or excluding a country, do not target
19838 * regions, cities, metros, or postal codes in the same country.
19839 */
19840 core.List<Country> countries;
19841 /**
19842 * Whether or not to exclude the countries in the countries field from
19843 * targeting. If false, the countries field refers to countries which will be
19844 * targeted by the ad.
19845 */
19846 core.bool excludeCountries;
19847 /**
19848 * Metros to be targeted. For each metro only dmaId is required. The other
19849 * fields are populated automatically when the ad is inserted or updated. If
19850 * targeting a metro, do not target or exclude the country of the metro.
19851 */
19852 core.List<Metro> metros;
19853 /**
19854 * Postal codes to be targeted. For each postal code only id is required. The
19855 * other fields are populated automatically when the ad is inserted or
19856 * updated. If targeting a postal code, do not target or exclude the country
19857 * of the postal code.
19858 */
19859 core.List<PostalCode> postalCodes;
19860 /**
19861 * Regions to be targeted. For each region only dartId is required. The other
19862 * fields are populated automatically when the ad is inserted or updated. If
19863 * targeting a region, do not target or exclude the country of the region.
19864 */
19865 core.List<Region> regions;
19866
19867 GeoTargeting();
19868
19869 GeoTargeting.fromJson(core.Map _json) {
19870 if (_json.containsKey("cities")) {
19871 cities = _json["cities"].map((value) => new City.fromJson(value)).toList() ;
19872 }
19873 if (_json.containsKey("countries")) {
19874 countries = _json["countries"].map((value) => new Country.fromJson(value)) .toList();
19875 }
19876 if (_json.containsKey("excludeCountries")) {
19877 excludeCountries = _json["excludeCountries"];
19878 }
19879 if (_json.containsKey("metros")) {
19880 metros = _json["metros"].map((value) => new Metro.fromJson(value)).toList( );
19881 }
19882 if (_json.containsKey("postalCodes")) {
19883 postalCodes = _json["postalCodes"].map((value) => new PostalCode.fromJson( value)).toList();
19884 }
19885 if (_json.containsKey("regions")) {
19886 regions = _json["regions"].map((value) => new Region.fromJson(value)).toLi st();
19887 }
19888 }
19889
19890 core.Map toJson() {
19891 var _json = new core.Map();
19892 if (cities != null) {
19893 _json["cities"] = cities.map((value) => (value).toJson()).toList();
19894 }
19895 if (countries != null) {
19896 _json["countries"] = countries.map((value) => (value).toJson()).toList();
19897 }
19898 if (excludeCountries != null) {
19899 _json["excludeCountries"] = excludeCountries;
19900 }
19901 if (metros != null) {
19902 _json["metros"] = metros.map((value) => (value).toJson()).toList();
19903 }
19904 if (postalCodes != null) {
19905 _json["postalCodes"] = postalCodes.map((value) => (value).toJson()).toList ();
19906 }
19907 if (regions != null) {
19908 _json["regions"] = regions.map((value) => (value).toJson()).toList();
19909 }
19910 return _json;
19911 }
19912 }
19913
19914 /** Represents a buy from the DoubleClick Planning inventory store. */
19915 class InventoryItem {
19916 /** Account ID of this inventory item. */
19917 core.String accountId;
19918 /**
19919 * Ad slots of this inventory item. If this inventory item represents a
19920 * standalone placement, there will be exactly one ad slot. If this inventory
19921 * item represents a placement group, there will be more than one ad slot,
19922 * each representing one child placement in that placement group.
19923 */
19924 core.List<AdSlot> adSlots;
19925 /** Advertiser ID of this inventory item. */
19926 core.String advertiserId;
19927 /** Content category ID of this inventory item. */
19928 core.String contentCategoryId;
19929 /** Estimated click-through rate of this inventory item. */
19930 core.String estimatedClickThroughRate;
19931 /** Estimated conversion rate of this inventory item. */
19932 core.String estimatedConversionRate;
19933 /** ID of this inventory item. */
19934 core.String id;
19935 /** Whether this inventory item is in plan. */
19936 core.bool inPlan;
19937 /**
19938 * Identifies what kind of resource this is. Value: the fixed string
19939 * "dfareporting#inventoryItem".
19940 */
19941 core.String kind;
19942 /** Information about the most recent modification of this inventory item. */
19943 LastModifiedInfo lastModifiedInfo;
19944 /**
19945 * Name of this inventory item. For standalone inventory items, this is the
19946 * same name as that of its only ad slot. For group inventory items, this can
19947 * differ from the name of any of its ad slots.
19948 */
19949 core.String name;
19950 /** Negotiation channel ID of this inventory item. */
19951 core.String negotiationChannelId;
19952 /** Order ID of this inventory item. */
19953 core.String orderId;
19954 /** Placement strategy ID of this inventory item. */
19955 core.String placementStrategyId;
19956 /** Pricing of this inventory item. */
19957 Pricing pricing;
19958 /** Project ID of this inventory item. */
19959 core.String projectId;
19960 /** RFP ID of this inventory item. */
19961 core.String rfpId;
19962 /** ID of the site this inventory item is associated with. */
19963 core.String siteId;
19964 /** Subaccount ID of this inventory item. */
19965 core.String subaccountId;
19966 /**
19967 * Type of inventory item.
19968 * Possible string values are:
19969 * - "PLANNING_PLACEMENT_TYPE_CREDIT"
19970 * - "PLANNING_PLACEMENT_TYPE_REGULAR"
19971 */
19972 core.String type;
19973
19974 InventoryItem();
19975
19976 InventoryItem.fromJson(core.Map _json) {
19977 if (_json.containsKey("accountId")) {
19978 accountId = _json["accountId"];
19979 }
19980 if (_json.containsKey("adSlots")) {
19981 adSlots = _json["adSlots"].map((value) => new AdSlot.fromJson(value)).toLi st();
19982 }
19983 if (_json.containsKey("advertiserId")) {
19984 advertiserId = _json["advertiserId"];
19985 }
19986 if (_json.containsKey("contentCategoryId")) {
19987 contentCategoryId = _json["contentCategoryId"];
19988 }
19989 if (_json.containsKey("estimatedClickThroughRate")) {
19990 estimatedClickThroughRate = _json["estimatedClickThroughRate"];
19991 }
19992 if (_json.containsKey("estimatedConversionRate")) {
19993 estimatedConversionRate = _json["estimatedConversionRate"];
19994 }
19995 if (_json.containsKey("id")) {
19996 id = _json["id"];
19997 }
19998 if (_json.containsKey("inPlan")) {
19999 inPlan = _json["inPlan"];
20000 }
20001 if (_json.containsKey("kind")) {
20002 kind = _json["kind"];
20003 }
20004 if (_json.containsKey("lastModifiedInfo")) {
20005 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"] );
20006 }
20007 if (_json.containsKey("name")) {
20008 name = _json["name"];
20009 }
20010 if (_json.containsKey("negotiationChannelId")) {
20011 negotiationChannelId = _json["negotiationChannelId"];
20012 }
20013 if (_json.containsKey("orderId")) {
20014 orderId = _json["orderId"];
20015 }
20016 if (_json.containsKey("placementStrategyId")) {
20017 placementStrategyId = _json["placementStrategyId"];
20018 }
20019 if (_json.containsKey("pricing")) {
20020 pricing = new Pricing.fromJson(_json["pricing"]);
20021 }
20022 if (_json.containsKey("projectId")) {
20023 projectId = _json["projectId"];
20024 }
20025 if (_json.containsKey("rfpId")) {
20026 rfpId = _json["rfpId"];
20027 }
20028 if (_json.containsKey("siteId")) {
20029 siteId = _json["siteId"];
20030 }
20031 if (_json.containsKey("subaccountId")) {
20032 subaccountId = _json["subaccountId"];
20033 }
20034 if (_json.containsKey("type")) {
20035 type = _json["type"];
20036 }
20037 }
20038
20039 core.Map toJson() {
20040 var _json = new core.Map();
20041 if (accountId != null) {
20042 _json["accountId"] = accountId;
20043 }
20044 if (adSlots != null) {
20045 _json["adSlots"] = adSlots.map((value) => (value).toJson()).toList();
20046 }
20047 if (advertiserId != null) {
20048 _json["advertiserId"] = advertiserId;
20049 }
20050 if (contentCategoryId != null) {
20051 _json["contentCategoryId"] = contentCategoryId;
20052 }
20053 if (estimatedClickThroughRate != null) {
20054 _json["estimatedClickThroughRate"] = estimatedClickThroughRate;
20055 }
20056 if (estimatedConversionRate != null) {
20057 _json["estimatedConversionRate"] = estimatedConversionRate;
20058 }
20059 if (id != null) {
20060 _json["id"] = id;
20061 }
20062 if (inPlan != null) {
20063 _json["inPlan"] = inPlan;
20064 }
20065 if (kind != null) {
20066 _json["kind"] = kind;
20067 }
20068 if (lastModifiedInfo != null) {
20069 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson();
20070 }
20071 if (name != null) {
20072 _json["name"] = name;
20073 }
20074 if (negotiationChannelId != null) {
20075 _json["negotiationChannelId"] = negotiationChannelId;
20076 }
20077 if (orderId != null) {
20078 _json["orderId"] = orderId;
20079 }
20080 if (placementStrategyId != null) {
20081 _json["placementStrategyId"] = placementStrategyId;
20082 }
20083 if (pricing != null) {
20084 _json["pricing"] = (pricing).toJson();
20085 }
20086 if (projectId != null) {
20087 _json["projectId"] = projectId;
20088 }
20089 if (rfpId != null) {
20090 _json["rfpId"] = rfpId;
20091 }
20092 if (siteId != null) {
20093 _json["siteId"] = siteId;
20094 }
20095 if (subaccountId != null) {
20096 _json["subaccountId"] = subaccountId;
20097 }
20098 if (type != null) {
20099 _json["type"] = type;
20100 }
20101 return _json;
20102 }
20103 }
20104
20105 /** Inventory item List Response */
20106 class InventoryItemsListResponse {
20107 /** Inventory item collection */
20108 core.List<InventoryItem> inventoryItems;
20109 /**
20110 * Identifies what kind of resource this is. Value: the fixed string
20111 * "dfareporting#inventoryItemsListResponse".
20112 */
20113 core.String kind;
20114 /** Pagination token to be used for the next list operation. */
20115 core.String nextPageToken;
20116
20117 InventoryItemsListResponse();
20118
20119 InventoryItemsListResponse.fromJson(core.Map _json) {
20120 if (_json.containsKey("inventoryItems")) {
20121 inventoryItems = _json["inventoryItems"].map((value) => new InventoryItem. fromJson(value)).toList();
20122 }
20123 if (_json.containsKey("kind")) {
20124 kind = _json["kind"];
20125 }
20126 if (_json.containsKey("nextPageToken")) {
20127 nextPageToken = _json["nextPageToken"];
20128 }
20129 }
20130
20131 core.Map toJson() {
20132 var _json = new core.Map();
20133 if (inventoryItems != null) {
20134 _json["inventoryItems"] = inventoryItems.map((value) => (value).toJson()). toList();
20135 }
20136 if (kind != null) {
20137 _json["kind"] = kind;
20138 }
20139 if (nextPageToken != null) {
20140 _json["nextPageToken"] = nextPageToken;
20141 }
20142 return _json;
20143 }
20144 }
20145
20146 /** Key Value Targeting Expression. */
20147 class KeyValueTargetingExpression {
20148 /** Keyword expression being targeted by the ad. */
20149 core.String expression;
20150
20151 KeyValueTargetingExpression();
20152
20153 KeyValueTargetingExpression.fromJson(core.Map _json) {
20154 if (_json.containsKey("expression")) {
20155 expression = _json["expression"];
20156 }
20157 }
20158
20159 core.Map toJson() {
20160 var _json = new core.Map();
20161 if (expression != null) {
20162 _json["expression"] = expression;
20163 }
20164 return _json;
20165 }
20166 }
20167
20168 /**
20169 * Contains information about where a user's browser is taken after the user
20170 * clicks an ad.
20171 */
20172 class LandingPage {
20173 /**
20174 * Whether or not this landing page will be assigned to any ads or creatives
20175 * that do not have a landing page assigned explicitly. Only one default
20176 * landing page is allowed per campaign.
20177 */
20178 core.bool default_;
20179 /** ID of this landing page. This is a read-only, auto-generated field. */
20180 core.String id;
20181 /**
20182 * Identifies what kind of resource this is. Value: the fixed string
20183 * "dfareporting#landingPage".
20184 */
20185 core.String kind;
20186 /**
20187 * Name of this landing page. This is a required field. It must be less than
20188 * 256 characters long, and must be unique among landing pages of the same
20189 * campaign.
20190 */
20191 core.String name;
20192 /** URL of this landing page. This is a required field. */
20193 core.String url;
20194
20195 LandingPage();
20196
20197 LandingPage.fromJson(core.Map _json) {
20198 if (_json.containsKey("default")) {
20199 default_ = _json["default"];
20200 }
20201 if (_json.containsKey("id")) {
20202 id = _json["id"];
20203 }
20204 if (_json.containsKey("kind")) {
20205 kind = _json["kind"];
20206 }
20207 if (_json.containsKey("name")) {
20208 name = _json["name"];
20209 }
20210 if (_json.containsKey("url")) {
20211 url = _json["url"];
20212 }
20213 }
20214
20215 core.Map toJson() {
20216 var _json = new core.Map();
20217 if (default_ != null) {
20218 _json["default"] = default_;
20219 }
20220 if (id != null) {
20221 _json["id"] = id;
20222 }
20223 if (kind != null) {
20224 _json["kind"] = kind;
20225 }
20226 if (name != null) {
20227 _json["name"] = name;
20228 }
20229 if (url != null) {
20230 _json["url"] = url;
20231 }
20232 return _json;
20233 }
20234 }
20235
20236 /** Landing Page List Response */
20237 class LandingPagesListResponse {
20238 /**
20239 * Identifies what kind of resource this is. Value: the fixed string
20240 * "dfareporting#landingPagesListResponse".
20241 */
20242 core.String kind;
20243 /** Landing page collection */
20244 core.List<LandingPage> landingPages;
20245
20246 LandingPagesListResponse();
20247
20248 LandingPagesListResponse.fromJson(core.Map _json) {
20249 if (_json.containsKey("kind")) {
20250 kind = _json["kind"];
20251 }
20252 if (_json.containsKey("landingPages")) {
20253 landingPages = _json["landingPages"].map((value) => new LandingPage.fromJs on(value)).toList();
20254 }
20255 }
20256
20257 core.Map toJson() {
20258 var _json = new core.Map();
20259 if (kind != null) {
20260 _json["kind"] = kind;
20261 }
20262 if (landingPages != null) {
20263 _json["landingPages"] = landingPages.map((value) => (value).toJson()).toLi st();
20264 }
20265 return _json;
20266 }
20267 }
20268
20269 /** Modification timestamp. */
20270 class LastModifiedInfo {
20271 /** Timestamp of the last change in milliseconds since epoch. */
20272 core.String time;
20273
20274 LastModifiedInfo();
20275
20276 LastModifiedInfo.fromJson(core.Map _json) {
20277 if (_json.containsKey("time")) {
20278 time = _json["time"];
20279 }
20280 }
20281
20282 core.Map toJson() {
20283 var _json = new core.Map();
20284 if (time != null) {
20285 _json["time"] = time;
20286 }
20287 return _json;
20288 }
20289 }
20290
20291 /**
20292 * A group clause made up of list population terms representing constraints
20293 * joined by ORs.
20294 */
20295 class ListPopulationClause {
20296 /**
20297 * Terms of this list population clause. Each clause is made up of list
20298 * population terms representing constraints and are joined by ORs.
20299 */
20300 core.List<ListPopulationTerm> terms;
20301
20302 ListPopulationClause();
20303
20304 ListPopulationClause.fromJson(core.Map _json) {
20305 if (_json.containsKey("terms")) {
20306 terms = _json["terms"].map((value) => new ListPopulationTerm.fromJson(valu e)).toList();
20307 }
20308 }
20309
20310 core.Map toJson() {
20311 var _json = new core.Map();
20312 if (terms != null) {
20313 _json["terms"] = terms.map((value) => (value).toJson()).toList();
20314 }
20315 return _json;
20316 }
20317 }
20318
20319 /** Remarketing List Population Rule. */
20320 class ListPopulationRule {
20321 /**
20322 * Floodlight activity ID associated with this rule. This field can be left
20323 * blank.
20324 */
20325 core.String floodlightActivityId;
20326 /**
20327 * Name of floodlight activity associated with this rule. This is a read-only,
20328 * auto-generated field.
20329 */
20330 core.String floodlightActivityName;
20331 /**
20332 * Clauses that make up this list population rule. Clauses are joined by ANDs,
20333 * and the clauses themselves are made up of list population terms which are
20334 * joined by ORs.
20335 */
20336 core.List<ListPopulationClause> listPopulationClauses;
20337
20338 ListPopulationRule();
20339
20340 ListPopulationRule.fromJson(core.Map _json) {
20341 if (_json.containsKey("floodlightActivityId")) {
20342 floodlightActivityId = _json["floodlightActivityId"];
20343 }
20344 if (_json.containsKey("floodlightActivityName")) {
20345 floodlightActivityName = _json["floodlightActivityName"];
20346 }
20347 if (_json.containsKey("listPopulationClauses")) {
20348 listPopulationClauses = _json["listPopulationClauses"].map((value) => new ListPopulationClause.fromJson(value)).toList();
20349 }
20350 }
20351
20352 core.Map toJson() {
20353 var _json = new core.Map();
20354 if (floodlightActivityId != null) {
20355 _json["floodlightActivityId"] = floodlightActivityId;
20356 }
20357 if (floodlightActivityName != null) {
20358 _json["floodlightActivityName"] = floodlightActivityName;
20359 }
20360 if (listPopulationClauses != null) {
20361 _json["listPopulationClauses"] = listPopulationClauses.map((value) => (val ue).toJson()).toList();
20362 }
20363 return _json;
20364 }
20365 }
20366
20367 /** Remarketing List Population Rule Term. */
20368 class ListPopulationTerm {
20369 /**
20370 * Will be true if the term should check if the user is in the list and false
20371 * if the term should check if the user is not in the list. This field is only
20372 * relevant when type is set to LIST_MEMBERSHIP_TERM. False by default.
20373 */
20374 core.bool contains;
20375 /**
20376 * Whether to negate the comparison result of this term during rule
20377 * evaluation. This field is only relevant when type is left unset or set to
20378 * CUSTOM_VARIABLE_TERM or REFERRER_TERM.
20379 */
20380 core.bool negation;
20381 /**
20382 * Comparison operator of this term. This field is only relevant when type is
20383 * left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM.
20384 * Possible string values are:
20385 * - "NUM_EQUALS"
20386 * - "NUM_GREATER_THAN"
20387 * - "NUM_GREATER_THAN_EQUAL"
20388 * - "NUM_LESS_THAN"
20389 * - "NUM_LESS_THAN_EQUAL"
20390 * - "STRING_CONTAINS"
20391 * - "STRING_EQUALS"
20392 */
20393 core.String operator;
20394 /**
20395 * ID of the list in question. This field is only relevant when type is set to
20396 * LIST_MEMBERSHIP_TERM.
20397 */
20398 core.String remarketingListId;
20399 /**
20400 * List population term type determines the applicable fields in this object.
20401 * If left unset or set to CUSTOM_VARIABLE_TERM, then variableName,
20402 * variableFriendlyName, operator, value, and negation are applicable. If set
20403 * to LIST_MEMBERSHIP_TERM then remarketingListId and contains are applicable.
20404 * If set to REFERRER_TERM then operator, value, and negation are applicable.
20405 * Possible string values are:
20406 * - "CUSTOM_VARIABLE_TERM"
20407 * - "LIST_MEMBERSHIP_TERM"
20408 * - "REFERRER_TERM"
20409 */
20410 core.String type;
20411 /**
20412 * Literal to compare the variable to. This field is only relevant when type
20413 * is left unset or set to CUSTOM_VARIABLE_TERM or REFERRER_TERM.
20414 */
20415 core.String value;
20416 /**
20417 * Friendly name of this term's variable. This is a read-only, auto-generated
20418 * field. This field is only relevant when type is left unset or set to
20419 * CUSTOM_VARIABLE_TERM.
20420 */
20421 core.String variableFriendlyName;
20422 /**
20423 * Name of the variable (U1, U2, etc.) being compared in this term. This field
20424 * is only relevant when type is set to null, CUSTOM_VARIABLE_TERM or
20425 * REFERRER_TERM.
20426 */
20427 core.String variableName;
20428
20429 ListPopulationTerm();
20430
20431 ListPopulationTerm.fromJson(core.Map _json) {
20432 if (_json.containsKey("contains")) {
20433 contains = _json["contains"];
20434 }
20435 if (_json.containsKey("negation")) {
20436 negation = _json["negation"];
20437 }
20438 if (_json.containsKey("operator")) {
20439 operator = _json["operator"];
20440 }
20441 if (_json.containsKey("remarketingListId")) {
20442 remarketingListId = _json["remarketingListId"];
20443 }
20444 if (_json.containsKey("type")) {
20445 type = _json["type"];
20446 }
20447 if (_json.containsKey("value")) {
20448 value = _json["value"];
20449 }
20450 if (_json.containsKey("variableFriendlyName")) {
20451 variableFriendlyName = _json["variableFriendlyName"];
20452 }
20453 if (_json.containsKey("variableName")) {
20454 variableName = _json["variableName"];
20455 }
20456 }
20457
20458 core.Map toJson() {
20459 var _json = new core.Map();
20460 if (contains != null) {
20461 _json["contains"] = contains;
20462 }
20463 if (negation != null) {
20464 _json["negation"] = negation;
20465 }
20466 if (operator != null) {
20467 _json["operator"] = operator;
20468 }
20469 if (remarketingListId != null) {
20470 _json["remarketingListId"] = remarketingListId;
20471 }
20472 if (type != null) {
20473 _json["type"] = type;
20474 }
20475 if (value != null) {
20476 _json["value"] = value;
20477 }
20478 if (variableFriendlyName != null) {
20479 _json["variableFriendlyName"] = variableFriendlyName;
20480 }
20481 if (variableName != null) {
20482 _json["variableName"] = variableName;
20483 }
20484 return _json;
20485 }
20486 }
20487
20488 /** Remarketing List Targeting Expression. */
20489 class ListTargetingExpression {
20490 /** Expression describing which lists are being targeted by the ad. */
20491 core.String expression;
20492
20493 ListTargetingExpression();
20494
20495 ListTargetingExpression.fromJson(core.Map _json) {
20496 if (_json.containsKey("expression")) {
20497 expression = _json["expression"];
20498 }
20499 }
20500
20501 core.Map toJson() {
20502 var _json = new core.Map();
20503 if (expression != null) {
20504 _json["expression"] = expression;
20505 }
20506 return _json;
20507 }
20508 }
20509
20510 /** Lookback configuration settings. */
20511 class LookbackConfiguration {
20512 /**
20513 * Lookback window, in days, from the last time a given user clicked on one of
20514 * your ads. If you enter 0, clicks will not be considered as triggering
20515 * events for floodlight tracking. If you leave this field blank, the default
20516 * value for your account will be used.
20517 */
20518 core.int clickDuration;
20519 /**
20520 * Lookback window, in days, from the last time a given user viewed one of
20521 * your ads. If you enter 0, impressions will not be considered as triggering
20522 * events for floodlight tracking. If you leave this field blank, the default
20523 * value for your account will be used.
20524 */
20525 core.int postImpressionActivitiesDuration;
20526
20527 LookbackConfiguration();
20528
20529 LookbackConfiguration.fromJson(core.Map _json) {
20530 if (_json.containsKey("clickDuration")) {
20531 clickDuration = _json["clickDuration"];
20532 }
20533 if (_json.containsKey("postImpressionActivitiesDuration")) {
20534 postImpressionActivitiesDuration = _json["postImpressionActivitiesDuration "];
20535 }
20536 }
20537
20538 core.Map toJson() {
20539 var _json = new core.Map();
20540 if (clickDuration != null) {
20541 _json["clickDuration"] = clickDuration;
20542 }
20543 if (postImpressionActivitiesDuration != null) {
20544 _json["postImpressionActivitiesDuration"] = postImpressionActivitiesDurati on;
20545 }
20546 return _json;
20547 }
20548 }
20549
20550 /** Represents a metric. */
20551 class Metric {
20552 /** The kind of resource this is, in this case dfareporting#metric. */
20553 core.String kind;
20554 /** The metric name, e.g. dfa:impressions */
20555 core.String name;
20556
20557 Metric();
20558
20559 Metric.fromJson(core.Map _json) {
20560 if (_json.containsKey("kind")) {
20561 kind = _json["kind"];
20562 }
20563 if (_json.containsKey("name")) {
20564 name = _json["name"];
20565 }
20566 }
20567
20568 core.Map toJson() {
20569 var _json = new core.Map();
20570 if (kind != null) {
20571 _json["kind"] = kind;
20572 }
20573 if (name != null) {
20574 _json["name"] = name;
20575 }
20576 return _json;
20577 }
20578 }
20579
20580 /** Contains information about a metro region that can be targeted by ads. */
20581 class Metro {
20582 /** Country code of the country to which this metro region belongs. */
20583 core.String countryCode;
20584 /** DART ID of the country to which this metro region belongs. */
20585 core.String countryDartId;
20586 /** DART ID of this metro region. */
20587 core.String dartId;
20588 /**
20589 * DMA ID of this metro region. This is the ID used for targeting and
20590 * generating reports, and is equivalent to metro_code.
20591 */
20592 core.String dmaId;
20593 /**
20594 * Identifies what kind of resource this is. Value: the fixed string
20595 * "dfareporting#metro".
20596 */
20597 core.String kind;
20598 /** Metro code of this metro region. This is equivalent to dma_id. */
20599 core.String metroCode;
20600 /** Name of this metro region. */
20601 core.String name;
20602
20603 Metro();
20604
20605 Metro.fromJson(core.Map _json) {
20606 if (_json.containsKey("countryCode")) {
20607 countryCode = _json["countryCode"];
20608 }
20609 if (_json.containsKey("countryDartId")) {
20610 countryDartId = _json["countryDartId"];
20611 }
20612 if (_json.containsKey("dartId")) {
20613 dartId = _json["dartId"];
20614 }
20615 if (_json.containsKey("dmaId")) {
20616 dmaId = _json["dmaId"];
20617 }
20618 if (_json.containsKey("kind")) {
20619 kind = _json["kind"];
20620 }
20621 if (_json.containsKey("metroCode")) {
20622 metroCode = _json["metroCode"];
20623 }
20624 if (_json.containsKey("name")) {
20625 name = _json["name"];
20626 }
20627 }
20628
20629 core.Map toJson() {
20630 var _json = new core.Map();
20631 if (countryCode != null) {
20632 _json["countryCode"] = countryCode;
20633 }
20634 if (countryDartId != null) {
20635 _json["countryDartId"] = countryDartId;
20636 }
20637 if (dartId != null) {
20638 _json["dartId"] = dartId;
20639 }
20640 if (dmaId != null) {
20641 _json["dmaId"] = dmaId;
20642 }
20643 if (kind != null) {
20644 _json["kind"] = kind;
20645 }
20646 if (metroCode != null) {
20647 _json["metroCode"] = metroCode;
20648 }
20649 if (name != null) {
20650 _json["name"] = name;
20651 }
20652 return _json;
20653 }
20654 }
20655
20656 /** Metro List Response */
20657 class MetrosListResponse {
20658 /**
20659 * Identifies what kind of resource this is. Value: the fixed string
20660 * "dfareporting#metrosListResponse".
20661 */
20662 core.String kind;
20663 /** Metro collection. */
20664 core.List<Metro> metros;
20665
20666 MetrosListResponse();
20667
20668 MetrosListResponse.fromJson(core.Map _json) {
20669 if (_json.containsKey("kind")) {
20670 kind = _json["kind"];
20671 }
20672 if (_json.containsKey("metros")) {
20673 metros = _json["metros"].map((value) => new Metro.fromJson(value)).toList( );
20674 }
20675 }
20676
20677 core.Map toJson() {
20678 var _json = new core.Map();
20679 if (kind != null) {
20680 _json["kind"] = kind;
20681 }
20682 if (metros != null) {
20683 _json["metros"] = metros.map((value) => (value).toJson()).toList();
20684 }
20685 return _json;
20686 }
20687 }
20688
20689 /** Contains information about a mobile carrier that can be targeted by ads. */
20690 class MobileCarrier {
20691 /** Country code of the country to which this mobile carrier belongs. */
20692 core.String countryCode;
20693 /** DART ID of the country to which this mobile carrier belongs. */
20694 core.String countryDartId;
20695 /** ID of this mobile carrier. */
20696 core.String id;
20697 /**
20698 * Identifies what kind of resource this is. Value: the fixed string
20699 * "dfareporting#mobileCarrier".
20700 */
20701 core.String kind;
20702 /** Name of this mobile carrier. */
20703 core.String name;
20704
20705 MobileCarrier();
20706
20707 MobileCarrier.fromJson(core.Map _json) {
20708 if (_json.containsKey("countryCode")) {
20709 countryCode = _json["countryCode"];
20710 }
20711 if (_json.containsKey("countryDartId")) {
20712 countryDartId = _json["countryDartId"];
20713 }
20714 if (_json.containsKey("id")) {
20715 id = _json["id"];
20716 }
20717 if (_json.containsKey("kind")) {
20718 kind = _json["kind"];
20719 }
20720 if (_json.containsKey("name")) {
20721 name = _json["name"];
20722 }
20723 }
20724
20725 core.Map toJson() {
20726 var _json = new core.Map();
20727 if (countryCode != null) {
20728 _json["countryCode"] = countryCode;
20729 }
20730 if (countryDartId != null) {
20731 _json["countryDartId"] = countryDartId;
20732 }
20733 if (id != null) {
20734 _json["id"] = id;
20735 }
20736 if (kind != null) {
20737 _json["kind"] = kind;
20738 }
20739 if (name != null) {
20740 _json["name"] = name;
20741 }
20742 return _json;
20743 }
20744 }
20745
20746 /** Mobile Carrier List Response */
20747 class MobileCarriersListResponse {
20748 /**
20749 * Identifies what kind of resource this is. Value: the fixed string
20750 * "dfareporting#mobileCarriersListResponse".
20751 */
20752 core.String kind;
20753 /** Mobile carrier collection. */
20754 core.List<MobileCarrier> mobileCarriers;
20755
20756 MobileCarriersListResponse();
20757
20758 MobileCarriersListResponse.fromJson(core.Map _json) {
20759 if (_json.containsKey("kind")) {
20760 kind = _json["kind"];
20761 }
20762 if (_json.containsKey("mobileCarriers")) {
20763 mobileCarriers = _json["mobileCarriers"].map((value) => new MobileCarrier. fromJson(value)).toList();
20764 }
20765 }
20766
20767 core.Map toJson() {
20768 var _json = new core.Map();
20769 if (kind != null) {
20770 _json["kind"] = kind;
20771 }
20772 if (mobileCarriers != null) {
20773 _json["mobileCarriers"] = mobileCarriers.map((value) => (value).toJson()). toList();
20774 }
20775 return _json;
20776 }
20777 }
20778
20779 /** Object Filter. */
20780 class ObjectFilter {
20781 /**
20782 * Identifies what kind of resource this is. Value: the fixed string
20783 * "dfareporting#objectFilter".
20784 */
20785 core.String kind;
20786 /**
20787 * Applicable when status is ASSIGNED. The user has access to objects with
20788 * these object IDs.
20789 */
20790 core.List<core.String> objectIds;
20791 /**
20792 * Status of the filter. NONE means the user has access to none of the
20793 * objects. ALL means the user has access to all objects. ASSIGNED means the
20794 * user has access to the objects with IDs in the objectIds list.
20795 * Possible string values are:
20796 * - "ALL"
20797 * - "ASSIGNED"
20798 * - "NONE"
20799 */
20800 core.String status;
20801
20802 ObjectFilter();
20803
20804 ObjectFilter.fromJson(core.Map _json) {
20805 if (_json.containsKey("kind")) {
20806 kind = _json["kind"];
20807 }
20808 if (_json.containsKey("objectIds")) {
20809 objectIds = _json["objectIds"];
20810 }
20811 if (_json.containsKey("status")) {
20812 status = _json["status"];
20813 }
20814 }
20815
20816 core.Map toJson() {
20817 var _json = new core.Map();
20818 if (kind != null) {
20819 _json["kind"] = kind;
20820 }
20821 if (objectIds != null) {
20822 _json["objectIds"] = objectIds;
20823 }
20824 if (status != null) {
20825 _json["status"] = status;
20826 }
20827 return _json;
20828 }
20829 }
20830
20831 /** Offset Position. */
20832 class OffsetPosition {
20833 /** Offset distance from left side of an asset or a window. */
20834 core.int left;
20835 /** Offset distance from top side of an asset or a window. */
20836 core.int top;
20837
20838 OffsetPosition();
20839
20840 OffsetPosition.fromJson(core.Map _json) {
20841 if (_json.containsKey("left")) {
20842 left = _json["left"];
20843 }
20844 if (_json.containsKey("top")) {
20845 top = _json["top"];
20846 }
20847 }
20848
20849 core.Map toJson() {
20850 var _json = new core.Map();
20851 if (left != null) {
20852 _json["left"] = left;
20853 }
20854 if (top != null) {
20855 _json["top"] = top;
20856 }
20857 return _json;
20858 }
20859 }
20860
20861 /** Omniture Integration Settings. */
20862 class OmnitureSettings {
20863 /**
20864 * Whether placement cost data will be sent to Omniture. This property can be
20865 * enabled only if omnitureIntegrationEnabled is true.
20866 */
20867 core.bool omnitureCostDataEnabled;
20868 /**
20869 * Whether Omniture integration is enabled. This property can be enabled only
20870 * when the "Advanced Ad Serving" account setting is enabled.
20871 */
20872 core.bool omnitureIntegrationEnabled;
20873
20874 OmnitureSettings();
20875
20876 OmnitureSettings.fromJson(core.Map _json) {
20877 if (_json.containsKey("omnitureCostDataEnabled")) {
20878 omnitureCostDataEnabled = _json["omnitureCostDataEnabled"];
20879 }
20880 if (_json.containsKey("omnitureIntegrationEnabled")) {
20881 omnitureIntegrationEnabled = _json["omnitureIntegrationEnabled"];
20882 }
20883 }
20884
20885 core.Map toJson() {
20886 var _json = new core.Map();
20887 if (omnitureCostDataEnabled != null) {
20888 _json["omnitureCostDataEnabled"] = omnitureCostDataEnabled;
20889 }
20890 if (omnitureIntegrationEnabled != null) {
20891 _json["omnitureIntegrationEnabled"] = omnitureIntegrationEnabled;
20892 }
20893 return _json;
20894 }
20895 }
20896
20897 /**
20898 * Contains information about an operating system that can be targeted by ads.
20899 */
20900 class OperatingSystem {
20901 /** DART ID of this operating system. This is the ID used for targeting. */
20902 core.String dartId;
20903 /** Whether this operating system is for desktop. */
20904 core.bool desktop;
20905 /**
20906 * Identifies what kind of resource this is. Value: the fixed string
20907 * "dfareporting#operatingSystem".
20908 */
20909 core.String kind;
20910 /** Whether this operating system is for mobile. */
20911 core.bool mobile;
20912 /** Name of this operating system. */
20913 core.String name;
20914
20915 OperatingSystem();
20916
20917 OperatingSystem.fromJson(core.Map _json) {
20918 if (_json.containsKey("dartId")) {
20919 dartId = _json["dartId"];
20920 }
20921 if (_json.containsKey("desktop")) {
20922 desktop = _json["desktop"];
20923 }
20924 if (_json.containsKey("kind")) {
20925 kind = _json["kind"];
20926 }
20927 if (_json.containsKey("mobile")) {
20928 mobile = _json["mobile"];
20929 }
20930 if (_json.containsKey("name")) {
20931 name = _json["name"];
20932 }
20933 }
20934
20935 core.Map toJson() {
20936 var _json = new core.Map();
20937 if (dartId != null) {
20938 _json["dartId"] = dartId;
20939 }
20940 if (desktop != null) {
20941 _json["desktop"] = desktop;
20942 }
20943 if (kind != null) {
20944 _json["kind"] = kind;
20945 }
20946 if (mobile != null) {
20947 _json["mobile"] = mobile;
20948 }
20949 if (name != null) {
20950 _json["name"] = name;
20951 }
20952 return _json;
20953 }
20954 }
20955
20956 /**
20957 * Contains information about a particular version of an operating system that
20958 * can be targeted by ads.
20959 */
20960 class OperatingSystemVersion {
20961 /** ID of this operating system version. */
20962 core.String id;
20963 /**
20964 * Identifies what kind of resource this is. Value: the fixed string
20965 * "dfareporting#operatingSystemVersion".
20966 */
20967 core.String kind;
20968 /** Major version (leftmost number) of this operating system version. */
20969 core.String majorVersion;
20970 /**
20971 * Minor version (number after the first dot) of this operating system
20972 * version.
20973 */
20974 core.String minorVersion;
20975 /** Name of this operating system version. */
20976 core.String name;
20977 /** Operating system of this operating system version. */
20978 OperatingSystem operatingSystem;
20979
20980 OperatingSystemVersion();
20981
20982 OperatingSystemVersion.fromJson(core.Map _json) {
20983 if (_json.containsKey("id")) {
20984 id = _json["id"];
20985 }
20986 if (_json.containsKey("kind")) {
20987 kind = _json["kind"];
20988 }
20989 if (_json.containsKey("majorVersion")) {
20990 majorVersion = _json["majorVersion"];
20991 }
20992 if (_json.containsKey("minorVersion")) {
20993 minorVersion = _json["minorVersion"];
20994 }
20995 if (_json.containsKey("name")) {
20996 name = _json["name"];
20997 }
20998 if (_json.containsKey("operatingSystem")) {
20999 operatingSystem = new OperatingSystem.fromJson(_json["operatingSystem"]);
21000 }
21001 }
21002
21003 core.Map toJson() {
21004 var _json = new core.Map();
21005 if (id != null) {
21006 _json["id"] = id;
21007 }
21008 if (kind != null) {
21009 _json["kind"] = kind;
21010 }
21011 if (majorVersion != null) {
21012 _json["majorVersion"] = majorVersion;
21013 }
21014 if (minorVersion != null) {
21015 _json["minorVersion"] = minorVersion;
21016 }
21017 if (name != null) {
21018 _json["name"] = name;
21019 }
21020 if (operatingSystem != null) {
21021 _json["operatingSystem"] = (operatingSystem).toJson();
21022 }
21023 return _json;
21024 }
21025 }
21026
21027 /** Operating System Version List Response */
21028 class OperatingSystemVersionsListResponse {
21029 /**
21030 * Identifies what kind of resource this is. Value: the fixed string
21031 * "dfareporting#operatingSystemVersionsListResponse".
21032 */
21033 core.String kind;
21034 /** Operating system version collection. */
21035 core.List<OperatingSystemVersion> operatingSystemVersions;
21036
21037 OperatingSystemVersionsListResponse();
21038
21039 OperatingSystemVersionsListResponse.fromJson(core.Map _json) {
21040 if (_json.containsKey("kind")) {
21041 kind = _json["kind"];
21042 }
21043 if (_json.containsKey("operatingSystemVersions")) {
21044 operatingSystemVersions = _json["operatingSystemVersions"].map((value) => new OperatingSystemVersion.fromJson(value)).toList();
21045 }
21046 }
21047
21048 core.Map toJson() {
21049 var _json = new core.Map();
21050 if (kind != null) {
21051 _json["kind"] = kind;
21052 }
21053 if (operatingSystemVersions != null) {
21054 _json["operatingSystemVersions"] = operatingSystemVersions.map((value) => (value).toJson()).toList();
21055 }
21056 return _json;
21057 }
21058 }
21059
21060 /** Operating System List Response */
21061 class OperatingSystemsListResponse {
21062 /**
21063 * Identifies what kind of resource this is. Value: the fixed string
21064 * "dfareporting#operatingSystemsListResponse".
21065 */
21066 core.String kind;
21067 /** Operating system collection. */
21068 core.List<OperatingSystem> operatingSystems;
21069
21070 OperatingSystemsListResponse();
21071
21072 OperatingSystemsListResponse.fromJson(core.Map _json) {
21073 if (_json.containsKey("kind")) {
21074 kind = _json["kind"];
21075 }
21076 if (_json.containsKey("operatingSystems")) {
21077 operatingSystems = _json["operatingSystems"].map((value) => new OperatingS ystem.fromJson(value)).toList();
21078 }
21079 }
21080
21081 core.Map toJson() {
21082 var _json = new core.Map();
21083 if (kind != null) {
21084 _json["kind"] = kind;
21085 }
21086 if (operatingSystems != null) {
21087 _json["operatingSystems"] = operatingSystems.map((value) => (value).toJson ()).toList();
21088 }
21089 return _json;
21090 }
21091 }
21092
21093 /** Creative optimization activity. */
21094 class OptimizationActivity {
21095 /**
21096 * Floodlight activity ID of this optimization activity. This is a required
21097 * field.
21098 */
21099 core.String floodlightActivityId;
21100 /**
21101 * Dimension value for the ID of the floodlight activity. This is a read-only,
21102 * auto-generated field.
21103 */
21104 DimensionValue floodlightActivityIdDimensionValue;
21105 /**
21106 * Weight associated with this optimization. Must be greater than 1. The
21107 * weight assigned will be understood in proportion to the weights assigned to
21108 * the other optimization activities.
21109 */
21110 core.int weight;
21111
21112 OptimizationActivity();
21113
21114 OptimizationActivity.fromJson(core.Map _json) {
21115 if (_json.containsKey("floodlightActivityId")) {
21116 floodlightActivityId = _json["floodlightActivityId"];
21117 }
21118 if (_json.containsKey("floodlightActivityIdDimensionValue")) {
21119 floodlightActivityIdDimensionValue = new DimensionValue.fromJson(_json["fl oodlightActivityIdDimensionValue"]);
21120 }
21121 if (_json.containsKey("weight")) {
21122 weight = _json["weight"];
21123 }
21124 }
21125
21126 core.Map toJson() {
21127 var _json = new core.Map();
21128 if (floodlightActivityId != null) {
21129 _json["floodlightActivityId"] = floodlightActivityId;
21130 }
21131 if (floodlightActivityIdDimensionValue != null) {
21132 _json["floodlightActivityIdDimensionValue"] = (floodlightActivityIdDimensi onValue).toJson();
21133 }
21134 if (weight != null) {
21135 _json["weight"] = weight;
21136 }
21137 return _json;
21138 }
21139 }
21140
21141 /** Describes properties of a DoubleClick Planning order. */
21142 class Order {
21143 /** Account ID of this order. */
21144 core.String accountId;
21145 /** Advertiser ID of this order. */
21146 core.String advertiserId;
21147 /** IDs for users that have to approve documents created for this order. */
21148 core.List<core.String> approverUserProfileIds;
21149 /** Buyer invoice ID associated with this order. */
21150 core.String buyerInvoiceId;
21151 /** Name of the buyer organization. */
21152 core.String buyerOrganizationName;
21153 /** Comments in this order. */
21154 core.String comments;
21155 /** Contacts for this order. */
21156 core.List<OrderContact> contacts;
21157 /** ID of this order. This is a read-only, auto-generated field. */
21158 core.String id;
21159 /**
21160 * Identifies what kind of resource this is. Value: the fixed string
21161 * "dfareporting#order".
21162 */
21163 core.String kind;
21164 /** Information about the most recent modification of this order. */
21165 LastModifiedInfo lastModifiedInfo;
21166 /** Name of this order. */
21167 core.String name;
21168 /** Notes of this order. */
21169 core.String notes;
21170 /** ID of the terms and conditions template used in this order. */
21171 core.String planningTermId;
21172 /** Project ID of this order. */
21173 core.String projectId;
21174 /** Seller order ID associated with this order. */
21175 core.String sellerOrderId;
21176 /** Name of the seller organization. */
21177 core.String sellerOrganizationName;
21178 /** Site IDs this order is associated with. */
21179 core.List<core.String> siteId;
21180 /** Free-form site names this order is associated with. */
21181 core.List<core.String> siteNames;
21182 /** Subaccount ID of this order. */
21183 core.String subaccountId;
21184 /** Terms and conditions of this order. */
21185 core.String termsAndConditions;
21186
21187 Order();
21188
21189 Order.fromJson(core.Map _json) {
21190 if (_json.containsKey("accountId")) {
21191 accountId = _json["accountId"];
21192 }
21193 if (_json.containsKey("advertiserId")) {
21194 advertiserId = _json["advertiserId"];
21195 }
21196 if (_json.containsKey("approverUserProfileIds")) {
21197 approverUserProfileIds = _json["approverUserProfileIds"];
21198 }
21199 if (_json.containsKey("buyerInvoiceId")) {
21200 buyerInvoiceId = _json["buyerInvoiceId"];
21201 }
21202 if (_json.containsKey("buyerOrganizationName")) {
21203 buyerOrganizationName = _json["buyerOrganizationName"];
21204 }
21205 if (_json.containsKey("comments")) {
21206 comments = _json["comments"];
21207 }
21208 if (_json.containsKey("contacts")) {
21209 contacts = _json["contacts"].map((value) => new OrderContact.fromJson(valu e)).toList();
21210 }
21211 if (_json.containsKey("id")) {
21212 id = _json["id"];
21213 }
21214 if (_json.containsKey("kind")) {
21215 kind = _json["kind"];
21216 }
21217 if (_json.containsKey("lastModifiedInfo")) {
21218 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"] );
21219 }
21220 if (_json.containsKey("name")) {
21221 name = _json["name"];
21222 }
21223 if (_json.containsKey("notes")) {
21224 notes = _json["notes"];
21225 }
21226 if (_json.containsKey("planningTermId")) {
21227 planningTermId = _json["planningTermId"];
21228 }
21229 if (_json.containsKey("projectId")) {
21230 projectId = _json["projectId"];
21231 }
21232 if (_json.containsKey("sellerOrderId")) {
21233 sellerOrderId = _json["sellerOrderId"];
21234 }
21235 if (_json.containsKey("sellerOrganizationName")) {
21236 sellerOrganizationName = _json["sellerOrganizationName"];
21237 }
21238 if (_json.containsKey("siteId")) {
21239 siteId = _json["siteId"];
21240 }
21241 if (_json.containsKey("siteNames")) {
21242 siteNames = _json["siteNames"];
21243 }
21244 if (_json.containsKey("subaccountId")) {
21245 subaccountId = _json["subaccountId"];
21246 }
21247 if (_json.containsKey("termsAndConditions")) {
21248 termsAndConditions = _json["termsAndConditions"];
21249 }
21250 }
21251
21252 core.Map toJson() {
21253 var _json = new core.Map();
21254 if (accountId != null) {
21255 _json["accountId"] = accountId;
21256 }
21257 if (advertiserId != null) {
21258 _json["advertiserId"] = advertiserId;
21259 }
21260 if (approverUserProfileIds != null) {
21261 _json["approverUserProfileIds"] = approverUserProfileIds;
21262 }
21263 if (buyerInvoiceId != null) {
21264 _json["buyerInvoiceId"] = buyerInvoiceId;
21265 }
21266 if (buyerOrganizationName != null) {
21267 _json["buyerOrganizationName"] = buyerOrganizationName;
21268 }
21269 if (comments != null) {
21270 _json["comments"] = comments;
21271 }
21272 if (contacts != null) {
21273 _json["contacts"] = contacts.map((value) => (value).toJson()).toList();
21274 }
21275 if (id != null) {
21276 _json["id"] = id;
21277 }
21278 if (kind != null) {
21279 _json["kind"] = kind;
21280 }
21281 if (lastModifiedInfo != null) {
21282 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson();
21283 }
21284 if (name != null) {
21285 _json["name"] = name;
21286 }
21287 if (notes != null) {
21288 _json["notes"] = notes;
21289 }
21290 if (planningTermId != null) {
21291 _json["planningTermId"] = planningTermId;
21292 }
21293 if (projectId != null) {
21294 _json["projectId"] = projectId;
21295 }
21296 if (sellerOrderId != null) {
21297 _json["sellerOrderId"] = sellerOrderId;
21298 }
21299 if (sellerOrganizationName != null) {
21300 _json["sellerOrganizationName"] = sellerOrganizationName;
21301 }
21302 if (siteId != null) {
21303 _json["siteId"] = siteId;
21304 }
21305 if (siteNames != null) {
21306 _json["siteNames"] = siteNames;
21307 }
21308 if (subaccountId != null) {
21309 _json["subaccountId"] = subaccountId;
21310 }
21311 if (termsAndConditions != null) {
21312 _json["termsAndConditions"] = termsAndConditions;
21313 }
21314 return _json;
21315 }
21316 }
21317
21318 /** Contact of an order. */
21319 class OrderContact {
21320 /**
21321 * Free-form information about this contact. It could be any information
21322 * related to this contact in addition to type, title, name, and signature
21323 * user profile ID.
21324 */
21325 core.String contactInfo;
21326 /** Name of this contact. */
21327 core.String contactName;
21328 /** Title of this contact. */
21329 core.String contactTitle;
21330 /**
21331 * Type of this contact.
21332 * Possible string values are:
21333 * - "PLANNING_ORDER_CONTACT_BUYER_BILLING_CONTACT"
21334 * - "PLANNING_ORDER_CONTACT_BUYER_CONTACT"
21335 * - "PLANNING_ORDER_CONTACT_SELLER_CONTACT"
21336 */
21337 core.String contactType;
21338 /**
21339 * ID of the user profile containing the signature that will be embedded into
21340 * order documents.
21341 */
21342 core.String signatureUserProfileId;
21343
21344 OrderContact();
21345
21346 OrderContact.fromJson(core.Map _json) {
21347 if (_json.containsKey("contactInfo")) {
21348 contactInfo = _json["contactInfo"];
21349 }
21350 if (_json.containsKey("contactName")) {
21351 contactName = _json["contactName"];
21352 }
21353 if (_json.containsKey("contactTitle")) {
21354 contactTitle = _json["contactTitle"];
21355 }
21356 if (_json.containsKey("contactType")) {
21357 contactType = _json["contactType"];
21358 }
21359 if (_json.containsKey("signatureUserProfileId")) {
21360 signatureUserProfileId = _json["signatureUserProfileId"];
21361 }
21362 }
21363
21364 core.Map toJson() {
21365 var _json = new core.Map();
21366 if (contactInfo != null) {
21367 _json["contactInfo"] = contactInfo;
21368 }
21369 if (contactName != null) {
21370 _json["contactName"] = contactName;
21371 }
21372 if (contactTitle != null) {
21373 _json["contactTitle"] = contactTitle;
21374 }
21375 if (contactType != null) {
21376 _json["contactType"] = contactType;
21377 }
21378 if (signatureUserProfileId != null) {
21379 _json["signatureUserProfileId"] = signatureUserProfileId;
21380 }
21381 return _json;
21382 }
21383 }
21384
21385 /** Contains properties of a DoubleClick Planning order document. */
21386 class OrderDocument {
21387 /** Account ID of this order document. */
21388 core.String accountId;
21389 /** Advertiser ID of this order document. */
21390 core.String advertiserId;
21391 /**
21392 * The amended order document ID of this order document. An order document can
21393 * be created by optionally amending another order document so that the change
21394 * history can be preserved.
21395 */
21396 core.String amendedOrderDocumentId;
21397 /** IDs of users who have approved this order document. */
21398 core.List<core.String> approvedByUserProfileIds;
21399 /** Whether this order document is cancelled. */
21400 core.bool cancelled;
21401 /** Information about the creation of this order document. */
21402 LastModifiedInfo createdInfo;
21403 /** Effective date of this order document. */
21404 core.DateTime effectiveDate;
21405 /** ID of this order document. */
21406 core.String id;
21407 /**
21408 * Identifies what kind of resource this is. Value: the fixed string
21409 * "dfareporting#orderDocument".
21410 */
21411 core.String kind;
21412 /** List of email addresses that received the last sent document. */
21413 core.List<core.String> lastSentRecipients;
21414 /** Timestamp of the last email sent with this order document. */
21415 core.DateTime lastSentTime;
21416 /** ID of the order from which this order document is created. */
21417 core.String orderId;
21418 /** Project ID of this order document. */
21419 core.String projectId;
21420 /** Whether this order document has been signed. */
21421 core.bool signed;
21422 /** Subaccount ID of this order document. */
21423 core.String subaccountId;
21424 /** Title of this order document. */
21425 core.String title;
21426 /**
21427 * Type of this order document
21428 * Possible string values are:
21429 * - "PLANNING_ORDER_TYPE_CHANGE_ORDER"
21430 * - "PLANNING_ORDER_TYPE_INSERTION_ORDER"
21431 */
21432 core.String type;
21433
21434 OrderDocument();
21435
21436 OrderDocument.fromJson(core.Map _json) {
21437 if (_json.containsKey("accountId")) {
21438 accountId = _json["accountId"];
21439 }
21440 if (_json.containsKey("advertiserId")) {
21441 advertiserId = _json["advertiserId"];
21442 }
21443 if (_json.containsKey("amendedOrderDocumentId")) {
21444 amendedOrderDocumentId = _json["amendedOrderDocumentId"];
21445 }
21446 if (_json.containsKey("approvedByUserProfileIds")) {
21447 approvedByUserProfileIds = _json["approvedByUserProfileIds"];
21448 }
21449 if (_json.containsKey("cancelled")) {
21450 cancelled = _json["cancelled"];
21451 }
21452 if (_json.containsKey("createdInfo")) {
21453 createdInfo = new LastModifiedInfo.fromJson(_json["createdInfo"]);
21454 }
21455 if (_json.containsKey("effectiveDate")) {
21456 effectiveDate = core.DateTime.parse(_json["effectiveDate"]);
21457 }
21458 if (_json.containsKey("id")) {
21459 id = _json["id"];
21460 }
21461 if (_json.containsKey("kind")) {
21462 kind = _json["kind"];
21463 }
21464 if (_json.containsKey("lastSentRecipients")) {
21465 lastSentRecipients = _json["lastSentRecipients"];
21466 }
21467 if (_json.containsKey("lastSentTime")) {
21468 lastSentTime = core.DateTime.parse(_json["lastSentTime"]);
21469 }
21470 if (_json.containsKey("orderId")) {
21471 orderId = _json["orderId"];
21472 }
21473 if (_json.containsKey("projectId")) {
21474 projectId = _json["projectId"];
21475 }
21476 if (_json.containsKey("signed")) {
21477 signed = _json["signed"];
21478 }
21479 if (_json.containsKey("subaccountId")) {
21480 subaccountId = _json["subaccountId"];
21481 }
21482 if (_json.containsKey("title")) {
21483 title = _json["title"];
21484 }
21485 if (_json.containsKey("type")) {
21486 type = _json["type"];
21487 }
21488 }
21489
21490 core.Map toJson() {
21491 var _json = new core.Map();
21492 if (accountId != null) {
21493 _json["accountId"] = accountId;
21494 }
21495 if (advertiserId != null) {
21496 _json["advertiserId"] = advertiserId;
21497 }
21498 if (amendedOrderDocumentId != null) {
21499 _json["amendedOrderDocumentId"] = amendedOrderDocumentId;
21500 }
21501 if (approvedByUserProfileIds != null) {
21502 _json["approvedByUserProfileIds"] = approvedByUserProfileIds;
21503 }
21504 if (cancelled != null) {
21505 _json["cancelled"] = cancelled;
21506 }
21507 if (createdInfo != null) {
21508 _json["createdInfo"] = (createdInfo).toJson();
21509 }
21510 if (effectiveDate != null) {
21511 _json["effectiveDate"] = "${(effectiveDate).year.toString().padLeft(4, '0' )}-${(effectiveDate).month.toString().padLeft(2, '0')}-${(effectiveDate).day.toS tring().padLeft(2, '0')}";
21512 }
21513 if (id != null) {
21514 _json["id"] = id;
21515 }
21516 if (kind != null) {
21517 _json["kind"] = kind;
21518 }
21519 if (lastSentRecipients != null) {
21520 _json["lastSentRecipients"] = lastSentRecipients;
21521 }
21522 if (lastSentTime != null) {
21523 _json["lastSentTime"] = (lastSentTime).toIso8601String();
21524 }
21525 if (orderId != null) {
21526 _json["orderId"] = orderId;
21527 }
21528 if (projectId != null) {
21529 _json["projectId"] = projectId;
21530 }
21531 if (signed != null) {
21532 _json["signed"] = signed;
21533 }
21534 if (subaccountId != null) {
21535 _json["subaccountId"] = subaccountId;
21536 }
21537 if (title != null) {
21538 _json["title"] = title;
21539 }
21540 if (type != null) {
21541 _json["type"] = type;
21542 }
21543 return _json;
21544 }
21545 }
21546
21547 /** Order document List Response */
21548 class OrderDocumentsListResponse {
21549 /**
21550 * Identifies what kind of resource this is. Value: the fixed string
21551 * "dfareporting#orderDocumentsListResponse".
21552 */
21553 core.String kind;
21554 /** Pagination token to be used for the next list operation. */
21555 core.String nextPageToken;
21556 /** Order document collection */
21557 core.List<OrderDocument> orderDocuments;
21558
21559 OrderDocumentsListResponse();
21560
21561 OrderDocumentsListResponse.fromJson(core.Map _json) {
21562 if (_json.containsKey("kind")) {
21563 kind = _json["kind"];
21564 }
21565 if (_json.containsKey("nextPageToken")) {
21566 nextPageToken = _json["nextPageToken"];
21567 }
21568 if (_json.containsKey("orderDocuments")) {
21569 orderDocuments = _json["orderDocuments"].map((value) => new OrderDocument. fromJson(value)).toList();
21570 }
21571 }
21572
21573 core.Map toJson() {
21574 var _json = new core.Map();
21575 if (kind != null) {
21576 _json["kind"] = kind;
21577 }
21578 if (nextPageToken != null) {
21579 _json["nextPageToken"] = nextPageToken;
21580 }
21581 if (orderDocuments != null) {
21582 _json["orderDocuments"] = orderDocuments.map((value) => (value).toJson()). toList();
21583 }
21584 return _json;
21585 }
21586 }
21587
21588 /** Order List Response */
21589 class OrdersListResponse {
21590 /**
21591 * Identifies what kind of resource this is. Value: the fixed string
21592 * "dfareporting#ordersListResponse".
21593 */
21594 core.String kind;
21595 /** Pagination token to be used for the next list operation. */
21596 core.String nextPageToken;
21597 /** Order collection. */
21598 core.List<Order> orders;
21599
21600 OrdersListResponse();
21601
21602 OrdersListResponse.fromJson(core.Map _json) {
21603 if (_json.containsKey("kind")) {
21604 kind = _json["kind"];
21605 }
21606 if (_json.containsKey("nextPageToken")) {
21607 nextPageToken = _json["nextPageToken"];
21608 }
21609 if (_json.containsKey("orders")) {
21610 orders = _json["orders"].map((value) => new Order.fromJson(value)).toList( );
21611 }
21612 }
21613
21614 core.Map toJson() {
21615 var _json = new core.Map();
21616 if (kind != null) {
21617 _json["kind"] = kind;
21618 }
21619 if (nextPageToken != null) {
21620 _json["nextPageToken"] = nextPageToken;
21621 }
21622 if (orders != null) {
21623 _json["orders"] = orders.map((value) => (value).toJson()).toList();
21624 }
21625 return _json;
21626 }
21627 }
21628
21629 /**
21630 * Represents fields that are compatible to be selected for a report of type
21631 * "PATH_TO_CONVERSION".
21632 */
21633 class PathToConversionReportCompatibleFields {
21634 /**
21635 * Conversion dimensions which are compatible to be selected in the
21636 * "conversionDimensions" section of the report.
21637 */
21638 core.List<Dimension> conversionDimensions;
21639 /**
21640 * Custom floodlight variables which are compatible to be selected in the
21641 * "customFloodlightVariables" section of the report.
21642 */
21643 core.List<Dimension> customFloodlightVariables;
21644 /**
21645 * The kind of resource this is, in this case
21646 * dfareporting#pathToConversionReportCompatibleFields.
21647 */
21648 core.String kind;
21649 /**
21650 * Metrics which are compatible to be selected in the "metricNames" section of
21651 * the report.
21652 */
21653 core.List<Metric> metrics;
21654 /**
21655 * Per-interaction dimensions which are compatible to be selected in the
21656 * "perInteractionDimensions" section of the report.
21657 */
21658 core.List<Dimension> perInteractionDimensions;
21659
21660 PathToConversionReportCompatibleFields();
21661
21662 PathToConversionReportCompatibleFields.fromJson(core.Map _json) {
21663 if (_json.containsKey("conversionDimensions")) {
21664 conversionDimensions = _json["conversionDimensions"].map((value) => new Di mension.fromJson(value)).toList();
21665 }
21666 if (_json.containsKey("customFloodlightVariables")) {
21667 customFloodlightVariables = _json["customFloodlightVariables"].map((value) => new Dimension.fromJson(value)).toList();
21668 }
21669 if (_json.containsKey("kind")) {
21670 kind = _json["kind"];
21671 }
21672 if (_json.containsKey("metrics")) {
21673 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi st();
21674 }
21675 if (_json.containsKey("perInteractionDimensions")) {
21676 perInteractionDimensions = _json["perInteractionDimensions"].map((value) = > new Dimension.fromJson(value)).toList();
21677 }
21678 }
21679
21680 core.Map toJson() {
21681 var _json = new core.Map();
21682 if (conversionDimensions != null) {
21683 _json["conversionDimensions"] = conversionDimensions.map((value) => (value ).toJson()).toList();
21684 }
21685 if (customFloodlightVariables != null) {
21686 _json["customFloodlightVariables"] = customFloodlightVariables.map((value) => (value).toJson()).toList();
21687 }
21688 if (kind != null) {
21689 _json["kind"] = kind;
21690 }
21691 if (metrics != null) {
21692 _json["metrics"] = metrics.map((value) => (value).toJson()).toList();
21693 }
21694 if (perInteractionDimensions != null) {
21695 _json["perInteractionDimensions"] = perInteractionDimensions.map((value) = > (value).toJson()).toList();
21696 }
21697 return _json;
21698 }
21699 }
21700
21701 /** Contains properties of a placement. */
21702 class Placement {
21703 /** Account ID of this placement. This field can be left blank. */
21704 core.String accountId;
21705 /** Advertiser ID of this placement. This field can be left blank. */
21706 core.String advertiserId;
21707 /**
21708 * Dimension value for the ID of the advertiser. This is a read-only,
21709 * auto-generated field.
21710 */
21711 DimensionValue advertiserIdDimensionValue;
21712 /** Whether this placement is archived. */
21713 core.bool archived;
21714 /**
21715 * Campaign ID of this placement. This field is a required field on insertion.
21716 */
21717 core.String campaignId;
21718 /**
21719 * Dimension value for the ID of the campaign. This is a read-only,
21720 * auto-generated field.
21721 */
21722 DimensionValue campaignIdDimensionValue;
21723 /** Comments for this placement. */
21724 core.String comment;
21725 /**
21726 * Placement compatibility. DISPLAY and DISPLAY_INTERSTITIAL refer to
21727 * rendering on desktop, on mobile devices or in mobile apps for regular or
21728 * interstitial ads respectively. APP and APP_INTERSTITIAL are no longer
21729 * allowed for new placement insertions. Instead, use DISPLAY or
21730 * DISPLAY_INTERSTITIAL. IN_STREAM_VIDEO refers to rendering in in-stream
21731 * video ads developed with the VAST standard. This field is required on
21732 * insertion.
21733 * Possible string values are:
21734 * - "APP"
21735 * - "APP_INTERSTITIAL"
21736 * - "DISPLAY"
21737 * - "DISPLAY_INTERSTITIAL"
21738 * - "IN_STREAM_VIDEO"
21739 */
21740 core.String compatibility;
21741 /** ID of the content category assigned to this placement. */
21742 core.String contentCategoryId;
21743 /**
21744 * Information about the creation of this placement. This is a read-only
21745 * field.
21746 */
21747 LastModifiedInfo createInfo;
21748 /**
21749 * Directory site ID of this placement. On insert, you must set either this
21750 * field or the siteId field to specify the site associated with this
21751 * placement. This is a required field that is read-only after insertion.
21752 */
21753 core.String directorySiteId;
21754 /**
21755 * Dimension value for the ID of the directory site. This is a read-only,
21756 * auto-generated field.
21757 */
21758 DimensionValue directorySiteIdDimensionValue;
21759 /** External ID for this placement. */
21760 core.String externalId;
21761 /** ID of this placement. This is a read-only, auto-generated field. */
21762 core.String id;
21763 /**
21764 * Dimension value for the ID of this placement. This is a read-only,
21765 * auto-generated field.
21766 */
21767 DimensionValue idDimensionValue;
21768 /** Key name of this placement. This is a read-only, auto-generated field. */
21769 core.String keyName;
21770 /**
21771 * Identifies what kind of resource this is. Value: the fixed string
21772 * "dfareporting#placement".
21773 */
21774 core.String kind;
21775 /**
21776 * Information about the most recent modification of this placement. This is a
21777 * read-only field.
21778 */
21779 LastModifiedInfo lastModifiedInfo;
21780 /** Lookback window settings for this placement. */
21781 LookbackConfiguration lookbackConfiguration;
21782 /**
21783 * Name of this placement.This is a required field and must be less than 256
21784 * characters long.
21785 */
21786 core.String name;
21787 /**
21788 * Whether payment was approved for this placement. This is a read-only field
21789 * relevant only to publisher-paid placements.
21790 */
21791 core.bool paymentApproved;
21792 /**
21793 * Payment source for this placement. This is a required field that is
21794 * read-only after insertion.
21795 * Possible string values are:
21796 * - "PLACEMENT_AGENCY_PAID"
21797 * - "PLACEMENT_PUBLISHER_PAID"
21798 */
21799 core.String paymentSource;
21800 /** ID of this placement's group, if applicable. */
21801 core.String placementGroupId;
21802 /**
21803 * Dimension value for the ID of the placement group. This is a read-only,
21804 * auto-generated field.
21805 */
21806 DimensionValue placementGroupIdDimensionValue;
21807 /** ID of the placement strategy assigned to this placement. */
21808 core.String placementStrategyId;
21809 /**
21810 * Pricing schedule of this placement. This field is required on insertion,
21811 * specifically subfields startDate, endDate and pricingType.
21812 */
21813 PricingSchedule pricingSchedule;
21814 /**
21815 * Whether this placement is the primary placement of a roadblock (placement
21816 * group). You cannot change this field from true to false. Setting this field
21817 * to true will automatically set the primary field on the original primary
21818 * placement of the roadblock to false, and it will automatically set the
21819 * roadblock's primaryPlacementId field to the ID of this placement.
21820 */
21821 core.bool primary;
21822 /**
21823 * Information about the last publisher update. This is a read-only field.
21824 */
21825 LastModifiedInfo publisherUpdateInfo;
21826 /**
21827 * Site ID associated with this placement. On insert, you must set either this
21828 * field or the directorySiteId field to specify the site associated with this
21829 * placement. This is a required field that is read-only after insertion.
21830 */
21831 core.String siteId;
21832 /**
21833 * Dimension value for the ID of the site. This is a read-only, auto-generated
21834 * field.
21835 */
21836 DimensionValue siteIdDimensionValue;
21837 /**
21838 * Size associated with this placement. When inserting or updating a
21839 * placement, only the size ID field is used. This field is required on
21840 * insertion.
21841 */
21842 Size size;
21843 /** Whether creatives assigned to this placement must be SSL-compliant. */
21844 core.bool sslRequired;
21845 /**
21846 * Third-party placement status.
21847 * Possible string values are:
21848 * - "ACKNOWLEDGE_ACCEPTANCE"
21849 * - "ACKNOWLEDGE_REJECTION"
21850 * - "DRAFT"
21851 * - "PAYMENT_ACCEPTED"
21852 * - "PAYMENT_REJECTED"
21853 * - "PENDING_REVIEW"
21854 */
21855 core.String status;
21856 /** Subaccount ID of this placement. This field can be left blank. */
21857 core.String subaccountId;
21858 /**
21859 * Tag formats to generate for this placement. This field is required on
21860 * insertion.
21861 * Acceptable values are:
21862 * - "PLACEMENT_TAG_STANDARD"
21863 * - "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
21864 * - "PLACEMENT_TAG_IFRAME_ILAYER"
21865 * - "PLACEMENT_TAG_INTERNAL_REDIRECT"
21866 * - "PLACEMENT_TAG_JAVASCRIPT"
21867 * - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
21868 * - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
21869 * - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
21870 * - "PLACEMENT_TAG_CLICK_COMMANDS"
21871 * - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
21872 * - "PLACEMENT_TAG_TRACKING"
21873 * - "PLACEMENT_TAG_TRACKING_IFRAME"
21874 * - "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
21875 */
21876 core.List<core.String> tagFormats;
21877 /** Tag settings for this placement. */
21878 TagSetting tagSetting;
21879
21880 Placement();
21881
21882 Placement.fromJson(core.Map _json) {
21883 if (_json.containsKey("accountId")) {
21884 accountId = _json["accountId"];
21885 }
21886 if (_json.containsKey("advertiserId")) {
21887 advertiserId = _json["advertiserId"];
21888 }
21889 if (_json.containsKey("advertiserIdDimensionValue")) {
21890 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
21891 }
21892 if (_json.containsKey("archived")) {
21893 archived = _json["archived"];
21894 }
21895 if (_json.containsKey("campaignId")) {
21896 campaignId = _json["campaignId"];
21897 }
21898 if (_json.containsKey("campaignIdDimensionValue")) {
21899 campaignIdDimensionValue = new DimensionValue.fromJson(_json["campaignIdDi mensionValue"]);
21900 }
21901 if (_json.containsKey("comment")) {
21902 comment = _json["comment"];
21903 }
21904 if (_json.containsKey("compatibility")) {
21905 compatibility = _json["compatibility"];
21906 }
21907 if (_json.containsKey("contentCategoryId")) {
21908 contentCategoryId = _json["contentCategoryId"];
21909 }
21910 if (_json.containsKey("createInfo")) {
21911 createInfo = new LastModifiedInfo.fromJson(_json["createInfo"]);
21912 }
21913 if (_json.containsKey("directorySiteId")) {
21914 directorySiteId = _json["directorySiteId"];
21915 }
21916 if (_json.containsKey("directorySiteIdDimensionValue")) {
21917 directorySiteIdDimensionValue = new DimensionValue.fromJson(_json["directo rySiteIdDimensionValue"]);
21918 }
21919 if (_json.containsKey("externalId")) {
21920 externalId = _json["externalId"];
21921 }
21922 if (_json.containsKey("id")) {
21923 id = _json["id"];
21924 }
21925 if (_json.containsKey("idDimensionValue")) {
21926 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
21927 }
21928 if (_json.containsKey("keyName")) {
21929 keyName = _json["keyName"];
21930 }
21931 if (_json.containsKey("kind")) {
21932 kind = _json["kind"];
21933 }
21934 if (_json.containsKey("lastModifiedInfo")) {
21935 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"] );
21936 }
21937 if (_json.containsKey("lookbackConfiguration")) {
21938 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback Configuration"]);
21939 }
21940 if (_json.containsKey("name")) {
21941 name = _json["name"];
21942 }
21943 if (_json.containsKey("paymentApproved")) {
21944 paymentApproved = _json["paymentApproved"];
21945 }
21946 if (_json.containsKey("paymentSource")) {
21947 paymentSource = _json["paymentSource"];
21948 }
21949 if (_json.containsKey("placementGroupId")) {
21950 placementGroupId = _json["placementGroupId"];
21951 }
21952 if (_json.containsKey("placementGroupIdDimensionValue")) {
21953 placementGroupIdDimensionValue = new DimensionValue.fromJson(_json["placem entGroupIdDimensionValue"]);
21954 }
21955 if (_json.containsKey("placementStrategyId")) {
21956 placementStrategyId = _json["placementStrategyId"];
21957 }
21958 if (_json.containsKey("pricingSchedule")) {
21959 pricingSchedule = new PricingSchedule.fromJson(_json["pricingSchedule"]);
21960 }
21961 if (_json.containsKey("primary")) {
21962 primary = _json["primary"];
21963 }
21964 if (_json.containsKey("publisherUpdateInfo")) {
21965 publisherUpdateInfo = new LastModifiedInfo.fromJson(_json["publisherUpdate Info"]);
21966 }
21967 if (_json.containsKey("siteId")) {
21968 siteId = _json["siteId"];
21969 }
21970 if (_json.containsKey("siteIdDimensionValue")) {
21971 siteIdDimensionValue = new DimensionValue.fromJson(_json["siteIdDimensionV alue"]);
21972 }
21973 if (_json.containsKey("size")) {
21974 size = new Size.fromJson(_json["size"]);
21975 }
21976 if (_json.containsKey("sslRequired")) {
21977 sslRequired = _json["sslRequired"];
21978 }
21979 if (_json.containsKey("status")) {
21980 status = _json["status"];
21981 }
21982 if (_json.containsKey("subaccountId")) {
21983 subaccountId = _json["subaccountId"];
21984 }
21985 if (_json.containsKey("tagFormats")) {
21986 tagFormats = _json["tagFormats"];
21987 }
21988 if (_json.containsKey("tagSetting")) {
21989 tagSetting = new TagSetting.fromJson(_json["tagSetting"]);
21990 }
21991 }
21992
21993 core.Map toJson() {
21994 var _json = new core.Map();
21995 if (accountId != null) {
21996 _json["accountId"] = accountId;
21997 }
21998 if (advertiserId != null) {
21999 _json["advertiserId"] = advertiserId;
22000 }
22001 if (advertiserIdDimensionValue != null) {
22002 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
22003 }
22004 if (archived != null) {
22005 _json["archived"] = archived;
22006 }
22007 if (campaignId != null) {
22008 _json["campaignId"] = campaignId;
22009 }
22010 if (campaignIdDimensionValue != null) {
22011 _json["campaignIdDimensionValue"] = (campaignIdDimensionValue).toJson();
22012 }
22013 if (comment != null) {
22014 _json["comment"] = comment;
22015 }
22016 if (compatibility != null) {
22017 _json["compatibility"] = compatibility;
22018 }
22019 if (contentCategoryId != null) {
22020 _json["contentCategoryId"] = contentCategoryId;
22021 }
22022 if (createInfo != null) {
22023 _json["createInfo"] = (createInfo).toJson();
22024 }
22025 if (directorySiteId != null) {
22026 _json["directorySiteId"] = directorySiteId;
22027 }
22028 if (directorySiteIdDimensionValue != null) {
22029 _json["directorySiteIdDimensionValue"] = (directorySiteIdDimensionValue).t oJson();
22030 }
22031 if (externalId != null) {
22032 _json["externalId"] = externalId;
22033 }
22034 if (id != null) {
22035 _json["id"] = id;
22036 }
22037 if (idDimensionValue != null) {
22038 _json["idDimensionValue"] = (idDimensionValue).toJson();
22039 }
22040 if (keyName != null) {
22041 _json["keyName"] = keyName;
22042 }
22043 if (kind != null) {
22044 _json["kind"] = kind;
22045 }
22046 if (lastModifiedInfo != null) {
22047 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson();
22048 }
22049 if (lookbackConfiguration != null) {
22050 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson();
22051 }
22052 if (name != null) {
22053 _json["name"] = name;
22054 }
22055 if (paymentApproved != null) {
22056 _json["paymentApproved"] = paymentApproved;
22057 }
22058 if (paymentSource != null) {
22059 _json["paymentSource"] = paymentSource;
22060 }
22061 if (placementGroupId != null) {
22062 _json["placementGroupId"] = placementGroupId;
22063 }
22064 if (placementGroupIdDimensionValue != null) {
22065 _json["placementGroupIdDimensionValue"] = (placementGroupIdDimensionValue) .toJson();
22066 }
22067 if (placementStrategyId != null) {
22068 _json["placementStrategyId"] = placementStrategyId;
22069 }
22070 if (pricingSchedule != null) {
22071 _json["pricingSchedule"] = (pricingSchedule).toJson();
22072 }
22073 if (primary != null) {
22074 _json["primary"] = primary;
22075 }
22076 if (publisherUpdateInfo != null) {
22077 _json["publisherUpdateInfo"] = (publisherUpdateInfo).toJson();
22078 }
22079 if (siteId != null) {
22080 _json["siteId"] = siteId;
22081 }
22082 if (siteIdDimensionValue != null) {
22083 _json["siteIdDimensionValue"] = (siteIdDimensionValue).toJson();
22084 }
22085 if (size != null) {
22086 _json["size"] = (size).toJson();
22087 }
22088 if (sslRequired != null) {
22089 _json["sslRequired"] = sslRequired;
22090 }
22091 if (status != null) {
22092 _json["status"] = status;
22093 }
22094 if (subaccountId != null) {
22095 _json["subaccountId"] = subaccountId;
22096 }
22097 if (tagFormats != null) {
22098 _json["tagFormats"] = tagFormats;
22099 }
22100 if (tagSetting != null) {
22101 _json["tagSetting"] = (tagSetting).toJson();
22102 }
22103 return _json;
22104 }
22105 }
22106
22107 /** Placement Assignment. */
22108 class PlacementAssignment {
22109 /**
22110 * Whether this placement assignment is active. When true, the placement will
22111 * be included in the ad's rotation.
22112 */
22113 core.bool active;
22114 /** ID of the placement to be assigned. This is a required field. */
22115 core.String placementId;
22116 /**
22117 * Dimension value for the ID of the placement. This is a read-only,
22118 * auto-generated field.
22119 */
22120 DimensionValue placementIdDimensionValue;
22121 /**
22122 * Whether the placement to be assigned requires SSL. This is a read-only
22123 * field that is auto-generated when the ad is inserted or updated.
22124 */
22125 core.bool sslRequired;
22126
22127 PlacementAssignment();
22128
22129 PlacementAssignment.fromJson(core.Map _json) {
22130 if (_json.containsKey("active")) {
22131 active = _json["active"];
22132 }
22133 if (_json.containsKey("placementId")) {
22134 placementId = _json["placementId"];
22135 }
22136 if (_json.containsKey("placementIdDimensionValue")) {
22137 placementIdDimensionValue = new DimensionValue.fromJson(_json["placementId DimensionValue"]);
22138 }
22139 if (_json.containsKey("sslRequired")) {
22140 sslRequired = _json["sslRequired"];
22141 }
22142 }
22143
22144 core.Map toJson() {
22145 var _json = new core.Map();
22146 if (active != null) {
22147 _json["active"] = active;
22148 }
22149 if (placementId != null) {
22150 _json["placementId"] = placementId;
22151 }
22152 if (placementIdDimensionValue != null) {
22153 _json["placementIdDimensionValue"] = (placementIdDimensionValue).toJson();
22154 }
22155 if (sslRequired != null) {
22156 _json["sslRequired"] = sslRequired;
22157 }
22158 return _json;
22159 }
22160 }
22161
22162 /** Contains properties of a package or roadblock. */
22163 class PlacementGroup {
22164 /**
22165 * Account ID of this placement group. This is a read-only field that can be
22166 * left blank.
22167 */
22168 core.String accountId;
22169 /**
22170 * Advertiser ID of this placement group. This is a required field on
22171 * insertion.
22172 */
22173 core.String advertiserId;
22174 /**
22175 * Dimension value for the ID of the advertiser. This is a read-only,
22176 * auto-generated field.
22177 */
22178 DimensionValue advertiserIdDimensionValue;
22179 /** Whether this placement group is archived. */
22180 core.bool archived;
22181 /**
22182 * Campaign ID of this placement group. This field is required on insertion.
22183 */
22184 core.String campaignId;
22185 /**
22186 * Dimension value for the ID of the campaign. This is a read-only,
22187 * auto-generated field.
22188 */
22189 DimensionValue campaignIdDimensionValue;
22190 /**
22191 * IDs of placements which are assigned to this placement group. This is a
22192 * read-only, auto-generated field.
22193 */
22194 core.List<core.String> childPlacementIds;
22195 /** Comments for this placement group. */
22196 core.String comment;
22197 /** ID of the content category assigned to this placement group. */
22198 core.String contentCategoryId;
22199 /**
22200 * Information about the creation of this placement group. This is a read-only
22201 * field.
22202 */
22203 LastModifiedInfo createInfo;
22204 /**
22205 * Directory site ID associated with this placement group. On insert, you must
22206 * set either this field or the site_id field to specify the site associated
22207 * with this placement group. This is a required field that is read-only after
22208 * insertion.
22209 */
22210 core.String directorySiteId;
22211 /**
22212 * Dimension value for the ID of the directory site. This is a read-only,
22213 * auto-generated field.
22214 */
22215 DimensionValue directorySiteIdDimensionValue;
22216 /** External ID for this placement. */
22217 core.String externalId;
22218 /** ID of this placement group. This is a read-only, auto-generated field. */
22219 core.String id;
22220 /**
22221 * Dimension value for the ID of this placement group. This is a read-only,
22222 * auto-generated field.
22223 */
22224 DimensionValue idDimensionValue;
22225 /**
22226 * Identifies what kind of resource this is. Value: the fixed string
22227 * "dfareporting#placementGroup".
22228 */
22229 core.String kind;
22230 /**
22231 * Information about the most recent modification of this placement group.
22232 * This is a read-only field.
22233 */
22234 LastModifiedInfo lastModifiedInfo;
22235 /**
22236 * Name of this placement group. This is a required field and must be less
22237 * than 256 characters long.
22238 */
22239 core.String name;
22240 /**
22241 * Type of this placement group. A package is a simple group of placements
22242 * that acts as a single pricing point for a group of tags. A roadblock is a
22243 * group of placements that not only acts as a single pricing point, but also
22244 * assumes that all the tags in it will be served at the same time. A
22245 * roadblock requires one of its assigned placements to be marked as primary
22246 * for reporting. This field is required on insertion.
22247 * Possible string values are:
22248 * - "PLACEMENT_PACKAGE"
22249 * - "PLACEMENT_ROADBLOCK"
22250 */
22251 core.String placementGroupType;
22252 /** ID of the placement strategy assigned to this placement group. */
22253 core.String placementStrategyId;
22254 /**
22255 * Pricing schedule of this placement group. This field is required on
22256 * insertion.
22257 */
22258 PricingSchedule pricingSchedule;
22259 /**
22260 * ID of the primary placement, used to calculate the media cost of a
22261 * roadblock (placement group). Modifying this field will automatically modify
22262 * the primary field on all affected roadblock child placements.
22263 */
22264 core.String primaryPlacementId;
22265 /**
22266 * Dimension value for the ID of the primary placement. This is a read-only,
22267 * auto-generated field.
22268 */
22269 DimensionValue primaryPlacementIdDimensionValue;
22270 /**
22271 * Site ID associated with this placement group. On insert, you must set
22272 * either this field or the directorySiteId field to specify the site
22273 * associated with this placement group. This is a required field that is
22274 * read-only after insertion.
22275 */
22276 core.String siteId;
22277 /**
22278 * Dimension value for the ID of the site. This is a read-only, auto-generated
22279 * field.
22280 */
22281 DimensionValue siteIdDimensionValue;
22282 /**
22283 * Subaccount ID of this placement group. This is a read-only field that can
22284 * be left blank.
22285 */
22286 core.String subaccountId;
22287
22288 PlacementGroup();
22289
22290 PlacementGroup.fromJson(core.Map _json) {
22291 if (_json.containsKey("accountId")) {
22292 accountId = _json["accountId"];
22293 }
22294 if (_json.containsKey("advertiserId")) {
22295 advertiserId = _json["advertiserId"];
22296 }
22297 if (_json.containsKey("advertiserIdDimensionValue")) {
22298 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
22299 }
22300 if (_json.containsKey("archived")) {
22301 archived = _json["archived"];
22302 }
22303 if (_json.containsKey("campaignId")) {
22304 campaignId = _json["campaignId"];
22305 }
22306 if (_json.containsKey("campaignIdDimensionValue")) {
22307 campaignIdDimensionValue = new DimensionValue.fromJson(_json["campaignIdDi mensionValue"]);
22308 }
22309 if (_json.containsKey("childPlacementIds")) {
22310 childPlacementIds = _json["childPlacementIds"];
22311 }
22312 if (_json.containsKey("comment")) {
22313 comment = _json["comment"];
22314 }
22315 if (_json.containsKey("contentCategoryId")) {
22316 contentCategoryId = _json["contentCategoryId"];
22317 }
22318 if (_json.containsKey("createInfo")) {
22319 createInfo = new LastModifiedInfo.fromJson(_json["createInfo"]);
22320 }
22321 if (_json.containsKey("directorySiteId")) {
22322 directorySiteId = _json["directorySiteId"];
22323 }
22324 if (_json.containsKey("directorySiteIdDimensionValue")) {
22325 directorySiteIdDimensionValue = new DimensionValue.fromJson(_json["directo rySiteIdDimensionValue"]);
22326 }
22327 if (_json.containsKey("externalId")) {
22328 externalId = _json["externalId"];
22329 }
22330 if (_json.containsKey("id")) {
22331 id = _json["id"];
22332 }
22333 if (_json.containsKey("idDimensionValue")) {
22334 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
22335 }
22336 if (_json.containsKey("kind")) {
22337 kind = _json["kind"];
22338 }
22339 if (_json.containsKey("lastModifiedInfo")) {
22340 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"] );
22341 }
22342 if (_json.containsKey("name")) {
22343 name = _json["name"];
22344 }
22345 if (_json.containsKey("placementGroupType")) {
22346 placementGroupType = _json["placementGroupType"];
22347 }
22348 if (_json.containsKey("placementStrategyId")) {
22349 placementStrategyId = _json["placementStrategyId"];
22350 }
22351 if (_json.containsKey("pricingSchedule")) {
22352 pricingSchedule = new PricingSchedule.fromJson(_json["pricingSchedule"]);
22353 }
22354 if (_json.containsKey("primaryPlacementId")) {
22355 primaryPlacementId = _json["primaryPlacementId"];
22356 }
22357 if (_json.containsKey("primaryPlacementIdDimensionValue")) {
22358 primaryPlacementIdDimensionValue = new DimensionValue.fromJson(_json["prim aryPlacementIdDimensionValue"]);
22359 }
22360 if (_json.containsKey("siteId")) {
22361 siteId = _json["siteId"];
22362 }
22363 if (_json.containsKey("siteIdDimensionValue")) {
22364 siteIdDimensionValue = new DimensionValue.fromJson(_json["siteIdDimensionV alue"]);
22365 }
22366 if (_json.containsKey("subaccountId")) {
22367 subaccountId = _json["subaccountId"];
22368 }
22369 }
22370
22371 core.Map toJson() {
22372 var _json = new core.Map();
22373 if (accountId != null) {
22374 _json["accountId"] = accountId;
22375 }
22376 if (advertiserId != null) {
22377 _json["advertiserId"] = advertiserId;
22378 }
22379 if (advertiserIdDimensionValue != null) {
22380 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
22381 }
22382 if (archived != null) {
22383 _json["archived"] = archived;
22384 }
22385 if (campaignId != null) {
22386 _json["campaignId"] = campaignId;
22387 }
22388 if (campaignIdDimensionValue != null) {
22389 _json["campaignIdDimensionValue"] = (campaignIdDimensionValue).toJson();
22390 }
22391 if (childPlacementIds != null) {
22392 _json["childPlacementIds"] = childPlacementIds;
22393 }
22394 if (comment != null) {
22395 _json["comment"] = comment;
22396 }
22397 if (contentCategoryId != null) {
22398 _json["contentCategoryId"] = contentCategoryId;
22399 }
22400 if (createInfo != null) {
22401 _json["createInfo"] = (createInfo).toJson();
22402 }
22403 if (directorySiteId != null) {
22404 _json["directorySiteId"] = directorySiteId;
22405 }
22406 if (directorySiteIdDimensionValue != null) {
22407 _json["directorySiteIdDimensionValue"] = (directorySiteIdDimensionValue).t oJson();
22408 }
22409 if (externalId != null) {
22410 _json["externalId"] = externalId;
22411 }
22412 if (id != null) {
22413 _json["id"] = id;
22414 }
22415 if (idDimensionValue != null) {
22416 _json["idDimensionValue"] = (idDimensionValue).toJson();
22417 }
22418 if (kind != null) {
22419 _json["kind"] = kind;
22420 }
22421 if (lastModifiedInfo != null) {
22422 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson();
22423 }
22424 if (name != null) {
22425 _json["name"] = name;
22426 }
22427 if (placementGroupType != null) {
22428 _json["placementGroupType"] = placementGroupType;
22429 }
22430 if (placementStrategyId != null) {
22431 _json["placementStrategyId"] = placementStrategyId;
22432 }
22433 if (pricingSchedule != null) {
22434 _json["pricingSchedule"] = (pricingSchedule).toJson();
22435 }
22436 if (primaryPlacementId != null) {
22437 _json["primaryPlacementId"] = primaryPlacementId;
22438 }
22439 if (primaryPlacementIdDimensionValue != null) {
22440 _json["primaryPlacementIdDimensionValue"] = (primaryPlacementIdDimensionVa lue).toJson();
22441 }
22442 if (siteId != null) {
22443 _json["siteId"] = siteId;
22444 }
22445 if (siteIdDimensionValue != null) {
22446 _json["siteIdDimensionValue"] = (siteIdDimensionValue).toJson();
22447 }
22448 if (subaccountId != null) {
22449 _json["subaccountId"] = subaccountId;
22450 }
22451 return _json;
22452 }
22453 }
22454
22455 /** Placement Group List Response */
22456 class PlacementGroupsListResponse {
22457 /**
22458 * Identifies what kind of resource this is. Value: the fixed string
22459 * "dfareporting#placementGroupsListResponse".
22460 */
22461 core.String kind;
22462 /** Pagination token to be used for the next list operation. */
22463 core.String nextPageToken;
22464 /** Placement group collection. */
22465 core.List<PlacementGroup> placementGroups;
22466
22467 PlacementGroupsListResponse();
22468
22469 PlacementGroupsListResponse.fromJson(core.Map _json) {
22470 if (_json.containsKey("kind")) {
22471 kind = _json["kind"];
22472 }
22473 if (_json.containsKey("nextPageToken")) {
22474 nextPageToken = _json["nextPageToken"];
22475 }
22476 if (_json.containsKey("placementGroups")) {
22477 placementGroups = _json["placementGroups"].map((value) => new PlacementGro up.fromJson(value)).toList();
22478 }
22479 }
22480
22481 core.Map toJson() {
22482 var _json = new core.Map();
22483 if (kind != null) {
22484 _json["kind"] = kind;
22485 }
22486 if (nextPageToken != null) {
22487 _json["nextPageToken"] = nextPageToken;
22488 }
22489 if (placementGroups != null) {
22490 _json["placementGroups"] = placementGroups.map((value) => (value).toJson() ).toList();
22491 }
22492 return _json;
22493 }
22494 }
22495
22496 /** Placement Strategy List Response */
22497 class PlacementStrategiesListResponse {
22498 /**
22499 * Identifies what kind of resource this is. Value: the fixed string
22500 * "dfareporting#placementStrategiesListResponse".
22501 */
22502 core.String kind;
22503 /** Pagination token to be used for the next list operation. */
22504 core.String nextPageToken;
22505 /** Placement strategy collection. */
22506 core.List<PlacementStrategy> placementStrategies;
22507
22508 PlacementStrategiesListResponse();
22509
22510 PlacementStrategiesListResponse.fromJson(core.Map _json) {
22511 if (_json.containsKey("kind")) {
22512 kind = _json["kind"];
22513 }
22514 if (_json.containsKey("nextPageToken")) {
22515 nextPageToken = _json["nextPageToken"];
22516 }
22517 if (_json.containsKey("placementStrategies")) {
22518 placementStrategies = _json["placementStrategies"].map((value) => new Plac ementStrategy.fromJson(value)).toList();
22519 }
22520 }
22521
22522 core.Map toJson() {
22523 var _json = new core.Map();
22524 if (kind != null) {
22525 _json["kind"] = kind;
22526 }
22527 if (nextPageToken != null) {
22528 _json["nextPageToken"] = nextPageToken;
22529 }
22530 if (placementStrategies != null) {
22531 _json["placementStrategies"] = placementStrategies.map((value) => (value). toJson()).toList();
22532 }
22533 return _json;
22534 }
22535 }
22536
22537 /** Contains properties of a placement strategy. */
22538 class PlacementStrategy {
22539 /**
22540 * Account ID of this placement strategy.This is a read-only field that can be
22541 * left blank.
22542 */
22543 core.String accountId;
22544 /**
22545 * ID of this placement strategy. This is a read-only, auto-generated field.
22546 */
22547 core.String id;
22548 /**
22549 * Identifies what kind of resource this is. Value: the fixed string
22550 * "dfareporting#placementStrategy".
22551 */
22552 core.String kind;
22553 /**
22554 * Name of this placement strategy. This is a required field. It must be less
22555 * than 256 characters long and unique among placement strategies of the same
22556 * account.
22557 */
22558 core.String name;
22559
22560 PlacementStrategy();
22561
22562 PlacementStrategy.fromJson(core.Map _json) {
22563 if (_json.containsKey("accountId")) {
22564 accountId = _json["accountId"];
22565 }
22566 if (_json.containsKey("id")) {
22567 id = _json["id"];
22568 }
22569 if (_json.containsKey("kind")) {
22570 kind = _json["kind"];
22571 }
22572 if (_json.containsKey("name")) {
22573 name = _json["name"];
22574 }
22575 }
22576
22577 core.Map toJson() {
22578 var _json = new core.Map();
22579 if (accountId != null) {
22580 _json["accountId"] = accountId;
22581 }
22582 if (id != null) {
22583 _json["id"] = id;
22584 }
22585 if (kind != null) {
22586 _json["kind"] = kind;
22587 }
22588 if (name != null) {
22589 _json["name"] = name;
22590 }
22591 return _json;
22592 }
22593 }
22594
22595 /** Placement Tag */
22596 class PlacementTag {
22597 /** Placement ID */
22598 core.String placementId;
22599 /** Tags generated for this placement. */
22600 core.List<TagData> tagDatas;
22601
22602 PlacementTag();
22603
22604 PlacementTag.fromJson(core.Map _json) {
22605 if (_json.containsKey("placementId")) {
22606 placementId = _json["placementId"];
22607 }
22608 if (_json.containsKey("tagDatas")) {
22609 tagDatas = _json["tagDatas"].map((value) => new TagData.fromJson(value)).t oList();
22610 }
22611 }
22612
22613 core.Map toJson() {
22614 var _json = new core.Map();
22615 if (placementId != null) {
22616 _json["placementId"] = placementId;
22617 }
22618 if (tagDatas != null) {
22619 _json["tagDatas"] = tagDatas.map((value) => (value).toJson()).toList();
22620 }
22621 return _json;
22622 }
22623 }
22624
22625 /** Placement GenerateTags Response */
22626 class PlacementsGenerateTagsResponse {
22627 /**
22628 * Identifies what kind of resource this is. Value: the fixed string
22629 * "dfareporting#placementsGenerateTagsResponse".
22630 */
22631 core.String kind;
22632 /** Set of generated tags for the specified placements. */
22633 core.List<PlacementTag> placementTags;
22634
22635 PlacementsGenerateTagsResponse();
22636
22637 PlacementsGenerateTagsResponse.fromJson(core.Map _json) {
22638 if (_json.containsKey("kind")) {
22639 kind = _json["kind"];
22640 }
22641 if (_json.containsKey("placementTags")) {
22642 placementTags = _json["placementTags"].map((value) => new PlacementTag.fro mJson(value)).toList();
22643 }
22644 }
22645
22646 core.Map toJson() {
22647 var _json = new core.Map();
22648 if (kind != null) {
22649 _json["kind"] = kind;
22650 }
22651 if (placementTags != null) {
22652 _json["placementTags"] = placementTags.map((value) => (value).toJson()).to List();
22653 }
22654 return _json;
22655 }
22656 }
22657
22658 /** Placement List Response */
22659 class PlacementsListResponse {
22660 /**
22661 * Identifies what kind of resource this is. Value: the fixed string
22662 * "dfareporting#placementsListResponse".
22663 */
22664 core.String kind;
22665 /** Pagination token to be used for the next list operation. */
22666 core.String nextPageToken;
22667 /** Placement collection. */
22668 core.List<Placement> placements;
22669
22670 PlacementsListResponse();
22671
22672 PlacementsListResponse.fromJson(core.Map _json) {
22673 if (_json.containsKey("kind")) {
22674 kind = _json["kind"];
22675 }
22676 if (_json.containsKey("nextPageToken")) {
22677 nextPageToken = _json["nextPageToken"];
22678 }
22679 if (_json.containsKey("placements")) {
22680 placements = _json["placements"].map((value) => new Placement.fromJson(val ue)).toList();
22681 }
22682 }
22683
22684 core.Map toJson() {
22685 var _json = new core.Map();
22686 if (kind != null) {
22687 _json["kind"] = kind;
22688 }
22689 if (nextPageToken != null) {
22690 _json["nextPageToken"] = nextPageToken;
22691 }
22692 if (placements != null) {
22693 _json["placements"] = placements.map((value) => (value).toJson()).toList() ;
22694 }
22695 return _json;
22696 }
22697 }
22698
22699 /** Contains information about a platform type that can be targeted by ads. */
22700 class PlatformType {
22701 /** ID of this platform type. */
22702 core.String id;
22703 /**
22704 * Identifies what kind of resource this is. Value: the fixed string
22705 * "dfareporting#platformType".
22706 */
22707 core.String kind;
22708 /** Name of this platform type. */
22709 core.String name;
22710
22711 PlatformType();
22712
22713 PlatformType.fromJson(core.Map _json) {
22714 if (_json.containsKey("id")) {
22715 id = _json["id"];
22716 }
22717 if (_json.containsKey("kind")) {
22718 kind = _json["kind"];
22719 }
22720 if (_json.containsKey("name")) {
22721 name = _json["name"];
22722 }
22723 }
22724
22725 core.Map toJson() {
22726 var _json = new core.Map();
22727 if (id != null) {
22728 _json["id"] = id;
22729 }
22730 if (kind != null) {
22731 _json["kind"] = kind;
22732 }
22733 if (name != null) {
22734 _json["name"] = name;
22735 }
22736 return _json;
22737 }
22738 }
22739
22740 /** Platform Type List Response */
22741 class PlatformTypesListResponse {
22742 /**
22743 * Identifies what kind of resource this is. Value: the fixed string
22744 * "dfareporting#platformTypesListResponse".
22745 */
22746 core.String kind;
22747 /** Platform type collection. */
22748 core.List<PlatformType> platformTypes;
22749
22750 PlatformTypesListResponse();
22751
22752 PlatformTypesListResponse.fromJson(core.Map _json) {
22753 if (_json.containsKey("kind")) {
22754 kind = _json["kind"];
22755 }
22756 if (_json.containsKey("platformTypes")) {
22757 platformTypes = _json["platformTypes"].map((value) => new PlatformType.fro mJson(value)).toList();
22758 }
22759 }
22760
22761 core.Map toJson() {
22762 var _json = new core.Map();
22763 if (kind != null) {
22764 _json["kind"] = kind;
22765 }
22766 if (platformTypes != null) {
22767 _json["platformTypes"] = platformTypes.map((value) => (value).toJson()).to List();
22768 }
22769 return _json;
22770 }
22771 }
22772
22773 /** Popup Window Properties. */
22774 class PopupWindowProperties {
22775 /**
22776 * Popup dimension for a creative. This is a read-only field. Applicable to
22777 * the following creative types: all RICH_MEDIA and all VPAID
22778 */
22779 Size dimension;
22780 /**
22781 * Upper-left corner coordinates of the popup window. Applicable if
22782 * positionType is COORDINATES.
22783 */
22784 OffsetPosition offset;
22785 /**
22786 * Popup window position either centered or at specific coordinate.
22787 * Possible string values are:
22788 * - "CENTER"
22789 * - "COORDINATES"
22790 */
22791 core.String positionType;
22792 /** Whether to display the browser address bar. */
22793 core.bool showAddressBar;
22794 /** Whether to display the browser menu bar. */
22795 core.bool showMenuBar;
22796 /** Whether to display the browser scroll bar. */
22797 core.bool showScrollBar;
22798 /** Whether to display the browser status bar. */
22799 core.bool showStatusBar;
22800 /** Whether to display the browser tool bar. */
22801 core.bool showToolBar;
22802 /** Title of popup window. */
22803 core.String title;
22804
22805 PopupWindowProperties();
22806
22807 PopupWindowProperties.fromJson(core.Map _json) {
22808 if (_json.containsKey("dimension")) {
22809 dimension = new Size.fromJson(_json["dimension"]);
22810 }
22811 if (_json.containsKey("offset")) {
22812 offset = new OffsetPosition.fromJson(_json["offset"]);
22813 }
22814 if (_json.containsKey("positionType")) {
22815 positionType = _json["positionType"];
22816 }
22817 if (_json.containsKey("showAddressBar")) {
22818 showAddressBar = _json["showAddressBar"];
22819 }
22820 if (_json.containsKey("showMenuBar")) {
22821 showMenuBar = _json["showMenuBar"];
22822 }
22823 if (_json.containsKey("showScrollBar")) {
22824 showScrollBar = _json["showScrollBar"];
22825 }
22826 if (_json.containsKey("showStatusBar")) {
22827 showStatusBar = _json["showStatusBar"];
22828 }
22829 if (_json.containsKey("showToolBar")) {
22830 showToolBar = _json["showToolBar"];
22831 }
22832 if (_json.containsKey("title")) {
22833 title = _json["title"];
22834 }
22835 }
22836
22837 core.Map toJson() {
22838 var _json = new core.Map();
22839 if (dimension != null) {
22840 _json["dimension"] = (dimension).toJson();
22841 }
22842 if (offset != null) {
22843 _json["offset"] = (offset).toJson();
22844 }
22845 if (positionType != null) {
22846 _json["positionType"] = positionType;
22847 }
22848 if (showAddressBar != null) {
22849 _json["showAddressBar"] = showAddressBar;
22850 }
22851 if (showMenuBar != null) {
22852 _json["showMenuBar"] = showMenuBar;
22853 }
22854 if (showScrollBar != null) {
22855 _json["showScrollBar"] = showScrollBar;
22856 }
22857 if (showStatusBar != null) {
22858 _json["showStatusBar"] = showStatusBar;
22859 }
22860 if (showToolBar != null) {
22861 _json["showToolBar"] = showToolBar;
22862 }
22863 if (title != null) {
22864 _json["title"] = title;
22865 }
22866 return _json;
22867 }
22868 }
22869
22870 /** Contains information about a postal code that can be targeted by ads. */
22871 class PostalCode {
22872 /** Postal code. This is equivalent to the id field. */
22873 core.String code;
22874 /** Country code of the country to which this postal code belongs. */
22875 core.String countryCode;
22876 /** DART ID of the country to which this postal code belongs. */
22877 core.String countryDartId;
22878 /** ID of this postal code. */
22879 core.String id;
22880 /**
22881 * Identifies what kind of resource this is. Value: the fixed string
22882 * "dfareporting#postalCode".
22883 */
22884 core.String kind;
22885
22886 PostalCode();
22887
22888 PostalCode.fromJson(core.Map _json) {
22889 if (_json.containsKey("code")) {
22890 code = _json["code"];
22891 }
22892 if (_json.containsKey("countryCode")) {
22893 countryCode = _json["countryCode"];
22894 }
22895 if (_json.containsKey("countryDartId")) {
22896 countryDartId = _json["countryDartId"];
22897 }
22898 if (_json.containsKey("id")) {
22899 id = _json["id"];
22900 }
22901 if (_json.containsKey("kind")) {
22902 kind = _json["kind"];
22903 }
22904 }
22905
22906 core.Map toJson() {
22907 var _json = new core.Map();
22908 if (code != null) {
22909 _json["code"] = code;
22910 }
22911 if (countryCode != null) {
22912 _json["countryCode"] = countryCode;
22913 }
22914 if (countryDartId != null) {
22915 _json["countryDartId"] = countryDartId;
22916 }
22917 if (id != null) {
22918 _json["id"] = id;
22919 }
22920 if (kind != null) {
22921 _json["kind"] = kind;
22922 }
22923 return _json;
22924 }
22925 }
22926
22927 /** Postal Code List Response */
22928 class PostalCodesListResponse {
22929 /**
22930 * Identifies what kind of resource this is. Value: the fixed string
22931 * "dfareporting#postalCodesListResponse".
22932 */
22933 core.String kind;
22934 /** Postal code collection. */
22935 core.List<PostalCode> postalCodes;
22936
22937 PostalCodesListResponse();
22938
22939 PostalCodesListResponse.fromJson(core.Map _json) {
22940 if (_json.containsKey("kind")) {
22941 kind = _json["kind"];
22942 }
22943 if (_json.containsKey("postalCodes")) {
22944 postalCodes = _json["postalCodes"].map((value) => new PostalCode.fromJson( value)).toList();
22945 }
22946 }
22947
22948 core.Map toJson() {
22949 var _json = new core.Map();
22950 if (kind != null) {
22951 _json["kind"] = kind;
22952 }
22953 if (postalCodes != null) {
22954 _json["postalCodes"] = postalCodes.map((value) => (value).toJson()).toList ();
22955 }
22956 return _json;
22957 }
22958 }
22959
22960 /** Pricing Information */
22961 class Pricing {
22962 /**
22963 * Cap cost type of this inventory item.
22964 * Possible string values are:
22965 * - "PLANNING_PLACEMENT_CAP_COST_TYPE_CUMULATIVE"
22966 * - "PLANNING_PLACEMENT_CAP_COST_TYPE_MONTHLY"
22967 * - "PLANNING_PLACEMENT_CAP_COST_TYPE_NONE"
22968 */
22969 core.String capCostType;
22970 /** End date of this inventory item. */
22971 core.DateTime endDate;
22972 /**
22973 * Flights of this inventory item. A flight (a.k.a. pricing period) represents
22974 * the inventory item pricing information for a specific period of time.
22975 */
22976 core.List<Flight> flights;
22977 /**
22978 * Group type of this inventory item if it represents a placement group. Is
22979 * null otherwise. There are two type of placement groups:
22980 * PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE is a simple group of inventory items
22981 * that acts as a single pricing point for a group of tags.
22982 * PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK is a group of inventory items that
22983 * not only acts as a single pricing point, but also assumes that all the tags
22984 * in it will be served at the same time. A roadblock requires one of its
22985 * assigned inventory items to be marked as primary.
22986 * Possible string values are:
22987 * - "PLANNING_PLACEMENT_GROUP_TYPE_PACKAGE"
22988 * - "PLANNING_PLACEMENT_GROUP_TYPE_ROADBLOCK"
22989 */
22990 core.String groupType;
22991 /**
22992 * Pricing type of this inventory item.
22993 * Possible string values are:
22994 * - "PLANNING_PLACEMENT_PRICING_TYPE_CLICKS"
22995 * - "PLANNING_PLACEMENT_PRICING_TYPE_CPA"
22996 * - "PLANNING_PLACEMENT_PRICING_TYPE_CPC"
22997 * - "PLANNING_PLACEMENT_PRICING_TYPE_CPM"
22998 * - "PLANNING_PLACEMENT_PRICING_TYPE_CPM_ACTIVEVIEW"
22999 * - "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_CLICKS"
23000 * - "PLANNING_PLACEMENT_PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
23001 * - "PLANNING_PLACEMENT_PRICING_TYPE_IMPRESSIONS"
23002 */
23003 core.String pricingType;
23004 /** Start date of this inventory item. */
23005 core.DateTime startDate;
23006
23007 Pricing();
23008
23009 Pricing.fromJson(core.Map _json) {
23010 if (_json.containsKey("capCostType")) {
23011 capCostType = _json["capCostType"];
23012 }
23013 if (_json.containsKey("endDate")) {
23014 endDate = core.DateTime.parse(_json["endDate"]);
23015 }
23016 if (_json.containsKey("flights")) {
23017 flights = _json["flights"].map((value) => new Flight.fromJson(value)).toLi st();
23018 }
23019 if (_json.containsKey("groupType")) {
23020 groupType = _json["groupType"];
23021 }
23022 if (_json.containsKey("pricingType")) {
23023 pricingType = _json["pricingType"];
23024 }
23025 if (_json.containsKey("startDate")) {
23026 startDate = core.DateTime.parse(_json["startDate"]);
23027 }
23028 }
23029
23030 core.Map toJson() {
23031 var _json = new core.Map();
23032 if (capCostType != null) {
23033 _json["capCostType"] = capCostType;
23034 }
23035 if (endDate != null) {
23036 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')} ";
23037 }
23038 if (flights != null) {
23039 _json["flights"] = flights.map((value) => (value).toJson()).toList();
23040 }
23041 if (groupType != null) {
23042 _json["groupType"] = groupType;
23043 }
23044 if (pricingType != null) {
23045 _json["pricingType"] = pricingType;
23046 }
23047 if (startDate != null) {
23048 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft( 2, '0')}";
23049 }
23050 return _json;
23051 }
23052 }
23053
23054 /** Pricing Schedule */
23055 class PricingSchedule {
23056 /**
23057 * Placement cap cost option.
23058 * Possible string values are:
23059 * - "CAP_COST_CUMULATIVE"
23060 * - "CAP_COST_MONTHLY"
23061 * - "CAP_COST_NONE"
23062 */
23063 core.String capCostOption;
23064 /** Whether cap costs are ignored by ad serving. */
23065 core.bool disregardOverdelivery;
23066 /**
23067 * Placement end date. This date must be later than, or the same day as, the
23068 * placement start date, but not later than the campaign end date. If, for
23069 * example, you set 6/25/2015 as both the start and end dates, the effective
23070 * placement date is just that day only, 6/25/2015. The hours, minutes, and
23071 * seconds of the end date should not be set, as doing so will result in an
23072 * error. This field is required on insertion.
23073 */
23074 core.DateTime endDate;
23075 /**
23076 * Whether this placement is flighted. If true, pricing periods will be
23077 * computed automatically.
23078 */
23079 core.bool flighted;
23080 /**
23081 * Floodlight activity ID associated with this placement. This field should be
23082 * set when placement pricing type is set to PRICING_TYPE_CPA.
23083 */
23084 core.String floodlightActivityId;
23085 /** Pricing periods for this placement. */
23086 core.List<PricingSchedulePricingPeriod> pricingPeriods;
23087 /**
23088 * Placement pricing type. This field is required on insertion.
23089 * Possible string values are:
23090 * - "PRICING_TYPE_CPA"
23091 * - "PRICING_TYPE_CPC"
23092 * - "PRICING_TYPE_CPM"
23093 * - "PRICING_TYPE_CPM_ACTIVEVIEW"
23094 * - "PRICING_TYPE_FLAT_RATE_CLICKS"
23095 * - "PRICING_TYPE_FLAT_RATE_IMPRESSIONS"
23096 */
23097 core.String pricingType;
23098 /**
23099 * Placement start date. This date must be later than, or the same day as, the
23100 * campaign start date. The hours, minutes, and seconds of the start date
23101 * should not be set, as doing so will result in an error. This field is
23102 * required on insertion.
23103 */
23104 core.DateTime startDate;
23105 /**
23106 * Testing start date of this placement. The hours, minutes, and seconds of
23107 * the start date should not be set, as doing so will result in an error.
23108 */
23109 core.DateTime testingStartDate;
23110
23111 PricingSchedule();
23112
23113 PricingSchedule.fromJson(core.Map _json) {
23114 if (_json.containsKey("capCostOption")) {
23115 capCostOption = _json["capCostOption"];
23116 }
23117 if (_json.containsKey("disregardOverdelivery")) {
23118 disregardOverdelivery = _json["disregardOverdelivery"];
23119 }
23120 if (_json.containsKey("endDate")) {
23121 endDate = core.DateTime.parse(_json["endDate"]);
23122 }
23123 if (_json.containsKey("flighted")) {
23124 flighted = _json["flighted"];
23125 }
23126 if (_json.containsKey("floodlightActivityId")) {
23127 floodlightActivityId = _json["floodlightActivityId"];
23128 }
23129 if (_json.containsKey("pricingPeriods")) {
23130 pricingPeriods = _json["pricingPeriods"].map((value) => new PricingSchedul ePricingPeriod.fromJson(value)).toList();
23131 }
23132 if (_json.containsKey("pricingType")) {
23133 pricingType = _json["pricingType"];
23134 }
23135 if (_json.containsKey("startDate")) {
23136 startDate = core.DateTime.parse(_json["startDate"]);
23137 }
23138 if (_json.containsKey("testingStartDate")) {
23139 testingStartDate = core.DateTime.parse(_json["testingStartDate"]);
23140 }
23141 }
23142
23143 core.Map toJson() {
23144 var _json = new core.Map();
23145 if (capCostOption != null) {
23146 _json["capCostOption"] = capCostOption;
23147 }
23148 if (disregardOverdelivery != null) {
23149 _json["disregardOverdelivery"] = disregardOverdelivery;
23150 }
23151 if (endDate != null) {
23152 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')} ";
23153 }
23154 if (flighted != null) {
23155 _json["flighted"] = flighted;
23156 }
23157 if (floodlightActivityId != null) {
23158 _json["floodlightActivityId"] = floodlightActivityId;
23159 }
23160 if (pricingPeriods != null) {
23161 _json["pricingPeriods"] = pricingPeriods.map((value) => (value).toJson()). toList();
23162 }
23163 if (pricingType != null) {
23164 _json["pricingType"] = pricingType;
23165 }
23166 if (startDate != null) {
23167 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft( 2, '0')}";
23168 }
23169 if (testingStartDate != null) {
23170 _json["testingStartDate"] = "${(testingStartDate).year.toString().padLeft( 4, '0')}-${(testingStartDate).month.toString().padLeft(2, '0')}-${(testingStartD ate).day.toString().padLeft(2, '0')}";
23171 }
23172 return _json;
23173 }
23174 }
23175
23176 /** Pricing Period */
23177 class PricingSchedulePricingPeriod {
23178 /**
23179 * Pricing period end date. This date must be later than, or the same day as,
23180 * the pricing period start date, but not later than the placement end date.
23181 * The period end date can be the same date as the period start date. If, for
23182 * example, you set 6/25/2015 as both the start and end dates, the effective
23183 * pricing period date is just that day only, 6/25/2015. The hours, minutes,
23184 * and seconds of the end date should not be set, as doing so will result in
23185 * an error.
23186 */
23187 core.DateTime endDate;
23188 /** Comments for this pricing period. */
23189 core.String pricingComment;
23190 /** Rate or cost of this pricing period. */
23191 core.String rateOrCostNanos;
23192 /**
23193 * Pricing period start date. This date must be later than, or the same day
23194 * as, the placement start date. The hours, minutes, and seconds of the start
23195 * date should not be set, as doing so will result in an error.
23196 */
23197 core.DateTime startDate;
23198 /** Units of this pricing period. */
23199 core.String units;
23200
23201 PricingSchedulePricingPeriod();
23202
23203 PricingSchedulePricingPeriod.fromJson(core.Map _json) {
23204 if (_json.containsKey("endDate")) {
23205 endDate = core.DateTime.parse(_json["endDate"]);
23206 }
23207 if (_json.containsKey("pricingComment")) {
23208 pricingComment = _json["pricingComment"];
23209 }
23210 if (_json.containsKey("rateOrCostNanos")) {
23211 rateOrCostNanos = _json["rateOrCostNanos"];
23212 }
23213 if (_json.containsKey("startDate")) {
23214 startDate = core.DateTime.parse(_json["startDate"]);
23215 }
23216 if (_json.containsKey("units")) {
23217 units = _json["units"];
23218 }
23219 }
23220
23221 core.Map toJson() {
23222 var _json = new core.Map();
23223 if (endDate != null) {
23224 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')} ";
23225 }
23226 if (pricingComment != null) {
23227 _json["pricingComment"] = pricingComment;
23228 }
23229 if (rateOrCostNanos != null) {
23230 _json["rateOrCostNanos"] = rateOrCostNanos;
23231 }
23232 if (startDate != null) {
23233 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft( 2, '0')}";
23234 }
23235 if (units != null) {
23236 _json["units"] = units;
23237 }
23238 return _json;
23239 }
23240 }
23241
23242 /** Contains properties of a DoubleClick Planning project. */
23243 class Project {
23244 /** Account ID of this project. */
23245 core.String accountId;
23246 /** Advertiser ID of this project. */
23247 core.String advertiserId;
23248 /**
23249 * Audience age group of this project.
23250 * Possible string values are:
23251 * - "PLANNING_AUDIENCE_AGE_18_24"
23252 * - "PLANNING_AUDIENCE_AGE_25_34"
23253 * - "PLANNING_AUDIENCE_AGE_35_44"
23254 * - "PLANNING_AUDIENCE_AGE_45_54"
23255 * - "PLANNING_AUDIENCE_AGE_55_64"
23256 * - "PLANNING_AUDIENCE_AGE_65_OR_MORE"
23257 * - "PLANNING_AUDIENCE_AGE_UNKNOWN"
23258 */
23259 core.String audienceAgeGroup;
23260 /**
23261 * Audience gender of this project.
23262 * Possible string values are:
23263 * - "PLANNING_AUDIENCE_GENDER_FEMALE"
23264 * - "PLANNING_AUDIENCE_GENDER_MALE"
23265 */
23266 core.String audienceGender;
23267 /**
23268 * Budget of this project in the currency specified by the current account.
23269 * The value stored in this field represents only the non-fractional amount.
23270 * For example, for USD, the smallest value that can be represented by this
23271 * field is 1 US dollar.
23272 */
23273 core.String budget;
23274 /** Client billing code of this project. */
23275 core.String clientBillingCode;
23276 /** Name of the project client. */
23277 core.String clientName;
23278 /** End date of the project. */
23279 core.DateTime endDate;
23280 /** ID of this project. This is a read-only, auto-generated field. */
23281 core.String id;
23282 /**
23283 * Identifies what kind of resource this is. Value: the fixed string
23284 * "dfareporting#project".
23285 */
23286 core.String kind;
23287 /** Information about the most recent modification of this project. */
23288 LastModifiedInfo lastModifiedInfo;
23289 /** Name of this project. */
23290 core.String name;
23291 /** Overview of this project. */
23292 core.String overview;
23293 /** Start date of the project. */
23294 core.DateTime startDate;
23295 /** Subaccount ID of this project. */
23296 core.String subaccountId;
23297 /** Number of clicks that the advertiser is targeting. */
23298 core.String targetClicks;
23299 /** Number of conversions that the advertiser is targeting. */
23300 core.String targetConversions;
23301 /** CPA that the advertiser is targeting. */
23302 core.String targetCpaNanos;
23303 /** CPC that the advertiser is targeting. */
23304 core.String targetCpcNanos;
23305 /** CPM that the advertiser is targeting. */
23306 core.String targetCpmNanos;
23307 /** Number of impressions that the advertiser is targeting. */
23308 core.String targetImpressions;
23309
23310 Project();
23311
23312 Project.fromJson(core.Map _json) {
23313 if (_json.containsKey("accountId")) {
23314 accountId = _json["accountId"];
23315 }
23316 if (_json.containsKey("advertiserId")) {
23317 advertiserId = _json["advertiserId"];
23318 }
23319 if (_json.containsKey("audienceAgeGroup")) {
23320 audienceAgeGroup = _json["audienceAgeGroup"];
23321 }
23322 if (_json.containsKey("audienceGender")) {
23323 audienceGender = _json["audienceGender"];
23324 }
23325 if (_json.containsKey("budget")) {
23326 budget = _json["budget"];
23327 }
23328 if (_json.containsKey("clientBillingCode")) {
23329 clientBillingCode = _json["clientBillingCode"];
23330 }
23331 if (_json.containsKey("clientName")) {
23332 clientName = _json["clientName"];
23333 }
23334 if (_json.containsKey("endDate")) {
23335 endDate = core.DateTime.parse(_json["endDate"]);
23336 }
23337 if (_json.containsKey("id")) {
23338 id = _json["id"];
23339 }
23340 if (_json.containsKey("kind")) {
23341 kind = _json["kind"];
23342 }
23343 if (_json.containsKey("lastModifiedInfo")) {
23344 lastModifiedInfo = new LastModifiedInfo.fromJson(_json["lastModifiedInfo"] );
23345 }
23346 if (_json.containsKey("name")) {
23347 name = _json["name"];
23348 }
23349 if (_json.containsKey("overview")) {
23350 overview = _json["overview"];
23351 }
23352 if (_json.containsKey("startDate")) {
23353 startDate = core.DateTime.parse(_json["startDate"]);
23354 }
23355 if (_json.containsKey("subaccountId")) {
23356 subaccountId = _json["subaccountId"];
23357 }
23358 if (_json.containsKey("targetClicks")) {
23359 targetClicks = _json["targetClicks"];
23360 }
23361 if (_json.containsKey("targetConversions")) {
23362 targetConversions = _json["targetConversions"];
23363 }
23364 if (_json.containsKey("targetCpaNanos")) {
23365 targetCpaNanos = _json["targetCpaNanos"];
23366 }
23367 if (_json.containsKey("targetCpcNanos")) {
23368 targetCpcNanos = _json["targetCpcNanos"];
23369 }
23370 if (_json.containsKey("targetCpmNanos")) {
23371 targetCpmNanos = _json["targetCpmNanos"];
23372 }
23373 if (_json.containsKey("targetImpressions")) {
23374 targetImpressions = _json["targetImpressions"];
23375 }
23376 }
23377
23378 core.Map toJson() {
23379 var _json = new core.Map();
23380 if (accountId != null) {
23381 _json["accountId"] = accountId;
23382 }
23383 if (advertiserId != null) {
23384 _json["advertiserId"] = advertiserId;
23385 }
23386 if (audienceAgeGroup != null) {
23387 _json["audienceAgeGroup"] = audienceAgeGroup;
23388 }
23389 if (audienceGender != null) {
23390 _json["audienceGender"] = audienceGender;
23391 }
23392 if (budget != null) {
23393 _json["budget"] = budget;
23394 }
23395 if (clientBillingCode != null) {
23396 _json["clientBillingCode"] = clientBillingCode;
23397 }
23398 if (clientName != null) {
23399 _json["clientName"] = clientName;
23400 }
23401 if (endDate != null) {
23402 _json["endDate"] = "${(endDate).year.toString().padLeft(4, '0')}-${(endDat e).month.toString().padLeft(2, '0')}-${(endDate).day.toString().padLeft(2, '0')} ";
23403 }
23404 if (id != null) {
23405 _json["id"] = id;
23406 }
23407 if (kind != null) {
23408 _json["kind"] = kind;
23409 }
23410 if (lastModifiedInfo != null) {
23411 _json["lastModifiedInfo"] = (lastModifiedInfo).toJson();
23412 }
23413 if (name != null) {
23414 _json["name"] = name;
23415 }
23416 if (overview != null) {
23417 _json["overview"] = overview;
23418 }
23419 if (startDate != null) {
23420 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft( 2, '0')}";
23421 }
23422 if (subaccountId != null) {
23423 _json["subaccountId"] = subaccountId;
23424 }
23425 if (targetClicks != null) {
23426 _json["targetClicks"] = targetClicks;
23427 }
23428 if (targetConversions != null) {
23429 _json["targetConversions"] = targetConversions;
23430 }
23431 if (targetCpaNanos != null) {
23432 _json["targetCpaNanos"] = targetCpaNanos;
23433 }
23434 if (targetCpcNanos != null) {
23435 _json["targetCpcNanos"] = targetCpcNanos;
23436 }
23437 if (targetCpmNanos != null) {
23438 _json["targetCpmNanos"] = targetCpmNanos;
23439 }
23440 if (targetImpressions != null) {
23441 _json["targetImpressions"] = targetImpressions;
23442 }
23443 return _json;
23444 }
23445 }
23446
23447 /** Project List Response */
23448 class ProjectsListResponse {
23449 /**
23450 * Identifies what kind of resource this is. Value: the fixed string
23451 * "dfareporting#projectsListResponse".
23452 */
23453 core.String kind;
23454 /** Pagination token to be used for the next list operation. */
23455 core.String nextPageToken;
23456 /** Project collection. */
23457 core.List<Project> projects;
23458
23459 ProjectsListResponse();
23460
23461 ProjectsListResponse.fromJson(core.Map _json) {
23462 if (_json.containsKey("kind")) {
23463 kind = _json["kind"];
23464 }
23465 if (_json.containsKey("nextPageToken")) {
23466 nextPageToken = _json["nextPageToken"];
23467 }
23468 if (_json.containsKey("projects")) {
23469 projects = _json["projects"].map((value) => new Project.fromJson(value)).t oList();
23470 }
23471 }
23472
23473 core.Map toJson() {
23474 var _json = new core.Map();
23475 if (kind != null) {
23476 _json["kind"] = kind;
23477 }
23478 if (nextPageToken != null) {
23479 _json["nextPageToken"] = nextPageToken;
23480 }
23481 if (projects != null) {
23482 _json["projects"] = projects.map((value) => (value).toJson()).toList();
23483 }
23484 return _json;
23485 }
23486 }
23487
23488 /**
23489 * Represents fields that are compatible to be selected for a report of type
23490 * "REACH".
23491 */
23492 class ReachReportCompatibleFields {
23493 /**
23494 * Dimensions which are compatible to be selected in the "dimensionFilters"
23495 * section of the report.
23496 */
23497 core.List<Dimension> dimensionFilters;
23498 /**
23499 * Dimensions which are compatible to be selected in the "dimensions" section
23500 * of the report.
23501 */
23502 core.List<Dimension> dimensions;
23503 /**
23504 * The kind of resource this is, in this case
23505 * dfareporting#reachReportCompatibleFields.
23506 */
23507 core.String kind;
23508 /**
23509 * Metrics which are compatible to be selected in the "metricNames" section of
23510 * the report.
23511 */
23512 core.List<Metric> metrics;
23513 /**
23514 * Metrics which are compatible to be selected as activity metrics to pivot on
23515 * in the "activities" section of the report.
23516 */
23517 core.List<Metric> pivotedActivityMetrics;
23518 /**
23519 * Metrics which are compatible to be selected in the
23520 * "reachByFrequencyMetricNames" section of the report.
23521 */
23522 core.List<Metric> reachByFrequencyMetrics;
23523
23524 ReachReportCompatibleFields();
23525
23526 ReachReportCompatibleFields.fromJson(core.Map _json) {
23527 if (_json.containsKey("dimensionFilters")) {
23528 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension. fromJson(value)).toList();
23529 }
23530 if (_json.containsKey("dimensions")) {
23531 dimensions = _json["dimensions"].map((value) => new Dimension.fromJson(val ue)).toList();
23532 }
23533 if (_json.containsKey("kind")) {
23534 kind = _json["kind"];
23535 }
23536 if (_json.containsKey("metrics")) {
23537 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi st();
23538 }
23539 if (_json.containsKey("pivotedActivityMetrics")) {
23540 pivotedActivityMetrics = _json["pivotedActivityMetrics"].map((value) => ne w Metric.fromJson(value)).toList();
23541 }
23542 if (_json.containsKey("reachByFrequencyMetrics")) {
23543 reachByFrequencyMetrics = _json["reachByFrequencyMetrics"].map((value) => new Metric.fromJson(value)).toList();
23544 }
23545 }
23546
23547 core.Map toJson() {
23548 var _json = new core.Map();
23549 if (dimensionFilters != null) {
23550 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson ()).toList();
23551 }
23552 if (dimensions != null) {
23553 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList() ;
23554 }
23555 if (kind != null) {
23556 _json["kind"] = kind;
23557 }
23558 if (metrics != null) {
23559 _json["metrics"] = metrics.map((value) => (value).toJson()).toList();
23560 }
23561 if (pivotedActivityMetrics != null) {
23562 _json["pivotedActivityMetrics"] = pivotedActivityMetrics.map((value) => (v alue).toJson()).toList();
23563 }
23564 if (reachByFrequencyMetrics != null) {
23565 _json["reachByFrequencyMetrics"] = reachByFrequencyMetrics.map((value) => (value).toJson()).toList();
23566 }
23567 return _json;
23568 }
23569 }
23570
23571 /** Represents a recipient. */
23572 class Recipient {
23573 /**
23574 * The delivery type for the recipient.
23575 * Possible string values are:
23576 * - "ATTACHMENT"
23577 * - "LINK"
23578 */
23579 core.String deliveryType;
23580 /** The email address of the recipient. */
23581 core.String email;
23582 /** The kind of resource this is, in this case dfareporting#recipient. */
23583 core.String kind;
23584
23585 Recipient();
23586
23587 Recipient.fromJson(core.Map _json) {
23588 if (_json.containsKey("deliveryType")) {
23589 deliveryType = _json["deliveryType"];
23590 }
23591 if (_json.containsKey("email")) {
23592 email = _json["email"];
23593 }
23594 if (_json.containsKey("kind")) {
23595 kind = _json["kind"];
23596 }
23597 }
23598
23599 core.Map toJson() {
23600 var _json = new core.Map();
23601 if (deliveryType != null) {
23602 _json["deliveryType"] = deliveryType;
23603 }
23604 if (email != null) {
23605 _json["email"] = email;
23606 }
23607 if (kind != null) {
23608 _json["kind"] = kind;
23609 }
23610 return _json;
23611 }
23612 }
23613
23614 /** Contains information about a region that can be targeted by ads. */
23615 class Region {
23616 /** Country code of the country to which this region belongs. */
23617 core.String countryCode;
23618 /** DART ID of the country to which this region belongs. */
23619 core.String countryDartId;
23620 /** DART ID of this region. */
23621 core.String dartId;
23622 /**
23623 * Identifies what kind of resource this is. Value: the fixed string
23624 * "dfareporting#region".
23625 */
23626 core.String kind;
23627 /** Name of this region. */
23628 core.String name;
23629 /** Region code. */
23630 core.String regionCode;
23631
23632 Region();
23633
23634 Region.fromJson(core.Map _json) {
23635 if (_json.containsKey("countryCode")) {
23636 countryCode = _json["countryCode"];
23637 }
23638 if (_json.containsKey("countryDartId")) {
23639 countryDartId = _json["countryDartId"];
23640 }
23641 if (_json.containsKey("dartId")) {
23642 dartId = _json["dartId"];
23643 }
23644 if (_json.containsKey("kind")) {
23645 kind = _json["kind"];
23646 }
23647 if (_json.containsKey("name")) {
23648 name = _json["name"];
23649 }
23650 if (_json.containsKey("regionCode")) {
23651 regionCode = _json["regionCode"];
23652 }
23653 }
23654
23655 core.Map toJson() {
23656 var _json = new core.Map();
23657 if (countryCode != null) {
23658 _json["countryCode"] = countryCode;
23659 }
23660 if (countryDartId != null) {
23661 _json["countryDartId"] = countryDartId;
23662 }
23663 if (dartId != null) {
23664 _json["dartId"] = dartId;
23665 }
23666 if (kind != null) {
23667 _json["kind"] = kind;
23668 }
23669 if (name != null) {
23670 _json["name"] = name;
23671 }
23672 if (regionCode != null) {
23673 _json["regionCode"] = regionCode;
23674 }
23675 return _json;
23676 }
23677 }
23678
23679 /** Region List Response */
23680 class RegionsListResponse {
23681 /**
23682 * Identifies what kind of resource this is. Value: the fixed string
23683 * "dfareporting#regionsListResponse".
23684 */
23685 core.String kind;
23686 /** Region collection. */
23687 core.List<Region> regions;
23688
23689 RegionsListResponse();
23690
23691 RegionsListResponse.fromJson(core.Map _json) {
23692 if (_json.containsKey("kind")) {
23693 kind = _json["kind"];
23694 }
23695 if (_json.containsKey("regions")) {
23696 regions = _json["regions"].map((value) => new Region.fromJson(value)).toLi st();
23697 }
23698 }
23699
23700 core.Map toJson() {
23701 var _json = new core.Map();
23702 if (kind != null) {
23703 _json["kind"] = kind;
23704 }
23705 if (regions != null) {
23706 _json["regions"] = regions.map((value) => (value).toJson()).toList();
23707 }
23708 return _json;
23709 }
23710 }
23711
23712 /**
23713 * Contains properties of a remarketing list. Remarketing enables you to create
23714 * lists of users who have performed specific actions on a site, then target ads
23715 * to members of those lists. This resource can be used to manage remarketing
23716 * lists that are owned by your advertisers. To see all remarketing lists that
23717 * are visible to your advertisers, including those that are shared to your
23718 * advertiser or account, use the TargetableRemarketingLists resource.
23719 */
23720 class RemarketingList {
23721 /**
23722 * Account ID of this remarketing list. This is a read-only, auto-generated
23723 * field that is only returned in GET requests.
23724 */
23725 core.String accountId;
23726 /** Whether this remarketing list is active. */
23727 core.bool active;
23728 /**
23729 * Dimension value for the advertiser ID that owns this remarketing list. This
23730 * is a required field.
23731 */
23732 core.String advertiserId;
23733 /**
23734 * Dimension value for the ID of the advertiser. This is a read-only,
23735 * auto-generated field.
23736 */
23737 DimensionValue advertiserIdDimensionValue;
23738 /** Remarketing list description. */
23739 core.String description;
23740 /** Remarketing list ID. This is a read-only, auto-generated field. */
23741 core.String id;
23742 /**
23743 * Identifies what kind of resource this is. Value: the fixed string
23744 * "dfareporting#remarketingList".
23745 */
23746 core.String kind;
23747 /**
23748 * Number of days that a user should remain in the remarketing list without an
23749 * impression.
23750 */
23751 core.String lifeSpan;
23752 /** Rule used to populate the remarketing list with users. */
23753 ListPopulationRule listPopulationRule;
23754 /** Number of users currently in the list. This is a read-only field. */
23755 core.String listSize;
23756 /**
23757 * Product from which this remarketing list was originated.
23758 * Possible string values are:
23759 * - "REMARKETING_LIST_SOURCE_ADX"
23760 * - "REMARKETING_LIST_SOURCE_DBM"
23761 * - "REMARKETING_LIST_SOURCE_DFA"
23762 * - "REMARKETING_LIST_SOURCE_DFP"
23763 * - "REMARKETING_LIST_SOURCE_DMP"
23764 * - "REMARKETING_LIST_SOURCE_GA"
23765 * - "REMARKETING_LIST_SOURCE_GPLUS"
23766 * - "REMARKETING_LIST_SOURCE_OTHER"
23767 * - "REMARKETING_LIST_SOURCE_PLAY_STORE"
23768 * - "REMARKETING_LIST_SOURCE_XFP"
23769 * - "REMARKETING_LIST_SOURCE_YOUTUBE"
23770 */
23771 core.String listSource;
23772 /**
23773 * Name of the remarketing list. This is a required field. Must be no greater
23774 * than 128 characters long.
23775 */
23776 core.String name;
23777 /**
23778 * Subaccount ID of this remarketing list. This is a read-only, auto-generated
23779 * field that is only returned in GET requests.
23780 */
23781 core.String subaccountId;
23782
23783 RemarketingList();
23784
23785 RemarketingList.fromJson(core.Map _json) {
23786 if (_json.containsKey("accountId")) {
23787 accountId = _json["accountId"];
23788 }
23789 if (_json.containsKey("active")) {
23790 active = _json["active"];
23791 }
23792 if (_json.containsKey("advertiserId")) {
23793 advertiserId = _json["advertiserId"];
23794 }
23795 if (_json.containsKey("advertiserIdDimensionValue")) {
23796 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
23797 }
23798 if (_json.containsKey("description")) {
23799 description = _json["description"];
23800 }
23801 if (_json.containsKey("id")) {
23802 id = _json["id"];
23803 }
23804 if (_json.containsKey("kind")) {
23805 kind = _json["kind"];
23806 }
23807 if (_json.containsKey("lifeSpan")) {
23808 lifeSpan = _json["lifeSpan"];
23809 }
23810 if (_json.containsKey("listPopulationRule")) {
23811 listPopulationRule = new ListPopulationRule.fromJson(_json["listPopulation Rule"]);
23812 }
23813 if (_json.containsKey("listSize")) {
23814 listSize = _json["listSize"];
23815 }
23816 if (_json.containsKey("listSource")) {
23817 listSource = _json["listSource"];
23818 }
23819 if (_json.containsKey("name")) {
23820 name = _json["name"];
23821 }
23822 if (_json.containsKey("subaccountId")) {
23823 subaccountId = _json["subaccountId"];
23824 }
23825 }
23826
23827 core.Map toJson() {
23828 var _json = new core.Map();
23829 if (accountId != null) {
23830 _json["accountId"] = accountId;
23831 }
23832 if (active != null) {
23833 _json["active"] = active;
23834 }
23835 if (advertiserId != null) {
23836 _json["advertiserId"] = advertiserId;
23837 }
23838 if (advertiserIdDimensionValue != null) {
23839 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
23840 }
23841 if (description != null) {
23842 _json["description"] = description;
23843 }
23844 if (id != null) {
23845 _json["id"] = id;
23846 }
23847 if (kind != null) {
23848 _json["kind"] = kind;
23849 }
23850 if (lifeSpan != null) {
23851 _json["lifeSpan"] = lifeSpan;
23852 }
23853 if (listPopulationRule != null) {
23854 _json["listPopulationRule"] = (listPopulationRule).toJson();
23855 }
23856 if (listSize != null) {
23857 _json["listSize"] = listSize;
23858 }
23859 if (listSource != null) {
23860 _json["listSource"] = listSource;
23861 }
23862 if (name != null) {
23863 _json["name"] = name;
23864 }
23865 if (subaccountId != null) {
23866 _json["subaccountId"] = subaccountId;
23867 }
23868 return _json;
23869 }
23870 }
23871
23872 /**
23873 * Contains properties of a remarketing list's sharing information. Sharing
23874 * allows other accounts or advertisers to target to your remarketing lists.
23875 * This resource can be used to manage remarketing list sharing to other
23876 * accounts and advertisers.
23877 */
23878 class RemarketingListShare {
23879 /**
23880 * Identifies what kind of resource this is. Value: the fixed string
23881 * "dfareporting#remarketingListShare".
23882 */
23883 core.String kind;
23884 /** Remarketing list ID. This is a read-only, auto-generated field. */
23885 core.String remarketingListId;
23886 /** Accounts that the remarketing list is shared with. */
23887 core.List<core.String> sharedAccountIds;
23888 /** Advertisers that the remarketing list is shared with. */
23889 core.List<core.String> sharedAdvertiserIds;
23890
23891 RemarketingListShare();
23892
23893 RemarketingListShare.fromJson(core.Map _json) {
23894 if (_json.containsKey("kind")) {
23895 kind = _json["kind"];
23896 }
23897 if (_json.containsKey("remarketingListId")) {
23898 remarketingListId = _json["remarketingListId"];
23899 }
23900 if (_json.containsKey("sharedAccountIds")) {
23901 sharedAccountIds = _json["sharedAccountIds"];
23902 }
23903 if (_json.containsKey("sharedAdvertiserIds")) {
23904 sharedAdvertiserIds = _json["sharedAdvertiserIds"];
23905 }
23906 }
23907
23908 core.Map toJson() {
23909 var _json = new core.Map();
23910 if (kind != null) {
23911 _json["kind"] = kind;
23912 }
23913 if (remarketingListId != null) {
23914 _json["remarketingListId"] = remarketingListId;
23915 }
23916 if (sharedAccountIds != null) {
23917 _json["sharedAccountIds"] = sharedAccountIds;
23918 }
23919 if (sharedAdvertiserIds != null) {
23920 _json["sharedAdvertiserIds"] = sharedAdvertiserIds;
23921 }
23922 return _json;
23923 }
23924 }
23925
23926 /** Remarketing list response */
23927 class RemarketingListsListResponse {
23928 /**
23929 * Identifies what kind of resource this is. Value: the fixed string
23930 * "dfareporting#remarketingListsListResponse".
23931 */
23932 core.String kind;
23933 /** Pagination token to be used for the next list operation. */
23934 core.String nextPageToken;
23935 /** Remarketing list collection. */
23936 core.List<RemarketingList> remarketingLists;
23937
23938 RemarketingListsListResponse();
23939
23940 RemarketingListsListResponse.fromJson(core.Map _json) {
23941 if (_json.containsKey("kind")) {
23942 kind = _json["kind"];
23943 }
23944 if (_json.containsKey("nextPageToken")) {
23945 nextPageToken = _json["nextPageToken"];
23946 }
23947 if (_json.containsKey("remarketingLists")) {
23948 remarketingLists = _json["remarketingLists"].map((value) => new Remarketin gList.fromJson(value)).toList();
23949 }
23950 }
23951
23952 core.Map toJson() {
23953 var _json = new core.Map();
23954 if (kind != null) {
23955 _json["kind"] = kind;
23956 }
23957 if (nextPageToken != null) {
23958 _json["nextPageToken"] = nextPageToken;
23959 }
23960 if (remarketingLists != null) {
23961 _json["remarketingLists"] = remarketingLists.map((value) => (value).toJson ()).toList();
23962 }
23963 return _json;
23964 }
23965 }
23966
23967 /** The report criteria for a report of type "STANDARD". */
23968 class ReportCriteria {
23969 /** Activity group. */
23970 Activities activities;
23971 /** Custom Rich Media Events group. */
23972 CustomRichMediaEvents customRichMediaEvents;
23973 /** The date range for which this report should be run. */
23974 DateRange dateRange;
23975 /**
23976 * The list of filters on which dimensions are filtered.
23977 * Filters for different dimensions are ANDed, filters for the same dimension
23978 * are grouped together and ORed.
23979 */
23980 core.List<DimensionValue> dimensionFilters;
23981 /** The list of standard dimensions the report should include. */
23982 core.List<SortedDimension> dimensions;
23983 /** The list of names of metrics the report should include. */
23984 core.List<core.String> metricNames;
23985
23986 ReportCriteria();
23987
23988 ReportCriteria.fromJson(core.Map _json) {
23989 if (_json.containsKey("activities")) {
23990 activities = new Activities.fromJson(_json["activities"]);
23991 }
23992 if (_json.containsKey("customRichMediaEvents")) {
23993 customRichMediaEvents = new CustomRichMediaEvents.fromJson(_json["customRi chMediaEvents"]);
23994 }
23995 if (_json.containsKey("dateRange")) {
23996 dateRange = new DateRange.fromJson(_json["dateRange"]);
23997 }
23998 if (_json.containsKey("dimensionFilters")) {
23999 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV alue.fromJson(value)).toList();
24000 }
24001 if (_json.containsKey("dimensions")) {
24002 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs on(value)).toList();
24003 }
24004 if (_json.containsKey("metricNames")) {
24005 metricNames = _json["metricNames"];
24006 }
24007 }
24008
24009 core.Map toJson() {
24010 var _json = new core.Map();
24011 if (activities != null) {
24012 _json["activities"] = (activities).toJson();
24013 }
24014 if (customRichMediaEvents != null) {
24015 _json["customRichMediaEvents"] = (customRichMediaEvents).toJson();
24016 }
24017 if (dateRange != null) {
24018 _json["dateRange"] = (dateRange).toJson();
24019 }
24020 if (dimensionFilters != null) {
24021 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson ()).toList();
24022 }
24023 if (dimensions != null) {
24024 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList() ;
24025 }
24026 if (metricNames != null) {
24027 _json["metricNames"] = metricNames;
24028 }
24029 return _json;
24030 }
24031 }
24032
24033 /** The report criteria for a report of type "CROSS_DIMENSION_REACH". */
24034 class ReportCrossDimensionReachCriteria {
24035 /** The list of dimensions the report should include. */
24036 core.List<SortedDimension> breakdown;
24037 /** The date range this report should be run for. */
24038 DateRange dateRange;
24039 /**
24040 * The dimension option.
24041 * Possible string values are:
24042 * - "ADVERTISER"
24043 * - "CAMPAIGN"
24044 * - "SITE_BY_ADVERTISER"
24045 * - "SITE_BY_CAMPAIGN"
24046 */
24047 core.String dimension;
24048 /** The list of filters on which dimensions are filtered. */
24049 core.List<DimensionValue> dimensionFilters;
24050 /** The list of names of metrics the report should include. */
24051 core.List<core.String> metricNames;
24052 /** The list of names of overlap metrics the report should include. */
24053 core.List<core.String> overlapMetricNames;
24054 /** Whether the report is pivoted or not. Defaults to true. */
24055 core.bool pivoted;
24056
24057 ReportCrossDimensionReachCriteria();
24058
24059 ReportCrossDimensionReachCriteria.fromJson(core.Map _json) {
24060 if (_json.containsKey("breakdown")) {
24061 breakdown = _json["breakdown"].map((value) => new SortedDimension.fromJson (value)).toList();
24062 }
24063 if (_json.containsKey("dateRange")) {
24064 dateRange = new DateRange.fromJson(_json["dateRange"]);
24065 }
24066 if (_json.containsKey("dimension")) {
24067 dimension = _json["dimension"];
24068 }
24069 if (_json.containsKey("dimensionFilters")) {
24070 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV alue.fromJson(value)).toList();
24071 }
24072 if (_json.containsKey("metricNames")) {
24073 metricNames = _json["metricNames"];
24074 }
24075 if (_json.containsKey("overlapMetricNames")) {
24076 overlapMetricNames = _json["overlapMetricNames"];
24077 }
24078 if (_json.containsKey("pivoted")) {
24079 pivoted = _json["pivoted"];
24080 }
24081 }
24082
24083 core.Map toJson() {
24084 var _json = new core.Map();
24085 if (breakdown != null) {
24086 _json["breakdown"] = breakdown.map((value) => (value).toJson()).toList();
24087 }
24088 if (dateRange != null) {
24089 _json["dateRange"] = (dateRange).toJson();
24090 }
24091 if (dimension != null) {
24092 _json["dimension"] = dimension;
24093 }
24094 if (dimensionFilters != null) {
24095 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson ()).toList();
24096 }
24097 if (metricNames != null) {
24098 _json["metricNames"] = metricNames;
24099 }
24100 if (overlapMetricNames != null) {
24101 _json["overlapMetricNames"] = overlapMetricNames;
24102 }
24103 if (pivoted != null) {
24104 _json["pivoted"] = pivoted;
24105 }
24106 return _json;
24107 }
24108 }
24109
24110 /** The report's email delivery settings. */
24111 class ReportDelivery {
24112 /** Whether the report should be emailed to the report owner. */
24113 core.bool emailOwner;
24114 /**
24115 * The type of delivery for the owner to receive, if enabled.
24116 * Possible string values are:
24117 * - "ATTACHMENT"
24118 * - "LINK"
24119 */
24120 core.String emailOwnerDeliveryType;
24121 /** The message to be sent with each email. */
24122 core.String message;
24123 /** The list of recipients to which to email the report. */
24124 core.List<Recipient> recipients;
24125
24126 ReportDelivery();
24127
24128 ReportDelivery.fromJson(core.Map _json) {
24129 if (_json.containsKey("emailOwner")) {
24130 emailOwner = _json["emailOwner"];
24131 }
24132 if (_json.containsKey("emailOwnerDeliveryType")) {
24133 emailOwnerDeliveryType = _json["emailOwnerDeliveryType"];
24134 }
24135 if (_json.containsKey("message")) {
24136 message = _json["message"];
24137 }
24138 if (_json.containsKey("recipients")) {
24139 recipients = _json["recipients"].map((value) => new Recipient.fromJson(val ue)).toList();
24140 }
24141 }
24142
24143 core.Map toJson() {
24144 var _json = new core.Map();
24145 if (emailOwner != null) {
24146 _json["emailOwner"] = emailOwner;
24147 }
24148 if (emailOwnerDeliveryType != null) {
24149 _json["emailOwnerDeliveryType"] = emailOwnerDeliveryType;
24150 }
24151 if (message != null) {
24152 _json["message"] = message;
24153 }
24154 if (recipients != null) {
24155 _json["recipients"] = recipients.map((value) => (value).toJson()).toList() ;
24156 }
24157 return _json;
24158 }
24159 }
24160
24161 /** The properties of the report. */
24162 class ReportFloodlightCriteriaReportProperties {
24163 /** Include conversions that have no cookie, but do have an exposure path. */
24164 core.bool includeAttributedIPConversions;
24165 /**
24166 * Include conversions of users with a DoubleClick cookie but without an
24167 * exposure. That means the user did not click or see an ad from the
24168 * advertiser within the Floodlight group, or that the interaction happened
24169 * outside the lookback window.
24170 */
24171 core.bool includeUnattributedCookieConversions;
24172 /**
24173 * Include conversions that have no associated cookies and no exposures. It’s
24174 * therefore impossible to know how the user was exposed to your ads during
24175 * the lookback window prior to a conversion.
24176 */
24177 core.bool includeUnattributedIPConversions;
24178
24179 ReportFloodlightCriteriaReportProperties();
24180
24181 ReportFloodlightCriteriaReportProperties.fromJson(core.Map _json) {
24182 if (_json.containsKey("includeAttributedIPConversions")) {
24183 includeAttributedIPConversions = _json["includeAttributedIPConversions"];
24184 }
24185 if (_json.containsKey("includeUnattributedCookieConversions")) {
24186 includeUnattributedCookieConversions = _json["includeUnattributedCookieCon versions"];
24187 }
24188 if (_json.containsKey("includeUnattributedIPConversions")) {
24189 includeUnattributedIPConversions = _json["includeUnattributedIPConversions "];
24190 }
24191 }
24192
24193 core.Map toJson() {
24194 var _json = new core.Map();
24195 if (includeAttributedIPConversions != null) {
24196 _json["includeAttributedIPConversions"] = includeAttributedIPConversions;
24197 }
24198 if (includeUnattributedCookieConversions != null) {
24199 _json["includeUnattributedCookieConversions"] = includeUnattributedCookieC onversions;
24200 }
24201 if (includeUnattributedIPConversions != null) {
24202 _json["includeUnattributedIPConversions"] = includeUnattributedIPConversio ns;
24203 }
24204 return _json;
24205 }
24206 }
24207
24208 /** The report criteria for a report of type "FLOODLIGHT". */
24209 class ReportFloodlightCriteria {
24210 /** The list of custom rich media events to include. */
24211 core.List<DimensionValue> customRichMediaEvents;
24212 /** The date range this report should be run for. */
24213 DateRange dateRange;
24214 /**
24215 * The list of filters on which dimensions are filtered.
24216 * Filters for different dimensions are ANDed, filters for the same dimension
24217 * are grouped together and ORed.
24218 */
24219 core.List<DimensionValue> dimensionFilters;
24220 /** The list of dimensions the report should include. */
24221 core.List<SortedDimension> dimensions;
24222 /**
24223 * The floodlight ID for which to show data in this report. All advertisers
24224 * associated with that ID will automatically be added. The dimension of the
24225 * value needs to be 'dfa:floodlightConfigId'.
24226 */
24227 DimensionValue floodlightConfigId;
24228 /** The list of names of metrics the report should include. */
24229 core.List<core.String> metricNames;
24230 /** The properties of the report. */
24231 ReportFloodlightCriteriaReportProperties reportProperties;
24232
24233 ReportFloodlightCriteria();
24234
24235 ReportFloodlightCriteria.fromJson(core.Map _json) {
24236 if (_json.containsKey("customRichMediaEvents")) {
24237 customRichMediaEvents = _json["customRichMediaEvents"].map((value) => new DimensionValue.fromJson(value)).toList();
24238 }
24239 if (_json.containsKey("dateRange")) {
24240 dateRange = new DateRange.fromJson(_json["dateRange"]);
24241 }
24242 if (_json.containsKey("dimensionFilters")) {
24243 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV alue.fromJson(value)).toList();
24244 }
24245 if (_json.containsKey("dimensions")) {
24246 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs on(value)).toList();
24247 }
24248 if (_json.containsKey("floodlightConfigId")) {
24249 floodlightConfigId = new DimensionValue.fromJson(_json["floodlightConfigId "]);
24250 }
24251 if (_json.containsKey("metricNames")) {
24252 metricNames = _json["metricNames"];
24253 }
24254 if (_json.containsKey("reportProperties")) {
24255 reportProperties = new ReportFloodlightCriteriaReportProperties.fromJson(_ json["reportProperties"]);
24256 }
24257 }
24258
24259 core.Map toJson() {
24260 var _json = new core.Map();
24261 if (customRichMediaEvents != null) {
24262 _json["customRichMediaEvents"] = customRichMediaEvents.map((value) => (val ue).toJson()).toList();
24263 }
24264 if (dateRange != null) {
24265 _json["dateRange"] = (dateRange).toJson();
24266 }
24267 if (dimensionFilters != null) {
24268 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson ()).toList();
24269 }
24270 if (dimensions != null) {
24271 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList() ;
24272 }
24273 if (floodlightConfigId != null) {
24274 _json["floodlightConfigId"] = (floodlightConfigId).toJson();
24275 }
24276 if (metricNames != null) {
24277 _json["metricNames"] = metricNames;
24278 }
24279 if (reportProperties != null) {
24280 _json["reportProperties"] = (reportProperties).toJson();
24281 }
24282 return _json;
24283 }
24284 }
24285
24286 /** The properties of the report. */
24287 class ReportPathToConversionCriteriaReportProperties {
24288 /**
24289 * DFA checks to see if a click interaction occurred within the specified
24290 * period of time before a conversion. By default the value is pulled from
24291 * Floodlight or you can manually enter a custom value. Valid values: 1-90.
24292 */
24293 core.int clicksLookbackWindow;
24294 /**
24295 * DFA checks to see if an impression interaction occurred within the
24296 * specified period of time before a conversion. By default the value is
24297 * pulled from Floodlight or you can manually enter a custom value. Valid
24298 * values: 1-90.
24299 */
24300 core.int impressionsLookbackWindow;
24301 /** Deprecated: has no effect. */
24302 core.bool includeAttributedIPConversions;
24303 /**
24304 * Include conversions of users with a DoubleClick cookie but without an
24305 * exposure. That means the user did not click or see an ad from the
24306 * advertiser within the Floodlight group, or that the interaction happened
24307 * outside the lookback window.
24308 */
24309 core.bool includeUnattributedCookieConversions;
24310 /**
24311 * Include conversions that have no associated cookies and no exposures. It’s
24312 * therefore impossible to know how the user was exposed to your ads during
24313 * the lookback window prior to a conversion.
24314 */
24315 core.bool includeUnattributedIPConversions;
24316 /**
24317 * The maximum number of click interactions to include in the report.
24318 * Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100
24319 * impressions). If another advertiser in your network is paying for E2C, you
24320 * can have up to 5 total exposures per report.
24321 */
24322 core.int maximumClickInteractions;
24323 /**
24324 * The maximum number of click interactions to include in the report.
24325 * Advertisers currently paying for E2C reports get up to 200 (100 clicks, 100
24326 * impressions). If another advertiser in your network is paying for E2C, you
24327 * can have up to 5 total exposures per report.
24328 */
24329 core.int maximumImpressionInteractions;
24330 /**
24331 * The maximum amount of time that can take place between interactions (clicks
24332 * or impressions) by the same user. Valid values: 1-90.
24333 */
24334 core.int maximumInteractionGap;
24335 /** Enable pivoting on interaction path. */
24336 core.bool pivotOnInteractionPath;
24337
24338 ReportPathToConversionCriteriaReportProperties();
24339
24340 ReportPathToConversionCriteriaReportProperties.fromJson(core.Map _json) {
24341 if (_json.containsKey("clicksLookbackWindow")) {
24342 clicksLookbackWindow = _json["clicksLookbackWindow"];
24343 }
24344 if (_json.containsKey("impressionsLookbackWindow")) {
24345 impressionsLookbackWindow = _json["impressionsLookbackWindow"];
24346 }
24347 if (_json.containsKey("includeAttributedIPConversions")) {
24348 includeAttributedIPConversions = _json["includeAttributedIPConversions"];
24349 }
24350 if (_json.containsKey("includeUnattributedCookieConversions")) {
24351 includeUnattributedCookieConversions = _json["includeUnattributedCookieCon versions"];
24352 }
24353 if (_json.containsKey("includeUnattributedIPConversions")) {
24354 includeUnattributedIPConversions = _json["includeUnattributedIPConversions "];
24355 }
24356 if (_json.containsKey("maximumClickInteractions")) {
24357 maximumClickInteractions = _json["maximumClickInteractions"];
24358 }
24359 if (_json.containsKey("maximumImpressionInteractions")) {
24360 maximumImpressionInteractions = _json["maximumImpressionInteractions"];
24361 }
24362 if (_json.containsKey("maximumInteractionGap")) {
24363 maximumInteractionGap = _json["maximumInteractionGap"];
24364 }
24365 if (_json.containsKey("pivotOnInteractionPath")) {
24366 pivotOnInteractionPath = _json["pivotOnInteractionPath"];
24367 }
24368 }
24369
24370 core.Map toJson() {
24371 var _json = new core.Map();
24372 if (clicksLookbackWindow != null) {
24373 _json["clicksLookbackWindow"] = clicksLookbackWindow;
24374 }
24375 if (impressionsLookbackWindow != null) {
24376 _json["impressionsLookbackWindow"] = impressionsLookbackWindow;
24377 }
24378 if (includeAttributedIPConversions != null) {
24379 _json["includeAttributedIPConversions"] = includeAttributedIPConversions;
24380 }
24381 if (includeUnattributedCookieConversions != null) {
24382 _json["includeUnattributedCookieConversions"] = includeUnattributedCookieC onversions;
24383 }
24384 if (includeUnattributedIPConversions != null) {
24385 _json["includeUnattributedIPConversions"] = includeUnattributedIPConversio ns;
24386 }
24387 if (maximumClickInteractions != null) {
24388 _json["maximumClickInteractions"] = maximumClickInteractions;
24389 }
24390 if (maximumImpressionInteractions != null) {
24391 _json["maximumImpressionInteractions"] = maximumImpressionInteractions;
24392 }
24393 if (maximumInteractionGap != null) {
24394 _json["maximumInteractionGap"] = maximumInteractionGap;
24395 }
24396 if (pivotOnInteractionPath != null) {
24397 _json["pivotOnInteractionPath"] = pivotOnInteractionPath;
24398 }
24399 return _json;
24400 }
24401 }
24402
24403 /** The report criteria for a report of type "PATH_TO_CONVERSION". */
24404 class ReportPathToConversionCriteria {
24405 /** The list of 'dfa:activity' values to filter on. */
24406 core.List<DimensionValue> activityFilters;
24407 /** The list of conversion dimensions the report should include. */
24408 core.List<SortedDimension> conversionDimensions;
24409 /** The list of custom floodlight variables the report should include. */
24410 core.List<SortedDimension> customFloodlightVariables;
24411 /** The list of custom rich media events to include. */
24412 core.List<DimensionValue> customRichMediaEvents;
24413 /** The date range this report should be run for. */
24414 DateRange dateRange;
24415 /**
24416 * The floodlight ID for which to show data in this report. All advertisers
24417 * associated with that ID will automatically be added. The dimension of the
24418 * value needs to be 'dfa:floodlightConfigId'.
24419 */
24420 DimensionValue floodlightConfigId;
24421 /** The list of names of metrics the report should include. */
24422 core.List<core.String> metricNames;
24423 /** The list of per interaction dimensions the report should include. */
24424 core.List<SortedDimension> perInteractionDimensions;
24425 /** The properties of the report. */
24426 ReportPathToConversionCriteriaReportProperties reportProperties;
24427
24428 ReportPathToConversionCriteria();
24429
24430 ReportPathToConversionCriteria.fromJson(core.Map _json) {
24431 if (_json.containsKey("activityFilters")) {
24432 activityFilters = _json["activityFilters"].map((value) => new DimensionVal ue.fromJson(value)).toList();
24433 }
24434 if (_json.containsKey("conversionDimensions")) {
24435 conversionDimensions = _json["conversionDimensions"].map((value) => new So rtedDimension.fromJson(value)).toList();
24436 }
24437 if (_json.containsKey("customFloodlightVariables")) {
24438 customFloodlightVariables = _json["customFloodlightVariables"].map((value) => new SortedDimension.fromJson(value)).toList();
24439 }
24440 if (_json.containsKey("customRichMediaEvents")) {
24441 customRichMediaEvents = _json["customRichMediaEvents"].map((value) => new DimensionValue.fromJson(value)).toList();
24442 }
24443 if (_json.containsKey("dateRange")) {
24444 dateRange = new DateRange.fromJson(_json["dateRange"]);
24445 }
24446 if (_json.containsKey("floodlightConfigId")) {
24447 floodlightConfigId = new DimensionValue.fromJson(_json["floodlightConfigId "]);
24448 }
24449 if (_json.containsKey("metricNames")) {
24450 metricNames = _json["metricNames"];
24451 }
24452 if (_json.containsKey("perInteractionDimensions")) {
24453 perInteractionDimensions = _json["perInteractionDimensions"].map((value) = > new SortedDimension.fromJson(value)).toList();
24454 }
24455 if (_json.containsKey("reportProperties")) {
24456 reportProperties = new ReportPathToConversionCriteriaReportProperties.from Json(_json["reportProperties"]);
24457 }
24458 }
24459
24460 core.Map toJson() {
24461 var _json = new core.Map();
24462 if (activityFilters != null) {
24463 _json["activityFilters"] = activityFilters.map((value) => (value).toJson() ).toList();
24464 }
24465 if (conversionDimensions != null) {
24466 _json["conversionDimensions"] = conversionDimensions.map((value) => (value ).toJson()).toList();
24467 }
24468 if (customFloodlightVariables != null) {
24469 _json["customFloodlightVariables"] = customFloodlightVariables.map((value) => (value).toJson()).toList();
24470 }
24471 if (customRichMediaEvents != null) {
24472 _json["customRichMediaEvents"] = customRichMediaEvents.map((value) => (val ue).toJson()).toList();
24473 }
24474 if (dateRange != null) {
24475 _json["dateRange"] = (dateRange).toJson();
24476 }
24477 if (floodlightConfigId != null) {
24478 _json["floodlightConfigId"] = (floodlightConfigId).toJson();
24479 }
24480 if (metricNames != null) {
24481 _json["metricNames"] = metricNames;
24482 }
24483 if (perInteractionDimensions != null) {
24484 _json["perInteractionDimensions"] = perInteractionDimensions.map((value) = > (value).toJson()).toList();
24485 }
24486 if (reportProperties != null) {
24487 _json["reportProperties"] = (reportProperties).toJson();
24488 }
24489 return _json;
24490 }
24491 }
24492
24493 /** The report criteria for a report of type "REACH". */
24494 class ReportReachCriteria {
24495 /** Activity group. */
24496 Activities activities;
24497 /** Custom Rich Media Events group. */
24498 CustomRichMediaEvents customRichMediaEvents;
24499 /** The date range this report should be run for. */
24500 DateRange dateRange;
24501 /**
24502 * The list of filters on which dimensions are filtered.
24503 * Filters for different dimensions are ANDed, filters for the same dimension
24504 * are grouped together and ORed.
24505 */
24506 core.List<DimensionValue> dimensionFilters;
24507 /** The list of dimensions the report should include. */
24508 core.List<SortedDimension> dimensions;
24509 /**
24510 * Whether to enable all reach dimension combinations in the report. Defaults
24511 * to false. If enabled, the date range of the report should be within the
24512 * last three months.
24513 */
24514 core.bool enableAllDimensionCombinations;
24515 /** The list of names of metrics the report should include. */
24516 core.List<core.String> metricNames;
24517 /**
24518 * The list of names of Reach By Frequency metrics the report should include.
24519 */
24520 core.List<core.String> reachByFrequencyMetricNames;
24521
24522 ReportReachCriteria();
24523
24524 ReportReachCriteria.fromJson(core.Map _json) {
24525 if (_json.containsKey("activities")) {
24526 activities = new Activities.fromJson(_json["activities"]);
24527 }
24528 if (_json.containsKey("customRichMediaEvents")) {
24529 customRichMediaEvents = new CustomRichMediaEvents.fromJson(_json["customRi chMediaEvents"]);
24530 }
24531 if (_json.containsKey("dateRange")) {
24532 dateRange = new DateRange.fromJson(_json["dateRange"]);
24533 }
24534 if (_json.containsKey("dimensionFilters")) {
24535 dimensionFilters = _json["dimensionFilters"].map((value) => new DimensionV alue.fromJson(value)).toList();
24536 }
24537 if (_json.containsKey("dimensions")) {
24538 dimensions = _json["dimensions"].map((value) => new SortedDimension.fromJs on(value)).toList();
24539 }
24540 if (_json.containsKey("enableAllDimensionCombinations")) {
24541 enableAllDimensionCombinations = _json["enableAllDimensionCombinations"];
24542 }
24543 if (_json.containsKey("metricNames")) {
24544 metricNames = _json["metricNames"];
24545 }
24546 if (_json.containsKey("reachByFrequencyMetricNames")) {
24547 reachByFrequencyMetricNames = _json["reachByFrequencyMetricNames"];
24548 }
24549 }
24550
24551 core.Map toJson() {
24552 var _json = new core.Map();
24553 if (activities != null) {
24554 _json["activities"] = (activities).toJson();
24555 }
24556 if (customRichMediaEvents != null) {
24557 _json["customRichMediaEvents"] = (customRichMediaEvents).toJson();
24558 }
24559 if (dateRange != null) {
24560 _json["dateRange"] = (dateRange).toJson();
24561 }
24562 if (dimensionFilters != null) {
24563 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson ()).toList();
24564 }
24565 if (dimensions != null) {
24566 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList() ;
24567 }
24568 if (enableAllDimensionCombinations != null) {
24569 _json["enableAllDimensionCombinations"] = enableAllDimensionCombinations;
24570 }
24571 if (metricNames != null) {
24572 _json["metricNames"] = metricNames;
24573 }
24574 if (reachByFrequencyMetricNames != null) {
24575 _json["reachByFrequencyMetricNames"] = reachByFrequencyMetricNames;
24576 }
24577 return _json;
24578 }
24579 }
24580
24581 /**
24582 * The report's schedule. Can only be set if the report's 'dateRange' is a
24583 * relative date range and the relative date range is not "TODAY".
24584 */
24585 class ReportSchedule {
24586 /**
24587 * Whether the schedule is active or not. Must be set to either true or false.
24588 */
24589 core.bool active;
24590 /**
24591 * Defines every how many days, weeks or months the report should be run.
24592 * Needs to be set when "repeats" is either "DAILY", "WEEKLY" or "MONTHLY".
24593 */
24594 core.int every;
24595 /** The expiration date when the scheduled report stops running. */
24596 core.DateTime expirationDate;
24597 /**
24598 * The interval for which the report is repeated. Note:
24599 * - "DAILY" also requires field "every" to be set.
24600 * - "WEEKLY" also requires fields "every" and "repeatsOnWeekDays" to be set.
24601 * - "MONTHLY" also requires fields "every" and "runsOnDayOfMonth" to be set.
24602 */
24603 core.String repeats;
24604 /** List of week days "WEEKLY" on which scheduled reports should run. */
24605 core.List<core.String> repeatsOnWeekDays;
24606 /**
24607 * Enum to define for "MONTHLY" scheduled reports whether reports should be
24608 * repeated on the same day of the month as "startDate" or the same day of the
24609 * week of the month.
24610 * Example: If 'startDate' is Monday, April 2nd 2012 (2012-04-02),
24611 * "DAY_OF_MONTH" would run subsequent reports on the 2nd of every Month, and
24612 * "WEEK_OF_MONTH" would run subsequent reports on the first Monday of the
24613 * month.
24614 * Possible string values are:
24615 * - "DAY_OF_MONTH"
24616 * - "WEEK_OF_MONTH"
24617 */
24618 core.String runsOnDayOfMonth;
24619 /** Start date of date range for which scheduled reports should be run. */
24620 core.DateTime startDate;
24621
24622 ReportSchedule();
24623
24624 ReportSchedule.fromJson(core.Map _json) {
24625 if (_json.containsKey("active")) {
24626 active = _json["active"];
24627 }
24628 if (_json.containsKey("every")) {
24629 every = _json["every"];
24630 }
24631 if (_json.containsKey("expirationDate")) {
24632 expirationDate = core.DateTime.parse(_json["expirationDate"]);
24633 }
24634 if (_json.containsKey("repeats")) {
24635 repeats = _json["repeats"];
24636 }
24637 if (_json.containsKey("repeatsOnWeekDays")) {
24638 repeatsOnWeekDays = _json["repeatsOnWeekDays"];
24639 }
24640 if (_json.containsKey("runsOnDayOfMonth")) {
24641 runsOnDayOfMonth = _json["runsOnDayOfMonth"];
24642 }
24643 if (_json.containsKey("startDate")) {
24644 startDate = core.DateTime.parse(_json["startDate"]);
24645 }
24646 }
24647
24648 core.Map toJson() {
24649 var _json = new core.Map();
24650 if (active != null) {
24651 _json["active"] = active;
24652 }
24653 if (every != null) {
24654 _json["every"] = every;
24655 }
24656 if (expirationDate != null) {
24657 _json["expirationDate"] = "${(expirationDate).year.toString().padLeft(4, ' 0')}-${(expirationDate).month.toString().padLeft(2, '0')}-${(expirationDate).day .toString().padLeft(2, '0')}";
24658 }
24659 if (repeats != null) {
24660 _json["repeats"] = repeats;
24661 }
24662 if (repeatsOnWeekDays != null) {
24663 _json["repeatsOnWeekDays"] = repeatsOnWeekDays;
24664 }
24665 if (runsOnDayOfMonth != null) {
24666 _json["runsOnDayOfMonth"] = runsOnDayOfMonth;
24667 }
24668 if (startDate != null) {
24669 _json["startDate"] = "${(startDate).year.toString().padLeft(4, '0')}-${(st artDate).month.toString().padLeft(2, '0')}-${(startDate).day.toString().padLeft( 2, '0')}";
24670 }
24671 return _json;
24672 }
24673 }
24674
24675 /** Represents a Report resource. */
24676 class Report {
24677 /** The account ID to which this report belongs. */
24678 core.String accountId;
24679 /** The report criteria for a report of type "STANDARD". */
24680 ReportCriteria criteria;
24681 /** The report criteria for a report of type "CROSS_DIMENSION_REACH". */
24682 ReportCrossDimensionReachCriteria crossDimensionReachCriteria;
24683 /** The report's email delivery settings. */
24684 ReportDelivery delivery;
24685 /** The eTag of this response for caching purposes. */
24686 core.String etag;
24687 /** The filename used when generating report files for this report. */
24688 core.String fileName;
24689 /** The report criteria for a report of type "FLOODLIGHT". */
24690 ReportFloodlightCriteria floodlightCriteria;
24691 /**
24692 * The output format of the report. If not specified, default format is "CSV".
24693 * Note that the actual format in the completed report file might differ if
24694 * for instance the report's size exceeds the format's capabilities. "CSV"
24695 * will then be the fallback format.
24696 * Possible string values are:
24697 * - "CSV"
24698 * - "EXCEL"
24699 */
24700 core.String format;
24701 /** The unique ID identifying this report resource. */
24702 core.String id;
24703 /** The kind of resource this is, in this case dfareporting#report. */
24704 core.String kind;
24705 /**
24706 * The timestamp (in milliseconds since epoch) of when this report was last
24707 * modified.
24708 */
24709 core.String lastModifiedTime;
24710 /** The name of the report. */
24711 core.String name;
24712 /** The user profile id of the owner of this report. */
24713 core.String ownerProfileId;
24714 /** The report criteria for a report of type "PATH_TO_CONVERSION". */
24715 ReportPathToConversionCriteria pathToConversionCriteria;
24716 /** The report criteria for a report of type "REACH". */
24717 ReportReachCriteria reachCriteria;
24718 /**
24719 * The report's schedule. Can only be set if the report's 'dateRange' is a
24720 * relative date range and the relative date range is not "TODAY".
24721 */
24722 ReportSchedule schedule;
24723 /** The subaccount ID to which this report belongs if applicable. */
24724 core.String subAccountId;
24725 /**
24726 * The type of the report.
24727 * Possible string values are:
24728 * - "CROSS_DIMENSION_REACH"
24729 * - "FLOODLIGHT"
24730 * - "PATH_TO_CONVERSION"
24731 * - "REACH"
24732 * - "STANDARD"
24733 */
24734 core.String type;
24735
24736 Report();
24737
24738 Report.fromJson(core.Map _json) {
24739 if (_json.containsKey("accountId")) {
24740 accountId = _json["accountId"];
24741 }
24742 if (_json.containsKey("criteria")) {
24743 criteria = new ReportCriteria.fromJson(_json["criteria"]);
24744 }
24745 if (_json.containsKey("crossDimensionReachCriteria")) {
24746 crossDimensionReachCriteria = new ReportCrossDimensionReachCriteria.fromJs on(_json["crossDimensionReachCriteria"]);
24747 }
24748 if (_json.containsKey("delivery")) {
24749 delivery = new ReportDelivery.fromJson(_json["delivery"]);
24750 }
24751 if (_json.containsKey("etag")) {
24752 etag = _json["etag"];
24753 }
24754 if (_json.containsKey("fileName")) {
24755 fileName = _json["fileName"];
24756 }
24757 if (_json.containsKey("floodlightCriteria")) {
24758 floodlightCriteria = new ReportFloodlightCriteria.fromJson(_json["floodlig htCriteria"]);
24759 }
24760 if (_json.containsKey("format")) {
24761 format = _json["format"];
24762 }
24763 if (_json.containsKey("id")) {
24764 id = _json["id"];
24765 }
24766 if (_json.containsKey("kind")) {
24767 kind = _json["kind"];
24768 }
24769 if (_json.containsKey("lastModifiedTime")) {
24770 lastModifiedTime = _json["lastModifiedTime"];
24771 }
24772 if (_json.containsKey("name")) {
24773 name = _json["name"];
24774 }
24775 if (_json.containsKey("ownerProfileId")) {
24776 ownerProfileId = _json["ownerProfileId"];
24777 }
24778 if (_json.containsKey("pathToConversionCriteria")) {
24779 pathToConversionCriteria = new ReportPathToConversionCriteria.fromJson(_js on["pathToConversionCriteria"]);
24780 }
24781 if (_json.containsKey("reachCriteria")) {
24782 reachCriteria = new ReportReachCriteria.fromJson(_json["reachCriteria"]);
24783 }
24784 if (_json.containsKey("schedule")) {
24785 schedule = new ReportSchedule.fromJson(_json["schedule"]);
24786 }
24787 if (_json.containsKey("subAccountId")) {
24788 subAccountId = _json["subAccountId"];
24789 }
24790 if (_json.containsKey("type")) {
24791 type = _json["type"];
24792 }
24793 }
24794
24795 core.Map toJson() {
24796 var _json = new core.Map();
24797 if (accountId != null) {
24798 _json["accountId"] = accountId;
24799 }
24800 if (criteria != null) {
24801 _json["criteria"] = (criteria).toJson();
24802 }
24803 if (crossDimensionReachCriteria != null) {
24804 _json["crossDimensionReachCriteria"] = (crossDimensionReachCriteria).toJso n();
24805 }
24806 if (delivery != null) {
24807 _json["delivery"] = (delivery).toJson();
24808 }
24809 if (etag != null) {
24810 _json["etag"] = etag;
24811 }
24812 if (fileName != null) {
24813 _json["fileName"] = fileName;
24814 }
24815 if (floodlightCriteria != null) {
24816 _json["floodlightCriteria"] = (floodlightCriteria).toJson();
24817 }
24818 if (format != null) {
24819 _json["format"] = format;
24820 }
24821 if (id != null) {
24822 _json["id"] = id;
24823 }
24824 if (kind != null) {
24825 _json["kind"] = kind;
24826 }
24827 if (lastModifiedTime != null) {
24828 _json["lastModifiedTime"] = lastModifiedTime;
24829 }
24830 if (name != null) {
24831 _json["name"] = name;
24832 }
24833 if (ownerProfileId != null) {
24834 _json["ownerProfileId"] = ownerProfileId;
24835 }
24836 if (pathToConversionCriteria != null) {
24837 _json["pathToConversionCriteria"] = (pathToConversionCriteria).toJson();
24838 }
24839 if (reachCriteria != null) {
24840 _json["reachCriteria"] = (reachCriteria).toJson();
24841 }
24842 if (schedule != null) {
24843 _json["schedule"] = (schedule).toJson();
24844 }
24845 if (subAccountId != null) {
24846 _json["subAccountId"] = subAccountId;
24847 }
24848 if (type != null) {
24849 _json["type"] = type;
24850 }
24851 return _json;
24852 }
24853 }
24854
24855 /**
24856 * Represents fields that are compatible to be selected for a report of type
24857 * "STANDARD".
24858 */
24859 class ReportCompatibleFields {
24860 /**
24861 * Dimensions which are compatible to be selected in the "dimensionFilters"
24862 * section of the report.
24863 */
24864 core.List<Dimension> dimensionFilters;
24865 /**
24866 * Dimensions which are compatible to be selected in the "dimensions" section
24867 * of the report.
24868 */
24869 core.List<Dimension> dimensions;
24870 /**
24871 * The kind of resource this is, in this case
24872 * dfareporting#reportCompatibleFields.
24873 */
24874 core.String kind;
24875 /**
24876 * Metrics which are compatible to be selected in the "metricNames" section of
24877 * the report.
24878 */
24879 core.List<Metric> metrics;
24880 /**
24881 * Metrics which are compatible to be selected as activity metrics to pivot on
24882 * in the "activities" section of the report.
24883 */
24884 core.List<Metric> pivotedActivityMetrics;
24885
24886 ReportCompatibleFields();
24887
24888 ReportCompatibleFields.fromJson(core.Map _json) {
24889 if (_json.containsKey("dimensionFilters")) {
24890 dimensionFilters = _json["dimensionFilters"].map((value) => new Dimension. fromJson(value)).toList();
24891 }
24892 if (_json.containsKey("dimensions")) {
24893 dimensions = _json["dimensions"].map((value) => new Dimension.fromJson(val ue)).toList();
24894 }
24895 if (_json.containsKey("kind")) {
24896 kind = _json["kind"];
24897 }
24898 if (_json.containsKey("metrics")) {
24899 metrics = _json["metrics"].map((value) => new Metric.fromJson(value)).toLi st();
24900 }
24901 if (_json.containsKey("pivotedActivityMetrics")) {
24902 pivotedActivityMetrics = _json["pivotedActivityMetrics"].map((value) => ne w Metric.fromJson(value)).toList();
24903 }
24904 }
24905
24906 core.Map toJson() {
24907 var _json = new core.Map();
24908 if (dimensionFilters != null) {
24909 _json["dimensionFilters"] = dimensionFilters.map((value) => (value).toJson ()).toList();
24910 }
24911 if (dimensions != null) {
24912 _json["dimensions"] = dimensions.map((value) => (value).toJson()).toList() ;
24913 }
24914 if (kind != null) {
24915 _json["kind"] = kind;
24916 }
24917 if (metrics != null) {
24918 _json["metrics"] = metrics.map((value) => (value).toJson()).toList();
24919 }
24920 if (pivotedActivityMetrics != null) {
24921 _json["pivotedActivityMetrics"] = pivotedActivityMetrics.map((value) => (v alue).toJson()).toList();
24922 }
24923 return _json;
24924 }
24925 }
24926
24927 /** Represents the list of reports. */
24928 class ReportList {
24929 /** The eTag of this response for caching purposes. */
24930 core.String etag;
24931 /** The reports returned in this response. */
24932 core.List<Report> items;
24933 /** The kind of list this is, in this case dfareporting#reportList. */
24934 core.String kind;
24935 /**
24936 * Continuation token used to page through reports. To retrieve the next page
24937 * of results, set the next request's "pageToken" to the value of this field.
24938 * The page token is only valid for a limited amount of time and should not be
24939 * persisted.
24940 */
24941 core.String nextPageToken;
24942
24943 ReportList();
24944
24945 ReportList.fromJson(core.Map _json) {
24946 if (_json.containsKey("etag")) {
24947 etag = _json["etag"];
24948 }
24949 if (_json.containsKey("items")) {
24950 items = _json["items"].map((value) => new Report.fromJson(value)).toList() ;
24951 }
24952 if (_json.containsKey("kind")) {
24953 kind = _json["kind"];
24954 }
24955 if (_json.containsKey("nextPageToken")) {
24956 nextPageToken = _json["nextPageToken"];
24957 }
24958 }
24959
24960 core.Map toJson() {
24961 var _json = new core.Map();
24962 if (etag != null) {
24963 _json["etag"] = etag;
24964 }
24965 if (items != null) {
24966 _json["items"] = items.map((value) => (value).toJson()).toList();
24967 }
24968 if (kind != null) {
24969 _json["kind"] = kind;
24970 }
24971 if (nextPageToken != null) {
24972 _json["nextPageToken"] = nextPageToken;
24973 }
24974 return _json;
24975 }
24976 }
24977
24978 /** Reporting Configuration */
24979 class ReportsConfiguration {
24980 /**
24981 * Whether the exposure to conversion report is enabled. This report shows
24982 * detailed pathway information on up to 10 of the most recent ad exposures
24983 * seen by a user before converting.
24984 */
24985 core.bool exposureToConversionEnabled;
24986 /** Default lookback windows for new advertisers in this account. */
24987 LookbackConfiguration lookbackConfiguration;
24988 /**
24989 * Report generation time zone ID of this account. This is a required field
24990 * that can only be changed by a superuser.
24991 * Acceptable values are:
24992 *
24993 * - "1" for "America/New_York"
24994 * - "2" for "Europe/London"
24995 * - "3" for "Europe/Paris"
24996 * - "4" for "Africa/Johannesburg"
24997 * - "5" for "Asia/Jerusalem"
24998 * - "6" for "Asia/Shanghai"
24999 * - "7" for "Asia/Hong_Kong"
25000 * - "8" for "Asia/Tokyo"
25001 * - "9" for "Australia/Sydney"
25002 * - "10" for "Asia/Dubai"
25003 * - "11" for "America/Los_Angeles"
25004 * - "12" for "Pacific/Auckland"
25005 * - "13" for "America/Sao_Paulo"
25006 */
25007 core.String reportGenerationTimeZoneId;
25008
25009 ReportsConfiguration();
25010
25011 ReportsConfiguration.fromJson(core.Map _json) {
25012 if (_json.containsKey("exposureToConversionEnabled")) {
25013 exposureToConversionEnabled = _json["exposureToConversionEnabled"];
25014 }
25015 if (_json.containsKey("lookbackConfiguration")) {
25016 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback Configuration"]);
25017 }
25018 if (_json.containsKey("reportGenerationTimeZoneId")) {
25019 reportGenerationTimeZoneId = _json["reportGenerationTimeZoneId"];
25020 }
25021 }
25022
25023 core.Map toJson() {
25024 var _json = new core.Map();
25025 if (exposureToConversionEnabled != null) {
25026 _json["exposureToConversionEnabled"] = exposureToConversionEnabled;
25027 }
25028 if (lookbackConfiguration != null) {
25029 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson();
25030 }
25031 if (reportGenerationTimeZoneId != null) {
25032 _json["reportGenerationTimeZoneId"] = reportGenerationTimeZoneId;
25033 }
25034 return _json;
25035 }
25036 }
25037
25038 /** Rich Media Exit Override. */
25039 class RichMediaExitOverride {
25040 /**
25041 * Click-through URL to override the default exit URL. Applicable if the
25042 * useCustomExitUrl field is set to true.
25043 */
25044 core.String customExitUrl;
25045 /** ID for the override to refer to a specific exit in the creative. */
25046 core.String exitId;
25047 /** Whether to use the custom exit URL. */
25048 core.bool useCustomExitUrl;
25049
25050 RichMediaExitOverride();
25051
25052 RichMediaExitOverride.fromJson(core.Map _json) {
25053 if (_json.containsKey("customExitUrl")) {
25054 customExitUrl = _json["customExitUrl"];
25055 }
25056 if (_json.containsKey("exitId")) {
25057 exitId = _json["exitId"];
25058 }
25059 if (_json.containsKey("useCustomExitUrl")) {
25060 useCustomExitUrl = _json["useCustomExitUrl"];
25061 }
25062 }
25063
25064 core.Map toJson() {
25065 var _json = new core.Map();
25066 if (customExitUrl != null) {
25067 _json["customExitUrl"] = customExitUrl;
25068 }
25069 if (exitId != null) {
25070 _json["exitId"] = exitId;
25071 }
25072 if (useCustomExitUrl != null) {
25073 _json["useCustomExitUrl"] = useCustomExitUrl;
25074 }
25075 return _json;
25076 }
25077 }
25078
25079 /** Contains properties of a site. */
25080 class Site {
25081 /**
25082 * Account ID of this site. This is a read-only field that can be left blank.
25083 */
25084 core.String accountId;
25085 /** Whether this site is approved. */
25086 core.bool approved;
25087 /**
25088 * Directory site associated with this site. This is a required field that is
25089 * read-only after insertion.
25090 */
25091 core.String directorySiteId;
25092 /**
25093 * Dimension value for the ID of the directory site. This is a read-only,
25094 * auto-generated field.
25095 */
25096 DimensionValue directorySiteIdDimensionValue;
25097 /** ID of this site. This is a read-only, auto-generated field. */
25098 core.String id;
25099 /**
25100 * Dimension value for the ID of this site. This is a read-only,
25101 * auto-generated field.
25102 */
25103 DimensionValue idDimensionValue;
25104 /** Key name of this site. This is a read-only, auto-generated field. */
25105 core.String keyName;
25106 /**
25107 * Identifies what kind of resource this is. Value: the fixed string
25108 * "dfareporting#site".
25109 */
25110 core.String kind;
25111 /**
25112 * Name of this site.This is a required field. Must be less than 128
25113 * characters long. If this site is under a subaccount, the name must be
25114 * unique among sites of the same subaccount. Otherwise, this site is a
25115 * top-level site, and the name must be unique among top-level sites of the
25116 * same account.
25117 */
25118 core.String name;
25119 /** Site contacts. */
25120 core.List<SiteContact> siteContacts;
25121 /** Site-wide settings. */
25122 SiteSettings siteSettings;
25123 /**
25124 * Subaccount ID of this site. This is a read-only field that can be left
25125 * blank.
25126 */
25127 core.String subaccountId;
25128
25129 Site();
25130
25131 Site.fromJson(core.Map _json) {
25132 if (_json.containsKey("accountId")) {
25133 accountId = _json["accountId"];
25134 }
25135 if (_json.containsKey("approved")) {
25136 approved = _json["approved"];
25137 }
25138 if (_json.containsKey("directorySiteId")) {
25139 directorySiteId = _json["directorySiteId"];
25140 }
25141 if (_json.containsKey("directorySiteIdDimensionValue")) {
25142 directorySiteIdDimensionValue = new DimensionValue.fromJson(_json["directo rySiteIdDimensionValue"]);
25143 }
25144 if (_json.containsKey("id")) {
25145 id = _json["id"];
25146 }
25147 if (_json.containsKey("idDimensionValue")) {
25148 idDimensionValue = new DimensionValue.fromJson(_json["idDimensionValue"]);
25149 }
25150 if (_json.containsKey("keyName")) {
25151 keyName = _json["keyName"];
25152 }
25153 if (_json.containsKey("kind")) {
25154 kind = _json["kind"];
25155 }
25156 if (_json.containsKey("name")) {
25157 name = _json["name"];
25158 }
25159 if (_json.containsKey("siteContacts")) {
25160 siteContacts = _json["siteContacts"].map((value) => new SiteContact.fromJs on(value)).toList();
25161 }
25162 if (_json.containsKey("siteSettings")) {
25163 siteSettings = new SiteSettings.fromJson(_json["siteSettings"]);
25164 }
25165 if (_json.containsKey("subaccountId")) {
25166 subaccountId = _json["subaccountId"];
25167 }
25168 }
25169
25170 core.Map toJson() {
25171 var _json = new core.Map();
25172 if (accountId != null) {
25173 _json["accountId"] = accountId;
25174 }
25175 if (approved != null) {
25176 _json["approved"] = approved;
25177 }
25178 if (directorySiteId != null) {
25179 _json["directorySiteId"] = directorySiteId;
25180 }
25181 if (directorySiteIdDimensionValue != null) {
25182 _json["directorySiteIdDimensionValue"] = (directorySiteIdDimensionValue).t oJson();
25183 }
25184 if (id != null) {
25185 _json["id"] = id;
25186 }
25187 if (idDimensionValue != null) {
25188 _json["idDimensionValue"] = (idDimensionValue).toJson();
25189 }
25190 if (keyName != null) {
25191 _json["keyName"] = keyName;
25192 }
25193 if (kind != null) {
25194 _json["kind"] = kind;
25195 }
25196 if (name != null) {
25197 _json["name"] = name;
25198 }
25199 if (siteContacts != null) {
25200 _json["siteContacts"] = siteContacts.map((value) => (value).toJson()).toLi st();
25201 }
25202 if (siteSettings != null) {
25203 _json["siteSettings"] = (siteSettings).toJson();
25204 }
25205 if (subaccountId != null) {
25206 _json["subaccountId"] = subaccountId;
25207 }
25208 return _json;
25209 }
25210 }
25211
25212 /** Site Contact */
25213 class SiteContact {
25214 /** Address of this site contact. */
25215 core.String address;
25216 /**
25217 * Site contact type.
25218 * Possible string values are:
25219 * - "SALES_PERSON"
25220 * - "TRAFFICKER"
25221 */
25222 core.String contactType;
25223 /** Email address of this site contact. This is a required field. */
25224 core.String email;
25225 /** First name of this site contact. */
25226 core.String firstName;
25227 /** ID of this site contact. This is a read-only, auto-generated field. */
25228 core.String id;
25229 /** Last name of this site contact. */
25230 core.String lastName;
25231 /** Primary phone number of this site contact. */
25232 core.String phone;
25233 /** Title or designation of this site contact. */
25234 core.String title;
25235
25236 SiteContact();
25237
25238 SiteContact.fromJson(core.Map _json) {
25239 if (_json.containsKey("address")) {
25240 address = _json["address"];
25241 }
25242 if (_json.containsKey("contactType")) {
25243 contactType = _json["contactType"];
25244 }
25245 if (_json.containsKey("email")) {
25246 email = _json["email"];
25247 }
25248 if (_json.containsKey("firstName")) {
25249 firstName = _json["firstName"];
25250 }
25251 if (_json.containsKey("id")) {
25252 id = _json["id"];
25253 }
25254 if (_json.containsKey("lastName")) {
25255 lastName = _json["lastName"];
25256 }
25257 if (_json.containsKey("phone")) {
25258 phone = _json["phone"];
25259 }
25260 if (_json.containsKey("title")) {
25261 title = _json["title"];
25262 }
25263 }
25264
25265 core.Map toJson() {
25266 var _json = new core.Map();
25267 if (address != null) {
25268 _json["address"] = address;
25269 }
25270 if (contactType != null) {
25271 _json["contactType"] = contactType;
25272 }
25273 if (email != null) {
25274 _json["email"] = email;
25275 }
25276 if (firstName != null) {
25277 _json["firstName"] = firstName;
25278 }
25279 if (id != null) {
25280 _json["id"] = id;
25281 }
25282 if (lastName != null) {
25283 _json["lastName"] = lastName;
25284 }
25285 if (phone != null) {
25286 _json["phone"] = phone;
25287 }
25288 if (title != null) {
25289 _json["title"] = title;
25290 }
25291 return _json;
25292 }
25293 }
25294
25295 /** Site Settings */
25296 class SiteSettings {
25297 /** Whether active view creatives are disabled for this site. */
25298 core.bool activeViewOptOut;
25299 /** Site-wide creative settings. */
25300 CreativeSettings creativeSettings;
25301 /** Whether brand safe ads are disabled for this site. */
25302 core.bool disableBrandSafeAds;
25303 /** Whether new cookies are disabled for this site. */
25304 core.bool disableNewCookie;
25305 /** Lookback window settings for this site. */
25306 LookbackConfiguration lookbackConfiguration;
25307 /** Configuration settings for dynamic and image floodlight tags. */
25308 TagSetting tagSetting;
25309 /**
25310 * Whether Verification and ActiveView are disabled for in-stream video
25311 * creatives on this site. The same setting videoActiveViewOptOut exists on
25312 * the directory site level -- the opt out occurs if either of these settings
25313 * are true. These settings are distinct from
25314 * DirectorySites.settings.activeViewOptOut or
25315 * Sites.siteSettings.activeViewOptOut which only apply to display ads.
25316 * However, Accounts.activeViewOptOut opts out both video traffic, as well as
25317 * display ads, from Verification and ActiveView.
25318 */
25319 core.bool videoActiveViewOptOut;
25320
25321 SiteSettings();
25322
25323 SiteSettings.fromJson(core.Map _json) {
25324 if (_json.containsKey("activeViewOptOut")) {
25325 activeViewOptOut = _json["activeViewOptOut"];
25326 }
25327 if (_json.containsKey("creativeSettings")) {
25328 creativeSettings = new CreativeSettings.fromJson(_json["creativeSettings"] );
25329 }
25330 if (_json.containsKey("disableBrandSafeAds")) {
25331 disableBrandSafeAds = _json["disableBrandSafeAds"];
25332 }
25333 if (_json.containsKey("disableNewCookie")) {
25334 disableNewCookie = _json["disableNewCookie"];
25335 }
25336 if (_json.containsKey("lookbackConfiguration")) {
25337 lookbackConfiguration = new LookbackConfiguration.fromJson(_json["lookback Configuration"]);
25338 }
25339 if (_json.containsKey("tagSetting")) {
25340 tagSetting = new TagSetting.fromJson(_json["tagSetting"]);
25341 }
25342 if (_json.containsKey("videoActiveViewOptOut")) {
25343 videoActiveViewOptOut = _json["videoActiveViewOptOut"];
25344 }
25345 }
25346
25347 core.Map toJson() {
25348 var _json = new core.Map();
25349 if (activeViewOptOut != null) {
25350 _json["activeViewOptOut"] = activeViewOptOut;
25351 }
25352 if (creativeSettings != null) {
25353 _json["creativeSettings"] = (creativeSettings).toJson();
25354 }
25355 if (disableBrandSafeAds != null) {
25356 _json["disableBrandSafeAds"] = disableBrandSafeAds;
25357 }
25358 if (disableNewCookie != null) {
25359 _json["disableNewCookie"] = disableNewCookie;
25360 }
25361 if (lookbackConfiguration != null) {
25362 _json["lookbackConfiguration"] = (lookbackConfiguration).toJson();
25363 }
25364 if (tagSetting != null) {
25365 _json["tagSetting"] = (tagSetting).toJson();
25366 }
25367 if (videoActiveViewOptOut != null) {
25368 _json["videoActiveViewOptOut"] = videoActiveViewOptOut;
25369 }
25370 return _json;
25371 }
25372 }
25373
25374 /** Site List Response */
25375 class SitesListResponse {
25376 /**
25377 * Identifies what kind of resource this is. Value: the fixed string
25378 * "dfareporting#sitesListResponse".
25379 */
25380 core.String kind;
25381 /** Pagination token to be used for the next list operation. */
25382 core.String nextPageToken;
25383 /** Site collection. */
25384 core.List<Site> sites;
25385
25386 SitesListResponse();
25387
25388 SitesListResponse.fromJson(core.Map _json) {
25389 if (_json.containsKey("kind")) {
25390 kind = _json["kind"];
25391 }
25392 if (_json.containsKey("nextPageToken")) {
25393 nextPageToken = _json["nextPageToken"];
25394 }
25395 if (_json.containsKey("sites")) {
25396 sites = _json["sites"].map((value) => new Site.fromJson(value)).toList();
25397 }
25398 }
25399
25400 core.Map toJson() {
25401 var _json = new core.Map();
25402 if (kind != null) {
25403 _json["kind"] = kind;
25404 }
25405 if (nextPageToken != null) {
25406 _json["nextPageToken"] = nextPageToken;
25407 }
25408 if (sites != null) {
25409 _json["sites"] = sites.map((value) => (value).toJson()).toList();
25410 }
25411 return _json;
25412 }
25413 }
25414
25415 /**
25416 * Represents the dimensions of ads, placements, creatives, or creative assets.
25417 */
25418 class Size {
25419 /** Height of this size. */
25420 core.int height;
25421 /** IAB standard size. This is a read-only, auto-generated field. */
25422 core.bool iab;
25423 /** ID of this size. This is a read-only, auto-generated field. */
25424 core.String id;
25425 /**
25426 * Identifies what kind of resource this is. Value: the fixed string
25427 * "dfareporting#size".
25428 */
25429 core.String kind;
25430 /** Width of this size. */
25431 core.int width;
25432
25433 Size();
25434
25435 Size.fromJson(core.Map _json) {
25436 if (_json.containsKey("height")) {
25437 height = _json["height"];
25438 }
25439 if (_json.containsKey("iab")) {
25440 iab = _json["iab"];
25441 }
25442 if (_json.containsKey("id")) {
25443 id = _json["id"];
25444 }
25445 if (_json.containsKey("kind")) {
25446 kind = _json["kind"];
25447 }
25448 if (_json.containsKey("width")) {
25449 width = _json["width"];
25450 }
25451 }
25452
25453 core.Map toJson() {
25454 var _json = new core.Map();
25455 if (height != null) {
25456 _json["height"] = height;
25457 }
25458 if (iab != null) {
25459 _json["iab"] = iab;
25460 }
25461 if (id != null) {
25462 _json["id"] = id;
25463 }
25464 if (kind != null) {
25465 _json["kind"] = kind;
25466 }
25467 if (width != null) {
25468 _json["width"] = width;
25469 }
25470 return _json;
25471 }
25472 }
25473
25474 /** Size List Response */
25475 class SizesListResponse {
25476 /**
25477 * Identifies what kind of resource this is. Value: the fixed string
25478 * "dfareporting#sizesListResponse".
25479 */
25480 core.String kind;
25481 /** Size collection. */
25482 core.List<Size> sizes;
25483
25484 SizesListResponse();
25485
25486 SizesListResponse.fromJson(core.Map _json) {
25487 if (_json.containsKey("kind")) {
25488 kind = _json["kind"];
25489 }
25490 if (_json.containsKey("sizes")) {
25491 sizes = _json["sizes"].map((value) => new Size.fromJson(value)).toList();
25492 }
25493 }
25494
25495 core.Map toJson() {
25496 var _json = new core.Map();
25497 if (kind != null) {
25498 _json["kind"] = kind;
25499 }
25500 if (sizes != null) {
25501 _json["sizes"] = sizes.map((value) => (value).toJson()).toList();
25502 }
25503 return _json;
25504 }
25505 }
25506
25507 /** Represents a sorted dimension. */
25508 class SortedDimension {
25509 /**
25510 * The kind of resource this is, in this case dfareporting#sortedDimension.
25511 */
25512 core.String kind;
25513 /** The name of the dimension. */
25514 core.String name;
25515 /**
25516 * An optional sort order for the dimension column.
25517 * Possible string values are:
25518 * - "ASCENDING"
25519 * - "DESCENDING"
25520 */
25521 core.String sortOrder;
25522
25523 SortedDimension();
25524
25525 SortedDimension.fromJson(core.Map _json) {
25526 if (_json.containsKey("kind")) {
25527 kind = _json["kind"];
25528 }
25529 if (_json.containsKey("name")) {
25530 name = _json["name"];
25531 }
25532 if (_json.containsKey("sortOrder")) {
25533 sortOrder = _json["sortOrder"];
25534 }
25535 }
25536
25537 core.Map toJson() {
25538 var _json = new core.Map();
25539 if (kind != null) {
25540 _json["kind"] = kind;
25541 }
25542 if (name != null) {
25543 _json["name"] = name;
25544 }
25545 if (sortOrder != null) {
25546 _json["sortOrder"] = sortOrder;
25547 }
25548 return _json;
25549 }
25550 }
25551
25552 /** Contains properties of a DCM subaccount. */
25553 class Subaccount {
25554 /**
25555 * ID of the account that contains this subaccount. This is a read-only field
25556 * that can be left blank.
25557 */
25558 core.String accountId;
25559 /** IDs of the available user role permissions for this subaccount. */
25560 core.List<core.String> availablePermissionIds;
25561 /** ID of this subaccount. This is a read-only, auto-generated field. */
25562 core.String id;
25563 /**
25564 * Identifies what kind of resource this is. Value: the fixed string
25565 * "dfareporting#subaccount".
25566 */
25567 core.String kind;
25568 /**
25569 * Name of this subaccount. This is a required field. Must be less than 128
25570 * characters long and be unique among subaccounts of the same account.
25571 */
25572 core.String name;
25573
25574 Subaccount();
25575
25576 Subaccount.fromJson(core.Map _json) {
25577 if (_json.containsKey("accountId")) {
25578 accountId = _json["accountId"];
25579 }
25580 if (_json.containsKey("availablePermissionIds")) {
25581 availablePermissionIds = _json["availablePermissionIds"];
25582 }
25583 if (_json.containsKey("id")) {
25584 id = _json["id"];
25585 }
25586 if (_json.containsKey("kind")) {
25587 kind = _json["kind"];
25588 }
25589 if (_json.containsKey("name")) {
25590 name = _json["name"];
25591 }
25592 }
25593
25594 core.Map toJson() {
25595 var _json = new core.Map();
25596 if (accountId != null) {
25597 _json["accountId"] = accountId;
25598 }
25599 if (availablePermissionIds != null) {
25600 _json["availablePermissionIds"] = availablePermissionIds;
25601 }
25602 if (id != null) {
25603 _json["id"] = id;
25604 }
25605 if (kind != null) {
25606 _json["kind"] = kind;
25607 }
25608 if (name != null) {
25609 _json["name"] = name;
25610 }
25611 return _json;
25612 }
25613 }
25614
25615 /** Subaccount List Response */
25616 class SubaccountsListResponse {
25617 /**
25618 * Identifies what kind of resource this is. Value: the fixed string
25619 * "dfareporting#subaccountsListResponse".
25620 */
25621 core.String kind;
25622 /** Pagination token to be used for the next list operation. */
25623 core.String nextPageToken;
25624 /** Subaccount collection. */
25625 core.List<Subaccount> subaccounts;
25626
25627 SubaccountsListResponse();
25628
25629 SubaccountsListResponse.fromJson(core.Map _json) {
25630 if (_json.containsKey("kind")) {
25631 kind = _json["kind"];
25632 }
25633 if (_json.containsKey("nextPageToken")) {
25634 nextPageToken = _json["nextPageToken"];
25635 }
25636 if (_json.containsKey("subaccounts")) {
25637 subaccounts = _json["subaccounts"].map((value) => new Subaccount.fromJson( value)).toList();
25638 }
25639 }
25640
25641 core.Map toJson() {
25642 var _json = new core.Map();
25643 if (kind != null) {
25644 _json["kind"] = kind;
25645 }
25646 if (nextPageToken != null) {
25647 _json["nextPageToken"] = nextPageToken;
25648 }
25649 if (subaccounts != null) {
25650 _json["subaccounts"] = subaccounts.map((value) => (value).toJson()).toList ();
25651 }
25652 return _json;
25653 }
25654 }
25655
25656 /** Placement Tag Data */
25657 class TagData {
25658 /** Ad associated with this placement tag. */
25659 core.String adId;
25660 /** Tag string to record a click. */
25661 core.String clickTag;
25662 /** Creative associated with this placement tag. */
25663 core.String creativeId;
25664 /**
25665 * TagData tag format of this tag.
25666 * Possible string values are:
25667 * - "PLACEMENT_TAG_CLICK_COMMANDS"
25668 * - "PLACEMENT_TAG_IFRAME_ILAYER"
25669 * - "PLACEMENT_TAG_IFRAME_JAVASCRIPT"
25670 * - "PLACEMENT_TAG_IFRAME_JAVASCRIPT_LEGACY"
25671 * - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH"
25672 * - "PLACEMENT_TAG_INSTREAM_VIDEO_PREFETCH_VAST_3"
25673 * - "PLACEMENT_TAG_INTERNAL_REDIRECT"
25674 * - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT"
25675 * - "PLACEMENT_TAG_INTERSTITIAL_IFRAME_JAVASCRIPT_LEGACY"
25676 * - "PLACEMENT_TAG_INTERSTITIAL_INTERNAL_REDIRECT"
25677 * - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT"
25678 * - "PLACEMENT_TAG_INTERSTITIAL_JAVASCRIPT_LEGACY"
25679 * - "PLACEMENT_TAG_JAVASCRIPT"
25680 * - "PLACEMENT_TAG_JAVASCRIPT_LEGACY"
25681 * - "PLACEMENT_TAG_STANDARD"
25682 * - "PLACEMENT_TAG_TRACKING"
25683 * - "PLACEMENT_TAG_TRACKING_IFRAME"
25684 * - "PLACEMENT_TAG_TRACKING_JAVASCRIPT"
25685 */
25686 core.String format;
25687 /** Tag string for serving an ad. */
25688 core.String impressionTag;
25689
25690 TagData();
25691
25692 TagData.fromJson(core.Map _json) {
25693 if (_json.containsKey("adId")) {
25694 adId = _json["adId"];
25695 }
25696 if (_json.containsKey("clickTag")) {
25697 clickTag = _json["clickTag"];
25698 }
25699 if (_json.containsKey("creativeId")) {
25700 creativeId = _json["creativeId"];
25701 }
25702 if (_json.containsKey("format")) {
25703 format = _json["format"];
25704 }
25705 if (_json.containsKey("impressionTag")) {
25706 impressionTag = _json["impressionTag"];
25707 }
25708 }
25709
25710 core.Map toJson() {
25711 var _json = new core.Map();
25712 if (adId != null) {
25713 _json["adId"] = adId;
25714 }
25715 if (clickTag != null) {
25716 _json["clickTag"] = clickTag;
25717 }
25718 if (creativeId != null) {
25719 _json["creativeId"] = creativeId;
25720 }
25721 if (format != null) {
25722 _json["format"] = format;
25723 }
25724 if (impressionTag != null) {
25725 _json["impressionTag"] = impressionTag;
25726 }
25727 return _json;
25728 }
25729 }
25730
25731 /** Tag Settings */
25732 class TagSetting {
25733 /**
25734 * Additional key-values to be included in tags. Each key-value pair must be
25735 * of the form key=value, and pairs must be separated by a semicolon (;). Keys
25736 * and values must not contain commas. For example, id=2;color=red is a valid
25737 * value for this field.
25738 */
25739 core.String additionalKeyValues;
25740 /**
25741 * Whether static landing page URLs should be included in the tags. This
25742 * setting applies only to placements.
25743 */
25744 core.bool includeClickThroughUrls;
25745 /** Whether click-tracking string should be included in the tags. */
25746 core.bool includeClickTracking;
25747 /**
25748 * Option specifying how keywords are embedded in ad tags. This setting can be
25749 * used to specify whether keyword placeholders are inserted in placement tags
25750 * for this site. Publishers can then add keywords to those placeholders.
25751 * Possible string values are:
25752 * - "GENERATE_SEPARATE_TAG_FOR_EACH_KEYWORD"
25753 * - "IGNORE"
25754 * - "PLACEHOLDER_WITH_LIST_OF_KEYWORDS"
25755 */
25756 core.String keywordOption;
25757
25758 TagSetting();
25759
25760 TagSetting.fromJson(core.Map _json) {
25761 if (_json.containsKey("additionalKeyValues")) {
25762 additionalKeyValues = _json["additionalKeyValues"];
25763 }
25764 if (_json.containsKey("includeClickThroughUrls")) {
25765 includeClickThroughUrls = _json["includeClickThroughUrls"];
25766 }
25767 if (_json.containsKey("includeClickTracking")) {
25768 includeClickTracking = _json["includeClickTracking"];
25769 }
25770 if (_json.containsKey("keywordOption")) {
25771 keywordOption = _json["keywordOption"];
25772 }
25773 }
25774
25775 core.Map toJson() {
25776 var _json = new core.Map();
25777 if (additionalKeyValues != null) {
25778 _json["additionalKeyValues"] = additionalKeyValues;
25779 }
25780 if (includeClickThroughUrls != null) {
25781 _json["includeClickThroughUrls"] = includeClickThroughUrls;
25782 }
25783 if (includeClickTracking != null) {
25784 _json["includeClickTracking"] = includeClickTracking;
25785 }
25786 if (keywordOption != null) {
25787 _json["keywordOption"] = keywordOption;
25788 }
25789 return _json;
25790 }
25791 }
25792
25793 /** Dynamic and Image Tag Settings. */
25794 class TagSettings {
25795 /** Whether dynamic floodlight tags are enabled. */
25796 core.bool dynamicTagEnabled;
25797 /** Whether image tags are enabled. */
25798 core.bool imageTagEnabled;
25799
25800 TagSettings();
25801
25802 TagSettings.fromJson(core.Map _json) {
25803 if (_json.containsKey("dynamicTagEnabled")) {
25804 dynamicTagEnabled = _json["dynamicTagEnabled"];
25805 }
25806 if (_json.containsKey("imageTagEnabled")) {
25807 imageTagEnabled = _json["imageTagEnabled"];
25808 }
25809 }
25810
25811 core.Map toJson() {
25812 var _json = new core.Map();
25813 if (dynamicTagEnabled != null) {
25814 _json["dynamicTagEnabled"] = dynamicTagEnabled;
25815 }
25816 if (imageTagEnabled != null) {
25817 _json["imageTagEnabled"] = imageTagEnabled;
25818 }
25819 return _json;
25820 }
25821 }
25822
25823 /** Target Window. */
25824 class TargetWindow {
25825 /** User-entered value. */
25826 core.String customHtml;
25827 /**
25828 * Type of browser window for which the backup image of the flash creative can
25829 * be displayed.
25830 * Possible string values are:
25831 * - "CURRENT_WINDOW"
25832 * - "CUSTOM"
25833 * - "NEW_WINDOW"
25834 */
25835 core.String targetWindowOption;
25836
25837 TargetWindow();
25838
25839 TargetWindow.fromJson(core.Map _json) {
25840 if (_json.containsKey("customHtml")) {
25841 customHtml = _json["customHtml"];
25842 }
25843 if (_json.containsKey("targetWindowOption")) {
25844 targetWindowOption = _json["targetWindowOption"];
25845 }
25846 }
25847
25848 core.Map toJson() {
25849 var _json = new core.Map();
25850 if (customHtml != null) {
25851 _json["customHtml"] = customHtml;
25852 }
25853 if (targetWindowOption != null) {
25854 _json["targetWindowOption"] = targetWindowOption;
25855 }
25856 return _json;
25857 }
25858 }
25859
25860 /**
25861 * Contains properties of a targetable remarketing list. Remarketing enables you
25862 * to create lists of users who have performed specific actions on a site, then
25863 * target ads to members of those lists. This resource is a read-only view of a
25864 * remarketing list to be used to faciliate targeting ads to specific lists.
25865 * Remarketing lists that are owned by your advertisers and those that are
25866 * shared to your advertisers or account are accessible via this resource. To
25867 * manage remarketing lists that are owned by your advertisers, use the
25868 * RemarketingLists resource.
25869 */
25870 class TargetableRemarketingList {
25871 /**
25872 * Account ID of this remarketing list. This is a read-only, auto-generated
25873 * field that is only returned in GET requests.
25874 */
25875 core.String accountId;
25876 /** Whether this targetable remarketing list is active. */
25877 core.bool active;
25878 /**
25879 * Dimension value for the advertiser ID that owns this targetable remarketing
25880 * list.
25881 */
25882 core.String advertiserId;
25883 /** Dimension value for the ID of the advertiser. */
25884 DimensionValue advertiserIdDimensionValue;
25885 /** Targetable remarketing list description. */
25886 core.String description;
25887 /** Targetable remarketing list ID. */
25888 core.String id;
25889 /**
25890 * Identifies what kind of resource this is. Value: the fixed string
25891 * "dfareporting#targetableRemarketingList".
25892 */
25893 core.String kind;
25894 /**
25895 * Number of days that a user should remain in the targetable remarketing list
25896 * without an impression.
25897 */
25898 core.String lifeSpan;
25899 /** Number of users currently in the list. This is a read-only field. */
25900 core.String listSize;
25901 /**
25902 * Product from which this targetable remarketing list was originated.
25903 * Possible string values are:
25904 * - "REMARKETING_LIST_SOURCE_ADX"
25905 * - "REMARKETING_LIST_SOURCE_DBM"
25906 * - "REMARKETING_LIST_SOURCE_DFA"
25907 * - "REMARKETING_LIST_SOURCE_DFP"
25908 * - "REMARKETING_LIST_SOURCE_DMP"
25909 * - "REMARKETING_LIST_SOURCE_GA"
25910 * - "REMARKETING_LIST_SOURCE_GPLUS"
25911 * - "REMARKETING_LIST_SOURCE_OTHER"
25912 * - "REMARKETING_LIST_SOURCE_PLAY_STORE"
25913 * - "REMARKETING_LIST_SOURCE_XFP"
25914 * - "REMARKETING_LIST_SOURCE_YOUTUBE"
25915 */
25916 core.String listSource;
25917 /**
25918 * Name of the targetable remarketing list. Is no greater than 128 characters
25919 * long.
25920 */
25921 core.String name;
25922 /**
25923 * Subaccount ID of this remarketing list. This is a read-only, auto-generated
25924 * field that is only returned in GET requests.
25925 */
25926 core.String subaccountId;
25927
25928 TargetableRemarketingList();
25929
25930 TargetableRemarketingList.fromJson(core.Map _json) {
25931 if (_json.containsKey("accountId")) {
25932 accountId = _json["accountId"];
25933 }
25934 if (_json.containsKey("active")) {
25935 active = _json["active"];
25936 }
25937 if (_json.containsKey("advertiserId")) {
25938 advertiserId = _json["advertiserId"];
25939 }
25940 if (_json.containsKey("advertiserIdDimensionValue")) {
25941 advertiserIdDimensionValue = new DimensionValue.fromJson(_json["advertiser IdDimensionValue"]);
25942 }
25943 if (_json.containsKey("description")) {
25944 description = _json["description"];
25945 }
25946 if (_json.containsKey("id")) {
25947 id = _json["id"];
25948 }
25949 if (_json.containsKey("kind")) {
25950 kind = _json["kind"];
25951 }
25952 if (_json.containsKey("lifeSpan")) {
25953 lifeSpan = _json["lifeSpan"];
25954 }
25955 if (_json.containsKey("listSize")) {
25956 listSize = _json["listSize"];
25957 }
25958 if (_json.containsKey("listSource")) {
25959 listSource = _json["listSource"];
25960 }
25961 if (_json.containsKey("name")) {
25962 name = _json["name"];
25963 }
25964 if (_json.containsKey("subaccountId")) {
25965 subaccountId = _json["subaccountId"];
25966 }
25967 }
25968
25969 core.Map toJson() {
25970 var _json = new core.Map();
25971 if (accountId != null) {
25972 _json["accountId"] = accountId;
25973 }
25974 if (active != null) {
25975 _json["active"] = active;
25976 }
25977 if (advertiserId != null) {
25978 _json["advertiserId"] = advertiserId;
25979 }
25980 if (advertiserIdDimensionValue != null) {
25981 _json["advertiserIdDimensionValue"] = (advertiserIdDimensionValue).toJson( );
25982 }
25983 if (description != null) {
25984 _json["description"] = description;
25985 }
25986 if (id != null) {
25987 _json["id"] = id;
25988 }
25989 if (kind != null) {
25990 _json["kind"] = kind;
25991 }
25992 if (lifeSpan != null) {
25993 _json["lifeSpan"] = lifeSpan;
25994 }
25995 if (listSize != null) {
25996 _json["listSize"] = listSize;
25997 }
25998 if (listSource != null) {
25999 _json["listSource"] = listSource;
26000 }
26001 if (name != null) {
26002 _json["name"] = name;
26003 }
26004 if (subaccountId != null) {
26005 _json["subaccountId"] = subaccountId;
26006 }
26007 return _json;
26008 }
26009 }
26010
26011 /** Targetable remarketing list response */
26012 class TargetableRemarketingListsListResponse {
26013 /**
26014 * Identifies what kind of resource this is. Value: the fixed string
26015 * "dfareporting#targetableRemarketingListsListResponse".
26016 */
26017 core.String kind;
26018 /** Pagination token to be used for the next list operation. */
26019 core.String nextPageToken;
26020 /** Targetable remarketing list collection. */
26021 core.List<TargetableRemarketingList> targetableRemarketingLists;
26022
26023 TargetableRemarketingListsListResponse();
26024
26025 TargetableRemarketingListsListResponse.fromJson(core.Map _json) {
26026 if (_json.containsKey("kind")) {
26027 kind = _json["kind"];
26028 }
26029 if (_json.containsKey("nextPageToken")) {
26030 nextPageToken = _json["nextPageToken"];
26031 }
26032 if (_json.containsKey("targetableRemarketingLists")) {
26033 targetableRemarketingLists = _json["targetableRemarketingLists"].map((valu e) => new TargetableRemarketingList.fromJson(value)).toList();
26034 }
26035 }
26036
26037 core.Map toJson() {
26038 var _json = new core.Map();
26039 if (kind != null) {
26040 _json["kind"] = kind;
26041 }
26042 if (nextPageToken != null) {
26043 _json["nextPageToken"] = nextPageToken;
26044 }
26045 if (targetableRemarketingLists != null) {
26046 _json["targetableRemarketingLists"] = targetableRemarketingLists.map((valu e) => (value).toJson()).toList();
26047 }
26048 return _json;
26049 }
26050 }
26051
26052 /** Technology Targeting. */
26053 class TechnologyTargeting {
26054 /**
26055 * Browsers that this ad targets. For each browser either set browserVersionId
26056 * or dartId along with the version numbers. If both are specified, only
26057 * browserVersionId will be used. The other fields are populated automatically
26058 * when the ad is inserted or updated.
26059 */
26060 core.List<Browser> browsers;
26061 /**
26062 * Connection types that this ad targets. For each connection type only id is
26063 * required. The other fields are populated automatically when the ad is
26064 * inserted or updated.
26065 */
26066 core.List<ConnectionType> connectionTypes;
26067 /**
26068 * Mobile carriers that this ad targets. For each mobile carrier only id is
26069 * required, and the other fields are populated automatically when the ad is
26070 * inserted or updated. If targeting a mobile carrier, do not set targeting
26071 * for any zip codes.
26072 */
26073 core.List<MobileCarrier> mobileCarriers;
26074 /**
26075 * Operating system versions that this ad targets. To target all versions, use
26076 * operatingSystems. For each operating system version, only id is required.
26077 * The other fields are populated automatically when the ad is inserted or
26078 * updated. If targeting an operating system version, do not set targeting for
26079 * the corresponding operating system in operatingSystems.
26080 */
26081 core.List<OperatingSystemVersion> operatingSystemVersions;
26082 /**
26083 * Operating systems that this ad targets. To target specific versions, use
26084 * operatingSystemVersions. For each operating system only dartId is required.
26085 * The other fields are populated automatically when the ad is inserted or
26086 * updated. If targeting an operating system, do not set targeting for
26087 * operating system versions for the same operating system.
26088 */
26089 core.List<OperatingSystem> operatingSystems;
26090 /**
26091 * Platform types that this ad targets. For example, desktop, mobile, or
26092 * tablet. For each platform type, only id is required, and the other fields
26093 * are populated automatically when the ad is inserted or updated.
26094 */
26095 core.List<PlatformType> platformTypes;
26096
26097 TechnologyTargeting();
26098
26099 TechnologyTargeting.fromJson(core.Map _json) {
26100 if (_json.containsKey("browsers")) {
26101 browsers = _json["browsers"].map((value) => new Browser.fromJson(value)).t oList();
26102 }
26103 if (_json.containsKey("connectionTypes")) {
26104 connectionTypes = _json["connectionTypes"].map((value) => new ConnectionTy pe.fromJson(value)).toList();
26105 }
26106 if (_json.containsKey("mobileCarriers")) {
26107 mobileCarriers = _json["mobileCarriers"].map((value) => new MobileCarrier. fromJson(value)).toList();
26108 }
26109 if (_json.containsKey("operatingSystemVersions")) {
26110 operatingSystemVersions = _json["operatingSystemVersions"].map((value) => new OperatingSystemVersion.fromJson(value)).toList();
26111 }
26112 if (_json.containsKey("operatingSystems")) {
26113 operatingSystems = _json["operatingSystems"].map((value) => new OperatingS ystem.fromJson(value)).toList();
26114 }
26115 if (_json.containsKey("platformTypes")) {
26116 platformTypes = _json["platformTypes"].map((value) => new PlatformType.fro mJson(value)).toList();
26117 }
26118 }
26119
26120 core.Map toJson() {
26121 var _json = new core.Map();
26122 if (browsers != null) {
26123 _json["browsers"] = browsers.map((value) => (value).toJson()).toList();
26124 }
26125 if (connectionTypes != null) {
26126 _json["connectionTypes"] = connectionTypes.map((value) => (value).toJson() ).toList();
26127 }
26128 if (mobileCarriers != null) {
26129 _json["mobileCarriers"] = mobileCarriers.map((value) => (value).toJson()). toList();
26130 }
26131 if (operatingSystemVersions != null) {
26132 _json["operatingSystemVersions"] = operatingSystemVersions.map((value) => (value).toJson()).toList();
26133 }
26134 if (operatingSystems != null) {
26135 _json["operatingSystems"] = operatingSystems.map((value) => (value).toJson ()).toList();
26136 }
26137 if (platformTypes != null) {
26138 _json["platformTypes"] = platformTypes.map((value) => (value).toJson()).to List();
26139 }
26140 return _json;
26141 }
26142 }
26143
26144 /** Third Party Authentication Token */
26145 class ThirdPartyAuthenticationToken {
26146 /** Name of the third-party authentication token. */
26147 core.String name;
26148 /**
26149 * Value of the third-party authentication token. This is a read-only,
26150 * auto-generated field.
26151 */
26152 core.String value;
26153
26154 ThirdPartyAuthenticationToken();
26155
26156 ThirdPartyAuthenticationToken.fromJson(core.Map _json) {
26157 if (_json.containsKey("name")) {
26158 name = _json["name"];
26159 }
26160 if (_json.containsKey("value")) {
26161 value = _json["value"];
26162 }
26163 }
26164
26165 core.Map toJson() {
26166 var _json = new core.Map();
26167 if (name != null) {
26168 _json["name"] = name;
26169 }
26170 if (value != null) {
26171 _json["value"] = value;
26172 }
26173 return _json;
26174 }
26175 }
26176
26177 /** Third-party Tracking URL. */
26178 class ThirdPartyTrackingUrl {
26179 /**
26180 * Third-party URL type for in-stream video creatives.
26181 * Possible string values are:
26182 * - "CLICK_TRACKING"
26183 * - "IMPRESSION"
26184 * - "RICH_MEDIA_BACKUP_IMPRESSION"
26185 * - "RICH_MEDIA_IMPRESSION"
26186 * - "RICH_MEDIA_RM_IMPRESSION"
26187 * - "SURVEY"
26188 * - "VIDEO_COMPLETE"
26189 * - "VIDEO_CUSTOM"
26190 * - "VIDEO_FIRST_QUARTILE"
26191 * - "VIDEO_FULLSCREEN"
26192 * - "VIDEO_MIDPOINT"
26193 * - "VIDEO_MUTE"
26194 * - "VIDEO_PAUSE"
26195 * - "VIDEO_PROGRESS"
26196 * - "VIDEO_REWIND"
26197 * - "VIDEO_SKIP"
26198 * - "VIDEO_START"
26199 * - "VIDEO_STOP"
26200 * - "VIDEO_THIRD_QUARTILE"
26201 */
26202 core.String thirdPartyUrlType;
26203 /** URL for the specified third-party URL type. */
26204 core.String url;
26205
26206 ThirdPartyTrackingUrl();
26207
26208 ThirdPartyTrackingUrl.fromJson(core.Map _json) {
26209 if (_json.containsKey("thirdPartyUrlType")) {
26210 thirdPartyUrlType = _json["thirdPartyUrlType"];
26211 }
26212 if (_json.containsKey("url")) {
26213 url = _json["url"];
26214 }
26215 }
26216
26217 core.Map toJson() {
26218 var _json = new core.Map();
26219 if (thirdPartyUrlType != null) {
26220 _json["thirdPartyUrlType"] = thirdPartyUrlType;
26221 }
26222 if (url != null) {
26223 _json["url"] = url;
26224 }
26225 return _json;
26226 }
26227 }
26228
26229 /** User Defined Variable configuration. */
26230 class UserDefinedVariableConfiguration {
26231 /**
26232 * Data type for the variable. This is a required field.
26233 * Possible string values are:
26234 * - "NUMBER"
26235 * - "STRING"
26236 */
26237 core.String dataType;
26238 /**
26239 * User-friendly name for the variable which will appear in reports. This is a
26240 * required field, must be less than 64 characters long, and cannot contain
26241 * the following characters: ""<>".
26242 */
26243 core.String reportName;
26244 /**
26245 * Variable name in the tag. This is a required field.
26246 * Possible string values are:
26247 * - "U1"
26248 * - "U10"
26249 * - "U100"
26250 * - "U11"
26251 * - "U12"
26252 * - "U13"
26253 * - "U14"
26254 * - "U15"
26255 * - "U16"
26256 * - "U17"
26257 * - "U18"
26258 * - "U19"
26259 * - "U2"
26260 * - "U20"
26261 * - "U21"
26262 * - "U22"
26263 * - "U23"
26264 * - "U24"
26265 * - "U25"
26266 * - "U26"
26267 * - "U27"
26268 * - "U28"
26269 * - "U29"
26270 * - "U3"
26271 * - "U30"
26272 * - "U31"
26273 * - "U32"
26274 * - "U33"
26275 * - "U34"
26276 * - "U35"
26277 * - "U36"
26278 * - "U37"
26279 * - "U38"
26280 * - "U39"
26281 * - "U4"
26282 * - "U40"
26283 * - "U41"
26284 * - "U42"
26285 * - "U43"
26286 * - "U44"
26287 * - "U45"
26288 * - "U46"
26289 * - "U47"
26290 * - "U48"
26291 * - "U49"
26292 * - "U5"
26293 * - "U50"
26294 * - "U51"
26295 * - "U52"
26296 * - "U53"
26297 * - "U54"
26298 * - "U55"
26299 * - "U56"
26300 * - "U57"
26301 * - "U58"
26302 * - "U59"
26303 * - "U6"
26304 * - "U60"
26305 * - "U61"
26306 * - "U62"
26307 * - "U63"
26308 * - "U64"
26309 * - "U65"
26310 * - "U66"
26311 * - "U67"
26312 * - "U68"
26313 * - "U69"
26314 * - "U7"
26315 * - "U70"
26316 * - "U71"
26317 * - "U72"
26318 * - "U73"
26319 * - "U74"
26320 * - "U75"
26321 * - "U76"
26322 * - "U77"
26323 * - "U78"
26324 * - "U79"
26325 * - "U8"
26326 * - "U80"
26327 * - "U81"
26328 * - "U82"
26329 * - "U83"
26330 * - "U84"
26331 * - "U85"
26332 * - "U86"
26333 * - "U87"
26334 * - "U88"
26335 * - "U89"
26336 * - "U9"
26337 * - "U90"
26338 * - "U91"
26339 * - "U92"
26340 * - "U93"
26341 * - "U94"
26342 * - "U95"
26343 * - "U96"
26344 * - "U97"
26345 * - "U98"
26346 * - "U99"
26347 */
26348 core.String variableType;
26349
26350 UserDefinedVariableConfiguration();
26351
26352 UserDefinedVariableConfiguration.fromJson(core.Map _json) {
26353 if (_json.containsKey("dataType")) {
26354 dataType = _json["dataType"];
26355 }
26356 if (_json.containsKey("reportName")) {
26357 reportName = _json["reportName"];
26358 }
26359 if (_json.containsKey("variableType")) {
26360 variableType = _json["variableType"];
26361 }
26362 }
26363
26364 core.Map toJson() {
26365 var _json = new core.Map();
26366 if (dataType != null) {
26367 _json["dataType"] = dataType;
26368 }
26369 if (reportName != null) {
26370 _json["reportName"] = reportName;
26371 }
26372 if (variableType != null) {
26373 _json["variableType"] = variableType;
26374 }
26375 return _json;
26376 }
26377 }
26378
26379 /** Represents a UserProfile resource. */
26380 class UserProfile {
26381 /** The account ID to which this profile belongs. */
26382 core.String accountId;
26383 /** The account name this profile belongs to. */
26384 core.String accountName;
26385 /** The eTag of this response for caching purposes. */
26386 core.String etag;
26387 /** The kind of resource this is, in this case dfareporting#userProfile. */
26388 core.String kind;
26389 /** The unique ID of the user profile. */
26390 core.String profileId;
26391 /** The sub account ID this profile belongs to if applicable. */
26392 core.String subAccountId;
26393 /** The sub account name this profile belongs to if applicable. */
26394 core.String subAccountName;
26395 /** The user name. */
26396 core.String userName;
26397
26398 UserProfile();
26399
26400 UserProfile.fromJson(core.Map _json) {
26401 if (_json.containsKey("accountId")) {
26402 accountId = _json["accountId"];
26403 }
26404 if (_json.containsKey("accountName")) {
26405 accountName = _json["accountName"];
26406 }
26407 if (_json.containsKey("etag")) {
26408 etag = _json["etag"];
26409 }
26410 if (_json.containsKey("kind")) {
26411 kind = _json["kind"];
26412 }
26413 if (_json.containsKey("profileId")) {
26414 profileId = _json["profileId"];
26415 }
26416 if (_json.containsKey("subAccountId")) {
26417 subAccountId = _json["subAccountId"];
26418 }
26419 if (_json.containsKey("subAccountName")) {
26420 subAccountName = _json["subAccountName"];
26421 }
26422 if (_json.containsKey("userName")) {
26423 userName = _json["userName"];
26424 }
26425 }
26426
26427 core.Map toJson() {
26428 var _json = new core.Map();
26429 if (accountId != null) {
26430 _json["accountId"] = accountId;
26431 }
26432 if (accountName != null) {
26433 _json["accountName"] = accountName;
26434 }
26435 if (etag != null) {
26436 _json["etag"] = etag;
26437 }
26438 if (kind != null) {
26439 _json["kind"] = kind;
26440 }
26441 if (profileId != null) {
26442 _json["profileId"] = profileId;
26443 }
26444 if (subAccountId != null) {
26445 _json["subAccountId"] = subAccountId;
26446 }
26447 if (subAccountName != null) {
26448 _json["subAccountName"] = subAccountName;
26449 }
26450 if (userName != null) {
26451 _json["userName"] = userName;
26452 }
26453 return _json;
26454 }
26455 }
26456
26457 /** Represents the list of user profiles. */
26458 class UserProfileList {
26459 /** The eTag of this response for caching purposes. */
26460 core.String etag;
26461 /** The user profiles returned in this response. */
26462 core.List<UserProfile> items;
26463 /** The kind of list this is, in this case dfareporting#userProfileList. */
26464 core.String kind;
26465
26466 UserProfileList();
26467
26468 UserProfileList.fromJson(core.Map _json) {
26469 if (_json.containsKey("etag")) {
26470 etag = _json["etag"];
26471 }
26472 if (_json.containsKey("items")) {
26473 items = _json["items"].map((value) => new UserProfile.fromJson(value)).toL ist();
26474 }
26475 if (_json.containsKey("kind")) {
26476 kind = _json["kind"];
26477 }
26478 }
26479
26480 core.Map toJson() {
26481 var _json = new core.Map();
26482 if (etag != null) {
26483 _json["etag"] = etag;
26484 }
26485 if (items != null) {
26486 _json["items"] = items.map((value) => (value).toJson()).toList();
26487 }
26488 if (kind != null) {
26489 _json["kind"] = kind;
26490 }
26491 return _json;
26492 }
26493 }
26494
26495 /** Contains properties of auser role, which is used to manage user access. */
26496 class UserRole {
26497 /**
26498 * Account ID of this user role. This is a read-only field that can be left
26499 * blank.
26500 */
26501 core.String accountId;
26502 /**
26503 * Whether this is a default user role. Default user roles are created by the
26504 * system for the account/subaccount and cannot be modified or deleted. Each
26505 * default user role comes with a basic set of preassigned permissions.
26506 */
26507 core.bool defaultUserRole;
26508 /** ID of this user role. This is a read-only, auto-generated field. */
26509 core.String id;
26510 /**
26511 * Identifies what kind of resource this is. Value: the fixed string
26512 * "dfareporting#userRole".
26513 */
26514 core.String kind;
26515 /**
26516 * Name of this user role. This is a required field. Must be less than 256
26517 * characters long. If this user role is under a subaccount, the name must be
26518 * unique among sites of the same subaccount. Otherwise, this user role is a
26519 * top-level user role, and the name must be unique among top-level user roles
26520 * of the same account.
26521 */
26522 core.String name;
26523 /**
26524 * ID of the user role that this user role is based on or copied from. This is
26525 * a required field.
26526 */
26527 core.String parentUserRoleId;
26528 /** List of permissions associated with this user role. */
26529 core.List<UserRolePermission> permissions;
26530 /**
26531 * Subaccount ID of this user role. This is a read-only field that can be left
26532 * blank.
26533 */
26534 core.String subaccountId;
26535
26536 UserRole();
26537
26538 UserRole.fromJson(core.Map _json) {
26539 if (_json.containsKey("accountId")) {
26540 accountId = _json["accountId"];
26541 }
26542 if (_json.containsKey("defaultUserRole")) {
26543 defaultUserRole = _json["defaultUserRole"];
26544 }
26545 if (_json.containsKey("id")) {
26546 id = _json["id"];
26547 }
26548 if (_json.containsKey("kind")) {
26549 kind = _json["kind"];
26550 }
26551 if (_json.containsKey("name")) {
26552 name = _json["name"];
26553 }
26554 if (_json.containsKey("parentUserRoleId")) {
26555 parentUserRoleId = _json["parentUserRoleId"];
26556 }
26557 if (_json.containsKey("permissions")) {
26558 permissions = _json["permissions"].map((value) => new UserRolePermission.f romJson(value)).toList();
26559 }
26560 if (_json.containsKey("subaccountId")) {
26561 subaccountId = _json["subaccountId"];
26562 }
26563 }
26564
26565 core.Map toJson() {
26566 var _json = new core.Map();
26567 if (accountId != null) {
26568 _json["accountId"] = accountId;
26569 }
26570 if (defaultUserRole != null) {
26571 _json["defaultUserRole"] = defaultUserRole;
26572 }
26573 if (id != null) {
26574 _json["id"] = id;
26575 }
26576 if (kind != null) {
26577 _json["kind"] = kind;
26578 }
26579 if (name != null) {
26580 _json["name"] = name;
26581 }
26582 if (parentUserRoleId != null) {
26583 _json["parentUserRoleId"] = parentUserRoleId;
26584 }
26585 if (permissions != null) {
26586 _json["permissions"] = permissions.map((value) => (value).toJson()).toList ();
26587 }
26588 if (subaccountId != null) {
26589 _json["subaccountId"] = subaccountId;
26590 }
26591 return _json;
26592 }
26593 }
26594
26595 /** Contains properties of a user role permission. */
26596 class UserRolePermission {
26597 /**
26598 * Levels of availability for a user role permission.
26599 * Possible string values are:
26600 * - "ACCOUNT_ALWAYS"
26601 * - "ACCOUNT_BY_DEFAULT"
26602 * - "NOT_AVAILABLE_BY_DEFAULT"
26603 * - "SUBACCOUNT_AND_ACCOUNT_ALWAYS"
26604 * - "SUBACCOUNT_AND_ACCOUNT_BY_DEFAULT"
26605 */
26606 core.String availability;
26607 /** ID of this user role permission. */
26608 core.String id;
26609 /**
26610 * Identifies what kind of resource this is. Value: the fixed string
26611 * "dfareporting#userRolePermission".
26612 */
26613 core.String kind;
26614 /** Name of this user role permission. */
26615 core.String name;
26616 /** ID of the permission group that this user role permission belongs to. */
26617 core.String permissionGroupId;
26618
26619 UserRolePermission();
26620
26621 UserRolePermission.fromJson(core.Map _json) {
26622 if (_json.containsKey("availability")) {
26623 availability = _json["availability"];
26624 }
26625 if (_json.containsKey("id")) {
26626 id = _json["id"];
26627 }
26628 if (_json.containsKey("kind")) {
26629 kind = _json["kind"];
26630 }
26631 if (_json.containsKey("name")) {
26632 name = _json["name"];
26633 }
26634 if (_json.containsKey("permissionGroupId")) {
26635 permissionGroupId = _json["permissionGroupId"];
26636 }
26637 }
26638
26639 core.Map toJson() {
26640 var _json = new core.Map();
26641 if (availability != null) {
26642 _json["availability"] = availability;
26643 }
26644 if (id != null) {
26645 _json["id"] = id;
26646 }
26647 if (kind != null) {
26648 _json["kind"] = kind;
26649 }
26650 if (name != null) {
26651 _json["name"] = name;
26652 }
26653 if (permissionGroupId != null) {
26654 _json["permissionGroupId"] = permissionGroupId;
26655 }
26656 return _json;
26657 }
26658 }
26659
26660 /** Represents a grouping of related user role permissions. */
26661 class UserRolePermissionGroup {
26662 /** ID of this user role permission. */
26663 core.String id;
26664 /**
26665 * Identifies what kind of resource this is. Value: the fixed string
26666 * "dfareporting#userRolePermissionGroup".
26667 */
26668 core.String kind;
26669 /** Name of this user role permission group. */
26670 core.String name;
26671
26672 UserRolePermissionGroup();
26673
26674 UserRolePermissionGroup.fromJson(core.Map _json) {
26675 if (_json.containsKey("id")) {
26676 id = _json["id"];
26677 }
26678 if (_json.containsKey("kind")) {
26679 kind = _json["kind"];
26680 }
26681 if (_json.containsKey("name")) {
26682 name = _json["name"];
26683 }
26684 }
26685
26686 core.Map toJson() {
26687 var _json = new core.Map();
26688 if (id != null) {
26689 _json["id"] = id;
26690 }
26691 if (kind != null) {
26692 _json["kind"] = kind;
26693 }
26694 if (name != null) {
26695 _json["name"] = name;
26696 }
26697 return _json;
26698 }
26699 }
26700
26701 /** User Role Permission Group List Response */
26702 class UserRolePermissionGroupsListResponse {
26703 /**
26704 * Identifies what kind of resource this is. Value: the fixed string
26705 * "dfareporting#userRolePermissionGroupsListResponse".
26706 */
26707 core.String kind;
26708 /** User role permission group collection. */
26709 core.List<UserRolePermissionGroup> userRolePermissionGroups;
26710
26711 UserRolePermissionGroupsListResponse();
26712
26713 UserRolePermissionGroupsListResponse.fromJson(core.Map _json) {
26714 if (_json.containsKey("kind")) {
26715 kind = _json["kind"];
26716 }
26717 if (_json.containsKey("userRolePermissionGroups")) {
26718 userRolePermissionGroups = _json["userRolePermissionGroups"].map((value) = > new UserRolePermissionGroup.fromJson(value)).toList();
26719 }
26720 }
26721
26722 core.Map toJson() {
26723 var _json = new core.Map();
26724 if (kind != null) {
26725 _json["kind"] = kind;
26726 }
26727 if (userRolePermissionGroups != null) {
26728 _json["userRolePermissionGroups"] = userRolePermissionGroups.map((value) = > (value).toJson()).toList();
26729 }
26730 return _json;
26731 }
26732 }
26733
26734 /** User Role Permission List Response */
26735 class UserRolePermissionsListResponse {
26736 /**
26737 * Identifies what kind of resource this is. Value: the fixed string
26738 * "dfareporting#userRolePermissionsListResponse".
26739 */
26740 core.String kind;
26741 /** User role permission collection. */
26742 core.List<UserRolePermission> userRolePermissions;
26743
26744 UserRolePermissionsListResponse();
26745
26746 UserRolePermissionsListResponse.fromJson(core.Map _json) {
26747 if (_json.containsKey("kind")) {
26748 kind = _json["kind"];
26749 }
26750 if (_json.containsKey("userRolePermissions")) {
26751 userRolePermissions = _json["userRolePermissions"].map((value) => new User RolePermission.fromJson(value)).toList();
26752 }
26753 }
26754
26755 core.Map toJson() {
26756 var _json = new core.Map();
26757 if (kind != null) {
26758 _json["kind"] = kind;
26759 }
26760 if (userRolePermissions != null) {
26761 _json["userRolePermissions"] = userRolePermissions.map((value) => (value). toJson()).toList();
26762 }
26763 return _json;
26764 }
26765 }
26766
26767 /** User Role List Response */
26768 class UserRolesListResponse {
26769 /**
26770 * Identifies what kind of resource this is. Value: the fixed string
26771 * "dfareporting#userRolesListResponse".
26772 */
26773 core.String kind;
26774 /** Pagination token to be used for the next list operation. */
26775 core.String nextPageToken;
26776 /** User role collection. */
26777 core.List<UserRole> userRoles;
26778
26779 UserRolesListResponse();
26780
26781 UserRolesListResponse.fromJson(core.Map _json) {
26782 if (_json.containsKey("kind")) {
26783 kind = _json["kind"];
26784 }
26785 if (_json.containsKey("nextPageToken")) {
26786 nextPageToken = _json["nextPageToken"];
26787 }
26788 if (_json.containsKey("userRoles")) {
26789 userRoles = _json["userRoles"].map((value) => new UserRole.fromJson(value) ).toList();
26790 }
26791 }
26792
26793 core.Map toJson() {
26794 var _json = new core.Map();
26795 if (kind != null) {
26796 _json["kind"] = kind;
26797 }
26798 if (nextPageToken != null) {
26799 _json["nextPageToken"] = nextPageToken;
26800 }
26801 if (userRoles != null) {
26802 _json["userRoles"] = userRoles.map((value) => (value).toJson()).toList();
26803 }
26804 return _json;
26805 }
26806 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/deploymentmanager/v2.dart ('k') | generated/googleapis/lib/drive/v2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698